From: sparky4 Date: Tue, 4 Oct 2016 17:40:11 +0000 (-0500) Subject: VRSTEST.EXE NOW USES PAGE MANAGER! wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=bd35bd7d97646cc726bd40cc54c9a158af008b4d;p=16.git VRSTEST.EXE NOW USES PAGE MANAGER! wwww --- diff --git a/DEBUG.16W b/DEBUG.16W index 1b6087e1..8aacb645 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:11718 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++00 -Seg:2e3b Size:36 Owner:0x0 -++ -Seg:2e5f Size:256 Owner:0x1988 +Seg:0 Size:11723 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++000 +Seg:2e40 Size:36 Owner:0x0 ++ +Seg:2e64 Size:256 Owner:0x1988 ++++ -Seg:2f5f Size:256 Owner:0x1776 +Seg:2f64 Size:256 Owner:0x1776 ++++ -Seg:305f Size:256 Owner:0x1778 -++++ -Seg:315f Size:256 Owner:0x177a +Seg:3064 Size:256 Owner:0x1778 +++++ -Seg:325f Size:256 Owner:0x177c +Seg:3164 Size:256 Owner:0x177a ++++ -Seg:335f Size:256 Owner:0x177e +Seg:3264 Size:256 Owner:0x177c ++++ -Seg:345f Size:256 Owner:0x1780 +Seg:3364 Size:256 Owner:0x177e ++++ -Seg:355f Size:256 Owner:0x1782 +Seg:3464 Size:256 Owner:0x1780 ++++ -Seg:365f Size:256 Owner:0x1784 +Seg:3564 Size:256 Owner:0x1782 +++++ -Seg:375f Size:256 Owner:0x1786 +Seg:3664 Size:256 Owner:0x1784 ++++ -Seg:385f Size:256 Owner:0x1788 +Seg:3764 Size:256 Owner:0x1786 ++++ -Seg:395f Size:256 Owner:0x178a +Seg:3864 Size:256 Owner:0x1788 ++++ -Seg:3a5f Size:256 Owner:0x178c +Seg:3964 Size:256 Owner:0x178a ++++ -Seg:3b5f Size:256 Owner:0x178e +Seg:3a64 Size:256 Owner:0x178c +++++ -Seg:3c5f Size:256 Owner:0x1790 +Seg:3b64 Size:256 Owner:0x178e ++++ -Seg:3d5f Size:256 Owner:0x1792 +Seg:3c64 Size:256 Owner:0x1790 ++++ -Seg:3e5f Size:256 Owner:0x1794 +Seg:3d64 Size:256 Owner:0x1792 ++++ -Seg:3f5f Size:256 Owner:0x1796 +Seg:3e64 Size:256 Owner:0x1794 ++++ -Seg:405f Size:256 Owner:0x1798 +Seg:3f64 Size:256 Owner:0x1796 +++++ -Seg:415f Size:256 Owner:0x179a +Seg:4064 Size:256 Owner:0x1798 ++++ -Seg:425f Size:256 Owner:0x179c +Seg:4164 Size:256 Owner:0x179a ++++ -Seg:435f Size:256 Owner:0x179e +Seg:4264 Size:256 Owner:0x179c ++++ -Seg:445f Size:256 Owner:0x17a0 +Seg:4364 Size:256 Owner:0x179e ++++ -Seg:455f Size:256 Owner:0x17a2 +Seg:4464 Size:256 Owner:0x17a0 +++++ -Seg:465f Size:256 Owner:0x17a4 +Seg:4564 Size:256 Owner:0x17a2 ++++ -Seg:475f Size:256 Owner:0x17a6 +Seg:4664 Size:256 Owner:0x17a4 ++++ -Seg:485f Size:256 Owner:0x17a8 +Seg:4764 Size:256 Owner:0x17a6 ++++ -Seg:495f Size:256 Owner:0x17aa +Seg:4864 Size:256 Owner:0x17a8 ++++ -Seg:4a5f Size:256 Owner:0x17ac +Seg:4964 Size:256 Owner:0x17aa +++++ -Seg:4b5f Size:256 Owner:0x17ae +Seg:4a64 Size:256 Owner:0x17ac ++++ -Seg:4c5f Size:256 Owner:0x17b0 +Seg:4b64 Size:256 Owner:0x17ae ++++ -Seg:4d5f Size:256 Owner:0x17b2 +Seg:4c64 Size:256 Owner:0x17b0 ++++ -Seg:4e5f Size:256 Owner:0x17b4 +Seg:4d64 Size:256 Owner:0x17b2 ++++ -Seg:4f5f Size:256 Owner:0x17b6 +Seg:4e64 Size:256 Owner:0x17b4 +++++ -Seg:505f Size:256 Owner:0x17b8 +Seg:4f64 Size:256 Owner:0x17b6 ++++ -Seg:515f Size:256 Owner:0x17ba +Seg:5064 Size:256 Owner:0x17b8 ++++ -Seg:525f Size:256 Owner:0x17bc +Seg:5164 Size:256 Owner:0x17ba ++++ -Seg:535f Size:256 Owner:0x17be +Seg:5264 Size:256 Owner:0x17bc ++++ -Seg:545f Size:256 Owner:0x17c0 +Seg:5364 Size:256 Owner:0x17be +++++ -Seg:555f Size:256 Owner:0x17c2 +Seg:5464 Size:256 Owner:0x17c0 ++++ -Seg:565f Size:256 Owner:0x17c4 +Seg:5564 Size:256 Owner:0x17c2 ++++ -Seg:575f Size:256 Owner:0x17c6 +Seg:5664 Size:256 Owner:0x17c4 ++++ -Seg:585f Size:256 Owner:0x17c8 +Seg:5764 Size:256 Owner:0x17c6 ++++ -Seg:595f Size:256 Owner:0x17ca +Seg:5864 Size:256 Owner:0x17c8 +++++ -Seg:5a5f Size:256 Owner:0x17cc +Seg:5964 Size:256 Owner:0x17ca ++++ -Seg:5b5f Size:256 Owner:0x17ce +Seg:5a64 Size:256 Owner:0x17cc ++++ -Seg:5c5f Size:256 Owner:0x17d0 +Seg:5b64 Size:256 Owner:0x17ce ++++ -Seg:5d5f Size:256 Owner:0x17d2 +Seg:5c64 Size:256 Owner:0x17d0 ++++ -Seg:5e5f Size:256 Owner:0x17d4 +Seg:5d64 Size:256 Owner:0x17d2 +++++ -Seg:5f5f Size:256 Owner:0x17d6 +Seg:5e64 Size:256 Owner:0x17d4 ++++ -Seg:605f Size:256 Owner:0x17d8 +Seg:5f64 Size:256 Owner:0x17d6 ++++ -Seg:615f Size:256 Owner:0x17da +Seg:6064 Size:256 Owner:0x17d8 ++++ -Seg:625f Size:256 Owner:0x17dc +Seg:6164 Size:256 Owner:0x17da ++++ -Seg:635f Size:256 Owner:0x17de +Seg:6264 Size:256 Owner:0x17dc +++++ -Seg:645f Size:256 Owner:0x17e0 +Seg:6364 Size:256 Owner:0x17de ++++ -Seg:655f Size:256 Owner:0x17e2 +Seg:6464 Size:256 Owner:0x17e0 ++++ -Seg:665f Size:256 Owner:0x17e4 +Seg:6564 Size:256 Owner:0x17e2 ++++ -Seg:675f Size:256 Owner:0x17e6 +Seg:6664 Size:256 Owner:0x17e4 ++++ -Seg:685f Size:256 Owner:0x17e8 +Seg:6764 Size:256 Owner:0x17e6 +++++ -Seg:695f Size:256 Owner:0x17ea +Seg:6864 Size:256 Owner:0x17e8 ++++ -Seg:6a5f Size:256 Owner:0x17ec +Seg:6964 Size:256 Owner:0x17ea ++++ -Seg:6b5f Size:256 Owner:0x17ee +Seg:6a64 Size:256 Owner:0x17ec ++++ -Seg:6c5f Size:256 Owner:0x17f0 +Seg:6b64 Size:256 Owner:0x17ee ++++ -Seg:6d5f Size:256 Owner:0x17f2 +Seg:6c64 Size:256 Owner:0x17f0 +++++ -Seg:6e5f Size:256 Owner:0x17f4 +Seg:6d64 Size:256 Owner:0x17f2 ++++ -Seg:6f5f Size:256 Owner:0x17f6 +Seg:6e64 Size:256 Owner:0x17f4 ++++ -Seg:705f Size:256 Owner:0x17f8 +Seg:6f64 Size:256 Owner:0x17f6 ++++ -Seg:715f Size:256 Owner:0x17fa +Seg:7064 Size:256 Owner:0x17f8 ++++ -Seg:725f Size:256 Owner:0x17fc +Seg:7164 Size:256 Owner:0x17fa +++++ -Seg:735f Size:256 Owner:0x17fe +Seg:7264 Size:256 Owner:0x17fc ++++ -Seg:745f Size:256 Owner:0x1800 +Seg:7364 Size:256 Owner:0x17fe ++++ -Seg:755f Size:256 Owner:0x1802 +Seg:7464 Size:256 Owner:0x1800 ++++ -Seg:765f Size:256 Owner:0x1804 +Seg:7564 Size:256 Owner:0x1802 ++++ -Seg:775f Size:256 Owner:0x1806 +Seg:7664 Size:256 Owner:0x1804 +++++ -Seg:785f Size:256 Owner:0x1808 +Seg:7764 Size:256 Owner:0x1806 ++++ -Seg:795f Size:256 Owner:0x180a +Seg:7864 Size:256 Owner:0x1808 ++++ -Seg:7a5f Size:256 Owner:0x180c +Seg:7964 Size:256 Owner:0x180a ++++ -Seg:7b5f Size:256 Owner:0x180e +Seg:7a64 Size:256 Owner:0x180c ++++ -Seg:7c5f Size:256 Owner:0x1810 +Seg:7b64 Size:256 Owner:0x180e +++++ -Seg:7d5f Size:256 Owner:0x1812 +Seg:7c64 Size:256 Owner:0x1810 ++++ -Seg:7e5f Size:256 Owner:0x1814 +Seg:7d64 Size:256 Owner:0x1812 ++++ -Seg:7f5f Size:256 Owner:0x1816 +Seg:7e64 Size:256 Owner:0x1814 ++++ -Seg:805f Size:256 Owner:0x1818 +Seg:7f64 Size:256 Owner:0x1816 ++++ -Seg:815f Size:256 Owner:0x181a +Seg:8064 Size:256 Owner:0x1818 +++++ -Seg:825f Size:256 Owner:0x181c +Seg:8164 Size:256 Owner:0x181a ++++ -Seg:835f Size:256 Owner:0x181e +Seg:8264 Size:256 Owner:0x181c ++++ -Seg:845f Size:256 Owner:0x1820 +Seg:8364 Size:256 Owner:0x181e ++++ -Seg:855f Size:256 Owner:0x1822 +Seg:8464 Size:256 Owner:0x1820 ++++ -Seg:865f Size:256 Owner:0x1824 +Seg:8564 Size:256 Owner:0x1822 +++++ -Seg:875f Size:256 Owner:0x1826 +Seg:8664 Size:256 Owner:0x1824 ++++ -Seg:885f Size:256 Owner:0x1828 +Seg:8764 Size:256 Owner:0x1826 ++++ -Seg:895f Size:256 Owner:0x182a +Seg:8864 Size:256 Owner:0x1828 ++++ -Seg:8a5f Size:256 Owner:0x182c +Seg:8964 Size:256 Owner:0x182a ++++ -Seg:8b5f Size:256 Owner:0x182e +Seg:8a64 Size:256 Owner:0x182c +++++ -Seg:8c5f Size:256 Owner:0x1830 +Seg:8b64 Size:256 Owner:0x182e ++++ -Seg:8d5f Size:256 Owner:0x1832 +Seg:8c64 Size:256 Owner:0x1830 ++++ -Seg:8e5f Size:256 Owner:0x1834 +Seg:8d64 Size:256 Owner:0x1832 ++++ -Seg:8f5f Size:256 Owner:0x1836 +Seg:8e64 Size:256 Owner:0x1834 ++++ -Seg:905f Size:256 Owner:0x1838 +Seg:8f64 Size:256 Owner:0x1836 +++++ -Seg:915f Size:256 Owner:0x183a +Seg:9064 Size:256 Owner:0x1838 +++++ +Seg:9164 Size:256 Owner:0x183a ++++ -Seg:925f Size:256 Owner:0x183c +Seg:9264 Size:256 Owner:0x183c ++++ -Seg:935f Size:401 Owner:0xf45a +Seg:9364 Size:401 Owner:0xf45a ++++++ -Seg:be5f Size:16800 Owner:0x0 +Seg:be64 Size:16795 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index f4d0768f..30e6db25 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,59 +1,59 @@ == default == - FREE block at 2e5d0016 of size 18 - USED block at 2e5d0028 of size 50 - USED block at 2e5d005a of size 50 - USED block at 2e5d008c of size 50 - USED block at 2e5d00be of size 50 - USED block at 2e5d00f0 of size 50 - USED block at 2e5d0122 of size 50 - USED block at 2e5d0154 of size 50 - USED block at 2e5d0186 of size 50 - USED block at 2e5d01b8 of size 50 - USED block at 2e5d01ea of size 50 - USED block at 2e5d021c of size 50 - USED block at 2e5d024e of size 50 - USED block at 2e5d0280 of size 50 - FREE block at 2e5d02b2 of size 14 - USED block at 2e5d02c0 of size 20 - USED block at 2e5d02d4 of size 136 - FREE block at 2e5d035c of size 7328 + FREE block at 2e620016 of size 18 + USED block at 2e620028 of size 50 + USED block at 2e62005a of size 50 + USED block at 2e62008c of size 50 + USED block at 2e6200be of size 50 + USED block at 2e6200f0 of size 50 + USED block at 2e620122 of size 50 + USED block at 2e620154 of size 50 + USED block at 2e620186 of size 50 + USED block at 2e6201b8 of size 50 + USED block at 2e6201ea of size 50 + USED block at 2e62021c of size 50 + USED block at 2e62024e of size 50 + USED block at 2e620280 of size 50 + FREE block at 2e6202b2 of size 14 + USED block at 2e6202c0 of size 20 + USED block at 2e6202d4 of size 136 + FREE block at 2e62035c of size 7328 OK - end of heap == near == - USED block at 1e5cf4a6 of size 12 - USED block at 1e5cf4b2 of size 330 - USED block at 1e5cf5fc of size 52 - USED block at 1e5cf630 of size 20 - USED block at 1e5cf644 of size 20 - USED block at 1e5cf658 of size 20 - USED block at 1e5cf66c of size 20 - USED block at 1e5cf680 of size 20 - USED block at 1e5cf694 of size 2408 + USED block at 1e61f4a6 of size 12 + USED block at 1e61f4b2 of size 330 + USED block at 1e61f5fc of size 52 + USED block at 1e61f630 of size 20 + USED block at 1e61f644 of size 20 + USED block at 1e61f658 of size 20 + USED block at 1e61f66c of size 20 + USED block at 1e61f680 of size 20 + USED block at 1e61f694 of size 2408 OK - end of heap == far == - USED block at 2e5d0016 of size 18 - USED block at 2e5d0028 of size 50 - USED block at 2e5d005a of size 50 - USED block at 2e5d008c of size 50 - USED block at 2e5d00be of size 50 - USED block at 2e5d00f0 of size 50 - USED block at 2e5d0122 of size 50 - USED block at 2e5d0154 of size 50 - USED block at 2e5d0186 of size 50 - USED block at 2e5d01b8 of size 50 - USED block at 2e5d01ea of size 50 - USED block at 2e5d021c of size 50 - USED block at 2e5d024e of size 50 - USED block at 2e5d0280 of size 50 - USED block at 2e5d02b2 of size 14 - USED block at 2e5d02c0 of size 20 - USED block at 2e5d02d4 of size 136 - USED block at 2e5d035c of size 7328 + USED block at 2e620016 of size 18 + USED block at 2e620028 of size 50 + USED block at 2e62005a of size 50 + USED block at 2e62008c of size 50 + USED block at 2e6200be of size 50 + USED block at 2e6200f0 of size 50 + USED block at 2e620122 of size 50 + USED block at 2e620154 of size 50 + USED block at 2e620186 of size 50 + USED block at 2e6201b8 of size 50 + USED block at 2e6201ea of size 50 + USED block at 2e62021c of size 50 + USED block at 2e62024e of size 50 + USED block at 2e620280 of size 50 + USED block at 2e6202b2 of size 14 + USED block at 2e6202c0 of size 20 + USED block at 2e6202d4 of size 136 + USED block at 2e62035c of size 7328 OK - end of heap Memory Type Total Used Free diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 9a4ae187..9c8bcdbe 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1627,7 +1627,7 @@ void MM_Report_(global_game_variables_t *gvar) if(MML_CheckForXMS()) { printf(" %cXMS %u\n", 0xC9, gvar->pm.xmm.XMSPresent); -//++++ printf(" XMS v%x.%x available\n", gvar->pm.xmm.XMSVer>>4,gvar->pm.xmm.XMSVer&0x0F); + printf(" %c%cXMS v%x.%x available\n", 0xC7, 0xC4, XMSVer>>8,XMSVer&0x0F); printf(" %c%cXMSDriver: %Fp\n", 0xC7, 0xC4, XMSDriver); printf(" %c%cXMSHandle: %04x\n", 0xC7, 0xC4, gvar->pm.xmm.XMSHandle); printf(" %c%cXMSmem: %lu\n", 0xD3, 0xC4, gvar->mmi.XMSmem); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index f7927dbc..2a344aee 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -107,6 +107,7 @@ extern void (* beforesort) (void); extern void (* aftersort) (void); extern void (* XMSaddr) (void); // far pointer to XMS driver extern dword XMSDriver; +extern word XMSVer; //========================================================================== diff --git a/src/lib/16_pm.c b/src/lib/16_pm.c index 9cbed569..ff997f7d 100755 --- a/src/lib/16_pm.c +++ b/src/lib/16_pm.c @@ -48,7 +48,8 @@ boolean dbg_debugpm=0; // XMS specific variables //boolean XMSPresent; //word gvar->pm.xmm.XMSAvail,gvar->pm.xmm.XMSPagesAvail,gvar->pm.xmm.XMSHandle; - dword XMSDriver; + dword XMSDriver; //hard to put in gvar + word XMSVer; //hard to put in gvar /* int gvar->pm.xmm.XMSProtectPage = -1; // File specific variables @@ -357,8 +358,7 @@ PML_StartupXMS(global_game_variables_t *gvar) //TODO: translate the _REG into working assembly //#define STARTUPXMSASM byte err; - word XMSAvail, XMSHandle; -//++++ word XMSVer; + word XMSAvail, XMSHandle;//, XMSVer; boolean errorflag=false; word e=0; gvar->pm.xmm.XMSPresent = false; // Assume failure @@ -375,14 +375,15 @@ PML_StartupXMS(global_game_variables_t *gvar) int XMS_INT // Get address of XMS driver mov [WORD PTR XMSDriver],bx mov [WORD PTR XMSDriver+2],es // function pointer to XMS driver -//++++ mov ah,0 -//++++ call [DWORD PTR XMSDriver] //; Get XMS Version Number -//++++ mov [XMSVer],ax + + mov ah,XMS_VERSION + call [DWORD PTR XMSDriver] //; Get XMS Version Number + mov [XMSVer],ax mov e,2 #ifdef STARTUPXMSASM mov ah,XMS_QUERYFREE // Find out how much XMS is available - call [DWORD PTR XMSDriver]//DWORD PTR + call [DWORD PTR XMSDriver] mov XMSAvail,ax or ax,ax // AJR: bugfix 10/8/92 jz error1 @@ -420,8 +421,9 @@ End1: #endif #ifdef __DEBUG_PM__ -//++++ printf("XMSVer=%02X ", XMSVer); + printf("XMSVer=%02X ", XMSVer); printf("XMSAvail=%u\n", XMSAvail); + getch(); #endif XMSAvail &= ~(PMPageSizeKB - 1); // Round off to nearest page size if (XMSAvail < (PMPageSizeKB * 2)) // Need at least 2 pages @@ -433,7 +435,7 @@ End1: __asm { mov dx,XMSAvail mov ah,XMS_ALLOC // And do the allocation - call [DWORD PTR XMSDriver]//DWORD PTR + call [DWORD PTR XMSDriver] mov XMSHandle,dx or ax,ax // AJR: bugfix 10/8/92 jz error2 @@ -474,7 +476,7 @@ error: gvar->mmi.XMSmem = (dword)(XMSAvail) * 1024; gvar->pm.xmm.XMSAvail = XMSAvail; gvar->pm.xmm.XMSHandle = XMSHandle; -//++++ gvar->pm.xmm.XMSVer = XMSVer; + //gvar->pm.xmm.XMSVer = XMSVer; gvar->pm.xmm.XMSPresent = true; #ifdef __DEBUG_PM__ printf(" XMSmem=%lu XMSAvail=%u\n", gvar->mmi.XMSmem, XMSAvail); diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 6c5ca4e3..5668dda5 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -257,7 +257,7 @@ typedef struct typedef struct { boolean XMSPresent; - word XMSAvail,XMSPagesAvail,XMSHandle;//++++,XMSVer; + word XMSAvail,XMSPagesAvail,XMSHandle;//,XMSVer; dword XMSDriver; int XMSProtectPage;// = -1; } pm_xmmi_t;