Mapper 225: Implement extra RAM
Some multicarts are buggy without extra ram implemented, Fix https://github.com/TASEmulators/fceux/issues/467
This commit is contained in:
parent
bef4e80e08
commit
7f4eb7e14f
|
@ -52,15 +52,23 @@ static DECLFW(M225Write) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M225LoWrite) {
|
static DECLFW(M225LoWrite) {
|
||||||
|
if (A & 0x800) {
|
||||||
|
prot[A & 0x03] = V;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFR(M225LoRead) {
|
static DECLFR(M225LoRead) {
|
||||||
return 0;
|
if (A & 0x800) {
|
||||||
|
return prot[A & 3] & 0x0F;
|
||||||
|
}
|
||||||
|
return X.DB;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M225Power(void) {
|
static void M225Power(void) {
|
||||||
prg = 0;
|
prg = 0;
|
||||||
|
chr = 0;
|
||||||
mode = 0;
|
mode = 0;
|
||||||
|
mirr = 0;
|
||||||
Sync();
|
Sync();
|
||||||
SetReadHandler(0x5000, 0x5FFF, M225LoRead);
|
SetReadHandler(0x5000, 0x5FFF, M225LoRead);
|
||||||
SetWriteHandler(0x5000, 0x5FFF, M225LoWrite);
|
SetWriteHandler(0x5000, 0x5FFF, M225LoWrite);
|
||||||
|
@ -70,7 +78,9 @@ static void M225Power(void) {
|
||||||
|
|
||||||
static void M225Reset(void) {
|
static void M225Reset(void) {
|
||||||
prg = 0;
|
prg = 0;
|
||||||
|
chr = 0;
|
||||||
mode = 0;
|
mode = 0;
|
||||||
|
mirr = 0;
|
||||||
Sync();
|
Sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue