From: sparky4 Date: Fri, 16 Dec 2016 14:42:49 +0000 (-0600) Subject: engi stuff moved to tdef and textinit is in startup16 X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=6feaff34f8461d5e3a9542c2df359b585c1e5120;p=16.git engi stuff moved to tdef and textinit is in startup16 --- diff --git a/DEBUG.16W b/DEBUG.16W deleted file mode 100755 index 25724d77..00000000 --- a/DEBUG.16W +++ /dev/null @@ -1,210 +0,0 @@ -Seg:0 Size:10117 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:287e Size:36 Owner:0x0 -++ -Seg:28a2 Size:256 Owner:0x1650 -++++ -Seg:29a2 Size:256 Owner:0x1442 -++++ -Seg:2aa2 Size:256 Owner:0x1444 -++++ -Seg:2ba2 Size:256 Owner:0x1446 -++++ -Seg:2ca2 Size:256 Owner:0x1448 -+++++ -Seg:2da2 Size:256 Owner:0x144a -++++ -Seg:2ea2 Size:256 Owner:0x144c -++++ -Seg:2fa2 Size:256 Owner:0x144e -++++ -Seg:30a2 Size:256 Owner:0x1450 -++++ -Seg:31a2 Size:256 Owner:0x1452 -+++++ -Seg:32a2 Size:256 Owner:0x1454 -++++ -Seg:33a2 Size:256 Owner:0x1456 -++++ -Seg:34a2 Size:256 Owner:0x1458 -++++ -Seg:35a2 Size:256 Owner:0x145a -++++ -Seg:36a2 Size:256 Owner:0x145c -+++++ -Seg:37a2 Size:256 Owner:0x145e -++++ -Seg:38a2 Size:256 Owner:0x1460 -++++ -Seg:39a2 Size:256 Owner:0x1462 -++++ -Seg:3aa2 Size:256 Owner:0x1464 -++++ -Seg:3ba2 Size:256 Owner:0x1466 -+++++ -Seg:3ca2 Size:256 Owner:0x1468 -++++ -Seg:3da2 Size:256 Owner:0x146a -++++ -Seg:3ea2 Size:256 Owner:0x146c -++++ -Seg:3fa2 Size:256 Owner:0x146e -++++ -Seg:40a2 Size:256 Owner:0x1470 -+++++ -Seg:41a2 Size:256 Owner:0x1472 -++++ -Seg:42a2 Size:256 Owner:0x1474 -++++ -Seg:43a2 Size:256 Owner:0x1476 -++++ -Seg:44a2 Size:256 Owner:0x1478 -++++ -Seg:45a2 Size:256 Owner:0x147a -+++++ -Seg:46a2 Size:256 Owner:0x147c -++++ -Seg:47a2 Size:256 Owner:0x147e -++++ -Seg:48a2 Size:256 Owner:0x1480 -++++ -Seg:49a2 Size:256 Owner:0x1482 -++++ -Seg:4aa2 Size:256 Owner:0x1484 -+++++ -Seg:4ba2 Size:256 Owner:0x1486 -++++ -Seg:4ca2 Size:256 Owner:0x1488 -++++ -Seg:4da2 Size:256 Owner:0x148a -++++ -Seg:4ea2 Size:256 Owner:0x148c -++++ -Seg:4fa2 Size:256 Owner:0x148e -+++++ -Seg:50a2 Size:256 Owner:0x1490 -++++ -Seg:51a2 Size:256 Owner:0x1492 -++++ -Seg:52a2 Size:256 Owner:0x1494 -++++ -Seg:53a2 Size:256 Owner:0x1496 -++++ -Seg:54a2 Size:256 Owner:0x1498 -+++++ -Seg:55a2 Size:256 Owner:0x149a -++++ -Seg:56a2 Size:256 Owner:0x149c -++++ -Seg:57a2 Size:256 Owner:0x149e -++++ -Seg:58a2 Size:256 Owner:0x14a0 -++++ -Seg:59a2 Size:256 Owner:0x14a2 -+++++ -Seg:5aa2 Size:256 Owner:0x14a4 -++++ -Seg:5ba2 Size:256 Owner:0x14a6 -++++ -Seg:5ca2 Size:256 Owner:0x14a8 -++++ -Seg:5da2 Size:256 Owner:0x14aa -++++ -Seg:5ea2 Size:256 Owner:0x14ac -+++++ -Seg:5fa2 Size:256 Owner:0x14ae -++++ -Seg:60a2 Size:256 Owner:0x14b0 -++++ -Seg:61a2 Size:256 Owner:0x14b2 -++++ -Seg:62a2 Size:256 Owner:0x14b4 -++++ -Seg:63a2 Size:256 Owner:0x14b6 -+++++ -Seg:64a2 Size:256 Owner:0x14b8 -++++ -Seg:65a2 Size:256 Owner:0x14ba -++++ -Seg:66a2 Size:256 Owner:0x14bc -++++ -Seg:67a2 Size:256 Owner:0x14be -++++ -Seg:68a2 Size:256 Owner:0x14c0 -+++++ -Seg:69a2 Size:256 Owner:0x14c2 -++++ -Seg:6aa2 Size:256 Owner:0x14c4 -++++ -Seg:6ba2 Size:256 Owner:0x14c6 -++++ -Seg:6ca2 Size:256 Owner:0x14c8 -++++ -Seg:6da2 Size:256 Owner:0x14ca -+++++ -Seg:6ea2 Size:256 Owner:0x14cc -++++ -Seg:6fa2 Size:256 Owner:0x14ce -++++ -Seg:70a2 Size:256 Owner:0x14d0 -++++ -Seg:71a2 Size:256 Owner:0x14d2 -++++ -Seg:72a2 Size:256 Owner:0x14d4 -+++++ -Seg:73a2 Size:256 Owner:0x14d6 -++++ -Seg:74a2 Size:256 Owner:0x14d8 -++++ -Seg:75a2 Size:256 Owner:0x14da -++++ -Seg:76a2 Size:256 Owner:0x14dc -++++ -Seg:77a2 Size:256 Owner:0x14de -+++++ -Seg:78a2 Size:256 Owner:0x14e0 -++++ -Seg:79a2 Size:256 Owner:0x14e2 -++++ -Seg:7aa2 Size:256 Owner:0x14e4 -++++ -Seg:7ba2 Size:256 Owner:0x14e6 -++++ -Seg:7ca2 Size:256 Owner:0x14e8 -+++++ -Seg:7da2 Size:256 Owner:0x14ea -++++ -Seg:7ea2 Size:256 Owner:0x14ec -++++ -Seg:7fa2 Size:256 Owner:0x14ee -++++ -Seg:80a2 Size:256 Owner:0x14f0 -++++ -Seg:81a2 Size:256 Owner:0x14f2 -+++++ -Seg:82a2 Size:256 Owner:0x14f4 -++++ -Seg:83a2 Size:256 Owner:0x14f6 -++++ -Seg:84a2 Size:256 Owner:0x14f8 -++++ -Seg:85a2 Size:256 Owner:0x14fa -++++ -Seg:86a2 Size:256 Owner:0x14fc -+++++ -Seg:87a2 Size:256 Owner:0x14fe -++++ -Seg:88a2 Size:256 Owner:0x1500 -++++ -Seg:89a2 Size:256 Owner:0x1502 -++++ -Seg:8aa2 Size:256 Owner:0x1504 -++++ -Seg:8ba2 Size:256 Owner:0x1506 -+++++ -Seg:8ca2 Size:256 Owner:0x1508 -++++ -Seg:8da2 Size:401 Owner:0xec10 -++++++ -Seg:b8a2 Size:18269 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W deleted file mode 100755 index 6b921851..00000000 --- a/HEAP.16W +++ /dev/null @@ -1,71 +0,0 @@ - - == default == - - FREE block at 28a00016 of size 18 - USED block at 28a00028 of size 50 - USED block at 28a0005a of size 50 - USED block at 28a0008c of size 50 - USED block at 28a000be of size 50 - USED block at 28a000f0 of size 50 - USED block at 28a00122 of size 50 - USED block at 28a00154 of size 50 - USED block at 28a00186 of size 50 - USED block at 28a001b8 of size 50 - USED block at 28a001ea of size 50 - USED block at 28a0021c of size 50 - USED block at 28a0024e of size 50 - USED block at 28a00280 of size 50 - FREE block at 28a002b2 of size 14 - USED block at 28a002c0 of size 20 - USED block at 28a002d4 of size 136 - FREE block at 28a0035c of size 7328 -OK - end of heap - - == near == - - USED block at 189fec66 of size 12 - USED block at 189fec72 of size 330 - USED block at 189fedbc of size 52 - USED block at 189fedf0 of size 20 - USED block at 189fee04 of size 20 - USED block at 189fee18 of size 20 - USED block at 189fee2c of size 20 - USED block at 189fee40 of size 20 - USED block at 189fee54 of size 4520 -OK - end of heap - - == far == - - USED block at 28a00016 of size 18 - USED block at 28a00028 of size 50 - USED block at 28a0005a of size 50 - USED block at 28a0008c of size 50 - USED block at 28a000be of size 50 - USED block at 28a000f0 of size 50 - USED block at 28a00122 of size 50 - USED block at 28a00154 of size 50 - USED block at 28a00186 of size 50 - USED block at 28a001b8 of size 50 - USED block at 28a001ea of size 50 - USED block at 28a0021c of size 50 - USED block at 28a0024e of size 50 - USED block at 28a00280 of size 50 - USED block at 28a002b2 of size 14 - USED block at 28a002c0 of size 20 - USED block at 28a002d4 of size 136 - USED block at 28a0035c of size 7328 -OK - end of heap - -Memory Type Total Used Free ----------------- -------- -------- -------- -Default 8166 806 7360 -Near 5014 494 4520 -Far 8166 806 7360 ----------------- -------- -------- -------- -coreleft = 4518 -farcoreleft = 28106 -GetFreeSize = 23610 -GetNearFreeSize = 4520 -GetFarFreeSize = 23610 -memavl = 4518 -stackavail = 31527 diff --git a/MEMINFO.16W b/MEMINFO.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/MMDUMP.16W b/MMDUMP.16W deleted file mode 100755 index 9c6a7aa6..00000000 Binary files a/MMDUMP.16W and /dev/null differ diff --git a/git_igno.re b/git_igno.re index 911e8919..15ee4357 100755 --- a/git_igno.re +++ b/git_igno.re @@ -19,6 +19,7 @@ TODO~ LICENCE~ *.mah *.MAH +__wcl__.lnk !bcexmm.map !makefile !modex.lib diff --git a/makefile b/makefile index f0374020..2f4b6e4e 100755 --- a/makefile +++ b/makefile @@ -56,6 +56,7 @@ DOSLIBMAKEALL=.\build.bat !endif TARGET_OS = dos +MEMORYMODE = l BUILD_ROOT=$+$(%__CWD__)$- #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP) @@ -77,7 +78,7 @@ DOSLIB_DOS=src/lib/doslib/hw/dos DOSLIB_VGA=src/lib/doslib/hw/vga DOSLIB_8250=src/lib/doslib/hw/8250 DOSLIB_JOYSTICK=src/lib/doslib/hw/joystick -DOSLIB_MEMMODE=dos86l +DOSLIB_MEMMODE=dos86$(MEMORYMODE) # # quiet flags @@ -92,8 +93,7 @@ UPXQ=-qqq S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -zq -k32768#54096#60000 Z_FLAGS=-zk0 -zc -zp8 -zm O_FLAGS=-obmilr -oe=24 -out -oh -ei -onac -ol+ -ok##x -T_FLAGS=-bt=dos -wx -ml -0 -fpi87 -fo=.$(OBJ) -d1###### -e=65536 -#-mh +T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -fo=.$(OBJ) -d1###### -e=65536 CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 !ifeq DEBUGSERIAL 1 @@ -101,7 +101,7 @@ CPPFLAGS += -DDEBUGSERIAL !endif AFLAGS=$(WCLQ) $(T_FLAGS) CFLAGS=$(WCLQ) $(T_FLAGS) -wo -i"$(DOSLIB)" $(O_FLAGS) $(S_FLAGS) $(Z_FLAGS) -LFLAGS=$(WCLQ) -l=dos -fm=$^&.mah $(S_FLAGS) +LFLAGS=$(WCLQ) -l=dos -fd -fm=$^&.mah $(S_FLAGS) LIBFLAGS=$(WLIBQ) -b -n # @@ -110,7 +110,7 @@ LIBFLAGS=$(WLIBQ) -b -n VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ) OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ) GFXLIBOBJS = 16_vl.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ) $(OLDLIBOBJS) -16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) +16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ) #16planar.$(OBJ) planar.$(OBJ) mapread.$(OBJ) DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ) !ifeq DEBUGSERIAL 1 @@ -294,7 +294,7 @@ bakapee.$(OBJ):$(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h bitmap.$(OBJ): $(SRCLIB)/bitmap.c $(SRCLIB)/bitmap.h planar.$(OBJ): $(SRCLIB)/planar.c $(SRCLIB)/planar.h scroll16.$(OBJ):$(SRCLIB)/scroll16.c $(SRCLIB)/scroll16.h -16text.$(OBJ): $(SRCLIB)/16text.c +16text.$(OBJ): $(SRCLIB)/16text.c $(SRCLIB)/16text.h mapread.$(OBJ):$(SRCLIB)/mapread.c $(SRCLIB)/mapread.h 16_map.$(OBJ):$(SRCLIB)/16_map.c $(SRCLIB)/16_map.h 16_timer.$(OBJ):$(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h diff --git a/src/16.c b/src/16.c index 5dcd6d31..8ef4d904 100755 --- a/src/16.c +++ b/src/16.c @@ -31,37 +31,9 @@ void main(int argc, char *argv[]) { static global_game_variables_t gvar; - // DOSLIB: check our environment - probe_dos(); - - // DOSLIB: what CPU are we using? - // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS. - // So this code by itself shouldn't care too much what CPU it's running on. Except that other - // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for - // the CPU to carry out tasks. --J.C. - cpu_probe(); - - // DOSLIB: check for VGA - if (!probe_vga()) { - printf("VGA probe failed\n"); - return; - } - // hardware must be VGA or higher! - if (!(vga_state.vga_flags & VGA_IS_VGA)) { - printf("This program requires VGA or higher graphics hardware\n"); - return; - } - - if (_DEBUG_INIT() == 0) { -#ifdef DEBUGSERIAL - printf("WARNING: Failed to initialize DEBUG output\n"); -#endif - } - _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log - _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); + Startup16(&gvar); engi_stat = ENGI_RUN; - textInit(); /* save the palette */ dpal = modexNewPal(); @@ -72,10 +44,8 @@ main(int argc, char *argv[]) modexSavePalFile("data/g.pal", gpal); VGAmodeX(1, 1, &gvar); // modexPalBlack(); //so player will not see loadings~ - IN_Startup(); IN_Default(0,&player,ctrl_Joystick); //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1); - start_timer(&gvar); while(ENGI_EXIT != engi_stat) { IN_ReadControl(0,&player); @@ -90,10 +60,10 @@ main(int argc, char *argv[]) case 2: cpus = "386 or newer"; break; default: cpus = "internal error"; break; } + Shutdown16(&gvar); VGAmodeX(0, 1, &gvar); printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n"); printf("version %s\n", VERSION); printf("detected CPU type: %s\n", cpus); - IN_Shutdown(); modexFadeOn(4, dpal); } diff --git a/src/16.h b/src/16.h index 24f180ac..253cd9e9 100755 --- a/src/16.h +++ b/src/16.h @@ -31,12 +31,4 @@ #include "src/lib/16_timer.h" #include "src/lib/16_dbg.h" -typedef enum { - ENGI_EXIT, - ENGI_QUIT, - ENGI_RUN, - ENGI_INPUT, - ENGI_PAUSE -} engi_stat_t; - #endif /*__16_H_*/ diff --git a/src/fonttest.c b/src/fonttest.c index a7757e47..6ecbdfbd 100755 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -21,7 +21,7 @@ */ #include #include -#include "lib/types.h" +#include "lib/16_t.h" #include "lib/16text.h" void main(int argc, char near *argv[]) diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c index 6cd9eb92..767ebfcc 100755 --- a/src/lib/16_tail.c +++ b/src/lib/16_tail.c @@ -24,6 +24,7 @@ */ #include "src/lib/16_tail.h" +#include "src/lib/16text.h" /* ========================== @@ -68,6 +69,8 @@ void Startup16(global_game_variables_t *gvar) } _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); + + textInit(); #endif gvar->mm.mmstarted=0; gvar->pm.PMStarted=0; diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index 8cd30094..f268469b 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -24,6 +24,7 @@ #define __16_TAIL__ #include "src/lib/16_head.h" +#include "src/lib/16text.h" #include "src/lib/16_pm.h" #include "src/lib/16_mm.h" #include "src/lib/16_ca.h" diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 2ea3f9fe..d38d8a9b 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -330,6 +330,14 @@ typedef struct //========================================================================== //actual global game varables! +typedef enum { + ENGI_EXIT, + ENGI_QUIT, + ENGI_RUN, + ENGI_INPUT, + ENGI_PAUSE +} engi_stat_t; + typedef struct { video_t video; // video settings variable diff --git a/src/lib/16text.c b/src/lib/16text.c index 0f946510..d395c027 100755 --- a/src/lib/16text.c +++ b/src/lib/16text.c @@ -20,7 +20,7 @@ * */ -#include "16text.h" +#include "src/lib/16text.h" /* this array holds the rom font descriptors */ font_t romFonts[4]; diff --git a/src/lib/16text.h b/src/lib/16text.h index ed037ce5..c6f3e36c 100755 --- a/src/lib/16text.h +++ b/src/lib/16text.h @@ -31,7 +31,6 @@ #include #include #endif -//#include "src/lib/16_t.h" #include "src/lib/16_head.h" /* font information type */