fix to prev

This commit is contained in:
CaH4e3 2015-08-31 19:16:58 +00:00
parent bbf46b5f9d
commit 884032d42e
1 changed files with 8 additions and 2 deletions

View File

@ -31,7 +31,7 @@ static SFORMAT StateRegs[] =
}; };
static void Sync(void) { static void Sync(void) {
uint8 prg = (addrlatch & 7) | ((addrlatch & 0x40) >> 3); uint8 prg = (addrlatch & 7);
setchr8(datalatch); setchr8(datalatch);
if(addrlatch & 0x80) { if(addrlatch & 0x80) {
setprg16(0x8000,prg); setprg16(0x8000,prg);
@ -50,10 +50,16 @@ static DECLFW(EH8813AWrite) {
Sync(); Sync();
} }
static DECLFR(EH8813ARead) {
if (addrlatch & 0x40)
A &= 0xFFF0;
return CartBR(A);
}
static void EH8813APower(void) { static void EH8813APower(void) {
addrlatch = datalatch = 0; addrlatch = datalatch = 0;
Sync(); Sync();
SetReadHandler(0x8000, 0xFFFF, CartBR); SetReadHandler(0x8000, 0xFFFF, EH8813ARead);
SetWriteHandler(0x8000, 0xFFFF, EH8813AWrite); SetWriteHandler(0x8000, 0xFFFF, EH8813AWrite);
} }