From ca634429c583816e67b92c7f98d7d8b5c4628d8b Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Fri, 8 Mar 2013 11:29:19 +0000 Subject: [PATCH] better fix for megatech/stv cartslots. thanks Firewave! nw. --- src/mame/drivers/megatech.c | 18 +++++++++--------- src/mame/drivers/stv.c | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c index 1362e612de6..05ebd870ac8 100644 --- a/src/mame/drivers/megatech.c +++ b/src/mame/drivers/megatech.c @@ -555,14 +555,14 @@ struct megatech_cart_region // we keep old region tags for compatibility with older macros... this might be changed at a later stage static const struct megatech_cart_region megatech_cart_table[] = { - { ":cart1", 0, "game0" }, - { ":cart2", 1, "game1" }, - { ":cart3", 2, "game2" }, - { ":cart4", 3, "game3" }, - { ":cart5", 4, "game4" }, - { ":cart6", 5, "game5" }, - { ":cart7", 6, "game6" }, - { ":cart8", 7, "game7" }, + { ":cart1", 0, ":game0" }, + { ":cart2", 1, ":game1" }, + { ":cart3", 2, ":game2" }, + { ":cart4", 3, ":game3" }, + { ":cart5", 4, ":game4" }, + { ":cart6", 5, ":game5" }, + { ":cart7", 6, ":game6" }, + { ":cart8", 7, ":game7" }, { 0 } }; @@ -586,7 +586,7 @@ DEVICE_IMAGE_LOAD_MEMBER( mtech_state, megatech_cart ) if (image.software_entry() == NULL) return IMAGE_INIT_FAIL; - UINT8 *ROM = image.device().machine().root_device().memregion(this_cart->region)->base(); + UINT8 *ROM = image.device().memregion(this_cart->region)->base(); UINT32 length = image.get_software_region_length("rom"); memcpy(ROM, image.get_software_region("rom"), length); diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index 9eb95872482..805e118439b 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -1004,10 +1004,10 @@ struct stv_cart_region static const struct stv_cart_region stv_cart_table[] = { - { ":cart1", 0, "game0" }, - { ":cart2", 1, "game1" }, - { ":cart3", 2, "game2" }, - { ":cart4", 3, "game3" }, + { ":cart1", 0, ":game0" }, + { ":cart2", 1, ":game1" }, + { ":cart3", 2, ":game2" }, + { ":cart4", 3, ":game3" }, { 0 } }; @@ -1056,7 +1056,7 @@ DEVICE_IMAGE_LOAD_MEMBER( stv_state, stv_cart ) if (image.software_entry() == NULL) return IMAGE_INIT_FAIL; - UINT8 *ROM = image.device().machine().root_device().memregion(this_cart->region)->base(); + UINT8 *ROM = image.device().memregion(this_cart->region)->base(); UINT32 length = image.get_software_region_length("rom"); memcpy(ROM, image.get_software_region("rom"), length);