From: sparky4 Date: Wed, 8 May 2019 18:47:18 +0000 (-0500) Subject: got bcexmm to compile again. i got alot of work todo with this section of the code... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=69116cfff2e915ad9d2f95268432fe4bd0e007d9;p=16.git got bcexmm to compile again. i got alot of work todo with this section of the code but the core is important af --- diff --git a/JOYTEST.E b/JOYTEST.E deleted file mode 100755 index cce505eb..00000000 Binary files a/JOYTEST.E and /dev/null differ diff --git a/MAPTEST.UPX b/MAPTEST.UPX deleted file mode 100755 index e69de29b..00000000 diff --git a/OPLTEST.E b/OPLTEST.E deleted file mode 100755 index 07fadfb6..00000000 Binary files a/OPLTEST.E and /dev/null differ diff --git a/bcexmm.dsk b/bcexmm.dsk index cbc9d982..c914beb1 100755 Binary files a/bcexmm.dsk and b/bcexmm.dsk differ diff --git a/bcexmm.prj b/bcexmm.prj index 27882aab..356f4328 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/makefile b/makefile index c0f1ecb0..0bd9ef9c 100755 --- a/makefile +++ b/makefile @@ -55,7 +55,7 @@ DOSLIBMAKEALL=./buildall.sh build all to_os_path=/=\ REMOVECOMMAND=del COPYCOMMAND=copy /y -MOVECOMMAND=move +MOVECOMMAND=move /q DIRSEP=\ OBJ=obj DUMP=type @@ -495,7 +495,6 @@ clean: .symbolic @if not exist $(DOSLIBDIR)/buildall.sh wmake -s -h initlibs @wmake -s -h initscript @for %f in ($(ALLEXEC)) do @if exist %f $(REMOVECOMMAND) %f - @wmake -s -h exe2e !ifdef __LINUX__ @if exist *.LIB $(REMOVECOMMAND) *.LIB @. src/util/bcexmm.sh @@ -508,6 +507,7 @@ clean: .symbolic !else @if exist *.o $(REMOVECOMMAND) *.o !endif + @wmake -s -h exe2e @if exist *.$(OBJ) $(REMOVECOMMAND) *.$(OBJ) @if exist *.bco $(REMOVECOMMAND) *.bco @if exist *.BCO $(REMOVECOMMAND) *.BCO @@ -586,11 +586,11 @@ comq: .symbolic @wmake -s -h e2exe exe2e: .symbolic - @if exist *.exe $(MOVECOMMAND) *.exe *.e + @if exist *.exe $(MOVECOMMAND) *.exe $(SRC) #@for %f in ($(ALLEXEC)) do @if exist %f $(REMOVECOMMAND) %f e2exe: .symbolic - @if exist *.e $(MOVECOMMAND) *.e *.exe + @if exist $(SRC)/*.exe $(MOVECOMMAND) $(SRC)/*.exe . www: .symbolic @if exist 16.exe @wmake -s -h wwwdo diff --git a/src/bcexmm.exe b/src/bcexmm.exe new file mode 100755 index 00000000..db6635cb Binary files /dev/null and b/src/bcexmm.exe differ diff --git a/src/exmmtest.h b/src/exmmtest.h index 34926cdc..8df0f2d2 100755 --- a/src/exmmtest.h +++ b/src/exmmtest.h @@ -51,7 +51,7 @@ #define NOVID #endif #ifdef __WATCOMC__ -//#define NOVID +#define NOVID //#define SCROLLLOAD #endif diff --git a/src/lib/16_head.c b/src/lib/16_head.c index aed12503..d337d6b7 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -224,14 +224,19 @@ void regidump() { //GENERAL PURPOSE unsigned short _ax,_bx,_cx,_dx; +#ifndef __BORLANDC__ unsigned short _cflag; +#endif unsigned char _al,_ah,_bl,_bh,_cl,_ch,_dl,_dh; unsigned short _bp,_si,_di,_sp; - unsigned short _cs,_ds,_es,_ss; //SEGMENT + unsigned short _cs_,_ds_,_es_,_ss_; //SEGMENT // unsigned short _ip; //SPECIAL PURPOSE - _ax=_bx=_cx=_dx=_si=_di=_bp=_sp=_cs=_ds=_es=_ss=_cflag=0; + _ax=_bx=_cx=_dx=_si=_di=_bp=_sp=_cs_=_ds_=_es_=_ss_=0; +#ifndef __BORLANDC__ + _cflag=0; +#endif _ah=_al=_bh=_bl=_ch=_cl=_dh=_dl=0; #ifndef REGIDUMP_USE_CAPS @@ -255,6 +260,14 @@ void regidump() mov _if,if mov _df,df mov _of,of*/ + mov _ah,ah + mov _al,al + mov _bh,bh + mov _bl,bl + mov _ch,ch + mov _cl,cl + mov _dh,dh + mov _dl,dl } #else _ax=_AX; @@ -274,15 +287,17 @@ _cl=_CL; _dh=_DH; _dl=_DL; #endif +#ifndef __BORLANDC__ _cflag=_CFLAG; +#endif __asm { mov _bp,bp mov _sp,sp - mov _cs,cs - mov _ds,ds - mov _es,es - mov _ss,ss + mov _cs_,cs + mov _ds_,ds + mov _es_,es + mov _ss_,ss } // printf("integer values: ax=%04d bx=%04d cx=%04d dx=%04d\n", a, b, c, d); // printf("unsigned values:ax=%04u bx=%04u cx=%04u dx=%04u\n", a, b, c, d); @@ -303,14 +318,16 @@ _dl=_DL; printf("segment:\n"); #ifndef REGIDUMP_HEX - printf(" cs=%04u\n ds=%04u\n es=%04u\n ss=%04u\n", _cs, _ds, _es, _ss); + //printf(" cs=%04u\n ds=%04u\n es=%04u\n ss=%04u\n", _cs_, _ds, _es_, _ss_); + printf(" cs=%04u\n", _cs_); printf(" ds=%04u\n", _ds_); printf(" es=%04u\n", _es_); printf(" ss=%04u\n", _ss_); #else - printf(" cs=%04x\n ds=%04x\n es=%04x\n ss=%04x\n", _cs, _ds, _es, _ss); + //printf(" cs=%04x\n ds=%04x\n es=%04x\n ss=%04x\n", _cs_, _ds_, _es_, _ss_); + printf(" cs=%04x\n", _cs_); printf(" ds=%04x\n", _ds_); printf(" es=%04x\n", _es_); printf(" ss=%04x\n", _ss_); #endif printf(" ---------------------------------------\n"); - +#ifndef __BORLANDC__ printf("cflags:\n"); /* printf(" ip=%04u\n\n", _ip); printf(" cf=%04u\npf=%04u\naf=%04u\nzf=%04u\nsf=%04u\ntf=%04u\nif=%04u\ndf=%04u\nof=%04u\n", _cf, _pf, _af, _zf, _sf, _tf, _if, _df, _of); @@ -325,12 +342,14 @@ _dl=_DL; // printf(" ip=%04x\n\n", _IP); // printf(" cf=%04x\npf=%04x\naf=%04x\nzf=%04x\nsf=%04x\ntf=%04x\nif=%04x\ndf=%04x\nof=%04x\n", _CF, _PF, _AF, _ZF, _SF, _TF, _IF, _DF, _OF); printf("cflag: %016x\n",(_cflag)); + printf(" ahl=%016x", _al|(_ah<<4)); #endif printf("testing\n"); // printf("dx: "NIBBLE_TO_BINARY_PATTERN""NIBBLE_TO_BINARY_PATTERN"\n", NIBBLE_TO_BINARY(_dx>>4), NIBBLE_TO_BINARY(_dx)); // printf("dx: "BYTE_TO_BINARY_PATTERN""BYTE_TO_BINARY_PATTERN"\n", BYTE_TO_BINARY(_dx>>8), BYTE_TO_BINARY(_dx)); printf("dx: "WORD_TO_BINARY_PATTERN"\n", WORD_TO_BINARY(_dx)); printf(" ---------------------------------------\n"); +#endif #endif printf("for more info see\n http://stackoverflow.com/questions/9130349/how-many-registers-are-there-in-8086-8088\n"); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 55ee136c..db4ea301 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1344,8 +1344,8 @@ extern char global_temp_status_text[512]; extern char global_temp_status_text2[512]; #endif //#ifdef __WATCOMC__ -//#define MMSMPANVID -#define MMSMSCANINFO +//++??#define MMSMPANVID +//++++#define MMSMSCANINFO //#endif /* diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index d9c2fee4..56f65612 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -127,6 +127,8 @@ #define PAL_DATA_REG 0x03C9 /* Color register, data port */ #endif +extern char global_temp_status_text[512]; + void Shutdown16(global_game_variables_t *gvar), Startup16(global_game_variables_t *gvar), StartupCAMMPM (global_game_variables_t *gvar), diff --git a/src/util/bcexmm.sh b/src/util/bcexmm.sh index 891da392..90bb5db0 100755 --- a/src/util/bcexmm.sh +++ b/src/util/bcexmm.sh @@ -1,6 +1,8 @@ #!/bin/bash if [ -f "BCEXMM.MAP" ]; then - mv BCEXMM.EXE bcexmm.ex0 - mv bcexmm.ex0 bcexmm.exe + if [ -f "BCEXMM.EXE" ]; then + mv BCEXMM.EXE bcexmm.ex0 + mv bcexmm.ex0 bcexmm.exe + fi mv BCEXMM.MAP bcexmm.meh fi