Previous 199869 Revisions Next

r21852 Thursday 14th March, 2013 at 11:26:23 UTC by Fabio Priuli
minor cleanup. nw.
[src/mess/drivers]snes.c

trunk/src/mess/drivers/snes.c
r21851r21852
16161616   else if (m_slotcart->get_type() == SNES_CX4
16171617         && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))    // hack until we emulate the real CPU
16181618      return CX4_read((offset & 0xffff) - 0x6000);
1619   
1619
16201620   if (offset < 0x400000)
16211621   {
16221622      if (address < 0x2000)
r21851r21852
16761676   else if (m_type == SNES_SUFAMITURBO
16771677         && address >= 0x8000 && ((offset >= 0x600000 && offset < 0x640000) || (offset >= 0x700000 && offset < 0x740000)))
16781678   { m_slotcart->m_cart->write_h(space, offset, data); return; }
1679   
1680   
1679
16811680   if (offset < 0x400000)
16821681   {
16831682      if (address < 0x2000)
r21851r21852
17121711   else if (m_slotcart->get_type() == SNES_CX4
17131712         && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))    // hack until we emulate the real CPU
17141713      return CX4_read((offset & 0xffff) - 0x6000);
1715   
1716   
1714
17171715   if (offset < 0x400000)
17181716   {
17191717      if (address < 0x2000)
r21851r21852
17611759   if (m_type == SNES_SUFAMITURBO
17621760            && (offset & 0xffff) >= 0x8000 && ((offset >= 0x600000 && offset < 0x640000) || (offset >= 0x700000 && offset < 0x740000)))
17631761   { m_slotcart->m_cart->write_l(space, offset, data); return; }
1764   
1762
17651763   // other add-on writes matches the hi handler
17661764   snes20_hi_w(space, offset, data, 0xff);
17671765}
r21851r21852
17811779         return space.read_byte(0x7e0000 + address);
17821780      else if (address < 0x6000)
17831781         return snes_r_io(space, address);
1784      else if (address < 0x8000)
1782      else
17851783      {
17861784         if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000)
17871785         {
r21851r21852
18141812         space.write_byte(0x7e0000 + address, data);
18151813      else if (address < 0x6000)
18161814         snes_w_io(space, address, data);
1817      else if (address < 0x8000)
1815      else
18181816      {
18191817         if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000)
18201818         {
r21851r21852
18431841         return space.read_byte(0x7e0000 + address);
18441842      else if (address < 0x6000)
18451843         return snes_r_io(space, address);
1846      else if (address < 0x8000)
1844      else
18471845      {
18481846         if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000)
18491847         {
r21851r21852
18761874         space.write_byte(0x7e0000 + address, data);
18771875      else if (address < 0x6000)
18781876         snes_w_io(space, address, data);
1879      else if (address < 0x8000)
1877      else
18801878      {
18811879         if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000)
18821880         {
r21851r21852
22802278   SLOT_INTERFACE_INTERNAL("lorom_mcpir1",  SNS_LOROM_MCPIR1)
22812279   SLOT_INTERFACE_INTERNAL("lorom_mcpir2",  SNS_LOROM_MCPIR2)
22822280   SLOT_INTERFACE_INTERNAL("lorom_20col",   SNS_LOROM_20COL)
2283   SLOT_INTERFACE_INTERNAL("lorom_pija",    SNS_LOROM_BANANA)   // not working yet
2284   SLOT_INTERFACE_INTERNAL("lorom_bugs",    SNS_LOROM_BUGSLIFE)   // not working yet
2281   SLOT_INTERFACE_INTERNAL("lorom_pija",    SNS_LOROM_BANANA)  // not working yet
2282   SLOT_INTERFACE_INTERNAL("lorom_bugs",    SNS_LOROM_BUGSLIFE)    // not working yet
22852283SLOT_INTERFACE_END
22862284
22872285
r21851r21852
23862384         break;
23872385      case SNES_BUGS:
23882386      case SNES_BANANA:
2389//         machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart));
2390//         machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart));
2387//          machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart));
2388//          machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart));
23912389//          set_5a22_map(*state->m_maincpu);
23922390         break;
23932391   }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team