mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
added 12-in-1 mapper to carthw
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@369 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
48df6e9e54
commit
757f8dae1a
7 changed files with 87 additions and 22 deletions
|
@ -303,19 +303,8 @@ static void OtherWrite8End(u32 a,u32 d,int realsize)
|
|||
#endif
|
||||
elprintf(EL_UIO, "strange w%i: %06x, %08x @%06x", realsize, a&0xffffff, d, SekPc);
|
||||
|
||||
if(a >= 0xA13004 && a < 0xA13040) {
|
||||
// dumb 12-in-1 or 4-in-1 banking support
|
||||
int len;
|
||||
a &= 0x3f; a <<= 16;
|
||||
len = Pico.romsize - a;
|
||||
if (len <= 0) return; // invalid/missing bank
|
||||
if (len > 0x200000) len = 0x200000; // 2 megs
|
||||
memcpy(Pico.rom, Pico.rom+a, len); // code which does this is in RAM so this is safe.
|
||||
return;
|
||||
}
|
||||
|
||||
// for games with simple protection devices, discovered by Haze
|
||||
else if ((a>>22) == 1)
|
||||
if ((a>>22) == 1)
|
||||
Pico.m.prot_bytes[(a>>2)&1] = (u8)d;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue