From d65c8be05249df8109a523747ad3c4e163d2d975 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Fri, 16 Sep 2016 12:42:43 -0500 Subject: [PATCH] quit works with input system now --- bcexmm.dsk | Bin 261 -> 461 bytes bcexmm.exe | Bin 66176 -> 66176 bytes bcexmm.prj | Bin 7269 -> 7365 bytes makefile | 7 ++-- src/exmmtest.c | 1 + src/lib/16_head.c | 4 +-- src/lib/16_head.h | 2 ++ src/lib/16_lib.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib/16_lib.h | 31 ++++++++++++++++ src/lib/16_mm.h | 1 + src/vrstest.c | 3 -- 11 files changed, 129 insertions(+), 8 deletions(-) create mode 100755 src/lib/16_lib.c create mode 100755 src/lib/16_lib.h diff --git a/bcexmm.dsk b/bcexmm.dsk index 115d6b994d2d69428d3381c954644d065babb4e3..b1f56e47ef6d21ac09a1dde6261b3b34e374cad8 100755 GIT binary patch literal 461 zcmWG3ElSE)a8_{6&nro-C{b|B%t=*{VqoMI5@(cRVBkt+kYZqFU}NB8U;vU_3|e~5 z0RbQqh&>p-FlK^O838336l5l=B`CpY4u%bdflwI+hRJFQG9WcD+Sw{5D#p+(#?Rl+ z(bv_$0Bk5D1AfTB5DGT%7sCWbm_d`(UVsgT85kVo9OL8Z1T;GyNC91l-$+KFn;?eP zGMs?Bj)0-gL>L-E(CaXlhC~Lq1_K=`%U}UC*8r#43=Cg^L5)4InSkE-|DS;Y04^;* AyZ`_I delta 91 zcmX@h+{!dTLFo%)HiHxcgCqkGD9B7!OHhK*91I%@1A#IV6MU7vGUnk>#RSwB0#+qA NxsuU{<^O*M1^`!l65;>= diff --git a/bcexmm.exe b/bcexmm.exe index b0c69877343329517c174e3d05a2959544c08036..8939ee24d4a862ff508cd956b80ec814c4741cd3 100755 GIT binary patch delta 253 zcmWl}%_{_P7{KxG^X!y^BsXzcsGsvVkuF`?5({a$L$571`!dc6gCpK4p(z$%7uypaoiu q9%8gej~+3m$IR;q>v~E-OI+v~k(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4fWt^H-}U^1oeEwL@FqB@!2$rVHz)|GPE zv1*Rc%3bg-jHF%RhOE;ANWn@w6eUwV8;7w@lgc(gzP@ClD0)mu2d#)4iS}y;o%u@z ztH?$2xR9^Jt(pi5SG}+4xOXRM>S83|=2^0@vsvex_OXHTjBQu*>dlZt%a#bVZ-?{M z3azRUyHLfS2_0<)yxp-`#6|A98ph9e2W6h9cQ+b0mEU=9QVQ9vRPds>Dhp5AC1;vC zFJ$A(2_~nRoNRIwFve?IvF3a_v}=HOE#2SQtadhuP-V`x6=M?NN|D;=Ov}B|-HYLx QQ)pSlxpGBA-ejivAJwG)zyJUM diff --git a/makefile b/makefile index 90f4b27d..ddf393d1 100755 --- a/makefile +++ b/makefile @@ -106,7 +106,7 @@ LIBFLAGS=$(WLIBQ) -b -n # objects # VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ) -16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ) +16LIBOBJS = 16_lib.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ) GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ) #scroll16.$(OBJ) #16planar.$(OBJ) planar.$(OBJ) DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ) @@ -154,6 +154,8 @@ DOSLIBLIBS += $(DOSLIB_8250)/dos86h/8250.lib # List of executables to build # TESTEXEC = & + tesuto.exe & + 0.exe & test.exe & test0.exe & pcxtest.exe & @@ -172,8 +174,6 @@ TESTEXEC = & EXEC = & 16.exe & bakapi.exe & - tesuto.exe & - 0.exe & $(TESTEXEC) all: $(EXEC) joytest.exe @@ -292,6 +292,7 @@ mapread.$(OBJ): $(SRCLIB)/mapread.c $(SRCLIB)/mapread.h 16_dbg.$(OBJ): $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h midi.$(OBJ): $(SRCLIB)/midi.c $(SRCLIB)/midi.h 16_head.$(OBJ): $(SRCLIB)/16_head.c $(SRCLIB)/16_head.h +16_lib.$(OBJ): $(SRCLIB)/16_lib.c $(SRCLIB)/16_lib.h 16_hc.$(OBJ): $(SRCLIB)/16_hc.c $(SRCLIB)/16_hc.h 16_snd.$(OBJ): $(SRCLIB)/16_snd.c $(SRCLIB)/16_snd.h jsmn.$(OBJ): $(JSMNLIB)/jsmn.c $(JSMNLIB)/jsmn.h diff --git a/src/exmmtest.c b/src/exmmtest.c index 06835abf..d6a44fc6 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -26,6 +26,7 @@ #include "src/lib/16_ca.h" #include "src/lib/16_mm.h" #include "src/lib/16_hc.h" +#include "src/lib/16_lib.h" //#include "src/lib/modex16.h" #pragma hdrstop diff --git a/src/lib/16_head.c b/src/lib/16_head.c index 69f69db2..30e4444f 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -94,7 +94,7 @@ US_CheckParm(char *parm,char **strings) } return(-1); } - +#ifdef __BORLANDC__ //=========================================================================== /* @@ -156,7 +156,7 @@ void Quit (char *error) } //=========================================================================== - +#endif byte dirchar(byte in) { diff --git a/src/lib/16_head.h b/src/lib/16_head.h index e804410f..acd1e1ec 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -176,7 +176,9 @@ void wait(clock_t wait); long int filesize(FILE *fp); void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free); int US_CheckParm(char *parm,char **strings); +#ifdef __BORLANDC__ void Quit (char *error); +#endif byte dirchar(byte in); #endif/*_LIBHEAD_H_*/ diff --git a/src/lib/16_lib.c b/src/lib/16_lib.c new file mode 100755 index 00000000..67251d43 --- /dev/null +++ b/src/lib/16_lib.c @@ -0,0 +1,88 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ +/* + * 16 library + */ + +#include "src/lib/16_lib.h" + +//=========================================================================== + +/* +========================== += += Quit += +========================== +*/ + +void Quit (char *error) +{ + unsigned finscreen; + memptr screen; + union REGS in, out; + + //ClearMemory (); + if (!*error) + { + //WriteConfig (); + } + else + { + //CA_CacheGrChunk (ERRORSCREEN); + //screen = grsegs[ERRORSCREEN]; + } + + //ShutdownId (); + IN_Shutdown(); + //modexLeave(); + in.h.ah = 0x00; + in.h.al = 0x3; + int86(0x10, &in, &out); + + if (error && *error) + { + movedata ((unsigned)screen,7,0xb800,0,7*160); + //gotoxy (10,4); + puts(error); + //gotoxy (1,8); + exit(1); + } + else + if (!error || !(*error)) + { + //clrscr(); + //#ifndef JAPAN + movedata ((unsigned)screen,7,0xb800,0,4000); + //gotoxy(1,24); + //#endif +//asm mov bh,0 +//asm mov dh,23 // row +//asm mov dl,0 // collumn +//asm mov ah,2 +//asm int 0x10 + } + + exit(0); +} + +//=========================================================================== diff --git a/src/lib/16_lib.h b/src/lib/16_lib.h new file mode 100755 index 00000000..9b3df181 --- /dev/null +++ b/src/lib/16_lib.h @@ -0,0 +1,31 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef __16_LIB__ +#define __16_LIB__ + +#include "src/lib/16_head.h" +#include "src/lib/16_in.h" + +void Quit (char *error); + +#endif diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 6d4e8ec0..48c64353 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -25,6 +25,7 @@ #include #include "src/lib/16_head.h" #include "src/lib/16_hc.h" +#include "src/lib/16_lib.h" //#include "src/lib/modex16.h" //++++mh #include "src/lib/16_in.h" diff --git a/src/vrstest.c b/src/vrstest.c index 0e9020d9..11bfc670 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -20,9 +20,6 @@ * */ -#include -#include -#include #include "src/lib/modex16.h" #include "src/lib/16_sprit.h" #include "src/lib/16_ca.h" -- 2.39.5