Previous 199869 Revisions Next

r21705 Friday 8th March, 2013 at 11:29:19 UTC by Fabio Priuli
better fix for megatech/stv cartslots. thanks Firewave! nw.
[src/mame/drivers]megatech.c stv.c

trunk/src/mame/drivers/stv.c
r21704r21705
10041004
10051005static const struct stv_cart_region stv_cart_table[] =
10061006{
1007   { ":cart1", 0, "game0" },
1008   { ":cart2", 1, "game1" },
1009   { ":cart3", 2, "game2" },
1010   { ":cart4", 3, "game3" },
1007   { ":cart1", 0, ":game0" },
1008   { ":cart2", 1, ":game1" },
1009   { ":cart3", 2, ":game2" },
1010   { ":cart4", 3, ":game3" },
10111011   { 0 }
10121012};
10131013
r21704r21705
10561056   if (image.software_entry() == NULL)
10571057      return IMAGE_INIT_FAIL;
10581058
1059   UINT8 *ROM = image.device().machine().root_device().memregion(this_cart->region)->base();
1059   UINT8 *ROM = image.device().memregion(this_cart->region)->base();
10601060   UINT32 length = image.get_software_region_length("rom");
10611061
10621062   memcpy(ROM, image.get_software_region("rom"), length);
trunk/src/mame/drivers/megatech.c
r21704r21705
555555// we keep old region tags for compatibility with older macros... this might be changed at a later stage
556556static const struct megatech_cart_region megatech_cart_table[] =
557557{
558   { ":cart1", 0, "game0" },
559   { ":cart2", 1, "game1" },
560   { ":cart3", 2, "game2" },
561   { ":cart4", 3, "game3" },
562   { ":cart5", 4, "game4" },
563   { ":cart6", 5, "game5" },
564   { ":cart7", 6, "game6" },
565   { ":cart8", 7, "game7" },
558   { ":cart1", 0, ":game0" },
559   { ":cart2", 1, ":game1" },
560   { ":cart3", 2, ":game2" },
561   { ":cart4", 3, ":game3" },
562   { ":cart5", 4, ":game4" },
563   { ":cart6", 5, ":game5" },
564   { ":cart7", 6, ":game6" },
565   { ":cart8", 7, ":game7" },
566566   { 0 }
567567};
568568
r21704r21705
586586   if (image.software_entry() == NULL)
587587      return IMAGE_INIT_FAIL;
588588
589   UINT8 *ROM = image.device().machine().root_device().memregion(this_cart->region)->base();
589   UINT8 *ROM = image.device().memregion(this_cart->region)->base();
590590   UINT32 length = image.get_software_region_length("rom");
591591   memcpy(ROM, image.get_software_region("rom"), length);
592592

Previous 199869 Revisions Next


© 1997-2024 The MAME Team