From 944e4855d9f25ea62635f843c4480f8c7d46c354 Mon Sep 17 00:00:00 2001
From: gm-matthew <108370479+gm-matthew@users.noreply.github.com>
Date: Thu, 2 May 2024 15:43:37 +0100
Subject: [PATCH 1/2] Adding newly dumped version of Scud Race Allow Step 1.5
games to access 53C810 via 0xC00000xx if the netboard is disabled, because
scuddxo requires this
---
Config/Games.xml | 75 ++++++++++++++++++++++++++++++++++++++++++-
Src/Model3/Model3.cpp | 24 +++++++-------
2 files changed, 86 insertions(+), 13 deletions(-)
diff --git a/Config/Games.xml b/Config/Games.xml
index 57347de..caa4ef9 100644
--- a/Config/Games.xml
+++ b/Config/Games.xml
@@ -1554,7 +1554,7 @@
1.5
DSB1
Wheel
- true
+ false
@@ -1618,6 +1618,79 @@
+
+
+
+ Scud Race
+ Export, Deluxe
+ Sega
+ 1996
+
+
+ Sega Model 3
+ 1.5
+ DSB1
+ Wheel
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Src/Model3/Model3.cpp b/Src/Model3/Model3.cpp
index 1d98306..0c6511a 100644
--- a/Src/Model3/Model3.cpp
+++ b/Src/Model3/Model3.cpp
@@ -1015,9 +1015,9 @@ UINT8 CModel3::Read8(UINT32 addr)
break;
// 53C810 SCSI
- case 0xC0: // only on Step 1.0
+ case 0xC0: // only on Step 1.x
#ifndef NET_BOARD
- if (m_game.stepping != "1.0")
+ if (m_game.stepping != "1.0" && m_game.stepping != "1.5")
{
//printf("Model3 : Read8 %x\n", addr);
break;
@@ -1049,7 +1049,7 @@ UINT8 CModel3::Read8(UINT32 addr)
break;
}
}
- else if (m_game.stepping != "1.0") break;
+ else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
#endif
case 0xF9:
case 0xC1:
@@ -1309,9 +1309,9 @@ UINT32 CModel3::Read32(UINT32 addr)
break;
// 53C810 SCSI
- case 0xC0: // only on Step 1.0
+ case 0xC0: // only on Step 1.x
#ifndef NET_BOARD
- if (m_game.stepping != "1.0") // check for Step 1.0
+ if (m_game.stepping != "1.0" && m_game.stepping != "1.5") // check for Step 1.x
break;
#endif
#ifdef NET_BOARD
@@ -1346,7 +1346,7 @@ UINT32 CModel3::Read32(UINT32 addr)
}
}
- else if (m_game.stepping != "1.0") break;
+ else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
#endif
case 0xF9:
case 0xC1:
@@ -1466,9 +1466,9 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
break;
// 53C810 SCSI
- case 0xC0: // only on Step 1.0
+ case 0xC0: // only on Step 1.x
#ifndef NET_BOARD
- if (m_game.stepping != "1.0")
+ if (m_game.stepping != "1.0" && m_game.stepping != "1.5")
goto Unknown8;
#endif
#ifdef NET_BOARD
@@ -1503,7 +1503,7 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
break;
}
- else if (m_game.stepping != "1.0") break;
+ else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
#endif
case 0xF9:
case 0xC1:
@@ -1788,9 +1788,9 @@ void CModel3::Write32(UINT32 addr, UINT32 data)
break;
// 53C810 SCSI
- case 0xC0: // step 1.0 only
+ case 0xC0: // step 1.x only
#ifndef NET_BOARD
- if (m_game.stepping != "1.0")
+ if (m_game.stepping != "1.0" && m_game.stepping != "1.5")
goto Unknown32;
#endif
#ifdef NET_BOARD
@@ -1825,7 +1825,7 @@ void CModel3::Write32(UINT32 addr, UINT32 data)
break;
}
- else if (m_game.stepping != "1.0") break;
+ else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
#endif
case 0xF9:
case 0xC1:
From 39dc16d8bac9a868b7f590c44c508e3df11dabe5 Mon Sep 17 00:00:00 2001
From: gm-matthew <108370479+gm-matthew@users.noreply.github.com>
Date: Thu, 2 May 2024 23:25:53 +0100
Subject: [PATCH 2/2] Use integer value for game stepping
---
Src/Model3/Model3.cpp | 20 ++++++++++----------
Src/Model3/Model3.h | 1 +
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Src/Model3/Model3.cpp b/Src/Model3/Model3.cpp
index 0c6511a..e51e7d2 100644
--- a/Src/Model3/Model3.cpp
+++ b/Src/Model3/Model3.cpp
@@ -1017,7 +1017,7 @@ UINT8 CModel3::Read8(UINT32 addr)
// 53C810 SCSI
case 0xC0: // only on Step 1.x
#ifndef NET_BOARD
- if (m_game.stepping != "1.0" && m_game.stepping != "1.5")
+ if (m_stepping > 0x15)
{
//printf("Model3 : Read8 %x\n", addr);
break;
@@ -1049,7 +1049,7 @@ UINT8 CModel3::Read8(UINT32 addr)
break;
}
}
- else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
+ else if (m_stepping > 0x15) break;
#endif
case 0xF9:
case 0xC1:
@@ -1311,7 +1311,7 @@ UINT32 CModel3::Read32(UINT32 addr)
// 53C810 SCSI
case 0xC0: // only on Step 1.x
#ifndef NET_BOARD
- if (m_game.stepping != "1.0" && m_game.stepping != "1.5") // check for Step 1.x
+ if (m_stepping > 0x15) // check for Step 1.x
break;
#endif
#ifdef NET_BOARD
@@ -1346,7 +1346,7 @@ UINT32 CModel3::Read32(UINT32 addr)
}
}
- else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
+ else if (m_stepping > 0x15) break;
#endif
case 0xF9:
case 0xC1:
@@ -1468,7 +1468,7 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
// 53C810 SCSI
case 0xC0: // only on Step 1.x
#ifndef NET_BOARD
- if (m_game.stepping != "1.0" && m_game.stepping != "1.5")
+ if (m_stepping > 0x15)
goto Unknown8;
#endif
#ifdef NET_BOARD
@@ -1503,7 +1503,7 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
break;
}
- else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
+ else if (m_stepping > 0x15) break;
#endif
case 0xF9:
case 0xC1:
@@ -1790,7 +1790,7 @@ void CModel3::Write32(UINT32 addr, UINT32 data)
// 53C810 SCSI
case 0xC0: // step 1.x only
#ifndef NET_BOARD
- if (m_game.stepping != "1.0" && m_game.stepping != "1.5")
+ if (m_stepping > 0x15)
goto Unknown32;
#endif
#ifdef NET_BOARD
@@ -1825,7 +1825,7 @@ void CModel3::Write32(UINT32 addr, UINT32 data)
break;
}
- else if (m_game.stepping != "1.0" && m_game.stepping != "1.5") break;
+ else if (m_stepping > 0x15) break;
#endif
case 0xF9:
case 0xC1:
@@ -2979,8 +2979,8 @@ bool CModel3::LoadGame(const Game &game, const ROMSet &rom_set)
ppc_set_fetch(PPCFetchRegions);
// Initialize Real3D
- int stepping = ((game.stepping[0] - '0') << 4) | (game.stepping[2] - '0');
- GPU.SetStepping(stepping);
+ m_stepping = ((game.stepping[0] - '0') << 4) | (game.stepping[2] - '0');
+ GPU.SetStepping(m_stepping);
// MPEG board (if present)
if (rom_set.get_rom("mpeg_program").size)
diff --git a/Src/Model3/Model3.h b/Src/Model3/Model3.h
index f0bc8f7..946962e 100644
--- a/Src/Model3/Model3.h
+++ b/Src/Model3/Model3.h
@@ -239,6 +239,7 @@ private:
// Game and hardware information
Game m_game;
+ int m_stepping;
// Game inputs and outputs
CInputs *Inputs;