Previous 199869 Revisions Next

r21885 Saturday 16th March, 2013 at 09:36:02 UTC by Fabio Priuli
(MESS) snes.c: added support in snes and snespal for loading from fullpath
   DSPx and ST01x games missing the DSP data, i.e. the commonly available
  dumps, without using clone systems (softlists had no problems with these
  games because the DSP data come from the softlist romset) [Fabio Priuli]


out of whatsnew: many thanks to Arbee for suggesting device roms instead of a clone
system bios for addon dumps. it turned out there was a clean way to avoid conflicts
between loading DSP data from the softlist romset and loading DSP data from the
device romset, so we don't need snes_add and snesp_add clones anymore.
[src/mess]mess.lst
[src/mess/drivers]snes.c
[src/mess/machine]gb_slot.c sns_slot.c sns_slot.h sns_upd.c sns_upd.h

trunk/src/mess/drivers/snes.c
r21884r21885
13951395   SLOT_INTERFACE_INTERNAL("lorom_20col",   SNS_LOROM_20COL)
13961396   SLOT_INTERFACE_INTERNAL("lorom_pija",    SNS_LOROM_BANANA)  // not working yet
13971397   SLOT_INTERFACE_INTERNAL("lorom_bugs",    SNS_LOROM_BUGSLIFE)    // not working yet
1398   // legacy slots to support DSPx games from fullpath
1399   SLOT_INTERFACE_INTERNAL("lorom_dsp1leg", SNS_LOROM_NECDSP1_LEG)
1400   SLOT_INTERFACE_INTERNAL("lorom_dsp1bleg",SNS_LOROM_NECDSP1B_LEG)
1401   SLOT_INTERFACE_INTERNAL("lorom_dsp2leg", SNS_LOROM_NECDSP2_LEG)
1402   SLOT_INTERFACE_INTERNAL("lorom_dsp3leg", SNS_LOROM_NECDSP3_LEG)
1403   SLOT_INTERFACE_INTERNAL("lorom_dsp4leg", SNS_LOROM_NECDSP4_LEG)
1404   SLOT_INTERFACE_INTERNAL("hirom_dsp1leg", SNS_HIROM_NECDSP1_LEG)
1405   SLOT_INTERFACE_INTERNAL("lorom_st10leg", SNS_LOROM_SETA10_LEG)
1406   SLOT_INTERFACE_INTERNAL("lorom_st11leg", SNS_LOROM_SETA11_LEG)
13981407SLOT_INTERFACE_END
13991408
1400
1401
14021409static MACHINE_START( snes_console )
14031410{
14041411   snes_console_state *state = machine.driver_data<snes_console_state>();
r21884r21885
15171524   state->m_io_read = write8_delegate(FUNC(snes_console_state::snes_input_read),state);
15181525   state->m_oldjoy1_read = read8_delegate(FUNC(snes_console_state::snes_oldjoy1_read),state);
15191526   state->m_oldjoy2_read = read8_delegate(FUNC(snes_console_state::snes_oldjoy2_read),state);
1520
1521   // if trying to load a game requiring add-on CPU dump from fullpath,
1522   // warn the user, disable the CPU in slot & switch back to base type
1523   if (!state->m_cartslot->m_cart->get_addon_bios_size())
1524   {
1525      switch (state->m_type)
1526      {
1527         case SNES_DSP:
1528         case SNES_DSP_2MB:
1529         case SNES_DSP4:
1530         case SNES_ST010:
1531         case SNES_ST011:
1532            mame_printf_error("This type of cart requires the dump of on-cart CPU.\nPlease either load it from softlist or use snes_add driver.\n");
1533            state->m_cartslot->snes_stop_addon_cpu("dsp");
1534            state->m_type = SNES_MODE20;
1535            break;
1536         case SNES_DSP_MODE21:
1537            mame_printf_error("This type of cart requires the dump of on-cart CPU.\nPlease either load it from softlist or use snes_add driver.\n");
1538            state->m_cartslot->snes_stop_addon_cpu("dsp");
1539            state->m_type = SNES_MODE21;
1540            break;
1541         case SNES_ST018:
1542         case SNES_CX4:
1543            // we don't emulate the CPU for these yet...
1544            break;
1545      }
1546   }
15471527}
15481528
15491529
r21884r21885
15881568MACHINE_CONFIG_END
15891569
15901570
1591static MACHINE_RESET( snes_addon )
1592{
1593   snes_console_state *state = machine.driver_data<snes_console_state>();
1594   UINT8 *ROM = state->memregion("addons")->base();
15951571
1596   MACHINE_RESET_CALL(snes);
1597
1598   state->m_io_read = write8_delegate(FUNC(snes_console_state::snes_input_read),state);
1599   state->m_oldjoy1_read = read8_delegate(FUNC(snes_console_state::snes_oldjoy1_read),state);
1600   state->m_oldjoy2_read = read8_delegate(FUNC(snes_console_state::snes_oldjoy2_read),state);
1601
1602   // if trying to load a game requiring add-on CPU dump from fullpath, load
1603   // such a dump from the BIOS (hacky workaround to support legacy sfc dumps)
1604   switch (state->m_cartslot->get_addon())
1605   {
1606      case ADDON_DSP1:
1607         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x2800);
1608         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_DSP1_OFFSET, 0x2800);
1609         break;
1610      case ADDON_DSP1B:
1611         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x2800);
1612         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_DSP1B_OFFSET, 0x2800);
1613         break;
1614      case ADDON_DSP2:
1615         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x2800);
1616         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_DSP2_OFFSET, 0x2800);
1617         break;
1618      case ADDON_DSP3:
1619         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x2800);
1620         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_DSP3_OFFSET, 0x2800);
1621         break;
1622      case ADDON_DSP4:
1623         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x2800);
1624         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_DSP4_OFFSET, 0x2800);
1625         break;
1626      case ADDON_ST010:
1627         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x11000);
1628         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_ST10_OFFSET, 0x11000);
1629         break;
1630      case ADDON_ST011:
1631         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x11000);
1632         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_ST11_OFFSET, 0x11000);
1633         break;
1634      case ADDON_CX4:
1635         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x00c00);
1636         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_CX4_OFFSET, 0x00c00);
1637         break;
1638      case ADDON_ST018:
1639         state->m_cartslot->m_cart->addon_bios_alloc(machine, 0x28000);
1640         memcpy(state->m_cartslot->m_cart->get_addon_bios_base(), ROM + SNES_ST18_OFFSET1, 0x20000);
1641         memcpy(state->m_cartslot->m_cart->get_addon_bios_base() + 0x20000, ROM + SNES_ST18_OFFSET2, 0x8000);
1642         break;
1643      default:
1644         break;
1645   }
1646}
1647
1648
1649static MACHINE_CONFIG_DERIVED( snes_add, snes )
1650   MCFG_MACHINE_RESET( snes_addon )
1651MACHINE_CONFIG_END
1652
1653static MACHINE_CONFIG_DERIVED( snesp_add, snespal )
1654   MCFG_MACHINE_RESET( snes_addon )
1655MACHINE_CONFIG_END
1656
1657
16581572/*************************************
16591573 *
16601574 *  ROM definition(s)
r21884r21885
16681582   ROM_LOAD( "spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) /* boot rom */
16691583ROM_END
16701584
1671ROM_START( snes_add )
1672   ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 )
1673
1674   ROM_REGION( 0x100, "sound_ipl", 0 )     /* IPL ROM */
1675   ROM_LOAD( "spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) /* boot rom */
1676
1677   ROM_REGION( 0x60000, "addons", 0 )      /* add-on chip ROMs (DSP, SFX, etc) */
1678   ROM_LOAD( "dsp1.bin",       SNES_DSP1_OFFSET,  0x02800, CRC(2838f9f5) SHA1(0a03ccb1fd2bea91151c745a4d1f217ae784f889) )
1679   ROM_LOAD( "dsp1b.bin",      SNES_DSP1B_OFFSET, 0x02800, CRC(453557e0) SHA1(3a218b0e4572a8eba6d0121b17fdac9529609220) )
1680   ROM_LOAD( "dsp2.bin",       SNES_DSP2_OFFSET,  0x02800, CRC(8e9fbd9b) SHA1(06dd9fcb118d18f6bbe234e013cb8780e06d6e63) )
1681   ROM_LOAD( "dsp3.bin",       SNES_DSP3_OFFSET,  0x02800, CRC(6b86728a) SHA1(1b133741fad810eb7320c21ecfdd427d25a46da1) )
1682   ROM_LOAD( "dsp4.bin",       SNES_DSP4_OFFSET,  0x02800, CRC(ce0c7783) SHA1(76fd25f7dc26c3b3f7868a3aa78c7684068713e5) )
1683   ROM_LOAD( "st010.bin",      SNES_ST10_OFFSET,  0x11000, CRC(aa11ee2d) SHA1(cc1984e989cb94e3dcbb5f99e085b5414e18a017) )
1684   ROM_LOAD( "st011.bin",      SNES_ST11_OFFSET,  0x11000, CRC(34d2952c) SHA1(1375b8c1efc8cae4962b57dfe22f6b78e1ddacc8) )
1685   ROM_LOAD( "cx4.bin",        SNES_CX4_OFFSET,   0x00c00, CRC(b6e76a6a) SHA1(a002f4efba42775a31185d443f3ed1790b0e949a) )
1686   ROM_LOAD( "st018_0xf3.bin", SNES_ST18_OFFSET1, 0x20000, CRC(f73d5e10) SHA1(388e3721b94cd074d6ba0eca8616523d2118a6c3) )
1687   ROM_LOAD( "st018_0xf4.bin", SNES_ST18_OFFSET2, 0x08000, CRC(b5255459) SHA1(b19c0f8f207d62fdabf4bf71442826063bccc626) )
1688ROM_END
1689
16901585#define rom_snespal rom_snes
1691#define rom_snesp_add rom_snes_add
16921586
16931587/*************************************
16941588 *
r21884r21885
16991593/*    YEAR  NAME       PARENT  COMPAT MACHINE    INPUT                 INIT  COMPANY     FULLNAME                                      FLAGS */
17001594CONS( 1989, snes,      0,      0,     snes,      snes, driver_device,  0,    "Nintendo", "Super Nintendo Entertainment System / Super Famicom (NTSC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
17011595CONS( 1991, snespal,   snes,   0,     snespal,   snes, driver_device,  0,    "Nintendo", "Super Nintendo Entertainment System (PAL)",  GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
1702
1703// legacy drivers to allow loading old .sfc files of DSPx/CX4/ST0xx games without the add-on chip dump (add-on dumps directly in the BIOS)
1704CONS( 1989, snes_add,  snes,   0,     snes_add,  snes, driver_device,  0,    "Nintendo", "Super Nintendo Entertainment System / Super Famicom (NTSC, w/add-on CPUs)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_UNOFFICIAL)
1705CONS( 1991, snesp_add, snes,   0,     snesp_add, snes, driver_device,  0,    "Nintendo", "Super Nintendo Entertainment System (PAL, w/add-on CPUs)",  GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_UNOFFICIAL)
trunk/src/mess/machine/sns_slot.c
r21884r21885
2121    subslots (e.g. BS-X compatible ones), that need to write to subslot (NV)RAM independently
2222    to accesses to their own (NV)RAM.
2323
24    In order to support legacy dumps of games with add-on NEC & Seta DSPs, CX4 and Seta ST018,
25    we use not only m_type to identify the correct slot device to be used (for this DSP1B, DSP2 and
26    DSP3 are the same), but also a m_addon variable that snes_add driver uses to load CPU dump from
27    the system BIOS (for this DSP1B, DSP2 and DSP3 are not the same).
24    Notes about add-on detection and handling (useful for future addition of st018, cx4, etc.)
25    ===============================================================================================
26    When loading from softlist, m_type would be enough to take care of add-on chips, because
27    the ones needing a CPU dump have it in the zipfile. However, to support these games also
28    from fullpath, both with files having DSP data appended to the .sfc and with older dumps
29    missing DSP data, a second variable is present in the SNES slot: m_addon.
30    From fullpath, support works as follows
31    - get_default_card_software needs to decide whether to use the main devices or the legacy
32      ones containing DSP dump as device roms, so it gets m_type as the main device should be
33      used and if m_addon is ADDON_DSP* or ADDON_ST*, then it checks if the DSP data is appended
34      or if m_type has to be switched to legacy type
35    - call_load needs to detect faulty dumps too, to alloc m_addon_bios and copy the data from
36      the correct place, so if m_addon is ADDON_DSP* or ADDON_ST* it checks whether DSP data is
37      appended or not: if it is, this data is copied to m_addon_bios; if not, then we are in
38      the legacy device case and data is copied from the device rom
39    After the cart has been loaded and emulation has started, only m_type is needed to later
40    handlers installation and cart accesses
2841
42    Also notice that, from softlist, DSP1, 1B, 2, 3 are treated as the same device, because they
43   all have the same I/O and the only difference (i.e. the DSP data) comes from the zipfile itself.
44    OTOH, to support faulty dumps missing DSP content, we need separate legacy devices...
2945
46
3047 ***********************************************************************************************************/
3148
3249
r21884r21885
265282   // Sufami Turbo carts
266283   { SNES_STROM,       "strom"},
267284   // pirate carts
268   { SNES_POKEMON,     "lorom_poke"},
269   { SNES_TEKKEN2,     "lorom_tekken2"},
270   { SNES_SOULBLAD,    "lorom_sbld"},
271   { SNES_MCPIR1,      "lorom_mcpir1"},
272   { SNES_MCPIR2,      "lorom_mcpir2"},
273   { SNES_20COL,       "lorom_20col"},
274   { SNES_BANANA,      "lorom_pija"},  // wip
275   { SNES_BUGS,        "lorom_bugs"}  // wip
285   { SNES_POKEMON,      "lorom_poke"},
286   { SNES_TEKKEN2,      "lorom_tekken2"},
287   { SNES_SOULBLAD,     "lorom_sbld"},
288   { SNES_MCPIR1,       "lorom_mcpir1"},
289   { SNES_MCPIR2,       "lorom_mcpir2"},
290   { SNES_20COL,        "lorom_20col"},
291   { SNES_BANANA,       "lorom_pija"},  // wip
292   { SNES_BUGS,         "lorom_bugs"},  // wip
293   // legacy slots to support DSPx games from fullpath
294   { SNES_DSP1_LEG,     "lorom_dsp1leg"},
295   { SNES_DSP1B_LEG,    "lorom_dsp1bleg"},
296   { SNES_DSP2_LEG,     "lorom_dsp2leg"},
297   { SNES_DSP3_LEG,     "lorom_dsp3leg"},
298   { SNES_DSP4_LEG,     "lorom_dsp4leg"},
299   { SNES_DSP1_MODE21_LEG, "hirom_dsp1leg"},
300   { SNES_ST010_LEG,     "lorom_st10leg"},
301   { SNES_ST011_LEG,     "lorom_st11leg"}
276302};
277303
278304static int sns_get_pcb_id(const char *slot)
r21884r21885
643669      }
644670
645671      if (software_entry() == NULL)
646         setup_appended_addon();
672         setup_addon_from_fullpath();
647673
648674      setup_nvram();
649675
r21884r21885
697723}
698724
699725
700void base_sns_cart_slot_device::setup_appended_addon()
726void base_sns_cart_slot_device::setup_addon_from_fullpath()
701727{
702728   // if we already have an add-on bios or if no addon has been detected, we have nothing to do
703729   if (m_cart->get_addon_bios_size() || m_addon == ADDON_NONE)
r21884r21885
782808         }
783809         break;
784810   }
811   
812   // otherwise, we need to use the legacy versions including DSP dump in device romset
813   if (!m_cart->get_addon_bios_size())
814   {
815      astring region(m_cart->device().tag(), ":addon");
816      UINT8 *ROM = NULL;
817     
818      switch (m_addon)
819      {
820         case ADDON_DSP1:
821            ROM = machine().root_device().memregion(region)->base();
822            m_cart->addon_bios_alloc(machine(), 0x2800);
823            memcpy(m_cart->get_addon_bios_base(), ROM, 0x2800);
824            break;
825         case ADDON_DSP1B:
826            ROM = machine().root_device().memregion(region)->base();
827            m_cart->addon_bios_alloc(machine(), 0x2800);
828            memcpy(m_cart->get_addon_bios_base(), ROM, 0x2800);
829            break;
830         case ADDON_DSP2:
831            ROM = machine().root_device().memregion(region)->base();
832            m_cart->addon_bios_alloc(machine(), 0x2800);
833            memcpy(m_cart->get_addon_bios_base(), ROM, 0x2800);
834            break;
835         case ADDON_DSP3:
836            ROM = machine().root_device().memregion(region)->base();
837            m_cart->addon_bios_alloc(machine(), 0x2800);
838            memcpy(m_cart->get_addon_bios_base(), ROM, 0x2800);
839            break;
840         case ADDON_DSP4:
841            ROM = machine().root_device().memregion(region)->base();
842            m_cart->addon_bios_alloc(machine(), 0x2800);
843            memcpy(m_cart->get_addon_bios_base(), ROM, 0x2800);
844            break;
845         case ADDON_ST010:
846            ROM = machine().root_device().memregion(region)->base();
847            m_cart->addon_bios_alloc(machine(), 0x11000);
848            memcpy(m_cart->get_addon_bios_base(), ROM, 0x11000);
849            break;
850         case ADDON_ST011:
851            ROM = machine().root_device().memregion(region)->base();
852            m_cart->addon_bios_alloc(machine(), 0x11000);
853            memcpy(m_cart->get_addon_bios_base(), ROM, 0x11000);
854            break;
855      }
856   }     
857   
785858}
786859
787860void base_sns_cart_slot_device::setup_nvram()
r21884r21885
9591032      offset = snes_skip_header(ROM, len);
9601033
9611034      get_cart_type_addon(ROM + offset, len - offset, type, addon);
1035      // here we're from fullpath, so check if it's a DSP game which needs legacy device (i.e. it has no appended DSP dump)
1036      switch (addon)
1037      {
1038         case ADDON_DSP1:
1039            if ((len & 0x7fff) != 0x2800 && (len & 0x7fff) != 0x2000)
1040            {
1041               if (type == SNES_DSP_MODE21)
1042                  type = SNES_DSP1_MODE21_LEG;
1043               else
1044                  type = SNES_DSP1_LEG;               
1045            }
1046            break;
1047         case ADDON_DSP1B:
1048            if ((len & 0x7fff) != 0x2800 && (len & 0x7fff) != 0x2000)
1049               type = SNES_DSP1B_LEG;
1050            break;
1051         case ADDON_DSP2:
1052            if ((len & 0x7fff) != 0x2800 && (len & 0x7fff) != 0x2000)
1053               type = SNES_DSP2_LEG;
1054            break;
1055         case ADDON_DSP3:
1056            if ((len & 0x7fff) != 0x2800 && (len & 0x7fff) != 0x2000)
1057               type = SNES_DSP3_LEG;
1058            break;
1059         case ADDON_DSP4:
1060            if ((len & 0x7fff) != 0x2800 && (len & 0x7fff) != 0x2000)
1061               type = SNES_DSP4_LEG;
1062            break;
1063         case ADDON_ST010:
1064            if ((len & 0x3ffff) != 0x11000 && (len & 0xffff) != 0xd000)
1065               type = SNES_ST010_LEG;
1066            break;
1067         case ADDON_ST011:
1068            if ((len & 0x3ffff) != 0x11000 && (len & 0xffff) != 0xd000)
1069               type = SNES_ST011_LEG;
1070            break;
1071      }
1072
9621073      slot_string = sns_get_slot(type);
9631074
9641075      global_free(ROM);
r21884r21885
10371148
10381149
10391150/*-------------------------------------------------
1040 snes_stop_addon_cpu
1041 -------------------------------------------------*/
1042
1043void base_sns_cart_slot_device::snes_stop_addon_cpu(const char *cputag)
1044{
1045   astring cpu(m_cart->device().tag(), ":", cputag);
1046   if (m_cart && machine().device(cpu))
1047      machine().device(cpu.cstr())->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
1048}
1049
1050/*-------------------------------------------------
10511151 Internal header logging
10521152 -------------------------------------------------*/
10531153
trunk/src/mess/machine/sns_slot.h
r21884r21885
5555   SNES_MCPIR2,
5656   SNES_20COL,
5757   SNES_BANANA,    // wip
58   SNES_BUGS   // wip
58   SNES_BUGS,   // wip
59   // legacy types to support DSPx games from fullpath
60   SNES_DSP1_LEG,
61   SNES_DSP1B_LEG,
62   SNES_DSP2_LEG,
63   SNES_DSP3_LEG,
64   SNES_DSP4_LEG,
65   SNES_DSP1_MODE21_LEG,
66   SNES_ST010_LEG,
67   SNES_ST011_LEG
5968};
6069
6170/* add-ons to handle legacy dumps in snes_add  */
r21884r21885
160169   void get_cart_type_addon(UINT8 *ROM, UINT32 len, int &type, int &addon);
161170   UINT32 snes_skip_header(UINT8 *ROM, UINT32 snes_rom_size);
162171   int get_type() { return m_type; }
163   int get_addon() { return m_addon; }
164172
165173   void setup_nvram();
166174   void internal_header_logging(UINT8 *ROM, UINT32 len);
r21884r21885
186194   virtual DECLARE_READ8_MEMBER(chip_read);
187195   virtual DECLARE_WRITE8_MEMBER(chip_write);
188196
189   // in order to support legacy dumps, we enable add-on CPUs even when loading from fullpath
190   // and then we stop them at MACHINE_RESET to avoid crashes
191   void snes_stop_addon_cpu(const char *cputag);
192197   // in order to support legacy dumps + add-on CPU dump appended at the end of the file, we
193198   // check if the required data is present and update bank map accordingly
194   void setup_appended_addon();
199   void setup_addon_from_fullpath();
195200
196201
197202// m_cart cannot be made private yet, because we need to check nvram_size from the driver...
trunk/src/mess/machine/sns_upd.c
r21884r21885
2222const device_type SNS_LOROM_SETA11 = &device_creator<sns_rom_seta11dsp_device>;
2323
2424
25sns_rom20_necdsp_device::sns_rom20_necdsp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
26               : sns_rom_device(mconfig, type, name, tag, owner, clock),
27                  m_upd7725(*this, "dsp")
28{
29}
30
2531sns_rom20_necdsp_device::sns_rom20_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2632               : sns_rom_device(mconfig, SNS_LOROM_NECDSP, "SNES Cart (LoROM) + NEC DSP", tag, owner, clock),
2733                  m_upd7725(*this, "dsp")
2834{
2935}
3036
37sns_rom21_necdsp_device::sns_rom21_necdsp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
38               : sns_rom21_device(mconfig, type, name, tag, owner, clock),
39                  m_upd7725(*this, "dsp")
40{
41}
42
3143sns_rom21_necdsp_device::sns_rom21_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3244               : sns_rom21_device(mconfig, SNS_HIROM_NECDSP, "SNES Cart (HiROM) + NEC DSP", tag, owner, clock),
3345                  m_upd7725(*this, "dsp")
r21884r21885
326338{
327339   return MACHINE_CONFIG_NAME( snes_st011 );
328340}
341
342
343
344
345// Legacy versions including DSP dump roms, in order to support faulty dumps missing DSP data...
346
347const device_type SNS_LOROM_NECDSP1_LEG = &device_creator<sns_rom20_necdsp1_legacy_device>;
348const device_type SNS_LOROM_NECDSP1B_LEG = &device_creator<sns_rom20_necdsp1b_legacy_device>;
349const device_type SNS_LOROM_NECDSP2_LEG = &device_creator<sns_rom20_necdsp2_legacy_device>;
350const device_type SNS_LOROM_NECDSP3_LEG = &device_creator<sns_rom20_necdsp3_legacy_device>;
351const device_type SNS_LOROM_NECDSP4_LEG = &device_creator<sns_rom20_necdsp4_legacy_device>;
352const device_type SNS_HIROM_NECDSP1_LEG = &device_creator<sns_rom21_necdsp1_legacy_device>;
353const device_type SNS_LOROM_SETA10_LEG = &device_creator<sns_rom_seta10dsp_legacy_device>;
354const device_type SNS_LOROM_SETA11_LEG = &device_creator<sns_rom_seta11dsp_legacy_device>;
355
356
357sns_rom20_necdsp1_legacy_device::sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
358               : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP1_LEG, "SNES Cart (LoROM) + NEC DSP1 Legacy", tag, owner, clock)
359{
360}
361
362sns_rom20_necdsp1b_legacy_device::sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
363               : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP1B_LEG, "SNES Cart (LoROM) + NEC DSP1B Legacy", tag, owner, clock)
364{
365}
366
367sns_rom20_necdsp2_legacy_device::sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
368               : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP2_LEG, "SNES Cart (LoROM) + NEC DSP2 Legacy", tag, owner, clock)
369{
370}
371
372sns_rom20_necdsp3_legacy_device::sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
373               : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP3_LEG, "SNES Cart (LoROM) + NEC DSP3 Legacy", tag, owner, clock)
374{
375}
376
377sns_rom20_necdsp4_legacy_device::sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
378               : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP4_LEG, "SNES Cart (LoROM) + NEC DSP4 Legacy", tag, owner, clock)
379{
380}
381
382sns_rom21_necdsp1_legacy_device::sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
383               : sns_rom21_necdsp_device(mconfig, SNS_HIROM_NECDSP1_LEG, "SNES Cart (HiROM) + NEC DSP1 Legacy", tag, owner, clock)
384{
385}
386
387sns_rom_seta10dsp_legacy_device::sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
388               : sns_rom_setadsp_device(mconfig, SNS_LOROM_SETA10_LEG, "SNES Cart (LoROM) + Seta ST010 DSP Legacy", tag, owner, clock)
389{
390}
391
392sns_rom_seta11dsp_legacy_device::sns_rom_seta11dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
393               : sns_rom_setadsp_device(mconfig, SNS_LOROM_SETA11_LEG, "SNES Cart (LoROM) + Seta ST011 DSP Legacy", tag, owner, clock)
394{
395}
396
397
398machine_config_constructor sns_rom20_necdsp1_legacy_device::device_mconfig_additions() const
399{
400   return MACHINE_CONFIG_NAME( snes_dsp_lorom );
401}
402
403machine_config_constructor sns_rom20_necdsp1b_legacy_device::device_mconfig_additions() const
404{
405   return MACHINE_CONFIG_NAME( snes_dsp_lorom );
406}
407
408machine_config_constructor sns_rom20_necdsp2_legacy_device::device_mconfig_additions() const
409{
410   return MACHINE_CONFIG_NAME( snes_dsp_lorom );
411}
412
413machine_config_constructor sns_rom20_necdsp3_legacy_device::device_mconfig_additions() const
414{
415   return MACHINE_CONFIG_NAME( snes_dsp_lorom );
416}
417
418machine_config_constructor sns_rom20_necdsp4_legacy_device::device_mconfig_additions() const
419{
420   return MACHINE_CONFIG_NAME( snes_dsp_lorom );
421}
422
423machine_config_constructor sns_rom21_necdsp1_legacy_device::device_mconfig_additions() const
424{
425   return MACHINE_CONFIG_NAME( snes_dsp_hirom );
426}
427
428machine_config_constructor sns_rom_seta10dsp_legacy_device::device_mconfig_additions() const
429{
430   return MACHINE_CONFIG_NAME( snes_st010 );
431}
432
433machine_config_constructor sns_rom_seta11dsp_legacy_device::device_mconfig_additions() const
434{
435   return MACHINE_CONFIG_NAME( snes_st011 );
436}
437
438
439ROM_START( snes_dsp1 )
440   ROM_REGION(0x2800, "addon", 0)
441   ROM_LOAD( "dsp1.bin",       0,  0x02800, CRC(2838f9f5) SHA1(0a03ccb1fd2bea91151c745a4d1f217ae784f889) )
442ROM_END
443
444ROM_START( snes_dsp1b )
445   ROM_REGION(0x2800, "addon", 0)
446   ROM_LOAD( "dsp1b.bin",      0,  0x02800, CRC(453557e0) SHA1(3a218b0e4572a8eba6d0121b17fdac9529609220) )
447ROM_END
448
449ROM_START( snes_dsp2 )
450   ROM_REGION(0x2800, "addon", 0)
451   ROM_LOAD( "dsp2.bin",       0,  0x02800, CRC(8e9fbd9b) SHA1(06dd9fcb118d18f6bbe234e013cb8780e06d6e63) )
452ROM_END
453
454ROM_START( snes_dsp3 )
455   ROM_REGION(0x2800, "addon", 0)
456   ROM_LOAD( "dsp3.bin",       0,  0x02800, CRC(6b86728a) SHA1(1b133741fad810eb7320c21ecfdd427d25a46da1) )
457ROM_END
458
459ROM_START( snes_dsp4 )
460   ROM_REGION(0x2800, "addon", 0)
461   ROM_LOAD( "dsp4.bin",       0,  0x02800, CRC(ce0c7783) SHA1(76fd25f7dc26c3b3f7868a3aa78c7684068713e5) )
462ROM_END
463
464ROM_START( snes_st010 )
465   ROM_REGION(0x11000, "addon", 0)
466   ROM_LOAD( "st010.bin",      0,  0x11000, CRC(aa11ee2d) SHA1(cc1984e989cb94e3dcbb5f99e085b5414e18a017) )
467ROM_END
468
469ROM_START( snes_st011 )
470   ROM_REGION(0x11000, "addon", 0)
471   ROM_LOAD( "st011.bin",      0,  0x11000, CRC(34d2952c) SHA1(1375b8c1efc8cae4962b57dfe22f6b78e1ddacc8) )
472ROM_END
473
474const rom_entry *sns_rom20_necdsp1_legacy_device::device_rom_region() const
475{
476   return ROM_NAME( snes_dsp1 );
477}
478
479const rom_entry *sns_rom20_necdsp1b_legacy_device::device_rom_region() const
480{
481   return ROM_NAME( snes_dsp1b );
482}
483
484const rom_entry *sns_rom20_necdsp2_legacy_device::device_rom_region() const
485{
486   return ROM_NAME( snes_dsp2 );
487}
488
489const rom_entry *sns_rom20_necdsp3_legacy_device::device_rom_region() const
490{
491   return ROM_NAME( snes_dsp3 );
492}
493
494const rom_entry *sns_rom20_necdsp4_legacy_device::device_rom_region() const
495{
496   return ROM_NAME( snes_dsp4 );
497}
498
499const rom_entry *sns_rom21_necdsp1_legacy_device::device_rom_region() const
500{
501   return ROM_NAME( snes_dsp1 );
502}
503
504const rom_entry *sns_rom_seta10dsp_legacy_device::device_rom_region() const
505{
506   return ROM_NAME( snes_st010 );
507}
508
509const rom_entry *sns_rom_seta11dsp_legacy_device::device_rom_region() const
510{
511   return ROM_NAME( snes_st011 );
512}
513
trunk/src/mess/machine/sns_upd.h
r21884r21885
1212{
1313public:
1414   // construction/destruction
15   sns_rom20_necdsp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
1516   sns_rom20_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
1617
1718   // device-level overrides
r21884r21885
3536{
3637public:
3738   // construction/destruction
39   sns_rom21_necdsp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
3840   sns_rom21_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3941
4042   // device-level overrides
r21884r21885
7476   virtual DECLARE_READ16_MEMBER(setadsp_data_r);
7577};
7678
77// ======================> sns_rom_seta10_device
79// ======================> sns_rom_seta10dsp_device
7880
7981class sns_rom_seta10dsp_device : public sns_rom_setadsp_device
8082{
r21884r21885
8789   virtual machine_config_constructor device_mconfig_additions() const;
8890};
8991
90// ======================> sns_rom_seta11_device [Faster CPU than ST010]
92// ======================> sns_rom_seta11dsp_device [Faster CPU than ST010]
9193
9294class sns_rom_seta11dsp_device : public sns_rom_setadsp_device
9395{
r21884r21885
107109extern const device_type SNS_LOROM_SETA10;
108110extern const device_type SNS_LOROM_SETA11;
109111
112
113
114
115// Devices including DSP dumps to support faulty .sfc dumps missing DSP data
116
117class sns_rom20_necdsp1_legacy_device : public sns_rom20_necdsp_device
118{
119public:
120   // construction/destruction
121   sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
122   
123   // device-level overrides
124   virtual void device_config_complete() { m_shortname = "dsp1leg"; }
125   virtual machine_config_constructor device_mconfig_additions() const;
126   virtual const rom_entry *device_rom_region() const;
127};
128
129class sns_rom20_necdsp1b_legacy_device : public sns_rom20_necdsp_device
130{
131public:
132   // construction/destruction
133   sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
134   
135   // device-level overrides
136   virtual void device_config_complete() { m_shortname = "dsp1bleg"; }
137   virtual machine_config_constructor device_mconfig_additions() const;
138   virtual const rom_entry *device_rom_region() const;
139};
140
141class sns_rom20_necdsp2_legacy_device : public sns_rom20_necdsp_device
142{
143public:
144   // construction/destruction
145   sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
146   
147   // device-level overrides
148   virtual void device_config_complete() { m_shortname = "dsp2leg"; }
149   virtual machine_config_constructor device_mconfig_additions() const;
150   virtual const rom_entry *device_rom_region() const;
151};
152
153class sns_rom20_necdsp3_legacy_device : public sns_rom20_necdsp_device
154{
155public:
156   // construction/destruction
157   sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
158   
159   // device-level overrides
160   virtual void device_config_complete() { m_shortname = "dsp3leg"; }
161   virtual machine_config_constructor device_mconfig_additions() const;
162   virtual const rom_entry *device_rom_region() const;
163};
164
165class sns_rom20_necdsp4_legacy_device : public sns_rom20_necdsp_device
166{
167public:
168   // construction/destruction
169   sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
170   
171   // device-level overrides
172   virtual void device_config_complete() { m_shortname = "dsp4leg"; }
173   virtual machine_config_constructor device_mconfig_additions() const;
174   virtual const rom_entry *device_rom_region() const;
175};
176
177class sns_rom21_necdsp1_legacy_device : public sns_rom21_necdsp_device
178{
179public:
180   // construction/destruction
181   sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
182   
183   // device-level overrides
184   virtual void device_config_complete() { m_shortname = "dsp1leg_hi"; }
185   virtual machine_config_constructor device_mconfig_additions() const;
186   virtual const rom_entry *device_rom_region() const;
187};
188
189class sns_rom_seta10dsp_legacy_device : public sns_rom_setadsp_device
190{
191public:
192   // construction/destruction
193   sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
194   
195   // device-level overrides
196   virtual void device_config_complete() { m_shortname = "seta10leg"; }
197   virtual machine_config_constructor device_mconfig_additions() const;
198   virtual const rom_entry *device_rom_region() const;
199};
200
201class sns_rom_seta11dsp_legacy_device : public sns_rom_setadsp_device
202{
203public:
204   // construction/destruction
205   sns_rom_seta11dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
206
207   // device-level overrides
208   virtual void device_config_complete() { m_shortname = "seta11leg"; }
209   virtual machine_config_constructor device_mconfig_additions() const;
210   virtual const rom_entry *device_rom_region() const;
211};
212
213extern const device_type SNS_LOROM_NECDSP1_LEG;
214extern const device_type SNS_LOROM_NECDSP1B_LEG;
215extern const device_type SNS_LOROM_NECDSP2_LEG;
216extern const device_type SNS_LOROM_NECDSP3_LEG;
217extern const device_type SNS_LOROM_NECDSP4_LEG;
218extern const device_type SNS_HIROM_NECDSP1_LEG;
219extern const device_type SNS_LOROM_SETA10_LEG;
220extern const device_type SNS_LOROM_SETA11_LEG;
221
110222#endif
trunk/src/mess/machine/gb_slot.c
r21884r21885
188188
189189
190190//-------------------------------------------------
191//  MD PCB
191//  GB PCB
192192//-------------------------------------------------
193193
194194
trunk/src/mess/mess.lst
r21884r21885
7070gba       // Nintendo Game Boy Advance Handheld
7171snes      // Nintendo Super Nintendo NTSC
7272snespal   // Nintendo Super Nintendo PAL
73snes_add      // Nintendo Super Nintendo NTSC w/add-on CPUs as BIOS (legacy driver to run old dumps)
74snesp_add   // Nintendo Super Nintendo PAL w/add-on CPUs as BIOS (legacy driver to run old dumps)
7573n64       // Nintendo N64
7674n64dd     // Nintendo N64 (64DD Attachment)
7775pokemini  // Nintendo Pokemon Mini

Previous 199869 Revisions Next


© 1997-2024 The MAME Team