]> 4ch.mooo.com Git - 16.git/commitdiff
i do not know why it messes up so much on far heap
authorsparky4 <sparky4@cock.li>
Wed, 22 Jul 2015 11:55:28 +0000 (06:55 -0500)
committersparky4 <sparky4@cock.li>
Wed, 22 Jul 2015 11:55:28 +0000 (06:55 -0500)
modified:   16.exe
modified:   DEBUG.TXT
modified:   fmemtest.exe
modified:   fontgfx.exe
modified:   fonttest.exe
modified:   inputest.exe
modified:   makefile
modified:   maptest.exe
modified:   mmtest.exe
modified:   palettec.exe
modified:   pcxtest.exe
modified:   sountest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h
modified:   src/mmtest.c
modified:   test.exe
modified:   test2.exe
modified:   tsthimem.exe

18 files changed:
16.exe
DEBUG.TXT
fmemtest.exe
fontgfx.exe
fonttest.exe
inputest.exe
makefile
maptest.exe
mmtest.exe
palettec.exe
pcxtest.exe
sountest.exe
src/lib/16_mm.c
src/lib/16_mm.h
src/mmtest.c
test.exe
test2.exe
tsthimem.exe

diff --git a/16.exe b/16.exe
index adba10fcdaf867fe22f2977c296013f3184ceafb..adda6ad16faf34090c5f018b2966a55673a75607 100644 (file)
Binary files a/16.exe and b/16.exe differ
index 3b35d096572db08c5c456d9f9069fc819cd5b60e..ec1c08ba5feb9a9c788b41b826d9f9f5ea3b877c 100644 (file)
--- a/DEBUG.TXT
+++ b/DEBUG.TXT
@@ -1,4 +1,4 @@
-Seg:1411       Size:557915488  Owner:0x1511\r
-Seg:8bfd       Size:-385858080 Owner:0x8ba6\r
+Seg:a17        Size:1092657440 Owner:0x11c6\r
+Seg:19cb       Size:-1669231296        Owner:0xc417\r
 \r
 MM_ShowMemory: Memory block order currupted!\r
index e10d1ba53ca5cce311bfccd0a7c5cf9546c7ccf3..875686c9caae9863b6bd74f877e54b6041660adf 100644 (file)
Binary files a/fmemtest.exe and b/fmemtest.exe differ
index 6b0a4ea30e73398db74985ac0e7280d80d52044e..ac4912dfc32d0cfdcba1f86401b1c7fa47bc9c99 100644 (file)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index 20ff5d62f7459d66ed4ae136f408c92333bb22c6..b8327e4b53e364f8fa66e27301a700ad24be7546 100644 (file)
Binary files a/fonttest.exe and b/fonttest.exe differ
index 22a7b6d8c844222b332fb8ce02e41dcae43a842b..47311618e3eb185c79c07505e8e441246642c126 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index b1f470a760d058d449a97b8ef228bcca0fad8259..c22da3b14879bc132b5aa921b2b3ee8377cb4bb6 100644 (file)
--- a/makefile
+++ b/makefile
@@ -12,10 +12,11 @@ TARGET_OS = dos
 #-zk0 = kanji support~
 #-zkl = current codepage
 
-DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 -zm
-CFLAGS=-zk0 -wo -x -mc -zu -k32768#16384# -zdp# -zp16 -zq
-OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
-FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS)
+ZFLAGS=-zk0 -zc# -zu -zm# -zdp# -zp16 -zq
+DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
+CFLAGS=-wo -x -mc -wo -k32768#16384#
+OFLAGS=-ot -ox -ob -oh -or -om -ol# -ol+
+FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS) $(ZFLAGS)
 SRC=src$(DIRSEP)
 SRCLIB=$(SRC)lib$(DIRSEP)
 JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
index 33832a17416a11a34b4d23a545a0f01d85e29d57..7480d470c3e2c3cdf8a1fa3a75277c906d2e92c2 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index 9fc2d18107128fc91112edd95a453c046b958f4c..263dbf6dc3972a0d6c26a5a656d144d5f75ab0a2 100644 (file)
Binary files a/mmtest.exe and b/mmtest.exe differ
index 224f77393662486d61624616c536b776a3884546..196f524472ec4084b4d9a752ac598e0f521d30a4 100644 (file)
Binary files a/palettec.exe and b/palettec.exe differ
index 6aaad16eea1032d9ce8dfbd1cf09444f2f7e4de6..e2a709379076e5e284b07a4d7c47c1a4b43cd980 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index e4ab3b05815e33f7afc15f01d515115905b8f7aa..841f817073742e3585621e4297e77dc30a700d0e 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
index dfb9256c2ca91b900bdfe79c715b337c95236f54..bf7536fcb341ebdd15da46bdc06c433f768399c8 100644 (file)
@@ -637,7 +637,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        void huge       *start;
        unsigned        segstart,endfree;
 
-       printf("mmi->segu=%Fp\n", (mmi->segu));
+       //printf("mmi->segu=%Fp\n", (mmi->segu));
        if(mm->mmstarted)
                MM_Shutdown(mm);
 
@@ -655,7 +655,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
                mm->mmblocks[i].next = &(mm->mmblocks[i+1]);
        }
        mm->mmblocks[i].next = NULL;
-       printf("mmi->segu=%Fp\n", (mmi->segu));
+       //printf("mmi->segu=%Fp\n", (mmi->segu));
 
 //
 // locked block of all memory until we punch out free space
@@ -668,7 +668,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        mm->mmnew->attributes = LOCKBIT;
        mm->mmnew->next = NULL;
        mm->mmrover = mm->mmhead;
-       printf("mmi->segu=%Fp\n", (mmi->segu));
+       //printf("mmi->segu=%Fp\n", (mmi->segu));
 
 //
 // get all available near conventional memory segments
@@ -677,7 +677,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //---- length=coreleft();
        //_nheapgrow();
        length=_memmax();
-       start = /*(void *)*/(mm->nearheap = _nmalloc(length));
+       start = (void huge *)(mm->nearheap = _nmalloc(length));
        length -= 16-(FP_OFF(start)&15);
        length -= SAVENEARHEAP;
        seglength = length / 16;                        // now in paragraphs
@@ -705,8 +705,8 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 //---- length=farcoreleft();
        //printf("              farheap making!\n");
-       //_fheapgrow();
-       length=0xffffUL*4UL;//_memavl();
+       _fheapgrow();
+       length=0xff;//UL*4UL;//_memavl();
        start = mm->farheap = halloc(length, sizeof(byte));
        //start = mm->farheap = _fmalloc(length);
        length -= 16-(FP_OFF(start)&15);
index 8b214032226923f31ad7d8e27fb02c1ac6d5bcde..7949cce4598964d0b36693c40541523de9fb4836 100644 (file)
@@ -37,7 +37,7 @@
 
 
 #define SAVENEARHEAP   0x200           // space to leave in data segment
-#define SAVEFARHEAP    0                       // space to leave in far heap
+#define SAVEFARHEAP    0//x2000                        // space to leave in far heap
 
 #define        BUFFERSIZE              0x1000          // miscelanious, allways available buffer
 
@@ -92,7 +92,7 @@ typedef struct
 {
        dword   nearheap,farheap,EMSmem,XMSmem,mainmem;
        //__segment segu;
-       word segu;
+       //word segu;
 //
 } mminfotype;
 
index 38b7ea15e4d35c0961671c38079a5015fb191332..6f635844553f70baa135822631c15addc4e016a5 100644 (file)
@@ -43,11 +43,11 @@ main(int argc, char *argv[])
        word baka;
        //static page_t screen;
 
-       mmi.segu=FP_SEG(segu);
+       //mmi.segu=FP_SEG(segu);
 
        printf("&main()=%Fp\n", *argv[0]);
        printf("&segu=%p\n", (segu));
-       printf("mmi.segu=%p\n", (mmi.segu));
+       //printf("mmi.segu=%p\n", (mmi.segu));
 
        bakapee = _nmalloc(64);
 //     memset(bakapee, 0, 64);
@@ -77,7 +77,7 @@ main(int argc, char *argv[])
        }*/
        printf("&main()=%Fp\n", *argv[0]);
        printf("&segu=%p\n", (segu));
-       printf("mmi.segu=%p\n", (mmi.segu));
+       //printf("mmi.segu=%p\n", (mmi.segu));
 #ifdef FILERL
 #ifdef FILEINIT
        printf("                read\n");
@@ -99,12 +99,14 @@ main(int argc, char *argv[])
        //++++modexEnter();
        //++++modexShowPage(&screen);
        MM_ShowMemory(/*&screen, */&mm);
-       getch();
+       //getch();
        MM_DumpData(&mm);
        //++++modexLeave();
        MM_Report(&mm, &mmi);
        printf("                stop!\n");
+#ifdef FILERL
        MM_FreePtr(&bigbuffer, &mm);
+#endif
        MM_Shutdown(&mm);
        printf("                done!\n");
 #ifdef FILERL
index fa7d51c8febd4db5fa262673252761fcfeb721bf..e04c291d3b0b3a737d585e859e27c906f6834232 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 335a1cbb2cb807f137b6399f3024957da55bb101..77e009f29ebd8e4723030bd4c23cd4c5761f0208 100644 (file)
Binary files a/test2.exe and b/test2.exe differ
index f8e7c7735f9e8382adf4f6a938683c42960cbc38..24c25b0265ec1e195efc6994967c33cc52c65ad3 100644 (file)
Binary files a/tsthimem.exe and b/tsthimem.exe differ