From: sparky4 Date: Fri, 3 Jul 2015 22:04:00 +0000 (-0500) Subject: fuck! reverted it back to old! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=a8ce32fb5abeb885f7794a4f34a4d7dc46cccfe8;p=16.git fuck! reverted it back to old! modified: exmmtest.exe modified: src/lib/16_mm.c modified: src/lib/16_mm.h --- diff --git a/exmmtest.exe b/exmmtest.exe index 2a9c45f4..52d9105a 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 87246929..77466490 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -373,8 +373,8 @@ done: } printf("base=%u ", base); printf("size=%u\n", size); MML_UseSpace(base,size, mm); - mmi->XMSmem += ((dword)size)*16; - mm->UMBbase[mm->numUMBs] = (dword)base; + mmi->XMSmem += size*16; + mm->UMBbase[mm->numUMBs] = base; mm->numUMBs++; if(mm->numUMBs < MAXUMBS) goto getmemory; @@ -420,13 +420,13 @@ void MML_ShutdownXMS(mminfo_t *mm) ====================== */ -void MML_UseSpace(unsigned segstart, dword seglength, mminfo_t *mm) +void MML_UseSpace(/*d*/word segstart, /*d*/word seglength, mminfo_t *mm) { mmblocktype huge *scan,huge *last; - dword oldend; - dword fat=0; + /*d*/word oldend; + /*d*/word fat=0; word segm=0; - dword extra; + /*d*/word extra; scan = last = mm->mmhead; mm->mmrover = mm->mmhead; // reset rover to start of memory @@ -443,8 +443,8 @@ void MML_UseSpace(unsigned segstart, dword seglength, mminfo_t *mm) // // take the given range out of the block // - oldend = scan->start + (dword)scan->length; - extra = oldend - (dword)(segstart+seglength); + oldend = scan->start + scan->length; + extra = oldend - (segstart+seglength); //++++emsver stuff! if(extra>0xfffflu) { @@ -614,11 +614,11 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) MML_SetupEMS(mm); // allocate space printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! //TODO: EMS4! AND EMS 3.2 MASSIVE DATA HANDLMENT! - MML_UseSpace(mm->EMSpageframe,(mm->EMSpagesmapped)*0x4000lu, mm); + MML_UseSpace(mm->EMSpageframe,(/*mm->EMSpagesmapped*/4)*0x4000lu, mm); //printf("EMS3\n"); MM_MapEMS(mm); // map in used pages //printf("EMS4\n"); - mmi->EMSmem = (mm->EMSpagesmapped)*0x4000lu; + mmi->EMSmem = (/*mm->EMSpagesmapped*/4)*0x4000lu; } // diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 38279368..6205d012 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -86,7 +86,7 @@ typedef void __based(__self) * memptr; //__based(seg) * memptr; typedef struct { - dword nearheap,farheap/*,hugeheap*/,EMSmem,XMSmem,mainmem; + dword nearheap,farheap,EMSmem,XMSmem,mainmem; } mminfotype; //========================================================================== @@ -114,7 +114,7 @@ extern void (* XMSaddr) (void); // far pointer to XMS driver typedef struct mmblockstruct { - unsigned start,length; + word start,length; //dword start,length; unsigned attributes; memptr *useptr; // pointer to the segment start @@ -126,12 +126,11 @@ typedef struct { memptr bufferseg; boolean mmstarted, bombonerror, mmerror; - //void huge *hugeheap; void huge *farheap; void *nearheap; unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle; unsigned int EMSVer; - unsigned numUMBs,UMBbase[MAXUMBS]; + word numUMBs,UMBbase[MAXUMBS]; //dword numUMBs,UMBbase[MAXUMBS]; mmblocktype huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew; } mminfo_t; @@ -162,7 +161,7 @@ unsigned MM_MapEMS(mminfo_t *mm); boolean MML_CheckForXMS(mminfo_t *mm); void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi); void MML_ShutdownXMS(mminfo_t *mm); -void MML_UseSpace(unsigned segstart, dword seglength, mminfo_t *mm); +void MML_UseSpace(/*d*/word segstart, /*d*/word seglength, mminfo_t *mm); void MML_ClearBlock(mminfo_t *mm); void MM_Startup(mminfo_t *mm, mminfotype *mmi);