Previous 199869 Revisions Next

r32478 Wednesday 1st October, 2014 at 05:48:35 UTC by Fabio Priuli
more generic cart slot conversions. nw.
[src/emu/machine]smpc.c
[src/mame]mame.mak
[src/mame/drivers]megatech.c stv.c
[src/mame/includes]stv.h
[src/mess/drivers]prestige.c

trunk/src/mame/drivers/stv.c
r32477r32478
4949#include "machine/smpc.h"
5050#include "includes/stv.h"
5151#include "imagedev/chd_cd.h"
52#include "imagedev/cartslot.h"
5352#include "coreutil.h"
5453
5554
r32477r32478
450449
451450   /* Program ROM patches, don't understand how to avoid these two checks ... */
452451   {
453      UINT32 *ROM = (UINT32 *)memregion("game0")->base();
452      UINT32 *ROM = (UINT32 *)memregion("cart")->base();
454453
455454      ROM[0x90054/4] = 0x00e00001; // END error
456455
r32477r32478
11881187   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
11891188MACHINE_CONFIG_END
11901189
1191#define MCFG_STV_CARTSLOT_ADD(_tag) \
1192   MCFG_CARTSLOT_ADD(_tag) \
1193   MCFG_CARTSLOT_INTERFACE("stv_cart") \
1194   MCFG_CARTSLOT_LOAD(stv_state,stv_cart)
11951190
1191#define MCFG_STV_CARTSLOT_ADD(_tag, _load) \
1192   MCFG_GENERIC_CARTSLOT_ADD(_tag, generic_plain_slot, "stv_cart")  \
1193   MCFG_GENERIC_LOAD(stv_state, _load)
1194
11961195MACHINE_CONFIG_FRAGMENT( stv_cartslot )
1197   MCFG_STV_CARTSLOT_ADD("cart1")
1198   MCFG_STV_CARTSLOT_ADD("cart2")
1199   MCFG_STV_CARTSLOT_ADD("cart3")
1200   MCFG_STV_CARTSLOT_ADD("cart4")
12011196
1197   MCFG_STV_CARTSLOT_ADD("stv_slot1", stv_cart1)
1198   MCFG_STV_CARTSLOT_ADD("stv_slot2", stv_cart2)
1199   MCFG_STV_CARTSLOT_ADD("stv_slot3", stv_cart3)
1200   MCFG_STV_CARTSLOT_ADD("stv_slot4", stv_cart4)
1201
12021202   MCFG_SOFTWARE_LIST_ADD("cart_list","stv")
12031203MACHINE_CONFIG_END
12041204
r32477r32478
12071207MACHINE_CONFIG_END
12081208
12091209
1210struct stv_cart_region
1211{
1212   const char *tag;
1213   int        slot;
1214   const char *region;
1215};
1216
1217static const struct stv_cart_region stv_cart_table[] =
1218{
1219   { ":cart1", 0, ":game0" },
1220   { ":cart2", 1, ":game1" },
1221   { ":cart3", 2, ":game2" },
1222   { ":cart4", 3, ":game3" },
1223   { 0 }
1224};
1225
12261210MACHINE_RESET_MEMBER(stv_state,stv)
12271211{
12281212   m_scsp_last_line = 0;
r32477r32478
12321216   m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
12331217   m_scudsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
12341218
1219   astring region_tag;
1220   if (m_cart1)
1221      m_cart_reg[0] = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG));
1222   else
1223      m_cart_reg[0] = memregion("cart");
1224   if (m_cart2)
1225      m_cart_reg[1] = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG));
1226   if (m_cart3)
1227      m_cart_reg[2] = memregion(region_tag.cpy(m_cart3->tag()).cat(GENERIC_ROM_REGION_TAG));
1228   if (m_cart4)
1229      m_cart_reg[3] = memregion(region_tag.cpy(m_cart4->tag()).cat(GENERIC_ROM_REGION_TAG));
1230
12351231   m_en_68k = 0;
12361232   m_NMI_reset = 0;
12371233
r32477r32478
12511247   m_vdp2.old_tvmd = -1;
12521248}
12531249
1254DEVICE_IMAGE_LOAD_MEMBER( stv_state, stv_cart )
1250int stv_state::load_cart(device_image_interface &image, generic_slot_device *slot)
12551251{
1256   const struct stv_cart_region *stv_cart = &stv_cart_table[0], *this_cart;
1257
1258   /* First, determine where this cart has to be loaded */
1259   while (stv_cart->tag)
1260   {
1261      if (strcmp(stv_cart->tag, image.device().tag()) == 0)
1262         break;
1263
1264      stv_cart++;
1265   }
1266
1267   this_cart = stv_cart;
1268
1252   UINT8 *ROM;
1253   UINT32 size = slot->common_get_size("rom");
1254   
12691255   if (image.software_entry() == NULL)
12701256      return IMAGE_INIT_FAIL;
1271
1272   UINT8 *ROM = image.device().memregion(this_cart->region)->base();
1273   UINT32 length = image.get_software_region_length("rom");
1274
1275   memcpy(ROM, image.get_software_region("rom"), length);
1276
1257   
1258   slot->rom_alloc(size, GENERIC_ROM32_WIDTH, ENDIANNESS_BIG);
1259   ROM = slot->get_rom_base();
1260   memcpy(ROM, image.get_software_region("rom"), size);
1261   
12771262   /* fix endianess */
12781263   {
12791264      UINT8 j[4];
1280      int i;
1281
1282      for(i=0;i<length;i+=4)
1265     
1266      for (int i = 0; i < size; i += 4)
12831267      {
1284         j[0] = ROM[i];
1285         j[1] = ROM[i+1];
1286         j[2] = ROM[i+2];
1287         j[3] = ROM[i+3];
1288         ROM[i] = j[3];
1289         ROM[i+1] = j[2];
1290         ROM[i+2] = j[1];
1291         ROM[i+3] = j[0];
1268         j[0] = ROM[i + 0];
1269         j[1] = ROM[i + 1];
1270         j[2] = ROM[i + 2];
1271         j[3] = ROM[i + 3];
1272         ROM[i + 0] = j[3];
1273         ROM[i + 1] = j[2];
1274         ROM[i + 2] = j[1];
1275         ROM[i + 3] = j[0];
12921276      }
12931277   }
1294
1278   
12951279   return IMAGE_INIT_PASS;
12961280}
12971281
12981282
1299
13001283MACHINE_START_MEMBER(stv_state,stv)
13011284{
13021285   system_time systime;
r32477r32478
17501733
17511734ROM_START( stvbios )
17521735   STV_BIOS
1753   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 )
17541736
1755   ROM_REGION32_BE( 0x3000000, "game1", ROMREGION_ERASE00 )
1756
1757   ROM_REGION32_BE( 0x3000000, "game2", ROMREGION_ERASE00 )
1758
1759   ROM_REGION32_BE( 0x3000000, "game3", ROMREGION_ERASE00 )
1760
17611737   ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to multi cart mode
17621738   ROM_LOAD( "stvbios.nv", 0x0000, 0x0080, CRC(15432ae2) SHA1(7d9364d546f3d3f839ec36be148076f8d26a65a6) )
17631739ROM_END
r32477r32478
18101786
18111787DRIVER_INIT_MEMBER(stv_state,sanjeon)
18121788{
1813   UINT8 *src    = memregion       ( "game0" )->base();
1789   UINT8 *src = memregion("cart")->base();
18141790   int x;
18151791
18161792   for (x=0;x<0x3000000;x++)
r32477r32478
18331809ROM_START( astrass )
18341810   STV_BIOS
18351811
1836   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1812   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
18371813   ROM_LOAD16_BYTE( "epr20825.13",                0x0000001, 0x0100000, CRC(94a9ad8f) SHA1(861311c14cfa9f560752aa5b023c147a539cf135) )
18381814   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
18391815   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
18551831ROM_START( bakubaku )
18561832   STV_BIOS
18571833
1858   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1834   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
18591835   ROM_LOAD16_BYTE( "fpr17969.13",               0x0000001, 0x0100000, CRC(bee327e5) SHA1(1d226db72d6ef68fd294f60659df7f882b25def6) )
18601836   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
18611837   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
18691845ROM_START( colmns97 )
18701846   STV_BIOS
18711847
1872   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1848   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
18731849   ROM_LOAD16_BYTE( "fpr19553.13",    0x000001, 0x100000, CRC(d4fb6a5e) SHA1(bd3cfb4f451b6c9612e42af5ddcbffa14f057329) )
18741850   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
18751851   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
18801856ROM_START( cotton2 )
18811857   STV_BIOS
18821858
1883   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1859   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
18841860   ROM_LOAD16_WORD_SWAP( "mpr20122.7",    0x0200000, 0x0200000, CRC(d616f78a) SHA1(8039dcdfdafb8327a19a1da46a67c0b3f7eee53a) ) // good
18851861   ROM_LOAD16_WORD_SWAP( "mpr20117.2",    0x0400000, 0x0400000, CRC(893656ea) SHA1(11e3160083ba018fbd588f07061a4e55c1efbebb) ) // good
18861862   ROM_LOAD16_WORD_SWAP( "mpr20118.3",    0x0800000, 0x0400000, CRC(1b6a1d4c) SHA1(6b234d6b2d24df7f6d400a56698c0af2f78ce0e7) ) // good
r32477r32478
18941870ROM_START( cottonbm )
18951871   STV_BIOS
18961872
1897   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1873   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
18981874   ROM_LOAD16_WORD_SWAP( "mpr21075.7",    0x0200000, 0x0200000, CRC(200b58ba) SHA1(6daad6d70a3a41172e8d9402af775c03e191232d) ) // good
18991875   ROM_LOAD16_WORD_SWAP( "mpr21070.2",    0x0400000, 0x0400000, CRC(56c0bf1d) SHA1(c2b564ce536c637bb723ed96683b27596e87ebe7) ) // good
19001876   ROM_LOAD16_WORD_SWAP( "mpr21071.3",    0x0800000, 0x0400000, CRC(2bb18df2) SHA1(e900adb94ad3f48be00a4ce33e915147dc6a8737) ) // good
r32477r32478
19071883ROM_START( decathlt )
19081884   STV_BIOS
19091885
1910   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1886   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
19111887   ROM_LOAD16_BYTE( "epr18967a.13",               0x0000001, 0x0100000, CRC(ac59c186) SHA1(7d4924d1e4c1b9257b58a690de988b3f6486e86f) )
19121888   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
19131889   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
19291905ROM_START( decathlto )
19301906   STV_BIOS
19311907
1932   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1908   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
19331909   ROM_LOAD16_BYTE( "epr18967.13",               0x0000001, 0x0100000, CRC(c0446674) SHA1(4917089d95613c9d2a936ed9fe3ebd22f461aa4f) )
19341910   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
19351911   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
19441920   STV_BIOS
19451921   ROM_DEFAULT_BIOS( "us" )
19461922
1947   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1923   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
19481924   ROM_LOAD16_BYTE( "fpr19119.13",               0x0000001, 0x0100000, CRC(de5c4f7c) SHA1(35f670a15e9c86edbe2fe718470f5a75b5b096ac) )
19491925   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
19501926   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
19571933ROM_START( dnmtdeka )
19581934   STV_BIOS
19591935
1960   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1936   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
19611937   ROM_LOAD16_BYTE( "fpr19114.13",               0x0000001, 0x0100000, CRC(1fd22a5f) SHA1(c3d9653b12354a73a3e15f23a2ab7992ffb83e46) )
19621938   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
19631939   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
19701946ROM_START( ejihon )
19711947   STV_BIOS
19721948
1973   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1949   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
19741950   ROM_LOAD16_BYTE( "epr18137.13",               0x0000001, 0x0080000, CRC(151aa9bc) SHA1(0959c60f31634816825acb57413838dcddb17d31) )
19751951   ROM_RELOAD( 0x100001, 0x0080000 )
19761952   ROM_RELOAD_PLAIN ( 0x0200000, 0x0080000 )
r32477r32478
19851961ROM_START( elandore )
19861962   STV_BIOS
19871963
1988   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1964   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
19891965   ROM_LOAD16_WORD_SWAP( "mpr21307.7",    0x0200000, 0x0200000, CRC(966ad472) SHA1(d6db41d1c40d08eb6bce8a8a2f491e7533daf670) ) // good (was .11s)
19901966   ROM_LOAD16_WORD_SWAP( "mpr21301.2",    0x0400000, 0x0400000, CRC(1a23b0a0) SHA1(f9dbc7ba96dadfb00e5827622b557080449acd83) ) // good (was .12)
19911967   ROM_LOAD16_WORD_SWAP( "mpr21302.3",    0x0800000, 0x0400000, CRC(1c91ca33) SHA1(ae11209088e3bf8fc4a92dca850d7303ce949b29) ) // good (was .13)
r32477r32478
19991975ROM_START( ffreveng )
20001976   STV_BIOS
20011977
2002   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1978   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
20031979   ROM_LOAD16_WORD_SWAP( "opr21872.7",   0x0200000, 0x0200000, CRC(32d36fee) SHA1(441c4254ef2e9301e1006d69462a850ce339314b) ) // good (was .11s)
20041980   ROM_LOAD16_WORD_SWAP( "mpr21873.2",   0x0400000, 0x0400000, CRC(dac5bd98) SHA1(6102035ce9eb2f83d7d9b20f989a151f45087c67) ) // good (was .12)
20051981   ROM_LOAD16_WORD_SWAP( "mpr21874.3",   0x0800000, 0x0400000, CRC(0a7be2f1) SHA1(e2d13f36e54d1e2cb9d584db829c04a6ff65108c) ) // good (was .13)
r32477r32478
20131989ROM_START( fhboxers )
20141990   STV_BIOS
20151991
2016   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
1992   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
20171993   ROM_LOAD16_BYTE( "fr18541a.13",               0x0000001, 0x0100000, CRC(8c61a17c) SHA1(a8aef27b53482923a506f7daa4b7a38653b4d8a4) ) //(header is read from here, not ic7 even if both are populated on this board)
20181994
20191995   ROM_LOAD16_WORD_SWAP( "mpr18538.7",    0x0200000, 0x0200000, CRC(7b5230c5) SHA1(70cebc3281580b43adf42c37318e12159c28a13d) ) // good
r32477r32478
20342010ROM_START( findlove )
20352011   STV_BIOS
20362012
2037   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2013   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
20382014   ROM_LOAD16_BYTE( "epr20424.13",               0x0000001, 0x0100000, CRC(4e61fa46) SHA1(e34624d98cbdf2dd04d997167d3c4decd2f208f7) ) //(header is read from here, not ic7 even if both are populated on this board)
20392015
20402016   ROM_LOAD16_WORD_SWAP( "mpr20431.7",    0x0200000, 0x0200000, CRC(ea656ced) SHA1(b2d6286081bd46a89d1284a2757b87d0bca1bbde) ) // good
r32477r32478
20572033ROM_START( finlarch )
20582034   STV_BIOS
20592035
2060   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2036   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
20612037   ROM_LOAD16_BYTE( "finlarch.13",               0x0000001, 0x0100000, CRC(4505fa9e) SHA1(96c6399146cf9c8f1d27a8fb6a265f937258004a) )
20622038   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
20632039   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
20752051ROM_START( gaxeduel )
20762052   STV_BIOS
20772053
2078   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2054   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
20792055   ROM_LOAD16_BYTE( "epr17766.13",               0x0000001, 0x0080000, CRC(a83fcd62) SHA1(4ce77ebaa0e93c6553ad8f7fb87cbdc32433402b) )
20802056   ROM_RELOAD( 0x0100001, 0x0080000 )
20812057   ROM_RELOAD_PLAIN ( 0x0200000, 0x0080000 )
r32477r32478
20912067ROM_START( grdforce )
20922068   STV_BIOS
20932069
2094   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2070   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
20952071   ROM_LOAD16_WORD_SWAP( "mpr20844.7",    0x0200000, 0x0200000, CRC(283e7587) SHA1(477fabc27cfe149ad17757e31f10665dcf8c0860) ) // good
20962072   ROM_LOAD16_WORD_SWAP( "mpr20839.2",    0x0400000, 0x0400000, CRC(facd4dd8) SHA1(2582894c98b31ab719f1865d4623dad6736dc877) ) // good
20972073   ROM_LOAD16_WORD_SWAP( "mpr20840.3",    0x0800000, 0x0400000, CRC(fe0158e6) SHA1(73460effe69fb8f16dd952271542b7803471a599) ) // good
r32477r32478
21032079ROM_START( groovef )
21042080   STV_BIOS
21052081
2106   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2082   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
21072083   ROM_LOAD16_WORD_SWAP( "mpr19820.7",    0x0200000, 0x0100000, CRC(e93c4513) SHA1(f9636529224880c49bd2cc5572bd5bf41dbf911a) ) // good
21082084   ROM_LOAD16_WORD_SWAP( "mpr19815.2",    0x0400000, 0x0400000, CRC(1b9b14e6) SHA1(b1828c520cb108e2927a23273ebd2939dca52304) ) // good
21092085   ROM_LOAD16_WORD_SWAP( "mpr19816.3",    0x0800000, 0x0400000, CRC(83f5731c) SHA1(2f645737f945c59a1a2fabf3b21a761be9e8c8a6) ) // good
r32477r32478
21182094ROM_START( hanagumi )
21192095   STV_BIOS
21202096
2121   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2097   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
21222098   ROM_LOAD16_WORD_SWAP( "mpr20143.7",    0x0200000, 0x0100000, CRC(7bfc38d0) SHA1(66f223e7ff2b5456a6f4185b7ab36f9cd833351a) ) // good
21232099   ROM_LOAD16_WORD_SWAP( "mpr20138.2",    0x0400000, 0x0400000, CRC(fdcf1046) SHA1(cbb1f03879833c17feffdd6f5a4fbff06e1059a2) ) // good
21242100   ROM_LOAD16_WORD_SWAP( "mpr20139.3",    0x0800000, 0x0400000, CRC(7f0140e5) SHA1(f2f7de7620d66a596d552e1af491a0592ebc4e51) ) // good
r32477r32478
21362112ROM_START( introdon )
21372113   STV_BIOS
21382114
2139   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2115   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
21402116   ROM_LOAD16_BYTE( "epr18937.13",               0x0000001, 0x0080000, CRC(1f40d766) SHA1(35d9751c1b23cfbf448f2a9e9cf3b121929368ae) )
21412117   ROM_RELOAD( 0x0100001, 0x0080000)
21422118   ROM_LOAD16_WORD_SWAP( "mpr18944.7",    0x0200000, 0x0100000, CRC(f7f75ce5) SHA1(0787ece9f89cc1847889adbf08ba5d3ccbc405de) ) // good
r32477r32478
21532129ROM_START( kiwames )
21542130   STV_BIOS
21552131
2156   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2132   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
21572133   ROM_LOAD16_BYTE( "epr18737.13",               0x0000001, 0x0080000, CRC(cfad6c49) SHA1(fc69980a351ed13307706db506c79c774eabeb66) ) // bad
21582134   ROM_RELOAD( 0x0100001, 0x0080000)
21592135
r32477r32478
21682144ROM_START( maruchan )
21692145   STV_BIOS
21702146
2171   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2147   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
21722148   ROM_LOAD16_BYTE( "epr20416.13",               0x0000001, 0x0100000, CRC(8bf0176d) SHA1(5bd468e2ffed042ee84e2ceb8712ff5883a1d824) ) // bad
21732149   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
21742150   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
21862162ROM_START( myfairld )
21872163   STV_BIOS
21882164
2189   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2165   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
21902166   ROM_LOAD16_WORD_SWAP( "mpr21000.7",    0x0200000, 0x0200000, CRC(2581c560) SHA1(5fb64f0e09583d50dfea7ad613d45aad30b677a5) ) // good
21912167   ROM_LOAD16_WORD_SWAP( "mpr20995.2",    0x0400000, 0x0400000, CRC(1bb73f24) SHA1(8773654810de760c5dffbb561f43e259b074a61b) ) // good
21922168   ROM_LOAD16_WORD_SWAP( "mpr20996.3",    0x0800000, 0x0400000, CRC(993c3859) SHA1(93f95e3e080a08961784482607919c1ab3eeb5e5) ) // good
r32477r32478
22032179ROM_START( othellos )
22042180   STV_BIOS
22052181
2206   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2182   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
22072183   ROM_LOAD16_WORD_SWAP( "mpr20967.7",    0x0200000, 0x0200000, CRC(efc05b97) SHA1(a533366c3aaba90dcac8f3654db9ad902efca258) ) // good
22082184   ROM_LOAD16_WORD_SWAP( "mpr20963.2",    0x0400000, 0x0400000, CRC(2cc4f141) SHA1(8bd1998aff8615b34d119fab3637a08ed6e8e1e4) ) // good
22092185   ROM_LOAD16_WORD_SWAP( "mpr20964.3",    0x0800000, 0x0400000, CRC(5f5cda94) SHA1(616be219a2512e80c875eddf05137c23aedf6f65) ) // good
r32477r32478
22142190ROM_START( pblbeach )
22152191   STV_BIOS
22162192
2217   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2193   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
22182194   ROM_LOAD16_BYTE( "epr18852.13",               0x0000001, 0x0080000, CRC(d12414ec) SHA1(0f42ec9e41983781b6892622b00398a102072aa7) ) // bad
22192195   ROM_RELOAD ( 0x0100001, 0x0080000 )
22202196   ROM_RELOAD_PLAIN( 0x0200000, 0x0080000)
r32477r32478
22282204ROM_START( prikura )
22292205   STV_BIOS
22302206
2231   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2207   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
22322208   ROM_LOAD16_WORD_SWAP( "mpr19337.7",    0x0200000, 0x0200000, CRC(76f69ff3) SHA1(5af2e1eb3288d70c2a1c71d0b6370125d65c7757) ) // good
22332209   ROM_LOAD16_WORD_SWAP( "mpr19333.2",    0x0400000, 0x0400000, CRC(eb57a6a6) SHA1(cdacaa7a2fb1a343195e2ac5fd02eabf27f89ccd) ) // good
22342210   ROM_LOAD16_WORD_SWAP( "mpr19334.3",    0x0800000, 0x0400000, CRC(c9979981) SHA1(be491a4ac118d5025d6a6f2d9267a6d52f21d2b6) ) // good
r32477r32478
22392215ROM_START( puyosun )
22402216   STV_BIOS
22412217
2242   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2218   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
22432219   ROM_LOAD16_BYTE( "epr19531.13",               0x0000001, 0x0080000, CRC(ac81024f) SHA1(b22c7c1798fade7ae992ff83b138dd23e6292d3f) ) // bad
22442220   ROM_RELOAD ( 0x0100001, 0x0080000 )
22452221   ROM_RELOAD_PLAIN( 0x0200000, 0x0080000)
r32477r32478
22572233ROM_START( rsgun )
22582234   STV_BIOS
22592235
2260   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2236   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
22612237   ROM_LOAD16_WORD_SWAP( "mpr20958.7",   0x0200000, 0x0200000, CRC(cbe5a449) SHA1(b4744ab71ccbadda1921ba43dd1148e57c0f84c5) ) // good (was .11s)
22622238   ROM_LOAD16_WORD_SWAP( "mpr20959.2",   0x0400000, 0x0400000, CRC(a953330b) SHA1(965274a7297cb88e281fcbdd3ec5025c6463cc7b) ) // good (was .12)
22632239   ROM_LOAD16_WORD_SWAP( "mpr20960.3",   0x0800000, 0x0400000, CRC(b5ab9053) SHA1(87c5d077eb1219c35fa65b4e11d5b62e826f5236) ) // good (was .13)
r32477r32478
22682244ROM_START( sandor )
22692245   STV_BIOS
22702246
2271   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2247   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
22722248   ROM_LOAD16_BYTE( "sando-r.13",               0x0000001, 0x0100000, CRC(fe63a239) SHA1(01502d4494f968443581cd2c74f25967d41f775e) )
22732249   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
22742250   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
23012277ROM_START( thunt )
23022278   STV_BIOS
23032279
2304   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2280   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
23052281   ROM_LOAD16_BYTE( "th-ic7_2.stv",    0x0200000, 0x0080000, CRC(c4e993de) SHA1(7aa433bc2623cb19a09d4ef4c8233a2d29901020) )
23062282   ROM_LOAD16_BYTE( "th-ic7_1.stv",    0x0200001, 0x0080000, CRC(1355cc18) SHA1(a9b731228a807b2b01f933fe0f7dcdbadaf89b7e) )
23072283
r32477r32478
23142290ROM_START( thuntk )
23152291   STV_BIOS
23162292
2317   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2293   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
23182294   ROM_LOAD16_BYTE( "2.ic13_2",    0x0200000, 0x0080000, CRC(6cae2926) SHA1(e8d5745b4228de24672da5017cb3dab58344f59f) )
23192295   ROM_LOAD16_BYTE( "1.ic13_1",    0x0200001, 0x0080000, CRC(460727c8) SHA1(da7171b65734264e10692e3408ac93beb374c65e) )
23202296
r32477r32478
23322308ROM_START( sanjeon )
23332309   STV_BIOS
23342310
2335   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2311   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
23362312   ROM_LOAD16_BYTE( "ic11",               0x0000001, 0x0200000, CRC(9abae8d4) SHA1(ddbe4c8fff8fa59d63e278e95f245145d2da8aeb) )
23372313
23382314   ROM_LOAD( "ic13",    0x0400000, 0x0200000, CRC(f72c1d13) SHA1(a2b168d187034024b83fbbe2f5eec78816285da9) ) // ic2 good
r32477r32478
23522328ROM_START( sasissu )
23532329   STV_BIOS
23542330
2355   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2331   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
23562332   ROM_LOAD16_BYTE( "epr20542.13",               0x0000001, 0x0100000, CRC(0e632db5) SHA1(9bc52794892eec22d381387d13a0388042e30714) )
23572333   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
23582334   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
23682344ROM_START( seabass )
23692345   STV_BIOS
23702346
2371   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2347   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
23722348   ROM_LOAD16_BYTE( "seabassf.13",               0x0000001, 0x0100000, CRC(6d7c39cc) SHA1(d9d1663134420b75c65ee07d7d547254785f2f83) )
23732349   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
23742350   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
23882364ROM_START( shanhigw )
23892365   STV_BIOS
23902366
2391   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2367   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
23922368   ROM_LOAD16_WORD_SWAP( "mpr18341.7",    0x0200000, 0x0200000, CRC(cc5e8646) SHA1(a733616c118140ff3887d30d595533f9a1beae06) ) // good
23932369   ROM_LOAD16_WORD_SWAP( "mpr18340.2",    0x0400000, 0x0200000, CRC(8db23212) SHA1(85d604a5c6ab97188716dbcd77d365af12a238fe) ) // good
23942370ROM_END
r32477r32478
23962372ROM_START( shienryu )
23972373   STV_BIOS
23982374
2399   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2375   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24002376   ROM_LOAD16_WORD_SWAP( "mpr19631.7",    0x0200000, 0x0200000, CRC(3a4b1abc) SHA1(3b14b7fdebd4817da32ea374c15a38c695ffeff1) ) // good
24012377   ROM_LOAD16_WORD_SWAP( "mpr19632.2",    0x0400000, 0x0400000, CRC(985fae46) SHA1(f953bde91805b97b60d2ab9270f9d2933e064d95) ) // good
24022378   ROM_LOAD16_WORD_SWAP( "mpr19633.3",    0x0800000, 0x0400000, CRC(e2f0b037) SHA1(97861d09e10ce5d2b10bf5559574b3f489e28077) ) // good
r32477r32478
24092385   STV_BIOS
24102386   ROM_DEFAULT_BIOS( "us" )
24112387
2412   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2388   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24132389   ROM_LOAD16_BYTE( "epr18777.13",               0x0000001, 0x0080000, CRC(8d180866) SHA1(d47ebabab6e06400312d39f68cd818852e496b96) )
24142390   ROM_RELOAD ( 0x0100001, 0x0080000 )
24152391   ROM_RELOAD_PLAIN( 0x0200000, 0x0080000)
r32477r32478
24242400ROM_START( sokyugrt )
24252401   STV_BIOS
24262402
2427   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2403   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24282404   ROM_LOAD16_BYTE( "fpr19188.13",               0x0000001, 0x0100000, CRC(45a27e32) SHA1(96e1bab8bdadf7071afac2a0a6dd8fd8989f12a6) )
24292405   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
24302406   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
24382414ROM_START( sss )
24392415   STV_BIOS
24402416
2441   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2417   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24422418   ROM_LOAD16_BYTE( "epr21488.13",               0x0000001, 0x0080000, CRC(71c9def1) SHA1(a544a0b4046307172d2c1bf426ed24845f87d894) )
24432419   ROM_RELOAD ( 0x0100001, 0x0080000 )
24442420   ROM_RELOAD_PLAIN( 0x0200000, 0x0080000)
r32477r32478
24562432ROM_START( suikoenb )
24572433   STV_BIOS
24582434
2459   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2435   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24602436   ROM_LOAD16_BYTE( "fpr17834.13",               0x0000001, 0x0100000, CRC(746ef686) SHA1(e31c317991a687662a8a2a45aed411001e5f1941) )
24612437   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
24622438   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
24732449ROM_START( twcup98 )
24742450   STV_BIOS
24752451
2476   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2452   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24772453   ROM_LOAD16_BYTE( "epr20819.13",    0x0000001, 0x0100000, CRC(d930dfc8) SHA1(f66cc955181720661a0334fe67fa5750ddf9758b) )
24782454   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
24792455   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
24862462ROM_START( vfkids )
24872463   STV_BIOS
24882464
2489   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2465   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
24902466   ROM_LOAD16_BYTE( "fpr18914.13",               0x0000001, 0x0100000, CRC(cd35730a) SHA1(645b52b449766beb740ab8f99957f8f431351ceb) )
24912467   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
24922468   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
25042480ROM_START( vfremix )
25052481   STV_BIOS
25062482
2507   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2483   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
25082484   ROM_LOAD16_BYTE( "epr17944.13",               0x0000001, 0x0100000, CRC(a5bdc560) SHA1(d3830480a611b7d88760c672ce46a2ea74076487) )
25092485   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
25102486   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
25202496ROM_START( vmahjong )
25212497   STV_BIOS
25222498
2523   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2499   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
25242500   ROM_LOAD16_WORD_SWAP( "mpr19620.7",    0x0200000, 0x0200000, CRC(c98de7e5) SHA1(5346f884793bcb080aa01967e91b54ced4a9802f) ) // good
25252501   ROM_LOAD16_WORD_SWAP( "mpr19615.2",    0x0400000, 0x0400000, CRC(c62896da) SHA1(52a5b10ca8af31295d2d700349eca038c418b522) ) // good
25262502   ROM_LOAD16_WORD_SWAP( "mpr19616.3",    0x0800000, 0x0400000, CRC(f62207c7) SHA1(87e60183365c6f7e62c7a0667f88df0c7f5457fd) ) // good
r32477r32478
25372513ROM_START( winterht )
25382514   STV_BIOS
25392515
2540   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2516   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
25412517   ROM_LOAD16_BYTE( "fpr20108.13",    0x0000001, 0x0100000, CRC(1ef9ced0) SHA1(abc90ce341cd17bb77349d611d6879389611f0bf) ) // bad
25422518   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
25432519   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
25532529ROM_START( znpwfv )
25542530   STV_BIOS
25552531
2556   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2532   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
25572533   ROM_LOAD16_BYTE( "epr20398.13",    0x0000001, 0x0100000, CRC(3fb56a0b) SHA1(13c2fa2d94b106d39e46f71d15fbce3607a5965a) ) // bad
25582534   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
25592535   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
25712547ROM_START( danchih )
25722548   STV_BIOS
25732549
2574   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2550   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
25752551   ROM_LOAD16_WORD_SWAP( "mpr21974.7",    0x0200000, 0x0200000, CRC(e7472793) SHA1(11b7b11cf492eb9cf69b50e7cfac46a5b86849ac) )// good
25762552   ROM_LOAD16_WORD_SWAP( "mpr21970.2",    0x0400000, 0x0400000, CRC(34dd7f4d) SHA1(d5c45da94ec5b6584049caf09516f1ad4ba3adb5) )// good
25772553   ROM_LOAD16_WORD_SWAP( "mpr21971.3",    0x0800000, 0x0400000, CRC(8995158c) SHA1(fbbd171d67eebf43630d6054bc1b9132f6b38183) )// good
r32477r32478
25822558ROM_START( danchiq )
25832559   STV_BIOS
25842560
2585   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2561   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
25862562   ROM_LOAD16_WORD_SWAP( "ic22",    0x0200000, 0x0200000, CRC(e216bfc8) SHA1(7a08fa32281e272dbf5e7daea50a1800cc225c1b) )//ic 7
25872563   ROM_LOAD16_WORD_SWAP( "ic24",    0x0400000, 0x0200000, CRC(b95aa5ac) SHA1(2766c5414643034a0f6d746050557516bd3753df) )//ic 2
25882564   ROM_LOAD16_WORD_SWAP( "ic26",    0x0600000, 0x0200000, CRC(df6ebd48) SHA1(fcccafbee1b8b952b07ed0e7e86219eed9cf4a93) )
r32477r32478
25982574ROM_START( mausuke )
25992575   STV_BIOS
26002576
2601   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2577   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
26022578   ROM_LOAD16_BYTE(             "ic13.bin",      0x0000001, 0x0100000, CRC(b456f4cd) SHA1(91cbe703ec7c1dd45eb3b05bdfeb06e3570599d1) )
26032579   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 ) // needs the rom mapped here to appear 'normal'
26042580   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
26162592ROM_START( batmanfr )
26172593   STV_BIOS
26182594
2619   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2595   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
26202596   /* Thanks to Runik to point this out*/
26212597   ROM_LOAD16_BYTE( "350-mpa1.u19",    0x0000000, 0x0100000, CRC(2a5a8c3a) SHA1(374ec55a39ea909cc672e4a629422681d1f2da05) )
26222598   ROM_RELOAD(                         0x0200000, 0x0100000 )
r32477r32478
26602636   STV_BIOS
26612637   ROM_DEFAULT_BIOS( "euro" )
26622638
2663   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2639   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
26642640   ROM_LOAD16_BYTE( "epr-18821.ic13",  0x0000001, 0x0080000, CRC(9a6658e2) SHA1(16dbae3d9ab584713afcb403f89fe71049609245) )
26652641   ROM_RELOAD ( 0x0100001, 0x0080000 )
26662642   ROM_RELOAD_PLAIN( 0x0200000, 0x0080000)
r32477r32478
27032679   ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
27042680   ROM_COPY( "maincpu",0,0,0x080000)
27052681
2706   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2682   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
27072683   ROM_LOAD16_BYTE( "epr-18427.ic13",  0x0000001, 0x0100000, CRC(3f25bec8) SHA1(43a5342b882d5aec0f35a8777cb475659f43b1c4) )
27082684   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
27092685   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
27252701   ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
27262702   ROM_COPY( "maincpu",0,0,0x080000)
27272703
2728   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2704   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
27292705   ROM_LOAD16_BYTE( "epr18344.a",      0x0000001, 0x0100000, CRC(5a7de018) SHA1(88e0c2a9a9d4ebf699878c0aa9737af85f95ccf8) )
27302706   ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
27312707   ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
r32477r32478
27422718ROM_START( magzun )
27432719   STV_BIOS
27442720
2745   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2721   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
27462722   ROM_LOAD16_BYTE( "flash.ic13",               0x0000001, 0x0100000, CRC(e6f0aca0) SHA1(251d4d9c5a332d13af3a144c5eb9d8e7836bdd1b) ) // good
27472723   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
27482724   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
27692745ROM_START( stress )
27702746   STV_BIOS
27712747
2772   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2748   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
27732749   ROM_LOAD16_BYTE( "epr-21300a.ic13",    0x0000001, 0x0100000, CRC(899d829e) SHA1(b6c6da92dc108353998b29c0659d288645541519) ) // good
27742750   ROM_RELOAD_PLAIN( 0x0200000, 0x0100000)
27752751   ROM_RELOAD_PLAIN( 0x0300000, 0x0100000)
r32477r32478
27892765ROM_START( nclubv3 )
27902766   STV_BIOS
27912767
2792   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2768   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
27932769
27942770   ROM_LOAD16_WORD_SWAP( "ic22",    0x0200000, 0x0200000, CRC(b4008ed0) SHA1(acb3784acad971eb5f4920760dc23a16330e7bad) ) // OK
27952771   ROM_LOAD16_WORD_SWAP( "ic24",    0x0400000, 0x0200000, CRC(4e894850) SHA1(eb7c3399505a45816701197a45062b9f34e5a3e1) ) // OK
r32477r32478
28092785ROM_START( techbowl ) // set to 1p
28102786   STV_BIOS
28112787
2812   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2788   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
28132789
28142790   ROM_LOAD16_WORD_SWAP( "ic22",    0x0200000, 0x0200000, CRC(5058db21) SHA1(eec908bbfb9ec0fdca0002e69f32c1c030086456) ) // OK
28152791   ROM_LOAD16_WORD_SWAP( "ic24",    0x0400000, 0x0200000, CRC(34090f6d) SHA1(b8bc344ab826d5c9584afb01dba1c720b8dbc74d) ) // OK
r32477r32478
28242800ROM_START( micrombc ) // set to 1p
28252801   STV_BIOS
28262802
2827   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2803   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
28282804
28292805   ROM_LOAD16_WORD_SWAP( "ic22",    0x0200000, 0x0200000, CRC(8385bc45) SHA1(0bd60d7560cb2313d68470d0572850a7b8c501fd) ) // OK
28302806   ROM_LOAD16_WORD_SWAP( "ic24",    0x0400000, 0x0200000, CRC(84ecb42f) SHA1(005dee9a0912d4b1b7f5157bc3cde96548c1e348) ) // OK
r32477r32478
28432819   STV_BIOS
28442820   ROM_DEFAULT_BIOS( "us" )
28452821
2846   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2822   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
28472823
28482824   ROM_LOAD16_WORD_SWAP( "pclub2_ic22",    0x0200000, 0x0200000, CRC(d2ceade7) SHA1(a4300322e582f403d9207290f3900e1a72fcb9b9) ) // OK
28492825   ROM_LOAD16_WORD_SWAP( "pclub2_ic24",    0x0400000, 0x0200000, CRC(0e968c2d) SHA1(fbcc7533fcb6b87cd8255fc2d307ae618301ea64) ) // OK
r32477r32478
28582834ROM_START( pclub2fc ) // set to 1p
28592835   STV_BIOS
28602836
2861   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2837   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
28622838
28632839   ROM_LOAD16_WORD_SWAP( "pclub2fc_ic22",    0x0200000, 0x0200000, CRC(109c61a5) SHA1(bfb3e014e49064443ef290bc068ffcd459ae132d) ) // OK
28642840   ROM_LOAD16_WORD_SWAP( "pclub2fc_ic24",    0x0400000, 0x0200000, CRC(0ccc5538) SHA1(15133fc9c85f0a384d49841d874a0fe9a76057ce) ) // OK
r32477r32478
28742850ROM_START( pclb297w ) // set to 1p
28752851   STV_BIOS
28762852
2877   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2853   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
28782854
28792855   ROM_LOAD16_WORD_SWAP( "pclb297w_ic22",    0x0200000, 0x0200000, CRC(589f6705) SHA1(d10897ab26c3ecdd518087562207de131133646c) ) // OK - IC7?
28802856   ROM_LOAD16_WORD_SWAP( "pclb297w_ic24",    0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2?
r32477r32478
28952871ROM_START( pclub298 ) // set to 1p
28962872   STV_BIOS
28972873
2898   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2874   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
28992875
29002876   ROM_LOAD16_WORD_SWAP( "pclub298_ic22",    0x0200000, 0x0200000, CRC(cb0ec98a) SHA1(efef536cb3bc71207936b26b87f04641baded10b) ) // OK? - tested as IC7?
29012877   ROM_LOAD16_WORD_SWAP( "pclub298_ic24",    0x0400000, 0x0200000, CRC(645e7e24) SHA1(7362b0c4b500639c20ec27002f543a0b4390eaa8) ) // OK - tested as IC2
r32477r32478
29132889ROM_START( pclb298a ) // set to 1p
29142890   STV_BIOS
29152891
2916   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2892   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
29172893
29182894   ROM_LOAD16_WORD_SWAP( "pclb298a_ic22",    0x0200000, 0x0200000, CRC(21a995ce) SHA1(6ee1250becd76bef3aa8044a42e10c3830a609bd) ) // OK
29192895   ROM_LOAD16_WORD_SWAP( "pclb298a_ic24",    0x0400000, 0x0200000, CRC(94540f39) SHA1(cee9fff48d177e7502802d366339ed922c212871) ) // OK
r32477r32478
29322908ROM_START( pclubor ) // set to 1p
29332909   STV_BIOS
29342910
2935   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2911   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
29362912
29372913   ROM_LOAD16_WORD_SWAP( "pclubor_ic22",    0x0200000, 0x0200000, CRC(b25072f7) SHA1(baa674e3d277bee152773b3b0e522677bfedd65c) ) // OK
29382914   ROM_LOAD16_WORD_SWAP( "pclubor_ic24",    0x0400000, 0x0200000, CRC(a4863a0e) SHA1(b092b638b6a8d06776f88aac7e47fff06b4e8221) ) // OK
r32477r32478
29502926ROM_START( pclubol ) // set to 1p
29512927   STV_BIOS
29522928
2953   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2929   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
29542930
29552931   ROM_LOAD16_WORD_SWAP( "pclubol_ic22",    0x0200000, 0x0200000, CRC(668b1049) SHA1(a88ab4fbab73f85eb4da8d4792e98fbbefeba5f8) ) // OK
29562932   ROM_LOAD16_WORD_SWAP( "pclubol_ic24",    0x0400000, 0x0200000, CRC(35721f04) SHA1(9658c9526a3d1dde89e1b6fd986b3469011813ca) ) // OK
r32477r32478
29702946   STV_BIOS
29712947   ROM_DEFAULT_BIOS( "us" )
29722948
2973   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2949   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
29742950
29752951   ROM_LOAD16_WORD_SWAP( "pclub2v3_ic22",    0x0200000, 0x0200000, BAD_DUMP CRC(f88347aa) SHA1(3e9ca105edbd6ce11ea4194eb1733785e87f92b2) ) // BAD
29762952   ROM_LOAD16_WORD_SWAP( "pclub2v3_ic24",    0x0400000, 0x0200000, CRC(b5871198) SHA1(10d187eebcca5d70c5ae10d1a144685a96491126) ) // OK
r32477r32478
29862962   STV_BIOS
29872963   ROM_DEFAULT_BIOS( "us" )
29882964
2989   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2965   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
29902966
29912967   ROM_LOAD16_WORD_SWAP( "pclubpok_ic22",    0x0200000, 0x0200000, CRC(48ab8371) SHA1(1c2124afad6bc1f4de2619e6b915f78e91addf05) ) // OK
29922968   ROM_LOAD16_WORD_SWAP( "pclubpok_ic24",    0x0400000, 0x0200000, CRC(9915faea) SHA1(b96f64a8cbb1b9496bb566d0469975fddb4fbe98) ) // OK
r32477r32478
30012977ROM_START( pclub2kc ) // set to 1p
30022978   STV_BIOS
30032979
3004   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2980   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
30052981
30062982   ROM_LOAD16_WORD_SWAP( "pclub2kc_ic22",    0x0200000, 0x0200000, CRC(9eb4cfd7) SHA1(d74b00541419b5cde75409315fdc620a7cb3ac6b) ) // OK (tested as IC7)
30072983   ROM_LOAD16_WORD_SWAP( "pclub2kc_ic24",    0x0400000, 0x0200000, CRC(cf3b4080) SHA1(1963a45d391f8d591d3995231b26eba56c7896c6) ) // OK (tested as IC2)
r32477r32478
30162992ROM_START( pclb2elk ) // set to 1p
30172993   STV_BIOS
30182994
3019   ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */
2995   ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
30202996
30212997   ROM_LOAD16_WORD_SWAP( "pclb2elk_ic22",    0x0200000, 0x0200000, CRC(2faed82a) SHA1(035ef25dd974679e46a79e408ee284eca0310557) ) // OK (tested as IC7)
30222998   ROM_LOAD16_WORD_SWAP( "pclb2elk_ic24",    0x0400000, 0x0200000, CRC(9cacfb7b) SHA1(1c68e1ba077e02ded0f388b4e9ad24998a5d8a48) ) // OK (tested as IC2)
trunk/src/mame/drivers/megatech.c
r32477r32478
7474#include "rendlay.h"
7575
7676#include "includes/megadriv.h"
77#include "imagedev/cartslot.h"
77#include "bus/generic/slot.h"
78#include "bus/generic/carts.h"
7879
7980#define MASTER_CLOCK        53693100
8081
r32477r32478
8384class mtech_state : public md_base_state
8485{
8586public:
86   enum
87   {
88      TIMER_Z80_RUN_STATE,
89      TIMER_Z80_STOP_STATE
90   };
91
9287   mtech_state(const machine_config &mconfig, device_type type, const char *tag)
9388   : md_base_state(mconfig, type, tag),
94   m_vdp1(*this, "vdp1"),
95   m_bioscpu(*this, "mtbios")
89      m_vdp1(*this, "vdp1"),
90      m_cart1(*this, "mt_slot1"),
91      m_cart2(*this, "mt_slot2"),
92      m_cart3(*this, "mt_slot3"),
93      m_cart4(*this, "mt_slot4"),
94      m_cart5(*this, "mt_slot5"),
95      m_cart6(*this, "mt_slot6"),
96      m_cart7(*this, "mt_slot7"),
97      m_cart8(*this, "mt_slot8"),
98      m_bioscpu(*this, "mtbios")
9699   { }
97100
98101   DECLARE_WRITE_LINE_MEMBER( snd_int_callback );
r32477r32478
118121   DECLARE_DRIVER_INIT(mt_crt);
119122   DECLARE_DRIVER_INIT(mt_slot);
120123   DECLARE_MACHINE_RESET(megatech);
121   DECLARE_DEVICE_IMAGE_LOAD_MEMBER(megatech_cart);
124
125   int load_cart(device_image_interface &image, generic_slot_device *slot, int gameno);
126   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart1 ) { return load_cart(image, m_cart1, 0); }
127   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart2 ) { return load_cart(image, m_cart2, 1); }
128   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart3 ) { return load_cart(image, m_cart3, 2); }
129   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart4 ) { return load_cart(image, m_cart4, 3); }
130   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart5 ) { return load_cart(image, m_cart5, 4); }
131   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart6 ) { return load_cart(image, m_cart6, 5); }
132   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart7 ) { return load_cart(image, m_cart7, 6); }
133   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mt_cart8 ) { return load_cart(image, m_cart8, 7); }
134   
122135   UINT32 screen_update_main(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
123136   UINT32 screen_update_menu(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
124137   void screen_eof_main(screen_device &screen, bool state);
125138
126protected:
127   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
128
129139private:
130140   UINT8 m_mt_cart_select_reg;
131141   UINT32 m_bios_port_ctrl;
r32477r32478
139149   void set_genz80_as_md();
140150   void set_genz80_as_sms();
141151
142   TIMER_CALLBACK_MEMBER(z80_run_state);
143   TIMER_CALLBACK_MEMBER(z80_stop_state);
152   void switch_cart(int gameno);
144153
145154   UINT8* m_banked_ram;
146155   UINT8* sms_mainram;
147156   UINT8* sms_rom;
148157
149158   required_device<sega315_5124_device> m_vdp1;
159   optional_device<generic_slot_device> m_cart1;
160   optional_device<generic_slot_device> m_cart2;
161   optional_device<generic_slot_device> m_cart3;
162   optional_device<generic_slot_device> m_cart4;
163   optional_device<generic_slot_device> m_cart5;
164   optional_device<generic_slot_device> m_cart6;
165   optional_device<generic_slot_device> m_cart7;
166   optional_device<generic_slot_device> m_cart8;
150167   required_device<cpu_device>          m_bioscpu;
168
169   memory_region *m_cart_reg[8];
151170};
152171
153172
r32477r32478
284303   return m_mt_cart_select_reg;
285304}
286305
287void mtech_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
288{
289   switch (id)
290   {
291   case TIMER_Z80_RUN_STATE:
292      z80_run_state(ptr, param);
293      break;
294   case TIMER_Z80_STOP_STATE:
295      z80_stop_state(ptr, param);
296      break;
297   default:
298      assert_always(FALSE, "Unknown id in mtech_state::device_timer");
299   }
300}
301
302306READ8_MEMBER(mtech_state::sms_count_r)
303307{
304308   address_space &prg = m_z80snd->space(AS_PROGRAM);
r32477r32478
403407}
404408
405409
406TIMER_CALLBACK_MEMBER(mtech_state::z80_run_state )
410void mtech_state::switch_cart(int gameno)
407411{
408   char tempname[20];
409   UINT8* game_region;
412   logerror("select game %d\n", gameno + 1);
410413
411   sprintf(tempname, "game%d", param);
412   game_region = memregion(tempname)->base();
413
414   memcpy(memregion("maincpu")->base(), game_region, 0x400000);
415
416   if (!m_cart_is_genesis[param])
417   {
418      logerror("enabling SMS Z80\n");
419      m_current_game_is_sms = 1;
420      set_genz80_as_sms();
421      //m_z80snd->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
422      m_z80snd->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
423   }
424   else
425   {
426      logerror("disabling SMS Z80\n");
427      m_current_game_is_sms = 0;
428      set_genz80_as_md();
429      m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
430      //m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
431   }
432}
433
434TIMER_CALLBACK_MEMBER(mtech_state::z80_stop_state )
435{
436   UINT8* game_region;
437   char tempname[20];
438   logerror("select game %d\n", param + 1);
439
440   sprintf(tempname, "game%d", param);
441   game_region = memregion(tempname)->base();
442
443414   m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
444415   m_z80snd->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
445416   //m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
r32477r32478
450421   m_vdp->reset();
451422
452423   /* if the regions exist we're fine */
453   if (game_region)
424   if (m_cart_reg[gameno])
454425   {
455      timer_set(attotime::zero, TIMER_Z80_RUN_STATE, param);
426      memcpy(memregion("maincpu")->base(), m_cart_reg[gameno]->base(), 0x400000);
427     
428      if (!m_cart_is_genesis[gameno])
429      {
430         logerror("enabling SMS Z80\n");
431         m_current_game_is_sms = 1;
432         set_genz80_as_sms();
433         //m_z80snd->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
434         m_z80snd->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
435      }
436      else
437      {
438         logerror("disabling SMS Z80\n");
439         m_current_game_is_sms = 0;
440         set_genz80_as_md();
441         m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
442         //m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
443      }
456444   }
457   else
445   else   /* else, no cart.. */
458446   {
459      /* no cart.. */
460447      memset(memregion("mtbios")->base() + 0x8000, 0x00, 0x8000);
461448      memset(memregion("maincpu")->base(), 0x00, 0x400000);
462449   }
463
464   return;
465450}
466451
467452WRITE8_MEMBER(mtech_state::cart_select_w )
r32477r32478
471456     because it always seems to show the
472457     same instructions ... */
473458   m_mt_cart_select_reg = data;
474   timer_set(attotime::zero, TIMER_Z80_STOP_STATE, m_mt_cart_select_reg);
459   switch_cart(m_mt_cart_select_reg);
475460}
476461
477462
r32477r32478
609594   m_banked_ram = auto_alloc_array(machine(), UINT8, 0x1000*8);
610595
611596   DRIVER_INIT_CALL(megadriv);
612
597   
613598   // this gets set in DEVICE_IMAGE_LOAD
614599   memset(m_cart_is_genesis, 0, sizeof(m_cart_is_genesis));
615600}
r32477r32478
656641{
657642   m_mt_bank_addr = 0;
658643   MACHINE_RESET_CALL_MEMBER(megadriv);
659   timer_set(attotime::zero, TIMER_Z80_STOP_STATE, 0);
644   
645   astring region_tag;
646   if (m_cart1)
647      m_cart_reg[0] = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG));
648   else
649      m_cart_reg[0] = memregion("cart");
650   if (m_cart2)
651      m_cart_reg[1] = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG));
652   if (m_cart3)
653      m_cart_reg[2] = memregion(region_tag.cpy(m_cart3->tag()).cat(GENERIC_ROM_REGION_TAG));
654   if (m_cart4)
655      m_cart_reg[3] = memregion(region_tag.cpy(m_cart4->tag()).cat(GENERIC_ROM_REGION_TAG));
656   if (m_cart5)
657      m_cart_reg[4] = memregion(region_tag.cpy(m_cart5->tag()).cat(GENERIC_ROM_REGION_TAG));
658   if (m_cart6)
659      m_cart_reg[5] = memregion(region_tag.cpy(m_cart6->tag()).cat(GENERIC_ROM_REGION_TAG));
660   if (m_cart7)
661      m_cart_reg[6] = memregion(region_tag.cpy(m_cart7->tag()).cat(GENERIC_ROM_REGION_TAG));
662   if (m_cart8)
663      m_cart_reg[7] = memregion(region_tag.cpy(m_cart8->tag()).cat(GENERIC_ROM_REGION_TAG));
664
665   switch_cart(0);
660666}
661667
662668UINT32 mtech_state::screen_update_menu(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
r32477r32478
719725MACHINE_CONFIG_END
720726
721727
722struct megatech_cart_region
728int mtech_state::load_cart(device_image_interface &image, generic_slot_device *slot, int gameno)
723729{
724   const char *tag;
725   int        slot;
726   const char *region;
727};
728
729// we keep old region tags for compatibility with older macros... this might be changed at a later stage
730static const struct megatech_cart_region megatech_cart_table[] =
731{
732   { ":cart1", 0, ":game0" },
733   { ":cart2", 1, ":game1" },
734   { ":cart3", 2, ":game2" },
735   { ":cart4", 3, ":game3" },
736   { ":cart5", 4, ":game4" },
737   { ":cart6", 5, ":game5" },
738   { ":cart7", 6, ":game6" },
739   { ":cart8", 7, ":game7" },
740   { 0 }
741};
742
743DEVICE_IMAGE_LOAD_MEMBER( mtech_state, megatech_cart )
744{
745   const struct megatech_cart_region *mt_cart = &megatech_cart_table[0], *this_cart;
730   UINT8 *ROM;
746731   const char  *pcb_name;
747
748   /* First, determine where this cart has to be loaded */
749   while (mt_cart->tag)
750   {
751      if (strcmp(mt_cart->tag, image.device().tag()) == 0)
752         break;
753
754      mt_cart++;
755   }
756
757   this_cart = mt_cart;
758
732   UINT32 size = slot->common_get_size("rom");
733   
759734   if (image.software_entry() == NULL)
760735      return IMAGE_INIT_FAIL;
736   
737   slot->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
738   ROM = slot->get_rom_base();
739   memcpy(ROM, image.get_software_region("rom"), size);
761740
762   UINT8 *ROM = image.device().memregion(this_cart->region)->base();
763   UINT32 length = image.get_software_region_length("rom");
764   memcpy(ROM, image.get_software_region("rom"), length);
765
766
767741   if ((pcb_name = image.get_feature("pcb_type")) == NULL)
768742      return IMAGE_INIT_FAIL;
769743   else
770744   {
771745      if (!core_stricmp("genesis", pcb_name))
772746      {
773         osd_printf_debug("%s is genesis\n", mt_cart->tag);
774         m_cart_is_genesis[this_cart->slot] = 1;
747         osd_printf_debug("cart%d is genesis\n", gameno + 1);
748         m_cart_is_genesis[gameno] = 1;
775749      }
776750      else if (!core_stricmp("sms", pcb_name))
777751      {
778         osd_printf_debug("%s is sms\n", mt_cart->tag);
779         m_cart_is_genesis[this_cart->slot] = 0;
752         osd_printf_debug("cart%d is sms\n", gameno + 1);
753         m_cart_is_genesis[gameno] = 0;
780754      }
781755      else
782      {
783         osd_printf_debug("%s is invalid\n", mt_cart->tag);
784      }
785
756         osd_printf_debug("cart%d is invalid\n", gameno + 1);     
786757   }
787
758   
788759   return IMAGE_INIT_PASS;
789760}
790761
791#define MCFG_MEGATECH_CARTSLOT_ADD(_tag) \
792   MCFG_CARTSLOT_ADD(_tag) \
793   MCFG_CARTSLOT_INTERFACE("megatech_cart") \
794   MCFG_CARTSLOT_LOAD(mtech_state, megatech_cart)
762#define MCFG_MEGATECH_CARTSLOT_ADD(_tag, _load) \
763   MCFG_GENERIC_CARTSLOT_ADD(_tag, generic_plain_slot, "megatech_cart") \
764   MCFG_GENERIC_LOAD(mtech_state, _load)
795765
796MACHINE_CONFIG_FRAGMENT( megatech_cartslot )
797   MCFG_MEGATECH_CARTSLOT_ADD("cart1")
798   MCFG_MEGATECH_CARTSLOT_ADD("cart2")
799   MCFG_MEGATECH_CARTSLOT_ADD("cart3")
800   MCFG_MEGATECH_CARTSLOT_ADD("cart4")
801   MCFG_MEGATECH_CARTSLOT_ADD("cart5")
802   MCFG_MEGATECH_CARTSLOT_ADD("cart6")
803   MCFG_MEGATECH_CARTSLOT_ADD("cart7")
804   MCFG_MEGATECH_CARTSLOT_ADD("cart8")
766static MACHINE_CONFIG_DERIVED( megatech_slot, megatech )
805767
768   // add cart slots
769   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot1", mt_cart1)
770   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot2", mt_cart2)
771   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot3", mt_cart3)
772   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot4", mt_cart4)
773   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot5", mt_cart5)
774   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot6", mt_cart6)
775   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot7", mt_cart7)
776   MCFG_MEGATECH_CARTSLOT_ADD("mt_slot8", mt_cart8)
777
806778   MCFG_SOFTWARE_LIST_ADD("cart_list","megatech")
807779MACHINE_CONFIG_END
808780
809781
810static MACHINE_CONFIG_DERIVED( megatech_slot, megatech )
811   MCFG_FRAGMENT_ADD( megatech_cartslot )
812MACHINE_CONFIG_END
813
814
815782/* MegaTech Games - Genesis & sms! Games with a timer */
816783
817784#define MEGATECH_BIOS \
r32477r32478
826793/* no games */
827794ROM_START( megatech )
828795   MEGATECH_BIOS
829
830   // empty memory areas, to copy data into
831   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
832   ROM_REGION16_BE( 0x400000, "game1", ROMREGION_ERASE00 )
833   ROM_REGION16_BE( 0x400000, "game2", ROMREGION_ERASE00 )
834   ROM_REGION16_BE( 0x400000, "game3", ROMREGION_ERASE00 )
835   ROM_REGION16_BE( 0x400000, "game4", ROMREGION_ERASE00 )
836   ROM_REGION16_BE( 0x400000, "game5", ROMREGION_ERASE00 )
837   ROM_REGION16_BE( 0x400000, "game6", ROMREGION_ERASE00 )
838   ROM_REGION16_BE( 0x400000, "game7", ROMREGION_ERASE00 )
839796ROM_END
840797
841798
r32477r32478
843800ROM_START( mt_beast ) /* Altered Beast */
844801   MEGATECH_BIOS
845802
846   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
803   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
847804   ROM_LOAD16_WORD_SWAP( "mp12538.ic1", 0x000000, 0x080000, CRC(3bea3dce) SHA1(ec72e4fde191dedeb3f148f132603ed3c23f0f86) )
848805   ROM_LOAD16_BYTE( "epr-12368-01.ic2", 0x300001, 0x08000, CRC(40cb0088) SHA1(e1711532c29f395a35a1cb34d789015881b5a1ed) )
849806
r32477r32478
855812ROM_START( mt_shar2 ) /* Space Harrier 2 */
856813   MEGATECH_BIOS
857814
858   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
815   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
859816   ROM_LOAD16_WORD_SWAP( "mp11934.ic1", 0x000000, 0x080000, CRC(932daa09) SHA1(a2d7a76f3604c6227d43229908bfbd02b0ef5fd9) )
860817   ROM_LOAD16_BYTE( "epr-12368-02.ic2", 0x300001, 0x08000, CRC(c129c66c) SHA1(e7c0c97db9df9eb04e2f9ff561b64305219b8f1f) )
861818
r32477r32478
867824ROM_START( mt_stbld ) /* Super Thunder Blade */
868825   MEGATECH_BIOS
869826
870   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
827   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
871828   ROM_LOAD16_WORD_SWAP( "mp11996f.ic1", 0x000000, 0x080000,  CRC(9355c34e) SHA1(26ff91c2921408673c644b0b1c8931d98524bf63) )
872829   ROM_LOAD16_BYTE( "epr-12368-03.ic2", 0x300001, 0x08000,  CRC(1ba4ac5d) SHA1(9bde57d70189d159ebdc537a9026001abfd0deae) )
873830
r32477r32478
880837ROM_START( mt_ggolf ) /* Great Golf */
881838   MEGATECH_BIOS
882839
883   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
840   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
884841   ROM_LOAD16_WORD_SWAP( "mp11129f.ic1", 0x000000, 0x020000, CRC(c6611c84) SHA1(eab0eed872dd26b13bcf0b2dd74fcbbc078812c9) )
885842   ROM_LOAD16_BYTE( "epr-12368-04.ic2", 0x300001, 0x08000, CRC(62e5579b) SHA1(e1f531be5c40a1216d4192baeda9352384444410) )
886843
r32477r32478
892849ROM_START( mt_gsocr ) /* Great Soccer */
893850   MEGATECH_BIOS
894851
895   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
852   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
896853   ROM_LOAD16_WORD_SWAP( "mp10747f.ic1", 0x000000, 0x020000, BAD_DUMP CRC(9cf53703) SHA1(c6b4d1de56bd5bf067ec7fc80449c07686d01337) )
897854   ROM_LOAD16_BYTE( "epr-12368-05.ic2", 0x300001, 0x08000, CRC(bab91fcc) SHA1(a160c9d34b253e93ac54fdcef33f95f44d8fa90c) )
898855
r32477r32478
904861ROM_START( mt_orun ) /* Out Run */
905862   MEGATECH_BIOS
906863
907   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
864   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
908865   ROM_LOAD16_WORD_SWAP( "mpr-11078.ic1", 0x000000, 0x040000, CRC(5589d8d2) SHA1(4f9b61b24f0d9fee0448cdbbe8fc05411dbb1102) )
909866   ROM_LOAD16_BYTE( "epr-12368-06.ic2", 0x300001, 0x08000, CRC(c7c74429) SHA1(22ee261a653e10d66e0d6703c988bb7f236a7571) )
910867
r32477r32478
916873ROM_START( mt_asyn ) /* Alien Syndrome */
917874   MEGATECH_BIOS
918875
919   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
876   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
920877   ROM_LOAD16_WORD_SWAP( "mpr-11194.ic1", 0x000000, 0x040000, CRC(4cc11df9) SHA1(5d786476b275de34efb95f576dd556cf4b335a83) )
921878   ROM_LOAD16_BYTE( "epr-12368-07.ic2", 0x300001, 0x08000, CRC(14f4a17b) SHA1(0fc010ac95762534892f1ae16986dbf1c25399d3) )
922879
r32477r32478
928885ROM_START( mt_shnbi ) /* Shinobi */
929886   MEGATECH_BIOS
930887
931   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
888   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
932889   ROM_LOAD16_WORD_SWAP( "mp11706.ic1", 0x000000, 0x040000, CRC(0C6FAC4E) SHA1(7C0778C055DC9C2B0AAE1D166DBDB4734E55B9D1) )
933890   ROM_LOAD16_BYTE( "epr-12368-08.ic2", 0x300001, 0x08000, CRC(103A0459) SHA1(D803DDF7926B83785E8503C985B8C78E7CCB5DAC) )
934891
r32477r32478
942899ROM_START( mt_fz ) /* Fantasy Zone */
943900   MEGATECH_BIOS
944901
945   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
902   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
946903   ROM_LOAD16_WORD_SWAP( "mpr-10118.ic1", 0x000000, 0x020000, CRC(65d7e4e0) SHA1(0278cd120dc3a7707eda9314c46c7f27f9e8fdda) )
947904   ROM_LOAD16_BYTE( "epr-12368-09.bin", 0x300001, 0x08000, CRC(373d2a70) SHA1(c39dd1003d71a417b12a359126bfef64c7a2fd00) )
948905
r32477r32478
955912ROM_START( mt_aftrb ) /* Afterburner */
956913   MEGATECH_BIOS
957914
958   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
915   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
959916   ROM_LOAD16_WORD_SWAP( "mp11271.ic1", 0x000000, 0x080000, CRC(1C951F8E) SHA1(51531DF038783C84640A0CAB93122E0B59E3B69A) )
960917   ROM_LOAD16_BYTE( "epr-12368-10.ic2", 0x300001, 0x08000, CRC(2A7CB590) SHA1(2236963BDDC89CA9045B530259CC7B5CCF889EAF) )
961918
r32477r32478
967924ROM_START( mt_tfor2 ) /* Thunder Force II */
968925   MEGATECH_BIOS
969926
970   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
927   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
971928   ROM_LOAD16_WORD_SWAP( "mp12559.ic1", 0x000000, 0x080000, CRC(b093bee3) SHA1(0bf6194c3d228425f8cf1903ed70d8da1b027b6a) )
972929   ROM_LOAD16_BYTE( "epr-12368-11.ic2", 0x300001, 0x08000, CRC(f4f27e8d) SHA1(ae1a2823deb416c53838115966f1833d5dac72d4) )
973930
r32477r32478
979936ROM_START( mt_astro ) /* Astro Warrior */
980937   MEGATECH_BIOS
981938
982   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
939   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
983940   ROM_LOAD16_WORD_SWAP( "ep13817.ic2", 0x000000, 0x20000, CRC(299cbb74) SHA1(901697a3535ad70190647f34ad5b30b695d54542) )
984941   ROM_LOAD16_BYTE( "epr-12368-13.ic1", 0x300001, 0x08000,  CRC(4038cbd1) SHA1(696bc1efce45d9f0052b2cf0332a232687c8d6ab) )
985942
r32477r32478
991948ROM_START( mt_gfoot ) /* Great Football */
992949   MEGATECH_BIOS
993950
994   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
951   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
995952   ROM_LOAD16_WORD_SWAP( "mpr-10576f.ic1", 0x000000, 0x020000, CRC(2055825f) SHA1(a768f44ce7e50083ffe8c4b5e3ac93ceb7bd3266) )
996953   ROM_LOAD16_BYTE( "epr-12368-19.ic2", 0x300001, 0x08000, CRC(e27cb37a) SHA1(2b6259957e86d033a5689fd716a9efcfeff7d5ba) )
997954
r32477r32478
1003960ROM_START( mt_lastb ) /* Last Battle */
1004961   MEGATECH_BIOS
1005962
1006   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
963   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
1007964   ROM_LOAD16_WORD_SWAP( "mp12578f.ic1", 0x000000, 0x080000, CRC(531191a0) SHA1(f6bc26e975c01a3e10ab4033e4c5f494627a1e2f) )
1008965   ROM_LOAD16_BYTE( "epr-12368-20.ic2", 0x300001, 0x08000, CRC(e1a71c91) SHA1(c250da18660d8aea86eb2abace41ba46130dabc8) )
1009966
r32477r32478
1015972ROM_START( mt_wcsoc ) /* World Championship Soccer */
1016973   MEGATECH_BIOS
1017974
1018   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
975   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
1019976   ROM_LOAD16_WORD_SWAP( "mp12607b.ic1", 0x000000, 0x080000, CRC(bc591b30) SHA1(55e8577171c0933eee53af1dabd0f4c6462d5fc8) )
1020977   ROM_LOAD16_BYTE( "epr-12368-21.ic2", 0x300001, 0x08000, CRC(028ee46b) SHA1(cd8f81d66e5ae62107eb20e0ca5db4b66d4b2987) )
1021978
r32477r32478
1027984ROM_START( mt_tetri ) /* Tetris */
1028985   MEGATECH_BIOS
1029986
1030   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
987   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
1031988   ROM_LOAD16_BYTE( "mpr-12356f.ic1", 0x000001, 0x020000, CRC(1e71c1a0) SHA1(44b2312792e49d46d71e0417a7f022e5ffddbbfe) )
1032989   ROM_LOAD16_BYTE( "mpr-12357f.ic2", 0x000000, 0x020000, CRC(d52ca49c) SHA1(a9159892eee2c0cf28ebfcfa99f81f80781851c6) )
1033990   ROM_LOAD16_BYTE( "epr-12368-22.ic3", 0x300001, 0x08000, CRC(1c1b6468) SHA1(568a38f4186167486e39ab4aa2c1ceffd0b81156) )
r32477r32478
1040997ROM_START( mt_gng ) /* Ghouls and Ghosts */
1041998   MEGATECH_BIOS
1042999
1043   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1000   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
10441001   ROM_LOAD16_WORD_SWAP( "mp12605.ic1", 0x000000, 0x020000, CRC(1066C6AB) SHA1(C30E4442732BDB38C96D780542F8550A94D127B0) )
10451002   ROM_LOAD16_WORD_SWAP( "mpr12606.ic2", 0x080000, 0x020000, CRC(D0BE7777) SHA1(A44B2A3D427F6973B5C1A3DCD8D1776366ACB9F7) )
10461003   ROM_CONTINUE(0x020000,0x60000)
r32477r32478
10541011ROM_START( mt_shang ) /* Super Hang-On */
10551012   MEGATECH_BIOS
10561013
1057   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1014   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
10581015   ROM_LOAD16_WORD_SWAP( "mpr-12640.ic1", 0x000000, 0x080000, CRC(2fe2cf62) SHA1(4728bcc847deb38b16338cbd0154837cd4a07b7d) )
10591016   ROM_LOAD16_BYTE( "epr-12368-24.ic2", 0x300001, 0x08000, CRC(6c2db7e3) SHA1(8de0a10ed9185c9e98f17784811a79d3ce8c4c03) )
10601017
r32477r32478
10661023ROM_START( mt_gaxe ) /* Golden Axe */
10671024   MEGATECH_BIOS
10681025
1069   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1026   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
10701027   ROM_LOAD16_WORD_SWAP( "12806.ic1", 0x000000, 0x080000, CRC(43456820) SHA1(2f7f1fcd979969ac99426f11ab99999a5494a121) )
10711028   ROM_LOAD16_BYTE( "epr-12368-25.ic2", 0x300001, 0x08000, CRC(1f07ed28) SHA1(9d54192f4c6c1f8a51c38a835c1dd1e4e3e8279e) )
10721029
r32477r32478
10791036ROM_START( mt_fwrld ) /* Forgotten Worlds */
10801037   MEGATECH_BIOS
10811038
1082   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1039   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
10831040   ROM_LOAD( "mpr-12672-h.ic1", 0x000000, 0x080000, CRC(d0ee6434) SHA1(8b9a37c206c332ef23dc71f09ec40e1a92b1f83a) )
10841041   ROM_LOAD16_BYTE( "epr-12368-26.ic2", 0x300001, 0x08000, CRC(4623b573) SHA1(29df4a5c5de66cd9cb7519e4f30000f7dddc2138) )
10851042
r32477r32478
10911048ROM_START( mt_mystd ) /* Mystic Defender */
10921049   MEGATECH_BIOS
10931050
1094   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1051   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
10951052   ROM_LOAD16_WORD_SWAP( "mp12707.1", 0x000000, 0x080000, CRC(4f2c513d) SHA1(f9bb548b3688170fe18bb3f1b5b54182354143cf) )
10961053   ROM_LOAD16_BYTE( "epr-12368-27.ic2", 0x300001, 0x08000, CRC(caf46f78) SHA1(a9659e86a6a223646338cd8f29c346866e4406c7) )
10971054
r32477r32478
11031060ROM_START( mt_revsh ) /* The Revenge Of Shinobi */
11041061   MEGATECH_BIOS
11051062
1106   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1063   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11071064   ROM_LOAD16_WORD_SWAP( "mp12675.ic1", 0x000000, 0x080000, CRC(672A1D4D) SHA1(5FD0AF14C8F2CF8CEAB1AE61A5A19276D861289A) )
11081065   ROM_LOAD16_BYTE( "epr-12368-28.ic2", 0x300001, 0x08000, CRC(0D30BEDE) SHA1(73A090D84B78A570E02FB54A33666DCADA52849B) )
11091066
r32477r32478
11151072ROM_START( mt_parlg ) /* Parlour Games */
11161073   MEGATECH_BIOS
11171074
1118   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1075   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11191076   ROM_LOAD16_WORD_SWAP( "mp11404.ic1", 0x000000, 0x020000, CRC(E030E66C) SHA1(06664DAF208F07CB00B603B12ECCFC3F01213A17) )
11201077   ROM_LOAD16_BYTE( "epr-12368-29.ic2", 0x300001, 0x08000, CRC(534151e8) SHA1(219238d90c1d3ac07ff64c9a2098b490fff68f04) )
11211078
r32477r32478
11271084ROM_START( mt_tgolf ) /* Arnold Palmer Tournament Golf */
11281085   MEGATECH_BIOS
11291086
1130   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1087   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11311088   ROM_LOAD16_WORD_SWAP( "mp12645f.ic1", 0x000000, 0x080000, CRC(c07ef8d2) SHA1(9d111fdc7bb92d52bfa048cd134aa488b4f475ef) )
11321089   ROM_LOAD16_BYTE( "epr-12368-31.ic2", 0x300001, 0x08000, CRC(30af7e4a) SHA1(baf91d527393dc90aba9371abcb1e690bcc83c7e) )
11331090
r32477r32478
11401097ROM_START( mt_srbb ) /* Super Real Basketball */
11411098   MEGATECH_BIOS
11421099
1143   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1100   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11441101   ROM_LOAD( "mpr-12904f.ic1", 0x000000, 0x080000, CRC(4346e11a) SHA1(c86725780027ef9783cb7884c8770cc030b0cd0d) )
11451102   ROM_LOAD16_BYTE( "epr-12368-32.ic2", 0x300001, 0x08000, CRC(f70adcbe) SHA1(d4412a7cd59fe282a1c6619aa1051a2a2e00e1aa) )
11461103
r32477r32478
11521109ROM_START( mt_tlbba ) /* Tommy Lasorda Baseball */
11531110   MEGATECH_BIOS
11541111
1155   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1112   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11561113   ROM_LOAD16_WORD_SWAP( "mp12706.ic1", 0x000000, 0x080000, CRC(8901214f) SHA1(f5ec166be1cf9b86623b9d7a78ec903b899da32a) )
11571114   ROM_LOAD16_BYTE( "epr-12368-35.ic2", 0x300001, 0x08000, CRC(67bbe482) SHA1(6fc283b22e68befabb44b2cc61a7f82a71d6f029) )
11581115
r32477r32478
11641121ROM_START( mt_cols ) /* Columns */
11651122   MEGATECH_BIOS
11661123
1167   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1124   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11681125   ROM_LOAD16_WORD_SWAP( "mp13193-t.ic1", 0x000000, 0x080000, CRC(8c770e2f) SHA1(02a3626025c511250a3f8fb3176eebccc646cda9) )
11691126   ROM_LOAD16_BYTE( "epr-12368-36.ic3",   0x300001, 0x008000,  CRC(a4b29bac) SHA1(c9be866ac96243897d09612fe17562e0481f66e3) )
11701127
r32477r32478
11761133ROM_START( mt_eswat ) /* ESWAT */
11771134   MEGATECH_BIOS
11781135
1179   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1136   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11801137   ROM_LOAD16_WORD_SWAP( "mp13192-h.ic1", 0x000000, 0x080000, CRC(82f458ef) SHA1(58444b783312def71ecffc4ad021b72a609685cb) )
11811138   ROM_LOAD16_BYTE( "epr-12368-38.ic2", 0x300001, 0x08000, CRC(43c5529b) SHA1(104f85adea6da1612c0aa96d553efcaa387d7aaf) )
11821139
r32477r32478
11881145ROM_START( mt_smgp ) /* Super Monaco Grand Prix */
11891146   MEGATECH_BIOS
11901147
1191   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1148   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
11921149   ROM_LOAD16_WORD_SWAP( "13250.ic1", 0x000000, 0x080000, CRC(189b885f) SHA1(31c06ffcb48b1604989a94e584261457de4f1f46) )
11931150   ROM_LOAD16_BYTE( "epr-12368-39.ic2", 0x300001, 0x08000, CRC(64b3ce25) SHA1(83a9f2432d146a712b037f96f261742f7dc810bb) )
11941151
r32477r32478
12001157ROM_START( mt_mwalk ) /* Moon Walker */
12011158   MEGATECH_BIOS
12021159
1203   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1160   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12041161   ROM_LOAD16_WORD_SWAP( "mp13285a.ic1", 0x000000, 0x080000, CRC(189516e4) SHA1(2a79e07da2e831832b8d448cae87a833c85e67c9) )
12051162   ROM_LOAD16_BYTE( "epr-12368-40.ic2", 0x300001, 0x08000, CRC(0482378c) SHA1(734772f3ddb5ff82b76c3514d18a464b2bce8381) )
12061163
r32477r32478
12121169ROM_START( mt_crack ) /* Crackdown */
12131170   MEGATECH_BIOS
12141171
1215   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1172   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12161173   ROM_LOAD16_WORD_SWAP( "mp13578a-s.ic1", 0x000000, 0x080000, CRC(23f19893) SHA1(09aca793871e2246af4dc24925bc1eda8ff34446) )
12171174   ROM_LOAD16_BYTE( "epr-12368-41.ic2", 0x300001, 0x08000, CRC(3014acec) SHA1(07953e9ae5c23fc7e7d08993b215f4dfa88aa5d7) )
12181175
r32477r32478
12241181ROM_START( mt_shado ) /* Shadow Dancer */
12251182   MEGATECH_BIOS
12261183
1227   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1184   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12281185   ROM_LOAD16_WORD_SWAP( "mpr-13571-s.ic1", 0x000000, 0x080000, CRC(56a29310) SHA1(55836177e4a1e2deb68408976b29d0282cf661a9) )
12291186   ROM_LOAD16_BYTE( "epr-12368-43.ic2", 0x300001, 0x08000, CRC(1116cbc7) SHA1(ba6dd21ceadeedf730b71b67acbd20d9067114f3) )
12301187
r32477r32478
12361193ROM_START( mt_arrow ) /* Arrow Flash */
12371194   MEGATECH_BIOS
12381195
1239   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1196   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12401197   ROM_LOAD16_WORD_SWAP( "mpr13396h.ic1", 0x000000, 0x080000, CRC(091226e3) SHA1(cb15c6277314f3c4a86b5ae5823f72811d5d269d) )
12411198   ROM_LOAD16_BYTE( "epr-12368-44.ic2", 0x300001, 0x08000, CRC(e653065d) SHA1(96b014fc4df8eb2188ac94ed0a778d974fe6dcad) )
12421199
r32477r32478
12481205ROM_START( mt_astrm ) /* Alien Storm */
12491206   MEGATECH_BIOS
12501207
1251   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1208   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12521209   ROM_LOAD16_WORD_SWAP( "mp13941.ic1", 0x000000, 0x080000, CRC(D71B3EE6) SHA1(05F272DAD243D132D517C303388248DC4C0482ED) )
12531210   ROM_LOAD16_BYTE( "epr-12368-47.ic2", 0x300001, 0x08000, CRC(31FB683D) SHA1(E356DA020BBF817B97FB10C27F75CF5931EDF4FC) )
12541211
r32477r32478
12601217ROM_START( mt_wwar ) /* Wrestle War */
12611218   MEGATECH_BIOS
12621219
1263   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1220   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12641221   ROM_LOAD16_WORD_SWAP( "mpr-14025-f.ic1", 0x000000, 0x080000, CRC(26e899fe) SHA1(6d28e154ae2e4196097a2aa96c5acd5dfe7e3d2b) )
12651222   ROM_LOAD16_BYTE( "epr-12368-48.ic2", 0x300001, 0x08000, CRC(25817bc2) SHA1(ba1bbb952aff12fb4d3ecfb10d82c54128439395) )
12661223
r32477r32478
12721229ROM_START( mt_bbros ) /* Bonanza Bros. */
12731230   MEGATECH_BIOS
12741231
1275   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1232   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12761233   ROM_LOAD16_WORD_SWAP( "mp13905a.ic1", 0x000000, 0x100000, CRC(68a88d60) SHA1(2f56e8a2b0999de4fa0d14a1527f4e1df0f9c7a2) )
12771234   ROM_LOAD16_BYTE( "epr-12368-49.ic2", 0x300001, 0x08000, CRC(c5101da2) SHA1(636f30043e2e9291e193ef9a2ead2e97a0bf7380) )
12781235
r32477r32478
12841241ROM_START( mt_srage ) /* Streets of Rage */
12851242   MEGATECH_BIOS
12861243
1287   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1244   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
12881245   ROM_LOAD16_WORD_SWAP( "mpr-14125-s.ic1", 0x000000, 0x080000, CRC(db4ac746) SHA1(c7cc24e2329f279574513fa32bbf79f72f75aeea) )
12891246   ROM_LOAD16_BYTE( "epr-12368-51.ic2", 0x300001, 0x08000, CRC(49b7d6f4) SHA1(96e69851c92715e7daf35b184cf374147a8d2880) )
12901247
r32477r32478
12961253ROM_START( mt_sonic ) /* Sonic The Hedgehog */
12971254   MEGATECH_BIOS
12981255
1299   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1256   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13001257   ROM_LOAD16_WORD_SWAP( "mp13913.ic1", 0x000000, 0x080000, CRC(480b4b5c) SHA1(ab1dc1f738e3b2d0898a314b123fa71182bf572e) )
13011258   ROM_LOAD16_BYTE( "epr-12368-52.ic2", 0x300001, 0x8000,  CRC(6a69d20c) SHA1(e483b39ff6eca37dc192dc296d004049e220554a) )
13021259
r32477r32478
13071264ROM_START( mt_sonia ) /* Sonic (alt)*/
13081265   MEGATECH_BIOS
13091266
1310   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1267   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13111268   ROM_LOAD16_WORD_SWAP( "mp13933.ic1", 0x000000, 0x080000, CRC(13775004) SHA1(5decfd35944a2d0e7b996b9a4a12b616a309fd5e) )
13121269   ROM_LOAD16_BYTE( "epr-12368-52.ic2", 0x300001, 0x8000,  CRC(6a69d20c) SHA1(e483b39ff6eca37dc192dc296d004049e220554a) )
13131270
r32477r32478
13231280ROM_START( mt_fshrk ) /* Fire Shark */
13241281   MEGATECH_BIOS
13251282
1326   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1283   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13271284   ROM_LOAD16_WORD_SWAP( "mp14341.ic1", 0x000000, 0x080000, CRC(04d65ebc) SHA1(24338aecdc52b6f416548be722ca475c83dbae96) )
13281285   ROM_LOAD16_BYTE( "epr-12368-53.ic2", 0x300001, 0x08000,  CRC(4fa61044) SHA1(7810deea221c10b0b2f5233443d81f4f1998ee58) )
13291286
r32477r32478
13351292ROM_START( mt_spman ) /* Spiderman */
13361293   MEGATECH_BIOS
13371294
1338   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1295   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13391296   ROM_LOAD16_WORD_SWAP( "mp14027-sm.ic1", 0x000000, 0x080000, CRC(e2c08a06) SHA1(39e592eafd47e2aa6edbb4845d44750057bff890) )
13401297   ROM_LOAD16_BYTE( "epr-12368-54.ic2", 0x300001, 0x08000,  CRC(30b68988) SHA1(04eeb0fad732a791b6bc0c0846306d567573649f) )
13411298
r32477r32478
13471304ROM_START( mt_calga ) /* California Games */
13481305   MEGATECH_BIOS
13491306
1350   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1307   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13511308   ROM_LOAD16_BYTE( "epr-14494.ic1", 0x000001, 0x040000, CRC(cbe58b1b) SHA1(ea067fc08e644c993f8d13731425c9296c1a2a75) )
13521309   ROM_LOAD16_BYTE( "epr-14495.ic2", 0x000000, 0x040000, CRC(cb956f4f) SHA1(3574c496b79aefdec7d02975490ebe3bb373bc60) )
13531310   ROM_LOAD16_BYTE( "epr-12368-55.ic3", 0x300001, 0x08000, CRC(6f7dd8f5) SHA1(a6cb1aa8c3635738dd9e4d3e0d729d089fd9b599) )
r32477r32478
13601317ROM_START( mt_gaxe2 ) /* Golden Axe 2 */
13611318   MEGATECH_BIOS
13621319
1363   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1320   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13641321   ROM_LOAD16_WORD_SWAP( "mp14272.ic1", 0x000000, 0x080000, CRC(d4784cae) SHA1(b6c286027d06fd850016a2a1ee1f1aeea080c3bb) )
13651322   ROM_LOAD16_BYTE( "epr-12368-57.ic2", 0x300001, 0x08000, CRC(dc9b4433) SHA1(efd3a598569010cdc4bf38ecbf9ed1b4e14ffe36) )
13661323
r32477r32478
13721329ROM_START( mt_stf ) /* Sports Talk Football */
13731330   MEGATECH_BIOS
13741331
1375   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1332   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13761333   ROM_LOAD16_WORD_SWAP( "mp14356a-f.ic1", 0x000000, 0x100000, CRC(20cf32f6) SHA1(752314346a7a98b3808b3814609e024dc0a4108c) )
13771334   ROM_LOAD16_BYTE( "epr-12368-58.ic2", 0x300001, 0x08000, CRC(dce2708e) SHA1(fcebb1899ee11468f6bda705899f074e7de9d723) )
13781335
r32477r32478
13841341ROM_START( mt_mlh ) /* Mario Lemieux Hockey */
13851342   MEGATECH_BIOS
13861343
1387   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1344   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
13881345   ROM_LOAD16_WORD_SWAP( "mpr-14376-h.ic1", 0x000000, 0x80000, CRC(aa9be87e) SHA1(dceed94eaeb30e534f6953a4bc25ff37673b1e6b) )
13891346   ROM_LOAD16_BYTE( "epr-12368-59.ic2", 0x300001, 0x08000, CRC(6d47b438) SHA1(0a145f6438e4e55c957ae559663c37662b685246) )
13901347
r32477r32478
13961353ROM_START( mt_kcham ) /* Kid Chameleon */
13971354   MEGATECH_BIOS
13981355
1399   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1356   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
14001357   ROM_LOAD16_WORD_SWAP( "mp14557.ic1", 0x000000, 0x100000, CRC(e1a889a4) SHA1(a2768eacafc47d371e5276f0cce4b12b6041337a) )
14011358   ROM_LOAD16_BYTE( "epr-12368-60.ic2", 0x300001, 0x08000, CRC(a8e4af18) SHA1(dfa49f6ec4047718f33dba1180f6204dbaff884c) )
14021359
r32477r32478
14111368ROM_START( mt_tout ) /* Turbo Outrun */
14121369   MEGATECH_BIOS
14131370
1414   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1371   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
14151372   ROM_LOAD16_WORD_SWAP( "epr-14674.ic1", 0x000000, 0x080000, CRC(453712a2) SHA1(5d2c8430a9a14aac7f19c22617539b0503ab92cd) )
14161373   ROM_LOAD16_BYTE( "epr-12368-61.ic2", 0x300001, 0x08000, CRC(4aa0b2a2) SHA1(bce03f88d6cfd02683d51c28058f6229fda13b49) )
14171374
r32477r32478
14231380ROM_START( mt_soni2 ) /* Sonic The Hedgehog 2 */
14241381   MEGATECH_BIOS
14251382
1426   ROM_REGION16_BE( 0x400000, "game0", ROMREGION_ERASE00 )
1383   ROM_REGION16_BE( 0x400000, "cart", ROMREGION_ERASE00 )
14271384   ROM_LOAD16_WORD_SWAP( "mp15000a-f.ic1", 0x000000, 0x100000, CRC(679ebb49) SHA1(557482064677702454562f753460993067ef9e16) )
14281385   ROM_LOAD16_BYTE( "epr-12368-62.ic2", 0x300001, 0x08000, CRC(14a8566f) SHA1(d1d14162144bf068ddd19e9736477ff98fb43f9e) )
14291386
trunk/src/mame/includes/stv.h
r32477r32478
66#include "cpu/scudsp/scudsp.h"
77#include "cpu/sh2/sh2.h"
88
9#include "bus/generic/slot.h"
10#include "bus/generic/carts.h"
11
912#define MAX_FILTERS (24)
1013#define MAX_BLOCKS  (200)
1114#define MAX_DIR_SIZE    (256*1024)
r32477r32478
2528         m_audiocpu(*this, "audiocpu"),
2629         m_scudsp(*this, "scudsp"),
2730         m_eeprom(*this, "eeprom"),
28      m_gfxdecode(*this, "gfxdecode"),
29      m_palette(*this, "palette")
31         m_cart1(*this, "stv_slot1"),
32         m_cart2(*this, "stv_slot2"),
33         m_cart3(*this, "stv_slot3"),
34         m_cart4(*this, "stv_slot4"),
35         m_gfxdecode(*this, "gfxdecode"),
36         m_palette(*this, "palette")
3037   {
3138   }
3239
r32477r32478
3643   required_shared_ptr<UINT16> m_sound_ram;
3744   optional_ioport m_fake_comms;
3845
46   memory_region *m_cart_reg[4];
3947   UINT8     *m_backupram;
4048   UINT32    *m_scu_regs;
4149   UINT16    *m_scsp_regs;
r32477r32478
152160   required_device<m68000_base_device> m_audiocpu;
153161   required_device<scudsp_cpu_device> m_scudsp;
154162   optional_device<eeprom_serial_93cxx_device> m_eeprom;
163   optional_device<generic_slot_device> m_cart1;
164   optional_device<generic_slot_device> m_cart2;
165   optional_device<generic_slot_device> m_cart3;
166   optional_device<generic_slot_device> m_cart4;
155167   required_device<gfxdecode_device> m_gfxdecode;
156168   required_device<palette_device> m_palette;
157169
r32477r32478
649661   DECLARE_WRITE16_MEMBER(scudsp_dma_w);
650662
651663   // FROM smpc.c
652   TIMER_CALLBACK_MEMBER( stv_bankswitch_state );
653664   void stv_select_game(int gameno);
654665   void smpc_master_on();
655666   TIMER_CALLBACK_MEMBER( smpc_slave_enable );
r32477r32478
750761   DECLARE_READ32_MEMBER(magzun_hef_hack_r);
751762   DECLARE_READ32_MEMBER(magzun_rx_hack_r);
752763
753   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( stv_cart );
754
764   int load_cart(device_image_interface &image, generic_slot_device *slot);
765   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( stv_cart1 ) { return load_cart(image, m_cart1); }
766   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( stv_cart2 ) { return load_cart(image, m_cart2); }
767   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( stv_cart3 ) { return load_cart(image, m_cart3); }
768   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( stv_cart4 ) { return load_cart(image, m_cart4); }
769   
755770   void install_stvbios_speedups( void );
756771
757772   DECLARE_MACHINE_START(stv);
trunk/src/mame/mame.mak
r32477r32478
569569
570570#BUSES += A1BUS
571571#BUSES += A2BUS
572#BUSES += A7800
573#BUSES += A800
572574#BUSES += ABCBUS
573575#BUSES += ABCKB
574576#BUSES += ADAM
r32477r32478
584586#BUSES += COMPUCOLOR
585587#BUSES += COMX35
586588#BUSES += CPC
589#BUSES += DMV
587590#BUSES += ECBBUS
588591#BUSES += ECONET
589592#BUSES += EP64
590593#BUSES += EPSON_SIO
591594#BUSES += GAMEBOY
592595#BUSES += GBA
596BUSES += GENERIC
593597#BUSES += IEEE488
594598#BUSES += IMI7000
595599#BUSES += IQ151
r32477r32478
599603#BUSES += MACPDS
600604#BUSES += MIDI
601605#BUSES += MEGADRIVE
606#BUSES += MSX_SLOT
602607BUSES += NEOGEO
603608#BUSES += NES
604609#BUSES += NUBUS
r32477r32478
609614#BUSES += PC_KBD
610615#BUSES += PET
611616#BUSES += PLUS4
617#BUSES += QL
612618BUSES += RS232
613619#BUSES += S100
614620#BUSES += SATURN
615621BUSES += SCSI
622#BUSES += SCV
616623#BUSES += SEGA8
617624#BUSES += SMS_CTRL
618625#BUSES += SMS_EXP
619626#BUSES += SNES
620627#BUSES += TI99PEB
621628#BUSES += TVC
629#BUSES += VBOY
622630#BUSES += VCS
631#BUSES += VCS_CTRL
623632#BUSES += VIC10
624633#BUSES += VIC20
625634#BUSES += VIDBRAIN
626635#BUSES += VIP
636#BUSES += VTECH_IOEXP
637#BUSES += VTECH_MEMEXP
627638#BUSES += WANGPC
628639#BUSES += X68K
629640#BUSES += Z88
641#BUSES += ZORRO
630642
631643#-------------------------------------------------
632644# this is the list of driver libraries that
trunk/src/emu/machine/smpc.c
r32477r32478
164164 *
165165 *******************************************/
166166
167TIMER_CALLBACK_MEMBER( saturn_state::stv_bankswitch_state )
167void saturn_state::stv_select_game(int gameno)
168168{
169   static const char *const banknames[] = { "game0", "game1", "game2", "game3" };
170   UINT8* game_region;
171
172   if(m_prev_bankswitch != param)
169   if (m_prev_bankswitch != gameno)
173170   {
174      game_region = memregion(banknames[param])->base();
175
176      if (game_region)
177         memcpy(memregion("abus")->base(), game_region, 0x3000000);
171      if (m_cart_reg[gameno] && m_cart_reg[gameno]->base())
172         memcpy(memregion("abus")->base(), m_cart_reg[gameno]->base(), 0x3000000);
178173      else
179174         memset(memregion("abus")->base(), 0x00, 0x3000000);
180
181      m_prev_bankswitch = param;
175     
176      m_prev_bankswitch = gameno;
182177   }
183178}
184179
185void saturn_state::stv_select_game(int gameno)
186{
187   machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(saturn_state::stv_bankswitch_state),this), gameno);
188}
189
190180/********************************************
191181 *
192182 * Command functions
trunk/src/mess/drivers/prestige.c
r32477r32478
8080#include "emu.h"
8181#include "cpu/z80/z80.h"
8282#include "machine/ram.h"
83#include "imagedev/cartslot.h"
8483#include "rendlay.h"
8584
85#include "bus/generic/slot.h"
86#include "bus/generic/carts.h"
8687
88
8789class prestige_state : public driver_device
8890{
8991public:
r32477r32478
9193      : driver_device(mconfig, type, tag),
9294         m_maincpu(*this, "maincpu"),
9395         m_ram(*this, RAM_TAG),
94         m_cart(*this, "cart"),
96         m_cart(*this, "cartslot"),
9597         m_keyboard(*this, "KEY"),
9698         m_bank1(*this, "bank1"),
9799         m_bank2(*this, "bank2"),
r32477r32478
102104
103105   required_device<cpu_device> m_maincpu;
104106   required_device<ram_device> m_ram;
105   required_device<cartslot_image_device> m_cart;
107   required_device<generic_slot_device> m_cart;
106108   required_ioport_array<16> m_keyboard;
107109   required_memory_bank m_bank1;
108110   required_memory_bank m_bank2;
r32477r32478
131133   UINT32 screen_update_1bpp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
132134   UINT32 screen_update_2bpp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
133135
136   memory_region *m_cart_rom;
137
134138   DECLARE_READ8_MEMBER( bankswitch_r );
135139   DECLARE_WRITE8_MEMBER( bankswitch_w );
136140   DECLARE_READ8_MEMBER( kb_r );
r32477r32478
614618
615619void prestige_state::machine_start()
616620{
617   UINT8 *rom = (UINT8 *)(*memregion("maincpu"));
618   UINT8 *cart = (UINT8 *)(*memregion("cart"));
621   astring region_tag;
622   m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
623
624   UINT8 *rom = memregion("maincpu")->base();
625   UINT8 *cart = m_cart_rom->base();
619626   UINT8 *ram = m_ram->pointer();
620627   memset(ram, 0x00, m_ram->size());
621628
r32477r32478
724731   MCFG_PALETTE_INIT_OWNER(prestige_state, prestige)
725732
726733   /* cartridge */
727   MCFG_CARTSLOT_ADD("cart")
728   MCFG_CARTSLOT_EXTENSION_LIST("bin")
729   MCFG_CARTSLOT_INTERFACE("genius_cart")
734   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "genius_cart")
730735
731736   /* internal ram */
732737   MCFG_RAM_ADD(RAM_TAG)
r32477r32478
778783ROM_START( gl6000sl )
779784   ROM_REGION(0x100000, "maincpu", 0)
780785   ROM_LOAD( "27-5894-01",   0x000000, 0x080000, CRC(7336231c) SHA1(35a1f739994b5c8fb67a7f76d423e50d8154e9ea) )
781
782   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
783   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
784786ROM_END
785787
786788ROM_START( gl7007sl )
787789   ROM_REGION(0x100000, "maincpu", 0)
788790   ROM_LOAD( "27-6060-00", 0x000000, 0x100000, CRC(06b2a595) SHA1(654d00e55ee43627ff947d72676c8e48e0518123) )
789
790   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
791   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
792791ROM_END
793792
794793ROM_START( prestige )
795794   ROM_REGION( 0x100000, "maincpu", 0 )
796795   ROM_LOAD( "27-6020-02.u2", 0x00000, 0x100000, CRC(6bb6db14) SHA1(5d51fc3fd799e7f01ee99c453f9005fb07747b1e) )
797
798   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
799   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
800796ROM_END
801797
802798ROM_START( glcolor )
803799   ROM_REGION( 0x100000, "maincpu", 0 )
804800   ROM_LOAD( "27-5488-00.u5", 0x00000, 0x080000, CRC(e6cf7702) SHA1(ce40418a7777b331bf8c4c881d51732aeb384582) )
805
806   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
807   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
808801ROM_END
809802
810803ROM_START( glscolor )
811804   ROM_REGION( 0x100000, "maincpu", 0 )
812805   ROM_LOAD( "27-5488-00.u5", 0x00000, 0x080000, CRC(e6cf7702) SHA1(ce40418a7777b331bf8c4c881d51732aeb384582) )    // identical to 'Genius Leader Color'
813
814   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
815   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
816806ROM_END
817807
818808ROM_START( glmcolor )
819809   ROM_REGION( 0x100000, "maincpu", 0 )
820810   ROM_LOAD( "27-5673-00.u6", 0x00000, 0x100000, CRC(c4245392) SHA1(bb651aaf11b75f4155c0a0106de9394018110cc7) )
821
822   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
823   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
824811ROM_END
825812
826813ROM_START( gj4000 )
827814   ROM_REGION( 0x100000, "maincpu", 0 )
828815   ROM_LOAD( "27-05886-000-000.u4", 0x000000, 0x40000, CRC(5f6db95b) SHA1(fe683154e33a82ea38696096616d11e850e0c7a3))
829
830   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
831   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
832816ROM_END
833817
834818ROM_START( gj5000 )
835819   ROM_REGION( 0x100000, "maincpu", 0 )
836820   ROM_LOAD( "27-6019-01.u2", 0x000000, 0x80000, CRC(946e5b7d) SHA1(80963d6ad80d49e54c8996bfc77ac135c4935be5))
837
838   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
839   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
840821ROM_END
841822
842823ROM_START( gjrstar )
843824   ROM_REGION( 0x100000, "maincpu", 0 )
844825   ROM_LOAD( "27-5740-00.u1", 0x000000, 0x40000, CRC(ff3dc3bb) SHA1(bc16dfc1e12b0008456c700c431c8df6263b671f))
845
846   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
847   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
848826ROM_END
849827
850828ROM_START( gjrstar3 )
851829   ROM_REGION( 0x100000, "maincpu", 0 )
852830   ROM_LOAD( "54-06056-000-000.u3", 0x000000, 0x040000, CRC(72522179) SHA1(ede9491713ad018012cf925a519bcafe126f1ad3))
853
854   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
855   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
856831ROM_END
857832
858833ROM_START( gl6600cx )
859834   ROM_REGION( 0x200000, "maincpu", 0 )
860835   ROM_LOAD( "54-06400-00.u1", 0x000000, 0x200000, CRC(b05cd075) SHA1(b1d9eb02ca56350eb9e89518db89c0a2a845ebd8))
861
862   ROM_REGION( 0x80000, "cart", ROMREGION_ERASEFF )
863   ROM_CART_LOAD( "cart", 0, 0x80000, 0 )
864836ROM_END
865837
838
866839/* Driver */
867840
868841/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team