X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fexmmtest.c;h=f34cc3be33aa693bc51db15809c9af2b06c0557d;hb=402e3d98a783aa08ecbd6f5ff92cdab3c7be7784;hp=44a231d2d3f8102a43def653b5dd705a46870568;hpb=25dd42920069d35d6ae44c21b1222e63143c84e8;p=16.git diff --git a/src/exmmtest.c b/src/exmmtest.c index 44a231d2..f34cc3be 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -22,54 +22,10 @@ /* exmm test */ -#include "src/lib/16_head.h" -#include "src/lib/16_tail.h" -#include "src/lib/16_pm.h" -#include "src/lib/16_ca.h" -#include "src/lib/16_mm.h" -#include "src/lib/16_hc.h" -#include "src/lib/16_dbg.h" - -#pragma hdrstop - -#pragma warn -pro -#pragma warn -use - -//file load or read definition -#define FILEREADLOAD -#define FILEREAD -//#define EXMMVERBOSE -//#define BUFFDUMPPAUSE -//#define EXMMVERBOSE__ -// #define PRINTBBDUMP -#define BUFFDUMP - -#ifdef __BORLANDC__ -#define NOVID -#endif -#ifdef __WATCOMC__ -#define NOVID -//#define SCROLLLOAD -#endif - - -#define KEYP IN_Shutdown(&gvar); printf("\n\npress any key to continue!\n"); getch(); IN_Startup(&gvar); - -#define BBUFNAME gvar.mm.bufferseg//bigbuffer -//#define INITBBUF static memptr BBUFNAME; -#define BBUFPTR MEMPTRCONV BBUFNAME - -#ifdef __BORLANDC__ -#define BBUF (memptr *)BBUFPTR -#define BBUFSTRING (memptr *)BBUFNAME -#endif -#ifdef __WATCOMC__ -#define BBUF BBUFNAME -#define BBUFSTRING BBUF -#endif +#include "src/exmmtest.h" //////////////////////////////////////////////////////////////////////////// -#ifdef __BORLANDC__ +#ifdef NOVID void VL_Startup (global_game_variables_t *gvar){ gvar=gvar; } void VL_Shutdown (global_game_variables_t *gvar){ gvar=gvar; } void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv) @@ -77,36 +33,33 @@ void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv) printf("VGAmodeX dummy:\n %Fp %Fp %Fp\n", &vq, &cmem, gv); } -word modexPalOverscan(word col) +word +VL_modexPalOverscan(byte *p, word col) { + int i; //modexWaitBorder(); +// vga_wait_for_vsync(); outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */ - outp(PAL_DATA_REG, col); + for(i=col; i<(3+col); i++) + { + outp(PAL_DATA_REG, p[i]); + } +// modexPalSave(p); return col; } void TL_VidInit(global_game_variables_t *gvar) { gvar->video.old_mode = 3; } + +#ifdef __WATCOMC__ +void VL_ShowPage(page_t *page, boolean vsync, boolean sr){} +void modexClearRegion(page_t *page, int x, int y, int w, int h, byte color){} +void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color, word bgcolor, boolean vidsw, const byte *str){ printf("%s\n", str); } +void modexpdump(nibble pagenum, global_game_variables_t *gvar){} +#endif #endif -//printf("* %Fp\t", *BBUF); -//printf("* %04x\t", *BBUF); -#define PRINTBB {\ - printf("-------------------------------------------------------------------------------\n");\ - printf("&main()= %Fp\n", argv[0]);\ - printf("buffer:\n");\ - printf(" %Fp\t", BBUF);\ - printf("&%Fp\n", BBUFPTR);\ - printf(" %04x\t", BBUF);\ - printf("& %04x\n", BBUFPTR);\ - printf("-------------------------------------------------------------------------------\n");\ -} - //printf("&main()= %Fp\n", *argv[0]); - //printf("bigbuffer= %Fp\n", bigbuffer); - //printf("&bigbuffer= %Fp\n", &bigbuffer); - //printf("bigbuffer= %04x\n", bigbuffer); - //printf("&bigbuffer= %04x\n", &bigbuffer); #ifdef __WATCOMC__ void segatesuto() { @@ -179,6 +132,11 @@ main(int argc, char *argv[]) printf("bakapee1[%s]\n", bakapee1); printf("bakapee2[%s]\n", bakapee2); + #ifdef EXMMVERBOSE__ + printf("coreleft(): %u\n", coreleft()); + printf("farcoreleft(): %ld\n", farcoreleft()); + #endif + printf("stackavail()=%u\n", stackavail()); KEYP #ifndef NOVID @@ -250,10 +208,10 @@ PRINTBB; KEYP #endif //scrollload #ifndef NOVID - VL_Startup(&gvar);// VGAmodeX(8, 0, &gvar); + VGAmodeX(8, 0, &gvar); VL_LoadPalFileCore(&gvar.video.palette, &gvar); modexHiganbanaPageSetup(&gvar); + gvar.video.page[0].dx = gvar.video.page[0].dy = 0; // VL_modexPalScramble(&gvar.video.palette); - VL_LoadPalFileCore(&gvar.video.palette, &gvar); // ShapeTest_(&gvar); #endif MM_ShowMemory(&gvar); @@ -299,6 +257,7 @@ PRINTBB; KEYP #endif DebugMemory_(&gvar, 1); MM_DumpData(&gvar); + KEYP MM_Report_(&gvar); //printf("bakapee1=%s\n", bakapee1); //printf("bakapee2=%s\n", bakapee2); @@ -336,7 +295,6 @@ PRINTBB; KEYP // printf("HC_farcoreleft(): %lu\n", (dword)HC_farcoreleft()); //printf("HC_GetNearFreeSize(): %u\n", HC_GetNearFreeSize()); //printf("HC_GetFarFreeSize(): %lu\n", (dword)HC_GetFarFreeSize()); - HC_heapdump(&gvar); // segatesuto(); #endif #ifdef __BORLANDC__ @@ -344,6 +302,7 @@ PRINTBB; KEYP // printf("HC_farcoreleft: %lu\n", (dword)HC_farcoreleft()); // printf("HC_Newfarcoreleft(): %lu\n", (dword)HC_Newfarcoreleft()); #endif + HC_heapdump(&gvar); printf("Project 16 "); #ifdef __WATCOMC__ printf("exmmtest");