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:
parent
d8c203a69a
commit
c08183f082
|
@ -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>
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "MAPPER079":
|
||||
case "MAPPER078":
|
||||
break;
|
||||
case "IREM-HOLYDIVER":
|
||||
holydiver = true;
|
||||
|
|
Loading…
Reference in New Issue