From: sparky4 Date: Wed, 22 Jul 2015 00:53:26 +0000 (-0500) Subject: I DONE FUCKED IT UP! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=3476d7884db6fecd32ab58fcdc5c2f0e8c6e2232;p=16.git I DONE FUCKED IT UP! 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 --- diff --git a/16.exe b/16.exe index 975ba236..da731901 100644 Binary files a/16.exe and b/16.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index f23c4b75..ea03d7b7 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fmemtest.exe b/fmemtest.exe index 49bc0fed..98768a3d 100644 Binary files a/fmemtest.exe and b/fmemtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index 1925939b..102dbebd 100644 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/fonttest.exe b/fonttest.exe index 10e0fc03..e791c326 100644 Binary files a/fonttest.exe and b/fonttest.exe differ diff --git a/inputest.exe b/inputest.exe index ec6d4d9d..874f2484 100644 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/makefile b/makefile index 8a54f8bb..d74ea808 100644 --- 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 diff --git a/maptest.exe b/maptest.exe index a7f711eb..e8de1797 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index d5f554ab..4216e6f4 100644 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index 02104a6b..d724fb15 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/sountest.exe b/sountest.exe index 89ed95df..c5fdcfcd 100644 Binary files a/sountest.exe and b/sountest.exe differ diff --git a/src/exmmtest.c b/src/exmmtest.c index cdd390f8..d4518094 100644 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -20,37 +20,38 @@ * */ /* - 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(); +//++++ textInit(); /* setup camera and screen~ */ //bug!!! @@ -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 diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index c85297a8..5e6cb813 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -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 diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index ff60c63f..64c946a8 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -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 { diff --git a/test.exe b/test.exe index f442a121..ae9a9e0f 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 4a62d408..1150f840 100644 Binary files a/test2.exe and b/test2.exe differ diff --git a/tsthimem.exe b/tsthimem.exe index 1b69eda1..e54550cd 100644 Binary files a/tsthimem.exe and b/tsthimem.exe differ