PEC-586 russian keyboard support

some fixes to subor keyboard layot (anyway, unused currently, todo: reckeck key mapping)
This commit is contained in:
CaH4e3 2014-01-12 14:53:50 +00:00
parent cd3590d3de
commit 5d149f95d2
13 changed files with 515 additions and 408 deletions

1
trunk/src/drivers/win/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/res.aps

View File

@ -1,22 +1,22 @@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2002 Xodnizel
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*
* Copyright notice for this file:
* Copyright (C) 2002 Xodnizel
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
// For commctrl.h below
#define _WIN32_IE 0x0550
@ -376,7 +376,7 @@ static uint32 UpdatePPadData(int w)
static uint8 fkbkeys[0x48];
static uint8 suborkbkeys[0x60];
static uint8 suborkbkeys[0x65];
void KeyboardUpdateState(void); //mbg merge 7/17/06 yech had to add this
@ -421,6 +421,7 @@ void FCEUD_UpdateInput()
if(cidisabled)
UpdateFKB();
break;
case SIFC_PEC586KB:
case SIFC_SUBORKB:
if(cidisabled)
UpdateSuborKB();
@ -510,6 +511,7 @@ void InitInputPorts(bool fourscore)
case SIFC_FKB:
InputDPtr=fkbkeys;
break;
case SIFC_PEC586KB:
case SIFC_SUBORKB:
InputDPtr=suborkbkeys;
break;
@ -554,7 +556,7 @@ ButtConfig fkbmap[0x48]=
MK(BL_CURSORUP),MK(BL_CURSORLEFT),MK(BL_CURSORRIGHT),MK(BL_CURSORDOWN)
};
ButtConfig suborkbmap[0x60]=
ButtConfig suborkbmap[0x65]=
{
MC(0x01),MC(0x3b),MC(0x3c),MC(0x3d),MC(0x3e),MC(0x3f),MC(0x40),MC(0x41),MC(0x42),MC(0x43),
MC(0x44),MC(0x57),MC(0x58),MC(0x45),MC(0x29),MC(0x02),MC(0x03),MC(0x04),MC(0x05),MC(0x06),
@ -565,7 +567,8 @@ ButtConfig suborkbmap[0x60]=
MC(0x21),MC(0x22),MC(0x23),MC(0x24),MC(0x25),MC(0x26),MC(0x27),MC(0x28),MC(0x4b),MC(0x4c),
MC(0x4d),MC(0x2a),MC(0x2c),MC(0x2d),MC(0x2e),MC(0x2f),MC(0x30),MC(0x31),MC(0x32),MC(0x33),
MC(0x34),MC(0x35),MC(0x2b),MC(0xc8),MC(0x4f),MC(0x50),MC(0x51),MC(0x1d),MC(0x38),MC(0x39),
MC(0xcb),MC(0xd0),MC(0xcd),MC(0x52),MC(0x53)
MC(0xcb),MC(0xd0),MC(0xcd),MC(0x52),MC(0x53),MC(0x00),MC(0x00),MC(0x00),MC(0x00),MC(0x00),
MC(0x00),
};
@ -573,7 +576,7 @@ static void UpdateFKB(void)
{
int x;
for(x=0;x<0x48;x++)
for(x=0;x<sizeof(fkbkeys);x++)
{
fkbkeys[x]=0;
@ -586,7 +589,7 @@ static void UpdateSuborKB(void)
{
int x;
for(x=0;x<0x60;x++)
for(x=0;x<sizeof(suborkbkeys);x++)
{
suborkbkeys[x]=0;
@ -718,9 +721,9 @@ void InitInputStuff(void)
for(y=0; y<12; y++)
JoyClearBC(&powerpadsc[x][y]);
for(x=0; x<0x48; x++)
for(x=0; x<sizeof(fkbkeys); x++)
JoyClearBC(&fkbmap[x]);
for(x=0; x<0x60; x++)
for(x=0; x<sizeof(suborkbkeys); x++)
JoyClearBC(&suborkbmap[x]);
for(x=0; x<6; x++)
@ -1062,7 +1065,7 @@ const unsigned int NUMBER_OF_NES_DEVICES = SI_COUNT + 1;
const static unsigned int NUMBER_OF_FAMICOM_DEVICES = SIFC_COUNT + 1;
//these are unfortunate lists. they match the ESI and ESIFC enums
static const int configurable_nes[NUMBER_OF_NES_DEVICES]= { 0, 1, 0, 1, 1, 0 };
static const int configurable_fam[NUMBER_OF_FAMICOM_DEVICES]= { 0,0,0,0, 1,1,0,1, 1,1,1,0, 0,0 };
static const int configurable_fam[NUMBER_OF_FAMICOM_DEVICES]= { 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0 };
const unsigned int FAMICOM_POSITION = 2;
static void UpdateComboPad(HWND hwndDlg, WORD id)
@ -1336,10 +1339,11 @@ BOOL CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
DoTBConfig(hwndDlg, text, "POWERPADDIALOG", FTrainerButtons, 12);
break;
case SIFC_FKB:
DoTBConfig(hwndDlg, text, "FKBDIALOG", fkbmap, 0x48);
DoTBConfig(hwndDlg, text, "FKBDIALOG", fkbmap, sizeof(fkbkeys));
break;
case SIFC_PEC586KB:
case SIFC_SUBORKB:
DoTBConfig(hwndDlg, text, "SUBORKBDIALOG", suborkbmap, 0x60);
DoTBConfig(hwndDlg, text, "SUBORKBDIALOG", suborkbmap, sizeof(suborkbkeys));
break;
case SIFC_MAHJONG:
DoTBConfig(hwndDlg, text, "MAHJONGDIALOG", MahjongButtons, 21);

View File

@ -12,7 +12,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Íåéòðàëüíûé resources
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
@ -952,17 +952,17 @@ END
SUBORKBDIALOG DIALOGEX 13, 72, 478, 171
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Family Keyboard Configuration"
CAPTION "Subor Keyboard Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "Close",1,405,151,56,14
LTEXT "Remember to push the ""Scroll Lock"" key during emulation to enable Family Keyboard input.",-1,18,6,370,12
LTEXT "Remember to push the ""Scroll Lock"" key during emulation to enable Keyboard input.",-1,18,6,370,12
GROUPBOX "",-1,9,22,461,123,WS_GROUP
PUSHBUTTON "Esc",300,20,36,16,12
PUSHBUTTON "F1",301,57,37,16,12
PUSHBUTTON "F2",302,77,37,16,12
PUSHBUTTON "F3",303,97,37,16,12
PUSHBUTTON "F4",304,117,37,16,12
PUSHBUTTON "F1",301,58,37,16,12
PUSHBUTTON "F2",302,78,37,16,12
PUSHBUTTON "F3",303,98,37,16,12
PUSHBUTTON "F4",304,118,37,16,12
PUSHBUTTON "F5",305,143,37,16,12
PUSHBUTTON "F6",306,163,37,16,12
PUSHBUTTON "F7",307,183,37,16,12
@ -971,21 +971,21 @@ BEGIN
PUSHBUTTON "F10",310,249,37,16,12
PUSHBUTTON "F11",311,268,37,16,12
PUSHBUTTON "F12",312,288,37,16,12
PUSHBUTTON "Pause",313,333,36,24,12
PUSHBUTTON "Pause",313,318,36,16,12
PUSHBUTTON "`",314,20,60,16,12
PUSHBUTTON "1",315,40,60,16,12
PUSHBUTTON "2",316,60,60,16,12
PUSHBUTTON "3",317,79,60,16,12
PUSHBUTTON "4",318,99,60,16,12
PUSHBUTTON "5",319,119,60,16,12
PUSHBUTTON "6",320,139,60,16,12
PUSHBUTTON "7",321,159,60,16,12
PUSHBUTTON "8",322,179,60,16,12
PUSHBUTTON "9",323,199,60,16,12
PUSHBUTTON "0",324,219,60,16,12
PUSHBUTTON "-",325,239,60,16,12
PUSHBUTTON "=",326,259,60,16,12
PUSHBUTTON "BS",327,279,60,26,12
PUSHBUTTON "1",315,39,60,16,12
PUSHBUTTON "2",316,58,60,16,12
PUSHBUTTON "3",317,77,60,16,12
PUSHBUTTON "4",318,96,60,16,12
PUSHBUTTON "5",319,115,60,16,12
PUSHBUTTON "6",320,134,60,16,12
PUSHBUTTON "7",321,153,60,16,12
PUSHBUTTON "8",322,172,60,16,12
PUSHBUTTON "9",323,191,60,16,12
PUSHBUTTON "0",324,210,60,16,12
PUSHBUTTON "-",325,229,60,16,12
PUSHBUTTON "=",326,248,60,16,12
PUSHBUTTON "BS",327,286,60,16,12
PUSHBUTTON "Ins",328,318,59,16,12
PUSHBUTTON "Home",329,337,59,16,12
PUSHBUTTON "NL",330,385,59,16,12
@ -993,20 +993,20 @@ BEGIN
PUSHBUTTON "*",332,425,59,16,12
PUSHBUTTON "-",333,444,59,16,12
PUSHBUTTON "PUp",334,357,59,16,12
PUSHBUTTON "TAB",335,19,76,25,12
PUSHBUTTON "Q",336,48,76,16,12
PUSHBUTTON "W",337,67,76,16,12
PUSHBUTTON "E",338,86,76,16,12
PUSHBUTTON "R",339,105,76,16,12
PUSHBUTTON "T",340,124,76,16,12
PUSHBUTTON "Y",341,143,76,16,12
PUSHBUTTON "U",342,162,76,16,12
PUSHBUTTON "I",343,181,76,16,12
PUSHBUTTON "O",344,200,76,16,12
PUSHBUTTON "P",345,219,76,16,12
PUSHBUTTON "[",346,238,76,16,12
PUSHBUTTON "]",347,257,76,16,12
PUSHBUTTON "Enter",348,279,76,26,28
PUSHBUTTON "TAB",335,20,76,24,12
PUSHBUTTON "Q",336,47,76,16,12
PUSHBUTTON "W",337,66,76,16,12
PUSHBUTTON "E",338,85,76,16,12
PUSHBUTTON "R",339,104,76,16,12
PUSHBUTTON "T",340,123,76,16,12
PUSHBUTTON "Y",341,142,76,16,12
PUSHBUTTON "U",342,161,76,16,12
PUSHBUTTON "I",343,180,76,16,12
PUSHBUTTON "O",344,199,76,16,12
PUSHBUTTON "P",345,218,76,16,12
PUSHBUTTON "[",346,237,76,16,12
PUSHBUTTON "]",347,256,76,16,12
PUSHBUTTON "Enter",348,274,76,28,29
PUSHBUTTON "Del",349,318,75,16,12
PUSHBUTTON "End",350,338,75,16,12
PUSHBUTTON "PDn",351,357,75,16,12
@ -1040,19 +1040,25 @@ BEGIN
PUSHBUTTON ",",379,195,108,16,12
PUSHBUTTON ".",380,214,108,16,12
PUSHBUTTON "/",381,233,108,16,12
PUSHBUTTON "\\",382,289,108,16,12
PUSHBUTTON "Up",383,337,107,16,12
PUSHBUTTON "\\",382,267,60,16,12
PUSHBUTTON "Up",383,337,108,16,12
PUSHBUTTON "1",384,385,107,16,12
PUSHBUTTON "2",385,405,107,16,12
PUSHBUTTON "3",386,425,107,16,12
PUSHBUTTON "CTRL",387,20,123,28,12
PUSHBUTTON "ALT",388,52,123,28,12
PUSHBUTTON "SPACE",389,84,123,156,12
PUSHBUTTON "Left",390,318,122,16,12
PUSHBUTTON "Dn",391,337,122,16,12
PUSHBUTTON "Right",392,357,122,16,12
PUSHBUTTON "0",393,386,122,35,12
PUSHBUTTON ".",394,425,122,16,12
PUSHBUTTON "ALT",388,66,123,27,12
PUSHBUTTON "SPACE",389,96,123,130,12
PUSHBUTTON "Left",390,318,123,16,12
PUSHBUTTON "Dn",391,337,123,16,12
PUSHBUTTON "Right",392,357,123,16,12
PUSHBUTTON "0",393,386,123,35,12
PUSHBUTTON ".",394,425,123,16,12
PUSHBUTTON "SHIFT",395,254,108,48,12
PUSHBUTTON "ALT",396,229,123,29,12
PUSHBUTTON "CTRL",397,274,123,28,12
PUSHBUTTON "Break",398,337,36,16,12
PUSHBUTTON "Reset",399,357,36,16,12
PUSHBUTTON "Enter",400,444,107,16,28
END
TIMINGCONFIG DIALOGEX 23, 157, 203, 60
@ -2261,12 +2267,12 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
#endif // Íåéòðàëüíûé resources
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Ðóññêèé (Ðîññèÿ) resources
// Russian (Russia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
@ -2341,12 +2347,12 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
#endif // Ðóññêèé (Ðîññèÿ) resources
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Àíãëèéñêèé (ÑØÀ) resources
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
@ -2392,17 +2398,17 @@ END
// TEXTINCLUDE
//
1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
"\r\0"
END
2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\0"
END
@ -2462,12 +2468,12 @@ BEGIN
"O", RAMMENU_FILE_OPEN, VIRTKEY, CONTROL
"S", RAMMENU_FILE_SAVE, VIRTKEY, CONTROL
"S", RAMMENU_FILE_SAVEAS, VIRTKEY, SHIFT, CONTROL
"A", IDC_C_WATCH_DUPLICATE, VIRTKEY
"E", IDC_C_WATCH_EDIT, VIRTKEY
"D", IDC_C_WATCH_DOWN, VIRTKEY
"U", IDC_C_WATCH_UP, VIRTKEY
"N", IDC_C_WATCH, VIRTKEY
"R", IDC_C_WATCH_REMOVE, VIRTKEY
"A", IDC_C_WATCH_DUPLICATE, VIRTKEY
"E", IDC_C_WATCH_EDIT, VIRTKEY
"D", IDC_C_WATCH_DOWN, VIRTKEY
"U", IDC_C_WATCH_UP, VIRTKEY
"N", IDC_C_WATCH, VIRTKEY
"R", IDC_C_WATCH_REMOVE, VIRTKEY
END
@ -2580,7 +2586,7 @@ IDB_BITMAP_SELECTED17 BITMAP "res\\te_17_selected.bmp"
IDB_BITMAP_SELECTED18 BITMAP "res\\te_18_selected.bmp"
IDB_BITMAP_SELECTED19 BITMAP "res\\te_19_selected.bmp"
IDB_BRANCH_SPRITESHEET BITMAP "res\\branch_spritesheet.bmp"
#endif // Àíãëèéñêèé (ÑØÀ) resources
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////

View File

@ -2293,13 +2293,13 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
if(wParam==SC_KEYMENU)
{
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB)) && cidisabled)
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB)) && cidisabled)
break;
if(lParam == VK_RETURN || GetIsFullscreen() || tog) break;
}
goto proco;
case WM_SYSKEYDOWN:
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB)) && cidisabled)
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB)) && cidisabled)
break; // Hopefully this won't break DInput...
if(GetIsFullscreen() || tog)
@ -2331,26 +2331,16 @@ adelikat: Outsourced this to a remappable hotkey
if(GameInfo)
{
//Only disable command keys if a game is loaded(and the other conditions are right, of course).
if(InputType[2]==SIFC_FKB)
if((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB))
{
if(wParam==VK_SCROLL)
{
cidisabled^=1;
FCEUI_DispMessage("Family Keyboard %sabled.",0,cidisabled?"en":"dis");
FCEUI_DispMessage("%s Keyboard %sabled.",0,InputType[2]==SIFC_FKB?"Family":(InputType[2]==SIFC_SUBORKB?"Subor":"PEC586"),cidisabled?"en":"dis");
}
if(cidisabled)
break; // Hopefully this won't break DInput...
}
if(InputType[2]==SIFC_SUBORKB)
{
if(wParam==VK_SCROLL)
{
cidisabled^=1;
FCEUI_DispMessage("Subor Keyboard %sabled.",0,cidisabled?"en":"dis");
}
if(cidisabled)
break;
}
}
goto proco;

View File

@ -69,14 +69,15 @@ enum ESIFC
SIFC_4PLAYER = 3,
SIFC_FKB = 4,
SIFC_SUBORKB = 5,
SIFC_HYPERSHOT = 6,
SIFC_MAHJONG = 7,
SIFC_QUIZKING = 8,
SIFC_FTRAINERA = 9,
SIFC_FTRAINERB = 10,
SIFC_OEKAKIDS = 11,
SIFC_BWORLD = 12,
SIFC_TOPRIDER = 13,
SIFC_PEC586KB = 6,
SIFC_HYPERSHOT = 7,
SIFC_MAHJONG = 8,
SIFC_QUIZKING = 9,
SIFC_FTRAINERA = 10,
SIFC_FTRAINERB = 11,
SIFC_OEKAKIDS = 12,
SIFC_BWORLD = 13,
SIFC_TOPRIDER = 14,
SIFC_COUNT = SIFC_TOPRIDER
};
@ -92,6 +93,7 @@ inline const char* ESIFC_Name(ESIFC esifc)
"4-Player Adapter",
"Family Keyboard",
"Subor Keyboard",
"PEC586 Keyboard",
"HyperShot Pads",
"Mahjong",
"Quiz King Buzzers",

View File

@ -68,6 +68,7 @@ extern INPUTCFC *FCEU_InitArkanoidFC(void);
extern INPUTCFC *FCEU_InitSpaceShadow(void);
extern INPUTCFC *FCEU_InitFKB(void);
extern INPUTCFC *FCEU_InitSuborKB(void);
extern INPUTCFC *FCEU_InitPEC586KB(void);
extern INPUTCFC *FCEU_InitHS(void);
extern INPUTCFC *FCEU_InitMahjong(void);
extern INPUTCFC *FCEU_InitQuizKing(void);
@ -432,6 +433,9 @@ static void SetInputStuffFC()
case SIFC_SUBORKB:
portFC.driver=FCEU_InitSuborKB();
break;
case SIFC_PEC586KB:
portFC.driver=FCEU_InitPEC586KB();
break;
case SIFC_HYPERSHOT:
portFC.driver=FCEU_InitHS();
break;

View File

@ -21,82 +21,69 @@
#include <string.h>
#include "share.h"
#include "fkb.h"
#define AK2(x,y) ( (FKB_##x) | (FKB_##y <<8) )
#define AK(x) FKB_##x
#define AK(x) FKB_ ## x
static uint8 bufit[0x49];
static uint8 ksmode;
static uint8 ksindex;
static uint16 matrix[9][2][4]=
static uint16 matrix[9][2][4] =
{
{{AK(F8),AK(RETURN),AK(BRACKETLEFT),AK(BRACKETRIGHT)},
{AK(KANA),AK(RIGHTSHIFT),AK(BACKSLASH),AK(STOP)}},
{{AK(F7),AK(AT),AK(COLON),AK(SEMICOLON)},
{AK(UNDERSCORE),AK(SLASH),AK(MINUS),AK(CARET)}},
{{AK(F6),AK(O),AK(L),AK(K)},
{AK(PERIOD),AK(COMMA),AK(P),AK(0)}},
{{AK(F5),AK(I),AK(U),AK(J)},
{AK(M),AK(N),AK(9),AK(8)}},
{{AK(F4),AK(Y),AK(G),AK(H)},
{AK(B),AK(V),AK(7),AK(6)}},
{{AK(F3),AK(T),AK(R),AK(D)},
{AK(F),AK(C),AK(5),AK(4)}},
{{AK(F2),AK(W),AK(S),AK(A)},
{AK(X),AK(Z),AK(E),AK(3)}},
{{AK(F1),AK(ESCAPE),AK(Q),AK(CONTROL)},
{AK(LEFTSHIFT),AK(GRAPH),AK(1),AK(2)}},
{{AK(CLEAR),AK(UP),AK(RIGHT),AK(LEFT)},
{AK(DOWN),AK(SPACE),AK(DELETE),AK(INSERT)}},
{ { AK(F8), AK(RETURN), AK(BRACKETLEFT), AK(BRACKETRIGHT) },
{ AK(KANA), AK(RIGHTSHIFT), AK(BACKSLASH), AK(STOP) } },
{ { AK(F7), AK(AT), AK(COLON), AK(SEMICOLON) },
{ AK(UNDERSCORE), AK(SLASH), AK(MINUS), AK(CARET) } },
{ { AK(F6), AK(O), AK(L), AK(K) },
{ AK(PERIOD), AK(COMMA), AK(P), AK(0) } },
{ { AK(F5), AK(I), AK(U), AK(J) },
{ AK(M), AK(N), AK(9), AK(8) } },
{ { AK(F4), AK(Y), AK(G), AK(H) },
{ AK(B), AK(V), AK(7), AK(6) } },
{ { AK(F3), AK(T), AK(R), AK(D) },
{ AK(F), AK(C), AK(5), AK(4) } },
{ { AK(F2), AK(W), AK(S), AK(A) },
{ AK(X), AK(Z), AK(E), AK(3) } },
{ { AK(F1), AK(ESCAPE), AK(Q), AK(CONTROL) },
{ AK(LEFTSHIFT), AK(GRAPH), AK(1), AK(2) } },
{ { AK(CLEAR), AK(UP), AK(RIGHT), AK(LEFT) },
{ AK(DOWN), AK(SPACE), AK(DELETE), AK(INSERT) } },
};
static void FKB_Write(uint8 v)
{
v>>=1;
if(v&2)
{
if((ksmode&1) && !(v&1))
ksindex=(ksindex+1)%9;
}
ksmode=v;
static void FKB_Write(uint8 v) {
v >>= 1;
if (v & 2) {
if ((ksmode & 1) && !(v & 1))
ksindex = (ksindex + 1) % 9;
}
ksmode = v;
}
static uint8 FKB_Read(int w, uint8 ret)
{
//printf("$%04x, %d, %d\n",w+0x4016,ksindex,ksmode&1);
if(w)
{
int x;
static uint8 FKB_Read(int w, uint8 ret) {
if (w) {
int x;
ret&=~0x1E;
for(x=0;x<4;x++)
if(bufit[ matrix[ksindex][ksmode&1][x]&0xFF ] || bufit[ matrix[ksindex][ksmode&1][x]>>8])
{
ret|=1<<(x+1);
}
ret^=0x1E;
}
return(ret);
ret &= ~0x1E;
for (x = 0; x < 4; x++)
if (bufit[ matrix[ksindex][ksmode & 1][x] & 0xFF ] || bufit[ matrix[ksindex][ksmode & 1][x] >> 8])
ret |= 1 << (x + 1);
ret ^= 0x1E;
}
return(ret);
}
static void FKB_Strobe(void)
{
ksmode=0;
ksindex=0;
//printf("strobe\n");
static void FKB_Strobe(void) {
ksmode = 0;
ksindex = 0;
}
static void FKB_Update(void *data, int arg)
{
memcpy(bufit+1,data,0x48);
static void FKB_Update(void *data, int arg) {
memcpy(bufit + 1, data, sizeof(bufit) - 1);
}
static INPUTCFC FKB={FKB_Read,FKB_Write,FKB_Strobe,FKB_Update,0,0};
static INPUTCFC FKB = { FKB_Read, FKB_Write, FKB_Strobe, FKB_Update, 0, 0 };
INPUTCFC *FCEU_InitFKB(void)
{
memset(bufit,0,sizeof(bufit));
ksmode=ksindex=0;
return(&FKB);
INPUTCFC *FCEU_InitFKB(void) {
memset(bufit, 0, sizeof(bufit));
ksmode = ksindex = 0;
return(&FKB);
}

View File

@ -1,72 +1,72 @@
#define FKB_F1 0x01
#define FKB_F2 0x02
#define FKB_F3 0x03
#define FKB_F4 0x04
#define FKB_F5 0x05
#define FKB_F6 0x06
#define FKB_F7 0x07
#define FKB_F8 0x08
#define FKB_1 0x09
#define FKB_2 0x0A
#define FKB_3 0x0B
#define FKB_4 0x0C
#define FKB_5 0x0D
#define FKB_6 0x0E
#define FKB_7 0x0F
#define FKB_8 0x10
#define FKB_9 0x11
#define FKB_0 0x12
#define FKB_MINUS 0x13
#define FKB_CARET 0x14
#define FKB_BACKSLASH 0x15
#define FKB_STOP 0x16
#define FKB_ESCAPE 0x17
#define FKB_Q 0x18
#define FKB_W 0x19
#define FKB_E 0x1A
#define FKB_R 0x1B
#define FKB_T 0x1C
#define FKB_Y 0x1D
#define FKB_U 0x1E
#define FKB_I 0x1F
#define FKB_O 0x20
#define FKB_P 0x21
#define FKB_AT 0x22
#define FKB_BRACKETLEFT 0x23
#define FKB_RETURN 0x24
#define FKB_CONTROL 0x25
#define FKB_A 0x26
#define FKB_S 0x27
#define FKB_D 0x28
#define FKB_F 0x29
#define FKB_G 0x2A
#define FKB_H 0x2B
#define FKB_J 0x2C
#define FKB_K 0x2D
#define FKB_L 0x2E
#define FKB_SEMICOLON 0x2F
#define FKB_COLON 0x30
#define FKB_BRACKETRIGHT 0x31
#define FKB_KANA 0x32
#define FKB_LEFTSHIFT 0x33
#define FKB_Z 0x34
#define FKB_X 0x35
#define FKB_C 0x36
#define FKB_V 0x37
#define FKB_B 0x38
#define FKB_N 0x39
#define FKB_M 0x3A
#define FKB_COMMA 0x3B
#define FKB_PERIOD 0x3C
#define FKB_SLASH 0x3D
#define FKB_UNDERSCORE 0x3E
#define FKB_RIGHTSHIFT 0x3F
#define FKB_GRAPH 0x40
#define FKB_SPACE 0x41
#define FKB_CLEAR 0x42
#define FKB_INSERT 0x43
#define FKB_DELETE 0x44
#define FKB_UP 0x45
#define FKB_LEFT 0x46
#define FKB_RIGHT 0x47
#define FKB_DOWN 0x48
#define FKB_F1 0x01
#define FKB_F2 0x02
#define FKB_F3 0x03
#define FKB_F4 0x04
#define FKB_F5 0x05
#define FKB_F6 0x06
#define FKB_F7 0x07
#define FKB_F8 0x08
#define FKB_1 0x09
#define FKB_2 0x0A
#define FKB_3 0x0B
#define FKB_4 0x0C
#define FKB_5 0x0D
#define FKB_6 0x0E
#define FKB_7 0x0F
#define FKB_8 0x10
#define FKB_9 0x11
#define FKB_0 0x12
#define FKB_MINUS 0x13
#define FKB_CARET 0x14
#define FKB_BACKSLASH 0x15
#define FKB_STOP 0x16
#define FKB_ESCAPE 0x17
#define FKB_Q 0x18
#define FKB_W 0x19
#define FKB_E 0x1A
#define FKB_R 0x1B
#define FKB_T 0x1C
#define FKB_Y 0x1D
#define FKB_U 0x1E
#define FKB_I 0x1F
#define FKB_O 0x20
#define FKB_P 0x21
#define FKB_AT 0x22
#define FKB_BRACKETLEFT 0x23
#define FKB_RETURN 0x24
#define FKB_CONTROL 0x25
#define FKB_A 0x26
#define FKB_S 0x27
#define FKB_D 0x28
#define FKB_F 0x29
#define FKB_G 0x2A
#define FKB_H 0x2B
#define FKB_J 0x2C
#define FKB_K 0x2D
#define FKB_L 0x2E
#define FKB_SEMICOLON 0x2F
#define FKB_COLON 0x30
#define FKB_BRACKETRIGHT 0x31
#define FKB_KANA 0x32
#define FKB_LEFTSHIFT 0x33
#define FKB_Z 0x34
#define FKB_X 0x35
#define FKB_C 0x36
#define FKB_V 0x37
#define FKB_B 0x38
#define FKB_N 0x39
#define FKB_M 0x3A
#define FKB_COMMA 0x3B
#define FKB_PERIOD 0x3C
#define FKB_SLASH 0x3D
#define FKB_UNDERSCORE 0x3E
#define FKB_RIGHTSHIFT 0x3F
#define FKB_GRAPH 0x40
#define FKB_SPACE 0x41
#define FKB_CLEAR 0x42
#define FKB_INSERT 0x43
#define FKB_DELETE 0x44
#define FKB_UP 0x45
#define FKB_LEFT 0x46
#define FKB_RIGHT 0x47
#define FKB_DOWN 0x48

View File

@ -0,0 +1,96 @@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2002 Xodnizel
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "share.h"
#include "suborkb.h"
#define AK(x) FKB_ ## x
static uint8 bufit[0x66];
static uint8 kspos, kstrobe;
static uint8 ksindex;
//TODO: check all keys, some of the are wrong
static uint16 matrix[13][8] =
{
{ AK(ESCAPE),AK(SPACE),AK(LMENU),AK(LCONTROL),AK(LSHIFT),AK(GRAVE),AK(TAB),AK(CAPITAL) },
{ AK(F6),AK(F7),AK(F5),AK(F4),AK(F8),AK(F2),AK(F1),AK(F3) },
{ AK(EQUALS), AK(NUMPAD0),AK(PERIOD),AK(A),AK(RETURN),AK(1),AK(Q),AK(Z) },
{ 0, AK(NUMPAD3),AK(NUMPAD6),AK(S),AK(NUMPAD9),AK(2),AK(W),AK(X) },
{ AK(SLASH), AK(NUMPAD2),AK(NUMPAD5),AK(D),AK(NUMPAD8),AK(3),AK(E),AK(C) },
{ AK(BREAK), AK(NUMPAD1),AK(NUMPAD4),AK(F),AK(NUMPAD7),AK(4),AK(R),AK(V) },
{ AK(BACK),AK(BACKSLASH),AK(GRETURN),AK(G),AK(RBRACKET),AK(5),AK(T),AK(B) },
{ AK(9),AK(PERIOD),AK(L),AK(K),AK(O),AK(8),AK(I),AK(COMMA) },
{ AK(0),AK(SLASH),AK(SEMICOLON),AK(J),AK(P),AK(7),AK(U),AK(M) },
{ AK(MINUS),AK(MINUS),AK(APOSTROPHE),AK(H),AK(LBRACKET),AK(6),AK(Y),AK(N) },
{ AK(F11),AK(F12),AK(F10),0,AK(MINUS),AK(F9),0,0 },
{ AK(UP),AK(RIGHT),AK(DOWN),AK(DIVIDE),AK(LEFT),AK(MULTIPLY),AK(SUBTRACT),AK(ADD) },
{ AK(INSERT),AK(NUMPAD1),AK(HOME),AK(PRIOR),AK(DELETE),AK(END),AK(NEXT),AK(NUMLOCK) },
};
static void PEC586KB_Write(uint8 v) {
if (((kstrobe & 7) == 1) && ((v & 7) == 2)) {
kspos = 0;
ksindex = 0;
} else if (((kstrobe & 7) == 7) && ((v & 3) == 2)) {
kspos++;
kspos %= 13;
ksindex = 0;
}
kstrobe = v;
}
static uint8 PEC586KB_Read(int w, uint8 ret) {
#ifdef FCEUDEF_DEBUGGER
if (!fceuindbg) {
#endif
if (w) {
ret &= ~2;
if(matrix[kspos][7-ksindex] < (88 + 16)) {
if(bufit[matrix[kspos][7-ksindex]])
ret |= 2;
ksindex++;
ksindex&=7;
}
}
#ifdef FCEUDEF_DEBUGGER
}
#endif
return(ret);
}
static void PEC586KB_Strobe(void) {
kstrobe = 0;
ksindex = 0;
}
static void PEC586KB_Update(void *data, int arg) {
memcpy(bufit + 1, data, sizeof(bufit) - 1);
}
static INPUTCFC PEC586KB = { PEC586KB_Read, PEC586KB_Write, PEC586KB_Strobe, PEC586KB_Update, 0, 0 };
INPUTCFC *FCEU_InitPEC586KB(void) {
memset(bufit, 0, sizeof(bufit));
kspos = ksindex = kstrobe = 0;
return(&PEC586KB);
}

View File

@ -1,94 +1,97 @@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2002 Xodnizel
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "share.h"
#include "suborkb.h"
#define AK2(x,y) ( (FKB_##x) | (FKB_##y <<8) )
#define AK(x) FKB_##x
#define AK(x) FKB_ ## x
static uint8 bufit[0x61];
static uint8 bufit[0x66];
static uint8 ksmode;
static uint8 ksindex;
static uint16 matrix[13][2][4]=
static uint16 matrix[13][2][4] =
{
{{AK(4),AK(G),AK(F),AK(C)},
{AK(F2),AK(E),AK(5),AK(V)}},
{{AK(2),AK(D),AK(S),AK(END)},
{AK(F1),AK(W),AK(3),AK(X)}},
{{AK(INSERT),AK(BACK),AK(NEXT),AK(RIGHT)},
{AK(F8),AK(PRIOR),AK(DELETE),AK(HOME)}},
{{AK(9),AK(I),AK(L),AK(COMMA)},
{AK(F5),AK(O),AK(0),AK(PERIOD)}},
{{AK(RBRACKET),AK(RETURN),AK(UP),AK(LEFT)},
{AK(F7),AK(LBRACKET),AK(BACKSLASH),AK(DOWN)}},
{{AK(Q),AK(CAPITAL),AK(Z),AK(TAB)},
{AK(ESCAPE),AK(A),AK(1),AK(LCONTROL)}},
{{AK(7),AK(Y),AK(K),AK(M)},
{AK(F4),AK(U),AK(8),AK(J)}},
{{AK(MINUS),AK(SEMICOLON),AK(APOSTROPHE),AK(SLASH)},
{AK(F6),AK(P),AK(EQUALS),AK(LSHIFT)}},
{{AK(T),AK(H),AK(N),AK(SPACE)},
{AK(F3),AK(R),AK(6),AK(B)}},
{{0,0,0,0},
{0,0,0,0}},
{{AK(LMENU),AK(NUMPAD4),AK(NUMPAD7),AK(F11)},
{AK(F12),AK(NUMPAD1),AK(NUMPAD2),AK(NUMPAD8)}},
{{AK(SUBTRACT),AK(ADD),AK(MULTIPLY),AK(NUMPAD9)},
{AK(F10),AK(NUMPAD5),AK(DIVIDE),AK(NUMLOCK)}},
{{AK(GRAVE),AK(NUMPAD6),AK(PAUSE),AK(SPACE)},
{AK(F9),AK(NUMPAD3),AK(DECIMAL),AK(NUMPAD0)}},
{ { AK(4), AK(G), AK(F), AK(C) },
{ AK(F2), AK(E), AK(5), AK(V) } },
{ { AK(2), AK(D), AK(S), AK(END) },
{ AK(F1), AK(W), AK(3), AK(X) } },
{ { AK(INSERT), AK(BACK), AK(NEXT), AK(RIGHT) },
{ AK(F8), AK(PRIOR), AK(DELETE), AK(HOME) } },
{ { AK(9), AK(I), AK(L), AK(COMMA) },
{ AK(F5), AK(O), AK(0), AK(PERIOD) } },
{ { AK(RBRACKET), AK(RETURN), AK(UP), AK(LEFT) },
{ AK(F7), AK(LBRACKET), AK(BACKSLASH), AK(DOWN) } },
{ { AK(Q), AK(CAPITAL), AK(Z), AK(TAB) },
{ AK(ESCAPE), AK(A), AK(1), AK(LCONTROL) } },
{ { AK(7), AK(Y), AK(K), AK(M) },
{ AK(F4), AK(U), AK(8), AK(J) } },
{ { AK(MINUS), AK(SEMICOLON), AK(APOSTROPHE), AK(SLASH) },
{ AK(F6), AK(P), AK(EQUALS), AK(LSHIFT) } },
{ { AK(T), AK(H), AK(N), AK(SPACE) },
{ AK(F3), AK(R), AK(6), AK(B) } },
{ { 0, 0, 0, 0 },
{ 0, 0, 0, 0 } },
{ { AK(LMENU), AK(NUMPAD4), AK(NUMPAD7), AK(F11) },
{ AK(F12), AK(NUMPAD1), AK(NUMPAD2), AK(NUMPAD8) } },
{ { AK(SUBTRACT), AK(ADD), AK(MULTIPLY), AK(NUMPAD9) },
{ AK(F10), AK(NUMPAD5), AK(DIVIDE), AK(NUMLOCK) } },
{ { AK(GRAVE), AK(NUMPAD6), AK(PAUSE), AK(SPACE) },
{ AK(F9), AK(NUMPAD3), AK(DECIMAL), AK(NUMPAD0) } },
};
static void SuborKB_Write(uint8 v)
{
v>>=1;
if(v&2)
{
if((ksmode&1) && !(v&1))
ksindex=(ksindex+1)%13;
}
ksmode=v;
static void SuborKB_Write(uint8 v) {
v >>= 1;
if (v & 2) {
if ((ksmode & 1) && !(v & 1))
ksindex = (ksindex + 1) % 13;
}
ksmode = v;
}
static uint8 SuborKB_Read(int w, uint8 ret)
{
if(w)
{
int x;
static uint8 SuborKB_Read(int w, uint8 ret) {
if (w) {
int x;
ret&=~0x1E;
// if(ksindex==9)
// {
// if(ksmode&1)
// ret|=2;
// }
// else
// {
for(x=0;x<4;x++)
if(bufit[matrix[ksindex][ksmode&1][x]&0xFF]||bufit[matrix[ksindex][ksmode&1][x]>>8])
ret|=1<<(x+1);
// }
ret^=0x1E;
}
return(ret);
ret &= ~0x1E;
for (x = 0; x < 4; x++)
if (bufit[matrix[ksindex][ksmode & 1][x]])
ret |= 1 << (x + 1);
ret ^= 0x1E;
}
return(ret);
}
static void SuborKB_Strobe(void)
{
ksmode=0;
ksindex=0;
static void SuborKB_Strobe(void) {
ksmode = 0;
ksindex = 0;
}
static void SuborKB_Update(void *data, int arg)
{
memcpy(bufit+1,data,0x60);
static void SuborKB_Update(void *data, int arg) {
memcpy(bufit + 1, data, sizeof(bufit) - 1);
}
static INPUTCFC SuborKB={SuborKB_Read,SuborKB_Write,SuborKB_Strobe,SuborKB_Update,0,0};
static INPUTCFC SuborKB = { SuborKB_Read, SuborKB_Write, SuborKB_Strobe, SuborKB_Update, 0, 0 };
INPUTCFC *FCEU_InitSuborKB(void)
{
memset(bufit,0,sizeof(bufit));
ksmode=ksindex=0;
return(&SuborKB);
INPUTCFC *FCEU_InitSuborKB(void) {
memset(bufit, 0, sizeof(bufit));
ksmode = ksindex = 0;
return(&SuborKB);
}

View File

@ -1,96 +1,102 @@
#define FKB_ESCAPE 0x01
#define FKB_F1 0x02
#define FKB_F2 0x03
#define FKB_F3 0x04
#define FKB_F4 0x05
#define FKB_F5 0x06
#define FKB_F6 0x07
#define FKB_F7 0x08
#define FKB_F8 0x09
#define FKB_F9 0x0A
#define FKB_F10 0x0B
#define FKB_F11 0x0C
#define FKB_F12 0x0D
#define FKB_PAUSE 0x0E
#define FKB_GRAVE 0x0F
#define FKB_1 0x10
#define FKB_2 0x11
#define FKB_3 0x12
#define FKB_4 0x13
#define FKB_5 0x14
#define FKB_6 0x15
#define FKB_7 0x16
#define FKB_8 0x17
#define FKB_9 0x18
#define FKB_0 0x19
#define FKB_MINUS 0x1A
#define FKB_EQUALS 0x1B
#define FKB_BACK 0x1C
#define FKB_INSERT 0x1D
#define FKB_HOME 0x1E
#define FKB_PRIOR 0x1F
#define FKB_NUMLOCK 0x20
#define FKB_DIVIDE 0x21
#define FKB_MULTIPLY 0x22
#define FKB_SUBTRACT 0x23
#define FKB_TAB 0x24
#define FKB_Q 0x25
#define FKB_W 0x26
#define FKB_E 0x27
#define FKB_R 0x28
#define FKB_T 0x29
#define FKB_Y 0x2A
#define FKB_U 0x2B
#define FKB_I 0x2C
#define FKB_O 0x2D
#define FKB_P 0x2E
#define FKB_LBRACKET 0x2F
#define FKB_RBRACKET 0x30
#define FKB_RETURN 0x31
#define FKB_DELETE 0x32
#define FKB_END 0x33
#define FKB_NEXT 0x34
#define FKB_NUMPAD7 0x35
#define FKB_NUMPAD8 0x36
#define FKB_NUMPAD9 0x37
#define FKB_ADD 0x38
#define FKB_CAPITAL 0x39
#define FKB_A 0x3A
#define FKB_S 0x3B
#define FKB_D 0x3C
#define FKB_F 0x3D
#define FKB_G 0x3E
#define FKB_H 0x3F
#define FKB_J 0x40
#define FKB_K 0x41
#define FKB_L 0x42
#define FKB_SEMICOLON 0x43
#define FKB_APOSTROPHE 0x44
#define FKB_NUMPAD4 0x45
#define FKB_NUMPAD5 0x46
#define FKB_NUMPAD6 0x47
#define FKB_LSHIFT 0x48
#define FKB_Z 0x49
#define FKB_X 0x4A
#define FKB_C 0x4B
#define FKB_V 0x4C
#define FKB_B 0x4D
#define FKB_N 0x4E
#define FKB_M 0x4F
#define FKB_COMMA 0x50
#define FKB_PERIOD 0x51
#define FKB_SLASH 0x52
#define FKB_BACKSLASH 0x53
#define FKB_UP 0x54
#define FKB_NUMPAD1 0x55
#define FKB_NUMPAD2 0x56
#define FKB_NUMPAD3 0x57
#define FKB_LCONTROL 0x58
#define FKB_LMENU 0x59
#define FKB_SPACE 0x5A
#define FKB_LEFT 0x5B
#define FKB_DOWN 0x5C
#define FKB_RIGHT 0x5D
#define FKB_NUMPAD0 0x5E
#define FKB_DECIMAL 0x5F
#define FKB_ESCAPE 0x01
#define FKB_F1 0x02
#define FKB_F2 0x03
#define FKB_F3 0x04
#define FKB_F4 0x05
#define FKB_F5 0x06
#define FKB_F6 0x07
#define FKB_F7 0x08
#define FKB_F8 0x09
#define FKB_F9 0x0A
#define FKB_F10 0x0B
#define FKB_F11 0x0C
#define FKB_F12 0x0D
#define FKB_PAUSE 0x0E
#define FKB_GRAVE 0x0F
#define FKB_1 0x10
#define FKB_2 0x11
#define FKB_3 0x12
#define FKB_4 0x13
#define FKB_5 0x14
#define FKB_6 0x15
#define FKB_7 0x16
#define FKB_8 0x17
#define FKB_9 0x18
#define FKB_0 0x19
#define FKB_MINUS 0x1A
#define FKB_EQUALS 0x1B
#define FKB_BACK 0x1C
#define FKB_INSERT 0x1D
#define FKB_HOME 0x1E
#define FKB_PRIOR 0x1F
#define FKB_NUMLOCK 0x20
#define FKB_DIVIDE 0x21
#define FKB_MULTIPLY 0x22
#define FKB_SUBTRACT 0x23
#define FKB_TAB 0x24
#define FKB_Q 0x25
#define FKB_W 0x26
#define FKB_E 0x27
#define FKB_R 0x28
#define FKB_T 0x29
#define FKB_Y 0x2A
#define FKB_U 0x2B
#define FKB_I 0x2C
#define FKB_O 0x2D
#define FKB_P 0x2E
#define FKB_LBRACKET 0x2F
#define FKB_RBRACKET 0x30
#define FKB_RETURN 0x31
#define FKB_DELETE 0x32
#define FKB_END 0x33
#define FKB_NEXT 0x34
#define FKB_NUMPAD7 0x35
#define FKB_NUMPAD8 0x36
#define FKB_NUMPAD9 0x37
#define FKB_ADD 0x38
#define FKB_CAPITAL 0x39
#define FKB_A 0x3A
#define FKB_S 0x3B
#define FKB_D 0x3C
#define FKB_F 0x3D
#define FKB_G 0x3E
#define FKB_H 0x3F
#define FKB_J 0x40
#define FKB_K 0x41
#define FKB_L 0x42
#define FKB_SEMICOLON 0x43
#define FKB_APOSTROPHE 0x44
#define FKB_NUMPAD4 0x45
#define FKB_NUMPAD5 0x46
#define FKB_NUMPAD6 0x47
#define FKB_LSHIFT 0x48
#define FKB_Z 0x49
#define FKB_X 0x4A
#define FKB_C 0x4B
#define FKB_V 0x4C
#define FKB_B 0x4D
#define FKB_N 0x4E
#define FKB_M 0x4F
#define FKB_COMMA 0x50
#define FKB_PERIOD 0x51
#define FKB_SLASH 0x52
#define FKB_BACKSLASH 0x53
#define FKB_UP 0x54
#define FKB_NUMPAD1 0x55
#define FKB_NUMPAD2 0x56
#define FKB_NUMPAD3 0x57
#define FKB_LCONTROL 0x58
#define FKB_LMENU 0x59
#define FKB_SPACE 0x5A
#define FKB_LEFT 0x5B
#define FKB_DOWN 0x5C
#define FKB_RIGHT 0x5D
#define FKB_NUMPAD0 0x5E
#define FKB_DECIMAL 0x5F
#define FKB_RSHIFT 0x60
#define FKB_RMENU 0x61
#define FKB_RCONTROL 0x62
#define FKB_BREAK 0x63
#define FKB_RESET 0x64
#define FKB_GRETURN 0x65

View File

@ -596,6 +596,7 @@
<ClCompile Include="..\src\input\mahjong.cpp" />
<ClCompile Include="..\src\input\mouse.cpp" />
<ClCompile Include="..\src\input\oekakids.cpp" />
<ClCompile Include="..\src\input\pec586kb.cpp" />
<ClCompile Include="..\src\input\powerpad.cpp" />
<ClCompile Include="..\src\input\quiz.cpp" />
<ClCompile Include="..\src\input\shadow.cpp" />
@ -963,6 +964,7 @@
<ClInclude Include="..\src\ines-correct.h" />
<ClInclude Include="..\src\ines.h" />
<ClInclude Include="..\src\input.h" />
<ClInclude Include="..\src\input\fkb.h" />
<ClInclude Include="..\src\input\share.h" />
<ClInclude Include="..\src\input\suborkb.h" />
<ClInclude Include="..\src\movie.h" />

View File

@ -958,6 +958,9 @@
<ClCompile Include="..\src\boards\mihunche.cpp">
<Filter>boards</Filter>
</ClCompile>
<ClCompile Include="..\src\input\pec586kb.cpp">
<Filter>input</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\drivers\common\args.h">
@ -1464,6 +1467,9 @@
<ClInclude Include="..\src\utils\ioapi.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="..\src\input\fkb.h">
<Filter>input</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\src\drivers\win\res.rc">