]> 4ch.mooo.com Git - 16.git/commitdiff
I DONE FUCKED IT UP!
authorsparky4 <sparky4@cock.li>
Wed, 22 Jul 2015 00:53:26 +0000 (19:53 -0500)
committersparky4 <sparky4@cock.li>
Wed, 22 Jul 2015 00:53:26 +0000 (19:53 -0500)
modified:   16.exe
modified:   exmmtest.exe
modified:   fmemtest.exe
modified:   fontgfx.exe
modified:   fonttest.exe
modified:   inputest.exe
modified:   makefile
modified:   maptest.exe
modified:   palettec.exe
modified:   pcxtest.exe
modified:   sountest.exe
modified:   src/exmmtest.c
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h
modified:   test.exe
modified:   test2.exe
modified:   tsthimem.exe

17 files changed:
16.exe
exmmtest.exe
fmemtest.exe
fontgfx.exe
fonttest.exe
inputest.exe
makefile
maptest.exe
palettec.exe
pcxtest.exe
sountest.exe
src/exmmtest.c
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 975ba2366612f6dbb61e0abd4b988de251b9d37d..da73190178aba1e5903706af241cf4ac7516fdc5 100644 (file)
Binary files a/16.exe and b/16.exe differ
index f23c4b756df6f175da2d8daba6846ed461e1d59b..ea03d7b74b82db43ae15b543ccfe711a768725a0 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 49bc0fedda565bc4b7b3ca9f9297b1090f9645e2..98768a3dd858f9202da9b812d1c069273b6220d8 100644 (file)
Binary files a/fmemtest.exe and b/fmemtest.exe differ
index 1925939b1c1e4934ca79a1041fff7a0c1f3f868a..102dbebd8c4a0c1f58b8ab7decb99c17bc0ff570 100644 (file)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index 10e0fc03b3501b1b4c79f1c212fe730903d9454d..e791c326bc2cfb53d3e2a428a26e87b684a741f6 100644 (file)
Binary files a/fonttest.exe and b/fonttest.exe differ
index ec6d4d9d75cda366d111a67c26391b8b6f9d0eea..874f2484849956d1b6bee954c4d9bab6e94c9163 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index 8a54f8bbf6dfa210b4d33baa988912c7758db5a8..d74ea80830cca80a12303d1809e829e9c9e98fdf 100644 (file)
--- a/makefile
+++ b/makefile
@@ -12,8 +12,8 @@ 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
+DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 -zm
+CFLAGS=-zk0 -wo -x -mc -zu# -k16384# -zdp# -zp16 -zq
 OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
 FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS)
 SRC=src$(DIRSEP)
@@ -28,7 +28,7 @@ DOSLIBOBJ = adlib.$(OBJ) midi.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OB
 16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16_ca.$(OBJ)
 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ)
 
-all: 16.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe exmmtest.exe fontgfx.exe sountest.exe tsthimem.exe inputest.exe
+all: 16.exe exmmtest.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe sountest.exe tsthimem.exe inputest.exe
 #testemm.exe testemm0.exe fonttes0.exe miditest.exe
 
 #
@@ -62,17 +62,17 @@ inputest.exe: inputest.$(OBJ) 16.lib
 sountest.exe: sountest.$(OBJ) 16.lib
        wcl $(FLAGS) sountest.$(OBJ) 16.lib
 
-miditest.exe: miditest.$(OBJ) 16.lib
-       wcl $(FLAGS) miditest.$(OBJ) 16.lib
+miditest.exe: miditest.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
+       wcl $(FLAGS) miditest.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
 
-tsthimem.exe: tsthimem.$(OBJ) 16.lib
-       wcl $(FLAGS) tsthimem.$(OBJ) 16.lib
+tsthimem.exe: tsthimem.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
+       wcl $(FLAGS) tsthimem.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
 
-testemm.exe: testemm.$(OBJ) 16.lib
-       wcl $(FLAGS) testemm.$(OBJ) 16.lib
+testemm.exe: testemm.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
+       wcl $(FLAGS) testemm.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
 
-testemm0.exe: testemm0.$(OBJ) 16.lib
-       wcl $(FLAGS) testemm0.$(OBJ) 16.lib
+testemm0.exe: testemm0.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
+       wcl $(FLAGS) testemm0.$(OBJ) 16.lib $(DOSLIBEXMMOBJ)
 
 pcxtest.exe: pcxtest.$(OBJ) gfx.lib
        wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib
@@ -170,8 +170,8 @@ exmmtest.$(OBJ): $(SRC)exmmtest.c
 gfx.lib: $(GFXLIBOBJS)
        wlib -b gfx.lib $(GFXLIBOBJS)
 
-doslib.lib: $(DOSLIBOBJ) $(DOSLIBEXMMOBJ)# $(SRCLIB)cpu.lib
-       wlib -b doslib.lib $(DOSLIBOBJ) $(DOSLIBEXMMOBJ)# $(SRCLIB)cpu.lib
+doslib.lib: $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
+       wlib -b doslib.lib $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
 
 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
        wcl $(FLAGS) -c $(SRCLIB)modex16.c
index a7f711ebae9b07d78bccf1b441c30ab6f8686f78..e8de1797bc32c6ae978b8c40dc901c42c2f6286a 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index d5f554ab96ffad88c460986e6c2bf7b2e10c2ad1..4216e6f4f7c79b089b8bc53b0f7629e27a8a9314 100644 (file)
Binary files a/palettec.exe and b/palettec.exe differ
index 02104a6b58037b8c906a7ce555c1b89afbf54af7..d724fb15128390755fa01aee925bd03d0de94683 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 89ed95df5c33fab82b6ad657168907802d1ae395..c5fdcfcdeb3593d93a1b653909ea6e8e3d561545 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
index cdd390f8f7f2b2a15bb331c7bc949a7d6f17752f..d45180949f8a84b2842a1dab6e0f744eae3780bd 100644 (file)
  *
  */
 /*
-       input test
+       exmm test
 */
-#include "src/lib/16_ca.h"
-#include "src/lib/16_mm.h"
+#include "src/lib/16_head.h"
+//#include "src/lib/16_ca.h"
+//#include "src/lib/16_mm.h"
 //#include "src/lib/modex16.h"
 
-#define FILERL
+//#define FILERL
 //#define FILEINIT
 
 void
 main(int argc, char *argv[])
 {
-       static mminfo_t mm; mminfotype mmi;
-       static memptr   bigbuffer;
-       static __segment segu;
-       static char *bakapee;
+       //mminfo_t mm; mminfotype mmi;
+       //memptr        bigbuffer;
+       //__segment segu;
+       //char *bakapee;
        word baka;
        //static page_t screen;
 
        printf("&main()=%Fp\n", *argv[0]);
        printf("&argc=%Fp\n", FP_SEG(&argc));
-       printf("&segu=%Fp\n", segu);
+//++++ printf("&segu=%Fp\n", segu);
 
-       bakapee = _nmalloc(64);
+       //++++bakapee = malloc(64);
 //     memset(bakapee, 0, 64);
-       mm.mmstarted=0;
+//++++ mm.mmstarted=0;
 
-       if(argv[1]) bakapee = argv[1];
-       else bakapee = "data/koishi~~.pcx";
+       /*if(argv[1]) bakapee = argv[1];
+       else bakapee = "data/koishi~~.pcx";*/
 
-       textInit();\r
+//++++ textInit();\r
 
        /* setup camera and screen~ */
        //bug!!!\r
@@ -59,8 +60,7 @@ main(int argc, char *argv[])
        screen.height += (16*2);*/
 
        printf("&main()=%Fp     start MM\n", *argv[0]);
-       MM_Startup(&mm, &mmi);
-       //segu=mmi.segu;
+//++++ MM_Startup(&mm, &mmi);
        printf("                done!\n");
        /*if(FP_SEG(*argv[0])==0)
        {
@@ -72,7 +72,7 @@ main(int argc, char *argv[])
        }*/
        printf("&main()=%Fp\n", *argv[0]);
        printf("&argc=%Fp\n", FP_SEG(&argc));
-       printf("&segu=%Fp\n", segu);
+//++++ printf("&segu=%Fp\n", segu);
 #ifdef FILERL
 #ifdef FILEINIT
        printf("                read\n");
@@ -85,27 +85,25 @@ main(int argc, char *argv[])
        else
                baka=0;
 #endif
-       //MM_GetPtr(&bigbuffer, mmi.nearheap, &mm, &mmi);
        //hmm functions in cache system use the buffered stuff
-       printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
+//++++ printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
        printf("dark purple = purgable\n");
        printf("medium blue = non purgable\n");
        printf("red = locked\n");
-       getch();
-       //modexEnter();
-       //modexShowPage(&screen);
-       MM_ShowMemory(/*&screen, */&mm);
-       //getch();
-       MM_DumpData(&mm);
-       //modexLeave();
-       MM_Report(&mm, &mmi);
+       //++++getch();
+       //++++modexEnter();
+       //++++modexShowPage(&screen);
+       //++++MM_ShowMemory(/*&screen, */&mm);
+       //++++getch();
+       //++++MM_DumpData(&mm);
+       //++++modexLeave();
+       //++++MM_Report(&mm, &mmi);
        printf("                stop!\n");
-       MM_FreePtr(&bigbuffer, &mm);
-       MM_Shutdown(&mm);
+//++++ MM_FreePtr(&bigbuffer, &mm);
+//++++ MM_Shutdown(&mm);
        printf("                done!\n");
 #ifdef FILERL
-       free(bakapee);
-       //printf("_bios_memsize=%u\n", _bios_memsize());
+       //++++free(bakapee);
        if(baka) printf("\nyay!\n");
        else printf("\npoo!\n");
 #endif
index c85297a83a211608eb65f498b744331fd7013490..5e6cb81361c95cefd8f603a5c1ec7ca43c3f5852 100644 (file)
@@ -670,7 +670,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
        //_nheapgrow();
        length=_memmax();
        //printf("      %Fp\n", mmi->segu);
-       start = (void huge *)(mm->nearheap = _nmalloc(length));
+       start = (void huge *)(mm->nearheap = malloc(length));
        length -= 16-(FP_OFF(start)&15);
        length -= SAVENEARHEAP;
        seglength = length / 16;                        // now in paragraphs
index ff60c63fd95c051d7470f14a0d0be46c05a84770..64c946a8828e94ffad30b978b51a62a52ec88e62 100644 (file)
@@ -36,8 +36,8 @@
 #endif
 
 
-#define SAVENEARHEAP   0x400           // space to leave in data segment
-#define SAVEFARHEAP    0//x4000                        // space to leave in far heap
+#define SAVENEARHEAP   0x200           // space to leave in data segment
+#define SAVEFARHEAP    0                       // space to leave in far heap
 
 #define        BUFFERSIZE              0x1000          // miscelanious, allways available buffer
 
@@ -86,7 +86,7 @@
 //==========================================================================
 //I hope this is correct!
 //__segment                seg;
-typedef void __based(__self) *memptr; //__based(seg) * memptr;
+typedef void __based(__self) * memptr; //__based(seg) * memptr;
 
 typedef struct
 {
index f442a1216b6a6d589caad6266fd9706da053cf98..ae9a9e0f5eb7319e6b8e70c845fdbc4e9d55a31d 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 4a62d408416fc32736eec36e70eaa63bbb88b692..1150f840e675eed3b33fe1ea962abb645f788f74 100644 (file)
Binary files a/test2.exe and b/test2.exe differ
index 1b69eda14a1df64bf96f0fac601d91b96aefac9d..e54550cd638ef123c2b992bff75f1d24117608b2 100644 (file)
Binary files a/tsthimem.exe and b/tsthimem.exe differ