Previous 199869 Revisions Next

r21788 Sunday 10th March, 2013 at 18:24:39 UTC by Fabio Priuli
(MESS) snes: more accurate mapping of the seta DSP chip for snesnew. nw
[src/mess/drivers]snes.c
[src/mess/machine]sns_upd.c

trunk/src/mess/drivers/snes.c
r21787r21788
22152215   else if (m_slotcart->get_type() == SNES_OBC1
22162216            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
22172217      return m_slotcart->m_cart->chip_read(space, offset);
2218   else if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this break moritash?
2219            && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
2220      return m_slotcart->m_cart->chip_read(space, offset);
22182221   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2219            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
2222            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
22202223      return m_slotcart->m_cart->chip_read(space, offset);
2221   else if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this freeze moritash?
2222            && (offset == 0x600000 || offset == 0x600001))
2223      return m_slotcart->m_cart->chip_read(space, offset);
22242224   else if (m_slotcart->get_type() == SNES_SRTC
22252225            && (offset < 0x400000 && (offset & 0xffff) == 0x2800))
22262226         return m_slotcart->m_cart->chip_read(space, offset & 0xffff);
r21787r21788
22802280            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
22812281      return m_slotcart->m_cart->chip_read(space, offset);
22822282   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2283            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
2283            && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
22842284      return m_slotcart->m_cart->chip_read(space, offset);
22852285   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2286            && (offset == 0x600000 || offset == 0x600001))
2286            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
22872287      return m_slotcart->m_cart->chip_read(space, offset);
22882288   else if (m_slotcart->get_type() == SNES_SRTC
22892289            && (offset < 0x400000 && (offset & 0xffff) == 0x2800))
r21787r21788
23502350            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
23512351      m_slotcart->m_cart->chip_write(space, offset, data);
23522352   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2353            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
2353            && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
23542354      m_slotcart->m_cart->chip_write(space, offset, data);
23552355   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2356            && (offset == 0x600000 || offset == 0x600001))
2356            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
23572357      m_slotcart->m_cart->chip_write(space, offset, data);
23582358   else if (m_slotcart->get_type() == SNES_SRTC
23592359            && (offset < 0x400000 && (offset & 0xffff) == 0x2801))
r21787r21788
24252425            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
24262426      return m_slotcart->m_cart->chip_write(space, offset, data);
24272427   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2428            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000))
2428            && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000))
24292429      m_slotcart->m_cart->chip_write(space, offset, data);
24302430   else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011)
2431            && (offset == 0x600000 || offset == 0x600001))
2431            && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000))
24322432      m_slotcart->m_cart->chip_write(space, offset, data);
24332433   else if (m_slotcart->get_type() == SNES_SRTC
24342434            && (offset < 0x400000 && (offset & 0xffff) == 0x2801))
trunk/src/mess/machine/sns_upd.c
r21787r21788
214214
215215READ8_MEMBER( sns_rom_setadsp_device::chip_read )
216216{
217   if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)
217   if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)
218      m_upd96050->snesdsp_read((offset & 0x01) ? FALSE : TRUE);
219   
220   if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)
218221   {
219222      UINT16 address = offset & 0xffff;
220223      UINT16 temp = m_upd96050->dataram_r(address/2);
r21787r21788
223226      else
224227         return temp & 0xff;
225228   }
226   if (offset == 0x600000 || offset == 0x600001)
227      return (offset & 1) ? m_upd96050->snesdsp_read(FALSE) : m_upd96050->snesdsp_read(TRUE);
228229
229230   return 0xff;
230231}
r21787r21788
232233
233234WRITE8_MEMBER( sns_rom_setadsp_device::chip_write )
234235{
235   if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)
236   if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)
236237   {
238      m_upd96050->snesdsp_write((offset & 0x01) ? FALSE : TRUE, data);
239      return;
240   }
241
242   if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)
243   {
237244      UINT16 address = offset & 0xffff;
238245      UINT16 temp = m_upd96050->dataram_r(address/2);
239246
r21787r21788
251258      m_upd96050->dataram_w(address/2, temp);
252259      return;
253260   }
254   if (offset == 0x600000)
255      m_upd96050->snesdsp_write(TRUE, data);
256   if (offset == 0x600001)
257      m_upd96050->snesdsp_write(FALSE, data);
258261}
259262
260263

Previous 199869 Revisions Next


© 1997-2024 The MAME Team