Previous 199869 Revisions Next

r21790 Sunday 10th March, 2013 at 18:46:03 UTC by Fabio Priuli
(MESS) snes: Added support for DSP-1 games with ROM larger than 1MB. nw.
[src/mess/drivers]snes.c
[src/mess/machine]sns_slot.c sns_slot.h

trunk/src/mess/drivers/snes.c
r21789r21790
22042204{
22052205   // take care of add-on IO
22062206   if (m_slotcart->get_type() == SNES_DSP
2207      && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
2207            && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
22082208      return m_slotcart->m_cart->chip_read(space, offset & 0x7fff);
2209   else if (m_slotcart->get_type() == SNES_DSP_2MB
2210            && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000))
2211      return m_slotcart->m_cart->chip_read(space, offset & 0x7fff);   
22092212   else if (m_slotcart->get_type() == SNES_DSP_MODE21
22102213            && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
22112214      return m_slotcart->m_cart->chip_read(space, offset & 0x1fff);
r21789r21790
22322235         case SNES_ST010:
22332236         case SNES_ST011:
22342237         case SNES_DSP:
2238         case SNES_DSP_2MB:
22352239         case SNES_DSP4:
22362240         case SNES_OBC1:
22372241         case SNES_SUFAMITURBO:
r21789r21790
22682272{
22692273   // take care of add-on IO
22702274   if (m_slotcart->get_type() == SNES_DSP
2271      && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
2275            && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
22722276      return m_slotcart->m_cart->chip_read(space, offset & 0x7fff);
2277   else if (m_slotcart->get_type() == SNES_DSP_2MB
2278            && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000))
2279      return m_slotcart->m_cart->chip_read(space, offset & 0x7fff);   
22732280   else if (m_slotcart->get_type() == SNES_DSP_MODE21
22742281            && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
22752282      return m_slotcart->m_cart->chip_read(space, offset & 0x1fff);
r21789r21790
23022309         case SNES_ST010:
23032310         case SNES_ST011:
23042311         case SNES_DSP:
2312         case SNES_DSP_2MB:
23052313         case SNES_DSP4:
23062314         case SNES_OBC1:
23072315         case SNES_SUFAMITURBO:
r21789r21790
23382346{
23392347   // take care of add-on IO
23402348   if (m_slotcart->get_type() == SNES_DSP
2341      && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
2349            && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
23422350      m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data);
2351   else if (m_slotcart->get_type() == SNES_DSP_2MB
2352            && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000))
2353      m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data);
23432354   else if (m_slotcart->get_type() == SNES_DSP_MODE21
23442355            && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
23452356      m_slotcart->m_cart->chip_write(space, offset & 0x1fff, data);
r21789r21790
23722383         case SNES_ST010:
23732384         case SNES_ST011:
23742385         case SNES_DSP:
2386         case SNES_DSP_2MB:
23752387         case SNES_DSP4:
23762388         case SNES_OBC1:
23772389         case SNES_SUFAMITURBO:
r21789r21790
24132425{
24142426   // take care of add-on IO
24152427   if (m_slotcart->get_type() == SNES_DSP
2416      && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
2428            && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000))
24172429      m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data);
2430   else if (m_slotcart->get_type() == SNES_DSP_2MB
2431            && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000))
2432      m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data);
24182433   else if (m_slotcart->get_type() == SNES_DSP_MODE21
24192434            && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000))
24202435      m_slotcart->m_cart->chip_write(space, offset & 0x1fff, data);
r21789r21790
24472462         case SNES_ST010:
24482463         case SNES_ST011:
24492464         case SNES_DSP:
2465         case SNES_DSP_2MB:
24502466         case SNES_DSP4:
24512467         case SNES_OBC1:
24522468         case SNES_SUFAMITURBO:
trunk/src/mess/machine/sns_slot.c
r21789r21790
620620            m_type = SNES_MODE20;
621621         else
622622            m_type = sns_get_pcb_id(slot_name);
623
624         if (m_type == SNES_DSP && len > 0x100000)
625               m_type = SNES_DSP_2MB;
623626      }
624627
625628      setup_custom_mappers();
r21789r21790
780783      if (addon != -1)
781784      {
782785         if (type == SNES_MODE20 && addon == SNES_DSP)
783            type = SNES_DSP;
786         {
787            if (len > 0x100000)
788               type = SNES_DSP_2MB;
789            else
790               type = SNES_DSP;
791         }
784792         else if (type == SNES_MODE21 && addon == SNES_DSP)
785793            type = SNES_DSP_MODE21;
786794         else
r21789r21790
791799   switch (type)
792800   {
793801      case SNES_DSP:
802      case SNES_DSP_2MB:
794803      case SNES_DSP4:
795804      case SNES_ST010:
796805      case SNES_ST011:
r21789r21790
944953      "ROM (ExHiROM)",
945954      "ROM, CX4",
946955      "ROM, DSP-1,2,3 (LoROM)",
956      "ROM, DSP-1 (LoROM 2MB)",
947957      "ROM, DSP-1 (HiROM)",
948958      "ROM, DSP-4",
949959      "ROM, OBC-1",
r21789r21790
10641074   if (addon != -1)
10651075   {
10661076      if (type == SNES_MODE20 && addon == SNES_DSP)
1067         type = SNES_DSP;
1077      {
1078         if (len > 0x100000)
1079            type = SNES_DSP_2MB;
1080         else
1081            type = SNES_DSP;
1082      }
10681083      else if (type == SNES_MODE21 && addon == SNES_DSP)
10691084         type = SNES_DSP_MODE21;
10701085      else
trunk/src/mess/machine/sns_slot.h
r21789r21790
1515   SNES_MODE25,    // ExHiROM - not used anymore in emulation (only to log info), will be removed
1616   SNES_CX4,
1717   SNES_DSP,
18   SNES_DSP_2MB,
1819   SNES_DSP_MODE21,
1920   SNES_DSP4,
2021   SNES_OBC1,

Previous 199869 Revisions Next


© 1997-2024 The MAME Team