mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 15:15:40 +00:00
Use correct PCI IDs (Harry Tuttle)
This commit is contained in:
parent
80cf1f9b52
commit
9f5a19a04a
|
@ -457,7 +457,7 @@
|
|||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- Skips over cabinet network error (not required, but speeds up boot) -->
|
||||
<!-- Skips over cabinet network error -->
|
||||
<patch region="crom" bits="32" offset="0x4a45e4" value="0x60000000" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
|
@ -574,7 +574,7 @@
|
|||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- Skips over cabinet network error (not required, but speeds up boot) -->
|
||||
<!-- Skips over cabinet network error -->
|
||||
<patch region="crom" bits="32" offset="0x4a45e4" value="0x60000000" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
|
@ -850,11 +850,7 @@
|
|||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- Base offset of program in CROM space: 0x6473c0 (0x473c0 in the ROM) -->
|
||||
<patch region="crom" bits="32" offset="0x0D8C4C" value="0x00000002" /> <!-- comm. mode: 00=master, 01=slave, 02=satellite -->
|
||||
<patch region="crom" bits="32" offset="0x13FE38" value="0x38840004" /> <!-- an actual bug in the game code -->
|
||||
</patches>
|
||||
<!-- Base offset of program in CROM space: 0x6473c0 (0x0473c0 in the ROM) -->
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-19890b.20" crc32="0x9C16C3CC" />
|
||||
<file offset="2" name="epr-19889b.19" crc32="0xD1F7E44C" />
|
||||
|
@ -1128,6 +1124,10 @@
|
|||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- Secret debug menu -->
|
||||
<patch region="crom" bits="32" offset="0x199DE8" value="0x00050208" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-19734.20" crc32="0xBE897336" />
|
||||
<file offset="2" name="epr-19733.19" crc32="0x6565E29A" />
|
||||
|
@ -1639,6 +1639,7 @@
|
|||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- Unemulated JTAG stuff -->
|
||||
<patch region="crom" bits="32" offset="0x7c0c4" value="0x60000000" />
|
||||
<patch region="crom" bits="32" offset="0x7c0c8" value="0x60000000" />
|
||||
<patch region="crom" bits="32" offset="0x7c0cc" value="0x60000000" />
|
||||
|
@ -1810,14 +1811,8 @@
|
|||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<patch region="crom" bits="32" offset="0xf0e48" value="0x60000000" />
|
||||
<patch region="crom" bits="32" offset="0x043dc" value="0x48000090" /> <!-- related to joystick feedback -->
|
||||
<patch region="crom" bits="32" offset="0x029a0" value="0x60000000" /> <!-- skip force feedback setup? -->
|
||||
<patch region="crom" bits="32" offset="0x02a0c" value="0x60000000" />
|
||||
<!-- Additional patches from MAME for test menu -->
|
||||
<patch region="crom" bits="32" offset="0xf776c" value="0x60000000" /> <!-- unemulated JTAG stuff -->
|
||||
<patch region="crom" bits="32" offset="0xf7770" value="0x60000000" /> <!-- "" -->
|
||||
<patch region="crom" bits="32" offset="0xf7774" value="0x60000000" /> <!-- "" -->
|
||||
<!-- skip force feedback lever check -->
|
||||
<patch region="crom" bits="32" offset="0xf6e44" value="0x60000000" /> <!-- from MAME -->
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-21382a.20" crc32="0x69BAF117" />
|
||||
|
@ -1876,7 +1871,8 @@
|
|||
<file offset="0x800000" name="mpr-21377.22" crc32="0x720621F8" />
|
||||
<file offset="0xC00000" name="mpr-21378.24" crc32="0x1FCF715E" />
|
||||
</region>
|
||||
<!-- Force feedback controller prg
|
||||
<!-- Force feedback controller prg -->
|
||||
<!--
|
||||
<region name="ffb_program" stride="1" chunk_size="1">
|
||||
<file offset="0" name="epr-21119.ic8" crc32="0x65082B14" />
|
||||
</region>
|
||||
|
@ -1902,6 +1898,7 @@
|
|||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- skip force feedback lever check -->
|
||||
<patch region="crom" bits="32" offset="0xf6dd0" value="0x60000000" /> <!-- from MAME -->
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
|
@ -2293,16 +2290,6 @@
|
|||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!--
|
||||
VS215 is a modification of VS2 that runs on Step 1.5 boards. I
|
||||
suspect the code here is trying to detect the system type.
|
||||
|
||||
The patch branches to 0xFFF01630:
|
||||
0x48000000 + (0xFFF01630 - 0xFFF001A8) = 0x48001488
|
||||
-->
|
||||
<patch region="crom" bits="32" offset="0x1001a8" value="0x48001488" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-19897.20" crc32="0x25A722A9" />
|
||||
<file offset="2" name="epr-19898.19" crc32="0x4389D9CE" />
|
||||
|
@ -2330,10 +2317,6 @@
|
|||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- See note in VS215 -->
|
||||
<patch region="crom" bits="32" offset="0x1001a8" value="0x48001488" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-19803.20" crc32="0x1E55A5B8" />
|
||||
<file offset="2" name="epr-19804.19" crc32="0xBBACA578" />
|
||||
|
@ -2362,18 +2345,6 @@
|
|||
<encryption_key>0x29234e96</encryption_key>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!--
|
||||
Offset of program relative to CROM base: 0x600000 (0x200000 in the
|
||||
ROM itself). Inexplicably, at PC=AFC1C, a call is made to FC78, which
|
||||
is right in the middle of some totally unrelated initialization code
|
||||
(ASIC checks). This causes an invalid pointer to be fetched. Perhaps
|
||||
FC78 should be overwritten with other program data by then? Why is it
|
||||
not? Or, 300138 needs to be written with a non-zero value, it is
|
||||
loaded from EEPROM but is 0.
|
||||
-->
|
||||
<patch region="crom" bits="32" offset="0x2afc1c" value="0x60000000" /> <!-- 0x6afc1c from base of CROM -->
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-20920.20" crc32="0x428D05FC" />
|
||||
<file offset="2" name="epr-20919.19" crc32="0x7A0713D2" />
|
||||
|
@ -2448,10 +2419,6 @@
|
|||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- See note in VS215 -->
|
||||
<patch region="crom" bits="32" offset="0x1001a8" value="0x48001488" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-20912.20" crc32="0xCD2C0538" />
|
||||
<file offset="2" name="epr-20911.19" crc32="0xACB8FD97" />
|
||||
|
@ -2581,10 +2548,6 @@
|
|||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
<patches>
|
||||
<!-- See note in VS215 -->
|
||||
<patch region="crom" bits="32" offset="0x1001a8" value="0x48001488" />
|
||||
</patches>
|
||||
<region name="crom" stride="8" chunk_size="2" byte_swap="true">
|
||||
<file offset="0" name="epr-21534.20" crc32="0xD49AE219" />
|
||||
<file offset="2" name="epr-21533.19" crc32="0xEA728471" />
|
||||
|
|
|
@ -26,9 +26,6 @@ CNew3D::CNew3D(const Util::Config::Node &config, std::string gameName)
|
|||
m_textureRAM = nullptr;
|
||||
m_sunClamp = true;
|
||||
m_shadeIsSigned = true;
|
||||
|
||||
// Fall-back mechanism for games with patched (not working) JTAG
|
||||
if (m_gameName == "swtrilgy") m_shadeIsSigned = false;
|
||||
}
|
||||
|
||||
CNew3D::~CNew3D()
|
||||
|
@ -1665,8 +1662,6 @@ void CNew3D::SetSunClamp(bool enable)
|
|||
|
||||
void CNew3D::SetSignedShade(bool enable)
|
||||
{
|
||||
if (m_gameName == "swtrilgy") return; // jtag has been patched out in star wars - todo fix this
|
||||
|
||||
m_shadeIsSigned = enable;
|
||||
}
|
||||
|
||||
|
|
|
@ -919,7 +919,9 @@ UINT8 CModel3::Read8(UINT32 addr)
|
|||
// Sound Board
|
||||
case 0x08:
|
||||
if ((addr & 0xF) == 4) // MIDI control port
|
||||
|
||||
return 0x83; // magtruck country check
|
||||
|
||||
else
|
||||
return 0;
|
||||
break;
|
||||
|
@ -1580,6 +1582,7 @@ void CModel3::Write16(UINT32 addr, UINT16 data)
|
|||
case 0xC0: // skichamp only
|
||||
//printf("CModel 3 : write16 %x<-%x\n", addr, data);
|
||||
|
||||
|
||||
switch ((addr & 0x3ffff) >> 16)
|
||||
{
|
||||
case 0:
|
||||
|
@ -1588,7 +1591,7 @@ void CModel3::Write16(UINT32 addr, UINT16 data)
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("CMODEL3 : unknown W16 : %x\n", addr >> 24);
|
||||
//printf("CMODEL3 : unknown W16 : %x\n", addr >> 24);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2647,7 +2650,6 @@ int CModel3::StartDriveBoardThread(void *data)
|
|||
return model3->RunDriveBoardThread();
|
||||
}
|
||||
|
||||
|
||||
int CModel3::RunMainBoardThread(void)
|
||||
{
|
||||
for (;;)
|
||||
|
@ -2945,8 +2947,6 @@ ThreadError:
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CModel3::Reset(void)
|
||||
{
|
||||
// Clear memory (but do not modify backup RAM!)
|
||||
|
@ -3100,7 +3100,10 @@ bool CModel3::LoadGame(const Game &game, const ROMSet &rom_set)
|
|||
ppc_config.pvr = PPC_MODEL_603E; // 100 MHz
|
||||
ppc_config.bus_frequency = BUS_FREQUENCY_66MHZ;
|
||||
ppc_config.bus_frequency_multiplier = 0x15; // 1.5X multiplier
|
||||
if (game.name == "scudp1")
|
||||
if (game.name == "scudplusa"
|
||||
|| game.name == "vs215" || game.name == "vs215o"
|
||||
|| game.name == "vs29815" || game.name == "vs29915"
|
||||
)
|
||||
PCIBridge.SetModel(0x106); // some Step 1.x games use MPC106
|
||||
else
|
||||
PCIBridge.SetModel(0x105); // MPC105
|
||||
|
@ -3110,7 +3113,8 @@ bool CModel3::LoadGame(const Game &game, const ROMSet &rom_set)
|
|||
ppc_config.pvr = PPC_MODEL_603R; // 66 MHz
|
||||
ppc_config.bus_frequency = BUS_FREQUENCY_66MHZ;
|
||||
ppc_config.bus_frequency_multiplier = 0x10; // 1X multiplier
|
||||
if (game.name == "bass" || game.name == "getbass")
|
||||
if (game.name == "bass" || game.name == "bassdx" || game.name == "getbass")
|
||||
|
||||
PCIBridge.SetModel(0x106); // some Step 1.x games use MPC106
|
||||
else
|
||||
PCIBridge.SetModel(0x105); // MPC105
|
||||
|
@ -3135,7 +3139,17 @@ bool CModel3::LoadGame(const Game &game, const ROMSet &rom_set)
|
|||
|
||||
// Initialize Real3D
|
||||
int stepping = ((game.stepping[0] - '0') << 4) | (game.stepping[2] - '0');
|
||||
GPU.SetStepping(stepping);
|
||||
// Some step 2+ games need the older PCI ID (obvious symptom:
|
||||
// vbl is enabled briefly then disabled so the game hangs)
|
||||
bool step20_with_old_real3d;
|
||||
if (game.name == "von2" || game.name == "von2a" || game.name == "von254g"
|
||||
|| game.name == "dirtdvls" || game.name == "dirtdvlsa" || game.name == "dirtdvlsj"
|
||||
|| game.name == "magtruck" || game.name == "lamachin"
|
||||
)
|
||||
step20_with_old_real3d = true;
|
||||
else
|
||||
step20_with_old_real3d = false;
|
||||
GPU.SetStepping(stepping, step20_with_old_real3d);
|
||||
|
||||
// MPEG board (if present)
|
||||
if (rom_set.get_rom("mpeg_program").size)
|
||||
|
@ -3411,7 +3425,6 @@ CModel3::~CModel3(void)
|
|||
DSB = NULL;
|
||||
}
|
||||
|
||||
|
||||
Inputs = NULL;
|
||||
Outputs = NULL;
|
||||
ram = NULL;
|
||||
|
|
|
@ -631,9 +631,9 @@ void CReal3D::WriteDMARegister32(unsigned reg, uint32_t data)
|
|||
IRQ->Assert(dmaIRQ);
|
||||
break;
|
||||
case 0x10: // command register
|
||||
if ((data&0x20000000))
|
||||
if ((data&0x20000000)) // DMA ID command
|
||||
{
|
||||
dmaData = 0x16C311DB; // Virtual On 2 expects this from DMA
|
||||
dmaData = pciID;
|
||||
DebugLog("Real3D: DMA ID command issued (ATTENTION: make sure we're returning the correct value), PC=%08X, LR=%08X\n", ppc_get_pc(), ppc_get_lr());
|
||||
}
|
||||
else if ((data&0x80000000))
|
||||
|
@ -678,6 +678,7 @@ void CReal3D::Flush(void)
|
|||
|
||||
UploadTexture(header,(uint16_t *)&textureFIFO[i+2]);
|
||||
DebugLog("Real3D: Texture upload completed: %X bytes (%X)\n", size*4, textureFIFO[i+0]);
|
||||
|
||||
i += size;
|
||||
}
|
||||
}
|
||||
|
@ -868,7 +869,8 @@ uint32_t CReal3D::GetASICIDCode(ASIC asic) const
|
|||
return it == m_asicID.end() ? 0 : it->second;
|
||||
}
|
||||
|
||||
void CReal3D::SetStepping(int stepping)
|
||||
void CReal3D::SetStepping(int stepping, bool step20_with_old_real3d)
|
||||
|
||||
{
|
||||
step = stepping;
|
||||
if ((step!=0x10) && (step!=0x15) && (step!=0x20) && (step!=0x21))
|
||||
|
@ -878,7 +880,9 @@ void CReal3D::SetStepping(int stepping)
|
|||
}
|
||||
|
||||
// Set PCI ID
|
||||
if (step < 0x20)
|
||||
// Some step 2+ games need the older PCI ID (obvious symptom:
|
||||
// vbl is enabled briefly then disabled so the game hangs)
|
||||
if ((step < 0x20) || step20_with_old_real3d)
|
||||
pciID = 0x16C311DB; // vendor 0x11DB = Sega
|
||||
else
|
||||
pciID = 0x178611DB;
|
||||
|
|
|
@ -362,7 +362,8 @@ public:
|
|||
* stepping 0x10 for Step 1.0, 0x15 for Step 1.5, 0x20 for Step 2.0, or
|
||||
* 0x21 for Step 2.1. Anything else defaults to 1.0.
|
||||
*/
|
||||
void SetStepping(int stepping);
|
||||
void SetStepping(int stepping, bool step20_with_old_real3d);
|
||||
|
||||
|
||||
/*
|
||||
* Init(vromPtr, BusObjectPtr, IRQObjectPtr, dmaIRQBit):
|
||||
|
|
Loading…
Reference in a new issue