mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
md, minor cleanup for region code handling
This commit is contained in:
parent
6a996613a9
commit
7cbd42bc54
2 changed files with 7 additions and 5 deletions
|
@ -1341,10 +1341,6 @@ static void PicoCartDetect(const char *carthw_cfg)
|
||||||
memset(Pico.sv.data, 0xff, Pico.sv.size);
|
memset(Pico.sv.data, 0xff, Pico.sv.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unusual region 'code'
|
|
||||||
if (rom_strcmp(0x1f0, "EUROPE") == 0 || rom_strcmp(0x1f0, "Europe") == 0)
|
|
||||||
*(u32 *) (Pico.rom + 0x1f0) = CPU_LE4(0x20204520);
|
|
||||||
|
|
||||||
// tweak for Blackthorne: master SH2 overwrites stack of slave SH2 being in PWM
|
// tweak for Blackthorne: master SH2 overwrites stack of slave SH2 being in PWM
|
||||||
// interrupt. On real hardware, nothing happens since slave fetches the values
|
// interrupt. On real hardware, nothing happens since slave fetches the values
|
||||||
// it has written from its cache, but picodrive doesn't emulate caching.
|
// it has written from its cache, but picodrive doesn't emulate caching.
|
||||||
|
|
|
@ -97,15 +97,21 @@ PICO_INTERNAL void PicoDetectRegion(void)
|
||||||
{
|
{
|
||||||
int support=0, hw=0, i;
|
int support=0, hw=0, i;
|
||||||
unsigned char pal=0;
|
unsigned char pal=0;
|
||||||
|
char *pr = (char *)(Pico.rom + 0x1f0);
|
||||||
|
|
||||||
if (PicoIn.regionOverride)
|
if (PicoIn.regionOverride)
|
||||||
{
|
{
|
||||||
support = PicoIn.regionOverride;
|
support = PicoIn.regionOverride;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(pr, "EUROPE") == 0 || strcmp(pr, "Europe") == 0)
|
||||||
|
{
|
||||||
|
// Unusual cartridge region 'code'
|
||||||
|
support|=8;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Read cartridge region data:
|
// Read cartridge region data:
|
||||||
unsigned short *rd = (unsigned short *)(Pico.rom + 0x1f0);
|
unsigned short *rd = (unsigned short *)pr;
|
||||||
int region = (rd[0] << 16) | rd[1];
|
int region = (rd[0] << 16) | rd[1];
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue