NES: fix mapper 113 with latest in nesdev information

This commit is contained in:
goyuken 2014-01-12 16:19:14 +00:00
parent 25d7a7e2fa
commit 324f3c77a9
1 changed files with 12 additions and 9 deletions

View File

@ -82,20 +82,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
break; break;
default: default:
//apparently these regs are patched in over the WRAM.. //apparently these regs are patched in over the WRAM..
base.WriteWRAM(addr,value); base.WriteWRAM(addr, value);
break; break;
} }
} }
} }
//AKA mapper 079 // according to the latest on nesdev:
//historically, mapper 113 is confused with this, but I can't find any need for mapper 113. bootgod's db has nothing for mapper 113 // mapper 079: [.... PCCC] @ 4100
// mapper 113: [MCPP PCCC] @ 4100 (no games for this are in bootgod)
class AVE_NINA_006 : NES.NESBoardBase class AVE_NINA_006 : NES.NESBoardBase
{ {
//configuration //configuration
int prg_bank_mask_32k, chr_bank_mask_8k; int prg_bank_mask_32k, chr_bank_mask_8k;
//bool mirror_control_enabled; bool mirror_control_enabled;
//state //state
int chr_bank_8k, prg_bank_32k; int chr_bank_8k, prg_bank_32k;
@ -113,8 +114,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
switch (Cart.board_type) switch (Cart.board_type)
{ {
case "MAPPER079": case "MAPPER079":
AssertPrg(32, 64); AssertChr(32, 64);
break; break;
case "MAPPER113": case "MAPPER113":
mirror_control_enabled = true;
break; break;
case "AVE-NINA-06": //Blackjack (U) case "AVE-NINA-06": //Blackjack (U)
case "AVE-NINA-03": //F-15 City War (U) case "AVE-NINA-03": //F-15 City War (U)
@ -147,7 +150,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
chr_bank_8k &= chr_bank_mask_8k; chr_bank_8k &= chr_bank_mask_8k;
prg_bank_32k = ((value >> 3) & 7); prg_bank_32k = ((value >> 3) & 7);
prg_bank_32k &= prg_bank_mask_32k; prg_bank_32k &= prg_bank_mask_32k;
//if (mirror_control_enabled) SetMirrorType(value.Bit(7) ? EMirrorType.Vertical : EMirrorType.Horizontal); if (mirror_control_enabled)
SetMirrorType(value.Bit(7) ? EMirrorType.Vertical : EMirrorType.Horizontal);
//NES.LogLine("chr={0:X2}, prg={1:X2}, with val={2:X2}", chr_reg, prg_reg, value); //NES.LogLine("chr={0:X2}, prg={1:X2}, with val={2:X2}", chr_reg, prg_reg, value);
break; break;
} }
@ -166,10 +170,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
addr |= (chr_bank_8k << 13); addr |= (chr_bank_8k << 13);
return VROM[addr]; return VROM[addr];
} }
else return base.ReadPPU(addr); else
return base.ReadPPU(addr);
} }
} }
} }