mirror of
https://github.com/FunKey-Project/picodrive-irixxxx.git
synced 2026-02-05 22:45:54 +01:00
sms, set non-TMR images to region Japan
core, fix libretro toolchain bug on wiiu
This commit is contained in:
parent
0730618791
commit
2852b69bc1
@ -1182,7 +1182,7 @@ PICO_INTERNAL void PicoMemSetupCD(void)
|
||||
|
||||
// setup FAME fetchmap
|
||||
{
|
||||
#ifdef __clang__
|
||||
#if defined __clang__ || defined HW_WUP
|
||||
volatile // prevent strange relocs from clang
|
||||
#endif
|
||||
uptr ptr_ram = (uptr)PicoMem.ram;
|
||||
|
||||
18
pico/sms.c
18
pico/sms.c
@ -509,18 +509,22 @@ void PicoResetMS(void)
|
||||
}
|
||||
if (PicoIn.mapper)
|
||||
Pico.ms.mapper = PicoIn.mapper;
|
||||
if (PicoIn.regionOverride & 1)
|
||||
Pico.m.hardware |= 0x4;
|
||||
Pico.m.hardware |= 0x4; // default region Japan if no TMR header
|
||||
|
||||
// check if the ROM header contains more system information
|
||||
for (tmr = 0x2000; tmr < 0xbfff && tmr <= Pico.romsize; tmr *= 2) {
|
||||
if (!memcmp(Pico.rom + tmr-16, "TMR SEGA", 8)) {
|
||||
hw = Pico.rom[tmr-1] >> 4;
|
||||
if (hw >= 0x5 && hw < 0x8 && !PicoIn.hwSelect)
|
||||
Pico.m.hardware |= 0x1; // GG cartridge detected
|
||||
if ((hw == 0x5 || hw == 0x3) && !PicoIn.regionOverride)
|
||||
Pico.m.hardware |= 0x4; // Region Japan
|
||||
|
||||
if (!PicoIn.hwSelect) {
|
||||
Pico.m.hardware &= ~0x1;
|
||||
if (hw >= 0x5 && hw < 0x8)
|
||||
Pico.m.hardware |= 0x1; // GG cartridge detected
|
||||
}
|
||||
if (!PicoIn.regionOverride) {
|
||||
Pico.m.hardware &= ~0x4;
|
||||
if (hw == 0x5 || hw == 0x3)
|
||||
Pico.m.hardware |= 0x4; // region Japan
|
||||
}
|
||||
id = CPU_LE4(*(u32 *)&Pico.rom[tmr-4]) & 0xf0f0ffff;
|
||||
for (i = 0; i < sizeof(region_pal)/sizeof(*region_pal); i++)
|
||||
if (id == region_pal[i] && !PicoIn.regionOverride) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user