NES: internal debugging infrastructure. when compiled in debug mode, throw if two boards both respond to configure. (in release mode, we short circuit there for speedup). also fix zeromus's fat fingers from r2011

This commit is contained in:
goyuken 2014-01-17 19:53:57 +00:00
parent d8c203a69a
commit c08183f082
2 changed files with 10 additions and 2 deletions

View File

@ -449,6 +449,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
NES nes = new NES();
nes.cart = cart;
Type ret = null;
lock(INESBoardImplementors)
foreach (var type in INESBoardImplementors)
{
@ -464,11 +465,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
board.InitialRegisterValues = properties;
if (board.Configure(origin))
{
#if DEBUG
if (ret != null)
throw new Exception(string.Format("Boards {0} and {1} both responded to Configure!", ret, type));
else
ret = type;
#else
return type;
#endif
}
}
}
return null;
return ret;
}
/// <summary>

View File

@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
switch (Cart.board_type)
{
case "MAPPER079":
case "MAPPER078":
break;
case "IREM-HOLYDIVER":
holydiver = true;