summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-01-16 22:50:02 -0800
committerMike Pavone <pavone@retrodev.com>2013-01-16 22:50:02 -0800
commitb1b72b0599b1c0f16e70ed93b7c2f8955d71b517 (patch)
tree0e0e3d13b3f89203d8a13779f070e31fb4cbd912
parent37c257ea6d0270ca3feac75ba1f88b1ce962c663 (diff)
Fix 6-button controller emulation
-rw-r--r--blastem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/blastem.c b/blastem.c
index bc67799..3e6e235 100644
--- a/blastem.c
+++ b/blastem.c
@@ -276,15 +276,15 @@ void io_data_read(io_port * pad, m68k_context * context)
printf("io_data_read | control: %X, TH: %X, GAMEPAD_TH0: %X, GAMEPAD_TH1: %X, TH Counter: %d, Timeout: %d, Cycle: %d\n", control, th, pad->input[GAMEPAD_TH0], pad->input[GAMEPAD_TH1], pad->th_counter,pad->timeout_cycle, context->current_cycle);
}*/
if (th) {
- if (pad->th_counter == 2) {
+ if (pad->th_counter == 3) {
input = pad->input[GAMEPAD_EXTRA];
} else {
input = pad->input[GAMEPAD_TH1];
}
} else {
- if (pad->th_counter == 2) {
+ if (pad->th_counter == 3) {
input = pad->input[GAMEPAD_TH0] | 0xF;
- } else if(pad->th_counter == 3) {
+ } else if(pad->th_counter == 4) {
input = pad->input[GAMEPAD_TH0] & 0x30;
} else {
input = pad->input[GAMEPAD_TH0] | 0xC;