[MD] fixed crash when loading TMSS ROM while MD BIOS is enabled / not found

This commit is contained in:
EkeEke 2012-08-19 01:13:03 +02:00
parent 2dcc095c14
commit 0da3182c38
2 changed files with 5 additions and 3 deletions

View File

@ -378,7 +378,8 @@ void gen_tmss_w(unsigned int offset, unsigned int data)
void gen_bankswitch_w(unsigned int data)
{
if (system_hw == SYSTEM_MD)
/* check if BOOT ROM is loaded */
if (system_bios & SYSTEM_MD)
{
if (data & 1)
{
@ -395,7 +396,8 @@ void gen_bankswitch_w(unsigned int data)
unsigned int gen_bankswitch_r(void)
{
if (system_hw == SYSTEM_MD)
/* check if BOOT ROM is loaded */
if (system_bios & SYSTEM_MD)
{
return (m68k.memory_map[0].base == cart.base);
}

View File

@ -193,7 +193,7 @@ void zbank_write_ctrl_io(unsigned int address, unsigned int data)
case 0x41: /* OS ROM */
{
if (address & 1)
if ((config.bios & 1) && (address & 1))
{
gen_bankswitch_w(data & 1);
return;