Previous 199869 Revisions Next

r21860 Thursday 14th March, 2013 at 22:34:58 UTC by Fabio Priuli
this requires some more thinking too... nw.
[src/mess/machine]sns_bsx.c

trunk/src/mess/machine/sns_bsx.c
r21859r21860
285285   if (offset < 0x200000 && access_00_1f)
286286   {
287287      // 0x00-0x1f:0x8000-0xffff -> CART
288      return m_slot->read_l(space, offset);
288      if (m_slot->m_cart && m_slot->m_cart->get_rom_size())
289         return m_slot->m_cart->read_l(space, offset);
289290   }
290291   if (offset >= 0x200000 && offset < 0x400000)
291292   {
r21859r21860
334335   if (offset < 0x200000 && access_80_9f)
335336   {
336337      // 0x80-0x9f:0x8000-0xffff -> CART
337      return m_slot->read_l(space, offset);
338      if (m_slot->m_cart && m_slot->m_cart->get_rom_size())
339         return m_slot->m_cart->read_l(space, offset);
338340   }
339341
340342   // if not in any of the cases above...
r21859r21860
473475   }
474476   else if (offset < 0x700000)
475477   {
476      return m_slot->read_h(space, offset);
478      if (m_slot->m_cart && m_slot->m_cart->get_rom_size())
479         return m_slot->m_cart->read_h(space, offset);
477480   }
478481   // RAM [70-7f]
479482   return 0x00;
r21859r21860
496499   }
497500   if (offset >= 0x200000 && offset < 0x400000)
498501   {
499      if ((offset & 0xffff) >= 0x8000)
500         return m_slot->read_h(space, offset);
502      if (m_slot->m_cart && m_slot->m_cart->get_rom_size() && (offset & 0xffff) >= 0x8000)
503         return m_slot->m_cart->read_h(space, offset);
501504   }
502505   if (offset >= 0x400000 && offset < 0x600000)
503506   {
r21859r21860
506509      return m_rom[rom_bank_map[bank] * 0x8000 + (offset & 0x7fff)];
507510   }
508511   if (offset >= 0x600000)
509      return m_slot->read_h(space, offset);
512   {
513      if (m_slot->m_cart && m_slot->m_cart->get_rom_size())
514         return m_slot->m_cart->read_h(space, offset);
515   }
510516   return 0xff;
511517}
512518

Previous 199869 Revisions Next


© 1997-2024 The MAME Team