Previous 199869 Revisions Next

r20809 Thursday 7th February, 2013 at 19:21:05 UTC by Fabio Priuli
(MESS) megadriv.c: more updates [Fabio Priuli]
 - implemented correct ROM mirroring, based on research by Eke & others
 - emulated the protection in Ya Se Chuan Shuo, promoting it to work state
 - fixed cart type in Blockbuster World Video Game Championship II (works for the first time in MESS)
 - fixed cart type in HardBall III, Barver Battle Saga and Chao Ji Da Fu Weng
 - added support for unusual SRAM location in HardBall 95
 - fixed a few regressions introduced in the previous commit
 - fixed wrong driver class being used in 32x and SegaCD
[hash]megadriv.xml
[src/mame/includes]megadriv.h
[src/mame/machine]megadriv.c
[src/mess/drivers]megadriv.c
[src/mess/machine]md_eeprom.c md_jcart.c md_rom.c md_rom.h md_sk.c md_slot.c md_slot.h

trunk/src/mame/machine/megadriv.c
r20808r20809
2222
2323
2424#include "emu.h"
25#include "coreutil.h"
26#include "cpu/m68000/m68000.h"
27#include "cpu/sh2/sh2.h"
28#include "cpu/sh2/sh2comn.h"
29#include "cpu/z80/z80.h"
30#include "sound/2612intf.h"
31
32#include "sound/dac.h"
33#include "sound/sn76496.h"
34
35#include "imagedev/chd_cd.h"
36#include "imagedev/cartslot.h"
37#include "formats/imageutl.h"
38
3925#include "includes/megadriv.h"
40#include "machine/nvram.h"
41#include "cpu/ssp1601/ssp1601.h"
4226
43#include "machine/megavdp.h"
4427
4528
4629MACHINE_CONFIG_EXTERN( megadriv );
r20808r20809
880863   AM_RANGE(0xe00000, 0xe0ffff) AM_RAM AM_MIRROR(0x1f0000) AM_SHARE("megadrive_ram")
881864ADDRESS_MAP_END
882865
883MACHINE_CONFIG_DERIVED( md_bootleg, megadriv )
866MACHINE_CONFIG_START( md_bootleg, md_base_state )
867   MCFG_FRAGMENT_ADD( md_ntsc )
884868
885869   MCFG_CPU_MODIFY("maincpu")
886870   MCFG_CPU_PROGRAM_MAP(md_bootleg_map)
r20808r20809
11601144   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) /* 3.58 MHz */
11611145MACHINE_CONFIG_END
11621146
1163MACHINE_CONFIG_START( megadriv, md_base_state )
1164   MCFG_FRAGMENT_ADD(md_ntsc)
1165MACHINE_CONFIG_END
1166
11671147/************ PAL hardware has a different master clock *************/
11681148
11691149MACHINE_CONFIG_FRAGMENT( md_pal )
r20808r20809
12151195   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) /* 3.58 MHz */
12161196MACHINE_CONFIG_END
12171197
1218MACHINE_CONFIG_START( megadpal, md_base_state )
1219   MCFG_FRAGMENT_ADD(md_pal)
1220MACHINE_CONFIG_END
12211198
1222
1223
1224
1225MACHINE_CONFIG_DERIVED( genesis_32x, megadriv )
1226
1227   MCFG_DEVICE_ADD("sega32x", SEGA_32X_NTSC, 0)
1228
1229   // we need to remove and re-add the sound system because the balance is different
1230   // due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is slient?!)
1231   MCFG_DEVICE_REMOVE("ymsnd")
1232   MCFG_DEVICE_REMOVE("snsnd")
1233
1234   MCFG_SOUND_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
1235   MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
1236   MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
1237
1238   /* sound hardware */
1239   MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15)
1240   MCFG_SOUND_CONFIG(psg_intf)
1241   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
1242   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
1243
1244MACHINE_CONFIG_END
1245
1246
1247MACHINE_CONFIG_DERIVED( genesis_32x_pal, megadpal )
1248
1249   MCFG_DEVICE_ADD("sega32x", SEGA_32X_PAL, 0)
1250
1251   // we need to remove and re-add the sound system because the balance is different
1252   // due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is slient?!)
1253   MCFG_DEVICE_REMOVE("ymsnd")
1254   MCFG_DEVICE_REMOVE("snsnd")
1255
1256   MCFG_SOUND_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
1257   MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
1258   MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
1259
1260   /* sound hardware */
1261   MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15)
1262   MCFG_SOUND_CONFIG(psg_intf)
1263   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
1264   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
1265
1266MACHINE_CONFIG_END
1267
1268
1269
1270/******* 32X image loading *******/
1271
1272// FIXME: non-softlist loading should keep using ROM_CART_LOAD in the ROM definitions,
1273// once we better integrate softlist with the old loading procedures
1274DEVICE_IMAGE_LOAD_MEMBER( md_base_state, _32x_cart )
1275{
1276   UINT32 length;
1277   UINT8 *temp_copy;
1278   UINT16 *ROM16;
1279   UINT32 *ROM32;
1280   int i;
1281   
1282   if (image.software_entry() == NULL)
1283   {
1284      length = image.length();
1285      temp_copy = auto_alloc_array(image.device().machine(), UINT8, length);
1286      image.fread(temp_copy, length);
1287   }
1288   else
1289   {
1290      length = image.get_software_region_length("rom");
1291      temp_copy = auto_alloc_array(image.device().machine(), UINT8, length);
1292      memcpy(temp_copy, image.get_software_region("rom"), length);
1293   }
1294   
1295   /* Copy the cart image in the locations the driver expects */
1296   // Notice that, by using pick_integer, we are sure the code works on both LE and BE machines
1297   ROM16 = (UINT16 *) image.device().machine().root_device().memregion("gamecart")->base();
1298   for (i = 0; i < length; i += 2)
1299      ROM16[i / 2] = pick_integer_be(temp_copy, i, 2);
1300   
1301   ROM32 = (UINT32 *) image.device().machine().root_device().memregion("gamecart_sh2")->base();
1302   for (i = 0; i < length; i += 4)
1303      ROM32[i / 4] = pick_integer_be(temp_copy, i, 4);
1304   
1305   ROM16 = (UINT16 *) image.device().machine().root_device().memregion("maincpu")->base();
1306   for (i = 0x00; i < length; i += 2)
1307      ROM16[i / 2] = pick_integer_be(temp_copy, i, 2);
1308   
1309   auto_free(image.device().machine(), temp_copy);
1310   
1311   return IMAGE_INIT_PASS;
1312}
1313
1314
1315MACHINE_CONFIG_FRAGMENT( _32x_cartslot )
1316   MCFG_CARTSLOT_ADD("cart")
1317   MCFG_CARTSLOT_EXTENSION_LIST("32x,bin")
1318   MCFG_CARTSLOT_MANDATORY
1319   MCFG_CARTSLOT_INTERFACE("_32x_cart")
1320   MCFG_CARTSLOT_LOAD(md_base_state, _32x_cart)
1321   MCFG_SOFTWARE_LIST_ADD("cart_list","32x")
1322MACHINE_CONFIG_END
1323
1324
1325
1326struct cdrom_interface scd_cdrom =
1327{
1328   "scd_cdrom",
1329   NULL
1330};
1331
1332MACHINE_CONFIG_DERIVED( genesis_scd, megadriv )
1333   MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
1334   MCFG_CDROM_ADD( "cdrom",scd_cdrom )
1335MACHINE_CONFIG_END
1336
1337/* Different Softlists for different regions (for now at least) */
1338MACHINE_CONFIG_DERIVED( genesis_scd_scd, genesis_scd )
1339   MCFG_SOFTWARE_LIST_ADD("cd_list","segacd")
1340MACHINE_CONFIG_END
1341
1342MACHINE_CONFIG_DERIVED( genesis_scd_mcd, genesis_scd )
1343   MCFG_SOFTWARE_LIST_ADD("cd_list","megacd")
1344MACHINE_CONFIG_END
1345
1346MACHINE_CONFIG_DERIVED( genesis_scd_mcdj, genesis_scd )
1347   MCFG_SOFTWARE_LIST_ADD("cd_list","megacdj")
1348MACHINE_CONFIG_END
1349
1350MACHINE_CONFIG_DERIVED( genesis_32x_scd, genesis_32x )
1351
1352   MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
1353   //MCFG_QUANTUM_PERFECT_CPU("32x_master_sh2")
1354MACHINE_CONFIG_END
1355
1356
1357
1358
13591199static int megadriv_tas_callback(device_t *device)
13601200{
13611201   return 0; // writeback not allowed
trunk/src/mame/includes/megadriv.h
r20808r20809
3939MACHINE_CONFIG_EXTERN( megadriv_timers );
4040MACHINE_CONFIG_EXTERN( md_ntsc );
4141MACHINE_CONFIG_EXTERN( md_pal );
42MACHINE_CONFIG_EXTERN( md_svp );
43
44MACHINE_CONFIG_EXTERN( genesis_32x );
45MACHINE_CONFIG_EXTERN( genesis_32x_pal );
46MACHINE_CONFIG_EXTERN( genesis_scd );
47MACHINE_CONFIG_EXTERN( genesis_scd_scd );
48MACHINE_CONFIG_EXTERN( genesis_scd_mcd );
49MACHINE_CONFIG_EXTERN( genesis_scd_mcdj );
50MACHINE_CONFIG_EXTERN( genesis_32x_scd );
5142MACHINE_CONFIG_EXTERN( md_bootleg );    // for topshoot.c & hshavoc.c
5243
5344extern cpu_device *_svp_cpu;
r20808r20809
408399      { }
409400};
410401
411MACHINE_CONFIG_EXTERN( _32x_cartslot );
412402
413
414/*----------- defined in drivers/megadriv.c -----------*/
415
416/* These are needed to handle J-Cart inputs */
417extern DECLARE_WRITE16_HANDLER( jcart_ctrl_w );
418extern DECLARE_READ16_HANDLER( jcart_ctrl_r );
419
420403/* machine/megavdp.c */
421404extern UINT16 (*vdp_get_word_from_68k_mem)(running_machine &machine, UINT32 source, address_space& space);
422405extern UINT16 vdp_get_word_from_68k_mem_default(running_machine &machine, UINT32 source, address_space& space);
trunk/src/mess/machine/md_sk.c
r20808r20809
5252{
5353   if (m_exp->m_cart != NULL && m_exp->m_cart->get_rom_base() != NULL && offset >= 0x200000/2 && offset < (0x200000 + m_exp->m_cart->get_rom_size())/2)
5454      return m_exp->m_cart->m_rom[offset - 0x200000/2];
55   return m_rom[offset];
55   if (offset < 0x400000/2)
56      return m_rom[MD_ADDR(offset)];
57   else
58      return 0xffff;
5659}
5760
5861WRITE16_MEMBER(md_rom_sk_device::write)
trunk/src/mess/machine/md_jcart.c
r20808r20809
188188         return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8);
189189      }
190190   }
191   return m_rom[offset];
191   if (offset < 0x400000/2)
192      return m_rom[MD_ADDR(offset)];
193   else
194      return 0xffff;
192195}
193196
194197WRITE16_MEMBER(md_jcart_device::write)
r20808r20809
228231         return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8);
229232      }
230233   }
231   return m_rom[offset];
234   if (offset < 0x400000/2)
235      return m_rom[MD_ADDR(offset)];
236   else
237      return 0xffff;
232238}
233239
234240WRITE16_MEMBER(md_seprom_codemast_device::write)
trunk/src/mess/machine/md_slot.c
r20808r20809
1616   md_sk: Sonic & Knuckles pass-thorugh cart (enables a second slot to mount any other cart)
1717   md_stm95: cart + STM95 EEPROM (e.g. Pier Solar)
1818
19 TODO: currently read access in 0x000000-0x7fffff are not masked (so we assume that no game attempts to
20       read beyond its ROM size). A regression test is pending to identify which games need this and mirror
21       them properly (Eke's doc states ROM data should be mirrored), but none of the ~120 games I tried
22       attempted that and a testcase would be appreciated
2319 
20   Cart Mirroring (based Eke's research)
21
22   MD Cartridge area is mapped to $000000-$3fffff: when accessing ROM, 68k address lines A1 to A21 can be
23   used by the internal cartridge hardware to decode full 4MB address range.
24   Depending on ROM total size and additional decoding hardware, some address lines might be ignored,
25   resulting in ROM mirroring.
26 
27   Cartridges typically use either 8-bits (x2) or 16-bits (x1, x2) Mask ROM chips, each chip size is a
28   factor of 2 bytes.
29   When one chip ROM1 of size 2^N is present, it is generally mirrored each 2^N bytes so that read access
30   to cart area sees the sequence ROM1,ROM1,ROM1,... (up to 4MB)
31   When two chips ROM1 & ROM2 are present and the whole size is 2^N, then the block ROM1+ROM2 is mirrored
32   in the cart area, and reads see the sequence ROM1+ROM2,ROM1+ROM2,... (up to 4MB)
33   When two chips ROM1 & ROM2 are present and the whole size is not 2^N (e.g. because ROM1 and ROM2 have
34   different sizes), then the area between the end of ROM2 and next power 2^N is generally ignored, and
35   reads see the sequence ROM1,ROM2,XXXX,ROM1,ROM2,XXXX... (up to 4MB)
36 
37   At loading time we first compute first power 2^N larger than cart size (see get_padded_size function),
38   we allocate such a size for ROM and we fill of 0xff the area between end of dump and 2^N.
39   Then we handle mirroring by creating a rom_bank_map[] (see rom_map_setup function) which points each
40   access in 0x000000-0x400000 to the correct 64K ROM bank.
41
2442 ***********************************************************************************************************/
2543
2644
r20808r20809
89107   }
90108}
91109
110//-------------------------------------------------
111//  rom_map_setup - setup map of rom banks in 64K
112//  blocks, so to simplify ROM mirroring
113//-------------------------------------------------
92114
115void device_md_cart_interface::rom_map_setup(UINT32 size)
116{
117   int i;
118   // setup the rom_bank_map array to faster ROM read
119   for (i = 0; i < size / 0x10000; i++)
120      rom_bank_map[i] = i;
121   
122   // fill up remaining blocks with mirrors
123   while (i % 64)
124   {
125      int j = 0, repeat_banks;
126      while ((i % (64 >> j)) && j < 7)
127         j++;
128      repeat_banks = i % (64 >> (j - 1));
129      for (int k = 0; k < repeat_banks; k++)
130         rom_bank_map[i + k] = rom_bank_map[i + k - repeat_banks];
131      i += repeat_banks;
132   }
133   
134// check bank map!
135//   for (i = 0; i < 64; i++)
136//   {
137//      printf("bank %3d = %3d\t", i, rom_bank_map[i]);
138//      if ((i%8) == 7)
139//         printf("\n");
140//   }
141}
142
143//-------------------------------------------------
144// 
145// 
146//-------------------------------------------------
147
148UINT32 device_md_cart_interface::get_padded_size(UINT32 size)
149{
150   UINT32 pad_size = 0x10000;
151   while (size > pad_size)
152      pad_size <<= 1;
153
154   if (pad_size < 0x800000 && size < pad_size)
155      return pad_size;
156   else
157      return size;
158}
159
160
161
93162//**************************************************************************
94163//  LIVE DEVICE
95164//**************************************************************************
r20808r20809
170239
171240   { SEGA_SRAM, "rom_sram" },
172241   { SEGA_FRAM, "rom_fram" },
242   { HARDBALL95, "rom_hardbl95" },
173243   { BEGGAR, "rom_beggar"},
174244   
175245   { SEGA_EEPROM, "rom_eeprom" },
r20808r20809
294364   UINT32 length = get_software_region_length("rom");
295365   const char  *slot_name;
296366
297   m_cart->rom_alloc(machine(), length);   
367   // if cart size is not (2^n * 64K), the system will see anyway that size so we need to alloc a bit more space
368   length = m_cart->get_padded_size(length);
369
370   m_cart->rom_alloc(machine(), length);
298371   ROM = m_cart->get_rom_base();
299   memcpy(ROM, get_software_region("rom"), length);
372   memcpy(ROM, get_software_region("rom"), get_software_region_length("rom"));
373
374   // if we allocated a ROM larger that the file (e.g. due to uneven cart size), set remaining space to 0xff
375   if (length > get_software_region_length("rom"))
376      memset(ROM + get_software_region_length("rom")/2, 0xffff, (length - get_software_region_length("rom"))/2);
300377   
301378   if ((slot_name = get_feature("slot")) == NULL)
302379      m_type = SEGA_STD;
303380   else
304381      m_type = md_get_pcb_id(slot_name);
305   
382
383   // handle mirroring of ROM, unless it's SSF2 or Pier Solar
384   if (m_type != SSF2 && m_type != PSOLAR)
385      m_cart->rom_map_setup(length);
386
306387   return IMAGE_INIT_PASS;
307388}
308389
r20808r20809
382463int base_md_cart_slot_device::load_nonlist()
383464{
384465   unsigned char *ROM, *tmpROM;
385   UINT32 len = length();
466   UINT32 len = m_cart->get_padded_size(length());   // if cart size is not (2^n * 64K), the system will see anyway that size so we need to alloc a bit more space
386467
387468   // this contains an hack for SSF2: its current bankswitch code needs larger rom space to work
388469   m_cart->rom_alloc(machine(), (len == 0x500000) ? 0x900000 : len);
r20808r20809
428509   }
429510
430511   global_free(tmpROM);
431
512   
513   // if we allocated a ROM larger that the file (e.g. due to uneven cart size), set remaining space to 0xff
514   if (len > length())
515      memset(m_cart->get_rom_base() + length()/2, 0xffff, (len - length())/2);
516   
432517   // STEP 2: determine the cart type (to deal with pirate mappers & eeprom)
433   m_type = get_cart_type(ROM, len);
518   m_type = get_cart_type(ROM, length());
434519
520   // handle mirroring of ROM, unless it's SSF2 or Pier Solar
521   if (m_type != SSF2 && m_type != PSOLAR)
522      m_cart->rom_map_setup(len);
523   
435524#ifdef LSB_FIRST
436525   unsigned char fliptemp;
437526   // is this really needed nowadays?
r20808r20809
577666         m_cart->m_nvram_active = 1;
578667         m_cart->m_nvram_handlers_installed = 1;
579668         break;
580
669         
581670      // These types might come from both (pending proper id routines)
671      case HARDBALL95:
672         m_cart->m_nvram_start = 0x300000;
673         m_cart->m_nvram_end = m_cart->m_nvram_start + get_software_region_length("sram") - 1;
674         m_cart->nvram_alloc(machine(), m_cart->m_nvram_end - m_cart->m_nvram_start + 1);
675         m_cart->m_nvram_active = 1;
676         m_cart->m_nvram_handlers_installed = 1;
677         break;
582678      case BEGGAR:
583679         m_cart->m_nvram_start = 0x400000;
584680         m_cart->m_nvram_end = m_cart->m_nvram_start + 0xffff;
trunk/src/mess/machine/md_slot.h
r20808r20809
55 TYPE DEFINITIONS
66 ***************************************************************************/
77
8#define MD_ADDR(a)  rom_bank_map[(a / 0x10000) & 0x3f] * 0x10000 + (a & 0xffff)
89
910/* PCB */
1011enum
r20808r20809
1920
2021   // Cart + NVRAM
2122   SEGA_SRAM, SEGA_FRAM,
23   HARDBALL95,                  /* Hardball 95 uses different sram start address */
2224   BEGGAR,                      /* Xin Qigai Wangzi uses different sram start address and has no valid header */
2325   
2426   // EEPROM
r20808r20809
106108   virtual UINT32 get_rom_size() { return m_rom_size; };
107109   virtual UINT32 get_nvram_size() { return m_nvram_size; };
108110   
111   virtual void rom_map_setup(UINT32 size);   
112   virtual UINT32 get_padded_size(UINT32 size);
113   
109114   int m_nvram_start, m_nvram_end;
110115   int m_nvram_active, m_nvram_readonly;
111116   
r20808r20809
119124   UINT16      *m_nvram;
120125   UINT32 m_rom_size;
121126   UINT32 m_nvram_size;
127   
128   UINT8 rom_bank_map[128];   // 64K chunks of rom
122129};
123130
124131
trunk/src/mess/machine/md_eeprom.c
r20808r20809
213213{
214214   if (offset == 0x200000/2)
215215   {
216      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
216//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
217217      return ~m_i2c_mem & 1;
218218   }
219   return m_rom[offset];
219   if (offset < 0x400000/2)
220      return m_rom[MD_ADDR(offset)];
221   else
222      return 0xffff;
220223}
221224
222225WRITE16_MEMBER(md_std_eeprom_device::write)
r20808r20809
234237{
235238   if (offset == 0x200000/2)
236239   {
237      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
240//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
238241      return m_i2c_mem & 1;
239242   }
240   return m_rom[offset];
243   if (offset < 0x400000/2)
244      return m_rom[MD_ADDR(offset)];
245   else
246      return 0xffff;
241247}
242248
243249WRITE16_MEMBER(md_eeprom_nbajam_device::write)
r20808r20809
255261{
256262   if (offset == 0x200000/2)
257263   {
258      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
264//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
259265      return m_i2c_mem & 1;
260266   }
261   return m_rom[offset];
267   if (offset < 0x400000/2)
268      return m_rom[MD_ADDR(offset)];
269   else
270      return 0xffff;
262271}
263272
264273WRITE16_MEMBER(md_eeprom_nbajamte_device::write)
r20808r20809
277286{
278287   if (offset == 0x200000/2)
279288   {
280      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
289//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
281290      return m_i2c_mem & 1;
282291   }
283   return m_rom[offset];
292   if (offset < 0x400000/2)
293      return m_rom[MD_ADDR(offset)];
294   else
295      return 0xffff;
284296}
285297
286298WRITE16_MEMBER(md_eeprom_cslam_device::write)
r20808r20809
299311{
300312   if (offset == 0x200000/2)
301313   {
302      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
314//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
303315      return m_i2c_mem & 1;
304316   }
305   return m_rom[offset];
317   if (offset < 0x400000/2)
318      return m_rom[MD_ADDR(offset)];
319   else
320      return 0xffff;
306321}
307322
308323WRITE16_MEMBER(md_eeprom_nflqb_device::write)
r20808r20809
320335{
321336   if (offset == 0x200000/2)
322337   {
323      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
338//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
324339      return (m_i2c_mem & 1) << 7;
325340   }
326   return m_rom[offset];
341   if (offset < 0x400000/2)
342      return m_rom[MD_ADDR(offset)];
343   else
344      return 0xffff;
327345}
328346
329347WRITE16_MEMBER(md_eeprom_nhlpa_device::write)
r20808r20809
341359{
342360   if (offset == 0x380000/2)
343361   {
344      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
362//      m_i2c_mem = i2cmem_sda_read(m_i2cmem);
345363      return (m_i2c_mem & 1) << 7;
346364   }
347   return m_rom[offset];
365   if (offset < 0x400000/2)
366      return m_rom[MD_ADDR(offset)];
367   else
368      return 0xffff;
348369}
349370
350371WRITE16_MEMBER(md_eeprom_blara_device::write)
trunk/src/mess/machine/md_rom.c
r20808r20809
3737const device_type MD_ROM_SOULB = &device_creator<md_rom_soulb_device>;
3838const device_type MD_ROM_CHINF3 = &device_creator<md_rom_chinf3_device>;
3939const device_type MD_ROM_ELFWOR = &device_creator<md_rom_elfwor_device>;
40const device_type MD_ROM_YASECH = &device_creator<md_rom_yasech_device>;
4041const device_type MD_ROM_LION2 = &device_creator<md_rom_lion2_device>;
4142const device_type MD_ROM_LION3 = &device_creator<md_rom_lion3_device>;
4243const device_type MD_ROM_MCPIR = &device_creator<md_rom_mcpirate_device>;
r20808r20809
4647const device_type MD_ROM_SQUIR = &device_creator<md_rom_squir_device>;
4748const device_type MD_ROM_TOPF = &device_creator<md_rom_topf_device>;
4849const device_type MD_ROM_RADICA = &device_creator<md_rom_radica_device>;
49const device_type MD_ROM_BEGGAR = &device_creator<md_rom_beggar_device>;
5050
5151// below ones are currently unused, because the protection is patched out
5252const device_type MD_ROM_MULAN = &device_creator<md_std_rom_device>;
r20808r20809
7171{
7272}
7373
74md_rom_beggar_device::md_rom_beggar_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
75               : md_std_rom_device(mconfig, MD_ROM_BEGGAR, "MD Xin Qigai Wangzi", tag, owner, clock)
76{
77}
78
7974md_rom_fram_device::md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
8075               : md_std_rom_device(mconfig, MD_ROM_FRAM, "MD Standard cart + FRAM", tag, owner, clock)
8176{
r20808r20809
151146{
152147}
153148
149md_rom_yasech_device::md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
150               : md_std_rom_device(mconfig, MD_ROM_YASECH, "MD Ya Se Chuan Shuo", tag, owner, clock)
151{
152}
153
154154md_rom_lion2_device::md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
155155               : md_std_rom_device(mconfig, MD_ROM_LION2, "MD Lion King 2", tag, owner, clock)
156156{
r20808r20809
282282
283283READ16_MEMBER(md_rom_sram_device::read)
284284{
285   offset <<= 1;
286285   // since a lot of generic carts ends up here if loaded from fullpath
287286   // we access nvram only if m_nvram_handlers_installed has been turned on
288287   if (m_nvram_handlers_installed)
289288   {
290      if (offset >= m_nvram_start && offset < m_nvram_end && m_nvram_active)
291         return m_nvram[(offset - m_nvram_start)/2];
289      if (offset >= m_nvram_start/2 && offset < m_nvram_end/2 && m_nvram_active)
290         return m_nvram[offset - m_nvram_start/2];
292291   }
293   return m_rom[offset/2];
292   if (offset < 0x400000/2)
293      return m_rom[MD_ADDR(offset)];
294   else
295      return 0xffff;
294296}
295297
296298WRITE16_MEMBER(md_rom_sram_device::write)
r20808r20809
299301   // we access nvram only if m_nvram_handlers_installed has been turned on
300302   if (m_nvram_handlers_installed)
301303   {
302      offset <<= 1;
303      if (offset >= m_nvram_start && offset <= m_nvram_end && m_nvram_active && !m_nvram_readonly)
304         m_nvram[(offset - m_nvram_start)/2] = data;
304      if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active && !m_nvram_readonly)
305         m_nvram[offset - m_nvram_start/2] = data;
305306   }
306307}
307308
308309WRITE16_MEMBER(md_rom_sram_device::write_a13)
309310{
310   offset <<= 1;
311   if (offset == 0xf)
311   if (offset == 0xf0/2)
312312   {
313313      /* unsure if this is actually supposed to toggle or just switch on? yet to encounter game that uses this */
314314      m_nvram_active = BIT(data, 0);
r20808r20809
322322}
323323
324324/*-------------------------------------------------
325 BEGGAR PRINCE / XIN QIGAI WANGZI [same as above, but diff start/end... merge?]
326 -------------------------------------------------*/
327
328READ16_MEMBER(md_rom_beggar_device::read)
329{
330   offset <<= 1;
331   if (offset >= m_nvram_start && offset < m_nvram_end && m_nvram_active)
332      return m_nvram[(offset - m_nvram_start)/2];
333   return m_rom[offset/2];
334}
335
336WRITE16_MEMBER(md_rom_beggar_device::write)
337{
338   offset <<= 1;
339   if (offset >= m_nvram_start && offset <= m_nvram_end && m_nvram_active && !m_nvram_readonly)
340      m_nvram[(offset - m_nvram_start)/2] = data;
341}
342
343WRITE16_MEMBER(md_rom_beggar_device::write_a13)
344{
345   offset <<= 1;
346   if (offset == 0xf)
347   {
348      /* unsure if this is actually supposed to toggle or just switch on? yet to encounter game that uses this */
349      m_nvram_active = BIT(data, 0);
350      m_nvram_readonly = BIT(data, 1);
351   }
352}
353
354/*-------------------------------------------------
355325 CART + FRAM [almost same as SRAM... merge common parts?]
356326 -------------------------------------------------*/
357327
358328READ16_MEMBER(md_rom_fram_device::read)
359329{
360   offset <<= 1;
361   if (offset >= m_nvram_start && offset < m_nvram_end && m_nvram_active)
362      return m_nvram[(offset - m_nvram_start)/2];
363   return m_rom[offset/2];
330   if (offset >= m_nvram_start/2 && offset < m_nvram_end/2 && m_nvram_active)
331      return m_nvram[offset - m_nvram_start/2];
332   if (offset < 0x400000/2)
333      return m_rom[MD_ADDR(offset)];
334   else
335      return 0xffff;
364336}
365337
366338WRITE16_MEMBER(md_rom_fram_device::write_a13)
367339{
368   offset <<= 1;
369   if (offset == 0xf)
340   if (offset == 0xf0/2)
370341      m_nvram_active = BIT(data, 0);
371342}
372343
373344
374345READ16_MEMBER(md_rom_fram_device::read_a13)
375346{
376   if (offset == 0xf)
347   if (offset == 0xf0/2)
377348      return m_nvram_active;
378349   else
379350      return 0xffff;
r20808r20809
564535}
565536
566537/*-------------------------------------------------
538 YA SE CHUAN SHUO
539 -------------------------------------------------*/
540
541READ16_MEMBER(md_rom_yasech_device::read)
542{
543   if (offset == 0x400000/2)   return 0x6300;
544   if (offset == 0x400002/2)   return 0x9800;
545   if (offset == 0x400004/2)   return 0xc900;
546   if (offset == 0x400006/2)   return 0x1800;
547   return m_rom[offset];
548}
549
550/*-------------------------------------------------
567551 KOF98
568552 -------------------------------------------------*/
569553
trunk/src/mess/machine/md_rom.h
r20808r20809
33
44#include "machine/md_slot.h"
55
6
76//**************************************************************************
87//  TYPE DEFINITIONS
98//**************************************************************************
r20808r20809
2322   virtual void device_config_complete() { m_shortname = "md_std_rom"; }
2423     
2524   // reading and writing
26   virtual DECLARE_READ16_MEMBER(read) { return m_rom[offset]; };
25   virtual DECLARE_READ16_MEMBER(read) { if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; else return 0xffff; };
2726   virtual DECLARE_WRITE16_MEMBER(write) { };
2827};
2928
r20808r20809
4443   virtual DECLARE_WRITE16_MEMBER(write_a13);
4544};
4645
47// ======================> md_rom_beggar_device
48
49class md_rom_beggar_device : public md_std_rom_device
50{
51public:
52   // construction/destruction
53   md_rom_beggar_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
54   
55   // device-level overrides
56   virtual void device_config_complete() { m_shortname = "md_rom_beggar"; }
57   
58   // reading and writing
59   virtual DECLARE_READ16_MEMBER(read);
60   virtual DECLARE_WRITE16_MEMBER(write);
61   virtual DECLARE_WRITE16_MEMBER(write_a13);
62};
63
6446// ======================> md_rom_fram_device
6547
6648class md_rom_fram_device : public md_std_rom_device
r20808r20809
170152   virtual DECLARE_READ16_MEMBER(read);
171153};
172154
155// ======================> md_rom_yasech_device
156
157class md_rom_yasech_device : public md_std_rom_device
158{
159public:
160   // construction/destruction
161   md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
162   
163   // device-level overrides
164   virtual void device_config_complete() { m_shortname = "md_rom_yasech"; }
165   
166   // reading and writing
167   virtual DECLARE_READ16_MEMBER(read);
168};
169
173170// ======================> md_rom_kof98_device
174171
175172class md_rom_kof98_device : public md_std_rom_device
r20808r20809
469466extern const device_type MD_STD_ROM;
470467extern const device_type MD_ROM_SRAM;
471468extern const device_type MD_ROM_FRAM;
472extern const device_type MD_ROM_BEGGAR;
473469extern const device_type MD_ROM_BUGSLIFE;
474470extern const device_type MD_ROM_CHINF3;
475471extern const device_type MD_ROM_ELFWOR;
472extern const device_type MD_ROM_YASECH;
476473extern const device_type MD_ROM_KOF98;
477474extern const device_type MD_ROM_KOF99;
478475extern const device_type MD_ROM_LION2;
trunk/src/mess/drivers/megadriv.c
r20808r20809
99#include "machine/md_jcart.h"
1010#include "machine/md_stm95.h"
1111
12#include "sound/sn76496.h"
1213
14#include "imagedev/chd_cd.h"
15#include "imagedev/cartslot.h"
16
17#include "formats/imageutl.h"
18
19
1320/*************************************
1421 *
1522 *  Input handlers
r20808r20809
296303   SLOT_INTERFACE_INTERNAL("rom_sram",  MD_ROM_SRAM)
297304   SLOT_INTERFACE_INTERNAL("rom_sramsafe",  MD_ROM_SRAM)
298305   SLOT_INTERFACE_INTERNAL("rom_fram",  MD_ROM_FRAM)
299   SLOT_INTERFACE_INTERNAL("rom_beggar",  MD_ROM_BEGGAR)
306   SLOT_INTERFACE_INTERNAL("rom_hardbl95", MD_ROM_SRAM)
307   SLOT_INTERFACE_INTERNAL("rom_beggar",  MD_ROM_SRAM)
300308// EEPROM handling (not supported fully yet)
301309   SLOT_INTERFACE_INTERNAL("rom_eeprom",  MD_STD_EEPROM)
302310   SLOT_INTERFACE_INTERNAL("rom_nbajam",  MD_EEPROM_NBAJAM)
r20808r20809
319327   SLOT_INTERFACE_INTERNAL("rom_bugs",  MD_ROM_BUGSLIFE)
320328   SLOT_INTERFACE_INTERNAL("rom_chinf3",  MD_ROM_CHINF3)
321329   SLOT_INTERFACE_INTERNAL("rom_elfwor",  MD_ROM_ELFWOR)
330   SLOT_INTERFACE_INTERNAL("rom_yasech",  MD_ROM_YASECH)
322331   SLOT_INTERFACE_INTERNAL("rom_kof98",  MD_ROM_KOF98)
323332   SLOT_INTERFACE_INTERNAL("rom_kof99",  MD_ROM_KOF99)
324333   SLOT_INTERFACE_INTERNAL("rom_lion2",  MD_ROM_LION2)
r20808r20809
443452   megadrive_region_pal = 0;
444453}
445454
446/****************************************** SegaCD & 32X emulation ****************************************/
455/****************************************** 32X emulation ****************************************/
447456
457static const sn76496_config psg_intf =
458{
459   DEVCB_NULL
460};
448461
462// FIXME: non-softlist loading should keep using ROM_CART_LOAD in the ROM definitions,
463// once we better integrate softlist with the old loading procedures
464DEVICE_IMAGE_LOAD_MEMBER( md_base_state, _32x_cart )
465{
466   UINT32 length;
467   UINT8 *temp_copy;
468   UINT16 *ROM16;
469   UINT32 *ROM32;
470   int i;
471   
472   if (image.software_entry() == NULL)
473   {
474      length = image.length();
475      temp_copy = auto_alloc_array(image.device().machine(), UINT8, length);
476      image.fread(temp_copy, length);
477   }
478   else
479   {
480      length = image.get_software_region_length("rom");
481      temp_copy = auto_alloc_array(image.device().machine(), UINT8, length);
482      memcpy(temp_copy, image.get_software_region("rom"), length);
483   }
484   
485   /* Copy the cart image in the locations the driver expects */
486   // Notice that, by using pick_integer, we are sure the code works on both LE and BE machines
487   ROM16 = (UINT16 *) image.device().machine().root_device().memregion("gamecart")->base();
488   for (i = 0; i < length; i += 2)
489      ROM16[i / 2] = pick_integer_be(temp_copy, i, 2);
490   
491   ROM32 = (UINT32 *) image.device().machine().root_device().memregion("gamecart_sh2")->base();
492   for (i = 0; i < length; i += 4)
493      ROM32[i / 4] = pick_integer_be(temp_copy, i, 4);
494   
495   ROM16 = (UINT16 *) image.device().machine().root_device().memregion("maincpu")->base();
496   for (i = 0x00; i < length; i += 2)
497      ROM16[i / 2] = pick_integer_be(temp_copy, i, 2);
498   
499   auto_free(image.device().machine(), temp_copy);
500   
501   return IMAGE_INIT_PASS;
502}
503
504
505static MACHINE_CONFIG_START( genesis_32x, md_cons_state )
506//MACHINE_CONFIG_DERIVED( genesis_32x, megadriv )
507   MCFG_FRAGMENT_ADD( md_ntsc )
508
509   MCFG_DEVICE_ADD("sega32x", SEGA_32X_NTSC, 0)
510
511   // we need to remove and re-add the sound system because the balance is different
512   // due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is slient?!)
513   MCFG_DEVICE_REMOVE("ymsnd")
514   MCFG_DEVICE_REMOVE("snsnd")
515
516   MCFG_SOUND_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
517   MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
518   MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
519
520   /* sound hardware */
521   MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15)
522   MCFG_SOUND_CONFIG(psg_intf)
523   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
524   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
525
526MACHINE_CONFIG_END
527
528
529static MACHINE_CONFIG_START( genesis_32x_pal, md_cons_state )
530//MACHINE_CONFIG_DERIVED( genesis_32x_pal, megadpal )
531   MCFG_FRAGMENT_ADD( md_pal )
532
533   MCFG_DEVICE_ADD("sega32x", SEGA_32X_PAL, 0)
534
535   // we need to remove and re-add the sound system because the balance is different
536   // due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is slient?!)
537   MCFG_DEVICE_REMOVE("ymsnd")
538   MCFG_DEVICE_REMOVE("snsnd")
539
540   MCFG_SOUND_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
541   MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
542   MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
543
544   /* sound hardware */
545   MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15)
546   MCFG_SOUND_CONFIG(psg_intf)
547   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
548   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
549
550MACHINE_CONFIG_END
551
552
553MACHINE_CONFIG_FRAGMENT( _32x_cartslot )
554   MCFG_CARTSLOT_ADD("cart")
555   MCFG_CARTSLOT_EXTENSION_LIST("32x,bin")
556   MCFG_CARTSLOT_MANDATORY
557   MCFG_CARTSLOT_INTERFACE("_32x_cart")
558   MCFG_CARTSLOT_LOAD(md_base_state, _32x_cart)
559   MCFG_SOFTWARE_LIST_ADD("cart_list","32x")
560MACHINE_CONFIG_END
561
449562static MACHINE_CONFIG_DERIVED( ms_32x, genesis_32x )
450563   MCFG_FRAGMENT_ADD( _32x_cartslot )
451564   MCFG_DEVICE_MODIFY("cart_list")
r20808r20809
499612   _32X_ROMS
500613ROM_END
501614
615
616/****************************************** SegaCD emulation ****************************************/
617
618struct cdrom_interface scd_cdrom =
619{
620   "scd_cdrom",
621   NULL
622};
623
624static MACHINE_CONFIG_START( genesis_scd, md_cons_state )
625//MACHINE_CONFIG_DERIVED( genesis_scd, megadriv )
626   MCFG_FRAGMENT_ADD( md_ntsc )
627   MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
628   MCFG_CDROM_ADD( "cdrom",scd_cdrom )
629
630   MCFG_SOFTWARE_LIST_ADD("cd_list","segacd")
631MACHINE_CONFIG_END
632
633static MACHINE_CONFIG_START( mega_scd, md_cons_state )
634//MACHINE_CONFIG_DERIVED( genesis_scd, megadriv )
635   MCFG_FRAGMENT_ADD( md_pal )
636   MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_EUROPE, 0)
637
638   MCFG_CDROM_ADD( "cdrom",scd_cdrom )
639
640   MCFG_SOFTWARE_LIST_ADD("cd_list","megacd")
641MACHINE_CONFIG_END
642
643static MACHINE_CONFIG_START( megaj_scd, md_cons_state )
644//MACHINE_CONFIG_DERIVED( genesis_scd, megadriv )
645   MCFG_FRAGMENT_ADD( md_ntsc )
646   MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_JAPAN, 0)
647   MCFG_CDROM_ADD( "cdrom",scd_cdrom )
648
649   MCFG_SOFTWARE_LIST_ADD("cd_list","megacdj")
650MACHINE_CONFIG_END
651
652
653static MACHINE_CONFIG_DERIVED( genesis_32x_scd, genesis_32x )
654
655   MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
656   //MCFG_QUANTUM_PERFECT_CPU("32x_master_sh2")
657MACHINE_CONFIG_END
658
659
660
502661/* We need proper names for most of these BIOS ROMs! */
503662ROM_START( segacd )
504663   ROM_REGION16_BE( 0x400000, "maincpu", ROMREGION_ERASE00 )
r20808r20809
9541113CONS( 1994, 32xj,       32x,       0,      ms_32x_jpn,      md, md_cons_state,     md_jpn,    "Sega",   "Mega Drive with 32X (Japan, NTSC)", GAME_NOT_WORKING )
9551114
9561115// the SegaCD plugged into the expansion port..
957CONS( 1992, segacd,     0,         0,      genesis_scd_scd, md, md_cons_state,     genesis,   "Sega",   "Sega CD (USA, NTSC)", GAME_NOT_WORKING )
958CONS( 1993, megacd,     segacd,    0,      genesis_scd_mcd, md, md_cons_state,     md_eur,    "Sega",   "Mega-CD (Europe, PAL)", GAME_NOT_WORKING )
959CONS( 1991, megacdj,    segacd,    0,      genesis_scd_mcdj,md, md_cons_state,     md_jpn,    "Sega",   "Mega-CD (Japan, NTSC)", GAME_NOT_WORKING ) // this bios doesn't work with our ram interleave needed by a few games?!
960CONS( 1991, megacda,    segacd,    0,      genesis_scd_mcdj,md, md_cons_state,     md_eur,    "Sega",   "Mega-CD (Asia, PAL)", GAME_NOT_WORKING )
961CONS( 1993, segacd2,    0,         0,      genesis_scd_scd, md, md_cons_state,     genesis,   "Sega",   "Sega CD 2 (USA, NTSC)", GAME_NOT_WORKING )
962CONS( 1993, megacd2,    segacd2,   0,      genesis_scd_mcd, md, md_cons_state,     md_eur,    "Sega",   "Mega-CD 2 (Europe, PAL)", GAME_NOT_WORKING )
963CONS( 1993, megacd2j,   segacd2,   0,      genesis_scd_mcdj,md, md_cons_state,     md_jpn,    "Sega",   "Mega-CD 2 (Japan, NTSC)", GAME_NOT_WORKING )
1116CONS( 1992, segacd,     0,         0,      genesis_scd,     md, md_cons_state,     genesis,   "Sega",   "Sega CD (USA, NTSC)", GAME_NOT_WORKING )
1117CONS( 1993, megacd,     segacd,    0,      mega_scd,        md, md_cons_state,     md_eur,    "Sega",   "Mega-CD (Europe, PAL)", GAME_NOT_WORKING )
1118CONS( 1991, megacdj,    segacd,    0,      megaj_scd,       md, md_cons_state,     md_jpn,    "Sega",   "Mega-CD (Japan, NTSC)", GAME_NOT_WORKING ) // this bios doesn't work with our ram interleave needed by a few games?!
1119CONS( 1991, megacda,    segacd,    0,      megaj_scd,       md, md_cons_state,     md_eur,    "Sega",   "Mega-CD (Asia, PAL)", GAME_NOT_WORKING )
1120CONS( 1993, segacd2,    0,         0,      genesis_scd,     md, md_cons_state,     genesis,   "Sega",   "Sega CD 2 (USA, NTSC)", GAME_NOT_WORKING )
1121CONS( 1993, megacd2,    segacd2,   0,      mega_scd,        md, md_cons_state,     md_eur,    "Sega",   "Mega-CD 2 (Europe, PAL)", GAME_NOT_WORKING )
1122CONS( 1993, megacd2j,   segacd2,   0,      megaj_scd,       md, md_cons_state,     md_jpn,    "Sega",   "Mega-CD 2 (Japan, NTSC)", GAME_NOT_WORKING )
9641123CONS( 1993, laseract,   0,         0,      genesis_scd,     md, md_cons_state,     genesis,   "Pioneer","LaserActive (USA, NTSC)", GAME_NOT_WORKING )
965CONS( 1993, laseractj,  laseract,  0,      genesis_scd,     md, md_cons_state,     md_jpn,    "Pioneer","LaserActive (Japan, NTSC)", GAME_NOT_WORKING )
1124CONS( 1993, laseractj,  laseract,  0,      megaj_scd,       md, md_cons_state,     md_jpn,    "Pioneer","LaserActive (Japan, NTSC)", GAME_NOT_WORKING )
9661125CONS( 1993, xeye,       0,         0,      genesis_scd,     md, md_cons_state,     genesis,   "JVC",    "X'eye (USA, NTSC)", GAME_NOT_WORKING )
967CONS( 1992, wmega,      xeye,      0,      genesis_scd,     md, md_cons_state,     md_jpn,    "Sega",   "Wondermega (Japan, NTSC)", GAME_NOT_WORKING )
968CONS( 1993, wmegam2,    xeye,      0,      genesis_scd,     md, md_cons_state,     md_jpn,    "Victor", "Wondermega M2 (Japan, NTSC)", GAME_NOT_WORKING )
1126CONS( 1992, wmega,      xeye,      0,      megaj_scd,       md, md_cons_state,     md_jpn,    "Sega",   "Wondermega (Japan, NTSC)", GAME_NOT_WORKING )
1127CONS( 1993, wmegam2,    xeye,      0,      megaj_scd,       md, md_cons_state,     md_jpn,    "Victor", "Wondermega M2 (Japan, NTSC)", GAME_NOT_WORKING )
9691128CONS( 1994, cdx,        0,         0,      genesis_scd,     md, md_cons_state,     genesis,   "Sega",   "CDX (USA, NTSC)", GAME_NOT_WORKING )
970CONS( 1994, multmega,   cdx,       0,      genesis_scd,     md, md_cons_state,     md_eur,    "Sega",   "Multi-Mega (Europe, PAL)", GAME_NOT_WORKING )
971CONS( 1994, 32x_scd,    0,         0,      genesis_32x_scd, md, md_cons_state,     genesis,  "Sega",   "Sega CD (USA, NTSC, w/32X)", GAME_NOT_WORKING )
1129CONS( 1994, multmega,   cdx,       0,      mega_scd,        md, md_cons_state,     md_eur,    "Sega",   "Multi-Mega (Europe, PAL)", GAME_NOT_WORKING )
1130CONS( 1994, 32x_scd,    0,         0,      genesis_32x_scd, md, md_cons_state,     genesis,   "Sega",   "Sega CD (USA, NTSC, w/32X)", GAME_NOT_WORKING )
9721131
9731132// this is a standalone system based on the md-like hardware (same vdp etc.)
9741133
trunk/hash/megadriv.xml
r20808r20809
31223122      <year>199?</year>
31233123      <publisher>&lt;unlicensed&gt;</publisher>
31243124      <part name="cart" interface="megadriv_cart">
3125         <feature name="pcb_type" value="SEGA-SRAM" />
3126         <feature name="slot" value="rom_sram" />
31253127         <dataarea name="rom" size="2097152">
31263128            <rom name="barver battle saga - tai kong zhan shi (chi) (unl).bin" size="2097152" crc="d37a37c6" sha1="6d49a0db7687ccad3441f47fbc483c87cd6eab53" offset="000000" loadflag="load16_word_swap" />
31273129         </dataarea>
3130         <dataarea name="sram" size="16384"> <!-- Size to be confirmed. It does not work without SRAM. -->
3131         </dataarea>
31283132      </part>
31293133   </software>
31303134
r20808r20809
37783782      </part>
37793783   </software>
37803784
3781   <software name="blockb" supported="no">
3785   <software name="blockb">
37823786      <description>Blockbuster World Video Game Championship II (USA)</description>
37833787      <year>1995</year>
37843788      <publisher>Acclaim Entertainment</publisher>
37853789      <part name="cart" interface="megadriv_cart">
3790         <feature name="slot" value="rom_nbajamte" />
37863791         <dataarea name="rom" size="4194304">
37873792            <rom name="blockbuster world video game championship ii (usa).bin" size="4194304" crc="4385e366" sha1="1a06213a3a26c9105fc3013a141c22d212045a0b" offset="000000" loadflag="load16_word_swap" />
37883793         </dataarea>
r20808r20809
46674672      <year>199?</year>
46684673      <publisher>Gametec?</publisher>
46694674      <part name="cart" interface="megadriv_cart">
4675         <feature name="pcb_type" value="SEGA-SRAM" />
4676         <feature name="slot" value="rom_sram" />
46704677         <dataarea name="rom" size="1048576">
46714678            <rom name="chao ji da fu weng (chi) (unl).bin" size="1048576" crc="2e2ea687" sha1="be1a66bd1f75f5b1b37b8ae18e6334c36291e63d" offset="000000" loadflag="load16_word_swap" />
46724679         </dataarea>
4680         <dataarea name="sram" size="16384"> <!-- Size to be confirmed. It does not work without SRAM. -->
4681         </dataarea>
46734682      </part>
46744683   </software>
46754684
r20808r20809
98089817      <year>1995</year>
98099818      <publisher>Accolade</publisher>
98109819      <part name="cart" interface="megadriv_cart">
9820         <feature name="pcb_type" value="SEGA-SRAM" />
9821         <feature name="slot" value="rom_hardbl95" />
98119822         <dataarea name="rom" size="3145728">
98129823            <rom name="hardball '95 (usa).bin" size="3145728" crc="ed10bc9e" sha1="6a63fba59add9ba8e1845cbfcf4722833893113f" offset="000000" loadflag="load16_word_swap" />
98139824         </dataarea>
9825         <dataarea name="sram" size="65536"> <!-- Size to be confirmed. It does not work without SRAM. -->
9826         </dataarea>
98149827      </part>
98159828   </software>
98169829
r20808r20809
98199832      <year>1993</year>
98209833      <publisher>Accolade</publisher>
98219834      <part name="cart" interface="megadriv_cart">
9835         <feature name="pcb_type" value="SEGA-SRAM" />
9836         <feature name="slot" value="rom_sram" />
98229837         <dataarea name="rom" size="2097152">
98239838            <rom name="hardball iii (usa).bin" size="2097152" crc="a4f2f011" sha1="88812ae494288fbf3dda86ccc69161ad960a2e3b" offset="000000" loadflag="load16_word_swap" />
98249839         </dataarea>
9840         <dataarea name="sram" size="65536"> <!-- Size to be confirmed. It does not work without SRAM. -->
9841         </dataarea>
98259842      </part>
98269843   </software>
98279844
r20808r20809
2204022057      <part name="cart" interface="megadriv_cart">
2204122058         <feature name="pcb_type" value="SSF2" />
2204222059         <feature name="slot" value="rom_ssf2" />
22043         <dataarea name="rom" size="5242880">
22060         <dataarea name="rom" size="9437184">
2204422061            <rom name="super street fighter ii - the new challengers (jpn).bin" size="5242880" crc="d8eeb2bd" sha1="24c8634f59a481118f8350125fa6e00d33e04c95" offset="00000" loadflag="load16_word_swap" />
2204522062         </dataarea>
2204622063      </part>
r20808r20809
2205322070      <part name="cart" interface="megadriv_cart">
2205422071         <feature name="pcb_type" value="SSF2" />
2205522072         <feature name="slot" value="rom_ssf2" />
22056         <dataarea name="rom" size="5242880">
22073         <dataarea name="rom" size="9437184">
2205722074            <rom name="super street fighter ii - the new challengers (usa).bin" size="5242880" crc="165defbf" sha1="9ce6e69db9d28386f7542dacd3e3ead28eacf2a4" offset="00000" loadflag="load16_word_swap" />
2205822075         </dataarea>
2205922076      </part>
r20808r20809
2649626513      </part>
2649726514   </software>
2649826515
26499<!-- Freezes during the intro sequence... -->
26500   <software name="yasech" supported="no">
26516   <software name="yasech">
2650126517      <description>Ya Se Chuan Shuo (Chi)</description>
2650226518      <year>1995</year>
2650326519      <publisher>Chuanpu Technologies</publisher>
2650426520      <info name="alt_title" value="亚瑟传说"/>
2650526521      <part name="cart" interface="megadriv_cart">
26522         <feature name="slot" value="rom_yasech" />
2650626523         <dataarea name="rom" size="2097152">
2650726524            <rom name="ya se chuan shuo (chi) (unl).bin" size="2097152" crc="095b9a15" sha1="8fe0806427e123717ba20478ab1410c25fa942e6" offset="000000" loadflag="load16_word_swap" />
2650826525         </dataarea>

Previous 199869 Revisions Next


© 1997-2024 The MAME Team