]> 4ch.mooo.com Git - 16.git/commitdiff
bakapee!!!!
authorsparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 17:02:22 +0000 (12:02 -0500)
committersparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 17:02:22 +0000 (12:02 -0500)
modified:   16.exe
modified:   DEBUG.TXT
modified:   MMDUMP.TXT
modified:   exmmtest.exe
modified:   fmemtest.exe
modified:   fontgfx.exe
modified:   fonttes0.exe
modified:   fonttest.exe
modified:   inputest.exe
modified:   makefile
modified:   maptest.exe
modified:   miditest.exe
modified:   palettec.exe
modified:   pcxtest.exe
modified:   sountest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h
modified:   test.exe
modified:   test2.exe
modified:   tsthimem.exe

20 files changed:
16.exe
DEBUG.TXT
MMDUMP.TXT
exmmtest.exe
fmemtest.exe
fontgfx.exe
fonttes0.exe
fonttest.exe
inputest.exe
makefile
maptest.exe
miditest.exe
palettec.exe
pcxtest.exe
sountest.exe
src/lib/16_mm.c
src/lib/16_mm.h
test.exe
test2.exe
tsthimem.exe

diff --git a/16.exe b/16.exe
index 3bc10dcf6093ca0896fe16deb61f81fd74437f42..06506b05d29d13f3054669555b70bc35cee16c8b 100644 (file)
Binary files a/16.exe and b/16.exe differ
index d71980c4ca16fc914b4bd2e7e2b91f872efd1083..b442a8f888548503f38d5ae2e636b38267934e70 100644 (file)
--- a/DEBUG.TXT
+++ b/DEBUG.TXT
@@ -1,7 +1,7 @@
-Seg:0  Size:140384     Owner:0x84a\r
-Seg:2246       Size:4096       Owner:0xfb32\r
-Seg:2346       Size:31344      Owner:0x1c68\r
-Seg:3054       Size:1026592    Owner:0x468b\r
-Seg:3924       Size:683456     Owner:0x5657\r
+Seg:0  Size:114096     Owner:0xfd10\r
+Seg:1bdb       Size:4096       Owner:0xb512\r
+Seg:1e4b       Size:8512       Owner:0x8ebc\r
+Seg:22ef       Size:774416     Owner:0x8e2e\r
+Seg:e000       Size:31344      Owner:0xd648\r
 \r
 MM_ShowMemory: Memory block order currupted!\r
index 18431f44413f4c806ff4c46b43ab50d342aa1a68..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
Binary files a/MMDUMP.TXT and b/MMDUMP.TXT differ
index a99bb92273ba35d02696a1025699aa0ff181c388..e979fbdb99311ca30fd169e1f18bd5325824858d 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 624bc60e3c0778ebfc955ae0e52d32f11e85b1b7..d9ccddbf8de1c675d8b4cb07df4d8d8d3c231f8d 100644 (file)
Binary files a/fmemtest.exe and b/fmemtest.exe differ
index d182022a808c6bbbc061602b8a3ca1a7b2098238..3dd39f3824ed7a76b1aee3b4bbf63518bf8ec76a 100644 (file)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index 14e72e35180f48ed6e82d6b5bd5b03f93c2c0187..ae601be34a382d386347788c3101c9e0fe9f1ce1 100644 (file)
Binary files a/fonttes0.exe and b/fonttes0.exe differ
index be48aee686d85a3d55fe4b4d8a7b972b5cbe9098..1e5af570c040803f45ff9a0149b14ccf76e9ee24 100644 (file)
Binary files a/fonttest.exe and b/fonttest.exe differ
index d13563f3e3bf9aa2df5bc2f94c5dacf5d917d014..5824e8ee5aa20a6030d5f53684f9db2cec5fca90 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index d0770dbae5e7828a9ff826b830f95508cde45509..1c56ca5522de729cd705d7292025dbe965968d93 100644 (file)
--- a/makefile
+++ b/makefile
@@ -13,7 +13,7 @@ TARGET_OS = dos
 #-zkl = current codepage
 
 DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1# -zm
-CFLAGS=-zk0 -wo -x -mc -zu# -zdp# -zp16 -zq
+CFLAGS=-zk0 -wo -x -mc -zu -k48000# -zdp# -zp16 -zq
 OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
 FLAGS=-0 -d1 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS) #-d2
 SRC=src$(DIRSEP)
index 356698ef42edaa10334e8def4d80b8fea1190076..80f3a40b3100c61f6c65215a8721bc5049522e58 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index 06dc46fb27b2433e8d2ee6fc7afa4d21c1aea1dc..55eb2bf23e330b1222c3b52c821fc45daddda99b 100644 (file)
Binary files a/miditest.exe and b/miditest.exe differ
index 393babfde024678779544ec09f7f5dd1b204d858..376d8f4668f9a193df7d479a896b745514a025a7 100644 (file)
Binary files a/palettec.exe and b/palettec.exe differ
index 89cf28cd7b077ad76a1b63795e2cfb0ed2b6ae98..115a7fa687ba9e73f3e19231f322c067e698a8d4 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 10eefab6aa47af06c9b09462ad163a2dddbb5110..a41715799dddfaee53285d13c22df49037491a77 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
index 13cafcb90f126ad7ac7ce594ef4de3952ba6c63f..b88d3a3af0e04aace62e264ddb845c1c86abafff 100644 (file)
@@ -137,7 +137,7 @@ boolean MML_CheckForEMS(void)
 
 byte MML_SetupEMS(mminfo_t *mm)
 {
-       char    str[80];//,str2[10];
+       byte    str[160];
        byte    err;
        boolean errorflag=false;
 
@@ -207,9 +207,9 @@ End:
        if(errorflag==true)
        {
                //err = CPURegs.h.ah;
-               strcpy(str,"MM_SetupEMS: EMS error");
+               strcpy(str,"MM_SetupEMS: EMS error ");
                //itoa(err,str2,16);
-               strcat(str,MM_EMSerr(err));
+               MM_EMSerr(&str, err);
                printf("%s\n",str);
                return err;
        }
@@ -265,7 +265,7 @@ void MML_ShutdownEMS(mminfo_t *mm)
 
 byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi)
 {
-       char    str[80];
+       byte    str[160];
        unsigned        EMShandle;
        byte err;
        boolean errorflag=false;
@@ -292,9 +292,9 @@ byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi)
                if(errorflag==true)
                {
                        //err = CPURegs.h.ah;
-                       strcpy(str,"MM_MapEMS: EMS error");
+                       strcpy(str,"MM_MapEMS: EMS error ");
                        //itoa(err,str2,16);
-                       strcat(str,MM_EMSerr(err));
+                       MM_EMSerr(str, err);
                        printf("%s\n",str);
                        //printf("FACK! %x\n", err);
                        return err;
@@ -329,7 +329,7 @@ byte MM_MapXEMS(mminfo_t *mm, mminfotype *mmi)
 //     EMS.Error = (Regs.ax AND 0xFF00&) \ 0x100  //Store the status code
 
 //END SUB
-       char    str[80];
+       byte    str[160];
        byte err;
        word    EMShandle;
        boolean errorflag=false;
@@ -360,9 +360,9 @@ byte MM_MapXEMS(mminfo_t *mm, mminfotype *mmi)
                {
                        //err = CPURegs.h.ah;
                        //strcpy(str,"MM_MapXEMS: EMS error 0x");
-                       strcpy(str,"MM_MapXEMS: EMS error");
+                       strcpy(str,"MM_MapXEMS: EMS error ");
                        //itoa(err,str2,16);
-                       strcat(str,MM_EMSerr(err));
+                       MM_EMSerr(&str, err);
                        printf("%s\n",str);
                        //printf("%s%x\n",str, err);
                        //printf("FACK! %x\n", err);
@@ -642,6 +642,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 // set up the linked list (everything in the free list;
 //
+       printf("                linked list making!\n");
        mm->mmhead = NULL;
        mm->mmfree = &(mm->mmblocks[0]);
        for(i=0;i<MAXBLOCKS-1;i++)
@@ -653,6 +654,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 // locked block of all memory until we punch out free space
 //
+       printf("                newblock making!\n");
        MM_GetNewBlock(mm);
        mm->mmhead = mm->mmnew;                         // this will allways be the first node
        mm->mmnew->start = 0;
@@ -666,6 +668,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 // get all available near conventional memory segments
 //
+       printf("                nearheap making!\n");
 //---- length=coreleft();
        _nheapgrow();
        length=_memavl();
@@ -676,12 +679,13 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        segstart = FP_SEG(start)+(FP_OFF(start)+15)/16;
        MML_UseSpace(segstart,seglength, mm);
        mmi->nearheap = length;
-       //printf("near heap ok!\n");
+       printf("                near heap ok!\n");
 
 //
 // get all available far conventional memory segments
 //
 //---- length=farcoreleft();
+       printf("                farheap making!\n");
        _fheapgrow();
        length=_memavl();
        start = mm->farheap = halloc(length, sizeof(byte));
@@ -693,13 +697,13 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        MML_UseSpace(segstart,seglength, mm);
        mmi->farheap = length;
        mmi->mainmem = mmi->nearheap + mmi->farheap;
-       //printf("far heap ok!\n");
+       printf("                far heap ok!\n");
 
 
 //
 // detect EMS and allocate up to 64K at page frame
 //
-       printf("EMS1\n\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!
+       printf("                EMS1\n\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!
        mmi->EMSmem = 0;
        for(i = 1;i < __argc;i++)
        {
@@ -709,13 +713,13 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        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!
        if(MML_CheckForEMS())
        {
-printf("EMS2\n");
+printf("               EMS2\n");
                MML_SetupEMS(mm);                                       // allocate space
-printf("EMS3\n");
+printf("               EMS3\n");
                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,(MAPPAGES)*0x4000lu, mm);
-printf("EMS4\n");
+printf("               EMS4\n");
                if(mm->EMSVer<0x40)
                        MM_MapEMS(mm, mmi);                                     // map in used pages
                else
@@ -735,7 +739,7 @@ emsskip:
        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!
        if(MML_CheckForXMS(mm))
        {
-               printf("XMS!\n");
+               printf("                XMS!\n");
                //MML_SetupXMS(mm, mmi);                                        // allocate as many UMBs as possible
        }
 
@@ -1386,90 +1390,91 @@ void MM_Report(page_t *page, mminfo_t *mm, mminfotype *mmi)
 =====================
 */
 
-byte *MM_EMSerr(byte err)
+static void MM_EMSerr(byte *stri, byte err)
 {
        //Returns a text string describing the error code in EMS.Error.
        switch(err)
        {
                case 0x0:
-                       return "successful";
+                       strcat(stri, "successful");
                case 0x80:
-                       return "internal error";
+                       strcat(stri, "internal error");
                case 0x81:
-                       return "hardware malfunction";
+                       strcat(stri, "hardware malfunction");
                case 0x82:
-                       return "busy .. retry later";
+                       strcat(stri, "busy .. retry later");
                case 0x83:
-                       return "invalid handle";
+                       strcat(stri, "invalid handle");
                case 0x84:
-                       return "undefined function requested by application";
+                       strcat(stri, "undefined function requested by application");
                case 0x85:
-                       return "no more handles available";
+                       strcat(stri, "no more handles available");
                case 0x86:
-                       return "error in save or restore of mapping context";
+                       strcat(stri, "error in save or restore of mapping context");
                case 0x87:
-                       return "insufficient memory pages in system";
+                       strcat(stri, "insufficient memory pages in system");
                case 0x88:
-                       return "insufficient memory pages available";
+                       strcat(stri, "insufficient memory pages available");
                case 0x89:
-                       return "zero pages requested";
+                       strcat(stri, "zero pages requested");
                case 0x8A:
-                       return "invalid logical page number encountered";
+                       strcat(stri, "invalid logical page number encountered");
                case 0x8B:
-                       return "invalid physical page number encountered";
+                       strcat(stri, "invalid physical page number encountered");
                case 0x8C:
-                       return "page-mapping hardware state save area is full";
+                       strcat(stri, "page-mapping hardware state save area is full");
                case 0x8D:
-                       return "save of mapping context failed";
+                       strcat(stri, "save of mapping context failed");
                case 0x8E:
-                       return "restore of mapping context failed";
+                       strcat(stri, "restore of mapping context failed");
                case 0x8F:
-                       return "undefined subfunction";
+                       strcat(stri, "undefined subfunction");
                case 0x90:
-                       return "undefined attribute type";
+                       strcat(stri, "undefined attribute type");
                case 0x91:
-                       return "feature not supported";
+                       strcat(stri, "feature not supported");
                case 0x92:
-                       return "successful, but a portion of the source region has been overwritten";
+                       strcat(stri, "successful, but a portion of the source region has been overwritten");
                case 0x93:
-                       return "length of source or destination region exceeds length of region allocated to either source or destination handle";
+                       strcat(stri, "length of source or destination region exceeds length of region allocated to either source or destination handle");
                case 0x94:
-                       return "conventional and expanded memory regions overlap";
+                       strcat(stri, "conventional and expanded memory regions overlap");
                case 0x95:
-                       return "offset within logical page exceeds size of logical page";
+                       strcat(stri, "offset within logical page exceeds size of logical page");
                case 0x96:
-                       return "region length exceeds 1 MB";
+                       strcat(stri, "region length exceeds 1 MB");
                case 0x97:
-                       return "source and destination EMS regions have same handle and overlap";
+                       strcat(stri, "source and destination EMS regions have same handle and overlap");
                case 0x98:
-                       return "memory source or destination type undefined";
+                       strcat(stri, "memory source or destination type undefined");
                case 0x9A:
-                       return "specified alternate map register or DMA register set not supported";
+                       strcat(stri, "specified alternate map register or DMA register set not supported");
                case 0x9B:
-                       return "all alternate map register or DMA register sets currently allocated";
+                       strcat(stri, "all alternate map register or DMA register sets currently allocated");
                case 0x9C:
-                       return "alternate map register or DMA register sets not supported";
+                       strcat(stri, "alternate map register or DMA register sets not supported");
                case 0x9D:
-                       return "undefined or unallocated alternate map register or DMA register set";
+                       strcat(stri, "undefined or unallocated alternate map register or DMA register set");
                case 0x9E:
-                       return "dedicated DMA channels not supported";
+                       strcat(stri, "dedicated DMA channels not supported");
                case 0x9F:
-                       return "specified dedicated DMA channel not supported";
+                       strcat(stri, "specified dedicated DMA channel not supported");
                case 0xA0:
-                       return "no such handle name";
+                       strcat(stri, "no such handle name");
                case 0xA1:
-                       return "a handle found had no name, or duplicate handle name";
+                       strcat(stri, "a handle found had no name, or duplicate handle name");
                case 0xA2:
-                       return "attempted to wrap around 1M conventional address space";
+                       strcat(stri, "attempted to wrap around 1M conventional address space");
                case 0xA3:
-                       return "source array corrupted";
+                       strcat(stri, "source array corrupted");
                case 0xA4:
-                       return "operating system denied access";
+                       strcat(stri, "operating system denied access");
                default:
-                       return "undefined error";
+                       strcat(stri, "undefined error");
        }
 }
 
+
 //==========================================================================
 
 /*
index 27a397c9b687369cd5bfd5ac940e7f6b28c2a59d..0ee0c8e35018edc3b61982a0a488fdf2f1debc25 100644 (file)
@@ -187,7 +187,7 @@ void MM_DumpData(mminfo_t *mm);
 dword MM_UnusedMemory(mminfo_t *mm);
 dword MM_TotalFree(mminfo_t *mm);
 void MM_Report(page_t *page, mminfo_t *mm, mminfotype *mmi);
-byte *MM_EMSerr(byte err);
+static void MM_EMSerr(byte *stri, byte err);
 void MM_BombOnError(boolean bomb, mminfo_t *mm);
 void MM_GetNewBlock(mminfo_t *mm);
 void MM_FreeBlock(mmblocktype *x, mminfo_t *mm);
index 6fb52b99b442a8229daea97a7478a3f74d35a348..9ab02f96776a6d21dc91df82eef7923b48bdba31 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 4433bb27e60fb2c98134619d3c7ecf163440fa19..65ee9440e3b0279a48a33e08e6d64d57ca15fa3a 100644 (file)
Binary files a/test2.exe and b/test2.exe differ
index 72f3e0bfa28f591434960813991e3877ce71d297..bb81bf53a82a9a165ebeec030ac8ba3b77753711 100644 (file)
Binary files a/tsthimem.exe and b/tsthimem.exe differ