mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
modernized reset of pre/postload calls, just few legacy left (no whatsnew)
This commit is contained in:
parent
582ec9dce4
commit
9032bb6816
@ -971,11 +971,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::schaser_effect_555_cb)
|
||||
}
|
||||
|
||||
|
||||
static void schaser_reinit_555_time_remain(_8080bw_state *state)
|
||||
void _8080bw_state::schaser_reinit_555_time_remain()
|
||||
{
|
||||
address_space &space = state->m_maincpu->space(AS_PROGRAM);
|
||||
state->m_schaser_effect_555_time_remain = attotime::from_double(state->m_schaser_effect_555_time_remain_savable);
|
||||
state->schaser_sh_port_2_w(space, 0, state->m_port_2_last_extra);
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
m_schaser_effect_555_time_remain = attotime::from_double(m_schaser_effect_555_time_remain_savable);
|
||||
schaser_sh_port_2_w(space, 0, m_port_2_last_extra);
|
||||
}
|
||||
|
||||
|
||||
@ -985,7 +985,7 @@ MACHINE_START_MEMBER(_8080bw_state,schaser_sh)
|
||||
save_item(NAME(m_schaser_effect_555_is_low));
|
||||
save_item(NAME(m_schaser_effect_555_time_remain_savable));
|
||||
save_item(NAME(m_port_2_last_extra));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(schaser_reinit_555_time_remain), this));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(_8080bw_state::schaser_reinit_555_time_remain), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -454,12 +454,11 @@ WRITE8_MEMBER(astrocde_state::profpac_banksw_w)
|
||||
}
|
||||
|
||||
|
||||
static void profbank_banksw_restore(running_machine &machine)
|
||||
void astrocde_state::profbank_banksw_restore()
|
||||
{
|
||||
astrocde_state *state = machine.driver_data<astrocde_state>();
|
||||
address_space &space = machine.device("maincpu")->memory().space(AS_IO);
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_IO);
|
||||
|
||||
state->profpac_banksw_w(space, 0, state->m_profpac_bank);
|
||||
profpac_banksw_w(space, 0, m_profpac_bank);
|
||||
}
|
||||
|
||||
|
||||
@ -1791,7 +1790,7 @@ DRIVER_INIT_MEMBER(astrocde_state,profpac)
|
||||
|
||||
/* reset banking */
|
||||
profpac_banksw_w(iospace, 0, 0);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(profbank_banksw_restore), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(astrocde_state::profbank_banksw_restore), this));
|
||||
}
|
||||
|
||||
|
||||
@ -1807,7 +1806,7 @@ DRIVER_INIT_MEMBER(astrocde_state,demndrgn)
|
||||
|
||||
/* reset banking */
|
||||
profpac_banksw_w(iospace, 0, 0);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(profbank_banksw_restore), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(astrocde_state::profbank_banksw_restore), this));
|
||||
}
|
||||
|
||||
|
||||
@ -1828,7 +1827,7 @@ DRIVER_INIT_MEMBER(astrocde_state,tenpindx)
|
||||
|
||||
/* reset banking */
|
||||
profpac_banksw_w(iospace, 0, 0);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(profbank_banksw_restore), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(astrocde_state::profbank_banksw_restore), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,11 +94,9 @@ WRITE8_MEMBER(atetris_state::irq_ack_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void reset_bank(running_machine &machine)
|
||||
void atetris_state::reset_bank()
|
||||
{
|
||||
atetris_state *state = machine.driver_data<atetris_state>();
|
||||
|
||||
memcpy(state->m_slapstic_base, &state->m_slapstic_source[state->m_current_bank * 0x4000], 0x4000);
|
||||
memcpy(m_slapstic_base, &m_slapstic_source[m_current_bank * 0x4000], 0x4000);
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +108,7 @@ void atetris_state::machine_start()
|
||||
/* Set up save state */
|
||||
save_item(NAME(m_current_bank));
|
||||
save_item(NAME(m_nvram_write_enable));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_bank), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(atetris_state::reset_bank), this));
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +117,7 @@ void atetris_state::machine_reset()
|
||||
/* reset the slapstic */
|
||||
slapstic_reset();
|
||||
m_current_bank = slapstic_bank() & 1;
|
||||
reset_bank(machine());
|
||||
reset_bank();
|
||||
|
||||
/* start interrupts going (32V clocked by 16V) */
|
||||
m_interrupt_timer->adjust(machine().primary_screen->time_until_pos(48), 48);
|
||||
|
@ -127,7 +127,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start)
|
||||
{
|
||||
m_vblank_irq = 1;
|
||||
update_irq_state(machine());
|
||||
cave_get_sprite_info(machine());
|
||||
cave_get_sprite_info();
|
||||
m_agallet_vblank_irq = 1;
|
||||
machine().scheduler().timer_set(attotime::from_usec(2000), timer_expired_delegate(FUNC(cave_state::cave_vblank_end),this));
|
||||
}
|
||||
|
@ -195,6 +195,7 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(crystal_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(Timercb);
|
||||
IRQ_CALLBACK_MEMBER(icallback);
|
||||
void crystal_banksw_postload();
|
||||
};
|
||||
|
||||
static void IntReq( running_machine &machine, int num )
|
||||
@ -564,14 +565,12 @@ loop:
|
||||
#endif
|
||||
}
|
||||
|
||||
static void crystal_banksw_postload(running_machine &machine)
|
||||
void crystal_state::crystal_banksw_postload()
|
||||
{
|
||||
crystal_state *state = machine.driver_data<crystal_state>();
|
||||
|
||||
if (state->m_Bank <= 2)
|
||||
state->membank("bank1")->set_base(state->memregion("user1")->base() + state->m_Bank * 0x1000000);
|
||||
if (m_Bank <= 2)
|
||||
membank("bank1")->set_base(memregion("user1")->base() + m_Bank * 0x1000000);
|
||||
else
|
||||
state->membank("bank1")->set_base(state->memregion("user2")->base());
|
||||
membank("bank1")->set_base(memregion("user2")->base());
|
||||
}
|
||||
|
||||
void crystal_state::machine_start()
|
||||
@ -600,7 +599,7 @@ void crystal_state::machine_start()
|
||||
save_item(NAME(m_PIO));
|
||||
save_item(NAME(m_DMActrl));
|
||||
save_item(NAME(m_OldPort4));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(crystal_banksw_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(crystal_state::crystal_banksw_postload), this));
|
||||
}
|
||||
|
||||
void crystal_state::machine_reset()
|
||||
|
@ -820,10 +820,10 @@ static const tc0140syt_interface darius_tc0140syt_intf =
|
||||
"maincpu", "audiocpu"
|
||||
};
|
||||
|
||||
static void darius_postload(running_machine &machine)
|
||||
void darius_state::darius_postload()
|
||||
{
|
||||
parse_control(machine);
|
||||
reset_sound_region(machine);
|
||||
parse_control(machine());
|
||||
reset_sound_region(machine());
|
||||
}
|
||||
|
||||
void darius_state::machine_start()
|
||||
@ -872,7 +872,7 @@ void darius_state::machine_start()
|
||||
save_item(NAME(m_nmi_enable));
|
||||
save_item(NAME(m_vol));
|
||||
save_item(NAME(m_pan));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(darius_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(darius_state::darius_postload), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,10 +101,9 @@ WRITE32_MEMBER(djmain_state::paletteram32_w)
|
||||
|
||||
//---------
|
||||
|
||||
static void sndram_set_bank(running_machine &machine)
|
||||
void djmain_state::sndram_set_bank()
|
||||
{
|
||||
djmain_state *state = machine.driver_data<djmain_state>();
|
||||
state->m_sndram = state->memregion("shared")->base() + 0x80000 * state->m_sndram_bank;
|
||||
m_sndram = memregion("shared")->base() + 0x80000 * m_sndram_bank;
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(djmain_state::sndram_bank_w)
|
||||
@ -112,7 +111,7 @@ WRITE32_MEMBER(djmain_state::sndram_bank_w)
|
||||
if (ACCESSING_BITS_16_31)
|
||||
{
|
||||
m_sndram_bank = (data >> 16) & 0x1f;
|
||||
sndram_set_bank(machine());
|
||||
sndram_set_bank();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1409,7 +1408,7 @@ void djmain_state::machine_start()
|
||||
state_save_register_global(machine(), m_v_ctrl);
|
||||
state_save_register_global_array(machine(), m_obj_regs);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(sndram_set_bank), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(djmain_state::sndram_set_bank), this));
|
||||
}
|
||||
|
||||
|
||||
@ -1417,7 +1416,7 @@ void djmain_state::machine_reset()
|
||||
{
|
||||
/* reset sound ram bank */
|
||||
m_sndram_bank = 0;
|
||||
sndram_set_bank(machine());
|
||||
sndram_set_bank();
|
||||
|
||||
/* reset the IDE controller */
|
||||
machine().device("ide")->reset();
|
||||
|
@ -1351,11 +1351,10 @@ WRITE8_MEMBER(dynax_state::tenkai_palette_w)
|
||||
}
|
||||
}
|
||||
|
||||
static void tenkai_update_rombank( running_machine &machine )
|
||||
void dynax_state::tenkai_update_rombank()
|
||||
{
|
||||
dynax_state *state = machine.driver_data<dynax_state>();
|
||||
state->m_romptr = state->memregion("maincpu")->base() + 0x10000 + 0x8000 * state->m_rombank;
|
||||
// logerror("rombank = %02x\n", state->m_rombank);
|
||||
m_romptr = memregion("maincpu")->base() + 0x10000 + 0x8000 * m_rombank;
|
||||
// logerror("rombank = %02x\n", m_rombank);
|
||||
}
|
||||
|
||||
READ8_MEMBER(dynax_state::tenkai_p3_r)
|
||||
@ -1366,12 +1365,12 @@ READ8_MEMBER(dynax_state::tenkai_p3_r)
|
||||
WRITE8_MEMBER(dynax_state::tenkai_p3_w)
|
||||
{
|
||||
m_rombank = ((data & 0x04) << 1) | (m_rombank & 0x07);
|
||||
tenkai_update_rombank(machine());
|
||||
tenkai_update_rombank();
|
||||
}
|
||||
WRITE8_MEMBER(dynax_state::tenkai_p4_w)
|
||||
{
|
||||
m_rombank = (m_rombank & 0x08) | ((data & 0x0e) >> 1);
|
||||
tenkai_update_rombank(machine());
|
||||
tenkai_update_rombank();
|
||||
}
|
||||
|
||||
READ8_MEMBER(dynax_state::tenkai_p5_r)
|
||||
@ -1398,7 +1397,7 @@ WRITE8_MEMBER(dynax_state::tenkai_p7_w)
|
||||
WRITE8_MEMBER(dynax_state::tenkai_p8_w)
|
||||
{
|
||||
m_rombank = ((data & 0x08) << 1) | (m_rombank & 0x0f);
|
||||
tenkai_update_rombank(machine());
|
||||
tenkai_update_rombank();
|
||||
}
|
||||
|
||||
READ8_MEMBER(dynax_state::tenkai_p8_r)
|
||||
@ -4975,7 +4974,7 @@ MACHINE_START_MEMBER(dynax_state,tenkai)
|
||||
{
|
||||
MACHINE_START_CALL_MEMBER(dynax);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tenkai_update_rombank), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(dynax_state::tenkai_update_rombank), this));
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(dynax_state::tenkai_rtc_irq)
|
||||
@ -5036,18 +5035,16 @@ MACHINE_CONFIG_END
|
||||
Mahjong Gekisha
|
||||
***************************************************************************/
|
||||
|
||||
static void gekisha_bank_postload(running_machine &machine)
|
||||
void dynax_state::gekisha_bank_postload()
|
||||
{
|
||||
dynax_state *state = machine.driver_data<dynax_state>();
|
||||
|
||||
gekisha_set_rombank(machine, state->m_rombank);
|
||||
gekisha_set_rombank(machine(), m_rombank);
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(dynax_state,gekisha)
|
||||
{
|
||||
MACHINE_START_CALL_MEMBER(dynax);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(gekisha_bank_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(dynax_state::gekisha_bank_postload), this));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(dynax_state,gekisha)
|
||||
|
@ -361,7 +361,7 @@ UINT32 cps_state::screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitm
|
||||
layercontrol = m_cps_b_regs[m_layer_enable_reg / 2];
|
||||
|
||||
/* Get video memory base registers */
|
||||
cps1_get_video_base(machine());
|
||||
cps1_get_video_base();
|
||||
|
||||
/* Build palette */
|
||||
fcrash_build_palette(machine());
|
||||
|
@ -62,6 +62,7 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_mjsister(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(dac_callback);
|
||||
void mjsister_redraw();
|
||||
};
|
||||
|
||||
|
||||
@ -441,10 +442,10 @@ static const ay8910_interface ay8910_config =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void mjsister_redraw(mjsister_state *state)
|
||||
void mjsister_state::mjsister_redraw()
|
||||
{
|
||||
/* we can skip saving tmpbitmaps because we can redraw them from vram */
|
||||
state->m_screen_redraw = 1;
|
||||
m_screen_redraw = 1;
|
||||
}
|
||||
|
||||
void mjsister_state::machine_start()
|
||||
@ -469,7 +470,7 @@ void mjsister_state::machine_start()
|
||||
save_item(NAME(m_dac_bank));
|
||||
save_item(NAME(m_dac_adr_s));
|
||||
save_item(NAME(m_dac_adr_e));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(mjsister_redraw), this));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(mjsister_state::mjsister_redraw), this));
|
||||
}
|
||||
|
||||
void mjsister_state::machine_reset()
|
||||
|
@ -862,10 +862,9 @@ MACHINE_CONFIG_END
|
||||
/* schematic says 12.5 Hz, but R/C values shown give 8.5Hz */
|
||||
#define MAZE_555_B1_PERIOD PERIOD_OF_555_ASTABLE(RES_K(33) /* R200 */, RES_K(68) /* R201 */, CAP_U(1) /* C201 */)
|
||||
|
||||
static void maze_update_discrete(running_machine &machine)
|
||||
void mw8080bw_state::maze_update_discrete()
|
||||
{
|
||||
mw8080bw_state *state = machine.driver_data<mw8080bw_state>();
|
||||
maze_write_discrete(machine.device("discrete"), state->m_maze_tone_timing_state);
|
||||
maze_write_discrete(machine().device("discrete"), m_maze_tone_timing_state);
|
||||
}
|
||||
|
||||
|
||||
@ -886,7 +885,7 @@ MACHINE_START_MEMBER(mw8080bw_state,maze)
|
||||
|
||||
/* setup for save states */
|
||||
save_item(NAME(m_maze_tone_timing_state));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(maze_update_discrete), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(mw8080bw_state::maze_update_discrete), this));
|
||||
|
||||
MACHINE_START_CALL_MEMBER(mw8080bw);
|
||||
}
|
||||
|
@ -551,16 +551,15 @@ ADDRESS_MAP_END
|
||||
/**********************************************************************************/
|
||||
|
||||
|
||||
static void reset_sound_region(running_machine &machine)
|
||||
void mystwarr_state::reset_sound_region()
|
||||
{
|
||||
mystwarr_state *state = machine.driver_data<mystwarr_state>();
|
||||
state->membank("bank2")->set_base(state->memregion("soundcpu")->base() + 0x10000 + state->m_cur_sound_region*0x4000);
|
||||
membank("bank2")->set_base(memregion("soundcpu")->base() + 0x10000 + m_cur_sound_region*0x4000);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mystwarr_state::sound_bankswitch_w)
|
||||
{
|
||||
m_cur_sound_region = (data & 0xf);
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
/* sound memory maps
|
||||
@ -838,13 +837,13 @@ MACHINE_START_MEMBER(mystwarr_state,mystwarr)
|
||||
{
|
||||
/* set default bankswitch */
|
||||
m_cur_sound_region = 2;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
|
||||
m_mw_irq_control = 0;
|
||||
|
||||
state_save_register_global(machine(), m_mw_irq_control);
|
||||
state_save_register_global(machine(), m_cur_sound_region);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(mystwarr_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(mystwarr_state,mystwarr)
|
||||
|
@ -789,10 +789,10 @@ static const tc0140syt_interface ninjaw_tc0140syt_intf =
|
||||
};
|
||||
|
||||
|
||||
static void ninjaw_postload(running_machine &machine)
|
||||
void ninjaw_state::ninjaw_postload()
|
||||
{
|
||||
parse_control(machine);
|
||||
reset_sound_region(machine);
|
||||
parse_control(machine());
|
||||
reset_sound_region(machine());
|
||||
}
|
||||
|
||||
void ninjaw_state::machine_start()
|
||||
@ -819,7 +819,7 @@ void ninjaw_state::machine_start()
|
||||
save_item(NAME(m_cpua_ctrl));
|
||||
save_item(NAME(m_banknum));
|
||||
save_item(NAME(m_pandata));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(ninjaw_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(ninjaw_state::ninjaw_postload), this));
|
||||
}
|
||||
|
||||
void ninjaw_state::machine_reset()
|
||||
|
@ -383,17 +383,16 @@ WRITE16_MEMBER(othunder_state::othunder_lightgun_w)
|
||||
SOUND
|
||||
*****************************************/
|
||||
|
||||
static void reset_sound_region( running_machine &machine )
|
||||
void othunder_state::reset_sound_region()
|
||||
{
|
||||
othunder_state *state = machine.driver_data<othunder_state>();
|
||||
state->membank("bank10")->set_entry(state->m_banknum);
|
||||
membank("bank10")->set_entry(m_banknum);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(othunder_state::sound_bankswitch_w)
|
||||
{
|
||||
m_banknum = data & 7;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(othunder_state::othunder_sound_w)
|
||||
@ -685,7 +684,7 @@ void othunder_state::machine_start()
|
||||
save_item(NAME(m_ad_irq));
|
||||
save_item(NAME(m_banknum));
|
||||
save_item(NAME(m_pan));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(othunder_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
void othunder_state::machine_reset()
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
DECLARE_DRIVER_INIT(pengadvb);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
void pengadvb_postload();
|
||||
};
|
||||
|
||||
|
||||
@ -244,9 +245,9 @@ static TMS9928A_INTERFACE(pengadvb_tms9928a_interface)
|
||||
DEVCB_DRIVER_LINE_MEMBER(pengadvb_state,vdp_interrupt)
|
||||
};
|
||||
|
||||
static void pengadvb_postload(running_machine &machine)
|
||||
void pengadvb_state::pengadvb_postload()
|
||||
{
|
||||
mem_map_banks(machine);
|
||||
mem_map_banks(machine());
|
||||
}
|
||||
|
||||
void pengadvb_state::machine_start()
|
||||
@ -254,7 +255,7 @@ void pengadvb_state::machine_start()
|
||||
state_save_register_global_pointer(machine(), m_main_mem, 0x4000);
|
||||
state_save_register_global(machine(), m_mem_map);
|
||||
state_save_register_global_array(machine(), m_mem_banks);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(pengadvb_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(pengadvb_state::pengadvb_postload), this));
|
||||
}
|
||||
|
||||
void pengadvb_state::machine_reset()
|
||||
|
@ -938,10 +938,10 @@ ROM_START( hotdebut )
|
||||
ROM_END
|
||||
|
||||
|
||||
static void hotgmck_pcm_bank_postload(running_machine &machine)
|
||||
void psikyo4_state::hotgmck_pcm_bank_postload()
|
||||
{
|
||||
set_hotgmck_pcm_bank(machine, 0);
|
||||
set_hotgmck_pcm_bank(machine, 1);
|
||||
set_hotgmck_pcm_bank(machine(), 0);
|
||||
set_hotgmck_pcm_bank(machine(), 1);
|
||||
}
|
||||
|
||||
static void install_hotgmck_pcm_bank(running_machine &machine)
|
||||
@ -957,7 +957,7 @@ static void install_hotgmck_pcm_bank(running_machine &machine)
|
||||
set_hotgmck_pcm_bank(machine, 1);
|
||||
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x5800008, 0x580000b, write32_delegate(FUNC(psikyo4_state::hotgmck_pcm_bank_w),state));
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(hotgmck_pcm_bank_postload), &machine));
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(psikyo4_state::hotgmck_pcm_bank_postload), state));
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(psikyo4_state,hotgmck)
|
||||
|
@ -281,11 +281,10 @@ static const UINT8 kuniokun_xor_table[0x2a] =
|
||||
0x68, 0x60
|
||||
};
|
||||
|
||||
static void setbank(running_machine &machine)
|
||||
void renegade_state::setbank()
|
||||
{
|
||||
renegade_state *state = machine.driver_data<renegade_state>();
|
||||
UINT8 *RAM = state->memregion("maincpu")->base();
|
||||
state->membank("bank1")->set_base(&RAM[state->m_bank ? 0x10000 : 0x4000]);
|
||||
UINT8 *RAM = memregion("maincpu")->base();
|
||||
membank("bank1")->set_base(&RAM[m_bank ? 0x10000 : 0x4000]);
|
||||
}
|
||||
|
||||
void renegade_state::machine_start()
|
||||
@ -296,7 +295,7 @@ void renegade_state::machine_start()
|
||||
state_save_register_global(machine(), m_mcu_key);
|
||||
|
||||
state_save_register_global(machine(), m_bank);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(setbank), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(renegade_state::setbank), this));
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(renegade_state,renegade)
|
||||
@ -660,7 +659,7 @@ WRITE8_MEMBER(renegade_state::bankswitch_w)
|
||||
if ((data & 1) != m_bank)
|
||||
{
|
||||
m_bank = data & 1;
|
||||
setbank(machine());
|
||||
setbank();
|
||||
}
|
||||
}
|
||||
|
||||
@ -925,7 +924,7 @@ static const ym3526_interface ym3526_config =
|
||||
void renegade_state::machine_reset()
|
||||
{
|
||||
m_bank = 0;
|
||||
setbank(machine());
|
||||
setbank();
|
||||
}
|
||||
|
||||
|
||||
|
@ -238,23 +238,17 @@ WRITE16_MEMBER(slapshot_state::opwolf3_adc_req_w)
|
||||
SOUND
|
||||
*****************************************************/
|
||||
|
||||
static void reset_sound_region( running_machine &machine )
|
||||
void slapshot_state::reset_sound_region()
|
||||
{
|
||||
slapshot_state *state = machine.driver_data<slapshot_state>();
|
||||
state->membank("bank10")->set_entry(state->m_banknum);
|
||||
membank("bank10")->set_entry(m_banknum);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(slapshot_state::sound_bankswitch_w)
|
||||
{
|
||||
m_banknum = data & 7;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
WRITE16_MEMBER(slapshot_state::slapshot_msb_sound_w)
|
||||
{
|
||||
if (offset == 0)
|
||||
@ -532,7 +526,7 @@ void slapshot_state::machine_start()
|
||||
|
||||
m_banknum = 0;
|
||||
save_item(NAME(m_banknum));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(slapshot_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -607,10 +607,9 @@ READ8_MEMBER(taitof2_state::driveout_sound_command_r)
|
||||
}
|
||||
|
||||
|
||||
static void reset_driveout_sound_region( running_machine &machine )
|
||||
void taitof2_state::reset_driveout_sound_region()
|
||||
{
|
||||
taitof2_state *state = machine.driver_data<taitof2_state>();
|
||||
state->m_oki->set_bank_base(state->m_oki_bank * 0x40000);
|
||||
m_oki->set_bank_base(m_oki_bank * 0x40000);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taitof2_state::oki_bank_w)
|
||||
@ -620,7 +619,7 @@ WRITE8_MEMBER(taitof2_state::oki_bank_w)
|
||||
m_oki_bank = (data & 3);
|
||||
}
|
||||
|
||||
reset_driveout_sound_region(machine());
|
||||
reset_driveout_sound_region();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(taitof2_state::driveout_sound_command_w)
|
||||
@ -5373,7 +5372,7 @@ DRIVER_INIT_MEMBER(taitof2_state,driveout)
|
||||
save_item(NAME(m_driveout_sound_latch));
|
||||
save_item(NAME(m_oki_bank));
|
||||
save_item(NAME(m_nibble));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_driveout_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(taitof2_state::reset_driveout_sound_region), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -228,16 +228,15 @@ READ8_MEMBER(taitoh_state::syvalion_input_bypass_r)
|
||||
}
|
||||
}
|
||||
|
||||
static void reset_sound_region(running_machine &machine)
|
||||
void taitoh_state::reset_sound_region()
|
||||
{
|
||||
taitoh_state *state = machine.driver_data<taitoh_state>();
|
||||
state->membank("bank1")->set_entry(state->m_banknum);
|
||||
membank("bank1")->set_entry(m_banknum);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taitoh_state::sound_bankswitch_w)
|
||||
{
|
||||
m_banknum = data & 3;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
|
||||
@ -532,7 +531,7 @@ void taitoh_state::machine_start()
|
||||
m_tc0080vco = machine().device("tc0080vco");
|
||||
|
||||
save_item(NAME(m_banknum));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(taitoh_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -337,6 +337,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
|
||||
DECLARE_DRIVER_INIT(kyustrkr);
|
||||
DECLARE_MACHINE_START(taitox);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
||||
READ16_MEMBER(taitox_state::superman_dsw_input_r)
|
||||
@ -412,17 +413,15 @@ WRITE16_MEMBER(taitox_state::kyustrkr_input_w)
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
static void reset_sound_region(running_machine &machine)
|
||||
void taitox_state::reset_sound_region()
|
||||
{
|
||||
taitox_state *state = machine.driver_data<taitox_state>();
|
||||
|
||||
state->membank("bank2")->set_base(state->memregion("audiocpu")->base() + (state->m_banknum * 0x4000) + 0x10000 );
|
||||
membank("bank2")->set_base(memregion("audiocpu")->base() + (m_banknum * 0x4000) + 0x10000 );
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taitox_state::sound_bankswitch_w)
|
||||
{
|
||||
m_banknum = (data - 1) & 3;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
|
||||
@ -806,7 +805,7 @@ MACHINE_START_MEMBER(taitox_state,taitox)
|
||||
{
|
||||
m_banknum = -1;
|
||||
save_item(NAME(m_banknum));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(taitox_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
static const tc0140syt_interface taitox_tc0140syt_intf =
|
||||
|
@ -3025,10 +3025,10 @@ static const tc0140syt_interface taitoz_tc0140syt_intf =
|
||||
SAVE STATES
|
||||
***********************************************************/
|
||||
|
||||
static void taitoz_postload(running_machine &machine)
|
||||
void taitoz_state::taitoz_postload()
|
||||
{
|
||||
parse_cpu_control(machine);
|
||||
reset_sound_region(machine);
|
||||
parse_cpu_control(machine());
|
||||
reset_sound_region(machine());
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(taitoz_state,bshark)
|
||||
@ -3058,7 +3058,7 @@ MACHINE_START_MEMBER(taitoz_state,taitoz)
|
||||
|
||||
machine().root_device().membank("bank10")->configure_entries(0, banks, machine().root_device().memregion("audiocpu")->base() + 0xc000, 0x4000);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(taitoz_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(taitoz_state::taitoz_postload), this));
|
||||
|
||||
MACHINE_START_CALL_MEMBER(bshark);
|
||||
}
|
||||
|
@ -371,16 +371,15 @@ READ16_MEMBER(taitoair_state::stick2_input_r)
|
||||
|
||||
|
||||
|
||||
static void reset_sound_region( running_machine &machine )
|
||||
void taitoair_state::reset_sound_region()
|
||||
{
|
||||
taitoair_state *state = machine.driver_data<taitoair_state>();
|
||||
state->membank("bank1")->set_entry(state->m_banknum);
|
||||
membank("bank1")->set_entry(m_banknum);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taitoair_state::sound_bankswitch_w)
|
||||
{
|
||||
m_banknum = data & 3;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
|
||||
@ -682,7 +681,7 @@ void taitoair_state::machine_start()
|
||||
state_save_register_item(machine(), "globals", NULL, i, m_q.p[i].y);
|
||||
}
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(taitoair_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
void taitoair_state::machine_reset()
|
||||
|
@ -672,10 +672,10 @@ static const msm5205_interface msm5205_config_2 =
|
||||
MACHINE DRIVERS
|
||||
***********************************************************/
|
||||
|
||||
static void topspeed_postload(running_machine &machine)
|
||||
void topspeed_state::topspeed_postload()
|
||||
{
|
||||
parse_control(machine);
|
||||
reset_sound_region(machine);
|
||||
parse_control(machine());
|
||||
reset_sound_region(machine());
|
||||
}
|
||||
|
||||
void topspeed_state::machine_start()
|
||||
@ -697,7 +697,7 @@ void topspeed_state::machine_start()
|
||||
save_item(NAME(m_cpua_ctrl));
|
||||
save_item(NAME(m_ioc220_port));
|
||||
save_item(NAME(m_banknum));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(topspeed_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(topspeed_state::topspeed_postload), this));
|
||||
}
|
||||
|
||||
void topspeed_state::machine_reset()
|
||||
|
@ -504,21 +504,10 @@ public:
|
||||
virtual void machine_reset();
|
||||
UINT32 screen_update_vegas(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(nile_timer_callback);
|
||||
void remap_dynamic_addresses();
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Prototypes
|
||||
*
|
||||
*************************************/
|
||||
|
||||
|
||||
static void remap_dynamic_addresses(running_machine &machine);
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video start and update
|
||||
@ -576,7 +565,7 @@ void vegas_state::machine_start()
|
||||
state_save_register_global(machine(), m_sio_led_state);
|
||||
state_save_register_global(machine(), m_pending_analog_read);
|
||||
state_save_register_global(machine(), m_cmos_unlocked);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(remap_dynamic_addresses), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(vegas_state::remap_dynamic_addresses), this));
|
||||
}
|
||||
|
||||
|
||||
@ -732,17 +721,17 @@ static WRITE32_HANDLER( pci_ide_w )
|
||||
{
|
||||
case 0x04: /* address register */
|
||||
state->m_pci_ide_regs[offset] &= 0xfffffff0;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
break;
|
||||
|
||||
case 0x05: /* address register */
|
||||
state->m_pci_ide_regs[offset] &= 0xfffffffc;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
break;
|
||||
|
||||
case 0x08: /* address register */
|
||||
state->m_pci_ide_regs[offset] &= 0xfffffff0;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
break;
|
||||
|
||||
case 0x14: /* interrupt pending */
|
||||
@ -810,14 +799,14 @@ static WRITE32_HANDLER( pci_3dfx_w )
|
||||
state->m_pci_3dfx_regs[offset] &= 0xff000000;
|
||||
else
|
||||
state->m_pci_3dfx_regs[offset] &= 0xfe000000;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
break;
|
||||
|
||||
case 0x05: /* address register */
|
||||
if (voodoo_type >= TYPE_VOODOO_BANSHEE)
|
||||
{
|
||||
state->m_pci_3dfx_regs[offset] &= 0xfe000000;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -825,7 +814,7 @@ static WRITE32_HANDLER( pci_3dfx_w )
|
||||
if (voodoo_type >= TYPE_VOODOO_BANSHEE)
|
||||
{
|
||||
state->m_pci_3dfx_regs[offset] &= 0xffffff00;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -833,7 +822,7 @@ static WRITE32_HANDLER( pci_3dfx_w )
|
||||
if (voodoo_type >= TYPE_VOODOO_BANSHEE)
|
||||
{
|
||||
state->m_pci_3dfx_regs[offset] &= 0xffff0000;
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1127,7 +1116,7 @@ static WRITE32_HANDLER( nile_w )
|
||||
|
||||
case NREG_PCIINIT1+0: /* PCI master */
|
||||
if (((olddata & 0xe) == 0xa) != ((state->m_nile_regs[offset] & 0xe) == 0xa))
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
logit = 0;
|
||||
break;
|
||||
|
||||
@ -1215,7 +1204,7 @@ static WRITE32_HANDLER( nile_w )
|
||||
case NREG_DCS8:
|
||||
case NREG_PCIW0:
|
||||
case NREG_PCIW1:
|
||||
remap_dynamic_addresses(space.machine());
|
||||
state->remap_dynamic_addresses();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1552,87 +1541,86 @@ INLINE void _add_dynamic_device_address(vegas_state *state, device_t *device, of
|
||||
}
|
||||
|
||||
|
||||
static void remap_dynamic_addresses(running_machine &machine)
|
||||
void vegas_state::remap_dynamic_addresses()
|
||||
{
|
||||
vegas_state *state = machine.driver_data<vegas_state>();
|
||||
dynamic_address *dynamic = state->m_dynamic;
|
||||
device_t *ethernet = machine.device("ethernet");
|
||||
device_t *ide = machine.device("ide");
|
||||
int voodoo_type = voodoo_get_type(state->m_voodoo);
|
||||
dynamic_address *dynamic = m_dynamic;
|
||||
device_t *ethernet = machine().device("ethernet");
|
||||
device_t *ide = machine().device("ide");
|
||||
int voodoo_type = voodoo_get_type(m_voodoo);
|
||||
offs_t base;
|
||||
int addr;
|
||||
|
||||
/* unmap everything we know about */
|
||||
for (addr = 0; addr < state->m_dynamic_count; addr++)
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).unmap_readwrite(dynamic[addr].start, dynamic[addr].end);
|
||||
for (addr = 0; addr < m_dynamic_count; addr++)
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).unmap_readwrite(dynamic[addr].start, dynamic[addr].end);
|
||||
|
||||
/* the build the list of stuff */
|
||||
state->m_dynamic_count = 0;
|
||||
m_dynamic_count = 0;
|
||||
|
||||
/* DCS2 */
|
||||
base = state->m_nile_regs[NREG_DCS2] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
base = m_nile_regs[NREG_DCS2] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
{
|
||||
add_dynamic_address(state, base + 0x0000, base + 0x0003, sio_irq_clear_r, sio_irq_clear_w);
|
||||
add_dynamic_address(state, base + 0x1000, base + 0x1003, sio_irq_enable_r, sio_irq_enable_w);
|
||||
add_dynamic_address(state, base + 0x2000, base + 0x2003, sio_irq_cause_r, NULL);
|
||||
add_dynamic_address(state, base + 0x3000, base + 0x3003, sio_irq_status_r, NULL);
|
||||
add_dynamic_address(state, base + 0x4000, base + 0x4003, sio_led_r, sio_led_w);
|
||||
add_dynamic_address(state, base + 0x5000, base + 0x5007, NOP_HANDLER, NULL);
|
||||
add_dynamic_address(state, base + 0x6000, base + 0x6003, NULL, cmos_unlock_w);
|
||||
add_dynamic_address(state, base + 0x7000, base + 0x7003, NULL, vegas_watchdog_w);
|
||||
add_dynamic_address(this, base + 0x0000, base + 0x0003, sio_irq_clear_r, sio_irq_clear_w);
|
||||
add_dynamic_address(this, base + 0x1000, base + 0x1003, sio_irq_enable_r, sio_irq_enable_w);
|
||||
add_dynamic_address(this, base + 0x2000, base + 0x2003, sio_irq_cause_r, NULL);
|
||||
add_dynamic_address(this, base + 0x3000, base + 0x3003, sio_irq_status_r, NULL);
|
||||
add_dynamic_address(this, base + 0x4000, base + 0x4003, sio_led_r, sio_led_w);
|
||||
add_dynamic_address(this, base + 0x5000, base + 0x5007, NOP_HANDLER, NULL);
|
||||
add_dynamic_address(this, base + 0x6000, base + 0x6003, NULL, cmos_unlock_w);
|
||||
add_dynamic_address(this, base + 0x7000, base + 0x7003, NULL, vegas_watchdog_w);
|
||||
}
|
||||
|
||||
/* DCS3 */
|
||||
base = state->m_nile_regs[NREG_DCS3] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
add_dynamic_address(state, base + 0x0000, base + 0x0003, analog_port_r, analog_port_w);
|
||||
base = m_nile_regs[NREG_DCS3] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
add_dynamic_address(this, base + 0x0000, base + 0x0003, analog_port_r, analog_port_w);
|
||||
|
||||
/* DCS4 */
|
||||
base = state->m_nile_regs[NREG_DCS4] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
add_dynamic_address(state, base + 0x0000, base + 0x7fff, timekeeper_r, timekeeper_w);
|
||||
base = m_nile_regs[NREG_DCS4] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
add_dynamic_address(this, base + 0x0000, base + 0x7fff, timekeeper_r, timekeeper_w);
|
||||
|
||||
/* DCS5 */
|
||||
base = state->m_nile_regs[NREG_DCS5] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
add_dynamic_address(state, base + 0x0000, base + 0x0003, sio_r, sio_w);
|
||||
base = m_nile_regs[NREG_DCS5] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
add_dynamic_address(this, base + 0x0000, base + 0x0003, sio_r, sio_w);
|
||||
|
||||
/* DCS6 */
|
||||
base = state->m_nile_regs[NREG_DCS6] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
base = m_nile_regs[NREG_DCS6] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
{
|
||||
add_dynamic_address(state, base + 0x0000, base + 0x003f, midway_ioasic_packed_r, midway_ioasic_packed_w);
|
||||
add_dynamic_address(state, base + 0x1000, base + 0x1003, NULL, asic_fifo_w);
|
||||
if (state->m_dcs_idma_cs != 0)
|
||||
add_dynamic_address(state, base + 0x3000, base + 0x3003, NULL, dcs3_fifo_full_w);
|
||||
if (state->m_dcs_idma_cs == 6)
|
||||
add_dynamic_address(this, base + 0x0000, base + 0x003f, midway_ioasic_packed_r, midway_ioasic_packed_w);
|
||||
add_dynamic_address(this, base + 0x1000, base + 0x1003, NULL, asic_fifo_w);
|
||||
if (m_dcs_idma_cs != 0)
|
||||
add_dynamic_address(this, base + 0x3000, base + 0x3003, NULL, dcs3_fifo_full_w);
|
||||
if (m_dcs_idma_cs == 6)
|
||||
{
|
||||
add_dynamic_address(state, base + 0x5000, base + 0x5003, NULL, dsio_idma_addr_w);
|
||||
add_dynamic_address(state, base + 0x7000, base + 0x7003, dsio_idma_data_r, dsio_idma_data_w);
|
||||
add_dynamic_address(this, base + 0x5000, base + 0x5003, NULL, dsio_idma_addr_w);
|
||||
add_dynamic_address(this, base + 0x7000, base + 0x7003, dsio_idma_data_r, dsio_idma_data_w);
|
||||
}
|
||||
}
|
||||
|
||||
/* DCS7 */
|
||||
base = state->m_nile_regs[NREG_DCS7] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
base = m_nile_regs[NREG_DCS7] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
{
|
||||
add_dynamic_device_address(state, ethernet, base + 0x1000, base + 0x100f, ethernet_r, ethernet_w);
|
||||
if (state->m_dcs_idma_cs == 7)
|
||||
add_dynamic_device_address(this, ethernet, base + 0x1000, base + 0x100f, ethernet_r, ethernet_w);
|
||||
if (m_dcs_idma_cs == 7)
|
||||
{
|
||||
add_dynamic_address(state, base + 0x5000, base + 0x5003, NULL, dsio_idma_addr_w);
|
||||
add_dynamic_address(state, base + 0x7000, base + 0x7003, dsio_idma_data_r, dsio_idma_data_w);
|
||||
add_dynamic_address(this, base + 0x5000, base + 0x5003, NULL, dsio_idma_addr_w);
|
||||
add_dynamic_address(this, base + 0x7000, base + 0x7003, dsio_idma_data_r, dsio_idma_data_w);
|
||||
}
|
||||
}
|
||||
|
||||
/* PCI config space */
|
||||
if ((state->m_nile_regs[NREG_PCIINIT1] & 0xe) == 0xa)
|
||||
if ((m_nile_regs[NREG_PCIINIT1] & 0xe) == 0xa)
|
||||
{
|
||||
base = state->m_nile_regs[NREG_PCIW1] & 0x1fffff00;
|
||||
if (base >= state->m_rambase.bytes())
|
||||
base = m_nile_regs[NREG_PCIW1] & 0x1fffff00;
|
||||
if (base >= m_rambase.bytes())
|
||||
{
|
||||
add_dynamic_address(state, base + (1 << (21 + 4)) + 0x0000, base + (1 << (21 + 4)) + 0x00ff, pci_3dfx_r, pci_3dfx_w);
|
||||
add_dynamic_address(state, base + (1 << (21 + 5)) + 0x0000, base + (1 << (21 + 5)) + 0x00ff, pci_ide_r, pci_ide_w);
|
||||
add_dynamic_address(this, base + (1 << (21 + 4)) + 0x0000, base + (1 << (21 + 4)) + 0x00ff, pci_3dfx_r, pci_3dfx_w);
|
||||
add_dynamic_address(this, base + (1 << (21 + 5)) + 0x0000, base + (1 << (21 + 5)) + 0x00ff, pci_ide_r, pci_ide_w);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1640,48 +1628,48 @@ static void remap_dynamic_addresses(running_machine &machine)
|
||||
else
|
||||
{
|
||||
/* IDE controller */
|
||||
base = state->m_pci_ide_regs[0x04] & 0xfffffff0;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(state, ide, base + 0x0000, base + 0x000f, ide_main_r, ide_main_w);
|
||||
base = m_pci_ide_regs[0x04] & 0xfffffff0;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(this, ide, base + 0x0000, base + 0x000f, ide_main_r, ide_main_w);
|
||||
|
||||
base = state->m_pci_ide_regs[0x05] & 0xfffffffc;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(state, ide, base + 0x0000, base + 0x0003, ide_alt_r, ide_alt_w);
|
||||
base = m_pci_ide_regs[0x05] & 0xfffffffc;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(this, ide, base + 0x0000, base + 0x0003, ide_alt_r, ide_alt_w);
|
||||
|
||||
base = state->m_pci_ide_regs[0x08] & 0xfffffff0;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(state, ide, base + 0x0000, base + 0x0007, ide_bus_master32_r, ide_bus_master32_w);
|
||||
base = m_pci_ide_regs[0x08] & 0xfffffff0;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(this, ide, base + 0x0000, base + 0x0007, ide_bus_master32_r, ide_bus_master32_w);
|
||||
|
||||
/* 3dfx card */
|
||||
base = state->m_pci_3dfx_regs[0x04] & 0xfffffff0;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
base = m_pci_3dfx_regs[0x04] & 0xfffffff0;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
{
|
||||
if (voodoo_type == TYPE_VOODOO_2)
|
||||
add_dynamic_device_address(state, state->m_voodoo, base + 0x000000, base + 0xffffff, voodoo_r, voodoo_w);
|
||||
add_dynamic_device_address(this, m_voodoo, base + 0x000000, base + 0xffffff, voodoo_r, voodoo_w);
|
||||
else
|
||||
add_dynamic_device_address(state, state->m_voodoo, base + 0x000000, base + 0x1ffffff, banshee_r, banshee_w);
|
||||
add_dynamic_device_address(this, m_voodoo, base + 0x000000, base + 0x1ffffff, banshee_r, banshee_w);
|
||||
}
|
||||
|
||||
if (voodoo_type >= TYPE_VOODOO_BANSHEE)
|
||||
{
|
||||
base = state->m_pci_3dfx_regs[0x05] & 0xfffffff0;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(state, state->m_voodoo, base + 0x0000000, base + 0x1ffffff, banshee_fb_r, banshee_fb_w);
|
||||
base = m_pci_3dfx_regs[0x05] & 0xfffffff0;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(this, m_voodoo, base + 0x0000000, base + 0x1ffffff, banshee_fb_r, banshee_fb_w);
|
||||
|
||||
base = state->m_pci_3dfx_regs[0x06] & 0xfffffff0;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(state, state->m_voodoo, base + 0x0000000, base + 0x00000ff, banshee_io_r, banshee_io_w);
|
||||
base = m_pci_3dfx_regs[0x06] & 0xfffffff0;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(this, m_voodoo, base + 0x0000000, base + 0x00000ff, banshee_io_r, banshee_io_w);
|
||||
|
||||
base = state->m_pci_3dfx_regs[0x0c] & 0xffff0000;
|
||||
if (base >= state->m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(state, state->m_voodoo, base + 0x0000000, base + 0x000ffff, banshee_rom_r, NULL);
|
||||
base = m_pci_3dfx_regs[0x0c] & 0xffff0000;
|
||||
if (base >= m_rambase.bytes() && base < 0x20000000)
|
||||
add_dynamic_device_address(this, m_voodoo, base + 0x0000000, base + 0x000ffff, banshee_rom_r, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* now remap everything */
|
||||
if (LOG_DYNAMIC) logerror("remap_dynamic_addresses:\n");
|
||||
address_space &space = machine.device<cpu_device>("maincpu")->space(AS_PROGRAM);
|
||||
for (addr = 0; addr < state->m_dynamic_count; addr++)
|
||||
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_PROGRAM);
|
||||
for (addr = 0; addr < m_dynamic_count; addr++)
|
||||
{
|
||||
if (LOG_DYNAMIC) logerror(" installing: %08X-%08X %s,%s\n", dynamic[addr].start, dynamic[addr].end, dynamic[addr].rdname, dynamic[addr].wrname);
|
||||
|
||||
@ -1698,8 +1686,8 @@ static void remap_dynamic_addresses(running_machine &machine)
|
||||
|
||||
if (LOG_DYNAMIC)
|
||||
{
|
||||
++state->m_count;
|
||||
popmessage("Remaps = %d", state->m_count);
|
||||
++m_count;
|
||||
popmessage("Remaps = %d", m_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,16 +164,15 @@ Colscroll effects?
|
||||
SOUND
|
||||
***********************************************************/
|
||||
|
||||
static void reset_sound_region( running_machine &machine )
|
||||
void warriorb_state::reset_sound_region()
|
||||
{
|
||||
warriorb_state *state = machine.driver_data<warriorb_state>();
|
||||
state->membank("bank10")->set_entry(state->m_banknum);
|
||||
membank("bank10")->set_entry(m_banknum);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(warriorb_state::sound_bankswitch_w)
|
||||
{
|
||||
m_banknum = data & 7;
|
||||
reset_sound_region(machine());
|
||||
reset_sound_region();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(warriorb_state::warriorb_sound_w)
|
||||
@ -524,7 +523,7 @@ void warriorb_state::machine_start()
|
||||
|
||||
save_item(NAME(m_banknum));
|
||||
save_item(NAME(m_pandata));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(warriorb_state::reset_sound_region), this));
|
||||
}
|
||||
|
||||
void warriorb_state::machine_reset()
|
||||
|
@ -910,10 +910,10 @@ However sync to vblank is lacking, which is causing the
|
||||
graphics glitches.
|
||||
***********************************************************/
|
||||
|
||||
static void wgp_postload(running_machine &machine)
|
||||
void wgp_state::wgp_postload()
|
||||
{
|
||||
parse_control(machine);
|
||||
reset_sound_region(machine);
|
||||
parse_control(machine());
|
||||
reset_sound_region(machine());
|
||||
}
|
||||
|
||||
void wgp_state::machine_reset()
|
||||
@ -948,7 +948,7 @@ void wgp_state::machine_start()
|
||||
save_item(NAME(m_cpua_ctrl));
|
||||
save_item(NAME(m_banknum));
|
||||
save_item(NAME(m_port_sel));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(wgp_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(wgp_state::wgp_postload), this));
|
||||
}
|
||||
|
||||
static const tc0100scn_interface wgp_tc0100scn_intf =
|
||||
|
@ -440,10 +440,10 @@ static const k053252_interface xexex_k053252_intf =
|
||||
0, 0
|
||||
};
|
||||
|
||||
static void xexex_postload(running_machine &machine)
|
||||
void xexex_state::xexex_postload()
|
||||
{
|
||||
parse_control2(machine);
|
||||
reset_sound_region(machine);
|
||||
parse_control2(machine());
|
||||
reset_sound_region(machine());
|
||||
}
|
||||
|
||||
void xexex_state::machine_start()
|
||||
@ -477,7 +477,7 @@ void xexex_state::machine_start()
|
||||
|
||||
save_item(NAME(m_cur_control2));
|
||||
save_item(NAME(m_cur_sound_region));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(xexex_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(xexex_state::xexex_postload), this));
|
||||
|
||||
m_dmadelay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(xexex_state::dmaend_callback),this));
|
||||
}
|
||||
|
@ -92,16 +92,15 @@ WRITE16_MEMBER(xmen_state::xmen_18fa00_w)
|
||||
}
|
||||
}
|
||||
|
||||
static void sound_reset_bank( running_machine &machine )
|
||||
void xmen_state::sound_reset_bank()
|
||||
{
|
||||
xmen_state *state = machine.driver_data<xmen_state>();
|
||||
state->membank("bank4")->set_entry(state->m_sound_curbank & 0x07);
|
||||
membank("bank4")->set_entry(m_sound_curbank & 0x07);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(xmen_state::sound_bankswitch_w)
|
||||
{
|
||||
m_sound_curbank = data;
|
||||
sound_reset_bank(machine());
|
||||
sound_reset_bank();
|
||||
}
|
||||
|
||||
|
||||
@ -311,7 +310,7 @@ void xmen_state::machine_start()
|
||||
save_item(NAME(m_layer_colorbase));
|
||||
save_item(NAME(m_layerpri));
|
||||
save_item(NAME(m_vblank_irq_mask));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(sound_reset_bank), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(xmen_state::sound_reset_bank), this));
|
||||
}
|
||||
|
||||
void xmen_state::machine_reset()
|
||||
|
@ -97,4 +97,5 @@ public:
|
||||
DECLARE_MACHINE_RESET(ta7630);
|
||||
UINT32 screen_update_fortyl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(nmi_callback);
|
||||
void redraw_pixels();
|
||||
};
|
||||
|
@ -131,6 +131,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(polaris_sh_port_1_w);
|
||||
DECLARE_WRITE8_MEMBER(polaris_sh_port_2_w);
|
||||
DECLARE_WRITE8_MEMBER(polaris_sh_port_3_w);
|
||||
|
||||
void schaser_reinit_555_time_remain();
|
||||
};
|
||||
|
||||
|
||||
|
@ -124,6 +124,7 @@ public:
|
||||
UINT32 screen_update_profpac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(interrupt_off);
|
||||
TIMER_CALLBACK_MEMBER(scanline_callback);
|
||||
void profbank_banksw_restore();
|
||||
};
|
||||
|
||||
/*----------- defined in audio/wow.c -----------*/
|
||||
|
@ -33,4 +33,5 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_atetris(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(interrupt_gen);
|
||||
void reset_bank();
|
||||
};
|
||||
|
@ -204,8 +204,8 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(cave_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(cave_vblank_end);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cave_vblank_start);
|
||||
void cave_get_sprite_info();
|
||||
};
|
||||
|
||||
/*----------- defined in video/cave.c -----------*/
|
||||
void cave_get_sprite_info(running_machine &machine);
|
||||
void sailormn_tilebank_w(running_machine &machine, int bank);
|
||||
|
@ -53,4 +53,5 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_chaknpop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void tx_tilemap_mark_all_dirty();
|
||||
};
|
||||
|
@ -257,6 +257,7 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(sf2mdt_layer_w);
|
||||
DECLARE_WRITE16_MEMBER(sf2mdta_layer_w);
|
||||
UINT32 screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void cps1_get_video_base();
|
||||
};
|
||||
|
||||
/*----------- defined in drivers/cps1.c -----------*/
|
||||
@ -267,7 +268,6 @@ GFXDECODE_EXTERN( cps1 );
|
||||
|
||||
|
||||
/*----------- defined in video/cps1.c -----------*/
|
||||
void cps1_get_video_base(running_machine &machine);
|
||||
void cps2_set_sprite_priorities(running_machine &machine);
|
||||
void cps2_objram_latch(running_machine &machine);
|
||||
|
||||
|
@ -95,4 +95,5 @@ public:
|
||||
UINT32 screen_update_darius_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_darius_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_darius_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void darius_postload();
|
||||
};
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
UINT32 screen_update_djmain(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vb_interrupt);
|
||||
DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
|
||||
void sndram_set_bank();
|
||||
};
|
||||
|
||||
/*----------- defined in video/djmain.c -----------*/
|
||||
|
@ -490,6 +490,8 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(majxtal7_vblank_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(tenkai_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mjmyster_irq);
|
||||
void tenkai_update_rombank();
|
||||
void gekisha_bank_postload();
|
||||
};
|
||||
|
||||
//----------- defined in drivers/dynax.c -----------
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
UINT32 screen_update_gradius3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(cpuA_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gradius3_sub_scanline);
|
||||
void gradius3_postload();
|
||||
};
|
||||
|
||||
/*----------- defined in video/gradius3.c -----------*/
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(irq_timer_tick);
|
||||
TIMER_CALLBACK_MEMBER(firq_off_tick);
|
||||
TIMER_CALLBACK_MEMBER(firq_timer_tick);
|
||||
void expand_pixels();
|
||||
};
|
||||
|
||||
|
||||
|
@ -94,4 +94,5 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(magerror_irq_callback);
|
||||
TIMER_CALLBACK_MEMBER(hyprduel_blit_done);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(hyprduel_interrupt);
|
||||
void hyprduel_postload();
|
||||
};
|
||||
|
@ -173,6 +173,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(invad2ct_audio_2_w);
|
||||
DECLARE_WRITE8_MEMBER(invad2ct_audio_3_w);
|
||||
DECLARE_WRITE8_MEMBER(invad2ct_audio_4_w);
|
||||
void maze_update_discrete();
|
||||
};
|
||||
|
||||
|
||||
|
@ -75,4 +75,5 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(metamrph_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mchamp_interrupt);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
@ -89,4 +89,5 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(blkpnthr_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(konamigt_interrupt);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gx400_interrupt);
|
||||
void nemesis_postload();
|
||||
};
|
||||
|
@ -48,4 +48,5 @@ public:
|
||||
UINT32 screen_update_ninjaw_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_ninjaw_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_ninjaw_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void ninjaw_postload();
|
||||
};
|
||||
|
@ -66,4 +66,5 @@ public:
|
||||
UINT32 screen_update_othunder(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vblank_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(ad_interrupt);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
@ -53,4 +53,5 @@ public:
|
||||
UINT32 screen_update_psikyo4_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_psikyo4_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(psikyosh_interrupt);
|
||||
void hotgmck_pcm_bank_postload();
|
||||
};
|
||||
|
@ -74,4 +74,5 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_renegade(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(renegade_interrupt);
|
||||
void setbank();
|
||||
};
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(nmi_callback);
|
||||
TIMER_CALLBACK_MEMBER(dmaend_callback);
|
||||
DECLARE_READ8_MEMBER(simpsons_sound_r);
|
||||
void simpsons_postload();
|
||||
};
|
||||
|
||||
|
||||
|
@ -68,4 +68,5 @@ public:
|
||||
void screen_eof_taito_no_buffer(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(slapshot_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(slapshot_interrupt6);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_tail2nos(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void tail2nos_postload();
|
||||
};
|
||||
|
||||
/*----------- defined in video/tail2nos.c -----------*/
|
||||
|
@ -144,4 +144,5 @@ public:
|
||||
void screen_eof_taitof2_partial_buffer_delayed_qzchikyu(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(taitof2_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(taitof2_interrupt6);
|
||||
void reset_driveout_sound_region();
|
||||
};
|
||||
|
@ -30,4 +30,5 @@ public:
|
||||
UINT32 screen_update_syvalion(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_recordbr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_dleague(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
@ -88,4 +88,5 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(sci_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(taitoz_interrupt6);
|
||||
TIMER_CALLBACK_MEMBER(taitoz_cpub_interrupt5);
|
||||
void taitoz_postload();
|
||||
};
|
||||
|
@ -83,4 +83,5 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_taitoair(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
@ -100,4 +100,5 @@ public:
|
||||
void screen_eof_tnzs(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(arknoid2_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(kludge_callback);
|
||||
void tnzs_postload();
|
||||
};
|
||||
|
@ -144,6 +144,9 @@ public:
|
||||
void screen_eof_toaplan1(screen_device &screen, bool state);
|
||||
void screen_eof_samesame(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(toaplan1_interrupt);
|
||||
void rallybik_flipscreen();
|
||||
void toaplan1_flipscreen();
|
||||
void demonwld_restore_dsp();
|
||||
};
|
||||
|
||||
|
||||
|
@ -132,4 +132,5 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(toaplan2_vblank_irq4);
|
||||
INTERRUPT_GEN_MEMBER(bbakraid_snd_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(toaplan2_raise_irq);
|
||||
void truxton2_postload();
|
||||
};
|
||||
|
@ -60,4 +60,5 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(topspeed_interrupt6);
|
||||
TIMER_CALLBACK_MEMBER(topspeed_cpub_interrupt6);
|
||||
DECLARE_WRITE8_MEMBER(topspeed_tc0140syt_comm_w);
|
||||
void topspeed_postload();
|
||||
};
|
||||
|
@ -108,4 +108,5 @@ public:
|
||||
UINT32 screen_update_semibase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_sdfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(tumbleb2_interrupt);
|
||||
void tumbleb_tilemap_redraw();
|
||||
};
|
||||
|
@ -107,6 +107,8 @@ public:
|
||||
UINT32 screen_update_toaplan0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(twincobr_interrupt);
|
||||
INTERRUPT_GEN_MEMBER(wardner_interrupt);
|
||||
void twincobr_restore_screen();
|
||||
void twincobr_restore_dsp();
|
||||
};
|
||||
|
||||
|
||||
|
@ -42,4 +42,5 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_warriorb_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_warriorb_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void reset_sound_region();
|
||||
};
|
||||
|
@ -73,4 +73,5 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(wgp_interrupt4);
|
||||
TIMER_CALLBACK_MEMBER(wgp_interrupt6);
|
||||
TIMER_CALLBACK_MEMBER(wgp_cpub_interrupt6);
|
||||
void wgp_postload();
|
||||
};
|
||||
|
@ -127,6 +127,8 @@ public:
|
||||
DECLARE_READ8_MEMBER(tshoot_input_port_0_3_r);
|
||||
DECLARE_WRITE8_MEMBER(tshoot_maxvol_w);
|
||||
DECLARE_WRITE8_MEMBER(tshoot_lamp_w);
|
||||
void williams2_postload();
|
||||
void defender_postload();
|
||||
};
|
||||
|
||||
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
UINT32 screen_update_xexex(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(dmaend_callback);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(xexex_interrupt);
|
||||
void xexex_postload();
|
||||
};
|
||||
|
||||
/*----------- defined in video/xexex.c -----------*/
|
||||
|
@ -54,6 +54,7 @@ public:
|
||||
UINT32 screen_update_xmen6p_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_xmen6p(screen_device &screen, bool state);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(xmen_scanline);
|
||||
void sound_reset_bank();
|
||||
};
|
||||
|
||||
/*----------- defined in video/xmen.c -----------*/
|
||||
|
@ -66,11 +66,9 @@ static KONAMI_SETLINES_CALLBACK( simpsons_banking )
|
||||
device->machine().root_device().membank("bank1")->set_entry(lines & 0x3f);
|
||||
}
|
||||
|
||||
static void simpsons_postload(running_machine &machine)
|
||||
void simpsons_state::simpsons_postload()
|
||||
{
|
||||
simpsons_state *state = machine.driver_data<simpsons_state>();
|
||||
|
||||
simpsons_video_banking(machine, state->m_video_bank);
|
||||
simpsons_video_banking(machine(), m_video_bank);
|
||||
}
|
||||
|
||||
void simpsons_state::machine_start()
|
||||
@ -93,7 +91,7 @@ void simpsons_state::machine_start()
|
||||
save_item(NAME(m_layerpri));
|
||||
save_pointer(NAME(m_xtraram), 0x1000);
|
||||
save_pointer(NAME(m_spriteram), 0x1000 / 2);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(simpsons_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(simpsons_state::simpsons_postload), this));
|
||||
}
|
||||
|
||||
void simpsons_state::machine_reset()
|
||||
|
@ -666,10 +666,9 @@ MACHINE_RESET_MEMBER(tnzs_state,jpopnics)
|
||||
m_mcu_type = -1;
|
||||
}
|
||||
|
||||
static void tnzs_postload(running_machine &machine)
|
||||
void tnzs_state::tnzs_postload()
|
||||
{
|
||||
tnzs_state *state = machine.driver_data<tnzs_state>();
|
||||
state->membank("subbank")->set_entry(state->m_bank2);
|
||||
membank("subbank")->set_entry(m_bank2);
|
||||
}
|
||||
|
||||
|
||||
@ -693,7 +692,7 @@ MACHINE_START_MEMBER(tnzs_state,jpopnics)
|
||||
save_item(NAME(m_bank1));
|
||||
save_item(NAME(m_bank2));
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tnzs_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tnzs_state::tnzs_postload), this));
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(tnzs_state,tnzs)
|
||||
|
@ -148,10 +148,9 @@ static void demonwld_dsp(running_machine &machine, int enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void demonwld_restore_dsp(running_machine &machine)
|
||||
void toaplan1_state::demonwld_restore_dsp()
|
||||
{
|
||||
toaplan1_state *state = machine.driver_data<toaplan1_state>();
|
||||
demonwld_dsp(machine, state->m_dsp_on);
|
||||
demonwld_dsp(machine(), m_dsp_on);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(toaplan1_state::demonwld_dsp_ctrl_w)
|
||||
@ -413,7 +412,7 @@ void demonwld_driver_savestate(running_machine &machine)
|
||||
state->save_item(NAME(state->m_main_ram_seg));
|
||||
state->save_item(NAME(state->m_dsp_BIO));
|
||||
state->save_item(NAME(state->m_dsp_execute));
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(demonwld_restore_dsp), &machine));
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(toaplan1_state::demonwld_restore_dsp), state));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(toaplan1_state,vimana)
|
||||
|
@ -191,10 +191,9 @@ static void twincobr_dsp(running_machine &machine, int enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void twincobr_restore_dsp(running_machine &machine)
|
||||
void twincobr_state::twincobr_restore_dsp()
|
||||
{
|
||||
twincobr_state *state = machine.driver_data<twincobr_state>();
|
||||
twincobr_dsp(machine, state->m_dsp_on);
|
||||
twincobr_dsp(machine(), m_dsp_on);
|
||||
}
|
||||
|
||||
|
||||
@ -336,5 +335,5 @@ void twincobr_driver_savestate(running_machine &machine)
|
||||
state_save_register_global(machine, state->m_fsharkbt_8741);
|
||||
state_save_register_global(machine, state->m_wardner_membank);
|
||||
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(twincobr_restore_dsp), &machine));
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(twincobr_state::twincobr_restore_dsp), state));
|
||||
}
|
||||
|
@ -433,11 +433,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(williams_state::williams2_endscreen_callback)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void williams2_postload(running_machine &machine)
|
||||
void williams_state::williams2_postload()
|
||||
{
|
||||
williams_state *state = machine.driver_data<williams_state>();
|
||||
address_space &space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
state->williams2_bank_select_w(space, 0, state->m_vram_bank);
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
williams2_bank_select_w(space, 0, m_vram_bank);
|
||||
}
|
||||
|
||||
|
||||
@ -449,7 +448,7 @@ MACHINE_START_MEMBER(williams_state,williams2)
|
||||
|
||||
/* register for save states */
|
||||
state_save_register_global(machine(), m_vram_bank);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(williams2_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(williams_state::williams2_postload), this));
|
||||
}
|
||||
|
||||
|
||||
@ -734,11 +733,10 @@ WRITE8_MEMBER(williams_state::williams2_7segment_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void defender_postload(running_machine &machine)
|
||||
void williams_state::defender_postload()
|
||||
{
|
||||
williams_state *state = machine.driver_data<williams_state>();
|
||||
address_space &space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
state->defender_bank_select_w(space, 0, state->m_vram_bank);
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
defender_bank_select_w(space, 0, m_vram_bank);
|
||||
}
|
||||
|
||||
|
||||
@ -749,7 +747,7 @@ MACHINE_START_MEMBER(williams_state,defender)
|
||||
/* configure the banking and make sure it is reset to 0 */
|
||||
machine().root_device().membank("bank1")->configure_entries(0, 9, &machine().root_device().memregion("maincpu")->base()[0x10000], 0x1000);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(defender_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(williams_state::defender_postload), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,11 +86,10 @@ TILE_GET_INFO_MEMBER(fortyl_state::get_bg_tile_info)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void redraw_pixels(running_machine &machine)
|
||||
void fortyl_state::redraw_pixels()
|
||||
{
|
||||
fortyl_state *state = machine.driver_data<fortyl_state>();
|
||||
state->m_pix_redraw = 1;
|
||||
state->m_bg_tilemap->mark_all_dirty();
|
||||
m_pix_redraw = 1;
|
||||
m_bg_tilemap->mark_all_dirty();
|
||||
}
|
||||
|
||||
|
||||
@ -122,7 +121,7 @@ void fortyl_state::video_start()
|
||||
save_item(NAME(*m_tmp_bitmap1));
|
||||
save_item(NAME(*m_tmp_bitmap2));
|
||||
save_item(NAME(m_pixram_sel));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(redraw_pixels), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(fortyl_state::redraw_pixels), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -753,7 +753,7 @@ static void sprite_init_cave( running_machine &machine )
|
||||
state->save_item(NAME(state->m_blit.clip_top));
|
||||
state->save_item(NAME(state->m_blit.clip_bottom));
|
||||
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(cave_get_sprite_info), &machine));
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(cave_state::cave_get_sprite_info), state));
|
||||
}
|
||||
|
||||
static void cave_sprite_check( screen_device &screen, const rectangle &clip )
|
||||
@ -1642,24 +1642,23 @@ UINT32 cave_state::screen_update_cave(screen_device &screen, bitmap_ind16 &bitma
|
||||
|
||||
/**************************************************************/
|
||||
|
||||
void cave_get_sprite_info( running_machine &machine )
|
||||
void cave_state::cave_get_sprite_info()
|
||||
{
|
||||
cave_state *state = machine.driver_data<cave_state>();
|
||||
if (state->m_kludge == 3) /* mazinger metmqstr */
|
||||
if (m_kludge == 3) /* mazinger metmqstr */
|
||||
{
|
||||
if (machine.video().skip_this_frame() == 0)
|
||||
if (machine().video().skip_this_frame() == 0)
|
||||
{
|
||||
state->m_spriteram_bank = state->m_spriteram_bank_delay;
|
||||
(*state->m_get_sprite_info)(machine);
|
||||
m_spriteram_bank = m_spriteram_bank_delay;
|
||||
(*m_get_sprite_info)(machine());
|
||||
}
|
||||
state->m_spriteram_bank_delay = state->m_videoregs[4] & 1;
|
||||
m_spriteram_bank_delay = m_videoregs[4] & 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (machine.video().skip_this_frame() == 0)
|
||||
if (machine().video().skip_this_frame() == 0)
|
||||
{
|
||||
state->m_spriteram_bank = state->m_videoregs[4] & 1;
|
||||
(*state->m_get_sprite_info)(machine);
|
||||
m_spriteram_bank = m_videoregs[4] & 1;
|
||||
(*m_get_sprite_info)(machine());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,10 @@ void chaknpop_state::palette_init()
|
||||
Memory handlers
|
||||
***************************************************************************/
|
||||
|
||||
static void tx_tilemap_mark_all_dirty( running_machine &machine )
|
||||
void chaknpop_state::tx_tilemap_mark_all_dirty()
|
||||
{
|
||||
chaknpop_state *state = machine.driver_data<chaknpop_state>();
|
||||
|
||||
state->m_tx_tilemap->mark_all_dirty();
|
||||
state->m_tx_tilemap->set_flip(state->m_flip_x | state->m_flip_y);
|
||||
m_tx_tilemap->mark_all_dirty();
|
||||
m_tx_tilemap->set_flip(m_flip_x | m_flip_y);
|
||||
}
|
||||
|
||||
READ8_MEMBER(chaknpop_state::chaknpop_gfxmode_r)
|
||||
@ -95,7 +93,7 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_gfxmode_w)
|
||||
}
|
||||
|
||||
if (all_dirty)
|
||||
tx_tilemap_mark_all_dirty(machine());
|
||||
tx_tilemap_mark_all_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +110,7 @@ WRITE8_MEMBER(chaknpop_state::chaknpop_attrram_w)
|
||||
m_attr_ram[offset] = data;
|
||||
|
||||
if (offset == TX_COLOR1 || offset == TX_COLOR2)
|
||||
tx_tilemap_mark_all_dirty(machine());
|
||||
tx_tilemap_mark_all_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,9 +163,9 @@ void chaknpop_state::video_start()
|
||||
save_pointer(NAME(m_vram4), 0x2000);
|
||||
|
||||
membank("bank1")->set_entry(0);
|
||||
tx_tilemap_mark_all_dirty(machine());
|
||||
tx_tilemap_mark_all_dirty();
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tx_tilemap_mark_all_dirty), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(chaknpop_state::tx_tilemap_mark_all_dirty), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1805,80 +1805,79 @@ DRIVER_INIT_MEMBER(cps_state,cps2_video)
|
||||
}
|
||||
|
||||
|
||||
void cps1_get_video_base( running_machine &machine )
|
||||
void cps_state::cps1_get_video_base()
|
||||
{
|
||||
cps_state *state = machine.driver_data<cps_state>();
|
||||
int layercontrol, videocontrol, scroll1xoff, scroll2xoff, scroll3xoff;
|
||||
|
||||
/* Re-calculate the VIDEO RAM base */
|
||||
if (state->m_scroll1 != cps1_base(machine, CPS1_SCROLL1_BASE, state->m_scroll_size))
|
||||
if (m_scroll1 != cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size))
|
||||
{
|
||||
state->m_scroll1 = cps1_base(machine, CPS1_SCROLL1_BASE, state->m_scroll_size);
|
||||
state->m_bg_tilemap[0]->mark_all_dirty();
|
||||
m_scroll1 = cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size);
|
||||
m_bg_tilemap[0]->mark_all_dirty();
|
||||
}
|
||||
if (state->m_scroll2 != cps1_base(machine, CPS1_SCROLL2_BASE, state->m_scroll_size))
|
||||
if (m_scroll2 != cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size))
|
||||
{
|
||||
state->m_scroll2 = cps1_base(machine, CPS1_SCROLL2_BASE, state->m_scroll_size);
|
||||
state->m_bg_tilemap[1]->mark_all_dirty();
|
||||
m_scroll2 = cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size);
|
||||
m_bg_tilemap[1]->mark_all_dirty();
|
||||
}
|
||||
if (state->m_scroll3 != cps1_base(machine, CPS1_SCROLL3_BASE, state->m_scroll_size))
|
||||
if (m_scroll3 != cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size))
|
||||
{
|
||||
state->m_scroll3 = cps1_base(machine, CPS1_SCROLL3_BASE, state->m_scroll_size);
|
||||
state->m_bg_tilemap[2]->mark_all_dirty();
|
||||
m_scroll3 = cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size);
|
||||
m_bg_tilemap[2]->mark_all_dirty();
|
||||
}
|
||||
|
||||
/* Some of the sf2 hacks use only sprite port 0x9100 and the scroll layers are offset */
|
||||
if (state->m_game_config->bootleg_kludge == 1)
|
||||
if (m_game_config->bootleg_kludge == 1)
|
||||
{
|
||||
state->m_cps_a_regs[CPS1_OBJ_BASE] = 0x9100;
|
||||
state->m_obj = cps1_base(machine, CPS1_OBJ_BASE, state->m_obj_size);
|
||||
m_cps_a_regs[CPS1_OBJ_BASE] = 0x9100;
|
||||
m_obj = cps1_base(machine(), CPS1_OBJ_BASE, m_obj_size);
|
||||
scroll1xoff = -0x0c;
|
||||
scroll2xoff = -0x0e;
|
||||
scroll3xoff = -0x10;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_obj = cps1_base(machine, CPS1_OBJ_BASE, state->m_obj_size);
|
||||
m_obj = cps1_base(machine(), CPS1_OBJ_BASE, m_obj_size);
|
||||
scroll1xoff = 0;
|
||||
scroll2xoff = 0;
|
||||
scroll3xoff = 0;
|
||||
}
|
||||
|
||||
state->m_other = cps1_base(machine, CPS1_OTHER_BASE, state->m_other_size);
|
||||
m_other = cps1_base(machine(), CPS1_OTHER_BASE, m_other_size);
|
||||
|
||||
/* Get scroll values */
|
||||
state->m_scroll1x = state->m_cps_a_regs[CPS1_SCROLL1_SCROLLX] + scroll1xoff;
|
||||
state->m_scroll1y = state->m_cps_a_regs[CPS1_SCROLL1_SCROLLY];
|
||||
state->m_scroll2x = state->m_cps_a_regs[CPS1_SCROLL2_SCROLLX] + scroll2xoff;
|
||||
state->m_scroll2y = state->m_cps_a_regs[CPS1_SCROLL2_SCROLLY];
|
||||
state->m_scroll3x = state->m_cps_a_regs[CPS1_SCROLL3_SCROLLX] + scroll3xoff;
|
||||
state->m_scroll3y = state->m_cps_a_regs[CPS1_SCROLL3_SCROLLY];
|
||||
state->m_stars1x = state->m_cps_a_regs[CPS1_STARS1_SCROLLX];
|
||||
state->m_stars1y = state->m_cps_a_regs[CPS1_STARS1_SCROLLY];
|
||||
state->m_stars2x = state->m_cps_a_regs[CPS1_STARS2_SCROLLX];
|
||||
state->m_stars2y = state->m_cps_a_regs[CPS1_STARS2_SCROLLY];
|
||||
m_scroll1x = m_cps_a_regs[CPS1_SCROLL1_SCROLLX] + scroll1xoff;
|
||||
m_scroll1y = m_cps_a_regs[CPS1_SCROLL1_SCROLLY];
|
||||
m_scroll2x = m_cps_a_regs[CPS1_SCROLL2_SCROLLX] + scroll2xoff;
|
||||
m_scroll2y = m_cps_a_regs[CPS1_SCROLL2_SCROLLY];
|
||||
m_scroll3x = m_cps_a_regs[CPS1_SCROLL3_SCROLLX] + scroll3xoff;
|
||||
m_scroll3y = m_cps_a_regs[CPS1_SCROLL3_SCROLLY];
|
||||
m_stars1x = m_cps_a_regs[CPS1_STARS1_SCROLLX];
|
||||
m_stars1y = m_cps_a_regs[CPS1_STARS1_SCROLLY];
|
||||
m_stars2x = m_cps_a_regs[CPS1_STARS2_SCROLLX];
|
||||
m_stars2y = m_cps_a_regs[CPS1_STARS2_SCROLLY];
|
||||
|
||||
/* Get layer enable bits */
|
||||
layercontrol = state->m_cps_b_regs[state->m_game_config->layer_control / 2];
|
||||
videocontrol = state->m_cps_a_regs[CPS1_VIDEOCONTROL];
|
||||
state->m_bg_tilemap[0]->enable(layercontrol & state->m_game_config->layer_enable_mask[0]);
|
||||
state->m_bg_tilemap[1]->enable((layercontrol & state->m_game_config->layer_enable_mask[1]) && (videocontrol & 4));
|
||||
state->m_bg_tilemap[2]->enable((layercontrol & state->m_game_config->layer_enable_mask[2]) && (videocontrol & 8));
|
||||
state->m_stars_enabled[0] = layercontrol & state->m_game_config->layer_enable_mask[3];
|
||||
state->m_stars_enabled[1] = layercontrol & state->m_game_config->layer_enable_mask[4];
|
||||
layercontrol = m_cps_b_regs[m_game_config->layer_control / 2];
|
||||
videocontrol = m_cps_a_regs[CPS1_VIDEOCONTROL];
|
||||
m_bg_tilemap[0]->enable(layercontrol & m_game_config->layer_enable_mask[0]);
|
||||
m_bg_tilemap[1]->enable((layercontrol & m_game_config->layer_enable_mask[1]) && (videocontrol & 4));
|
||||
m_bg_tilemap[2]->enable((layercontrol & m_game_config->layer_enable_mask[2]) && (videocontrol & 8));
|
||||
m_stars_enabled[0] = layercontrol & m_game_config->layer_enable_mask[3];
|
||||
m_stars_enabled[1] = layercontrol & m_game_config->layer_enable_mask[4];
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
{
|
||||
int enablemask = 0;
|
||||
|
||||
if (state->m_game_config->layer_enable_mask[0] == state->m_game_config->layer_enable_mask[1])
|
||||
enablemask = state->m_game_config->layer_enable_mask[0];
|
||||
if (m_game_config->layer_enable_mask[0] == m_game_config->layer_enable_mask[1])
|
||||
enablemask = m_game_config->layer_enable_mask[0];
|
||||
|
||||
if (state->m_game_config->layer_enable_mask[0] == state->m_game_config->layer_enable_mask[2])
|
||||
enablemask = state->m_game_config->layer_enable_mask[0];
|
||||
if (m_game_config->layer_enable_mask[0] == m_game_config->layer_enable_mask[2])
|
||||
enablemask = m_game_config->layer_enable_mask[0];
|
||||
|
||||
if (state->m_game_config->layer_enable_mask[1] == state->m_game_config->layer_enable_mask[2])
|
||||
enablemask = state->m_game_config->layer_enable_mask[1];
|
||||
if (m_game_config->layer_enable_mask[1] == m_game_config->layer_enable_mask[2])
|
||||
enablemask = m_game_config->layer_enable_mask[1];
|
||||
|
||||
if (enablemask)
|
||||
{
|
||||
@ -1886,9 +1885,9 @@ void cps1_get_video_base( running_machine &machine )
|
||||
popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f);
|
||||
}
|
||||
|
||||
enablemask = state->m_game_config->layer_enable_mask[0] | state->m_game_config->layer_enable_mask[1]
|
||||
| state->m_game_config->layer_enable_mask[2]
|
||||
| state->m_game_config->layer_enable_mask[3] | state->m_game_config->layer_enable_mask[4];
|
||||
enablemask = m_game_config->layer_enable_mask[0] | m_game_config->layer_enable_mask[1]
|
||||
| m_game_config->layer_enable_mask[2]
|
||||
| m_game_config->layer_enable_mask[3] | m_game_config->layer_enable_mask[4];
|
||||
|
||||
if (((layercontrol & ~enablemask) & 0x003e) != 0)
|
||||
popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f);
|
||||
@ -2134,8 +2133,8 @@ VIDEO_START_MEMBER(cps_state,cps)
|
||||
m_scroll3 = NULL;
|
||||
m_obj = NULL;
|
||||
m_other = NULL;
|
||||
cps1_get_video_base(machine()); /* Calculate base pointers */
|
||||
cps1_get_video_base(machine()); /* Calculate old base pointers */
|
||||
cps1_get_video_base(); /* Calculate base pointers */
|
||||
cps1_get_video_base(); /* Calculate old base pointers */
|
||||
|
||||
/* state save register */
|
||||
save_item(NAME(m_scanline1));
|
||||
@ -2166,7 +2165,7 @@ VIDEO_START_MEMBER(cps_state,cps)
|
||||
save_pointer(NAME(m_cps2_buffered_obj), m_cps2_obj_size / 2);
|
||||
}
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(cps1_get_video_base), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(cps_state::cps1_get_video_base), this));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(cps_state,cps1)
|
||||
@ -2791,7 +2790,7 @@ UINT32 cps_state::screen_update_cps1(screen_device &screen, bitmap_ind16 &bitmap
|
||||
layercontrol = m_cps_b_regs[m_game_config->layer_control / 2];
|
||||
|
||||
/* Get video memory base registers */
|
||||
cps1_get_video_base(machine());
|
||||
cps1_get_video_base();
|
||||
|
||||
/* Find the offset of the last sprite in the sprite table */
|
||||
cps1_find_last_sprite(machine());
|
||||
@ -2938,7 +2937,7 @@ void cps_state::screen_eof_cps1(screen_device &screen, bool state)
|
||||
if (state)
|
||||
{
|
||||
/* Get video memory base registers */
|
||||
cps1_get_video_base(machine());
|
||||
cps1_get_video_base();
|
||||
|
||||
if (m_cps_version == 1)
|
||||
{
|
||||
|
@ -58,13 +58,13 @@ void gradius3_sprite_callback( running_machine &machine, int *code, int *color,
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void gradius3_postload(running_machine &machine)
|
||||
void gradius3_state::gradius3_postload()
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 0x20000; i += 16)
|
||||
{
|
||||
machine.gfx[0]->mark_dirty(i / 16);
|
||||
machine().gfx[0]->mark_dirty(i / 16);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ void gradius3_state::video_start()
|
||||
|
||||
machine().gfx[0]->set_source((UINT8 *)m_gfxram.target());
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(gradius3_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(gradius3_state::gradius3_postload), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,16 +38,15 @@ void gridlee_state::palette_init()
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void expand_pixels(running_machine &machine)
|
||||
void gridlee_state::expand_pixels()
|
||||
{
|
||||
gridlee_state *state = machine.driver_data<gridlee_state>();
|
||||
UINT8 *videoram = state->m_videoram;
|
||||
UINT8 *videoram = m_videoram;
|
||||
int offset = 0;
|
||||
|
||||
for(offset = 0; offset < 0x77ff; offset++)
|
||||
{
|
||||
state->m_local_videoram[offset * 2 + 0] = videoram[offset] >> 4;
|
||||
state->m_local_videoram[offset * 2 + 1] = videoram[offset] & 15;
|
||||
m_local_videoram[offset * 2 + 0] = videoram[offset] >> 4;
|
||||
m_local_videoram[offset * 2 + 1] = videoram[offset] & 15;
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +68,7 @@ void gridlee_state::video_start()
|
||||
|
||||
state_save_register_global(machine(), m_cocktail_flip);
|
||||
state_save_register_global(machine(), m_palettebank_vis);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(expand_pixels), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(gridlee_state::expand_pixels), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -325,20 +325,19 @@ static void alloc_empty_tiles( running_machine &machine )
|
||||
}
|
||||
|
||||
|
||||
static void hyprduel_postload(running_machine &machine)
|
||||
void hyprduel_state::hyprduel_postload()
|
||||
{
|
||||
hyprduel_state *state = machine.driver_data<hyprduel_state>();
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
UINT16 wx = state->m_window[i * 2 + 1];
|
||||
UINT16 wy = state->m_window[i * 2 + 0];
|
||||
UINT16 wx = m_window[i * 2 + 1];
|
||||
UINT16 wy = m_window[i * 2 + 0];
|
||||
|
||||
state->m_bg_tilemap[i]->set_scrollx(0, state->m_scroll[i * 2 + 1] - wx - (wx & 7));
|
||||
state->m_bg_tilemap[i]->set_scrolly(0, state->m_scroll[i * 2 + 0] - wy - (wy & 7));
|
||||
m_bg_tilemap[i]->set_scrollx(0, m_scroll[i * 2 + 1] - wx - (wx & 7));
|
||||
m_bg_tilemap[i]->set_scrolly(0, m_scroll[i * 2 + 0] - wy - (wy & 7));
|
||||
|
||||
state->m_bg_tilemap[i]->mark_all_dirty();
|
||||
m_bg_tilemap[i]->mark_all_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,7 +385,7 @@ VIDEO_START_MEMBER(hyprduel_state,common_14220)
|
||||
/* Set up save state */
|
||||
save_item(NAME(m_sprite_xoffs));
|
||||
save_item(NAME(m_sprite_yoffs));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(hyprduel_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(hyprduel_state::hyprduel_postload), this));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(hyprduel_state,hyprduel_14220)
|
||||
|
@ -263,22 +263,21 @@ WRITE16_MEMBER(nemesis_state::nemesis_charram_word_w)
|
||||
}
|
||||
|
||||
|
||||
static void nemesis_postload(running_machine &machine)
|
||||
void nemesis_state::nemesis_postload()
|
||||
{
|
||||
nemesis_state *state = machine.driver_data<nemesis_state>();
|
||||
int i, offs;
|
||||
|
||||
for (offs = 0; offs < state->m_charram.bytes(); offs++)
|
||||
for (offs = 0; offs < m_charram.bytes(); offs++)
|
||||
{
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
int w = sprite_data[i].width;
|
||||
int h = sprite_data[i].height;
|
||||
machine.gfx[sprite_data[i].char_type]->mark_dirty(offs * 4 / (w * h));
|
||||
machine().gfx[sprite_data[i].char_type]->mark_dirty(offs * 4 / (w * h));
|
||||
}
|
||||
}
|
||||
state->m_background->mark_all_dirty();
|
||||
state->m_foreground->mark_all_dirty();
|
||||
m_background->mark_all_dirty();
|
||||
m_foreground->mark_all_dirty();
|
||||
}
|
||||
|
||||
|
||||
@ -308,7 +307,7 @@ void nemesis_state::video_start()
|
||||
machine().gfx[7]->set_source((UINT8 *)m_charram.target());
|
||||
|
||||
/* Set up save state */
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(nemesis_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(nemesis_state::nemesis_postload), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,16 +40,15 @@ void tail2nos_zoom_callback( running_machine &machine, int *code, int *color, in
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void tail2nos_postload(running_machine &machine)
|
||||
void tail2nos_state::tail2nos_postload()
|
||||
{
|
||||
tail2nos_state *state = machine.driver_data<tail2nos_state>();
|
||||
int i;
|
||||
|
||||
state->m_bg_tilemap->mark_all_dirty();
|
||||
m_bg_tilemap->mark_all_dirty();
|
||||
|
||||
for (i = 0; i < 0x20000; i += 64)
|
||||
{
|
||||
machine.gfx[2]->mark_dirty(i / 64);
|
||||
machine().gfx[2]->mark_dirty(i / 64);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +61,7 @@ void tail2nos_state::video_start()
|
||||
m_zoomdata = (UINT16 *)memregion("gfx3")->base();
|
||||
|
||||
save_pointer(NAME(m_zoomdata), 0x20000 / 2);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tail2nos_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tail2nos_state::tail2nos_postload), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -954,8 +954,9 @@ void pc080sn_tilemap_draw_special( device_t *device, bitmap_ind16 &bitmap, const
|
||||
}
|
||||
|
||||
|
||||
static void pc080sn_restore_scroll(pc080sn_state *pc080sn)
|
||||
void pc080sn_device::pc080sn_restore_scroll()
|
||||
{
|
||||
pc080sn_state *pc080sn = pc080sn_get_safe_token(this);
|
||||
int flip;
|
||||
|
||||
pc080sn->bgscrollx[0] = -pc080sn->ctrl[0];
|
||||
@ -1037,7 +1038,7 @@ void pc080sn_device::device_start()
|
||||
|
||||
save_pointer(NAME(pc080sn->ram), PC080SN_RAM_SIZE / 2);
|
||||
save_item(NAME(pc080sn->ctrl));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(pc080sn_restore_scroll), pc080sn));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(pc080sn_device::pc080sn_restore_scroll), this));
|
||||
|
||||
}
|
||||
|
||||
@ -1879,8 +1880,10 @@ READ_LINE_DEVICE_HANDLER( tc0080vco_flipscreen_r )
|
||||
}
|
||||
|
||||
|
||||
static void tc0080vco_postload(tc0080vco_state *tc0080vco)
|
||||
void tc0080vco_device::tc0080vco_postload()
|
||||
{
|
||||
tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this);
|
||||
|
||||
tc0080vco->flipscreen = tc0080vco->scroll_ram[0] & 0x0c00;
|
||||
|
||||
tc0080vco->tilemap[0]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
|
||||
@ -1978,7 +1981,7 @@ void tc0080vco_device::device_start()
|
||||
machine().gfx[tc0080vco->tx_gfx] = auto_alloc(machine(), gfx_element(machine(), tc0080vco_charlayout, (UINT8 *)tc0080vco->char_ram, 64, 0));
|
||||
|
||||
save_pointer(NAME(tc0080vco->ram), TC0080VCO_RAM_SIZE / 2);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_postload), tc0080vco));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_device::tc0080vco_postload), this));
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
@ -2214,8 +2217,10 @@ static void tc0100scn_restore_scroll( tc0100scn_state *tc0100scn )
|
||||
}
|
||||
|
||||
|
||||
static void tc0100scn_postload(tc0100scn_state *tc0100scn)
|
||||
void tc0100scn_device::tc0100scn_postload()
|
||||
{
|
||||
tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this);
|
||||
|
||||
tc0100scn_set_layer_ptrs(tc0100scn);
|
||||
tc0100scn_restore_scroll(tc0100scn);
|
||||
|
||||
@ -2603,7 +2608,7 @@ void tc0100scn_device::device_start()
|
||||
save_item(NAME(tc0100scn->ctrl));
|
||||
save_item(NAME(tc0100scn->dblwidth));
|
||||
save_item(NAME(tc0100scn->gfxbank));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0100scn_postload), tc0100scn));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0100scn_device::tc0100scn_postload), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -3708,8 +3713,10 @@ READ8_DEVICE_HANDLER( tc0480scp_pri_reg_r )
|
||||
return tc0480scp->pri_reg;
|
||||
}
|
||||
|
||||
static void tc0480scp_postload(tc0480scp_state *tc0480scp)
|
||||
void tc0480scp_device::tc0480scp_postload()
|
||||
{
|
||||
tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this);
|
||||
|
||||
int reg;
|
||||
int flip = tc0480scp->ctrl[0xf] & 0x40;
|
||||
|
||||
@ -3891,7 +3898,7 @@ void tc0480scp_device::device_start()
|
||||
save_pointer(NAME(tc0480scp->ram), TC0480SCP_RAM_SIZE / 2);
|
||||
save_item(NAME(tc0480scp->ctrl));
|
||||
save_item(NAME(tc0480scp->dblwidth));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0480scp_postload), tc0480scp));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0480scp_device::tc0480scp_postload), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -4787,8 +4794,10 @@ INLINE const tc0110pcr_interface *tc0110pcr_get_interface( device_t *device )
|
||||
DEVICE HANDLERS
|
||||
*****************************************************************************/
|
||||
|
||||
static void tc0110pcr_restore_colors(tc0110pcr_state *tc0110pcr)
|
||||
void tc0110pcr_device::tc0110pcr_restore_colors()
|
||||
{
|
||||
tc0110pcr_state *tc0110pcr = tc0110pcr_get_safe_token(this);
|
||||
|
||||
int i, color, r = 0, g = 0, b = 0;
|
||||
|
||||
for (i = 0; i < (256 * 16); i++)
|
||||
@ -4943,28 +4952,6 @@ WRITE16_DEVICE_HANDLER( tc0110pcr_step1_4bpg_word_w )
|
||||
DEVICE INTERFACE
|
||||
*****************************************************************************/
|
||||
|
||||
static DEVICE_START( tc0110pcr )
|
||||
{
|
||||
tc0110pcr_state *tc0110pcr = tc0110pcr_get_safe_token(device);
|
||||
const tc0110pcr_interface *intf = tc0110pcr_get_interface(device);
|
||||
|
||||
tc0110pcr->m_machine = &device->machine();
|
||||
|
||||
tc0110pcr->pal_offs = intf->pal_offs;
|
||||
|
||||
tc0110pcr->ram = auto_alloc_array(device->machine(), UINT16, TC0110PCR_RAM_SIZE);
|
||||
|
||||
device->save_pointer(NAME(tc0110pcr->ram), TC0110PCR_RAM_SIZE);
|
||||
device->save_item(NAME(tc0110pcr->type));
|
||||
device->machine().save().register_postload(save_prepost_delegate(FUNC(tc0110pcr_restore_colors), tc0110pcr));
|
||||
}
|
||||
|
||||
static DEVICE_RESET( tc0110pcr )
|
||||
{
|
||||
tc0110pcr_state *tc0110pcr = tc0110pcr_get_safe_token(device);
|
||||
tc0110pcr->type = 0; /* default, xBBBBBGGGGGRRRRR */
|
||||
}
|
||||
|
||||
const device_type TC0110PCR = &device_creator<tc0110pcr_device>;
|
||||
|
||||
tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
@ -4989,7 +4976,19 @@ void tc0110pcr_device::device_config_complete()
|
||||
|
||||
void tc0110pcr_device::device_start()
|
||||
{
|
||||
DEVICE_START_NAME( tc0110pcr )(this);
|
||||
tc0110pcr_state *tc0110pcr = tc0110pcr_get_safe_token(this);
|
||||
const tc0110pcr_interface *intf = tc0110pcr_get_interface(this);
|
||||
|
||||
tc0110pcr->m_machine = &machine();
|
||||
|
||||
tc0110pcr->pal_offs = intf->pal_offs;
|
||||
|
||||
tc0110pcr->ram = auto_alloc_array(machine(), UINT16, TC0110PCR_RAM_SIZE);
|
||||
|
||||
save_pointer(NAME(tc0110pcr->ram), TC0110PCR_RAM_SIZE);
|
||||
save_item(NAME(tc0110pcr->type));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tc0110pcr_device::tc0110pcr_restore_colors), this));
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -4998,7 +4997,8 @@ void tc0110pcr_device::device_start()
|
||||
|
||||
void tc0110pcr_device::device_reset()
|
||||
{
|
||||
DEVICE_RESET_NAME( tc0110pcr )(this);
|
||||
tc0110pcr_state *tc0110pcr = tc0110pcr_get_safe_token(this);
|
||||
tc0110pcr->type = 0; /* default, xBBBBBGGGGGRRRRR */
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
void pc080sn_restore_scroll();
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -147,6 +148,7 @@ public:
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
void tc0080vco_postload();
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -170,6 +172,7 @@ public:
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
void tc0100scn_postload();
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -237,6 +240,7 @@ public:
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
void tc0480scp_postload();
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -282,6 +286,7 @@ public:
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
void tc0110pcr_restore_colors();
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
|
@ -283,20 +283,18 @@ static void toaplan1_set_scrolls(running_machine &machine)
|
||||
state->m_pf4_tilemap->set_scrolly(0, (state->m_pf4_scrolly >> 7) - (state->m_tiles_offsety - state->m_scrolly_offs));
|
||||
}
|
||||
|
||||
static void rallybik_flipscreen(running_machine &machine)
|
||||
void toaplan1_state::rallybik_flipscreen()
|
||||
{
|
||||
toaplan1_state *state = machine.driver_data<toaplan1_state>();
|
||||
address_space &space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
state->rallybik_bcu_flipscreen_w(space, 0, state->m_bcu_flipscreen, 0xffff);
|
||||
rallybik_bcu_flipscreen_w(space, 0, m_bcu_flipscreen, 0xffff);
|
||||
}
|
||||
|
||||
static void toaplan1_flipscreen(running_machine &machine)
|
||||
void toaplan1_state::toaplan1_flipscreen()
|
||||
{
|
||||
toaplan1_state *state = machine.driver_data<toaplan1_state>();
|
||||
address_space &space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
state->toaplan1_bcu_flipscreen_w(space, 0, state->m_bcu_flipscreen, 0xffff);
|
||||
toaplan1_bcu_flipscreen_w(space, 0, m_bcu_flipscreen, 0xffff);
|
||||
}
|
||||
|
||||
static void register_common(running_machine &machine)
|
||||
@ -350,7 +348,7 @@ VIDEO_START_MEMBER(toaplan1_state,rallybik)
|
||||
|
||||
register_common(machine());
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(rallybik_flipscreen), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan1_state::rallybik_flipscreen), this));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(toaplan1_state,toaplan1)
|
||||
@ -372,7 +370,7 @@ VIDEO_START_MEMBER(toaplan1_state,toaplan1)
|
||||
|
||||
register_common(machine());
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan1_flipscreen), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan1_state::toaplan1_flipscreen), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,10 +72,10 @@ static void register_state_save(running_machine &machine)
|
||||
state->save_item(NAME(state->m_tx_flip));
|
||||
}
|
||||
|
||||
static void truxton2_postload(running_machine &machine)
|
||||
void toaplan2_state::truxton2_postload()
|
||||
{
|
||||
for (int i = 0; i < 1024; i++)
|
||||
machine.gfx[2]->mark_dirty(i);
|
||||
machine().gfx[2]->mark_dirty(i);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(toaplan2_state,toaplan2)
|
||||
@ -108,7 +108,7 @@ VIDEO_START_MEMBER(toaplan2_state,truxton2)
|
||||
|
||||
/* Create the Text tilemap for this game */
|
||||
machine().gfx[2]->set_source(reinterpret_cast<UINT8 *>(m_tx_gfxram16.target()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(truxton2_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan2_state::truxton2_postload), this));
|
||||
|
||||
truxton2_create_tx_tilemap(machine());
|
||||
m_tx_tilemap->set_scrolldx(0x1d4 +1, 0x2a);
|
||||
@ -166,7 +166,7 @@ VIDEO_START_MEMBER(toaplan2_state,batrider)
|
||||
/* Create the Text tilemap for this game */
|
||||
m_tx_gfxram16.allocate(RAIZING_TX_GFXRAM_SIZE/2);
|
||||
machine().gfx[2]->set_source(reinterpret_cast<UINT8 *>(m_tx_gfxram16.target()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(truxton2_postload), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan2_state::truxton2_postload), this));
|
||||
|
||||
truxton2_create_tx_tilemap(machine());
|
||||
m_tx_tilemap->set_scrolldx(0x1d4, 0x2a);
|
||||
|
@ -211,15 +211,13 @@ TILE_GET_INFO_MEMBER(tumbleb_state::pangpang_get_fg_tile_info)
|
||||
}
|
||||
|
||||
|
||||
static void tumbleb_tilemap_redraw(running_machine &machine)
|
||||
void tumbleb_state::tumbleb_tilemap_redraw()
|
||||
{
|
||||
tumbleb_state *state = machine.driver_data<tumbleb_state>();
|
||||
|
||||
state->m_pf1_tilemap->mark_all_dirty();
|
||||
state->m_pf1_alt_tilemap->mark_all_dirty();
|
||||
state->m_pf2_tilemap->mark_all_dirty();
|
||||
if (state->m_pf2_alt_tilemap)
|
||||
state->m_pf2_alt_tilemap->mark_all_dirty();
|
||||
m_pf1_tilemap->mark_all_dirty();
|
||||
m_pf1_alt_tilemap->mark_all_dirty();
|
||||
m_pf2_tilemap->mark_all_dirty();
|
||||
if (m_pf2_alt_tilemap)
|
||||
m_pf2_alt_tilemap->mark_all_dirty();
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(tumbleb_state,pangpang)
|
||||
@ -231,7 +229,7 @@ VIDEO_START_MEMBER(tumbleb_state,pangpang)
|
||||
m_pf1_tilemap->set_transparent_pen(0);
|
||||
m_pf1_alt_tilemap->set_transparent_pen(0);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_tilemap_redraw), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_state::tumbleb_tilemap_redraw), this));
|
||||
}
|
||||
|
||||
|
||||
@ -244,7 +242,7 @@ VIDEO_START_MEMBER(tumbleb_state,tumblepb)
|
||||
m_pf1_tilemap->set_transparent_pen(0);
|
||||
m_pf1_alt_tilemap->set_transparent_pen(0);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_tilemap_redraw), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_state::tumbleb_tilemap_redraw), this));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(tumbleb_state,sdfight)
|
||||
@ -256,7 +254,7 @@ VIDEO_START_MEMBER(tumbleb_state,sdfight)
|
||||
m_pf1_tilemap->set_transparent_pen(0);
|
||||
m_pf1_alt_tilemap->set_transparent_pen(0);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_tilemap_redraw), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_state::tumbleb_tilemap_redraw), this));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(tumbleb_state,fncywld)
|
||||
@ -268,7 +266,7 @@ VIDEO_START_MEMBER(tumbleb_state,fncywld)
|
||||
m_pf1_tilemap->set_transparent_pen(15);
|
||||
m_pf1_alt_tilemap->set_transparent_pen(15);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_tilemap_redraw), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_state::tumbleb_tilemap_redraw), this));
|
||||
}
|
||||
|
||||
|
||||
@ -280,7 +278,7 @@ VIDEO_START_MEMBER(tumbleb_state,suprtrio)
|
||||
|
||||
m_pf1_alt_tilemap->set_transparent_pen(0);
|
||||
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_tilemap_redraw), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(tumbleb_state::tumbleb_tilemap_redraw), this));
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include "includes/twincobr.h"
|
||||
|
||||
|
||||
static void twincobr_restore_screen(running_machine &machine);
|
||||
|
||||
/* 6845 used for video sync signals only */
|
||||
MC6845_INTERFACE( twincobr_mc6845_intf )
|
||||
{
|
||||
@ -134,15 +132,13 @@ VIDEO_START_MEMBER(twincobr_state,toaplan0)
|
||||
state_save_register_global(machine(), m_bg_ram_bank);
|
||||
state_save_register_global(machine(), m_flip_screen);
|
||||
state_save_register_global(machine(), m_wardner_sprite_hack);
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(twincobr_restore_screen), &machine()));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(twincobr_state::twincobr_restore_screen), this));
|
||||
}
|
||||
|
||||
static void twincobr_restore_screen(running_machine &machine)
|
||||
void twincobr_state::twincobr_restore_screen()
|
||||
{
|
||||
twincobr_state *state = machine.driver_data<twincobr_state>();
|
||||
|
||||
twincobr_display(machine, state->m_display_on);
|
||||
twincobr_flipscreen(machine, state->m_flip_screen);
|
||||
twincobr_display(machine(), m_display_on);
|
||||
twincobr_flipscreen(machine(), m_flip_screen);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user