From f32fe889a9eeb3fc17f9441f0c257e8ef44ceb2d Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 12 Oct 2016 12:45:06 -0500 Subject: [PATCH] initiaded zcroll.exe --- makefile | 2 +- src/lib/16_tail.c | 12 ++++++++++++ src/lib/16_tail.h | 2 ++ src/lib/scroll16.h | 1 + src/zcroll.c | 35 ++--------------------------------- 5 files changed, 18 insertions(+), 34 deletions(-) diff --git a/makefile b/makefile index 3c88097d..0dcb26d6 100755 --- a/makefile +++ b/makefile @@ -166,7 +166,7 @@ TESTEXEC = & fonttest.exe & fontgfx.exe & scroll.exe & -#zcroll.c & + zcroll.exe & vgmtest.exe & inputest.exe & palettel.exe & diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c index 47ef9b7b..f63dddc1 100755 --- a/src/lib/16_tail.c +++ b/src/lib/16_tail.c @@ -58,6 +58,14 @@ void Startup16(global_game_variables_t *gvar) 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); #endif gvar->mm.mmstarted=0; gvar->pm.PMStarted=0; @@ -66,6 +74,10 @@ void Startup16(global_game_variables_t *gvar) PM_Startup(gvar); PM_UnlockMainMem(gvar); CA_Startup(gvar); +#ifdef __WATCOMC__ + start_timer(gvar); + +#endif } diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index aadfeaf0..d9d37b16 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -32,6 +32,8 @@ extern boolean dbg_debugpm; void DebugMemory_(global_game_variables_t *gvar, boolean q); +void Shutdown16(global_game_variables_t *gvar); +void Startup16(global_game_variables_t *gvar); #ifdef __WATCOMC__ void Quit (char *error); #endif diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 9602732d..1f609670 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -31,6 +31,7 @@ #include "src/lib/mapread.h" //map is loaded here www #include "src/lib/16_timer.h" #include "src/lib/wcpu/wcpu.h" +#include "src/lib/16_tail.h" #include #include diff --git a/src/zcroll.c b/src/zcroll.c index d3912145..02d0e47f 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -20,7 +20,6 @@ * */ -#include "src/lib/16_tail.h" #include "src/lib/scroll16.h" #include "src/lib/16_timer.h" #include "src/lib/wcpu/wcpu.h" @@ -62,39 +61,10 @@ void main(int argc, char *argv[]) if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; - // 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); pan.pn=1; - start_timer(&gvar); - /* create the map */ fprintf(stderr, "testing map load~ "); loadmap("data/test.map", &map); @@ -119,7 +89,6 @@ void main(int argc, char *argv[]) #endif /* input! */ - IN_Startup(); IN_Default(0,&player,ctrl_Joystick); //IN_Default(1,&player,ctrl_Joystick); @@ -318,7 +287,7 @@ void main(int argc, char *argv[]) #endif VGAmodeX(0, 1, &gvar); #endif - IN_Shutdown(); + Shutdown16(&gvar); printf("\nProject 16 scroll.exe. This is just a test file!\n"); printf("version %s\n", VERSION); printf("tx: %d ", mv[0].tx); -- 2.39.2