Mapper 71 fix hardwired mirroring restore after power/savestate, fix uninitialized preg. See issue #389
This commit is contained in:
parent
d319b5574f
commit
73e0aacb8c
|
@ -21,6 +21,7 @@
|
|||
#include "mapinc.h"
|
||||
|
||||
static uint8 preg, mirr;
|
||||
static int hardmirr;
|
||||
|
||||
static SFORMAT StateRegs[] =
|
||||
{
|
||||
|
@ -35,6 +36,8 @@ static void Sync(void) {
|
|||
setchr8(0);
|
||||
if(mirr)
|
||||
setmirror(mirr);
|
||||
else
|
||||
setmirror(hardmirr); // restore hardwired mirroring
|
||||
}
|
||||
|
||||
static DECLFW(M71Write) {
|
||||
|
@ -46,6 +49,7 @@ static DECLFW(M71Write) {
|
|||
}
|
||||
|
||||
static void M71Power(void) {
|
||||
preg = 0;
|
||||
mirr = 0;
|
||||
Sync();
|
||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||
|
@ -57,6 +61,7 @@ static void StateRestore(int version) {
|
|||
}
|
||||
|
||||
void Mapper71_Init(CartInfo *info) {
|
||||
hardmirr = info->mirror;
|
||||
info->Power = M71Power;
|
||||
GameStateRestore = StateRestore;
|
||||
|
||||
|
|
Loading…
Reference in New Issue