|
|
|
@ -2128,6 +2128,9 @@ static READ8_HANDLER( snesnew_hi_r )
|
|
|
|
|
else if ((state->m_slotcart->get_type() == SNES_ST010 || state->m_slotcart->get_type() == SNES_ST011)
|
|
|
|
|
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
|
|
|
|
|
return state->m_slotcart->m_cart->chip_read(space, offset);
|
|
|
|
|
else if ((state->m_slotcart->get_type() == SNES_ST010 || state->m_slotcart->get_type() == SNES_ST011)
|
|
|
|
|
&& (offset == 0x600000 || offset == 0x600001))
|
|
|
|
|
return state->m_slotcart->m_cart->chip_read(space, offset);
|
|
|
|
|
else if (state->m_slotcart->get_type() == SNES_SRTC
|
|
|
|
|
&& (offset < 0x400000 && (offset & 0xffff) == 0x2800))
|
|
|
|
|
return state->m_slotcart->m_cart->chip_read(space, offset & 0xffff);
|
|
|
|
@ -2197,6 +2200,9 @@ static WRITE8_HANDLER( snesnew_lo_w )
|
|
|
|
|
else if ((state->m_slotcart->get_type() == SNES_ST010 || state->m_slotcart->get_type() == SNES_ST011)
|
|
|
|
|
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
|
|
|
|
|
state->m_slotcart->m_cart->chip_write(space, offset, data);
|
|
|
|
|
else if ((state->m_slotcart->get_type() == SNES_ST010 || state->m_slotcart->get_type() == SNES_ST011)
|
|
|
|
|
&& (offset == 0x600000 || offset == 0x600001))
|
|
|
|
|
state->m_slotcart->m_cart->chip_write(space, offset, data);
|
|
|
|
|
else if (state->m_slotcart->get_type() == SNES_SRTC
|
|
|
|
|
&& (offset < 0x400000 && (offset & 0xffff) == 0x2801))
|
|
|
|
|
state->m_slotcart->m_cart->chip_write(space, offset & 0xffff, data);
|
|
|
|
@ -2271,6 +2277,9 @@ static WRITE8_HANDLER( snesnew_hi_w )
|
|
|
|
|
else if ((state->m_slotcart->get_type() == SNES_ST010 || state->m_slotcart->get_type() == SNES_ST011)
|
|
|
|
|
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
|
|
|
|
|
state->m_slotcart->m_cart->chip_write(space, offset, data);
|
|
|
|
|
else if ((state->m_slotcart->get_type() == SNES_ST010 || state->m_slotcart->get_type() == SNES_ST011)
|
|
|
|
|
&& (offset == 0x600000 || offset == 0x600001))
|
|
|
|
|
state->m_slotcart->m_cart->chip_write(space, offset, data);
|
|
|
|
|
else if (state->m_slotcart->get_type() == SNES_SRTC
|
|
|
|
|
&& (offset < 0x400000 && (offset & 0xffff) == 0x2801))
|
|
|
|
|
state->m_slotcart->m_cart->chip_write(space, offset & 0xffff, data);
|
|
|
|
@ -2365,18 +2374,30 @@ static MACHINE_START( snesnew )
|
|
|
|
|
|
|
|
|
|
state->m_type = state->m_slotcart->get_type();
|
|
|
|
|
|
|
|
|
|
MACHINE_START_CALL(snes);
|
|
|
|
|
MACHINE_START_CALL(snes_mess);
|
|
|
|
|
|
|
|
|
|
// FIXME: why installing handlers here does not work? it would allow to clean up handlers above...
|
|
|
|
|
// in progress...
|
|
|
|
|
switch (state->m_type)
|
|
|
|
|
{
|
|
|
|
|
case SNES_MODE21:
|
|
|
|
|
case SNES_MODE25:
|
|
|
|
|
case SNES_DSP_MODE21:
|
|
|
|
|
machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x000000, 0x7dffff, FUNC(snes21_lo_r), FUNC(snes21_lo_w));
|
|
|
|
|
machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x800000, 0xffffff, FUNC(snes21_hi_r), FUNC(snes21_hi_w));
|
|
|
|
|
set_5a22_map(*state->m_maincpu);
|
|
|
|
|
break;
|
|
|
|
|
case SNES_DSP_MODE21:
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x000000, 0x7dffff, FUNC(snes21_lo_r), FUNC(snes21_lo_w));
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x800000, 0xffffff, FUNC(snes21_hi_r), FUNC(snes21_hi_w));
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0x1f0000, 0, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart));
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0x1f0000, 0, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart));
|
|
|
|
|
// set_5a22_map(*state->m_maincpu);
|
|
|
|
|
break;
|
|
|
|
|
case SNES_SRTC:
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x000000, 0x7dffff, FUNC(snes21_lo_r), FUNC(snes21_lo_w));
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x800000, 0xffffff, FUNC(snes21_hi_r), FUNC(snes21_hi_w));
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0x3f0000, 0, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart));
|
|
|
|
|
// machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0x3f0000, 0, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart));
|
|
|
|
|
// set_5a22_map(*state->m_maincpu);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|