Previous 199869 Revisions Next

r21794 Monday 11th March, 2013 at 06:45:32 UTC by Fabio Priuli
(MESS) snes: legacy code for CX4 is better than no code at all... nw
[src/mess/drivers]snes.c
[src/mess/machine]sns_slot.c

trunk/src/mess/machine/sns_slot.c
r21793r21794
804804      case SNES_ST010:
805805      case SNES_ST011:
806806      case SNES_ST018:
807      case SNES_CX4:
807//      case SNES_CX4:
808808         printf("This type of cart requires the dump of on-cart CPU. You need to load it from softlist!\n");
809809         type = SNES_MODE20;
810810         break;
trunk/src/mess/drivers/snes.c
r21793r21794
22262226      return m_slotcart->m_cart->chip_read(space, offset);
22272227   else if (m_slotcart->get_type() == SNES_SRTC
22282228            && (offset < 0x400000 && (offset & 0xffff) == 0x2800))
2229         return m_slotcart->m_cart->chip_read(space, offset & 0xffff);
2229      return m_slotcart->m_cart->chip_read(space, offset & 0xffff);
2230   else if (m_slotcart->get_type() == SNES_CX4
2231            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))   // hack until we emulate the real CPU
2232      return CX4_read((offset & 0xffff) - 0x6000);
22302233   else
22312234   {
22322235      switch (m_type)
22332236      {
22342237         case SNES_MODE20:
2238         case SNES_CX4:
22352239         case SNES_ST010:
22362240         case SNES_ST011:
22372241         case SNES_DSP:
r21793r21794
22942298      return m_slotcart->m_cart->chip_read(space, offset);
22952299   else if (m_slotcart->get_type() == SNES_SRTC
22962300            && (offset < 0x400000 && (offset & 0xffff) == 0x2800))
2297         return m_slotcart->m_cart->chip_read(space, offset & 0xffff);
2301      return m_slotcart->m_cart->chip_read(space, offset & 0xffff);
2302   else if (m_slotcart->get_type() == SNES_CX4
2303            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))   // hack until we emulate the real CPU
2304      return CX4_read((offset & 0xffff) - 0x6000);
22982305   else if ((m_slotcart->get_type() == SNES_POKEMON || m_slotcart->get_type() == SNES_BANANA)
22992306            && (offset & 0x70000) == 0x0000)
23002307   {
r21793r21794
23062313      switch (m_type)
23072314      {
23082315         case SNES_MODE20:
2316         case SNES_CX4:
23092317         case SNES_ST010:
23102318         case SNES_ST011:
23112319         case SNES_DSP:
r21793r21794
23692377   else if (m_slotcart->get_type() == SNES_SRTC
23702378            && (offset < 0x400000 && (offset & 0xffff) == 0x2801))
23712379      m_slotcart->m_cart->chip_write(space, offset & 0xffff, data);
2380   else if (m_slotcart->get_type() == SNES_CX4
2381            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))   // hack until we emulate the real CPU
2382      CX4_write(space.machine(), (offset & 0xffff) - 0x6000, data);
23722383   else if (m_slotcart->get_type() == SNES_BANANA
23732384            && (offset & 0x78000) == 0x8000)
23742385   {
r21793r21794
23802391      switch (m_type)
23812392      {
23822393         case SNES_MODE20:
2394         case SNES_CX4:
23832395         case SNES_ST010:
23842396         case SNES_ST011:
23852397         case SNES_DSP:
r21793r21794
24482460   else if (m_slotcart->get_type() == SNES_SRTC
24492461            && (offset < 0x400000 && (offset & 0xffff) == 0x2801))
24502462      m_slotcart->m_cart->chip_write(space, offset & 0xffff, data);
2463   else if (m_slotcart->get_type() == SNES_CX4
2464            && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))   // hack until we emulate the real CPU
2465      CX4_write(space.machine(), (offset & 0xffff) - 0x6000, data);
24512466   else if ((m_slotcart->get_type() == SNES_POKEMON)
24522467            && (offset & 0x70000) == 0x0000)
24532468   {
r21793r21794
24592474      switch (m_type)
24602475      {
24612476         case SNES_MODE20:
2477         case SNES_CX4:
24622478         case SNES_ST010:
24632479         case SNES_ST011:
24642480         case SNES_DSP:

Previous 199869 Revisions Next


© 1997-2024 The MAME Team