mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
Removal of machine().root_device() where appropriate (nw)
This commit is contained in:
parent
629c98f867
commit
bd4514adde
@ -173,7 +173,7 @@ DISCRETE_SOUND_END
|
||||
WRITE8_MEMBER(circus_state::circus_clown_z_w)
|
||||
{
|
||||
m_clown_z = (data & 0x0f);
|
||||
*(machine().root_device().memregion("maincpu")->base() + 0x8000) = data; logerror("Z:%02x\n",data); //DEBUG
|
||||
*(memregion("maincpu")->base() + 0x8000) = data; logerror("Z:%02x\n",data); //DEBUG
|
||||
|
||||
/* Bits 4-6 enable/disable trigger different events */
|
||||
switch (m_game_id)
|
||||
|
@ -267,7 +267,7 @@ WRITE_LINE_MEMBER(asuka_state::asuka_msm5205_vck)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_adpcm_data = machine().root_device().memregion("ymsnd")->base()[m_adpcm_pos];
|
||||
m_adpcm_data = memregion("ymsnd")->base()[m_adpcm_pos];
|
||||
m_adpcm_pos = (m_adpcm_pos + 1) & 0xffff;
|
||||
msm5205_data_w(m_msm, m_adpcm_data >> 4);
|
||||
}
|
||||
|
@ -200,12 +200,12 @@ WRITE8_MEMBER(chinagat_state::chinagat_video_ctrl_w )
|
||||
|
||||
WRITE8_MEMBER(chinagat_state::chinagat_bankswitch_w )
|
||||
{
|
||||
space.machine().root_device().membank("bank1")->set_entry(data & 0x07); // shall we check (data & 7) < 6 (# of banks)?
|
||||
membank("bank1")->set_entry(data & 0x07); // shall we check (data & 7) < 6 (# of banks)?
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(chinagat_state::chinagat_sub_bankswitch_w )
|
||||
{
|
||||
space.machine().root_device().membank("bank4")->set_entry(data & 0x07); // shall we check (data & 7) < 6 (# of banks)?
|
||||
membank("bank4")->set_entry(data & 0x07); // shall we check (data & 7) < 6 (# of banks)?
|
||||
}
|
||||
|
||||
READ8_MEMBER(chinagat_state::saiyugoub1_mcu_command_r )
|
||||
|
@ -548,7 +548,7 @@ WRITE_LINE_MEMBER(chinsan_state::chin_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base();
|
||||
UINT8 *ROM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = ((m_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0) >> 4));
|
||||
msm5205_data_w(machine().device("adpcm"), m_adpcm_data & 0xf);
|
||||
|
@ -449,7 +449,7 @@ void ddragon_state::dd_adpcm_int( device_t *device, int chip )
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base() + 0x10000 * chip;
|
||||
UINT8 *ROM = memregion("adpcm")->base() + 0x10000 * chip;
|
||||
|
||||
m_adpcm_data[chip] = ROM[m_adpcm_pos[chip]++];
|
||||
msm5205_data_w(device, m_adpcm_data[chip] >> 4);
|
||||
|
@ -174,7 +174,7 @@ WRITE_LINE_MEMBER(docastle_state::idsoccer_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_adpcm_data = machine().root_device().memregion("adpcm")->base()[m_adpcm_pos++];
|
||||
m_adpcm_data = memregion("adpcm")->base()[m_adpcm_pos++];
|
||||
msm5205_data_w(m_msm, m_adpcm_data >> 4);
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
else // disable RAM access (reads go to BIOS ROM)
|
||||
{
|
||||
state->membank("bank1")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x30000);
|
||||
state->membank("bank1")->set_base(state->memregion("bios")->base() + 0x30000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ WRITE_LINE_MEMBER(gcpinbal_state::gcp_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("msm")->base();
|
||||
UINT8 *ROM = memregion("msm")->base();
|
||||
|
||||
m_adpcm_data = ((m_adpcm_trigger ? (ROM[m_adpcm_start] & 0x0f) : (ROM[m_adpcm_start] & 0xf0) >> 4));
|
||||
msm5205_data_w(m_msm, m_adpcm_data & 0xf);
|
||||
|
@ -256,8 +256,8 @@ MACHINE_RESET_MEMBER(gladiatr_state,gladiator)
|
||||
TAITO8741_start(&gladiator_8741interface);
|
||||
/* 6809 bank memory set */
|
||||
{
|
||||
UINT8 *rom = machine().root_device().memregion("audiocpu")->base() + 0x10000;
|
||||
machine().root_device().membank("bank2")->set_base(rom);
|
||||
UINT8 *rom = memregion("audiocpu")->base() + 0x10000;
|
||||
membank("bank2")->set_base(rom);
|
||||
m_audiocpu->reset();
|
||||
}
|
||||
}
|
||||
@ -279,10 +279,10 @@ WRITE_LINE_MEMBER(gladiatr_state::gladiator_ym_irq)
|
||||
/*Sound Functions*/
|
||||
WRITE8_MEMBER(gladiatr_state::glad_adpcm_w)
|
||||
{
|
||||
UINT8 *rom = machine().root_device().memregion("audiocpu")->base() + 0x10000;
|
||||
UINT8 *rom = memregion("audiocpu")->base() + 0x10000;
|
||||
|
||||
/* bit6 = bank offset */
|
||||
machine().root_device().membank("bank2")->set_base(rom + ((data & 0x40) ? 0xc000 : 0));
|
||||
membank("bank2")->set_base(rom + ((data & 0x40) ? 0xc000 : 0));
|
||||
|
||||
msm5205_data_w(m_msm,data); /* bit0..3 */
|
||||
msm5205_reset_w(m_msm,(data>>5)&1); /* bit 5 */
|
||||
@ -998,7 +998,7 @@ DRIVER_INIT_MEMBER(gladiatr_state,gladiatr)
|
||||
UINT8 *rom;
|
||||
int i,j;
|
||||
|
||||
rom = machine().root_device().memregion("gfx2")->base();
|
||||
rom = memregion("gfx2")->base();
|
||||
// unpack 3bpp graphics
|
||||
for (j = 3; j >= 0; j--)
|
||||
{
|
||||
@ -1012,7 +1012,7 @@ DRIVER_INIT_MEMBER(gladiatr_state,gladiatr)
|
||||
swap_block(rom + 0x14000, rom + 0x18000, 0x4000);
|
||||
|
||||
|
||||
rom = machine().root_device().memregion("gfx3")->base();
|
||||
rom = memregion("gfx3")->base();
|
||||
// unpack 3bpp graphics
|
||||
for (j = 5; j >= 0; j--)
|
||||
{
|
||||
@ -1029,8 +1029,8 @@ DRIVER_INIT_MEMBER(gladiatr_state,gladiatr)
|
||||
swap_block(rom + 0x24000, rom + 0x28000, 0x4000);
|
||||
|
||||
/* make sure bank is valid in cpu-reset */
|
||||
rom = machine().root_device().memregion("audiocpu")->base() + 0x10000;
|
||||
machine().root_device().membank("bank2")->set_base(rom);
|
||||
rom = memregion("audiocpu")->base() + 0x10000;
|
||||
membank("bank2")->set_base(rom);
|
||||
}
|
||||
|
||||
|
||||
@ -1047,14 +1047,14 @@ DRIVER_INIT_MEMBER(gladiatr_state,ppking)
|
||||
UINT8 *rom;
|
||||
int i,j;
|
||||
|
||||
rom = machine().root_device().memregion("gfx2")->base();
|
||||
rom = memregion("gfx2")->base();
|
||||
// unpack 3bpp graphics
|
||||
for (i = 0; i < 0x2000; i++)
|
||||
{
|
||||
rom[i+0x2000] = rom[i] >> 4;
|
||||
}
|
||||
|
||||
rom = machine().root_device().memregion("gfx3")->base();
|
||||
rom = memregion("gfx3")->base();
|
||||
// unpack 3bpp graphics
|
||||
for (j = 1; j >= 0; j--)
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ reg: 0->1 (main->2nd) / : (1->0) 2nd->main :
|
||||
int ::gsword_coins_in(void)
|
||||
{
|
||||
/* emulate 8741 coin slot */
|
||||
if (machine().root_device().ioport("IN4")->read() & 0xc0)
|
||||
if (ioport("IN4")->read() & 0xc0)
|
||||
{
|
||||
logerror("Coin In\n");
|
||||
return 0x80;
|
||||
@ -895,7 +895,7 @@ ROM_END
|
||||
DRIVER_INIT_MEMBER(gsword_state,gsword)
|
||||
{
|
||||
#if 0
|
||||
UINT8 *ROM2 = machine().root_device().memregion("sub")->base();
|
||||
UINT8 *ROM2 = memregion("sub")->base();
|
||||
ROM2[0x1da] = 0xc3; /* patch for rom self check */
|
||||
|
||||
ROM2[0x71e] = 0; /* patch for sound protection or time out function */
|
||||
@ -910,7 +910,7 @@ DRIVER_INIT_MEMBER(gsword_state,gsword)
|
||||
DRIVER_INIT_MEMBER(gsword_state,gsword2)
|
||||
{
|
||||
#if 0
|
||||
UINT8 *ROM2 = machine().root_device().memregion("sub")->base();
|
||||
UINT8 *ROM2 = memregion("sub")->base();
|
||||
|
||||
ROM2[0x1da] = 0xc3; /* patch for rom self check */
|
||||
ROM2[0x726] = 0; /* patch for sound protection or time out function */
|
||||
|
@ -303,7 +303,7 @@ WRITE_LINE_MEMBER(jantotsu_state::jan_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base();
|
||||
UINT8 *ROM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = ((m_adpcm_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0) >> 4));
|
||||
msm5205_data_w(machine().device("adpcm"), m_adpcm_data & 0xf);
|
||||
|
@ -1424,7 +1424,7 @@ WRITE_LINE_MEMBER(lucky74_state::lucky74_adpcm_int)
|
||||
if (m_adpcm_data == -1)
|
||||
{
|
||||
/* transferring 1st nibble */
|
||||
m_adpcm_data = machine().root_device().memregion("adpcm")->base()[m_adpcm_pos];
|
||||
m_adpcm_data = memregion("adpcm")->base()[m_adpcm_pos];
|
||||
m_adpcm_pos = (m_adpcm_pos + 1) & 0xffff;
|
||||
msm5205_data_w(m_msm, m_adpcm_data >> 4);
|
||||
|
||||
|
@ -750,7 +750,7 @@ DRIVER_INIT_MEMBER(md_boot_state,aladmdb)
|
||||
* Game does a check @ 1afc00 with work RAM fff57c that makes it play like the original console version (i.e. 8 energy hits instead of 2)
|
||||
*/
|
||||
#if ENERGY_CONSOLE_MODE
|
||||
UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
|
||||
UINT16 *rom = (UINT16 *)memregion("maincpu")->base();
|
||||
rom[0x1afc08/2] = 0x6600;
|
||||
#endif
|
||||
|
||||
@ -765,7 +765,7 @@ DRIVER_INIT_MEMBER(md_boot_state,aladmdb)
|
||||
// after this decode look like intentional changes
|
||||
DRIVER_INIT_MEMBER(md_boot_state,mk3mdb)
|
||||
{
|
||||
UINT8 *rom = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *rom = memregion("maincpu")->base();
|
||||
|
||||
for (int x = 0x000001; x < 0x100001; x += 2)
|
||||
{
|
||||
@ -818,7 +818,7 @@ DRIVER_INIT_MEMBER(md_boot_state,ssf2mdb)
|
||||
m_maincpu->space(AS_PROGRAM).install_read_bank(0x400000, 0x5fffff, "bank5");
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0x400000, 0x5fffff);
|
||||
|
||||
machine().root_device().membank("bank5")->set_base(machine().root_device().memregion( "maincpu" )->base() + 0x400000 );
|
||||
membank("bank5")->set_base(memregion( "maincpu" )->base() + 0x400000 );
|
||||
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x770070, 0x770075, read16_delegate(FUNC(md_boot_state::ssf2mdb_dsw_r),this));
|
||||
|
||||
@ -830,7 +830,7 @@ DRIVER_INIT_MEMBER(md_boot_state,ssf2mdb)
|
||||
|
||||
DRIVER_INIT_MEMBER(md_boot_state,srmdb)
|
||||
{
|
||||
UINT8* rom = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8* rom = memregion("maincpu")->base();
|
||||
|
||||
for (int x = 0x00001; x < 0x40000; x += 2)
|
||||
{
|
||||
|
@ -444,7 +444,7 @@ READ8_MEMBER(mplay_state::bank_r )
|
||||
}
|
||||
else
|
||||
{
|
||||
return machine().root_device().memregion("maincpu")->base()[fulladdress ^ 1];
|
||||
return memregion("maincpu")->base()[fulladdress ^ 1];
|
||||
}
|
||||
}
|
||||
else if (fulladdress >= 0xa10000 && fulladdress <= 0xa1001f) // IO Acess
|
||||
@ -820,9 +820,9 @@ ROM_END
|
||||
|
||||
void mplay_state::mplay_start()
|
||||
{
|
||||
UINT8 *src = machine().root_device().memregion("mtbios")->base();
|
||||
UINT8 *instruction_rom = machine().root_device().memregion("user1")->base();
|
||||
UINT8 *game_rom = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *src = memregion("mtbios")->base();
|
||||
UINT8 *instruction_rom = memregion("user1")->base();
|
||||
UINT8 *game_rom = memregion("maincpu")->base();
|
||||
int offs;
|
||||
|
||||
memmove(src + 0x10000, src + 0x8000, 0x18000); // move bios..
|
||||
|
@ -250,7 +250,7 @@ TIMER_CALLBACK_MEMBER(mtech_state::megatech_z80_stop_state )
|
||||
printf("megatech_select_game %d\n", param+1);
|
||||
|
||||
sprintf(tempname, "game%d", param);
|
||||
game_region = machine().root_device().memregion(tempname)->base();
|
||||
game_region = memregion(tempname)->base();
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
machine().device("genesis_snd_z80")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
@ -272,8 +272,8 @@ TIMER_CALLBACK_MEMBER(mtech_state::megatech_z80_stop_state )
|
||||
else
|
||||
{
|
||||
/* no cart.. */
|
||||
memset(machine().root_device().memregion("mtbios")->base() + 0x8000, 0x00, 0x8000);
|
||||
memset(machine().root_device().memregion("maincpu")->base(), 0x00, 0x400000);
|
||||
memset(memregion("mtbios")->base() + 0x8000, 0x00, 0x8000);
|
||||
memset(memregion("maincpu")->base(), 0x00, 0x400000);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -408,7 +408,7 @@ WRITE_LINE_MEMBER(mermaid_state::rougien_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base();
|
||||
UINT8 *ROM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = ((m_adpcm_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0) >> 4));
|
||||
msm5205_data_w(machine().device("adpcm"), m_adpcm_data & 0xf);
|
||||
|
@ -301,7 +301,7 @@ WRITE_LINE_MEMBER(mlanding_state::ml_msm5205_vck)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base();
|
||||
UINT8 *ROM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = ((m_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0)>>4) );
|
||||
msm5205_data_w(m_msm,m_adpcm_data & 0xf);
|
||||
|
@ -794,11 +794,11 @@ READ8_MEMBER(namcos2_state::c68_p5_r)
|
||||
|
||||
if (m_player_mux)
|
||||
{
|
||||
rv = space.machine().root_device().ioport("MCUB2")->read();
|
||||
rv = ioport("MCUB2")->read();
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = space.machine().root_device().ioport("MCUB")->read();
|
||||
rv = ioport("MCUB")->read();
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -151,21 +151,19 @@ READ8_MEMBER(ojankohs_state::ojankoc_keymatrix_r)
|
||||
READ8_MEMBER(ojankohs_state::ojankohs_ay8910_0_r)
|
||||
{
|
||||
// DIPSW 1
|
||||
device_t &root = machine().root_device();
|
||||
return (((root.ioport("DSW1")->read() & 0x01) << 7) | ((root.ioport("DSW1")->read() & 0x02) << 5) |
|
||||
((root.ioport("DSW1")->read() & 0x04) << 3) | ((root.ioport("DSW1")->read() & 0x08) << 1) |
|
||||
((root.ioport("DSW1")->read() & 0x10) >> 1) | ((root.ioport("DSW1")->read() & 0x20) >> 3) |
|
||||
((root.ioport("DSW1")->read() & 0x40) >> 5) | ((root.ioport("DSW1")->read() & 0x80) >> 7));
|
||||
return (((ioport("DSW1")->read() & 0x01) << 7) | ((ioport("DSW1")->read() & 0x02) << 5) |
|
||||
((ioport("DSW1")->read() & 0x04) << 3) | ((ioport("DSW1")->read() & 0x08) << 1) |
|
||||
((ioport("DSW1")->read() & 0x10) >> 1) | ((ioport("DSW1")->read() & 0x20) >> 3) |
|
||||
((ioport("DSW1")->read() & 0x40) >> 5) | ((ioport("DSW1")->read() & 0x80) >> 7));
|
||||
}
|
||||
|
||||
READ8_MEMBER(ojankohs_state::ojankohs_ay8910_1_r)
|
||||
{
|
||||
// DIPSW 1
|
||||
device_t &root = machine().root_device();
|
||||
return (((root.ioport("DSW2")->read() & 0x01) << 7) | ((root.ioport("DSW2")->read() & 0x02) << 5) |
|
||||
((root.ioport("DSW2")->read() & 0x04) << 3) | ((root.ioport("DSW2")->read() & 0x08) << 1) |
|
||||
((root.ioport("DSW2")->read() & 0x10) >> 1) | ((root.ioport("DSW2")->read() & 0x20) >> 3) |
|
||||
((root.ioport("DSW2")->read() & 0x40) >> 5) | ((root.ioport("DSW2")->read() & 0x80) >> 7));
|
||||
return (((ioport("DSW2")->read() & 0x01) << 7) | ((ioport("DSW2")->read() & 0x02) << 5) |
|
||||
((ioport("DSW2")->read() & 0x04) << 3) | ((ioport("DSW2")->read() & 0x08) << 1) |
|
||||
((ioport("DSW2")->read() & 0x10) >> 1) | ((ioport("DSW2")->read() & 0x20) >> 3) |
|
||||
((ioport("DSW2")->read() & 0x40) >> 5) | ((ioport("DSW2")->read() & 0x80) >> 7));
|
||||
}
|
||||
|
||||
READ8_MEMBER(ojankohs_state::ccasino_dipsw3_r)
|
||||
|
@ -466,7 +466,7 @@ void opwolf_state::opwolf_msm5205_vck(device_t *device,int chip)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_adpcm_data[chip] = machine().root_device().memregion("adpcm")->base()[m_adpcm_pos[chip]];
|
||||
m_adpcm_data[chip] = memregion("adpcm")->base()[m_adpcm_pos[chip]];
|
||||
m_adpcm_pos[chip] = (m_adpcm_pos[chip] + 1) & 0x7ffff;
|
||||
msm5205_data_w(device, m_adpcm_data[chip] >> 4);
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ WRITE_LINE_MEMBER(pachifev_state::pf_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base();
|
||||
UINT8 *ROM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = ((m_trigger ? (ROM[m_adpcm_pos] & 0x0f) : (ROM[m_adpcm_pos] & 0xf0)>>4) );
|
||||
msm5205_data_w(m_msm,m_adpcm_data & 0xf);
|
||||
|
@ -93,7 +93,7 @@ WRITE16_MEMBER(powerbal_state::oki_banking)
|
||||
{
|
||||
int addr = 0x40000 * ((data & 3) - 1);
|
||||
|
||||
if (addr < machine().root_device().memregion("oki")->bytes())
|
||||
if (addr < memregion("oki")->bytes())
|
||||
m_oki->set_bank_base(addr);
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ WRITE_LINE_MEMBER(rastan_state::rastan_msm5205_vck)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_adpcm_data = machine().root_device().memregion("adpcm")->base()[m_adpcm_pos];
|
||||
m_adpcm_data = memregion("adpcm")->base()[m_adpcm_pos];
|
||||
m_adpcm_pos = (m_adpcm_pos + 1) & 0xffff;
|
||||
msm5205_data_w(m_msm, m_adpcm_data >> 4);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
else // disable RAM access (reads go to BIOS ROM)
|
||||
{
|
||||
state->membank("bios_f0000")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x30000);
|
||||
state->membank("bios_f0000")->set_base(state->memregion("bios")->base() + 0x30000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -145,7 +145,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
else // disable RAM access (reads go to BIOS ROM)
|
||||
{
|
||||
state->membank("bios_e4000")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x24000);
|
||||
state->membank("bios_e4000")->set_base(state->memregion("bios")->base() + 0x24000);
|
||||
}
|
||||
|
||||
if (data & 1) // enable RAM access to region 0xe0000 - 0xe3fff
|
||||
@ -154,7 +154,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
else // disable RAM access (reads go to BIOS ROM)
|
||||
{
|
||||
state->membank("bios_e0000")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x20000);
|
||||
state->membank("bios_e0000")->set_base(state->memregion("bios")->base() + 0x20000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -167,7 +167,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
else // disable RAM access (reads go to BIOS ROM)
|
||||
{
|
||||
state->membank("bios_ec000")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x2c000);
|
||||
state->membank("bios_ec000")->set_base(state->memregion("bios")->base() + 0x2c000);
|
||||
}
|
||||
|
||||
if (data & 1) // enable RAM access to region 0xe8000 - 0xebfff
|
||||
@ -176,7 +176,7 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
else // disable RAM access (reads go to BIOS ROM)
|
||||
{
|
||||
state->membank("bios_e8000")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x28000);
|
||||
state->membank("bios_e8000")->set_base(state->memregion("bios")->base() + 0x28000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -325,8 +325,8 @@ READ16_MEMBER(segac2_state::io_chip_r )
|
||||
|
||||
/* otherwise, return an input port */
|
||||
if (offset == 0x04/2 && m_sound_banks)
|
||||
return (space.machine().root_device().ioport(portnames[offset])->read() & 0xbf) | (upd7759_busy_r(m_upd7759) << 6);
|
||||
return space.machine().root_device().ioport(portnames[offset])->read();
|
||||
return (ioport(portnames[offset])->read() & 0xbf) | (upd7759_busy_r(m_upd7759) << 6);
|
||||
return ioport(portnames[offset])->read();
|
||||
|
||||
/* 'SEGA' protection */
|
||||
case 0x10/2:
|
||||
|
@ -76,7 +76,7 @@ void spdodgeb_state::spd_adpcm_int( device_t *device, int chip )
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base() + 0x10000 * chip;
|
||||
UINT8 *ROM = memregion("adpcm")->base() + 0x10000 * chip;
|
||||
|
||||
m_adpcm_data[chip] = ROM[m_adpcm_pos[chip]++];
|
||||
msm5205_data_w(device,m_adpcm_data[chip] >> 4);
|
||||
|
@ -564,7 +564,7 @@ WRITE_LINE_MEMBER(taitol_state::champwr_msm5205_vck)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_adpcm_data = machine().root_device().memregion("adpcm")->base()[m_adpcm_pos];
|
||||
m_adpcm_data = memregion("adpcm")->base()[m_adpcm_pos];
|
||||
m_adpcm_pos = (m_adpcm_pos + 1) & 0x1ffff;
|
||||
msm5205_data_w(m_msm, m_adpcm_data >> 4);
|
||||
}
|
||||
|
@ -2605,7 +2605,7 @@ MACHINE_CONFIG_END
|
||||
// Init for BIOS v1.52
|
||||
void taitotz_state::init_taitotz_152()
|
||||
{
|
||||
UINT32 *rom = (UINT32*)machine().root_device().memregion("user1")->base();
|
||||
UINT32 *rom = (UINT32*)memregion("user1")->base();
|
||||
rom[(0x2c87c^4)/4] = 0x38600000; // skip sound load timeout...
|
||||
// rom[(0x2c620^4)/4] = 0x48000014; // ID check skip (not needed with correct serial number)
|
||||
}
|
||||
@ -2613,7 +2613,7 @@ void taitotz_state::init_taitotz_152()
|
||||
// Init for BIOS 1.11a
|
||||
void taitotz_state::init_taitotz_111a()
|
||||
{
|
||||
UINT32 *rom = (UINT32*)machine().root_device().memregion("user1")->base();
|
||||
UINT32 *rom = (UINT32*)memregion("user1")->base();
|
||||
rom[(0x2b748^4)/4] = 0x480000b8; // skip sound load timeout
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ void tbowl_state::tbowl_adpcm_int( device_t *device, int num )
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base() + 0x10000 * num;
|
||||
UINT8 *ROM = memregion("adpcm")->base() + 0x10000 * num;
|
||||
|
||||
m_adpcm_data[num] = ROM[m_adpcm_pos[num]++];
|
||||
msm5205_data_w(device,m_adpcm_data[num] >> 4);
|
||||
|
@ -104,7 +104,7 @@ WRITE_LINE_MEMBER(tecmo_state::tecmo_adpcm_int)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("adpcm")->base();
|
||||
UINT8 *ROM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = ROM[m_adpcm_pos++];
|
||||
msm5205_data_w(m_msm,m_adpcm_data >> 4);
|
||||
|
@ -252,8 +252,8 @@ static void mxtc_config_w(device_t *busdevice, device_t *device, int function, i
|
||||
}
|
||||
#endif
|
||||
|
||||
state->membank("bank1")->set_base(busdevice->machine().root_device().memregion("bios")->base() + 0x10000);
|
||||
state->membank("bank1")->set_base(busdevice->machine().root_device().memregion("bios")->base());
|
||||
state->membank("bank1")->set_base(state->memregion("bios")->base() + 0x10000);
|
||||
state->membank("bank1")->set_base(state->memregion("bios")->base());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -919,7 +919,7 @@ WRITE8_MEMBER(namcos1_state::namcos1_mcu_bankswitch_w)
|
||||
/* bit 0-1 : address line A15-A16 */
|
||||
addr += (data & 3) * 0x8000;
|
||||
|
||||
membank("bank20")->set_base(machine().root_device().memregion("mcu")->base() + addr);
|
||||
membank("bank20")->set_base(memregion("mcu")->base() + addr);
|
||||
}
|
||||
|
||||
|
||||
@ -1125,7 +1125,7 @@ DRIVER_INIT_MEMBER(namcos1_state,bakutotu)
|
||||
static const UINT8 target[8] = {0x34,0x37,0x35,0x37,0x96,0x00,0x2e,0xed};
|
||||
UINT8 *rombase, *srcptr, *endptr, *scanptr;
|
||||
|
||||
rombase = machine().root_device().memregion("user1")->base();
|
||||
rombase = memregion("user1")->base();
|
||||
srcptr = rombase + 0x1e000;
|
||||
endptr = srcptr + 0xa000;
|
||||
|
||||
|
@ -711,10 +711,10 @@ INTERRUPT_GEN_MEMBER(namcos2_shared_state::namcos2_68k_gpu_vblank)
|
||||
|
||||
WRITE8_MEMBER( namcos2_shared_state::namcos2_sound_bankselect_w )
|
||||
{
|
||||
UINT8 *RAM= machine().root_device().memregion("audiocpu")->base();
|
||||
UINT32 max = (machine().root_device().memregion("audiocpu")->bytes() - 0x10000) / 0x4000;
|
||||
UINT8 *RAM= memregion("audiocpu")->base();
|
||||
UINT32 max = (memregion("audiocpu")->bytes() - 0x10000) / 0x4000;
|
||||
int bank = ( data >> 4 ) % max; /* 991104.CAB */
|
||||
machine().root_device().membank(BANKED_SOUND_ROM)->set_base(&RAM[ 0x10000 + ( 0x4000 * bank ) ] );
|
||||
membank(BANKED_SOUND_ROM)->set_base(&RAM[ 0x10000 + ( 0x4000 * bank ) ] );
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
@ -738,28 +738,28 @@ WRITE8_MEMBER( namcos2_shared_state::namcos2_mcu_analog_ctrl_w )
|
||||
switch((data>>2) & 0x07)
|
||||
{
|
||||
case 0:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN0")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN0")->read();
|
||||
break;
|
||||
case 1:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN1")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN1")->read();
|
||||
break;
|
||||
case 2:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN2")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN2")->read();
|
||||
break;
|
||||
case 3:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN3")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN3")->read();
|
||||
break;
|
||||
case 4:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN4")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN4")->read();
|
||||
break;
|
||||
case 5:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN5")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN5")->read();
|
||||
break;
|
||||
case 6:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN6")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN6")->read();
|
||||
break;
|
||||
case 7:
|
||||
namcos2_mcu_analog_data=machine().root_device().ioport("AN7")->read();
|
||||
namcos2_mcu_analog_data=ioport("AN7")->read();
|
||||
break;
|
||||
default:
|
||||
output_set_value("anunk",data);
|
||||
@ -817,14 +817,14 @@ READ8_MEMBER( namcos2_shared_state::namcos2_mcu_port_d_r )
|
||||
int data = 0;
|
||||
|
||||
/* Read/convert the bits one at a time */
|
||||
if(machine().root_device().ioport("AN0")->read() > threshold) data |= 0x01;
|
||||
if(machine().root_device().ioport("AN1")->read() > threshold) data |= 0x02;
|
||||
if(machine().root_device().ioport("AN2")->read() > threshold) data |= 0x04;
|
||||
if(machine().root_device().ioport("AN3")->read() > threshold) data |= 0x08;
|
||||
if(machine().root_device().ioport("AN4")->read() > threshold) data |= 0x10;
|
||||
if(machine().root_device().ioport("AN5")->read() > threshold) data |= 0x20;
|
||||
if(machine().root_device().ioport("AN6")->read() > threshold) data |= 0x40;
|
||||
if(machine().root_device().ioport("AN7")->read() > threshold) data |= 0x80;
|
||||
if(ioport("AN0")->read() > threshold) data |= 0x01;
|
||||
if(ioport("AN1")->read() > threshold) data |= 0x02;
|
||||
if(ioport("AN2")->read() > threshold) data |= 0x04;
|
||||
if(ioport("AN3")->read() > threshold) data |= 0x08;
|
||||
if(ioport("AN4")->read() > threshold) data |= 0x10;
|
||||
if(ioport("AN5")->read() > threshold) data |= 0x20;
|
||||
if(ioport("AN6")->read() > threshold) data |= 0x40;
|
||||
if(ioport("AN7")->read() > threshold) data |= 0x80;
|
||||
|
||||
/* Return the result */
|
||||
return data;
|
||||
|
@ -359,9 +359,7 @@ WRITE8_MEMBER(vectrex_state::v_via_pb_w)
|
||||
/* Cartridge bank-switching */
|
||||
if (m_64k_cart && ((data ^ m_via_out[PORTB]) & 0x40))
|
||||
{
|
||||
device_t &root_device = machine().root_device();
|
||||
|
||||
root_device.membank("bank1")->set_base(root_device.memregion("maincpu")->base() + ((data & 0x40) ? 0x10000 : 0x0000));
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + ((data & 0x40) ? 0x10000 : 0x0000));
|
||||
}
|
||||
|
||||
/* Sound */
|
||||
|
@ -1263,7 +1263,7 @@ WRITE8_MEMBER(a2600_state::switch_A_w)
|
||||
/* Right controller port */
|
||||
m_joy2->joy_w( data & 0x0f );
|
||||
|
||||
// switch( machine().root_device().ioport("CONTROLLERS")->read() % CATEGORY_SELECT )
|
||||
// switch( ioport("CONTROLLERS")->read() % CATEGORY_SELECT )
|
||||
// {
|
||||
// case 0x0a: /* KidVid voice module */
|
||||
// machine().device<cassette_image_device>(CASSETTE_TAG)->change_state(( data & 0x02 ) ? (cassette_state)CASSETTE_MOTOR_DISABLED : (cassette_state)(CASSETTE_MOTOR_ENABLED | CASSETTE_PLAY), (cassette_state)CASSETTE_MOTOR_DISABLED );
|
||||
@ -1294,7 +1294,7 @@ WRITE_LINE_MEMBER(a2600_state::irq_callback)
|
||||
|
||||
READ8_MEMBER(a2600_state::riot_input_port_8_r)
|
||||
{
|
||||
return machine().root_device().ioport("SWB")->read();
|
||||
return ioport("SWB")->read();
|
||||
}
|
||||
|
||||
static const riot6532_interface r6532_interface =
|
||||
|
@ -276,7 +276,7 @@ WRITE8_MEMBER( a5105_state::a5105_memsel_w )
|
||||
prog.unmap_write(0x4000, 0x4000);
|
||||
break;
|
||||
case 1:
|
||||
membank("bank2")->set_base(machine().root_device().memregion("k5651")->base());
|
||||
membank("bank2")->set_base(memregion("k5651")->base());
|
||||
prog.install_read_bank(0x4000, 0x7fff, "bank2");
|
||||
prog.unmap_write(0x4000, 0x4000);
|
||||
break;
|
||||
@ -485,7 +485,7 @@ void a5105_state::machine_reset()
|
||||
m_beep->set_frequency(500);
|
||||
|
||||
m_ram_base = (UINT8*)machine().device<ram_device>(RAM_TAG)->pointer();
|
||||
m_rom_base = (UINT8*)machine().root_device().memregion("maincpu")->base();
|
||||
m_rom_base = (UINT8*)memregion("maincpu")->base();
|
||||
|
||||
membank("bank1")->set_base(m_rom_base);
|
||||
membank("bank2")->set_base(m_rom_base + 0x4000);
|
||||
|
@ -343,8 +343,8 @@ ROM_END
|
||||
DRIVER_INIT_MEMBER(alesis_state,hr16)
|
||||
{
|
||||
int i;
|
||||
UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *orig = machine().root_device().memregion("user1")->base();
|
||||
UINT8 *ROM = memregion("maincpu")->base();
|
||||
UINT8 *orig = memregion("user1")->base();
|
||||
for (i = 0; i < 0x8000; i++)
|
||||
{
|
||||
ROM[BITSWAP16(i,15,14,13,12,11,10,9,8,0,1,2,3,4,5,6,7)] = orig[i];
|
||||
|
@ -57,8 +57,8 @@ INPUT_PORTS_END
|
||||
|
||||
void altos5_state::machine_reset()
|
||||
{
|
||||
UINT8 *m_p_maincpu = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *m_p_roms = machine().root_device().memregion("roms")->base();
|
||||
UINT8 *m_p_maincpu = memregion("maincpu")->base();
|
||||
UINT8 *m_p_roms = memregion("roms")->base();
|
||||
memcpy(m_p_maincpu, m_p_roms, 0x1000);
|
||||
}
|
||||
|
||||
|
@ -582,7 +582,7 @@ static const tpi6525_interface cdtv_tpi_intf =
|
||||
|
||||
READ8_MEMBER(a1200_state::a1200_cia_0_portA_r)
|
||||
{
|
||||
UINT8 ret = machine().root_device().ioport("CIA0PORTA")->read() & 0xc0; /* Gameport 1 and 0 buttons */
|
||||
UINT8 ret = ioport("CIA0PORTA")->read() & 0xc0; /* Gameport 1 and 0 buttons */
|
||||
ret |= machine().device<amiga_fdc>("fdc")->ciaapra_r();
|
||||
return ret;
|
||||
}
|
||||
@ -1123,7 +1123,7 @@ DRIVER_INIT_MEMBER(amiga_state,amiga)
|
||||
|
||||
/* set up memory */
|
||||
m_bank1->configure_entry(0, m_chip_ram);
|
||||
m_bank1->configure_entry(1, machine().root_device().memregion("user1")->base());
|
||||
m_bank1->configure_entry(1, memregion("user1")->base());
|
||||
|
||||
/* initialize cartridge (if present) */
|
||||
amiga_cart_init(machine());
|
||||
@ -1149,7 +1149,7 @@ DRIVER_INIT_MEMBER(amiga_state,cdtv)
|
||||
|
||||
/* set up memory */
|
||||
m_bank1->configure_entry(0, m_chip_ram);
|
||||
m_bank1->configure_entry(1, machine().root_device().memregion("user1")->base());
|
||||
m_bank1->configure_entry(1, memregion("user1")->base());
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(a1200_state,a1200)
|
||||
@ -1171,7 +1171,7 @@ DRIVER_INIT_MEMBER(a1200_state,a1200)
|
||||
|
||||
/* set up memory */
|
||||
m_bank1->configure_entry(0, m_chip_ram);
|
||||
m_bank1->configure_entry(1, machine().root_device().memregion("user1")->base());
|
||||
m_bank1->configure_entry(1, memregion("user1")->base());
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(amiga_state,a3000)
|
||||
@ -1193,7 +1193,7 @@ DRIVER_INIT_MEMBER(amiga_state,a3000)
|
||||
|
||||
/* set up memory */
|
||||
m_bank1->configure_entry(0, m_chip_ram);
|
||||
m_bank1->configure_entry(1, machine().root_device().memregion("user1")->base());
|
||||
m_bank1->configure_entry(1, memregion("user1")->base());
|
||||
}
|
||||
|
||||
|
||||
|
@ -345,7 +345,7 @@ READ8_MEMBER(apc_state::apc_kbd_r)
|
||||
case 0: res = m_keyb.data; pic8259_ir4_w(machine().device("pic8259_master"), 0); break; // according to the source, reading there acks the irq
|
||||
case 1: res = m_keyb.status; break;
|
||||
case 2: res = m_keyb.sig; break; // bit 0: CTRL bit 1: function key (or reversed)
|
||||
case 3: res = machine().root_device().ioport("KEY_MOD")->read() & 0xff; break; // sh
|
||||
case 3: res = ioport("KEY_MOD")->read() & 0xff; break; // sh
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@ -413,7 +413,7 @@ INTERRUPT_GEN_MEMBER(apexc_state::apexc_interrupt)
|
||||
|
||||
|
||||
/* read new state of edit keys */
|
||||
edit_keys = machine().root_device().ioport("data")->read();
|
||||
edit_keys = ioport("data")->read();
|
||||
|
||||
/* toggle data reg according to transitions */
|
||||
m_panel_data_reg ^= edit_keys & (~m_old_edit_keys);
|
||||
@ -826,7 +826,7 @@ DRIVER_INIT_MEMBER(apexc_state,apexc)
|
||||
0x00
|
||||
};
|
||||
|
||||
dst = machine().root_device().memregion("chargen")->base();
|
||||
dst = memregion("chargen")->base();
|
||||
|
||||
memcpy(dst, fontdata6x8, apexcfontdata_size);
|
||||
}
|
||||
|
@ -1062,7 +1062,7 @@ static void apollo_reset_instr_callback(device_t *device)
|
||||
***************************************************************************/
|
||||
|
||||
void apollo_state::machine_start(){
|
||||
memory_share *messram = machine().root_device().memshare("messram");
|
||||
memory_share *messram = memshare("messram");
|
||||
//MLOG1(("machine_start_dn3500: ram size is %d MB", (int)messram->bytes()/(1024*1024)));
|
||||
|
||||
// clear ram
|
||||
|
@ -453,7 +453,7 @@ void arcadia_state::palette_init()
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER( arcadia_state, arcadia_cart )
|
||||
{
|
||||
UINT8 *rom = image.device().machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *rom = memregion("maincpu")->base();
|
||||
int size;
|
||||
|
||||
memset(rom, 0, 0x8000);
|
||||
@ -461,8 +461,8 @@ DEVICE_IMAGE_LOAD_MEMBER( arcadia_state, arcadia_cart )
|
||||
{
|
||||
size = image.length();
|
||||
|
||||
if (size > image.device().machine().root_device().memregion("maincpu")->bytes())
|
||||
size = image.device().machine().root_device().memregion("maincpu")->bytes();
|
||||
if (size > memregion("maincpu")->bytes())
|
||||
size = memregion("maincpu")->bytes();
|
||||
|
||||
if (image.fread(rom, size) != size)
|
||||
return IMAGE_INIT_FAIL;
|
||||
@ -731,13 +731,13 @@ ROM_END
|
||||
DRIVER_INIT_MEMBER(arcadia_state,arcadia)
|
||||
{
|
||||
int i;
|
||||
UINT8 *gfx=machine().root_device().memregion("gfx1")->base();
|
||||
UINT8 *gfx=memregion("gfx1")->base();
|
||||
for (i=0; i<256; i++) gfx[i]=i;
|
||||
#if 0
|
||||
// this is here to allow developement of some simple testroutines
|
||||
// for a real console
|
||||
{
|
||||
UINT8 *rom=machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *rom=memregion("maincpu")->base();
|
||||
/* this is a simple routine to display all rom characters
|
||||
on the display for a snapshot */
|
||||
static const UINT8 prog[]={ // address 0 of course
|
||||
|
@ -343,14 +343,14 @@ MACHINE_RESET_MEMBER(astrocde_mess_state, astrocde)
|
||||
|
||||
void astrocde_mess_state::get_ram_expansion_settings(int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end)
|
||||
{
|
||||
if (machine().root_device().ioport("PROTECT")->read() == 0x01)
|
||||
if (ioport("PROTECT")->read() == 0x01)
|
||||
write_protect_on = 1;
|
||||
else
|
||||
write_protect_on = 0;
|
||||
|
||||
ram_expansion_installed = 1;
|
||||
|
||||
switch(machine().root_device().ioport("CFG")->read()) // check RAM expansion configuration and set address ranges
|
||||
switch(ioport("CFG")->read()) // check RAM expansion configuration and set address ranges
|
||||
{
|
||||
case 0x00: // No RAM Expansion
|
||||
ram_expansion_installed = 0;
|
||||
|
@ -809,26 +809,26 @@ DEVICE_IMAGE_LOAD_MEMBER( atom_state, atom_cart )
|
||||
if (image.software_entry() == NULL)
|
||||
{
|
||||
size = image.length();
|
||||
temp_copy = auto_alloc_array(image.device().machine(), UINT8, size);
|
||||
temp_copy = auto_alloc_array(machine(), UINT8, size);
|
||||
|
||||
if (size > 0x1000)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
|
||||
auto_free(image.device().machine(), temp_copy);
|
||||
auto_free(machine(), temp_copy);
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
if (image.fread(temp_copy, size) != size)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
|
||||
auto_free(image.device().machine(), temp_copy);
|
||||
auto_free(machine(), temp_copy);
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
size = image.get_software_region_length( "rom");
|
||||
temp_copy = auto_alloc_array(image.device().machine(), UINT8, size);
|
||||
temp_copy = auto_alloc_array(machine(), UINT8, size);
|
||||
memcpy(temp_copy, image.get_software_region("rom"), size);
|
||||
}
|
||||
|
||||
@ -836,9 +836,9 @@ DEVICE_IMAGE_LOAD_MEMBER( atom_state, atom_cart )
|
||||
|
||||
/* With the following, we mirror the cart in the whole memory region */
|
||||
for (i = 0; i < mirror; i++)
|
||||
memcpy(image.device().machine().root_device().memregion(this_cart->region)->base() + this_cart->offset + i * size, temp_copy, size);
|
||||
memcpy(memregion(this_cart->region)->base() + this_cart->offset + i * size, temp_copy, size);
|
||||
|
||||
auto_free(image.device().machine(), temp_copy);
|
||||
auto_free(machine(), temp_copy);
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(babbage_state::keyboard_callback)
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
sprintf(kbdrow,"X%X",i);
|
||||
inp = machine().root_device().ioport(kbdrow)->read();
|
||||
inp = ioport(kbdrow)->read();
|
||||
|
||||
for (j = 0; j < 5; j++)
|
||||
if (BIT(inp, j))
|
||||
|
@ -134,7 +134,7 @@ static const z80_daisy_config bbcbc_daisy_chain[] =
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER( bbcbc_state, bbcbc_cart )
|
||||
{
|
||||
UINT8 *cart = machine().root_device().memregion("maincpu" )->base() + 0x4000;
|
||||
UINT8 *cart = memregion("maincpu" )->base() + 0x4000;
|
||||
|
||||
if ( image.software_entry() == NULL )
|
||||
{
|
||||
|
@ -590,7 +590,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bml3_state::keyboard_callback)
|
||||
{
|
||||
for(i=0;i<32;i++)
|
||||
{
|
||||
if((machine().root_device().ioport(portnames[port_i])->read()>>i) & 1)
|
||||
if((ioport(portnames[port_i])->read()>>i) & 1)
|
||||
{
|
||||
{
|
||||
m_keyb_press = scancode;
|
||||
@ -642,8 +642,8 @@ void bml3_state::machine_reset()
|
||||
address_space &mem = m_maincpu->space(AS_PROGRAM);
|
||||
|
||||
/* defaults */
|
||||
mem.install_rom(0xa000, 0xfeff,mem.machine().root_device().memregion("maincpu")->base() + 0xa000);
|
||||
mem.install_rom(0xfff0, 0xffff,mem.machine().root_device().memregion("maincpu")->base() + 0xfff0);
|
||||
mem.install_rom(0xa000, 0xfeff,memregion("maincpu")->base() + 0xa000);
|
||||
mem.install_rom(0xfff0, 0xffff,memregion("maincpu")->base() + 0xfff0);
|
||||
mem.install_write_handler(0xa000, 0xbfff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_a000_w), this),0);
|
||||
mem.install_write_handler(0xc000, 0xdfff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_c000_w), this),0);
|
||||
mem.install_write_handler(0xe000, 0xefff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_e000_w), this),0);
|
||||
@ -730,7 +730,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w)
|
||||
else
|
||||
{
|
||||
mem.install_rom(0xa000, 0xbfff,
|
||||
mem.machine().root_device().memregion("maincpu")->base() + 0xa000);
|
||||
memregion("maincpu")->base() + 0xa000);
|
||||
mem.install_write_handler(0xa000, 0xbfff, 0, 0,
|
||||
write8_delegate(FUNC(bml3_state::bml3_a000_w), this),
|
||||
0);
|
||||
@ -748,7 +748,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w)
|
||||
else
|
||||
{
|
||||
mem.install_rom(0xc000, 0xdfff,
|
||||
mem.machine().root_device().memregion("maincpu")->base() + 0xc000);
|
||||
memregion("maincpu")->base() + 0xc000);
|
||||
mem.install_write_handler(0xc000, 0xdfff, 0, 0,
|
||||
write8_delegate(FUNC(bml3_state::bml3_c000_w), this),
|
||||
0);
|
||||
@ -766,7 +766,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w)
|
||||
else
|
||||
{
|
||||
mem.install_rom(0xe000, 0xefff,
|
||||
mem.machine().root_device().memregion("maincpu")->base() + 0xe000);
|
||||
memregion("maincpu")->base() + 0xe000);
|
||||
mem.install_write_handler(0xe000, 0xefff, 0, 0,
|
||||
write8_delegate(FUNC(bml3_state::bml3_e000_w), this),
|
||||
0);
|
||||
@ -782,7 +782,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w)
|
||||
else
|
||||
{
|
||||
mem.install_rom(0xf000, 0xfeff,
|
||||
mem.machine().root_device().memregion("maincpu")->base() + 0xf000);
|
||||
memregion("maincpu")->base() + 0xf000);
|
||||
mem.install_write_handler(0xf000, 0xfeff, 0, 0,
|
||||
write8_delegate(FUNC(bml3_state::bml3_f000_w), this),
|
||||
0);
|
||||
@ -797,7 +797,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w)
|
||||
else
|
||||
{
|
||||
mem.install_rom(0xfff0, 0xffff,
|
||||
mem.machine().root_device().memregion("maincpu")->base() + 0xfff0);
|
||||
memregion("maincpu")->base() + 0xfff0);
|
||||
mem.install_write_handler(0xfff0, 0xffff, 0, 0,
|
||||
write8_delegate(FUNC(bml3_state::bml3_fff0_w), this),
|
||||
0);
|
||||
|
@ -130,8 +130,7 @@ WRITE8_MEMBER( camplynx_state::lynx48k_bank_w )
|
||||
WRITE8_MEMBER( camplynx_state::lynx128k_bank_w )
|
||||
{
|
||||
/* get address space */
|
||||
address_space &mem = m_maincpu->space(AS_PROGRAM);
|
||||
UINT8 *base = mem.machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *base = memregion("maincpu")->base();
|
||||
|
||||
/* Set read banks */
|
||||
UINT8 bank = data & 0x0f;
|
||||
|
@ -343,7 +343,7 @@ public:
|
||||
/*
|
||||
DRIVER_INIT_MEMBER( cat_state,cat )
|
||||
{
|
||||
UINT8 *svrom = machine().root_device().memregion("svrom")->base();
|
||||
UINT8 *svrom = memregion("svrom")->base();
|
||||
int i;
|
||||
// fill svrom with the correct 2e80 pattern except where svrom1 sits
|
||||
// first half
|
||||
|
@ -230,7 +230,7 @@ DEVICE_IMAGE_LOAD_MEMBER( channelf_state, channelf_cart )
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
if (image.fread( image.device().machine().root_device().memregion("maincpu")->base() + 0x0800, size) != size)
|
||||
if (image.fread( memregion("maincpu")->base() + 0x0800, size) != size)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
|
||||
return IMAGE_INIT_FAIL;
|
||||
@ -240,7 +240,7 @@ DEVICE_IMAGE_LOAD_MEMBER( channelf_state, channelf_cart )
|
||||
else
|
||||
{
|
||||
size = image.get_software_region_length("rom");
|
||||
memcpy(image.device().machine().root_device().memregion("maincpu")->base() + 0x0800, image.get_software_region("rom"), size);
|
||||
memcpy(memregion("maincpu")->base() + 0x0800, image.get_software_region("rom"), size);
|
||||
}
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
|
@ -270,7 +270,7 @@ void coleco_state::machine_reset()
|
||||
|
||||
m_maincpu->set_input_line_vector(INPUT_LINE_IRQ0, 0xff);
|
||||
|
||||
memset(&machine().root_device().memregion(Z80_TAG)->base()[0x6000], 0xff, 0x400); // initialize RAM
|
||||
memset(&memregion(Z80_TAG)->base()[0x6000], 0xff, 0x400); // initialize RAM
|
||||
}
|
||||
|
||||
//static int coleco_cart_verify(const UINT8 *cartdata, size_t size)
|
||||
@ -288,7 +288,7 @@ void coleco_state::machine_reset()
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER( coleco_state,czz50_cart )
|
||||
{
|
||||
UINT8 *ptr = image.device().machine().root_device().memregion(Z80_TAG)->base() + 0x8000;
|
||||
UINT8 *ptr = memregion(Z80_TAG)->base() + 0x8000;
|
||||
UINT32 size;
|
||||
|
||||
if (image.software_entry() == NULL)
|
||||
|
@ -205,7 +205,7 @@ GFXDECODE_END
|
||||
|
||||
void comquest_state::machine_reset()
|
||||
{
|
||||
// UINT8 *mem=machine().root_device().memregion("user1")->base();
|
||||
// UINT8 *mem=memregion("user1")->base();
|
||||
// membank(1)->set_base(mem+0x00000);
|
||||
}
|
||||
|
||||
|
@ -992,7 +992,7 @@ void cxhumax_state::machine_reset()
|
||||
m_i2c0_regs[0x08/4] = 0x08; // SDA high
|
||||
m_i2c2_regs[0x08/4] = 0x08; // SDA high
|
||||
|
||||
UINT8* FLASH = machine().root_device().memregion("flash")->base();
|
||||
UINT8* FLASH = memregion("flash")->base();
|
||||
memcpy(m_ram,FLASH,0x400000);
|
||||
|
||||
m_chipcontrol_regs[PIN_CONFIG_0_REG] =
|
||||
|
@ -303,7 +303,7 @@ static UINT8 duart_input(device_t *device)
|
||||
dectalk_state *state = device->machine().driver_data<dectalk_state>();
|
||||
UINT8 data = 0;
|
||||
data |= state->m_duart_inport&0xF;
|
||||
data |= (device->machine().root_device().ioport("duart_in")->read()&0xF0);
|
||||
data |= (state->ioport("duart_in")->read()&0xF0);
|
||||
if ((state->m_hack_self_test == 1) && (state->ioport("hacks")->read()&0x01)) data |= 0x10; // hack to prevent hang if selftest disable bit is kept low past the first read; i suppose the proper use of this bit was an incremental switch, or perhaps its expecting an interrupt later from serial in or tone in? added a dipswitch to disable the hack for testing
|
||||
state->m_hack_self_test = 1;
|
||||
return data;
|
||||
|
@ -47,7 +47,7 @@ static void enterprise_update_memory_page(address_space &space, offs_t page, int
|
||||
case 0x03:
|
||||
space.install_read_bank(start, end, page_num);
|
||||
space.nop_write(start, end);
|
||||
state->membank(page_num)->set_base(space.machine().root_device().memregion("exos")->base() + (index * 0x4000));
|
||||
state->membank(page_num)->set_base(state->memregion("exos")->base() + (index * 0x4000));
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
@ -56,7 +56,7 @@ static void enterprise_update_memory_page(address_space &space, offs_t page, int
|
||||
case 0x07:
|
||||
space.install_read_bank(start, end, page_num);
|
||||
space.nop_write(start, end);
|
||||
state->membank(page_num)->set_base(space.machine().root_device().memregion("cartridges")->base() + ((index - 0x04) * 0x4000));
|
||||
state->membank(page_num)->set_base(state->memregion("cartridges")->base() + ((index - 0x04) * 0x4000));
|
||||
break;
|
||||
|
||||
case 0x20:
|
||||
@ -128,13 +128,13 @@ READ8_MEMBER(ep_state::enterprise_dave_reg_read)
|
||||
{
|
||||
case 0x015:
|
||||
/* read keyboard line */
|
||||
dave_set_reg(machine().device("custom"), 0x015, machine().root_device().ioport(keynames[keyboard_line])->read());
|
||||
dave_set_reg(machine().device("custom"), 0x015, ioport(keynames[keyboard_line])->read());
|
||||
break;
|
||||
|
||||
case 0x016:
|
||||
{
|
||||
int ExternalJoystickInputs;
|
||||
int ExternalJoystickPortInput = machine().root_device().ioport("JOY1")->read();
|
||||
int ExternalJoystickPortInput = ioport("JOY1")->read();
|
||||
|
||||
if (keyboard_line <= 4)
|
||||
{
|
||||
|
@ -180,7 +180,7 @@ static UINT8 esq1_adc_read(device_t *device)
|
||||
void esq1_state::machine_reset()
|
||||
{
|
||||
// set default OSROM banking
|
||||
membank("osbank")->set_base(machine().root_device().memregion("osrom")->base() );
|
||||
membank("osbank")->set_base(memregion("osrom")->base() );
|
||||
|
||||
m_mapper_state = 0;
|
||||
m_seq_bank = 0;
|
||||
|
@ -221,8 +221,8 @@ IRQ_CALLBACK_MEMBER(esq5505_state::maincpu_irq_acknowledge_callback)
|
||||
|
||||
void esq5505_state::machine_reset()
|
||||
{
|
||||
m_rom = (UINT16 *)(void *)machine().root_device().memregion("osrom")->base();
|
||||
m_ram = (UINT16 *)(void *)machine().root_device().memshare("osram")->ptr();
|
||||
m_rom = (UINT16 *)(void *)memregion("osrom")->base();
|
||||
m_ram = (UINT16 *)(void *)memshare("osram")->ptr();
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(esq5505_state::maincpu_irq_acknowledge_callback),this));
|
||||
}
|
||||
|
||||
@ -254,8 +254,8 @@ READ16_MEMBER(esq5505_state::lower_r)
|
||||
// get pointers when 68k resets
|
||||
if (!m_rom)
|
||||
{
|
||||
m_rom = (UINT16 *)(void *)machine().root_device().memregion("osrom")->base();
|
||||
m_ram = (UINT16 *)(void *)machine().root_device().memshare("osram")->ptr();
|
||||
m_rom = (UINT16 *)(void *)memregion("osrom")->base();
|
||||
m_ram = (UINT16 *)(void *)memshare("osram")->ptr();
|
||||
}
|
||||
|
||||
if (m68k_get_fc(m_maincpu) == 0x6) // supervisor mode = ROM
|
||||
@ -882,8 +882,8 @@ DRIVER_INIT_MEMBER(esq5505_state,sq1)
|
||||
|
||||
DRIVER_INIT_MEMBER(esq5505_state,denib)
|
||||
{
|
||||
UINT8 *pNibbles = (UINT8 *)machine().root_device().memregion("nibbles")->base();
|
||||
UINT8 *pBS0L = (UINT8 *)machine().root_device().memregion("waverom")->base();
|
||||
UINT8 *pNibbles = (UINT8 *)memregion("nibbles")->base();
|
||||
UINT8 *pBS0L = (UINT8 *)memregion("waverom")->base();
|
||||
UINT8 *pBS0H = pBS0L + 0x100000;
|
||||
|
||||
DRIVER_INIT_CALL(common);
|
||||
|
@ -93,8 +93,8 @@ public:
|
||||
|
||||
void esqkt_state::machine_reset()
|
||||
{
|
||||
// m_rom = (UINT32 *)machine().root_device().memregion("osrom")->base();
|
||||
// m_ram = (UINT32 *)machine().root_device().memshare("osram")->ptr();
|
||||
// m_rom = (UINT32 *)memregion("osrom")->base();
|
||||
// m_ram = (UINT32 *)memshare("osram")->ptr();
|
||||
|
||||
// memcpy(m_ram, m_rom, 8);
|
||||
// m_maincpu->reset();
|
||||
@ -122,7 +122,7 @@ READ16_MEMBER(esqkt_state::es5510_dsp_r)
|
||||
|
||||
WRITE16_MEMBER(esqkt_state::es5510_dsp_w)
|
||||
{
|
||||
UINT8 *snd_mem = (UINT8 *)space.machine().root_device().memregion("waverom")->base();
|
||||
UINT8 *snd_mem = (UINT8 *)memregion("waverom")->base();
|
||||
|
||||
COMBINE_DATA(&es5510_dsp_ram[offset]);
|
||||
|
||||
@ -191,8 +191,8 @@ READ32_MEMBER(esqkt_state::lower_r)
|
||||
// get pointers when 68k resets
|
||||
if (!m_rom)
|
||||
{
|
||||
m_rom = (UINT32 *)machine().root_device().memregion("osrom")->base();
|
||||
m_ram = (UINT32 *)machine().root_device().memshare("osram")->ptr();
|
||||
m_rom = (UINT32 *)memregion("osrom")->base();
|
||||
m_ram = (UINT32 *)memshare("osram")->ptr();
|
||||
}
|
||||
|
||||
if (offset < 0x2000)
|
||||
|
@ -309,7 +309,7 @@ READ8_MEMBER( fk1_state::fk1_bank_rom_r )
|
||||
{
|
||||
address_space &space_mem = m_maincpu->space(AS_PROGRAM);
|
||||
space_mem.unmap_write(0x0000, 0x3fff);
|
||||
membank("bank1")->set_base(machine().root_device().memregion("maincpu")->base());
|
||||
membank("bank1")->set_base(memregion("maincpu")->base());
|
||||
membank("bank2")->set_base(machine().device<ram_device>(RAM_TAG)->pointer() + 0x10000);
|
||||
return 0;
|
||||
}
|
||||
@ -387,7 +387,7 @@ INPUT_PORTS_END
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(fk1_state::keyboard_callback)
|
||||
{
|
||||
if (machine().root_device().ioport("LINE0")->read())
|
||||
if (ioport("LINE0")->read())
|
||||
{
|
||||
m_int_vector = 6;
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
@ -424,7 +424,7 @@ void fk1_state::machine_reset()
|
||||
UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
|
||||
|
||||
space.unmap_write(0x0000, 0x3fff);
|
||||
membank("bank1")->set_base(machine().root_device().memregion("maincpu")->base()); // ROM
|
||||
membank("bank1")->set_base(memregion("maincpu")->base()); // ROM
|
||||
membank("bank2")->set_base(ram + 0x10000); // VRAM
|
||||
membank("bank3")->set_base(ram + 0x8000);
|
||||
membank("bank4")->set_base(ram + 0xc000);
|
||||
|
@ -871,7 +871,7 @@ static void fm7_update_psg(running_machine &machine)
|
||||
break;
|
||||
case 0x09:
|
||||
// Joystick port read
|
||||
state->m_psg_data = space.machine().root_device().ioport("joy1")->read();
|
||||
state->m_psg_data = state->ioport("joy1")->read();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -940,12 +940,12 @@ READ8_MEMBER(fm7_state::fm7_fmirq_r)
|
||||
|
||||
READ8_MEMBER(fm7_state::fm77av_joy_1_r)
|
||||
{
|
||||
return machine().root_device().ioport("joy1")->read();
|
||||
return ioport("joy1")->read();
|
||||
}
|
||||
|
||||
READ8_MEMBER(fm7_state::fm77av_joy_2_r)
|
||||
{
|
||||
return machine().root_device().ioport("joy2")->read();
|
||||
return ioport("joy2")->read();
|
||||
}
|
||||
|
||||
READ8_MEMBER(fm7_state::fm7_unknown_r)
|
||||
@ -1052,7 +1052,7 @@ static void fm7_update_bank(address_space & space, int bank, UINT8 physical)
|
||||
{
|
||||
if(state->m_init_rom_en && (state->m_type == SYS_FM11 || state->m_type == SYS_FM16))
|
||||
{
|
||||
RAM = space.machine().root_device().memregion("init")->base();
|
||||
RAM = state->memregion("init")->base();
|
||||
space.install_read_bank(bank*0x1000,(bank*0x1000)+size,bank_name);
|
||||
space.nop_write(bank*0x1000,(bank*0x1000)+size);
|
||||
state->membank(bank_name)->set_base(RAM+(physical<<12)-0x35000);
|
||||
@ -1063,7 +1063,7 @@ static void fm7_update_bank(address_space & space, int bank, UINT8 physical)
|
||||
{
|
||||
if(state->m_init_rom_en && (state->m_type != SYS_FM11 && state->m_type != SYS_FM16))
|
||||
{
|
||||
RAM = space.machine().root_device().memregion("init")->base();
|
||||
RAM = state->memregion("init")->base();
|
||||
space.install_read_bank(bank*0x1000,(bank*0x1000)+size,bank_name);
|
||||
space.nop_write(bank*0x1000,(bank*0x1000)+size);
|
||||
state->membank(bank_name)->set_base(RAM+(physical<<12)-0x36000);
|
||||
@ -1074,7 +1074,7 @@ static void fm7_update_bank(address_space & space, int bank, UINT8 physical)
|
||||
{
|
||||
if(state->m_basic_rom_en && (state->m_type != SYS_FM11 && state->m_type != SYS_FM16))
|
||||
{
|
||||
RAM = space.machine().root_device().memregion("fbasic")->base();
|
||||
RAM = state->memregion("fbasic")->base();
|
||||
space.install_read_bank(bank*0x1000,(bank*0x1000)+size,bank_name);
|
||||
space.nop_write(bank*0x1000,(bank*0x1000)+size);
|
||||
state->membank(bank_name)->set_base(RAM+(physical<<12)-0x38000);
|
||||
@ -1290,9 +1290,9 @@ TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll)
|
||||
int bit = 0;
|
||||
int mod = 0;
|
||||
UINT32 keys;
|
||||
UINT32 modifiers = machine().root_device().ioport("key_modifiers")->read();
|
||||
UINT32 modifiers = ioport("key_modifiers")->read();
|
||||
|
||||
if(machine().root_device().ioport("key3")->read() & 0x40000)
|
||||
if(ioport("key3")->read() & 0x40000)
|
||||
{
|
||||
m_break_flag = 1;
|
||||
m_maincpu->set_input_line(M6809_FIRQ_LINE,ASSERT_LINE);
|
||||
@ -1321,7 +1321,7 @@ TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll)
|
||||
|
||||
for(x=0;x<3;x++)
|
||||
{
|
||||
keys = machine().root_device().ioport(portnames[x])->read();
|
||||
keys = ioport(portnames[x])->read();
|
||||
|
||||
for(y=0;y<32;y++) // loop through each bit in the port
|
||||
{
|
||||
@ -1853,8 +1853,8 @@ MACHINE_START_MEMBER(fm7_state,fm7)
|
||||
|
||||
MACHINE_START_MEMBER(fm7_state,fm77av)
|
||||
{
|
||||
UINT8* RAM = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8* ROM = machine().root_device().memregion("init")->base();
|
||||
UINT8* RAM = memregion("maincpu")->base();
|
||||
UINT8* ROM = memregion("init")->base();
|
||||
|
||||
memset(m_shared_ram,0xff,0x80);
|
||||
|
||||
@ -1862,7 +1862,7 @@ MACHINE_START_MEMBER(fm7_state,fm77av)
|
||||
memcpy(RAM+0x3fff0,ROM+0x1ff0,16);
|
||||
|
||||
m_video.subrom = 0; // default sub CPU ROM is type C.
|
||||
RAM = machine().root_device().memregion("subsyscg")->base();
|
||||
RAM = memregion("subsyscg")->base();
|
||||
membank("bank20")->set_base(RAM);
|
||||
RAM = memregion("subsys_c")->base();
|
||||
membank("bank21")->set_base(RAM+0x800);
|
||||
@ -1874,7 +1874,7 @@ MACHINE_START_MEMBER(fm7_state,fm77av)
|
||||
|
||||
MACHINE_START_MEMBER(fm7_state,fm11)
|
||||
{
|
||||
UINT8* RAM = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8* RAM = memregion("maincpu")->base();
|
||||
UINT8* ROM = memregion("init")->base();
|
||||
|
||||
memset(m_shared_ram,0xff,0x80);
|
||||
@ -1894,7 +1894,7 @@ MACHINE_START_MEMBER(fm7_state,fm16)
|
||||
|
||||
void fm7_state::machine_reset()
|
||||
{
|
||||
UINT8* RAM = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8* RAM = memregion("maincpu")->base();
|
||||
UINT8* ROM = memregion("init")->base();
|
||||
|
||||
m_timer->adjust(attotime::from_nsec(2034500),0,attotime::from_nsec(2034500));
|
||||
@ -1944,13 +1944,13 @@ void fm7_state::machine_reset()
|
||||
// set boot mode (FM-7 only, AV and later has boot RAM instead)
|
||||
if(m_type == SYS_FM7)
|
||||
{
|
||||
if(!(machine().root_device().ioport("DSW")->read() & 0x02))
|
||||
if(!(ioport("DSW")->read() & 0x02))
|
||||
{ // DOS mode
|
||||
membank("bank17")->set_base(machine().root_device().memregion("dos")->base());
|
||||
membank("bank17")->set_base(memregion("dos")->base());
|
||||
}
|
||||
else
|
||||
{ // BASIC mode
|
||||
membank("bank17")->set_base(machine().root_device().memregion("basic")->base());
|
||||
membank("bank17")->set_base(memregion("basic")->base());
|
||||
}
|
||||
}
|
||||
if(m_type == SYS_FM77AV || m_type == SYS_FM77AV40EX || m_type == SYS_FM11)
|
||||
|
@ -893,7 +893,7 @@ void towns_state::mouse_timeout()
|
||||
READ8_MEMBER(towns_state::towns_padport_r)
|
||||
{
|
||||
UINT8 ret = 0x00;
|
||||
UINT32 porttype = space.machine().root_device().ioport("ctrltype")->read();
|
||||
UINT32 porttype = ioport("ctrltype")->read();
|
||||
UINT8 extra1;
|
||||
UINT8 extra2;
|
||||
UINT32 state;
|
||||
@ -902,12 +902,12 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
{
|
||||
if((porttype & 0x0f) == 0x01)
|
||||
{
|
||||
extra1 = space.machine().root_device().ioport("joy1_ex")->read();
|
||||
extra1 = ioport("joy1_ex")->read();
|
||||
|
||||
if(m_towns_pad_mask & 0x10)
|
||||
ret |= (space.machine().root_device().ioport("joy1")->read() & 0x3f) | 0x40;
|
||||
ret |= (ioport("joy1")->read() & 0x3f) | 0x40;
|
||||
else
|
||||
ret |= (space.machine().root_device().ioport("joy1")->read() & 0x0f) | 0x30;
|
||||
ret |= (ioport("joy1")->read() & 0x0f) | 0x30;
|
||||
|
||||
if(extra1 & 0x01) // Run button = left+right
|
||||
ret &= ~0x0c;
|
||||
@ -921,12 +921,12 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
}
|
||||
if((porttype & 0x0f) == 0x04) // 6-button joystick
|
||||
{
|
||||
extra1 = space.machine().root_device().ioport("6b_joy1_ex")->read();
|
||||
extra1 = ioport("6b_joy1_ex")->read();
|
||||
|
||||
if(m_towns_pad_mask & 0x10)
|
||||
ret |= 0x7f;
|
||||
else
|
||||
ret |= (space.machine().root_device().ioport("6b_joy1")->read() & 0x0f) | 0x70;
|
||||
ret |= (ioport("6b_joy1")->read() & 0x0f) | 0x70;
|
||||
|
||||
if(!(m_towns_pad_mask & 0x10))
|
||||
{
|
||||
@ -975,7 +975,7 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
}
|
||||
|
||||
// button states are always visible
|
||||
state = space.machine().root_device().ioport("mouse1")->read();
|
||||
state = ioport("mouse1")->read();
|
||||
if(!(state & 0x01))
|
||||
ret |= 0x10;
|
||||
if(!(state & 0x02))
|
||||
@ -989,12 +989,12 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
{
|
||||
if((porttype & 0xf0) == 0x10)
|
||||
{
|
||||
extra2 = space.machine().root_device().ioport("joy2_ex")->read();
|
||||
extra2 = ioport("joy2_ex")->read();
|
||||
|
||||
if(m_towns_pad_mask & 0x20)
|
||||
ret |= ((space.machine().root_device().ioport("joy2")->read() & 0x3f)) | 0x40;
|
||||
ret |= ((ioport("joy2")->read() & 0x3f)) | 0x40;
|
||||
else
|
||||
ret |= ((space.machine().root_device().ioport("joy2")->read() & 0x0f)) | 0x30;
|
||||
ret |= ((ioport("joy2")->read() & 0x0f)) | 0x30;
|
||||
|
||||
if(extra2 & 0x01)
|
||||
ret &= ~0x0c;
|
||||
@ -1008,12 +1008,12 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
}
|
||||
if((porttype & 0xf0) == 0x40) // 6-button joystick
|
||||
{
|
||||
extra2 = space.machine().root_device().ioport("6b_joy2_ex")->read();
|
||||
extra2 = ioport("6b_joy2_ex")->read();
|
||||
|
||||
if(m_towns_pad_mask & 0x20)
|
||||
ret |= 0x7f;
|
||||
else
|
||||
ret |= ((space.machine().root_device().ioport("6b_joy2")->read() & 0x0f)) | 0x70;
|
||||
ret |= ((ioport("6b_joy2")->read() & 0x0f)) | 0x70;
|
||||
|
||||
if(!(m_towns_pad_mask & 0x10))
|
||||
{
|
||||
@ -1062,7 +1062,7 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
}
|
||||
|
||||
// button states are always visible
|
||||
state = space.machine().root_device().ioport("mouse1")->read();
|
||||
state = ioport("mouse1")->read();
|
||||
if(!(state & 0x01))
|
||||
ret |= 0x10;
|
||||
if(!(state & 0x02))
|
||||
@ -1078,7 +1078,7 @@ READ8_MEMBER(towns_state::towns_padport_r)
|
||||
WRITE8_MEMBER(towns_state::towns_pad_mask_w)
|
||||
{
|
||||
UINT8 current_x,current_y;
|
||||
UINT32 type = space.machine().root_device().ioport("ctrltype")->read();
|
||||
UINT32 type = ioport("ctrltype")->read();
|
||||
|
||||
m_towns_pad_mask = (data & 0xff);
|
||||
if((type & 0x0f) == 0x02) // mouse
|
||||
@ -1088,8 +1088,8 @@ WRITE8_MEMBER(towns_state::towns_pad_mask_w)
|
||||
if(m_towns_mouse_output == MOUSE_START)
|
||||
{
|
||||
m_towns_mouse_output = MOUSE_X_HIGH;
|
||||
current_x = space.machine().root_device().ioport("mouse2")->read();
|
||||
current_y = space.machine().root_device().ioport("mouse3")->read();
|
||||
current_x = ioport("mouse2")->read();
|
||||
current_y = ioport("mouse3")->read();
|
||||
m_towns_mouse_x = m_prev_x - current_x;
|
||||
m_towns_mouse_y = m_prev_y - current_y;
|
||||
m_prev_x = current_x;
|
||||
@ -1104,8 +1104,8 @@ WRITE8_MEMBER(towns_state::towns_pad_mask_w)
|
||||
if(m_towns_mouse_output == MOUSE_START)
|
||||
{
|
||||
m_towns_mouse_output = MOUSE_SYNC;
|
||||
current_x = space.machine().root_device().ioport("mouse2")->read();
|
||||
current_y = space.machine().root_device().ioport("mouse3")->read();
|
||||
current_x = ioport("mouse2")->read();
|
||||
current_y = ioport("mouse3")->read();
|
||||
m_towns_mouse_x = m_prev_x - current_x;
|
||||
m_towns_mouse_y = m_prev_y - current_y;
|
||||
m_prev_x = current_x;
|
||||
@ -1124,8 +1124,8 @@ WRITE8_MEMBER(towns_state::towns_pad_mask_w)
|
||||
if(m_towns_mouse_output == MOUSE_START)
|
||||
{
|
||||
m_towns_mouse_output = MOUSE_X_HIGH;
|
||||
current_x = space.machine().root_device().ioport("mouse2")->read();
|
||||
current_y = space.machine().root_device().ioport("mouse3")->read();
|
||||
current_x = ioport("mouse2")->read();
|
||||
current_y = ioport("mouse3")->read();
|
||||
m_towns_mouse_x = m_prev_x - current_x;
|
||||
m_towns_mouse_y = m_prev_y - current_y;
|
||||
m_prev_x = current_x;
|
||||
@ -1140,8 +1140,8 @@ WRITE8_MEMBER(towns_state::towns_pad_mask_w)
|
||||
if(m_towns_mouse_output == MOUSE_START)
|
||||
{
|
||||
m_towns_mouse_output = MOUSE_SYNC;
|
||||
current_x = space.machine().root_device().ioport("mouse2")->read();
|
||||
current_y = space.machine().root_device().ioport("mouse3")->read();
|
||||
current_x = ioport("mouse2")->read();
|
||||
current_y = ioport("mouse3")->read();
|
||||
m_towns_mouse_x = m_prev_x - current_x;
|
||||
m_towns_mouse_y = m_prev_y - current_y;
|
||||
m_prev_x = current_x;
|
||||
|
@ -358,7 +358,7 @@ void fp1100_state::machine_reset()
|
||||
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
slot_type = (machine().root_device().ioport("SLOTS")->read() >> i*2) & 3;
|
||||
slot_type = (ioport("SLOTS")->read() >> i*2) & 3;
|
||||
m_slot[i].id = id_type[slot_type];
|
||||
}
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ GFXDECODE_END
|
||||
|
||||
void fp200_state::machine_start()
|
||||
{
|
||||
UINT8 *raw_gfx = machine().root_device().memregion("raw_gfx")->base();
|
||||
UINT8 *raw_gfx = memregion("raw_gfx")->base();
|
||||
m_chargen = memregion("chargen")->base();
|
||||
|
||||
for(int i=0;i<0x800;i++)
|
||||
|
@ -745,7 +745,7 @@ void geneve_state::machine_reset()
|
||||
|
||||
m_ready_line = m_ready_line1 = ASSERT_LINE;
|
||||
|
||||
m_peribox->set_genmod(machine().root_device().ioport("MODE")->read()==GENMOD);
|
||||
m_peribox->set_genmod(ioport("MODE")->read()==GENMOD);
|
||||
|
||||
m_joyport->write_port(0x01); // select Joystick 1
|
||||
}
|
||||
|
@ -94,12 +94,12 @@ static UINT32 s3c2440_gpio_port_r( device_t *device, int port, UINT32 mask)
|
||||
data = data & ~0x000000F2;
|
||||
// keys
|
||||
data |= 0x00F2;
|
||||
if ((port_c & 0x01) == 0) data &= ~device->machine().root_device().ioport( "PORTF-01")->read();
|
||||
if ((port_c & 0x02) == 0) data &= ~device->machine().root_device().ioport( "PORTF-02")->read();
|
||||
if ((port_c & 0x04) == 0) data &= ~device->machine().root_device().ioport( "PORTF-04")->read();
|
||||
if ((port_c & 0x08) == 0) data &= ~device->machine().root_device().ioport( "PORTF-08")->read();
|
||||
if ((port_c & 0x10) == 0) data &= ~device->machine().root_device().ioport( "PORTF-10")->read();
|
||||
data &= ~device->machine().root_device().ioport( "PORTF")->read();
|
||||
if ((port_c & 0x01) == 0) data &= ~gizmondo->ioport( "PORTF-01")->read();
|
||||
if ((port_c & 0x02) == 0) data &= ~gizmondo->ioport( "PORTF-02")->read();
|
||||
if ((port_c & 0x04) == 0) data &= ~gizmondo->ioport( "PORTF-04")->read();
|
||||
if ((port_c & 0x08) == 0) data &= ~gizmondo->ioport( "PORTF-08")->read();
|
||||
if ((port_c & 0x10) == 0) data &= ~gizmondo->ioport( "PORTF-10")->read();
|
||||
data &= ~gizmondo->ioport( "PORTF")->read();
|
||||
}
|
||||
break;
|
||||
case S3C2440_GPIO_PORT_G :
|
||||
@ -107,7 +107,7 @@ static UINT32 s3c2440_gpio_port_r( device_t *device, int port, UINT32 mask)
|
||||
data = data & ~0x00008001;
|
||||
// keys
|
||||
data = data | 0x8000;
|
||||
data &= ~device->machine().root_device().ioport( "PORTG")->read();
|
||||
data &= ~gizmondo->ioport( "PORTG")->read();
|
||||
// no sd card inserted
|
||||
data = data | 0x0001;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ WRITE32_MEMBER( gp2x_state::gp2x_lcdc_w )
|
||||
|
||||
READ32_MEMBER( gp2x_state::nand_r )
|
||||
{
|
||||
UINT32 *ROM = (UINT32 *)(*machine().root_device().memregion("maincpu"));
|
||||
UINT32 *ROM = (UINT32 *)(*memregion("maincpu"));
|
||||
UINT32 ret;
|
||||
|
||||
if (offset == 0)
|
||||
|
@ -302,7 +302,7 @@ MACHINE_RESET_MEMBER(hec2hrp_state,hec2hrp)
|
||||
MACHINE_START_MEMBER(hec2hrp_state,hec2hrx)
|
||||
/*****************************************************************************/
|
||||
{
|
||||
UINT8 *RAM = machine().root_device().memregion("maincpu" )->base(); // pointer to mess ram
|
||||
UINT8 *RAM = memregion("maincpu" )->base(); // pointer to mess ram
|
||||
//Patch rom possible !
|
||||
//RAMD2[0xff6b] = 0x0ff; // force verbose mode hector !
|
||||
|
||||
@ -315,13 +315,13 @@ MACHINE_START_MEMBER(hec2hrp_state,hec2hrx)
|
||||
|
||||
/******************************************************SPECIFIQUE MX ***************************/
|
||||
membank("bank2")->configure_entry(HECTORMX_BANK_PAGE0 , &RAM[0x0000] ); // Mess ram
|
||||
membank("bank2")->configure_entry(HECTORMX_BANK_PAGE1 , machine().root_device().memregion("page1")->base() ); // Rom page 1
|
||||
membank("bank2")->configure_entry(HECTORMX_BANK_PAGE2 , machine().root_device().memregion("page2")->base() ); // Rom page 2
|
||||
membank("bank2")->configure_entry(HECTORMX_BANK_PAGE1 , memregion("page1")->base() ); // Rom page 1
|
||||
membank("bank2")->configure_entry(HECTORMX_BANK_PAGE2 , memregion("page2")->base() ); // Rom page 2
|
||||
membank("bank2")->set_entry(HECTORMX_BANK_PAGE0);
|
||||
/******************************************************SPECIFIQUE MX ***************************/
|
||||
|
||||
/*************************************************SPECIFIQUE DISK II ***************************/
|
||||
membank("bank3")->configure_entry(DISCII_BANK_ROM , machine().root_device().memregion("rom_disc2")->base() ); // ROM
|
||||
membank("bank3")->configure_entry(DISCII_BANK_ROM , memregion("rom_disc2")->base() ); // ROM
|
||||
membank("bank3")->configure_entry(DISCII_BANK_RAM , memregion("disc2mem" )->base() ); // RAM
|
||||
membank("bank3")->set_entry(DISCII_BANK_ROM);
|
||||
/*************************************************SPECIFIQUE DISK II ***************************/
|
||||
@ -337,7 +337,7 @@ MACHINE_START_MEMBER(hec2hrp_state,hec2mdhrx)
|
||||
/*****************************************************************************/
|
||||
//minidisc
|
||||
{
|
||||
UINT8 *RAM = machine().root_device().memregion("maincpu" )->base(); // pointer to mess ram
|
||||
UINT8 *RAM = memregion("maincpu" )->base(); // pointer to mess ram
|
||||
|
||||
// Memory install for bank switching
|
||||
membank("bank1")->configure_entry(HECTOR_BANK_PROG , &RAM[0xc000] ); // Mess ram
|
||||
|
@ -200,13 +200,13 @@ static UINT32 s3c2410_gpio_port_r( device_t *device, int port, UINT32 mask)
|
||||
case S3C2410_GPIO_PORT_G :
|
||||
{
|
||||
data = data & ~0xFF00;
|
||||
if ((data & 0x02) == 0) data |= (device->machine().root_device().ioport( "ROW1")->read() << 8);
|
||||
if ((data & 0x04) == 0) data |= (device->machine().root_device().ioport( "ROW2")->read() << 8);
|
||||
if ((data & 0x08) == 0) data |= (device->machine().root_device().ioport( "ROW3")->read() << 8);
|
||||
if ((data & 0x10) == 0) data |= (device->machine().root_device().ioport( "ROW4")->read() << 8);
|
||||
if ((data & 0x20) == 0) data |= (device->machine().root_device().ioport( "ROW5")->read() << 8);
|
||||
if ((data & 0x40) == 0) data |= (device->machine().root_device().ioport( "ROW6")->read() << 8);
|
||||
if ((data & 0x80) == 0) data |= (device->machine().root_device().ioport( "ROW7")->read() << 8);
|
||||
if ((data & 0x02) == 0) data |= (hp49gp->ioport( "ROW1")->read() << 8);
|
||||
if ((data & 0x04) == 0) data |= (hp49gp->ioport( "ROW2")->read() << 8);
|
||||
if ((data & 0x08) == 0) data |= (hp49gp->ioport( "ROW3")->read() << 8);
|
||||
if ((data & 0x10) == 0) data |= (hp49gp->ioport( "ROW4")->read() << 8);
|
||||
if ((data & 0x20) == 0) data |= (hp49gp->ioport( "ROW5")->read() << 8);
|
||||
if ((data & 0x40) == 0) data |= (hp49gp->ioport( "ROW6")->read() << 8);
|
||||
if ((data & 0x80) == 0) data |= (hp49gp->ioport( "ROW7")->read() << 8);
|
||||
}
|
||||
break;
|
||||
case S3C2410_GPIO_PORT_H :
|
||||
@ -271,7 +271,7 @@ ADDRESS_MAP_END
|
||||
|
||||
DRIVER_INIT_MEMBER(hp49gp_state,hp49gp)
|
||||
{
|
||||
UINT8 *rom = (UINT8 *)machine().root_device().memregion( "maincpu")->base();
|
||||
UINT8 *rom = (UINT8 *)memregion( "maincpu")->base();
|
||||
memcpy( m_steppingstone, rom, 1024);
|
||||
lcd_spi_init();
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ static UINT32 s3c44b0_gpio_port_r( device_t *device, int port)
|
||||
case S3C44B0_GPIO_PORT_G :
|
||||
{
|
||||
data = 0x0000009F;
|
||||
data = (data & ~0x1F) | (device->machine().root_device().ioport( "PORTG")->read() & 0x1F);
|
||||
data = (data & ~0x1F) | (juicebox->ioport( "PORTG")->read() & 0x1F);
|
||||
#if defined(JUICEBOX_ENTER_DEBUG_MENU)
|
||||
if (juicebox->port_g_read_count++ < 1)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(jupiter2_state,jupiter)
|
||||
{
|
||||
UINT8 *rom = machine().root_device().memregion(MCM6571AP_TAG)->base();
|
||||
UINT8 *rom = memregion(MCM6571AP_TAG)->base();
|
||||
UINT8 inverted[0x1000];
|
||||
|
||||
memcpy(inverted, rom, 0x1000);
|
||||
@ -367,7 +367,7 @@ DRIVER_INIT_MEMBER(jupiter2_state,jupiter)
|
||||
|
||||
DRIVER_INIT_MEMBER(jupiter3_state,jupiter3)
|
||||
{
|
||||
UINT8 *rom = machine().root_device().memregion(Z80_TAG)->base();
|
||||
UINT8 *rom = memregion(Z80_TAG)->base();
|
||||
UINT8 inverted[0x1000];
|
||||
|
||||
memcpy(inverted, rom, 0x1000);
|
||||
|
@ -200,7 +200,7 @@ void lcmate2_state::palette_init()
|
||||
|
||||
void lcmate2_state::machine_start()
|
||||
{
|
||||
membank("rombank")->configure_entries(0, 0x10, (UINT8*)machine().root_device().memregion("maincpu")->base(), 0x4000);
|
||||
membank("rombank")->configure_entries(0, 0x10, (UINT8*)memregion("maincpu")->base(), 0x4000);
|
||||
}
|
||||
|
||||
static const gfx_layout lcmate2_charlayout =
|
||||
|
@ -141,7 +141,7 @@ static QUICKLOAD_LOAD( lynx )
|
||||
device_t *cpu = state->m_maincpu;
|
||||
address_space &space = state->m_maincpu->space(AS_PROGRAM);
|
||||
UINT8 *data = NULL;
|
||||
UINT8 *rom = image.device().machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *rom = state->memregion("maincpu")->base();
|
||||
UINT8 header[10]; // 80 08 dw Start dw Len B S 9 3
|
||||
UINT16 start, length;
|
||||
int i;
|
||||
|
@ -816,7 +816,7 @@ void m20_state::machine_start()
|
||||
|
||||
void m20_state::machine_reset()
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *ROM = memregion("maincpu")->base();
|
||||
UINT8 *RAM = (UINT8 *)(m_ram->pointer() + 0x4000);
|
||||
|
||||
if (m_memsize >= 256 * 1024)
|
||||
|
@ -143,7 +143,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mc80_state::mc8020_kbd)
|
||||
for (i = 1; i < 8; i++)
|
||||
{
|
||||
sprintf(kbdrow,"X%X", i);
|
||||
mem.write_word(0xd20+i, machine().root_device().ioport(kbdrow)->read());
|
||||
mem.write_word(0xd20+i, ioport(kbdrow)->read());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ DEVICE_IMAGE_LOAD_MEMBER( mekd2_state,mekd2_cart )
|
||||
static const char magic[] = "MEK6800D2";
|
||||
char buff[9];
|
||||
UINT16 addr, size;
|
||||
UINT8 ident, *RAM = image.device().machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 ident, *RAM = memregion("maincpu")->base();
|
||||
|
||||
image.fread( buff, sizeof (buff));
|
||||
if (memcmp(buff, magic, sizeof (buff)))
|
||||
|
@ -134,7 +134,7 @@ UINT32 mirage_state::screen_update_mirage(screen_device &screen, bitmap_rgb32 &b
|
||||
void mirage_state::machine_reset()
|
||||
{
|
||||
last_sndram_bank = 0;
|
||||
membank("sndbank")->set_base(machine().root_device().memregion("es5503")->base() );
|
||||
membank("sndbank")->set_base(memregion("es5503")->base() );
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( mirage_map, AS_PROGRAM, 8, mirage_state )
|
||||
|
@ -466,7 +466,7 @@ DRIVER_INIT_MEMBER(mmd1_state,mmd2)
|
||||
We preset all banks here, so that bankswitching will incur no speed penalty.
|
||||
0000/0400 indicate ROMs, D800/DC00/E400 indicate RAM, 8000 is a dummy write area for ROM banks.
|
||||
*/
|
||||
UINT8 *p_ram = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *p_ram = memregion("maincpu")->base();
|
||||
membank("bank1")->configure_entry(0, &p_ram[0x0000]);
|
||||
membank("bank1")->configure_entry(1, &p_ram[0xd800]);
|
||||
membank("bank1")->configure_entry(2, &p_ram[0x0c00]);
|
||||
|
@ -997,7 +997,7 @@ MACHINE_START_MEMBER(polgar_state,van32)
|
||||
// patch LCD delay loop on the 68030 machines until waitstates and/or opcode timings are fixed in MAME core
|
||||
// patches gen32 gen32_41 gen32_oc lond030
|
||||
|
||||
UINT8 *rom = machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *rom = memregion("maincpu")->base();
|
||||
|
||||
if(rom[0x870] == 0x0c && rom[0x871] == 0x78) {
|
||||
if (!strcmp(machine().system().name,"gen32_oc")) {
|
||||
|
@ -487,7 +487,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(multi8_state::keyboard_callback)
|
||||
{
|
||||
static const char *const portnames[3] = { "key1","key2","key3" };
|
||||
int i,port_i,scancode;
|
||||
UINT8 keymod = machine().root_device().ioport("key_modifiers")->read() & 0x1f;
|
||||
UINT8 keymod = ioport("key_modifiers")->read() & 0x1f;
|
||||
scancode = 0;
|
||||
|
||||
m_shift_press_flag = ((keymod & 0x02) >> 1);
|
||||
@ -496,7 +496,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(multi8_state::keyboard_callback)
|
||||
{
|
||||
for(i=0;i<32;i++)
|
||||
{
|
||||
if((machine().root_device().ioport(portnames[port_i])->read()>>i) & 1)
|
||||
if((ioport(portnames[port_i])->read()>>i) & 1)
|
||||
{
|
||||
//key_flag = 1;
|
||||
if(!m_shift_press_flag) // shift not pressed
|
||||
@ -648,8 +648,8 @@ static const ym2203_interface ym2203_config =
|
||||
|
||||
void multi8_state::machine_start()
|
||||
{
|
||||
m_p_vram = machine().root_device().memregion("vram")->base();
|
||||
m_p_wram = machine().root_device().memregion("wram")->base();
|
||||
m_p_vram = memregion("vram")->base();
|
||||
m_p_wram = memregion("wram")->base();
|
||||
m_p_kanji = memregion("kanji")->base();
|
||||
}
|
||||
|
||||
|
@ -478,7 +478,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mycom_state::mycom_kbd)
|
||||
UINT8 x, y, scancode = 0;
|
||||
UINT16 pressed[9];
|
||||
char kbdrow[3];
|
||||
UINT8 modifiers = machine().root_device().ioport("XX")->read();
|
||||
UINT8 modifiers = ioport("XX")->read();
|
||||
UINT8 shift_pressed = (modifiers & 2) >> 1;
|
||||
m_keyb_press_flag = 0;
|
||||
|
||||
@ -486,7 +486,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mycom_state::mycom_kbd)
|
||||
for (x = 0; x < 9; x++)
|
||||
{
|
||||
sprintf(kbdrow,"X%d",x);
|
||||
pressed[x] = (machine().root_device().ioport(kbdrow)->read());
|
||||
pressed[x] = (ioport(kbdrow)->read());
|
||||
}
|
||||
|
||||
/* find what has changed */
|
||||
|
@ -1809,7 +1809,7 @@ void mz2500_state::machine_reset()
|
||||
machine().device<beep_device>(BEEPER_TAG)->set_frequency(4096);
|
||||
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
|
||||
|
||||
// m_monitor_type = machine().root_device().ioport("DSW1")->read() & 0x40 ? 1 : 0;
|
||||
// m_monitor_type = ioport("DSW1")->read() & 0x40 ? 1 : 0;
|
||||
}
|
||||
|
||||
static const gfx_layout mz2500_cg_layout =
|
||||
@ -1966,16 +1966,16 @@ READ8_MEMBER(mz2500_state::mz2500_pio1_porta_r)
|
||||
|
||||
res = 0xff;
|
||||
for(i=0;i<0xe;i++)
|
||||
res &= machine().root_device().ioport(keynames[i])->read();
|
||||
res &= ioport(keynames[i])->read();
|
||||
|
||||
m_pio_latchb = res;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
m_pio_latchb = machine().root_device().ioport(keynames[m_key_mux & 0xf])->read();
|
||||
m_pio_latchb = ioport(keynames[m_key_mux & 0xf])->read();
|
||||
|
||||
return machine().root_device().ioport(keynames[m_key_mux & 0xf])->read();
|
||||
return ioport(keynames[m_key_mux & 0xf])->read();
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -490,9 +490,9 @@ READ8_MEMBER(mz3500_state::mz3500_io_r)
|
||||
switch(offset)
|
||||
{
|
||||
case 2:
|
||||
return ((machine().root_device().ioport("SYSTEM_DSW")->read() & 0x0f) << 1) | ((machine().root_device().ioport("FD_DSW")->read() & 0x8) >> 3);
|
||||
return ((ioport("SYSTEM_DSW")->read() & 0x0f) << 1) | ((ioport("FD_DSW")->read() & 0x8) >> 3);
|
||||
case 3:
|
||||
return ((machine().root_device().ioport("FD_DSW")->read() & 0x7)<<5) | (m_srdy << 4);
|
||||
return ((ioport("FD_DSW")->read() & 0x7)<<5) | (m_srdy << 4);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -177,7 +177,7 @@ DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart)
|
||||
{
|
||||
int i, length;
|
||||
n64_periphs *periphs = image.device().machine().device<n64_periphs>("rcp");
|
||||
UINT8 *cart = image.device().machine().root_device().memregion("user2")->base();
|
||||
UINT8 *cart = memregion("user2")->base();
|
||||
|
||||
if (image.software_entry() == NULL)
|
||||
{
|
||||
@ -230,7 +230,7 @@ DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart)
|
||||
UINT8 data[0x30800];
|
||||
battery_image->battery_load(data, 0x30800, 0x00);
|
||||
//memcpy(n64_sram, data, 0x20000);
|
||||
memcpy(image.device().machine().root_device().memshare("sram")->ptr(), data, 0x20000);
|
||||
memcpy(memshare("sram")->ptr(), data, 0x20000);
|
||||
memcpy(periphs->m_save_data.eeprom, data + 0x20000, 0x800);
|
||||
memcpy(periphs->m_save_data.mempak[0], data + 0x20800, 0x8000);
|
||||
memcpy(periphs->m_save_data.mempak[1], data + 0x28800, 0x8000);
|
||||
@ -250,7 +250,7 @@ MACHINE_START_MEMBER(n64_mess_state,n64dd)
|
||||
{
|
||||
machine_start();
|
||||
|
||||
UINT8 *ipl = machine().root_device().memregion("ddipl")->base();
|
||||
UINT8 *ipl = memregion("ddipl")->base();
|
||||
|
||||
for (int i = 0; i < 0x400000; i += 4)
|
||||
{
|
||||
@ -268,7 +268,7 @@ MACHINE_START_MEMBER(n64_mess_state,n64dd)
|
||||
INTERRUPT_GEN_MEMBER(n64_mess_state::n64_reset_poll)
|
||||
{
|
||||
n64_periphs *periphs = machine().device<n64_periphs>("rcp");
|
||||
periphs->poll_reset_button((machine().root_device().ioport("RESET")->read() & 1) ? true : false);
|
||||
periphs->poll_reset_button((ioport("RESET")->read() & 1) ? true : false);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( n64, n64_mess_state )
|
||||
|
@ -503,7 +503,7 @@ ADDRESS_MAP_END
|
||||
|
||||
INPUT_CHANGED_MEMBER(nakajies_state::trigger_irq)
|
||||
{
|
||||
UINT8 irqs = machine().root_device().ioport( "debug" )->read();
|
||||
UINT8 irqs = ioport( "debug" )->read();
|
||||
|
||||
m_irq_active |= irqs;
|
||||
nakajies_update_irqs(machine());
|
||||
|
@ -491,7 +491,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(nc_state::dummy_timer_callback)
|
||||
int inputport_10_state;
|
||||
int changed_bits;
|
||||
|
||||
inputport_10_state = machine().root_device().ioport("EXTRA")->read();
|
||||
inputport_10_state = ioport("EXTRA")->read();
|
||||
|
||||
changed_bits = inputport_10_state^m_previous_inputport_10_state;
|
||||
|
||||
|
@ -728,8 +728,8 @@ DEVICE_IMAGE_LOAD_MEMBER( ngp_state, ngp_cart )
|
||||
memcpy(cart, image.get_software_region("rom"), filesize);
|
||||
}
|
||||
|
||||
//printf("%2x%2x - %x - %x\n", (unsigned int) image.device().machine().root_device().memregion("cart")->u8(0x20), (unsigned int) image.device().machine().root_device().memregion("cart")->u8(0x21),
|
||||
// (unsigned int) image.device().machine().root_device().memregion("cart")->u8(0x22), (unsigned int) image.device().machine().root_device().memregion("cart")->u8(0x23));
|
||||
//printf("%2x%2x - %x - %x\n", (unsigned int) memregion("cart")->u8(0x20), (unsigned int) memregion("cart")->u8(0x21),
|
||||
// (unsigned int) memregion("cart")->u8(0x22), (unsigned int) memregion("cart")->u8(0x23));
|
||||
m_flash_chip[0].manufacturer_id = 0x98;
|
||||
switch( filesize )
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ static UINT32 s3c2410_gpio_port_r( device_t *device, int port, UINT32 mask)
|
||||
break;
|
||||
case S3C2410_GPIO_PORT_F :
|
||||
{
|
||||
data = (data & ~0xFF) | (device->machine().root_device().ioport( "PORT-F")->read() & 0xFF);
|
||||
data = (data & ~0xFF) | (state->ioport( "PORT-F")->read() & 0xFF);
|
||||
}
|
||||
break;
|
||||
case S3C2410_GPIO_PORT_G :
|
||||
@ -220,8 +220,8 @@ static READ32_DEVICE_HANDLER( s3c2410_adc_data_r )
|
||||
{
|
||||
case 0 + 0 : data = 0x2EE + (PALM_Z22_BATTERY_LEVEL * 0xFF / 100); break;
|
||||
case 0 + 1 : data = 0; break;
|
||||
case 2 + 0 : data = space.machine().root_device().ioport( "PENX")->read(); break;
|
||||
case 2 + 1 : data = 0x3FF - space.machine().root_device().ioport( "PENY")->read(); break;
|
||||
case 2 + 0 : data = state->ioport( "PENX")->read(); break;
|
||||
case 2 + 1 : data = 0x3FF - state->ioport( "PENY")->read(); break;
|
||||
}
|
||||
state->verboselog(5, "s3c2410_adc_data_r %08X\n", data);
|
||||
return data;
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
|
||||
void paso1600_state::video_start()
|
||||
{
|
||||
m_p_chargen = machine().root_device().memregion("chargen")->base();
|
||||
m_p_chargen = memregion("chargen")->base();
|
||||
m_p_pcg = memregion("pcg")->base();
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ void pasogo_state::palette_init()
|
||||
UINT32 pasogo_state::screen_update_pasogo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
//static int width=-1,height=-1;
|
||||
UINT8 *rom = machine().root_device().memregion("maincpu")->base()+0xb8000;
|
||||
UINT8 *rom = memregion("maincpu")->base()+0xb8000;
|
||||
static const UINT16 c[]={ 3, 0 };
|
||||
int x,y;
|
||||
// plot_box(bitmap, 0, 0, 64/*bitmap.width*/, bitmap.height, 0);
|
||||
@ -550,7 +550,7 @@ DRIVER_INIT_MEMBER(pasogo_state,pasogo)
|
||||
{
|
||||
vg230_init();
|
||||
memset(&m_ems, 0, sizeof(m_ems));
|
||||
membank( "bank27" )->set_base( machine().root_device().memregion("user1")->base() + 0x00000 );
|
||||
membank( "bank27" )->set_base( memregion("user1")->base() + 0x00000 );
|
||||
membank( "bank28" )->set_base( memregion("maincpu")->base() + 0xb8000/*?*/ );
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ VIDEO_START_MEMBER(pasopia7_state,pasopia7)
|
||||
|
||||
void pasopia7_state::draw_cg4_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
|
||||
{
|
||||
UINT8 *vram = machine().root_device().memregion("vram")->base();
|
||||
UINT8 *vram = memregion("vram")->base();
|
||||
int x,y,xi,yi;
|
||||
int count;
|
||||
|
||||
@ -168,7 +168,7 @@ void pasopia7_state::draw_cg4_screen(bitmap_ind16 &bitmap,const rectangle &clipr
|
||||
|
||||
void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
|
||||
{
|
||||
UINT8 *vram = machine().root_device().memregion("vram")->base();
|
||||
UINT8 *vram = memregion("vram")->base();
|
||||
UINT8 *gfx_data = memregion("font")->base();
|
||||
int x,y,xi,yi;
|
||||
int count;
|
||||
@ -226,7 +226,7 @@ void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &clipre
|
||||
|
||||
void pasopia7_state::draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width)
|
||||
{
|
||||
UINT8 *vram = machine().root_device().memregion("vram")->base();
|
||||
UINT8 *vram = memregion("vram")->base();
|
||||
UINT8 *gfx_data = memregion("font")->base();
|
||||
int x,y,xi,yi;
|
||||
int count;
|
||||
|
@ -305,11 +305,11 @@ WRITE16_MEMBER( pb1000_state::gatearray_w )
|
||||
m_gatearray[offset] = data&0xff;
|
||||
|
||||
if (m_gatearray[0])
|
||||
membank("bank1")->set_base(machine().root_device().memregion("card1")->base());
|
||||
membank("bank1")->set_base(memregion("card1")->base());
|
||||
else if (m_gatearray[1])
|
||||
membank("bank1")->set_base(machine().root_device().memregion("card2")->base());
|
||||
membank("bank1")->set_base(memregion("card2")->base());
|
||||
else
|
||||
membank("bank1")->set_base(machine().root_device().memregion("rom")->base());
|
||||
membank("bank1")->set_base(memregion("rom")->base());
|
||||
}
|
||||
|
||||
static void lcd_control(hd61700_cpu_device &device, UINT8 data)
|
||||
@ -491,7 +491,7 @@ TIMER_CALLBACK_MEMBER(pb1000_state::keyboard_timer)
|
||||
|
||||
void pb1000_state::machine_start()
|
||||
{
|
||||
membank("bank1")->set_base(machine().root_device().memregion("rom")->base());
|
||||
membank("bank1")->set_base(memregion("rom")->base());
|
||||
|
||||
m_kb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pb1000_state::keyboard_timer),this));
|
||||
m_kb_timer->adjust(attotime::from_hz(192), 0, attotime::from_hz(192));
|
||||
|
@ -423,7 +423,7 @@ static const struct pic8259_interface pc100_pic8259_config =
|
||||
void pc100_state::machine_start()
|
||||
{
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc100_state::pc100_irq_callback),this));
|
||||
m_kanji_rom = (UINT16 *)(*machine().root_device().memregion("kanji"));
|
||||
m_kanji_rom = (UINT16 *)(*memregion("kanji"));
|
||||
m_vram = (UINT16 *)(*memregion("vram"));
|
||||
}
|
||||
|
||||
|
@ -68,19 +68,19 @@ UINT8 pc1500_state::pc1500_kb_r(device_t *device)
|
||||
if (!device->started()) return 0;
|
||||
|
||||
if (!(state->m_kb_matrix & 0x01))
|
||||
data &= device->machine().root_device().ioport("KEY0")->read();
|
||||
data &= state->ioport("KEY0")->read();
|
||||
if (!(state->m_kb_matrix & 0x02))
|
||||
data &= device->machine().root_device().ioport("KEY1")->read();
|
||||
data &= state->ioport("KEY1")->read();
|
||||
if (!(state->m_kb_matrix & 0x04))
|
||||
data &= device->machine().root_device().ioport("KEY2")->read();
|
||||
data &= state->ioport("KEY2")->read();
|
||||
if (!(state->m_kb_matrix & 0x08))
|
||||
data &= device->machine().root_device().ioport("KEY3")->read();
|
||||
data &= state->ioport("KEY3")->read();
|
||||
if (!(state->m_kb_matrix & 0x10))
|
||||
data &= device->machine().root_device().ioport("KEY4")->read();
|
||||
data &= state->ioport("KEY4")->read();
|
||||
if (!(state->m_kb_matrix & 0x20))
|
||||
data &= device->machine().root_device().ioport("KEY5")->read();
|
||||
data &= state->ioport("KEY5")->read();
|
||||
if (!(state->m_kb_matrix & 0x40))
|
||||
data &= device->machine().root_device().ioport("KEY6")->read();
|
||||
data &= state->ioport("KEY6")->read();
|
||||
if (!(state->m_kb_matrix & 0x80))
|
||||
data &= state->ioport("KEY7")->read();
|
||||
|
||||
|
@ -1196,8 +1196,8 @@ WRITE8_MEMBER(pc8801_state::pc8801_ctrl_w)
|
||||
|
||||
if(m_mouse.phase == 0)
|
||||
{
|
||||
m_mouse.x = machine().root_device().ioport("MOUSEX")->read();
|
||||
m_mouse.y = machine().root_device().ioport("MOUSEY")->read();
|
||||
m_mouse.x = ioport("MOUSEX")->read();
|
||||
m_mouse.y = ioport("MOUSEY")->read();
|
||||
}
|
||||
|
||||
if(data & 0x40 && (new_time - m_mouse.time) > attotime::from_hz(900))
|
||||
@ -2515,15 +2515,15 @@ void pc8801_state::machine_reset()
|
||||
m_has_dictionary = 0;
|
||||
m_has_cdrom = 0;
|
||||
|
||||
m_extram_size = extram_type[machine().root_device().ioport("MEM")->read() & 0x0f];
|
||||
m_has_opna = machine().root_device().ioport("BOARD_CONFIG")->read() & 1;
|
||||
m_extram_size = extram_type[ioport("MEM")->read() & 0x0f];
|
||||
m_has_opna = ioport("BOARD_CONFIG")->read() & 1;
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(pc8801_state,pc8801_clock_speed)
|
||||
{
|
||||
pc8801_state::machine_reset();
|
||||
m_has_clock_speed = 1;
|
||||
m_clock_setting = machine().root_device().ioport("CFG")->read() & 0x80;
|
||||
m_clock_setting = ioport("CFG")->read() & 0x80;
|
||||
|
||||
m_maincpu->set_unscaled_clock(m_clock_setting ? XTAL_4MHz : XTAL_8MHz);
|
||||
m_fdccpu->set_unscaled_clock(m_clock_setting ? XTAL_4MHz : XTAL_8MHz); // correct?
|
||||
@ -2568,7 +2568,7 @@ void pc8801_state::fdc_irq_w(bool state)
|
||||
|
||||
READ8_MEMBER(pc8801_state::opn_porta_r)
|
||||
{
|
||||
if(machine().root_device().ioport("BOARD_CONFIG")->read() & 2)
|
||||
if(ioport("BOARD_CONFIG")->read() & 2)
|
||||
{
|
||||
UINT8 shift,res;
|
||||
|
||||
@ -2580,9 +2580,9 @@ READ8_MEMBER(pc8801_state::opn_porta_r)
|
||||
return ((res >> shift) & 0x0f) | 0xf0;
|
||||
}
|
||||
|
||||
return machine().root_device().ioport("OPN_PA")->read();
|
||||
return ioport("OPN_PA")->read();
|
||||
}
|
||||
READ8_MEMBER(pc8801_state::opn_portb_r){ return machine().root_device().ioport("OPN_PB")->read(); }
|
||||
READ8_MEMBER(pc8801_state::opn_portb_r){ return ioport("OPN_PB")->read(); }
|
||||
|
||||
static const ym2203_interface pc88_ym2203_intf =
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ UINT32 pc88va_state::calc_kanji_rom_addr(UINT8 jis1,UINT8 jis2,int x,int y)
|
||||
|
||||
void pc88va_state::draw_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT8 *tvram = machine().root_device().memregion("tvram")->base();
|
||||
UINT8 *tvram = memregion("tvram")->base();
|
||||
UINT8 *kanji = memregion("kanji")->base();
|
||||
int xi,yi;
|
||||
int x,y;
|
||||
@ -527,7 +527,7 @@ READ16_MEMBER(pc88va_state::sys_mem_r)
|
||||
return 0xffff;
|
||||
case 1: // TVRAM
|
||||
{
|
||||
UINT16 *tvram = (UINT16 *)(*machine().root_device().memregion("tvram"));
|
||||
UINT16 *tvram = (UINT16 *)(*memregion("tvram"));
|
||||
|
||||
if(((offset*2) & 0x30000) == 0)
|
||||
return tvram[offset];
|
||||
@ -536,14 +536,14 @@ READ16_MEMBER(pc88va_state::sys_mem_r)
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
UINT16 *gvram = (UINT16 *)(*machine().root_device().memregion("gvram"));
|
||||
UINT16 *gvram = (UINT16 *)(*memregion("gvram"));
|
||||
|
||||
return gvram[offset];
|
||||
}
|
||||
case 8: // kanji ROM
|
||||
case 9:
|
||||
{
|
||||
UINT16 *knj_ram = (UINT16 *)(*machine().root_device().memregion("kanji"));
|
||||
UINT16 *knj_ram = (UINT16 *)(*memregion("kanji"));
|
||||
UINT32 knj_offset;
|
||||
|
||||
knj_offset = (offset + (((m_bank_reg & 0x100) >> 8)*0x20000));
|
||||
@ -559,7 +559,7 @@ READ16_MEMBER(pc88va_state::sys_mem_r)
|
||||
case 0xc: // Dictionary ROM
|
||||
case 0xd:
|
||||
{
|
||||
UINT16 *dic_rom = (UINT16 *)(*machine().root_device().memregion("dictionary"));
|
||||
UINT16 *dic_rom = (UINT16 *)(*memregion("dictionary"));
|
||||
UINT32 dic_offset;
|
||||
|
||||
dic_offset = (offset + (((m_bank_reg & 0x100) >> 8)*0x20000));
|
||||
@ -579,7 +579,7 @@ WRITE16_MEMBER(pc88va_state::sys_mem_w)
|
||||
break;
|
||||
case 1: // TVRAM
|
||||
{
|
||||
UINT16 *tvram = (UINT16 *)(*machine().root_device().memregion("tvram"));
|
||||
UINT16 *tvram = (UINT16 *)(*memregion("tvram"));
|
||||
|
||||
if(((offset*2) & 0x30000) == 0)
|
||||
COMBINE_DATA(&tvram[offset]);
|
||||
@ -587,7 +587,7 @@ WRITE16_MEMBER(pc88va_state::sys_mem_w)
|
||||
break;
|
||||
case 4: // TVRAM
|
||||
{
|
||||
UINT16 *gvram = (UINT16 *)(*machine().root_device().memregion("gvram"));
|
||||
UINT16 *gvram = (UINT16 *)(*memregion("gvram"));
|
||||
|
||||
COMBINE_DATA(&gvram[offset]);
|
||||
}
|
||||
@ -595,7 +595,7 @@ WRITE16_MEMBER(pc88va_state::sys_mem_w)
|
||||
case 8: // kanji ROM, backup RAM at 0xb0000 - 0xb3fff
|
||||
case 9:
|
||||
{
|
||||
UINT16 *knj_ram = (UINT16 *)(*machine().root_device().memregion("kanji"));
|
||||
UINT16 *knj_ram = (UINT16 *)(*memregion("kanji"));
|
||||
UINT32 knj_offset;
|
||||
|
||||
knj_offset = ((offset) + (((m_bank_reg & 0x100) >> 8)*0x20000));
|
||||
@ -1170,7 +1170,7 @@ WRITE16_MEMBER(pc88va_state::video_pri_w)
|
||||
|
||||
READ8_MEMBER(pc88va_state::backupram_dsw_r)
|
||||
{
|
||||
UINT16 *knj_ram = (UINT16 *)(*machine().root_device().memregion("kanji"));
|
||||
UINT16 *knj_ram = (UINT16 *)(*memregion("kanji"));
|
||||
|
||||
if(offset == 0)
|
||||
return knj_ram[(0x50000 + 0x1fc2) / 2] & 0xff;
|
||||
@ -1568,11 +1568,11 @@ READ8_MEMBER(pc88va_state::r232_ctrl_porta_r)
|
||||
{
|
||||
UINT8 sw5, sw4, sw3, sw2,speed_sw;
|
||||
|
||||
speed_sw = (machine().root_device().ioport("SPEED_SW")->read() & 1) ? 0x20 : 0x00;
|
||||
sw5 = (machine().root_device().ioport("DSW")->read() & 0x10);
|
||||
sw4 = (machine().root_device().ioport("DSW")->read() & 0x08);
|
||||
sw3 = (machine().root_device().ioport("DSW")->read() & 0x04);
|
||||
sw2 = (machine().root_device().ioport("DSW")->read() & 0x02);
|
||||
speed_sw = (ioport("SPEED_SW")->read() & 1) ? 0x20 : 0x00;
|
||||
sw5 = (ioport("DSW")->read() & 0x10);
|
||||
sw4 = (ioport("DSW")->read() & 0x08);
|
||||
sw3 = (ioport("DSW")->read() & 0x04);
|
||||
sw2 = (ioport("DSW")->read() & 0x02);
|
||||
|
||||
return 0xc1 | sw5 | sw4 | sw3 | sw2 | speed_sw;
|
||||
}
|
||||
@ -1581,7 +1581,7 @@ READ8_MEMBER(pc88va_state::r232_ctrl_portb_r)
|
||||
{
|
||||
UINT8 xsw1;
|
||||
|
||||
xsw1 = (machine().root_device().ioport("DSW")->read() & 1) ? 0 : 8;
|
||||
xsw1 = (ioport("DSW")->read() & 1) ? 0 : 8;
|
||||
|
||||
return 0xf7 | xsw1;
|
||||
}
|
||||
@ -1673,7 +1673,7 @@ void pc88va_state::machine_start()
|
||||
|
||||
void pc88va_state::machine_reset()
|
||||
{
|
||||
UINT8 *ROM00 = machine().root_device().memregion("rom00")->base();
|
||||
UINT8 *ROM00 = memregion("rom00")->base();
|
||||
UINT8 *ROM10 = memregion("rom10")->base();
|
||||
|
||||
membank("rom10_bank")->set_base(&ROM10[0x00000]);
|
||||
|
@ -3103,9 +3103,9 @@ static I8237_INTERFACE( pc9801rs_dmac_intf )
|
||||
*
|
||||
****************************************/
|
||||
|
||||
READ8_MEMBER(pc9801_state::ppi_sys_porta_r){ return machine().root_device().ioport("DSW2")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_sys_portb_r){ return machine().root_device().ioport("DSW1")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_prn_portb_r){ return machine().root_device().ioport("DSW5")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_sys_porta_r){ return ioport("DSW2")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_sys_portb_r){ return ioport("DSW1")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_prn_portb_r){ return ioport("DSW5")->read(); }
|
||||
|
||||
WRITE8_MEMBER(pc9801_state::ppi_sys_portc_w)
|
||||
{
|
||||
@ -3186,8 +3186,8 @@ READ8_MEMBER(pc9801_state::ppi_mouse_porta_r)
|
||||
return res;
|
||||
}
|
||||
|
||||
READ8_MEMBER(pc9801_state::ppi_mouse_portb_r) { return machine().root_device().ioport("DSW3")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_mouse_portc_r) { return machine().root_device().ioport("DSW4")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_mouse_portb_r) { return ioport("DSW3")->read(); }
|
||||
READ8_MEMBER(pc9801_state::ppi_mouse_portc_r) { return ioport("DSW4")->read(); }
|
||||
|
||||
WRITE8_MEMBER(pc9801_state::ppi_mouse_porta_w)
|
||||
{
|
||||
@ -3452,17 +3452,17 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801f)
|
||||
{
|
||||
UINT8 op_mode;
|
||||
UINT8 *ROM;
|
||||
UINT8 *PRG = machine().root_device().memregion("fdc_data")->base();
|
||||
UINT8 *PRG = memregion("fdc_data")->base();
|
||||
int i;
|
||||
|
||||
ROM = machine().root_device().memregion("fdc_bios_2dd")->base();
|
||||
op_mode = (machine().root_device().ioport("ROM_LOAD")->read() & 2) >> 1;
|
||||
ROM = memregion("fdc_bios_2dd")->base();
|
||||
op_mode = (ioport("ROM_LOAD")->read() & 2) >> 1;
|
||||
|
||||
for(i=0;i<0x1000;i++)
|
||||
ROM[i] = PRG[i+op_mode*0x8000];
|
||||
|
||||
ROM = machine().root_device().memregion("fdc_bios_2hd")->base();
|
||||
op_mode = machine().root_device().ioport("ROM_LOAD")->read() & 1;
|
||||
ROM = memregion("fdc_bios_2hd")->base();
|
||||
op_mode = ioport("ROM_LOAD")->read() & 1;
|
||||
|
||||
for(i=0;i<0x1000;i++)
|
||||
ROM[i] = PRG[i+op_mode*0x8000+0x10000];
|
||||
@ -3478,7 +3478,7 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801rs)
|
||||
m_fdc_ctrl = 3;
|
||||
m_access_ctrl = 0;
|
||||
m_keyb_press = 0xff; // temp kludge, for PC-9821 booting
|
||||
// m_has_opna = machine().root_device().ioport("SOUND_CONFIG")->read() & 1;
|
||||
// m_has_opna = ioport("SOUND_CONFIG")->read() & 1;
|
||||
memset(m_work_ram, 0, sizeof(UINT8) * 0xa0000);
|
||||
}
|
||||
|
||||
@ -4069,10 +4069,10 @@ DRIVER_INIT_MEMBER(pc9801_state,pc9801_kanji)
|
||||
}
|
||||
UINT32 i,j,k;
|
||||
UINT32 pcg_tile;
|
||||
UINT8 *kanji = machine().root_device().memregion("kanji")->base();
|
||||
UINT8 *raw_kanji = machine().root_device().memregion("raw_kanji")->base();
|
||||
UINT8 *new_chargen = machine().root_device().memregion("new_chargen")->base();
|
||||
UINT8 *chargen = machine().root_device().memregion("chargen")->base();
|
||||
UINT8 *kanji = memregion("kanji")->base();
|
||||
UINT8 *raw_kanji = memregion("raw_kanji")->base();
|
||||
UINT8 *new_chargen = memregion("new_chargen")->base();
|
||||
UINT8 *chargen = memregion("chargen")->base();
|
||||
|
||||
/* Convert the ROM bitswap here from the original structure */
|
||||
/* TODO: kanji bitswap should be completely wrong, will check it out once that a dump is remade. */
|
||||
|
@ -851,7 +851,7 @@ void pce220_state::machine_start()
|
||||
membank("bank3")->configure_entries(0, 8, rom, 0x4000);
|
||||
membank("bank4")->configure_entries(0, 8, rom, 0x4000);
|
||||
|
||||
m_vram = (UINT8*)machine().root_device().memregion("lcd_vram")->base();
|
||||
m_vram = (UINT8*)memregion("lcd_vram")->base();
|
||||
|
||||
machine().device<nvram_device>("nvram")->set_base(ram, m_ram->size());
|
||||
}
|
||||
@ -866,7 +866,7 @@ void pcg850v_state::machine_start()
|
||||
membank("bank3")->configure_entries(0, 22, rom, 0x4000);
|
||||
membank("bank4")->configure_entries(0, 22, rom, 0x4000);
|
||||
|
||||
m_vram = (UINT8*)machine().root_device().memregion("lcd_vram")->base();
|
||||
m_vram = (UINT8*)memregion("lcd_vram")->base();
|
||||
machine().device<nvram_device>("nvram")->set_base(ram, m_ram->size());
|
||||
}
|
||||
|
||||
@ -876,7 +876,7 @@ void pce220_state::machine_reset()
|
||||
space.unmap_write(0x0000, 0x3fff);
|
||||
|
||||
// install the boot code into the first bank
|
||||
membank("bank1")->set_base(machine().root_device().memregion("user1")->base() + 0x0000);
|
||||
membank("bank1")->set_base(memregion("user1")->base() + 0x0000);
|
||||
|
||||
m_lcd_index_row = 0;
|
||||
m_lcd_index_col = 0;
|
||||
|
@ -121,7 +121,7 @@ TIMER_CALLBACK_MEMBER(pcfx_state::pad_func)
|
||||
{
|
||||
const char *const padnames[] = { "P1", "P2" };
|
||||
|
||||
m_pad.latch[param] = machine().root_device().ioport(padnames[param])->read();
|
||||
m_pad.latch[param] = ioport(padnames[param])->read();
|
||||
m_pad.status[param] |= 8;
|
||||
m_pad.ctrl[param] &= ~1; // ack TX line
|
||||
// TODO: pad IRQ
|
||||
|
@ -492,7 +492,7 @@ void pdp1_state::machine_reset()
|
||||
{
|
||||
int cfg;
|
||||
|
||||
cfg = machine().root_device().ioport("CFG")->read();
|
||||
cfg = ioport("CFG")->read();
|
||||
pdp1_reset_param.extend_support = (cfg >> pdp1_config_extend_bit) & pdp1_config_extend_mask;
|
||||
pdp1_reset_param.hw_mul_div = (cfg >> pdp1_config_hw_mul_div_bit) & pdp1_config_hw_mul_div_mask;
|
||||
pdp1_reset_param.type_20_sbs = (cfg >> pdp1_config_type_20_sbs_bit) & pdp1_config_type_20_sbs_mask;
|
||||
@ -650,7 +650,7 @@ void pdp1_state::machine_start()
|
||||
};
|
||||
|
||||
/* set up our font */
|
||||
dst = machine().root_device().memregion("gfx1")->base();
|
||||
dst = memregion("gfx1")->base();
|
||||
memcpy(dst, fontdata6x8, pdp1_fontdata_size);
|
||||
|
||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(pdp1_state::pdp1_machine_stop),this));
|
||||
@ -1805,7 +1805,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
int ta_transitions;
|
||||
|
||||
|
||||
m_maincpu->set_state_int(PDP1_SS, machine().root_device().ioport("SENSE")->read());
|
||||
m_maincpu->set_state_int(PDP1_SS, ioport("SENSE")->read());
|
||||
|
||||
/* read new state of control keys */
|
||||
control_keys = ioport("CSW")->read();
|
||||
@ -1900,7 +1900,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
|
||||
|
||||
/* handle test word keys */
|
||||
tw_keys = (machine().root_device().ioport("TWDMSB")->read() << 16) | machine().root_device().ioport("TWDLSB")->read();
|
||||
tw_keys = (ioport("TWDMSB")->read() << 16) | ioport("TWDLSB")->read();
|
||||
|
||||
/* compute transitions */
|
||||
tw_transitions = tw_keys & (~ m_old_tw_keys);
|
||||
@ -1913,7 +1913,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
|
||||
|
||||
/* handle address keys */
|
||||
ta_keys = machine().root_device().ioport("TSTADD")->read();
|
||||
ta_keys = ioport("TSTADD")->read();
|
||||
|
||||
/* compute transitions */
|
||||
ta_transitions = ta_keys & (~ m_old_ta_keys);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user