mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-02-02 14:31:13 +00:00
Fixed display of Joy1 in USB status screen.
Keyboard test now shows USB keycodes (not amiga) Added more USB joystick aliases.
This commit is contained in:
2
menu.c
2
menu.c
@@ -1077,6 +1077,7 @@ void HandleUI(void)
|
||||
OsdSetTitle("USB", 0);
|
||||
menustate = MENU_8BIT_USB2;
|
||||
parentstate=MENU_8BIT_USB1;
|
||||
strcpy(usb_id, " ");
|
||||
get_joystick_id( usb_id, 0, 1);
|
||||
OsdWrite(0, " Joy1:", 0, 0);
|
||||
OsdWrite(1, usb_id, 0, 0);
|
||||
@@ -1093,6 +1094,7 @@ void HandleUI(void)
|
||||
case MENU_8BIT_USB2:
|
||||
menumask=1;
|
||||
OsdSetTitle("USB", 0);
|
||||
strcpy(usb_id, " ");
|
||||
get_joystick_id( usb_id, 0, 1);
|
||||
OsdWrite(0, " Joy1:", 0, 0);
|
||||
OsdWrite(1, usb_id, 0, 0);
|
||||
|
||||
@@ -130,21 +130,36 @@ char* get_joystick_alias( uint16_t vid, uint16_t pid ) {
|
||||
if(vid==0x0411 && pid==0x00C6)
|
||||
return JOYSTICK_ALIAS_IBUFALLO_SNES;
|
||||
|
||||
if (vid==0x0079 && pid==0x0006)
|
||||
if (vid==VID_RETROLINK && pid==0x0006)
|
||||
return JOYSTICK_ALIAS_RETROLINK_GC;
|
||||
|
||||
if (vid==VID_RETROLINK && pid==0x0011)
|
||||
return JOYSTICK_ALIAS_RETROLINK_NES;
|
||||
|
||||
if(vid==0x1F4F && pid==0x0003)
|
||||
return JOYSTICK_ALIAS_ROYDS_EX;
|
||||
|
||||
if(vid==VID_DAPTOR && pid==0xF947)
|
||||
return JOYSTICK_ALIAS_ATARI_DAPTOR2;
|
||||
|
||||
if(vid==0x04D8 && pid==0xF421)
|
||||
if(vid==VID_DAPTOR && pid==0xF421)
|
||||
return JOYSTICK_ALIAS_NEOGEO_DAPTOR;
|
||||
|
||||
if(vid==VID_DAPTOR && pid==0xF6EC)
|
||||
return JOYSTICK_ALIAS_NEOGEO_DAPTOR;
|
||||
|
||||
if(vid==VID_DAPTOR && pid==0xF672)
|
||||
return JOYSTICK_ALIAS_VISION_DAPTOR;
|
||||
|
||||
if(vid==0x1345 && pid==0x1030)
|
||||
return JOYSTICK_ALIAS_RETRO_FREAK;
|
||||
|
||||
if(vid==0x1235 && pid==0xab21)
|
||||
return JOYSTICK_ALIAS_8BITDO_SFC30;
|
||||
|
||||
if(vid==0x040b && pid==0x6533)
|
||||
return JOYSTICK_ALIAS_SPEEDLINK_COMP;
|
||||
|
||||
return JOYSTICK_ALIAS_NONE;
|
||||
|
||||
}
|
||||
@@ -220,7 +235,7 @@ uint16_t virtual_joystick_mapping (uint16_t vid, uint16_t pid, uint16_t joy_inpu
|
||||
}
|
||||
|
||||
//mapping for RetroLink N64 and Gamecube pad (same vid/pid)
|
||||
if(vid==0x0079 && pid==0x0006) {
|
||||
if(vid==VID_RETROLINK && pid==0x0006) {
|
||||
mapping[btn_off+7] = JOY_A; // A on N64 pad
|
||||
mapping[btn_off+9] = JOY_B; // B on N64 pad
|
||||
mapping[btn_off+3] = JOY_A; // A on GC pad
|
||||
@@ -248,7 +263,7 @@ uint16_t virtual_joystick_mapping (uint16_t vid, uint16_t pid, uint16_t joy_inpu
|
||||
}
|
||||
|
||||
//mapping for NEOGEO-daptor
|
||||
if(vid==0x04D8 && pid==0xF421) {
|
||||
if(vid==VID_DAPTOR && pid==0xF421) {
|
||||
mapping[btn_off+1] = JOY_B; // red button "A" on pad (inverted order with NES/SNES
|
||||
mapping[btn_off+2] = JOY_A; // yellow button "B" on pad (inverted order with NES/SNES
|
||||
mapping[btn_off+3] = JOY_Y | JOY_L; // green button, "C" on pad (mapped to Y and L in SNES convention)
|
||||
@@ -262,10 +277,10 @@ uint16_t virtual_joystick_mapping (uint16_t vid, uint16_t pid, uint16_t joy_inpu
|
||||
if(vid==0x1235 && pid==0xab21) {
|
||||
mapping[btn_off+1] = JOY_A;
|
||||
mapping[btn_off+2] = JOY_B;
|
||||
//mapping[btn_off+3] // not used
|
||||
//mapping[btn_off+3] // physical button #3 not used
|
||||
mapping[btn_off+4] = JOY_X;
|
||||
mapping[btn_off+5] = JOY_Y;
|
||||
//mapping[btn_off+6] // not used
|
||||
//mapping[btn_off+6] // physical button #6 not used
|
||||
mapping[btn_off+7] = JOY_L | JOY_L2; // also bind to buttons for flippers
|
||||
mapping[btn_off+8] = JOY_R | JOY_R2; // also bind to buttons for flippers
|
||||
//9 and 10 not used
|
||||
|
||||
@@ -11,15 +11,24 @@
|
||||
|
||||
|
||||
#define JOYSTICK_ALIAS_NONE ""
|
||||
#define JOYSTICK_ALIAS_QANBA_Q4RAF "Qanba Q4RAF"
|
||||
#define JOYSTICK_ALIAS_8BITDO_SFC30 "8BitDo SFC30"
|
||||
#define JOYSTICK_ALIAS_CHEAP_SNES "SNES Generic Pad"
|
||||
#define JOYSTICK_ALIAS_IBUFALLO_SNES "iBuffalo SFC BSGP801"
|
||||
#define JOYSTICK_ALIAS_IBUFALLO_NES "iBuffalo FC BGCFC801"
|
||||
#define JOYSTICK_ALIAS_QANBA_Q4RAF "Qanba Q4RAF"
|
||||
#define JOYSTICK_ALIAS_RETROLINK_GC "Retrolink N64/GC"
|
||||
#define JOYSTICK_ALIAS_ROYDS_EX "ROYDS Stick.EX"
|
||||
#define JOYSTICK_ALIAS_NEOGEO_DAPTOR "NEOGEO-daptor"
|
||||
#define JOYSTICK_ALIAS_RETROLINK_NES "Retrolink NES"
|
||||
#define JOYSTICK_ALIAS_RETRO_FREAK "Retro Freak gamepad"
|
||||
#define JOYSTICK_ALIAS_8BITDO_SFC30 "8BitDo SFC30"
|
||||
#define JOYSTICK_ALIAS_ROYDS_EX "ROYDS Stick.EX"
|
||||
#define JOYSTICK_ALIAS_SPEEDLINK_COMP "Speedlink Competition Pro"
|
||||
#define JOYSTICK_ALIAS_ATARI_DAPTOR2 "2600-daptor II"
|
||||
#define JOYSTICK_ALIAS_5200_DAPTOR2 "5200-daptor"
|
||||
#define JOYSTICK_ALIAS_NEOGEO_DAPTOR "NEOGEO-daptor"
|
||||
#define JOYSTICK_ALIAS_VISION_DAPTOR "Vision-daptor"
|
||||
|
||||
// VID of vendors who are consistent
|
||||
#define VID_DAPTOR 0x04D8
|
||||
#define VID_RETROLINK 0x0079
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
@@ -1645,7 +1645,7 @@ void user_io_kbd(unsigned char m, unsigned char *k, uint8_t priority) {
|
||||
|
||||
for(i=0;i<6;i++) {
|
||||
pressed[i] = k[i];
|
||||
keycodes[i] = keycode(pressed[i]);
|
||||
keycodes[i] = pressed[i]; // send raw USB code, not amiga - keycode(pressed[i]);
|
||||
}
|
||||
OsdKeyboardSet(m, keycodes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user