Permalink
Browse files

GitHub for Mac: Throw-away commit.

  • Loading branch information...
1 parent 80b28e7 commit 7f332ced9b1e082b24223cd45ffff36111a9e447 @alunbestor committed Apr 15, 2012
View
6 Boxer.xcodeproj/project.pbxproj
@@ -290,6 +290,7 @@
9F9A4CA610F67DD800E61965 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9F9A4CA410F67DD800E61965 /* Preferences.xib */; };
9F9A4CA910F6824B00E61965 /* BXFilterGallery.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9A4CA810F6824B00E61965 /* BXFilterGallery.m */; };
9F9AEE8914CB4AEA00728641 /* BXAppKitVersionHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9AEE8814CB4AEA00728641 /* BXAppKitVersionHelpers.m */; };
+ 9F9DF415153B058200233968 /* BXKeyBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F9DF414153B058200233968 /* BXKeyBuffer.mm */; };
9F9E27C511F8C003003EE8F3 /* BXThemedSegmentedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9E27C411F8C003003EE8F3 /* BXThemedSegmentedCell.m */; };
9F9E27D611F8C173003EE8F3 /* BXDrivePanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9E27D511F8C173003EE8F3 /* BXDrivePanelController.m */; };
9F9FE70410FA5F5800E3944B /* NSWorkspace+BXIcons.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9FE70310FA5F5800E3944B /* NSWorkspace+BXIcons.m */; };
@@ -996,6 +997,8 @@
9F9A4CA810F6824B00E61965 /* BXFilterGallery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BXFilterGallery.m; sourceTree = "<group>"; };
9F9AEE8714CB4AEA00728641 /* BXAppKitVersionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXAppKitVersionHelpers.h; sourceTree = "<group>"; };
9F9AEE8814CB4AEA00728641 /* BXAppKitVersionHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BXAppKitVersionHelpers.m; sourceTree = "<group>"; };
+ 9F9DF413153B058200233968 /* BXKeyBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXKeyBuffer.h; sourceTree = "<group>"; };
+ 9F9DF414153B058200233968 /* BXKeyBuffer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BXKeyBuffer.mm; sourceTree = "<group>"; };
9F9E27C311F8C003003EE8F3 /* BXThemedSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXThemedSegmentedCell.h; sourceTree = "<group>"; };
9F9E27C411F8C003003EE8F3 /* BXThemedSegmentedCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BXThemedSegmentedCell.m; sourceTree = "<group>"; };
9F9E27D411F8C173003EE8F3 /* BXDrivePanelController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BXDrivePanelController.h; sourceTree = "<group>"; };
@@ -1543,6 +1546,8 @@
9F34BE3E142B700100A69FAF /* BXCoalfaceAudio.mm */,
9F3E57A313F694B40070A14D /* BXEmulatorErrors.h */,
9F3E57A413F694B40070A14D /* BXEmulatorErrors.m */,
+ 9F9DF413153B058200233968 /* BXKeyBuffer.h */,
+ 9F9DF414153B058200233968 /* BXKeyBuffer.mm */,
);
comments = "The sourcefiles in this group interface directly with DOSBox's internals. For this reason, they need to be compiled as Objective C++ rather than Objective C.";
name = Emulator;
@@ -3176,6 +3181,7 @@
9F8F374F14F9442D00E482FB /* BXAppController+BXHotKeys.m in Sources */,
9F1DE9B214FB7F3800F9C91E /* NSObject+BXPerformExtensions.m in Sources */,
9FD8BEE414FFF7660073B4EC /* BXExternalMIDIDevice+BXGeneralMIDISysexes.m in Sources */,
+ 9F9DF415153B058200233968 /* BXKeyBuffer.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
9 Boxer/BXCoalface.h
@@ -111,6 +111,15 @@ extern "C" {
//Called from dos_keyboard_layout.cpp: provides the current OS X keyboard layout as a DOSBox layout code.
const char * boxer_preferredKeyboardLayout();
+ //Returns how many BIOS keycodes Boxer has stored in its internal key buffer.
+ Bitu boxer_numKeyCodesInPasteBuffer();
+
+ //Populates outKeyCode with the next keycode from Boxer's internal key buffer if available.
+ //Returns true if a key code was retrieved, or false otherwise.
+ //If consumeKey is true, the key will be removed from the buffer as it is read.
+ bool boxer_getNextKeyCodeInPasteBuffer(Bit16u *outKeyCode, bool consumeKey);
+
+
void boxer_log(char const* format,...);
void boxer_die(char const *functionName, char const *fileName, int lineNumber, char const* format,...);
View
20 Boxer/BXCoalface.mm
@@ -266,6 +266,26 @@ void boxer_didRemoveLocalFile(const char *path, DOS_Drive *dosboxDrive)
else return NULL;
}
+Bitu boxer_numKeyCodesInPasteBuffer()
+{
+ BXEmulator *emulator = [BXEmulator currentEmulator];
+ return emulator.keyBuffer.count;
+}
+
+bool boxer_getNextKeyCodeInPasteBuffer(Bit16u *outKeyCode, bool consumeKey)
+{
+ BXEmulator *emulator = [BXEmulator currentEmulator];
+
+ UInt16 keyCode = (consumeKey) ? emulator.keyBuffer.nextKey : emulator.keyBuffer.currentKey;
+ if (keyCode != BXNoKey)
+ {
+ *outKeyCode = keyCode;
+ return true;
+ }
+ else return false;
+}
+
+
void boxer_setMouseActive(bool mouseActive)
{
BXEmulator *emulator = [BXEmulator currentEmulator];
View
6 Boxer/BXEmulator+BXPaste.h
@@ -11,6 +11,12 @@
@interface BXEmulator (BXPaste)
+//Returns whether there is any pasted text that hasn't yet been consumed by the DOS process.
+- (BOOL) hasPendingPaste;
+
+//Clear any pasted text that hasn't yet been consumed by the DOS process.
+- (void) cancelPaste;
+
//Accepts a string of characters, and deals with how best to paste it into DOS.
//Returns YES if the string was handled, NO otherwise.
- (BOOL) handlePastedString: (NSString *)pastedString;
View
18 Boxer/BXEmulator+BXPaste.mm
@@ -8,11 +8,28 @@
#import "BXEmulator+BXPaste.h"
#import "BXEmulatedKeyboard.h"
+#import "BXKeyBuffer.h"
@implementation BXEmulator (BXPaste)
+- (BOOL) hasPendingPaste
+{
+ return (self.keyBuffer.count > 0);
+ //return self.keyboard.isTyping;
+}
+
+- (void) cancelPaste
+{
+ [self.keyBuffer empty];
+ //[self.keyboard cancelTyping];
+}
+
- (BOOL) handlePastedString: (NSString *)pastedString
{
+ [self.keyBuffer addKeysForCharacters: pastedString];
+ return YES;
+
+ /*
//While we're at the DOS prompt, we can use a more streamlined method for pasting text.
if ([self isAtPrompt])
{
@@ -39,6 +56,7 @@ - (BOOL) handlePastedString: (NSString *)pastedString
[[self keyboard] typeCharacters: pastedString];
}
return YES;
+ */
}
- (BOOL) canAcceptPastedString: (NSString *)pastedString
View
6 Boxer/BXEmulator.h
@@ -63,6 +63,7 @@ extern NSString * const shellProcessPath;
@class BXVideoHandler;
@class BXEmulatedKeyboard;
@class BXEmulatedMouse;
+@class BXKeyBuffer;
@protocol BXEmulatedJoystick;
@protocol BXEmulatorDelegate;
@@ -79,7 +80,6 @@ extern NSString * const shellProcessPath;
BXEmulatedMouse *mouse;
id <BXEmulatedJoystick> joystick;
-
BOOL joystickActive;
float masterVolume;
@@ -110,6 +110,7 @@ extern NSString * const shellProcessPath;
//The queue of commands we are waiting to execute at the DOS prompt.
//Managed by BXShell.
NSMutableArray *commandQueue;
+ BXKeyBuffer *_keyBuffer;
//Managed by BXAudio.
id <BXMIDIDevice> activeMIDIDevice;
@@ -130,6 +131,9 @@ extern NSString * const shellProcessPath;
@property (readonly, retain) BXEmulatedMouse *mouse; //Our emulated mouse.
@property (retain) id <BXEmulatedJoystick> joystick; //Our emulated joystick. Initially empty.
+//The keybuffer we use for pasting text into DOS.
+@property (readonly, retain) BXKeyBuffer *keyBuffer;
+
//The OS X filesystem path to which the emulator should resolve relative local filesystem paths.
//This is used by DOSBox commands like MOUNT, IMGMOUNT and CONFIG, and is directly equivalent
//to the current process's working directory.
View
4 Boxer/BXEmulator.mm
@@ -97,6 +97,7 @@ @implementation BXEmulator
@synthesize activeMIDIDevice, requestedMIDIDeviceDescription, autodetectsMT32;
@synthesize masterVolume;
+@synthesize keyBuffer = _keyBuffer;
#pragma mark -
@@ -178,6 +179,8 @@ - (id) init
self.videoHandler = [[[BXVideoHandler alloc] init] autorelease];
self.videoHandler.emulator = self;
+
+ self.keyBuffer = [[[BXKeyBuffer alloc] init] autorelease];
}
return self;
}
@@ -192,6 +195,7 @@ - (void) dealloc
self.mouse = nil;
self.joystick = nil;
self.videoHandler = nil;
+ self.keyBuffer = nil;
[driveCache release], driveCache = nil;
[commandQueue release], commandQueue = nil;
View
13 Boxer/BXEmulatorKeyBuffer.m
@@ -0,0 +1,13 @@
+//
+// BXEmulatorPasteBuffer.m
+// Boxer
+//
+// Created by Alun Bestor on 15/04/2012.
+// Copyright (c) 2012 Alun Bestor and contributors. All rights reserved.
+//
+
+#import "BXEmulatorPasteBuffer.h"
+
+@implementation BXEmulatorPasteBuffer
+
+@end
View
2 Boxer/BXEmulatorPrivate.h
@@ -20,6 +20,7 @@
#import "BXEmulatedKeyboard.h"
#import "BXEmulatedJoystick.h"
#import "BXEmulatedMouse.h"
+#import "BXKeyBuffer.h"
#import "BXAudioSource.h"
#import "BXCoalfaceAudio.h"
@@ -103,6 +104,7 @@ enum {
@property (readwrite, retain) BXVideoHandler *videoHandler;
@property (readwrite, retain) BXEmulatedKeyboard *keyboard;
@property (readwrite, retain) BXEmulatedMouse *mouse;
+@property (readwrite, retain) BXKeyBuffer *keyBuffer;
@end
View
11 Boxer/BXInputController+BXKeyboardInput.m
@@ -9,6 +9,7 @@
#import "BXEventConstants.h"
#import "BXDOSWindow.h"
#import "BXBezelController.h"
+#import "BXEmulator+BXPaste.h"
//For keycodes and input source methods
#import <Carbon/Carbon.h>
@@ -80,14 +81,16 @@ - (void) keyDown: (NSEvent *)theEvent
//Conditional behaviour for the ESC key:
if ([theEvent.charactersIgnoringModifiers isEqualToString: @"\e"])
{
- //Pressing ESC while text is being typed in (e.g. via a paste) will cancel the typing.
- if (self._emulatedKeyboard.isTyping)
+ BXEmulator *emulator = self.representedObject.emulator;
+
+ //Pressing ESC while text is being pasted will clear any remaining pasted text.
+ if (emulator.hasPendingPaste)
{
- [self._emulatedKeyboard cancelTyping];
+ [emulator cancelPaste];
return;
}
//Pressing ESC while in fullscreen mode and not running a program, will exit fullscreen mode.
- else if (self._windowController.window.isFullScreen && self.representedObject.emulator.isAtPrompt)
+ else if (self._windowController.window.isFullScreen && emulator.isAtPrompt)
{
[NSApp sendAction: @selector(exitFullScreen:) to: nil from: self];
return;
View
46 Boxer/BXKeyBuffer.h
@@ -0,0 +1,46 @@
+/*
+ Boxer is copyright 2011 Alun Bestor and contributors.
+ Boxer is released under the GNU General Public License 2.0. A full copy of this license can be
+ found in this XCode project at Resources/English.lproj/BoxerHelp/pages/legalese.html, or read
+ online at [http://www.gnu.org/licenses/gpl-2.0.txt].
+ */
+
+//BXKeyBuffer implements a circular buffer used for entering characters directly to DOS,
+//bypassing the keyboard mapper and BIOS keyboard handling.
+
+#import <Foundation/Foundation.h>
+
+#define BXKeyBufferSize 16384
+#define BXNoKey 0
+
+@interface BXKeyBuffer : NSObject
+{
+ UInt16 _keyCodes[BXKeyBufferSize];
+ NSUInteger _readIndex;
+ NSUInteger _addIndex;
+}
+
+//The number of keys currently in the buffer.
+@property (readonly) NSUInteger count;
+
+//Returns the BIOS-level keycode that best matches the specified unicode character.
+//Returns BXNoKey if there is no suitable match.
++ (UInt16) BIOSKeyCodeForCharacter: (unichar)character;
+
+//Adds the specified keycode/characters to the end of the buffer.
+//Returns YES if the key was added, or NO if the buffer is full.
+- (BOOL) addKeyForBIOSKeyCode: (UInt16)key;
+- (BOOL) addKeysForCharacters: (NSString *)characters;
+
+//Returns the next available key in the buffer, without advancing the buffer.
+//Returns BXNoKey if the buffer is empty.
+- (UInt16) currentKey;
+
+//Returns the next available key in the buffer and advances the buffer to consume the key.
+//Returns BXNoKey if the buffer is empty.
+- (UInt16) nextKey;
+
+//Empties the key buffer.
+- (void) empty;
+
+@end
View
247 Boxer/BXKeyBuffer.mm
@@ -0,0 +1,247 @@
+/*
+ Boxer is copyright 2011 Alun Bestor and contributors.
+ Boxer is released under the GNU General Public License 2.0. A full copy of this license can be
+ found in this XCode project at Resources/English.lproj/BoxerHelp/pages/legalese.html, or read
+ online at [http://www.gnu.org/licenses/gpl-2.0.txt].
+ */
+
+#import "BXKeyBuffer.h"
+#import "BXCoalface.h"
+#import "dosbox.h"
+#import "bios.h"
+#import "pic.h"
+
+//For unicode constants
+#import <Cocoa/Cocoa.h>
+
+@implementation BXKeyBuffer
+
++ (UInt16) BIOSKeyCodeForCharacter: (unichar)character
+{
+ switch (character)
+ {
+ //UNSHIFTED KEYS
+ case NSF1FunctionKey: return 0x3b00;
+ case NSF2FunctionKey: return 0x3c00;
+ case NSF3FunctionKey: return 0x3d00;
+ case NSF4FunctionKey: return 0x3e00;
+ case NSF5FunctionKey: return 0x3f00;
+ case NSF6FunctionKey: return 0x4000;
+ case NSF7FunctionKey: return 0x4100;
+ case NSF8FunctionKey: return 0x4200;
+ case NSF9FunctionKey: return 0x4300;
+ case NSF10FunctionKey: return 0x4400;
+ case NSF11FunctionKey: return 0x8500;
+ case NSF12FunctionKey: return 0x8600;
+
+ case '1': return 0x0231;
+ case '2': return 0x0332;
+ case '3': return 0x0433;
+ case '4': return 0x0534;
+ case '5': return 0x0635;
+ case '6': return 0x0736;
+ case '7': return 0x0837;
+ case '8': return 0x0938;
+ case '9': return 0x0a39;
+ case '0': return 0x0b30;
+
+ case NSPrintScreenFunctionKey: return BXNoKey;
+ case NSScrollLockFunctionKey: return BXNoKey;
+ case NSPauseFunctionKey: return BXNoKey;
+
+ case 'q': return 0x1071;
+ case 'w': return 0x1177;
+ case 'e': return 0x1265;
+ case 'r': return 0x1372;
+ case 't': return 0x1474;
+ case 'y': return 0x1579;
+ case 'u': return 0x1675;
+ case 'i': return 0x1769;
+ case 'o': return 0x186f;
+ case 'p': return 0x1970;
+
+ case 'a': return 0x1e61;
+ case 's': return 0x1f73;
+ case 'd': return 0x2064;
+ case 'f': return 0x2166;
+ case 'g': return 0x2267;
+ case 'h': return 0x2368;
+ case 'j': return 0x246a;
+ case 'k': return 0x256b;
+ case 'l': return 0x266c;
+
+ case 'z': return 0x2c7a;
+ case 'x': return 0x2d78;
+ case 'c': return 0x2e63;
+ case 'v': return 0x2f76;
+ case 'b': return 0x3062;
+ case 'n': return 0x316e;
+ case 'm': return 0x326d;
+
+ case '\e': return 0x011b;
+ case '\t': return 0x0f09;
+
+ case NSBackspaceCharacter: return 0x0e08;
+
+ case NSDeleteCharacter: return 0x5300;
+ case NSDeleteFunctionKey: return 0x5300;
+ case NSInsertFunctionKey: return 0x5200;
+ case NSEnterCharacter: return 0x1c0d;
+ //IMPLEMENTATION NOTE: we should sanitise /r/n pairs into /n
+ case NSNewlineCharacter: return 0x1c0d;
+ case ' ': return 0x3920;
+
+ case NSHomeFunctionKey: return 0x4700;
+ case NSEndFunctionKey: return 0x4f00;
+ case NSPageUpFunctionKey: return 0x4900;
+ case NSPageDownFunctionKey: return 0x5100;
+
+ case NSUpArrowFunctionKey: return 0x4800;
+ case NSLeftArrowFunctionKey: return 0x4b00;
+ case NSDownArrowFunctionKey: return 0x5000;
+ case NSRightArrowFunctionKey: return 0x4d00;
+
+ case '-': return 0x0c2d;
+ case '=': return 0x0d3d;
+
+ case '[': return 0x1a5b;
+ case ']': return 0x1b5d;
+ case '\\': return 0x2b5c;
+
+ case '`': return 0x2960;
+ case ';': return 0x273b;
+ case '\'': return 0x2827;
+ case ',': return 0x332c;
+ case '.': return 0x342e;
+ case '/': return 0x352f;
+
+ //SHIFTED KEYS
+
+ case '!': return 0x0221;
+ case '@': return 0x0340;
+ case '#': return 0x0423;
+ case '$': return 0x0524;
+ case '%': return 0x0625;
+ case '^': return 0x075e;
+ case '&': return 0x0826;
+ case '*': return 0x092a;
+ case '(': return 0x0a28;
+ case ')': return 0x0b29;
+
+ case 'Q': return 0x1051;
+ case 'W': return 0x1157;
+ case 'E': return 0x1245;
+ case 'R': return 0x1352;
+ case 'T': return 0x1454;
+ case 'Y': return 0x1559;
+ case 'U': return 0x1655;
+ case 'I': return 0x1749;
+ case 'O': return 0x184f;
+ case 'P': return 0x1950;
+
+ case 'A': return 0x1e41;
+ case 'S': return 0x1f53;
+ case 'D': return 0x2044;
+ case 'F': return 0x2146;
+ case 'G': return 0x2247;
+ case 'H': return 0x2348;
+ case 'J': return 0x244a;
+ case 'K': return 0x254b;
+ case 'L': return 0x264c;
+
+ case 'Z': return 0x2c5a;
+ case 'X': return 0x2d58;
+ case 'C': return 0x2e43;
+ case 'V': return 0x2f56;
+ case 'B': return 0x3042;
+ case 'N': return 0x314e;
+ case 'M': return 0x324d;
+
+ case '_': return 0x0c5f;
+ case '+': return 0x0d2b;
+
+ case '{': return 0x1a7b;
+ case '}': return 0x1b7d;
+ case '|': return 0x2b7c;
+
+ case '~': return 0x297e;
+ case ':': return 0x273a;
+ case '"': return 0x2822;
+ case '<': return 0x333c;
+ case '>': return 0x343e;
+ case '?': return 0x353f;
+
+ default:
+ return BXNoKey;
+ }
+}
+
+- (BOOL) addKeysForCharacters: (NSString *)characters
+{
+ NSUInteger i, keysAdded = 0, numChars = characters.length;
+
+ for (i=0; i < numChars; i++)
+ {
+ unichar character = [characters characterAtIndex: i];
+ UInt16 keyCode = [[self class] BIOSKeyCodeForCharacter: character];
+ if (keyCode != BXNoKey)
+ {
+ BOOL keyWasAdded = [self addKeyForBIOSKeyCode: keyCode];
+ if (keyWasAdded) keysAdded++;
+ }
+ }
+ return (keysAdded > 0);
+}
+
+- (BOOL) addKeyForBIOSKeyCode: (UInt16)key
+{
+ NSAssert(key != BXNoKey, @"Unrecognised key passed to addKeyForBIOSKeyCode:.");
+
+ BIOS_AddKeyToBuffer(key);
+
+ if (machine==MCH_PCJR) PIC_ActivateIRQ(6);
+ else PIC_ActivateIRQ(1);
+ return YES;
+
+ NSUInteger nextAddIndex = (_addIndex + 1) % BXKeyBufferSize;
+
+ if (nextAddIndex != _readIndex)
+ {
+ _keyCodes[_addIndex] = key;
+ _addIndex = nextAddIndex;
+ return YES;
+ }
+ //Out of room :(
+ else return NO;
+}
+
+- (UInt16) currentKey
+{
+ //Buffer is empty
+ if (_addIndex == _readIndex)
+ return BXNoKey;
+
+ return _keyCodes[_readIndex];
+}
+
+- (UInt16) nextKey
+{
+ UInt16 key = self.currentKey;
+ if (_readIndex != _addIndex)
+ {
+ _readIndex = (_readIndex + 1) % BXKeyBufferSize;
+ }
+ return key;
+}
+
+- (void) empty
+{
+ _readIndex = _addIndex;
+}
+
+- (NSUInteger) count
+{
+ return (_addIndex - _readIndex) % BXKeyBufferSize;
+}
+
+@end
View
5 DOSBox/src/dos/dev_con.h
@@ -379,6 +379,11 @@ bool device_CON::Close() {
}
Bit16u device_CON::GetInformation(void) {
+ //--Added 2012-04-15 by Alun Bestor to let Boxer inject key codes into the console.
+ if (boxer_numKeyCodesInPasteBuffer())
+ return 0x8093;
+ //--End of modifications.
+
Bit16u head=mem_readw(BIOS_KEYBOARD_BUFFER_HEAD);
Bit16u tail=mem_readw(BIOS_KEYBOARD_BUFFER_TAIL);
View
12 DOSBox/src/ints/bios_keyboard.cpp
@@ -169,6 +169,11 @@ static void add_key(Bit16u code) {
}
static bool get_key(Bit16u &code) {
+ //--Added 2012-04-15 to let Boxer insert its own keys
+ if (boxer_getNextKeyCodeInPasteBuffer(&code, true))
+ return true;
+ //--End of modifications
+
Bit16u start,end,head,tail,thead;
if (machine==MCH_PCJR) {
/* should be done for cga and others as well, to be tested */
@@ -186,10 +191,16 @@ static bool get_key(Bit16u &code) {
if (thead>=end) thead=start;
mem_writew(BIOS_KEYBOARD_BUFFER_HEAD,thead);
code = real_readw(0x40,head);
+
return true;
}
static bool check_key(Bit16u &code) {
+ //--Added 2012-04-15 to let Boxer insert its own keys
+ if (boxer_getNextKeyCodeInPasteBuffer(&code, false))
+ return true;
+ //--End of modifications
+
Bit16u head,tail;
head =mem_readw(BIOS_KEYBOARD_BUFFER_HEAD);
tail =mem_readw(BIOS_KEYBOARD_BUFFER_TAIL);
@@ -233,6 +244,7 @@ static bool check_key(Bit16u &code) {
/* the scancode is in reg_al */
static Bitu IRQ1_Handler(void) {
+ printf("IRQ1 BABY\n");
/* handling of the locks key is difficult as sdl only gives
* states for numlock capslock.
*/

0 comments on commit 7f332ce

Please sign in to comment.