(MESS) snes: more accurate mapping of the seta DSP chip for snesnew. nw

This commit is contained in:
Fabio Priuli 2013-03-10 18:24:39 +00:00
parent 903eef77c7
commit 1e94e03b78
2 changed files with 21 additions and 18 deletions

View File

@ -2215,11 +2215,11 @@ READ8_MEMBER( snsnew_state::snesnew_lo_r )
else if (m_slotcart->get_type() == SNES_OBC1
&& (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
return m_slotcart->m_cart->chip_read(space, offset);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
else if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this break moritash?
&& (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
return m_slotcart->m_cart->chip_read(space, offset);
else if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this freeze moritash?
&& (offset == 0x600000 || offset == 0x600001))
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
return m_slotcart->m_cart->chip_read(space, offset);
else if (m_slotcart->get_type() == SNES_SRTC
&& (offset < 0x400000 && (offset & 0xffff) == 0x2800))
@ -2280,10 +2280,10 @@ READ8_MEMBER( snsnew_state::snesnew_hi_r )
&& (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
return m_slotcart->m_cart->chip_read(space, offset);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
&& (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
return m_slotcart->m_cart->chip_read(space, offset);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset == 0x600000 || offset == 0x600001))
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
return m_slotcart->m_cart->chip_read(space, offset);
else if (m_slotcart->get_type() == SNES_SRTC
&& (offset < 0x400000 && (offset & 0xffff) == 0x2800))
@ -2350,10 +2350,10 @@ WRITE8_MEMBER( snsnew_state::snesnew_lo_w )
&& (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
m_slotcart->m_cart->chip_write(space, offset, data);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
&& (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
m_slotcart->m_cart->chip_write(space, offset, data);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset == 0x600000 || offset == 0x600001))
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
m_slotcart->m_cart->chip_write(space, offset, data);
else if (m_slotcart->get_type() == SNES_SRTC
&& (offset < 0x400000 && (offset & 0xffff) == 0x2801))
@ -2425,10 +2425,10 @@ WRITE8_MEMBER( snsnew_state::snesnew_hi_w )
&& (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
return m_slotcart->m_cart->chip_write(space, offset, data);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
&& (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
m_slotcart->m_cart->chip_write(space, offset, data);
else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
&& (offset == 0x600000 || offset == 0x600001))
&& (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
m_slotcart->m_cart->chip_write(space, offset, data);
else if (m_slotcart->get_type() == SNES_SRTC
&& (offset < 0x400000 && (offset & 0xffff) == 0x2801))

View File

@ -214,7 +214,10 @@ WRITE8_MEMBER( sns_rom21_necdsp_device::chip_write )
READ8_MEMBER( sns_rom_setadsp_device::chip_read )
{
if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)
if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)
m_upd96050->snesdsp_read((offset & 0x01) ? FALSE : TRUE);
if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)
{
UINT16 address = offset & 0xffff;
UINT16 temp = m_upd96050->dataram_r(address/2);
@ -223,8 +226,6 @@ READ8_MEMBER( sns_rom_setadsp_device::chip_read )
else
return temp & 0xff;
}
if (offset == 0x600000 || offset == 0x600001)
return (offset & 1) ? m_upd96050->snesdsp_read(FALSE) : m_upd96050->snesdsp_read(TRUE);
return 0xff;
}
@ -232,7 +233,13 @@ READ8_MEMBER( sns_rom_setadsp_device::chip_read )
WRITE8_MEMBER( sns_rom_setadsp_device::chip_write )
{
if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)
if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)
{
m_upd96050->snesdsp_write((offset & 0x01) ? FALSE : TRUE, data);
return;
}
if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)
{
UINT16 address = offset & 0xffff;
UINT16 temp = m_upd96050->dataram_r(address/2);
@ -251,10 +258,6 @@ WRITE8_MEMBER( sns_rom_setadsp_device::chip_write )
m_upd96050->dataram_w(address/2, temp);
return;
}
if (offset == 0x600000)
m_upd96050->snesdsp_write(TRUE, data);
if (offset == 0x600001)
m_upd96050->snesdsp_write(FALSE, data);
}