OSDN Git Service

wwww merging~
authorsparky4 <sparky4@cock.li>
Fri, 26 Jun 2015 20:10:04 +0000 (15:10 -0500)
committersparky4 <sparky4@cock.li>
Fri, 26 Jun 2015 20:10:04 +0000 (15:10 -0500)
modified:   16.LIB
modified:   16.exe
modified:   Project 16.bfproject
new file:   inputext.exe
modified:   makefile
modified:   maptest.exe
modified:   pcxtest.exe
modified:   scroll.exe
new file:   src/inputest.c
renamed:    16/cawat/16_in.c -> src/lib/16_in.c
renamed:    16/cawat/16_in.h -> src/lib/16_in.h
renamed:    16/cawat/16_us.h -> src/lib/16_us.h
modified:   src/lib/lib_head.h
modified:   test.exe
modified:   test2.exe

15 files changed:
16.LIB
16.exe
Project 16.bfproject
inputext.exe [new file with mode: 0644]
makefile
maptest.exe
pcxtest.exe
scroll.exe
src/inputest.c [new file with mode: 0644]
src/lib/16_in.c [moved from 16/cawat/16_in.c with 85% similarity]
src/lib/16_in.h [moved from 16/cawat/16_in.h with 55% similarity]
src/lib/16_us.h [moved from 16/cawat/16_us.h with 100% similarity]
src/lib/lib_head.h
test.exe
test2.exe

diff --git a/16.LIB b/16.LIB
index 33cc111..c73feb5 100644 (file)
Binary files a/16.LIB and b/16.LIB differ
diff --git a/16.exe b/16.exe
index 67be575..2b618ba 100644 (file)
Binary files a/16.exe and b/16.exe differ
index f899dd4..5d5f6db 100644 (file)
@@ -3,7 +3,7 @@ e2c.convert_num: 0
 openfiles: /dos/z/16/doc/project.txt:80:0:0:
 openfiles: /dos/z/16/src/palettec.c:882:0:0:
 openfiles: /dos/z/16/src/pcxtest.c:931:0:0:
-openfiles: /dos/z/16/src/scroll.c:2847:2098:0:
+openfiles: /dos/z/16/src/scroll.c:18038:17181:1:
 openfiles: /dos/z/16/src/fmemtest.c:891:0:0:
 openfiles: /dos/z/16/src/emmtest.c:405:0:0:
 openfiles: /dos/z/16/src/emsdump.c:890:0:0:
@@ -11,7 +11,7 @@ openfiles: /dos/z/16/src/maptest.c:886:0:0:
 openfiles: /dos/z/16/src/maptest0.c:886:0:0:
 openfiles: /dos/z/16/src/test.c:890:0:0:
 openfiles: /dos/z/16/src/test2.c:886:0:0:
-openfiles: /dos/z/16/src/lib/modex16.c:1963:3289:1:
+openfiles: /dos/z/16/src/lib/modex16.c:3597:3271:0:
 openfiles: /dos/z/16/src/lib/modex16.h:1052:576:0:
 openfiles: /dos/z/16/src/lib/planar.h:1008:127:0:
 openfiles: /dos/z/16/src/lib/planar.c:894:0:0:
@@ -53,7 +53,7 @@ c2e.convert_iso: 0
 opendir: file:///dos/z/16/src/lib
 wrap_text_default: 0
 bookmarks_filename_mode: 1
-ssearch_text: geninterrupt
+ssearch_text: puts
 snr_casesens: 0
 view_blocks: 1
 name: Project 16
@@ -86,13 +86,14 @@ recent_files: file:///dos/z/16/16.c
 recent_files: file:///dos/z/16/src/lib/wcpu/wtest.c
 recent_files: file:///dos/z/16/src/lib/wcpu/wtest.h
 recent_files: file:///dos/z/16/src/lib/wcpu/makefile
+recent_files: file:///dos/z/16/src/lib/modex16.c
 recent_files: file:///dos/z/16/src/pcxtest.c
 recent_files: file:///dos/z/16/doc/project.txt
 recent_files: file:///dos/z/16/src/palettec.c
 recent_files: file:///dos/z/16/src/fmemtest.c
 recent_files: file:///dos/z/16/src/emmtest.c
-recent_files: file:///dos/z/16/src/maptest.c
 recent_files: file:///dos/z/16/src/emsdump.c
+recent_files: file:///dos/z/16/src/maptest.c
 recent_files: file:///dos/z/16/src/scroll.c
 recent_files: file:///dos/z/16/src/maptest0.c
 recent_files: file:///dos/z/16/src/test.c
@@ -100,33 +101,32 @@ recent_files: file:///dos/z/16/src/test2.c
 recent_files: file:///dos/z/16/src/lib/modex16.h
 recent_files: file:///dos/z/16/src/lib/planar.h
 recent_files: file:///dos/z/16/src/lib/planar.c
-recent_files: file:///dos/z/16/src/lib/modex16.c
 recent_files: file:///dos/z/16/src/lib/bitmap.c
 recent_files: file:///dos/z/16/src/lib/bitmap.h
-recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.h
-recent_files: file:///dos/z/16/src/lib/dos_kb.h
 recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.c
+recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.h
 recent_files: file:///dos/z/16/src/lib/dos_kb.c
+recent_files: file:///dos/z/16/src/lib/dos_kb.h
 recent_files: file:///dos/z/16/src/lib/mapread.c
 recent_files: file:///dos/z/16/src/lib/mapread.h
 recent_files: file:///dos/z/16/src/lib/fmapread.c
 recent_files: file:///dos/z/16/src/lib/fmapread.h
+recent_files: file:///dos/z/16/src/lib/lib_head.c
+recent_files: file:///dos/z/16/src/lib/lib_head.h
 recent_files: file:///dos/z/16/src/lib/exmm/memory.h
-recent_files: file:///dos/z/16/src/lib/exmm/emmret.h
 recent_files: file:///dos/z/16/src/lib/exmm/emmsize.h
-recent_files: file:///dos/z/16/src/lib/exmm/memory.c
+recent_files: file:///dos/z/16/src/lib/exmm/emmret.h
 recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.c
 recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.h
-recent_files: file:///dos/z/16/src/lib/lib_head.c
-recent_files: file:///dos/z/16/src/lib/lib_head.h
+recent_files: file:///dos/z/16/src/lib/exmm/memory.c
 recent_files: file:///dos/z/16/makefile
 recent_files: file:///dos/z/16/src/lib/types.h
-recent_files: file:///dos/z/16/src/16.h
 recent_files: file:///dos/z/16/src/16.c
 recent_files: file:///dos/z/16/src/lib/scroll16.h
 recent_files: file:///dos/z/16/src/lib/scroll16.c
+recent_files: file:///dos/z/16/src/16.h
 snr_replacetype: 0
-savedir: file:///dos/z/16
+savedir: file:///dos/z/16/src
 spell_check_default: 1
 spell_insert_entities: 0
 last_filefilter: 
@@ -136,7 +136,6 @@ snr_escape_chars: 0
 htmlbar_view: 0
 spell_lang: en
 ssearch_dotmatchall: 0
-searchlist: mapscrollr
 searchlist: <alloc
 searchlist: pcxt
 searchlist: pallettec
@@ -151,6 +150,7 @@ searchlist: _dos_
 searchlist: '_dos_geninterrupt
 searchlist: _dos_geninterrupt
 searchlist: geninterrupt
+searchlist: puts
 autocomplete: 1
 outputb_show_all_output: 0
 bookmarks_show_mode: 0
diff --git a/inputext.exe b/inputext.exe
new file mode 100644 (file)
index 0000000..e69de29
index 3be8bca..7582ae3 100644 (file)
--- a/makefile
+++ b/makefile
@@ -17,7 +17,7 @@ WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
 \r
 16LIBOBJS = modex16.$(OBJ) dos_kb.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) wcpu.$(OBJ) lib_head.$(OBJ) scroll16.$(OBJ)\r
 \r
-all: 16.exe test.exe pcxtest.exe test2.exe scroll.exe palettec.exe maptest.exe maptest0.exe emsdump.exe emmtest.exe fmemtest.exe fonttest.exe \r
+all: 16.exe test.exe pcxtest.exe test2.exe scroll.exe palettec.exe maptest.exe maptest0.exe emsdump.exe emmtest.exe fmemtest.exe fonttest.exe inputest.exe\r
 \r
 #\r
 #executables\r
@@ -36,7 +36,10 @@ test2.exe: test2.$(OBJ) modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) lib_head.$(OB
        wcl $(FLAGS) test2.$(OBJ) modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) lib_head.$(OBJ)\r
 \r
 fonttest.exe: 16text.$(OBJ) fonttest.$(OBJ)\r
-       wcl $(FLAGS) fonttest.$(OBJ) 16text.$(OBJ)\r
+       wcl $(FLAGS) fonttest.$(OBJ) 16text.$(OBJ)
+
+inputest.exe: inputest.$(OBJ) 16_in.$(OBJ)\r
+       wcl $(FLAGS) inputest.$(OBJ) 16_in.$(OBJ)\r
 \r
 16text.$(OBJ): $(SRCLIB)16text.c\r
        wcl -c $(SRCLIB)16text.c\r
@@ -96,7 +99,10 @@ emsdump.$(OBJ): $(SRC)emsdump.c
        wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c\r
 \r
 fmemtest.$(OBJ): $(SRC)fmemtest.c\r
-       wcl $(FLAGS) $(MFLAGS) -c $(SRC)fmemtest.c\r
+       wcl $(FLAGS) $(MFLAGS) -c $(SRC)fmemtest.c
+
+inputest.$(OBJ): $(SRC)inputest.c\r
+       wcl $(FLAGS) -c $(SRC)inputest.c\r
 \r
 #\r
 #non executable objects libraries\r
@@ -126,7 +132,10 @@ mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c 16.lib
        wcl $(FLAGS) -c $(SRCLIB)mapread.c 16.lib\r
 \r
 fmapread.$(OBJ): $(SRCLIB)fmapread.h $(SRCLIB)fmapread.c 16.lib\r
-       wcl $(FLAGS) $(MFLAGS) -c $(SRCLIB)fmapread.c 16.lib\r
+       wcl $(FLAGS) $(MFLAGS) -c $(SRCLIB)fmapread.c 16.lib
+
+16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
+       wcl $(FLAGS) -c $(SRCLIB)16_in.c\r
 \r
 lib_head.$(OBJ): $(SRCLIB)lib_head.h $(SRCLIB)lib_head.c\r
        wcl $(FLAGS) -c $(SRCLIB)lib_head.c\r
@@ -138,8 +147,8 @@ farjsmn.$(OBJ): $(JSMNLIB)farjsmn.h $(JSMNLIB)farjsmn.c
        wcl $(FLAGS) $(MFLAGS) -c $(JSMNLIB)farjsmn.c\r
 \r
 memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c\r
-       wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c\r
-\r
+       wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
+
 #\r
 #other~\r
 #\r
index 39a61db..7592789 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index 86dc0e7..c8da170 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 81bf2fa..5c8ec4c 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
diff --git a/src/inputest.c b/src/inputest.c
new file mode 100644 (file)
index 0000000..d6a843a
--- /dev/null
@@ -0,0 +1,31 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * 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 <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+/*
+       input test
+*/
+#include "src/lib/16_in.h"
+
+void
+main(int argc, char *argv[])\r
+{
+
+}
\ No newline at end of file
similarity index 85%
rename from 16/cawat/16_in.c
rename to src/lib/16_in.c
index f8d3178..34679d9 100644 (file)
 //     DEBUG - there are more globals
 //
 
-#include "16_in.h"
-
-//     Global variables
-               boolean JoystickCalibrated=false;               // MDM (GAMERS EDGE) - added
-               ControlType ControlTypeUsed;                            // MDM (GAMERS EDGE) - added
-
-               boolean         Keyboard[NumCodes],
-                                       JoysPresent[MaxJoys],
-                                       MousePresent;
-               boolean         Paused;
-               char            LastASCII;
-               ScanCode        LastScan;
-               KeyboardDef     KbdDefs[MaxKbds] = {{0x1d,0x38,0x47,0x48,0x49,0x4b,0x4d,0x4f,0x50,0x51}};
-               JoystickDef     JoyDefs[MaxJoys];
-               ControlType     Controls[MaxPlayers];
-
-#ifdef DEMO0
-               Demo            DemoMode = demo_Off;\r
-               byte __segment  *DemoBuffer;\r
-               word            DemoOffset,DemoSize;
-#endif
-
-//     Internal variables
-static boolean         IN_Started;
-static boolean         CapsLock;
-static ScanCode        CurCode,LastCode;
-static byte        far ASCIINames[] =          // Unshifted ASCII for scan codes
-                                       {
-//      0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
-       0  ,27 ,'1','2','3','4','5','6','7','8','9','0','-','=',8  ,9  ,        // 0
-       'q','w','e','r','t','y','u','i','o','p','[',']',13 ,0  ,'a','s',        // 1
-       'd','f','g','h','j','k','l',';',39 ,'`',0  ,92 ,'z','x','c','v',        // 2
-       'b','n','m',',','.','/',0  ,'*',0  ,' ',0  ,0  ,0  ,0  ,0  ,0  ,        // 3
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,'7','8','9','-','4','5','6','+','1',        // 4
-       '2','3','0',127,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 5
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 6
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0           // 7
-                                       },
-                                       far ShiftNames[] =              // Shifted ASCII for scan codes
-                                       {
-//      0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
-       0  ,27 ,'!','@','#','$','%','^','&','*','(',')','_','+',8  ,9  ,        // 0
-       'Q','W','E','R','T','Y','U','I','O','P','{','}',13 ,0  ,'A','S',        // 1
-       'D','F','G','H','J','K','L',':',34 ,'~',0  ,'|','Z','X','C','V',        // 2
-       'B','N','M','<','>','?',0  ,'*',0  ,' ',0  ,0  ,0  ,0  ,0  ,0  ,        // 3
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,'7','8','9','-','4','5','6','+','1',        // 4
-       '2','3','0',127,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 5
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 6
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0           // 7
-                                       },
-                                       far SpecialNames[] =    // ASCII for 0xe0 prefixed codes
-                                       {
-//      0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 0
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,13 ,0  ,0  ,0  ,        // 1
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 2
-       0  ,0  ,0  ,0  ,0  ,'/',0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 3
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 4
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 5
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 6
-       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0           // 7
-                                       },
-
-#if 0
-                                       *ScanNames[] =          // Scan code names with single chars
-                                       {
-       "?","?","1","2","3","4","5","6","7","8","9","0","-","+","?","?",
-       "Q","W","E","R","T","Y","U","I","O","P","[","]","|","?","A","S",
-       "D","F","G","H","J","K","L",";","\"","?","?","?","Z","X","C","V",
-       "B","N","M",",",".","/","?","?","?","?","?","?","?","?","?","?",
-       "?","?","?","?","?","?","?","?","\xf","?","-","\x15","5","\x11","+","?",
-       "\x13","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",
-       "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",
-       "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?"
-                                       },      // DEBUG - consolidate these
-#endif
-
-                                       far ExtScanCodes[] =    // Scan codes with >1 char names
-                                       {
-       1,0xe,0xf,0x1d,0x2a,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,
-       0x3f,0x40,0x41,0x42,0x43,0x44,0x57,0x59,0x46,0x1c,0x36,
-       0x37,0x38,0x47,0x49,0x4f,0x51,0x52,0x53,0x45,0x48,
-       0x50,0x4b,0x4d,0x00
-                                       };
-#if 0
-                                       *ExtScanNames[] =       // Names corresponding to ExtScanCodes
-                                       {
-       "Esc","BkSp","Tab","Ctrl","LShft","Space","CapsLk","F1","F2","F3","F4",
-       "F5","F6","F7","F8","F9","F10","F11","F12","ScrlLk","Enter","RShft",
-       "PrtSc","Alt","Home","PgUp","End","PgDn","Ins","Del","NumLk","Up",
-       "Down","Left","Right",""
-                                       };
-#endif
-static Direction       DirTable[] =            // Quick lookup for total direction
-                                       {
-                                               dir_NorthWest,  dir_North,      dir_NorthEast,
-                                               dir_West,               dir_None,       dir_East,
-                                               dir_SouthWest,  dir_South,      dir_SouthEast
-                                       };
-
-static void                    (*INL_KeyHook)(void);
-static void interrupt  (*OldKeyVect)(void);
-
-static char                    *ParmStrings[] = {"nojoys","nomouse",nil};
+#include "src/lib/16_in.h"
 
 //     Internal routines
 
similarity index 55%
rename from 16/cawat/16_in.h
rename to src/lib/16_in.h
index e5adb56..262f7b1 100644 (file)
 #ifndef        __16_IN__\r
 #define        __16_IN__\r
 
-#include "lib_head.h"\r
-#include "16_us.h"
-\r
-#ifndef        __TYPES__\r
-//#include "ID_Types.h"\r
-#endif\r
+#include "src/lib/lib_head.h"\r
+#include "src/lib/16_us.h"
 \r
 #ifdef __DEBUG__\r
 #define        __DEBUG_InputMgr__\r
@@ -86,6 +82,17 @@ typedef      byte            ScanCode;
 #define        sc_F11                  0x57\r
 #define        sc_F12                  0x59\r
 \r
+#define        sc_1                    0x02\r
+#define        sc_2                    0x03\r
+#define        sc_3                    0x04\r
+#define        sc_4                    0x05\r
+#define        sc_5                    0x06\r
+#define        sc_6                    0x07\r
+#define        sc_7                    0x08\r
+#define        sc_8                    0x09\r
+#define        sc_9                    0x0a\r
+#define        sc_0                    0x0b\r
+\r
 #define        sc_A                    0x1e\r
 #define        sc_B                    0x30\r
 #define        sc_C                    0x2e\r
@@ -173,25 +180,106 @@ typedef  struct          {
                                                                        joyMultXL,joyMultYL,\r
                                                                        joyMultXH,joyMultYH;\r
                                        } JoystickDef;\r
-// Global variables\r
-extern boolean         Keyboard[],\r
-                                       MousePresent,\r
-                                       JoysPresent[];\r
-extern boolean         Paused;\r
-extern char            LastASCII;\r
-extern ScanCode        LastScan;\r
-extern KeyboardDef     KbdDefs[];\r
-extern JoystickDef     JoyDefs[];\r
-extern ControlType     Controls[MaxPlayers];\r
-\r
-extern boolean JoystickCalibrated;                             // MDM (GAMERS EDGE) - added\r
-extern ControlType ControlTypeUsed;                            // MDM (GAMERS EDGE) - added\r
 
+/*\r
+=============================================================================\r
+\r
+                                       GLOBAL VARIABLES\r
+\r
+=============================================================================\r
+*/\r
+\r
+//\r
+// configuration variables\r
+//\r
+boolean                        MousePresent;\r
+boolean                        JoysPresent[MaxJoys];\r
+boolean                        JoyPadPresent;\r
+\r
+\r
+//     Global variables
+               boolean JoystickCalibrated=false;               // MDM (GAMERS EDGE) - added
+               ControlType ControlTypeUsed;                            // MDM (GAMERS EDGE) - added
+\r
+               boolean         Keyboard[NumCodes];\r
+               boolean         Paused;\r
+               char            LastASCII;\r
+               ScanCode        LastScan;\r
+\r
+               KeyboardDef     KbdDefs[] = {0x1d,0x38,0x47,0x48,0x49,0x4b,0x4d,0x4f,0x50,0x51};\r
+               JoystickDef     JoyDefs[MaxJoys];\r
+               ControlType     Controls[MaxPlayers];\r
+\r
+               dword   MouseDownCount;
+\r
 #ifdef DEMO0\r
-extern Demo            DemoMode;\r
-extern byte __segment  *DemoBuffer;\r
-extern word            DemoOffset,DemoSize;\r
+               Demo            DemoMode = demo_Off;\r
+               byte /*_seg*/   *DemoBuffer;\r
+               word            DemoOffset,DemoSize;
 #endif
+
+
+
+/*\r
+=============================================================================\r
+\r
+                                       LOCAL VARIABLES\r
+\r
+=============================================================================\r
+*/\r
+static byte        far ASCIINames[] =          // Unshifted ASCII for scan codes\r
+                                       {\r
+//      0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F\r
+       0  ,27 ,'1','2','3','4','5','6','7','8','9','0','-','=',8  ,9  ,        // 0\r
+       'q','w','e','r','t','y','u','i','o','p','[',']',13 ,0  ,'a','s',        // 1\r
+       'd','f','g','h','j','k','l',';',39 ,'`',0  ,92 ,'z','x','c','v',        // 2\r
+       'b','n','m',',','.','/',0  ,'*',0  ,' ',0  ,0  ,0  ,0  ,0  ,0  ,        // 3\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,'7','8','9','-','4','5','6','+','1',        // 4\r
+       '2','3','0',127,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 5\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 6\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0           // 7\r
+                                       },\r
+                                       far ShiftNames[] =              // Shifted ASCII for scan codes\r
+                                       {\r
+//      0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F\r
+       0  ,27 ,'!','@','#','$','%','^','&','*','(',')','_','+',8  ,9  ,        // 0\r
+       'Q','W','E','R','T','Y','U','I','O','P','{','}',13 ,0  ,'A','S',        // 1\r
+       'D','F','G','H','J','K','L',':',34 ,'~',0  ,'|','Z','X','C','V',        // 2\r
+       'B','N','M','<','>','?',0  ,'*',0  ,' ',0  ,0  ,0  ,0  ,0  ,0  ,        // 3\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,'7','8','9','-','4','5','6','+','1',        // 4\r
+       '2','3','0',127,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 5\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 6\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0           // 7\r
+                                       },\r
+                                       far SpecialNames[] =    // ASCII for 0xe0 prefixed codes\r
+                                       {\r
+//      0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 0\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,13 ,0  ,0  ,0  ,        // 1\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 2\r
+       0  ,0  ,0  ,0  ,0  ,'/',0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 3\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 4\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 5\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,        // 6\r
+       0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0           // 7\r
+                                       };\r
+\r
+\r
+static boolean         IN_Started;\r
+static boolean         CapsLock;\r
+static ScanCode        CurCode,LastCode;\r
+\r
+static Direction       DirTable[] =            // Quick lookup for total direction\r
+                                       {\r
+                                               dir_NorthWest,  dir_North,      dir_NorthEast,\r
+                                               dir_West,               dir_None,       dir_East,\r
+                                               dir_SouthWest,  dir_South,      dir_SouthEast\r
+                                       };\r
+\r
+static void                    (*INL_KeyHook)(void);\r
+static void interrupt  (*OldKeyVect)(void);\r
+\r
+static char                    *ParmStrings[] = {"nojoys","nomouse",nil};\r
 \r
 // Function prototypes\r
 #define        IN_KeyDown(code)        (Keyboard[(code)])\r
similarity index 100%
rename from 16/cawat/16_us.h
rename to src/lib/16_us.h
index 3d5355d..2ff4819 100644 (file)
 #define KEY_MENU               (0x75)
 */
 
-//#define      FARPTR(S, O)    MK_FP(S, O)\r
-\r
-//#define      inportb(P)      inp(P)\r
-//#define      outportb(P,V)   outp(P,V)\r
-//#define      outportw(P,V)   outpw(P,V)\r
-\r
-//#define      R_AX            w.ax\r
-//#define      R_BX            w.bx\r
-//#define      R_BP            w.bp\r
-//#define      R_ES            w.es\r
-\r
-/* WARNING: for 32-bit code, unused fields of regs_t\r
-must be zeroed before using this macro */\r
-//#define      trap(N,R)       intr(N,R)\r
+#define        nil     ((void *)0)
+
+dword far* clockdw= (dword far*) 0x046C; /* 18.2hz clock */
+
+#define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs)))\r
+#define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs)))\r
+#define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value))\r
+#define pokew(segm,ofs,value) (peekw((segm),(ofs)) = (word)(value))\r
 
 typedef union REGPACK  regs_t;
 typedef        enum    {false,true}    boolean;
@@ -144,7 +138,4 @@ void* AllocateLargestFreeBlock(size_t* Size);
 size_t GetFreeSize(void);
 long int filesize(FILE *fp);
 
-/* THIS FUNCTION CONVERTS A POINTER TO AN INTEL LONG              */\r
-//int long ptr2long(char *p);
-
 #endif/*_LIBHEAD_H_*/
index 6097e1d..122bcab 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 6cda8f0..cea7c7d 100644 (file)
Binary files a/test2.exe and b/test2.exe differ