mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-20 22:33:22 +02:00
basic kbd handlewith joy
This commit is contained in:
@@ -1,3 +1,36 @@
|
|||||||
|
WIP Libretro port of Atari800 emulator version 3.1.0
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
|
In joy mode
|
||||||
|
|
||||||
|
L3 NA
|
||||||
|
R3 NA
|
||||||
|
L2 KEY SPACE
|
||||||
|
R2 KEY ESCAPE
|
||||||
|
L CONSOL_OPTION
|
||||||
|
R TOGGLE UI
|
||||||
|
SEL CONSOL_SELECT
|
||||||
|
STR CONSOL_START
|
||||||
|
A FIRE1/KEY RETURN IN GUI
|
||||||
|
B KEY RETURN
|
||||||
|
X FIRE2/KEY ESCAPE IN GUI
|
||||||
|
Y VKBD ON/OFF
|
||||||
|
|
||||||
|
In Keayboard mode
|
||||||
|
|
||||||
|
F1 MAIN GUI
|
||||||
|
F2 CONSOL_OPTION
|
||||||
|
F3 CONSOL_SELECT
|
||||||
|
F4 CONSOL_START
|
||||||
|
UP
|
||||||
|
DOWN
|
||||||
|
LEFT
|
||||||
|
RIGHT
|
||||||
|
RETURN
|
||||||
|
ESCAPE
|
||||||
|
SPACE
|
||||||
|
|
||||||
|
|
||||||
Atari800 emulator version 3.1.0
|
Atari800 emulator version 3.1.0
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ char Key_Sate[512];
|
|||||||
char Key_Sate2[512];
|
char Key_Sate2[512];
|
||||||
static char old_Key_Sate[512];
|
static char old_Key_Sate[512];
|
||||||
|
|
||||||
static int mbt[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
int mbt[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
|
|
||||||
//STATS GUI
|
//STATS GUI
|
||||||
int BOXDEC= 32+2;
|
int BOXDEC= 32+2;
|
||||||
|
|||||||
+24
-7
@@ -48,6 +48,7 @@ static int swap_joysticks = FALSE;
|
|||||||
int PLATFORM_kbd_joy_0_enabled = TRUE; /* enabled by default, doesn't hurt */
|
int PLATFORM_kbd_joy_0_enabled = TRUE; /* enabled by default, doesn't hurt */
|
||||||
int PLATFORM_kbd_joy_1_enabled = FALSE; /* disabled, would steal normal keys */
|
int PLATFORM_kbd_joy_1_enabled = FALSE; /* disabled, would steal normal keys */
|
||||||
extern unsigned char MXjoy[2]; // joy
|
extern unsigned char MXjoy[2]; // joy
|
||||||
|
extern int mbt[16];
|
||||||
extern int retro_sound_finalized;
|
extern int retro_sound_finalized;
|
||||||
|
|
||||||
static UWORD *palette = NULL;
|
static UWORD *palette = NULL;
|
||||||
@@ -117,18 +118,34 @@ int PLATFORM_Keyboard(void)
|
|||||||
if (Key_Sate[RETROK_F4])
|
if (Key_Sate[RETROK_F4])
|
||||||
INPUT_key_consol &= (~INPUT_CONSOL_START);
|
INPUT_key_consol &= (~INPUT_CONSOL_START);
|
||||||
|
|
||||||
|
/* FIXME handle all keys */
|
||||||
if (Key_Sate[RETROK_SPACE])
|
if (Key_Sate[RETROK_SPACE])
|
||||||
return AKEY_SPACE;
|
return AKEY_SPACE;
|
||||||
|
|
||||||
if (Key_Sate[RETROK_F1])
|
if (Key_Sate[RETROK_F1])
|
||||||
return AKEY_UI;
|
return AKEY_UI;
|
||||||
|
|
||||||
if (Key_Sate[RETROK_LEFT])return AKEY_LEFT;
|
if (Key_Sate[RETROK_LEFT])return AKEY_LEFT;
|
||||||
if (Key_Sate[RETROK_RIGHT])return AKEY_RIGHT;
|
if (Key_Sate[RETROK_RIGHT])return AKEY_RIGHT;
|
||||||
if (Key_Sate[RETROK_UP])return AKEY_UP;
|
if (Key_Sate[RETROK_UP])return AKEY_UP;
|
||||||
if (Key_Sate[RETROK_DOWN])return AKEY_DOWN;
|
if (Key_Sate[RETROK_DOWN])return AKEY_DOWN;
|
||||||
if (Key_Sate[RETROK_RETURN])return AKEY_RETURN;
|
if (Key_Sate[RETROK_RETURN])return AKEY_RETURN;
|
||||||
if (Key_Sate[RETROK_ESCAPE])return AKEY_ESCAPE;
|
if (Key_Sate[RETROK_ESCAPE])return AKEY_ESCAPE;
|
||||||
|
|
||||||
|
/* FIXME joy bind */
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_SELECT])
|
||||||
|
INPUT_key_consol &= (~INPUT_CONSOL_SELECT);
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_START])
|
||||||
|
INPUT_key_consol &= (~INPUT_CONSOL_START);
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_L])
|
||||||
|
INPUT_key_consol &= (~INPUT_CONSOL_OPTION);
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_R])
|
||||||
|
return AKEY_UI;
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_L2])
|
||||||
|
return AKEY_SPACE;
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_R2])
|
||||||
|
return AKEY_ESCAPE;
|
||||||
|
if (mbt[RETRO_DEVICE_ID_JOYPAD_B])
|
||||||
|
return AKEY_RETURN;
|
||||||
|
|
||||||
if (UI_is_active){
|
if (UI_is_active){
|
||||||
// whitout kbd in GUI
|
// whitout kbd in GUI
|
||||||
|
|||||||
Reference in New Issue
Block a user