From b1b72b0599b1c0f16e70ed93b7c2f8955d71b517 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Wed, 16 Jan 2013 22:50:02 -0800 Subject: Fix 6-button controller emulation --- blastem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'blastem.c') 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; -- cgit v1.2.3