[Core/Input] improved XE-1AP controller emulation (verified on real hardware)

This commit is contained in:
ekeeke 2023-02-05 18:08:05 +01:00
parent a2380d84e0
commit 605a29d7bd
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* Genesis Plus * Genesis Plus
* XE-1AP analog controller support * XE-1AP analog controller support
* *
* Copyright (C) 2011-2015 Eke-Eke (Genesis Plus GX) * Copyright (C) 2011-2022 Eke-Eke (Genesis Plus GX)
* *
* Redistribution and use of this code or any derivative works are permitted * Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: * provided that the following conditions are met:
@ -96,12 +96,12 @@ INLINE unsigned char xe_1ap_read(int index)
case 9: /* CH3 low (Throttle vertical or horizontal direction) */ case 9: /* CH3 low (Throttle vertical or horizontal direction) */
data = input.analog[port+1][0] & 0x0F; data = input.analog[port+1][0] & 0x0F;
break; break;
case 10: /* A B A' B' buttons status (active low) */ case 10: /* N/A */
data = (~input.pad[port] >> 6) & 0x0F;
break;
default: /* N/A */
data = 0x0F; data = 0x0F;
break; break;
case 11: /* A B A' B' buttons status (active low) */
data = (~input.pad[port] >> 6) & 0x0F;
break;
} }
/* TL indicates current data cycle (0=1st cycle, 1=2nd cycle, etc) */ /* TL indicates current data cycle (0=1st cycle, 1=2nd cycle, etc) */

View File

@ -2,7 +2,7 @@
* Genesis Plus * Genesis Plus
* XE-1AP analog controller support * XE-1AP analog controller support
* *
* Copyright (C) 2011-2015 Eke-Eke (Genesis Plus GX) * Copyright (C) 2011-2022 Eke-Eke (Genesis Plus GX)
* *
* Redistribution and use of this code or any derivative works are permitted * Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: * provided that the following conditions are met: