summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/toki.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/toki.c')
-rw-r--r--src/mame/drivers/toki.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/drivers/toki.c b/src/mame/drivers/toki.c
index 80701106e1e..7c6f51d9e51 100644
--- a/src/mame/drivers/toki.c
+++ b/src/mame/drivers/toki.c
@@ -71,7 +71,7 @@ static void toki_adpcm_int (device_t *device)
static WRITE8_DEVICE_HANDLER( toki_adpcm_control_w )
{
int bankaddress;
- UINT8 *RAM = device->machine().region("audiocpu")->base();
+ UINT8 *RAM = device->machine().root_device().memregion("audiocpu")->base();
/* the code writes either 2 or 3 in the bottom two bits */
@@ -738,7 +738,7 @@ ROM_END
static DRIVER_INIT( toki )
{
- UINT8 *ROM = machine.region("oki")->base();
+ UINT8 *ROM = machine.root_device().memregion("oki")->base();
UINT8 *buffer = auto_alloc_array(machine, UINT8, 0x20000);
int i;
@@ -761,14 +761,14 @@ static DRIVER_INIT( tokib )
UINT8 *rom;
/* invert the sprite data in the ROMs */
- len = machine.region("gfx2")->bytes();
- rom = machine.region("gfx2")->base();
+ len = machine.root_device().memregion("gfx2")->bytes();
+ rom = machine.root_device().memregion("gfx2")->base();
for (i = 0; i < len; i++)
rom[i] ^= 0xff;
/* merge background tile graphics together */
- len = machine.region("gfx3")->bytes();
- rom = machine.region("gfx3")->base();
+ len = machine.root_device().memregion("gfx3")->bytes();
+ rom = machine.root_device().memregion("gfx3")->base();
for (offs = 0; offs < len; offs += 0x20000)
{
UINT8 *base = &rom[offs];
@@ -781,8 +781,8 @@ static DRIVER_INIT( tokib )
memcpy (&base[0x18000 + i * 0x800], &temp[0x1800 + i * 0x2000], 0x800);
}
}
- len = machine.region("gfx4")->bytes();
- rom = machine.region("gfx4")->base();
+ len = machine.root_device().memregion("gfx4")->bytes();
+ rom = machine.root_device().memregion("gfx4")->base();
for (offs = 0; offs < len; offs += 0x20000)
{
UINT8 *base = &rom[offs];
@@ -804,7 +804,7 @@ static DRIVER_INIT(jujub)
/* Program ROMs are bitswapped */
{
int i;
- UINT16 *prgrom = (UINT16*)machine.region("maincpu")->base();
+ UINT16 *prgrom = (UINT16*)machine.root_device().memregion("maincpu")->base();
for (i = 0; i < 0x60000/2; i++)
{
@@ -819,7 +819,7 @@ static DRIVER_INIT(jujub)
{
address_space *space = machine.device("audiocpu")->memory().space(AS_PROGRAM);
UINT8 *decrypt = auto_alloc_array(machine, UINT8, 0x20000);
- UINT8 *rom = machine.region("audiocpu")->base();
+ UINT8 *rom = machine.root_device().memregion("audiocpu")->base();
int i;
memcpy(decrypt,rom,0x20000);
@@ -834,7 +834,7 @@ static DRIVER_INIT(jujub)
}
{
- UINT8 *ROM = machine.region("oki")->base();
+ UINT8 *ROM = machine.root_device().memregion("oki")->base();
UINT8 *buffer = auto_alloc_array(machine, UINT8, 0x20000);
int i;