From 7c938de49b43b0d0d2b0cf1a3de03ab64631a469 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Wed, 1 Jan 2020 12:11:17 +0100 Subject: [PATCH] improve paddle detection (Drone Wars) --- src/emucore/ControllerDetector.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/emucore/ControllerDetector.cxx b/src/emucore/ControllerDetector.cxx index 801a88c17..043c22f4e 100644 --- a/src/emucore/ControllerDetector.cxx +++ b/src/emucore/ControllerDetector.cxx @@ -460,11 +460,12 @@ bool ControllerDetector::usesPaddle(const uInt8* image, size_t size, { 0xa5, 0x08, 0x4c }, // lda INPT0; jmp (only Backgammon) { 0xa4, 0x38, 0x30 }, // ldy INPT0; bmi (no joystick games) }; - const int NUM_SIGS_1 = 3; + const int NUM_SIGS_1 = 4; const int SIG_SIZE_1 = 4; uInt8 signature_1[NUM_SIGS_1][SIG_SIZE_1] = { { 0xb9, 0x08, 0x00, 0x30 }, // lda INPT0,y; bmi (i.a. Encounter at L-5) { 0xb9, 0x38, 0x00, 0x30 }, // lda INPT0|$30,y; bmi (i.a. SW-Jedi Arena, Video Olympics) + { 0xb9, 0x08, 0x00, 0x10 }, // lda INPT0,y; bpl (Drone Wars) { 0x24, 0x08, 0x30, 0x02 }, // bit INPT0; bmi +2 (Picnic) }; const int NUM_SIGS_2 = 4; @@ -491,7 +492,7 @@ bool ControllerDetector::usesPaddle(const uInt8* image, size_t size, else if(port == Controller::Jack::Right) { // check for INPT2 and indexed INPT0 access - const int NUM_SIGS_0 = 18; + const int NUM_SIGS_0 = 20; const int SIG_SIZE_0 = 3; uInt8 signature_0[NUM_SIGS_0][SIG_SIZE_0] = { { 0x24, 0x0a, 0x10 }, // bit INPT2; bpl (no joystick games)