Fix Mapper 45

following FCEUX and Nestopia
This commit is contained in:
alyosha-tas 2016-09-08 11:56:54 -04:00 committed by GitHub
parent 7309957c11
commit 0669476250
1 changed files with 10 additions and 27 deletions

View File

@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
regs[cur_reg] = value; regs[cur_reg] = value;
IncrementCounter(); IncrementCounter();
Sync45(); Sync45();
} }
} }
private void Sync45() private void Sync45()
@ -94,37 +94,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
private int CHR_AND() private int CHR_AND()
{ {
switch (regs[2] & 0x0F)
if (regs[2]==0)
{ {
default: return 0xFF;
case 0: }
case 1: return (0xFF >> ~((regs[2] & 0x0F)|0xF0));
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return 0x00;
case 8:
return 0x01;
case 9:
case 0xA:
case 0xB:
case 0xC:
case 0xD:
return 0x3F;
case 0xE:
return 0x7F;
case 0xF:
return 0xFF;
}
} }
private int CHR_OR() private int CHR_OR()
{ {
int x = regs[0] | ((regs[2] >> 4) << 8); int temp = regs[2] >> 4;
temp = temp << 8;
int x = regs[0] | (temp);
return x; return x;
} }