-Seg:0 Size:114016 Owner:0xbc84\r
-Seg:1bd6 Size:8192 Owner:0x7972\r
-Seg:2200 Size:8512 Owner:0xb1dc\r
-Seg:2a5e Size:743968 Owner:0x7c00\r
-Seg:e000 Size:31344 Owner:0x9aa8\r
-\r
-MM_ShowMemory: Memory block order currupted!\r
+0x004c:0a75 (P\80) = 3009\r
+0x004c:120a (P\11) = 3009\r
+0x002d:21e6 (-ä) = 3009\r
+0x004c:c36b (PÍ) = 3009\r
+0x004c:fd76 (PÐ) = 3009\r
#-zkl = current codepage
DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1# -zm
-CFLAGS=-zk0 -wo -x -mc -zu -k32768#-k48000# -zdp# -zp16 -zq
+CFLAGS=-zk0 -wo -x -mc -zu #-k32768#-k16384# -zdp# -zp16 -zq
OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
-FLAGS=-0 -d1 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS) #-d2
+FLAGS=-0 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS) #-d2
SRC=src$(DIRSEP)
SRCLIB=$(SRC)lib$(DIRSEP)
JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
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 fonttes0.exe fontgfx.exe sountest.exe miditest.exe tsthimem.exe inputest.exe
-#testemm.exe testemm0.exe
+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
+#testemm.exe testemm0.exe fonttes0.exe miditest.exe
#
#executables
screen.width += (16*2);\r
screen.height += (16*2);
- printf("start!\n");
+ printf(" start!\n");
MM_Startup(&mm, &mmi);
- printf("done!\n");
+ printf(" done!\n");
printf("&main()=%Fp\n", *argv[0]);
#ifdef FILEINIT
- printf("read\n");
+ printf(" read\n");
if(CA_ReadFile(bakapee, &bigbuffer, &mm/*, &mmi*/))
#else
- printf("load\n");
+ printf(" load\n");
if(CA_LoadFile(bakapee, &bigbuffer, &mm, &mmi))
#endif
baka=1;
modexEnter();
modexShowPage(&screen);
MM_ShowMemory(&screen, &mm);
- getch();
+ //getch();
MM_DumpData(&mm);
modexLeave();
MM_Report(&screen, &mm, &mmi);
- printf("stop!\n");
+ printf(" stop!\n");
MM_FreePtr(&bigbuffer, &mm);
MM_Shutdown(&mm);
- printf("done!\n");
+ printf(" done!\n");
free(bakapee);
//printf("_bios_memsize=%u\n", _bios_memsize());
if(baka) printf("\nyay!\n");
byte MM_MapXEMS(mminfo_t *mm, mminfotype *mmi)
{
-
//SUB EMS.MapXPages (PhysicalStart, LogicalStart, NumPages, Handle)
//Maps up to 4 logical EMS pages to physical pages in the page frame, where:
{
__asm
{
- mov ax,EMS_MAPXPAGE
+ mov ah,EMS_MAPXPAGE
mov cx,[i] // logical page
mov al,bl // physical page
mov dx,[EMShandle] // handle
//TODO: EMS4! AND EMS 3.2 MASSIVE DATA HANDLMENT!
MML_UseSpace(mm->EMSpageframe,(MAPPAGES)*0x4000lu, mm);
printf(" EMS4\n");
- if(mm->EMSVer<0x40)
+ //if(mm->EMSVer<0x40)
MM_MapEMS(mm, mmi); // map in used pages
- else
- MM_MapXEMS(mm, mmi); // map in used pages
+ //else
+ // MM_MapXEMS(mm, mmi); // map in used pages
}
//
void MM_EMSerr(byte *stri, byte err)
{
//Returns a text string describing the error code in EMS.Error.
- fprintf(stderr, "\n%x\n\n", err);
- fprintf(stderr, "\n%u\n\n", err);
- getch();
switch(err)
{
case 0x0:
#define SAVENEARHEAP 0x200 // space to leave in data segment
#define SAVEFARHEAP 0 // space to leave in far heap
-#define BUFFERSIZE 0x2000 // miscelanious, allways available buffer
+#define BUFFERSIZE 0x1000 // miscelanious, allways available buffer
-#define MAXBLOCKS 600
+#define MAXBLOCKS 640
#define EMS_GETPAGES 0x42
#define EMS_ALLOCPAGES 0x43
#define EMS_MAPPAGE 0x44
-#define EMS_MAPXPAGE 0x5000
+#define EMS_MAPXPAGE 0x50
#define EMS_FREEPAGES 0x45
#define EMS_VERSION 0x46