Import backup from 2004-05-21
This commit is contained in:
1 parent
38f009f2ca
commit
6b6e19effd
42 files changed
+251
-1669
No files matched your search
@@ -26,8 +26,8 @@ byte ackReason = 0; //used to record the reason why we would get an acknowledge
|
||||
|
||||
//these arrays convert a keyboard scan code to an ASCII character value
|
||||
//nul esc bksp tab lctl lsft rsft lalt caps F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 numScrlNumPad------- unknown---- F11 F12 unknown....
|
||||
const byte SCAN2ASCII[128] = "\000\0331234567890-=\010\011qwertyuiop[]\n\001asdfghjkl;'`\001\\zxcvbnm,./\001*\001 \001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001-\001\001\001+\001\001\001\001\001\002\002\002\001\001\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002";
|
||||
const byte SCAN2ASCIISHIFT[128] = "\000\033!@#$%^&*()_+\010\011QWERTYUIOP{}\n\001ASDFGHJKL:\"~\001|ZXCVBNM<>?\001*\001 \001\001\001\001\001\001\001\001\001\001\001\001\001789-456+1230.\002\002\002\001\001\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002";
|
||||
const byte SCAN2ASCII[129] = "\000\0331234567890-=\010\011qwertyuiop[]\n\001asdfghjkl;'`\001\\zxcvbnm,./\001*\001 \001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001-\001\001\001+\001\001\001\001\001\002\002\002\001\001\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002";
|
||||
const byte SCAN2ASCIISHIFT[129] = "\000\033!@#$%^&*()_+\010\011QWERTYUIOP{}\n\001ASDFGHJKL:\"~\001|ZXCVBNM<>?\001*\001 \001\001\001\001\001\001\001\001\001\001\001\001\001789-456+1230.\002\002\002\001\001\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002";
|
||||
|
||||
//====FUNCTIONS:
|
||||
// The Keyboard Interrupt Service Routine
|
||||
@@ -1,6 +1,7 @@
|
||||
// mouse.c
|
||||
// 10/03/03
|
||||
// Author: Josh Holtrop
|
||||
// Date: 10/03/03
|
||||
// Modified: 05/21/04
|
||||
|
||||
#include "mouse.h"
|
||||
#include "hos_defines.h"
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
int mouse_x;
|
||||
int mouse_y;
|
||||
int mouse_bytesRead = 0;
|
||||
int mouse_bytesRead;
|
||||
byte mouse_inbuffer[MOUSE_BUFFER_LENGTH];
|
||||
|
||||
//This method initializes the ps/2 mouse
|
||||
@@ -29,6 +30,8 @@ void mouse_init()
|
||||
|
||||
mouse_x = video_getWidth() >> 1;
|
||||
mouse_y = video_getHeight() >> 1;
|
||||
|
||||
mouse_bytesRead = 0;
|
||||
|
||||
//outportb(0x64, 0xD4);
|
||||
//outportb(0x60, 0xE7); //scaling 2:1
|
||||
@@ -59,7 +62,7 @@ void isr_mouse()
|
||||
if (mouse_y >= video_getHeight())
|
||||
mouse_y = video_getHeight() - 1;
|
||||
if (mouse_inbuffer[0] & 0x01) //left button
|
||||
video_pset(mouse_x, mouse_y, 0x00FF8800);
|
||||
video_pset(mouse_x, mouse_y, 0x00FF9900);
|
||||
else
|
||||
video_pset(mouse_x, mouse_y, 0x00FFFFFF);
|
||||
}
|
||||
Reference in new issue
Block a user