OSDN Git Service

quit works with input system now
authorsparky4 <sparky4@cock.li>
Fri, 16 Sep 2016 17:42:43 +0000 (12:42 -0500)
committersparky4 <sparky4@cock.li>
Fri, 16 Sep 2016 17:42:43 +0000 (12:42 -0500)
bcexmm.dsk
bcexmm.exe
bcexmm.prj
makefile
src/exmmtest.c
src/lib/16_head.c
src/lib/16_head.h
src/lib/16_lib.c [new file with mode: 0755]
src/lib/16_lib.h [new file with mode: 0755]
src/lib/16_mm.h
src/vrstest.c

index 115d6b9..b1f56e4 100755 (executable)
Binary files a/bcexmm.dsk and b/bcexmm.dsk differ
index b0c6987..8939ee2 100755 (executable)
Binary files a/bcexmm.exe and b/bcexmm.exe differ
index 8ea92c5..9b9bba0 100755 (executable)
Binary files a/bcexmm.prj and b/bcexmm.prj differ
index 90f4b27..ddf393d 100755 (executable)
--- 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
index 06835ab..d6a44fc 100755 (executable)
@@ -26,6 +26,7 @@
 #include "src/lib/16_ca.h"\r
 #include "src/lib/16_mm.h"\r
 #include "src/lib/16_hc.h"\r
+#include "src/lib/16_lib.h"\r
 //#include "src/lib/modex16.h"\r
 #pragma hdrstop\r
 \r
index 69f69db..30e4444 100755 (executable)
@@ -94,7 +94,7 @@ US_CheckParm(char *parm,char **strings)
        }\r
        return(-1);\r
 }\r
-\r
+#ifdef __BORLANDC__\r
 //===========================================================================\r
 \r
 /*\r
@@ -156,7 +156,7 @@ void Quit (char *error)
 }\r
 \r
 //===========================================================================\r
-\r
+#endif\r
 \r
 byte dirchar(byte in)\r
 {\r
index e804410..acd1e1e 100755 (executable)
@@ -176,7 +176,9 @@ void wait(clock_t wait);
 long int filesize(FILE *fp);\r
 void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free);\r
 int US_CheckParm(char *parm,char **strings);\r
+#ifdef __BORLANDC__\r
 void Quit (char *error);\r
+#endif\r
 byte dirchar(byte in);\r
 \r
 #endif/*_LIBHEAD_H_*/\r
diff --git a/src/lib/16_lib.c b/src/lib/16_lib.c
new file mode 100755 (executable)
index 0000000..67251d4
--- /dev/null
@@ -0,0 +1,88 @@
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+/*\r
+ * 16 library\r
+ */\r
+\r
+#include "src/lib/16_lib.h"\r
+\r
+//===========================================================================\r
+\r
+/*\r
+==========================\r
+=\r
+= Quit\r
+=\r
+==========================\r
+*/\r
+\r
+void Quit (char *error)\r
+{\r
+       unsigned        finscreen;\r
+       memptr  screen;\r
+       union REGS in, out;\r
+\r
+       //ClearMemory ();\r
+       if (!*error)\r
+       {\r
+        //WriteConfig ();\r
+       }\r
+       else\r
+       {\r
+        //CA_CacheGrChunk (ERRORSCREEN);\r
+        //screen = grsegs[ERRORSCREEN];\r
+       }\r
+\r
+       //ShutdownId ();\r
+       IN_Shutdown();\r
+       //modexLeave();\r
+       in.h.ah = 0x00;\r
+       in.h.al = 0x3;\r
+       int86(0x10, &in, &out);\r
+\r
+       if (error && *error)\r
+       {\r
+         movedata ((unsigned)screen,7,0xb800,0,7*160);\r
+         //gotoxy (10,4);\r
+         puts(error);\r
+         //gotoxy (1,8);\r
+         exit(1);\r
+       }\r
+       else\r
+       if (!error || !(*error))\r
+       {\r
+               //clrscr();\r
+               //#ifndef JAPAN\r
+               movedata ((unsigned)screen,7,0xb800,0,4000);\r
+               //gotoxy(1,24);\r
+               //#endif\r
+//asm  mov     bh,0\r
+//asm  mov     dh,23   // row\r
+//asm  mov     dl,0    // collumn\r
+//asm  mov ah,2\r
+//asm  int     0x10\r
+       }\r
+\r
+       exit(0);\r
+}\r
+\r
+//===========================================================================\r
diff --git a/src/lib/16_lib.h b/src/lib/16_lib.h
new file mode 100755 (executable)
index 0000000..9b3df18
--- /dev/null
@@ -0,0 +1,31 @@
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#ifndef        __16_LIB__\r
+#define        __16_LIB__\r
+\r
+#include "src/lib/16_head.h"\r
+#include "src/lib/16_in.h"\r
+\r
+void Quit (char *error);\r
+\r
+#endif\r
index 6d4e8ec..48c6435 100755 (executable)
@@ -25,6 +25,7 @@
 #include <malloc.h>
 #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"
 
index 0e9020d..11bfc67 100755 (executable)
@@ -20,9 +20,6 @@
  *
  */
 
-#include <stdio.h>
-#include <dos.h>
-#include <string.h>
 #include "src/lib/modex16.h"
 #include "src/lib/16_sprit.h"
 #include "src/lib/16_ca.h"