From e4998f57fd6719927c3717828776727ac220d887 Mon Sep 17 00:00:00 2001 From: SpinDizzy Date: Thu, 18 Feb 2021 10:35:38 +0000 Subject: [PATCH] Skichamp Driveboard error fix. --- Config/Games.xml | 4 ---- Src/Model3/DriveBoard/SkiBoard.cpp | 15 +++++++-------- Src/Model3/Model3.cpp | 8 -------- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/Config/Games.xml b/Config/Games.xml index c7d206b..dcd0f9f 100644 --- a/Config/Games.xml +++ b/Config/Games.xml @@ -1646,10 +1646,6 @@ - - - - diff --git a/Src/Model3/DriveBoard/SkiBoard.cpp b/Src/Model3/DriveBoard/SkiBoard.cpp index 8329d03..4cf45a3 100644 --- a/Src/Model3/DriveBoard/SkiBoard.cpp +++ b/Src/Model3/DriveBoard/SkiBoard.cpp @@ -119,14 +119,14 @@ UINT8 CSkiBoard::SimulateRead(void) { switch (m_readMode) { - case 0x0: return m_statusFlags; // Status flags + // Note about Driveboard error : + // The value returned by case 0x0 is the error value displayed when error occurs. + // In service menu->output test, you will see "foot ctrl clutch" occilating free/lock due to + // the incrementation of m_statusFlags (000x0000 : x=1=lock x=0=free) + + case 0x0: return m_statusFlags++; // Status flags - Increment every time to bypass driveboard error case 0x1: return m_dip1; // DIP switch 1 value - case 0x2: return m_dip2; // DIP switch 2 value - case 0x3: return m_wheelCenter; // Wheel center - case 0x4: return 0x80; // Cockpit banking center - case 0x5: return m_inputs->skiX->value; // Wheel position - case 0x6: return 0x80; // Cockpit banking position - case 0x7: return m_echoVal; // Init status/echo test + case 0x4: return 0xFF; // Foot sensor Left=0xf0 Right=0x0f Both=0xff default: return 0xFF; } } @@ -255,7 +255,6 @@ CSkiBoard::CSkiBoard(const Util::Config::Node& config) m_simulated = false; m_initialized = false; m_dip1 = 0xCF; - m_dip2 = 0xFF; DebugLog("Built Drive Board (ski pad)\n"); } diff --git a/Src/Model3/Model3.cpp b/Src/Model3/Model3.cpp index 2ce2b86..5b5bd63 100644 --- a/Src/Model3/Model3.cpp +++ b/Src/Model3/Model3.cpp @@ -535,14 +535,6 @@ UINT8 CModel3::ReadInputs(unsigned reg) if ((m_game.inputs & Game::INPUT_MAGTRUCK)) data &= ~(Inputs->magicalPedal2->value << 0); - if ((m_game.inputs & Game::INPUT_SKI)) - { - data = 0xff; - // foot sensor Left=0xf0 Right=0x0f Both=0xff - // rumble skipad is tested here at boot. The rom is patched to avoid driveboard error - // note : there is no driveboard error if sensor value slide slowly from 0x80 to 0xff then set to 0xff when test passed (tested with assigning an axis to this value) - } - return data; case 0x18: // swtrilgy and getbass. Remove IO board error on getbass. Not sure, but may be related to device feedback ?