fix bug in mapper 156 reset state (which was actually nonexistent). attn cah4e3-shouldve been broken in fceu-mm too

This commit is contained in:
zeromus 2012-09-01 17:07:29 +00:00
parent c03fd7d23b
commit 13c770ef6e
1 changed files with 14 additions and 0 deletions

View File

@ -77,12 +77,26 @@ static DECLFW(M156Write)
}
}
static void M1566Reset()
{
for(int i=0;i<8;i++)
{
chrlo[i]=0;
chrhi[8]=0;
}
prg=0;
mirr=0;
mirrisused = 0;
}
static void M156Power(void)
{
Sync();
SetReadHandler(0x6000,0xFFFF,CartBR);
SetWriteHandler(0x6000,0x7FFF,CartBW);
SetWriteHandler(0xC000,0xCFFF,M156Write);
M1566Reset();
}
static void M156Close(void)