diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-25 14:46:52 +0000 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-25 14:46:52 +0000 |
commit | 3f89db06eb5e6fbaae4975755d362b26f176df4a (patch) | |
tree | 9d2e6c6cc1e0301fc1e43cfe6fc773fb8b382bc3 /src/mame/drivers | |
parent | d8bc866c4a7550ed1b596560125eb77edf618db3 (diff) |
Some manual cleanup (no whatsnew)
Diffstat (limited to 'src/mame/drivers')
-rw-r--r-- | src/mame/drivers/chinagat.c | 17 | ||||
-rw-r--r-- | src/mame/drivers/cps2.c | 44 | ||||
-rw-r--r-- | src/mame/drivers/ddenlovr.c | 15 | ||||
-rw-r--r-- | src/mame/drivers/eolith.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/eolith16.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/eolithsp.c | 4 | ||||
-rw-r--r-- | src/mame/drivers/galaga.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/mpu4hw.c | 11 | ||||
-rw-r--r-- | src/mame/drivers/saturn.c | 75 | ||||
-rw-r--r-- | src/mame/drivers/vegaeo.c | 2 |
10 files changed, 84 insertions, 90 deletions
diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c index 2d4e2a6b946..0edd9a1fe95 100644 --- a/src/mame/drivers/chinagat.c +++ b/src/mame/drivers/chinagat.c @@ -108,25 +108,24 @@ INLINE int scanline_to_vcount( int scanline ) return (vcount - 0x18) | 0x100; } -static TIMER_DEVICE_CALLBACK( chinagat_scanline ) +TIMER_DEVICE_CALLBACK_MEMBER(ddragon_state::chinagat_scanline) { - ddragon_state *state = timer.machine().driver_data<ddragon_state>(); int scanline = param; - int screen_height = timer.machine().primary_screen->height(); + int screen_height = machine().primary_screen->height(); int vcount_old = scanline_to_vcount((scanline == 0) ? screen_height - 1 : scanline - 1); int vcount = scanline_to_vcount(scanline); /* update to the current point */ if (scanline > 0) - timer.machine().primary_screen->update_partial(scanline - 1); + machine().primary_screen->update_partial(scanline - 1); /* on the rising edge of VBLK (vcount == F8), signal an NMI */ if (vcount == 0xf8) - state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); /* set 1ms signal on rising edge of vcount & 8 */ if (!(vcount_old & 8) && (vcount & 8)) - state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); + m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); /* adjust for next scanline */ if (++scanline >= screen_height) @@ -571,7 +570,7 @@ static MACHINE_CONFIG_START( chinagat, ddragon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD6309, MAIN_CLOCK / 2) /* 1.5 MHz (12MHz oscillator / 4 internally) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", chinagat_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, chinagat_scanline, "screen", 0, 1) MCFG_CPU_ADD("sub", HD6309, MAIN_CLOCK / 2) /* 1.5 MHz (12MHz oscillator / 4 internally) */ MCFG_CPU_PROGRAM_MAP(sub_map) @@ -611,7 +610,7 @@ static MACHINE_CONFIG_START( saiyugoub1, ddragon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK / 8) /* 68B09EP 1.5 MHz (12MHz oscillator) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", chinagat_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, chinagat_scanline, "screen", 0, 1) MCFG_CPU_ADD("sub", M6809, MAIN_CLOCK / 8) /* 68B09EP 1.5 MHz (12MHz oscillator) */ MCFG_CPU_PROGRAM_MAP(sub_map) @@ -656,7 +655,7 @@ static MACHINE_CONFIG_START( saiyugoub2, ddragon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK / 8) /* 1.5 MHz (12MHz oscillator) */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", chinagat_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, chinagat_scanline, "screen", 0, 1) MCFG_CPU_ADD("sub", M6809, MAIN_CLOCK / 8) /* 1.5 MHz (12MHz oscillator) */ MCFG_CPU_PROGRAM_MAP(sub_map) diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index a9bbed77c92..833e4e3c1d5 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -621,57 +621,55 @@ Stephh's inputs notes (based on some tests on the "parent" set) : * *************************************/ -static TIMER_DEVICE_CALLBACK( cps2_interrupt ) +TIMER_DEVICE_CALLBACK_MEMBER(cps_state::cps2_interrupt) { - cps_state *state = timer.machine().driver_data<cps_state>(); - /* 2 is vblank, 4 is some sort of scanline interrupt, 6 is both at the same time. */ if (param == 0) - state->m_scancalls = 0; + m_scancalls = 0; - if (state->m_cps_b_regs[0x10 / 2] & 0x8000) - state->m_cps_b_regs[0x10 / 2] &= 0x1ff; + if (m_cps_b_regs[0x10 / 2] & 0x8000) + m_cps_b_regs[0x10 / 2] &= 0x1ff; - if (state->m_cps_b_regs[0x12 / 2] & 0x8000) - state->m_cps_b_regs[0x12 / 2] &= 0x1ff; + if (m_cps_b_regs[0x12 / 2] & 0x8000) + m_cps_b_regs[0x12 / 2] &= 0x1ff; -// popmessage("%04x %04x - %04x %04x",state->m_scanline1,state->m_scanline2,state->m_cps_b_regs[0x10/2],state->m_cps_b_regs[0x12/2]); +// popmessage("%04x %04x - %04x %04x",m_scanline1,m_scanline2,m_cps_b_regs[0x10/2],m_cps_b_regs[0x12/2]); /* raster effects */ - if (state->m_scanline1 == param || (state->m_scanline1 < param && !state->m_scancalls)) + if (m_scanline1 == param || (m_scanline1 < param && !m_scancalls)) { - state->m_cps_b_regs[0x10/2] = 0; - state->m_maincpu->set_input_line(4, HOLD_LINE); + m_cps_b_regs[0x10/2] = 0; + m_maincpu->set_input_line(4, HOLD_LINE); cps2_set_sprite_priorities(timer.machine()); timer.machine().primary_screen->update_partial(param); - state->m_scancalls++; + m_scancalls++; // popmessage("IRQ4 scancounter = %04i", param); } /* raster effects */ - if(state->m_scanline2 == param || (state->m_scanline2 < param && !state->m_scancalls)) + if(m_scanline2 == param || (m_scanline2 < param && !m_scancalls)) { - state->m_cps_b_regs[0x12 / 2] = 0; - state->m_maincpu->set_input_line(4, HOLD_LINE); + m_cps_b_regs[0x12 / 2] = 0; + m_maincpu->set_input_line(4, HOLD_LINE); cps2_set_sprite_priorities(timer.machine()); timer.machine().primary_screen->update_partial(param); - state->m_scancalls++; + m_scancalls++; // popmessage("IRQ4 scancounter = %04i", param); } if (param == 240) /* VBlank */ { - state->m_cps_b_regs[0x10 / 2] = state->m_scanline1; - state->m_cps_b_regs[0x12 / 2] = state->m_scanline2; - state->m_maincpu->set_input_line(2, HOLD_LINE); - if(state->m_scancalls) + m_cps_b_regs[0x10 / 2] = m_scanline1; + m_cps_b_regs[0x12 / 2] = m_scanline2; + m_maincpu->set_input_line(2, HOLD_LINE); + if(m_scancalls) { cps2_set_sprite_priorities(timer.machine()); timer.machine().primary_screen->update_partial(256); } cps2_objram_latch(timer.machine()); } -// popmessage("Raster calls = %i", state->m_scancalls); +// popmessage("Raster calls = %i", m_scancalls); } @@ -1226,7 +1224,7 @@ static MACHINE_CONFIG_START( cps2, cps_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(cps2_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", cps2_interrupt, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cps_state, cps2_interrupt, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", Z80, 8000000) MCFG_CPU_PROGRAM_MAP(qsound_sub_map) diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index 4c6448fa14a..e6e3c015dff 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -8931,22 +8931,21 @@ MACHINE_CONFIG_END to trigger the blitter irq every frame. */ -static TIMER_DEVICE_CALLBACK( mjmyster_irq ) +TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::mjmyster_irq) { - dynax_state *state = timer.machine().driver_data<dynax_state>(); int scanline = param; /* I haven't found a irq ack register, so I need this kludge to make sure I don't lose any interrupt generated by the blitter, otherwise quizchq would lock up. */ - if (downcast<cpu_device *>(state->m_maincpu)->input_state(0)) + if (downcast<cpu_device *>(m_maincpu)->input_state(0)) return; if(scanline == 245) - state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8); + m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf8); if(scanline == 0) - state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa); + m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xfa); } static const ay8910_interface mjmyster_ay8910_interface = @@ -8985,7 +8984,7 @@ static MACHINE_CONFIG_DERIVED( mjmyster, quizchq ) MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* Verified */ MCFG_CPU_PROGRAM_MAP(mjmyster_map) MCFG_CPU_IO_MAP(mjmyster_portmap) - MCFG_TIMER_ADD_SCANLINE("scantimer", mjmyster_irq, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, mjmyster_irq, "screen", 0, 1) MCFG_DEVICE_MODIFY("rtc") MCFG_DEVICE_CONFIG(mjmyster_rtc_intf) @@ -9108,7 +9107,7 @@ static MACHINE_CONFIG_DERIVED( mjmyuniv, quizchq ) MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* Verified */ MCFG_CPU_PROGRAM_MAP(mjmyster_map) MCFG_CPU_IO_MAP(mjmyster_portmap) - MCFG_TIMER_ADD_SCANLINE("scantimer", mjmyster_irq, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, mjmyster_irq, "screen", 0, 1) MCFG_MACHINE_START_OVERRIDE(dynax_state,mjmyster) @@ -9128,7 +9127,7 @@ static MACHINE_CONFIG_DERIVED( mjmyornt, quizchq ) MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* Verified */ MCFG_CPU_PROGRAM_MAP(quizchq_map) MCFG_CPU_IO_MAP(mjmyster_portmap) - MCFG_TIMER_ADD_SCANLINE("scantimer", mjmyster_irq, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, mjmyster_irq, "screen", 0, 1) MCFG_MACHINE_START_OVERRIDE(dynax_state,mjmyster) diff --git a/src/mame/drivers/eolith.c b/src/mame/drivers/eolith.c index 9e1004d51ad..b6cceefb70a 100644 --- a/src/mame/drivers/eolith.c +++ b/src/mame/drivers/eolith.c @@ -571,7 +571,7 @@ static QS1000_INTERFACE( qs1000_intf ) static MACHINE_CONFIG_START( eolith45, eolith_state ) MCFG_CPU_ADD("maincpu", E132N, 45000000) /* 45 MHz */ MCFG_CPU_PROGRAM_MAP(eolith_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", eolith_speedup, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", eolith_state, eolith_speedup, "screen", 0, 1) /* Sound CPU */ MCFG_CPU_ADD("soundcpu", I8032, XTAL_12MHz) diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c index 2dd5fa938ff..b7e987a5d35 100644 --- a/src/mame/drivers/eolith16.c +++ b/src/mame/drivers/eolith16.c @@ -179,7 +179,7 @@ PALETTE_INIT_MEMBER(eolith16_state,eolith16) static MACHINE_CONFIG_START( eolith16, eolith16_state ) MCFG_CPU_ADD("maincpu", E116T, 60000000) /* no internal multiplier */ MCFG_CPU_PROGRAM_MAP(eolith16_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", eolith_speedup, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", eolith16_state, eolith_speedup, "screen", 0, 1) MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C66) diff --git a/src/mame/drivers/eolithsp.c b/src/mame/drivers/eolithsp.c index cd5b1abcd59..45034ec53fe 100644 --- a/src/mame/drivers/eolithsp.c +++ b/src/mame/drivers/eolithsp.c @@ -87,7 +87,7 @@ void init_eolith_speedup(running_machine &machine) } /* todo, use timers instead! */ -TIMER_DEVICE_CALLBACK( eolith_speedup ) +TIMER_DEVICE_CALLBACK_MEMBER(eolith_state::eolith_speedup) { if (param==0) { @@ -96,7 +96,7 @@ TIMER_DEVICE_CALLBACK( eolith_speedup ) if (param==eolith_speedup_resume_scanline) { - timer.machine().scheduler().trigger(1000); + machine().scheduler().trigger(1000); } if (param==240) diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c index 46246a34661..5de0602a2fb 100644 --- a/src/mame/drivers/galaga.c +++ b/src/mame/drivers/galaga.c @@ -1872,7 +1872,7 @@ static MACHINE_CONFIG_DERIVED( battles, xevious ) MCFG_CPU_PROGRAM_MAP(battles_mem4) MCFG_CPU_VBLANK_INT_DRIVER("screen", xevious_state, battles_interrupt_4) - MCFG_TIMER_ADD("battles_nmi", battles_nmi_generate) + MCFG_TIMER_DRIVER_ADD("battles_nmi", xevious_state, battles_nmi_generate) MCFG_MACHINE_RESET_OVERRIDE(xevious_state,battles) diff --git a/src/mame/drivers/mpu4hw.c b/src/mame/drivers/mpu4hw.c index 516fed437f8..b8670b27e4c 100644 --- a/src/mame/drivers/mpu4hw.c +++ b/src/mame/drivers/mpu4hw.c @@ -2661,16 +2661,15 @@ DRIVER_INIT_MEMBER(mpu4_state,crystali) } /* generate a 50 Hz signal (based on an RC time) */ -TIMER_DEVICE_CALLBACK( gen_50hz ) +TIMER_DEVICE_CALLBACK_MEMBER(mpu4_state::gen_50hz) { - mpu4_state *state = timer.machine().driver_data<mpu4_state>(); /* Although reported as a '50Hz' signal, the fact that both rising and falling edges of the pulse are used means the timer actually gives a 100Hz oscillating signal.*/ - state->m_signal_50hz = state->m_signal_50hz?0:1; - timer.machine().device<pia6821_device>("pia_ic4")->ca1_w(state->m_signal_50hz); /* signal is connected to IC4 CA1 */ + m_signal_50hz = m_signal_50hz?0:1; + machine().device<pia6821_device>("pia_ic4")->ca1_w(m_signal_50hz); /* signal is connected to IC4 CA1 */ - update_meters(state);//run at 100Hz to sync with PIAs + update_meters(this);//run at 100Hz to sync with PIAs } static ADDRESS_MAP_START( mpu4_memmap, AS_PROGRAM, 8, mpu4_state ) @@ -2699,7 +2698,7 @@ const ay8910_interface ay8910_config = }; MACHINE_CONFIG_FRAGMENT( mpu4_common ) - MCFG_TIMER_ADD_PERIODIC("50hz",gen_50hz, attotime::from_hz(100)) + MCFG_TIMER_DRIVER_ADD_PERIODIC("50hz", mpu4_state, gen_50hz, attotime::from_hz(100)) MCFG_MSC1937_ADD("vfd",0,LEFT_TO_RIGHT) /* 6840 PTM */ diff --git a/src/mame/drivers/saturn.c b/src/mame/drivers/saturn.c index dbab842a390..dd64d7b8589 100644 --- a/src/mame/drivers/saturn.c +++ b/src/mame/drivers/saturn.c @@ -1856,116 +1856,115 @@ TODO: */ -static TIMER_DEVICE_CALLBACK( saturn_scanline ) +TIMER_DEVICE_CALLBACK_MEMBER(saturn_state::saturn_scanline) { - saturn_state *state = timer.machine().driver_data<saturn_state>(); + saturn_state *state = machine().driver_data<saturn_state>(); int scanline = param; int max_y = timer.machine().primary_screen->height(); int y_step,vblank_line; y_step = 2; - if((max_y == 263 && state->m_vdp2.pal == 0) || (max_y == 313 && state->m_vdp2.pal == 1)) + if((max_y == 263 && m_vdp2.pal == 0) || (max_y == 313 && m_vdp2.pal == 1)) y_step = 1; - vblank_line = (state->m_vdp2.pal) ? 288 : 240; + vblank_line = (m_vdp2.pal) ? 288 : 240; - //popmessage("%08x %d T0 %d T1 %d %08x",state->m_scu.ism ^ 0xffffffff,max_y,state->m_scu_regs[36],state->m_scu_regs[37],state->m_scu_regs[38]); + //popmessage("%08x %d T0 %d T1 %d %08x",m_scu.ism ^ 0xffffffff,max_y,m_scu_regs[36],m_scu_regs[37],m_scu_regs[38]); if(scanline == (0)*y_step) { video_update_vdp1(timer.machine()); if(STV_VDP1_VBE) - state->m_vdp1.framebuffer_clear_on_next_frame = 1; + m_vdp1.framebuffer_clear_on_next_frame = 1; - if(!(state->m_scu.ism & IRQ_VDP1_END)) + if(!(m_scu.ism & IRQ_VDP1_END)) { - state->m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d); + m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d); scu_do_transfer(timer.machine(),6); } else - state->m_scu.ist |= (IRQ_VDP1_END); + m_scu.ist |= (IRQ_VDP1_END); } if(scanline == 0*y_step) { - if(!(state->m_scu.ism & IRQ_VBLANK_OUT)) + if(!(m_scu.ism & IRQ_VBLANK_OUT)) { - state->m_maincpu->set_input_line_and_vector(0xe, HOLD_LINE, 0x41); + m_maincpu->set_input_line_and_vector(0xe, HOLD_LINE, 0x41); scu_do_transfer(timer.machine(),1); } else - state->m_scu.ist |= (IRQ_VBLANK_OUT); + m_scu.ist |= (IRQ_VBLANK_OUT); } else if(scanline == vblank_line*y_step) { - if(!(state->m_scu.ism & IRQ_VBLANK_IN)) + if(!(m_scu.ism & IRQ_VBLANK_IN)) { - state->m_maincpu->set_input_line_and_vector(0xf, HOLD_LINE ,0x40); + m_maincpu->set_input_line_and_vector(0xf, HOLD_LINE ,0x40); scu_do_transfer(timer.machine(),0); } else - state->m_scu.ist |= (IRQ_VBLANK_IN); + m_scu.ist |= (IRQ_VBLANK_IN); } else if((scanline % y_step) == 0 && scanline < vblank_line*y_step) { - if(!(state->m_scu.ism & IRQ_HBLANK_IN)) + if(!(m_scu.ism & IRQ_HBLANK_IN)) { - state->m_maincpu->set_input_line_and_vector(0xd, HOLD_LINE, 0x42); + m_maincpu->set_input_line_and_vector(0xd, HOLD_LINE, 0x42); scu_do_transfer(timer.machine(),2); } else - state->m_scu.ist |= (IRQ_HBLANK_IN); + m_scu.ist |= (IRQ_HBLANK_IN); } - if(scanline == (state->m_scu_regs[36] & 0x3ff)*y_step) + if(scanline == (m_scu_regs[36] & 0x3ff)*y_step) { - if(!(state->m_scu.ism & IRQ_TIMER_0)) + if(!(m_scu.ism & IRQ_TIMER_0)) { - state->m_maincpu->set_input_line_and_vector(0xc, HOLD_LINE, 0x43 ); + m_maincpu->set_input_line_and_vector(0xc, HOLD_LINE, 0x43 ); scu_do_transfer(timer.machine(),3); } else - state->m_scu.ist |= (IRQ_TIMER_0); + m_scu.ist |= (IRQ_TIMER_0); } /* TODO: this isn't completely correct */ - if(state->m_scu_regs[38] & 0x1) + if(m_scu_regs[38] & 0x1) { - if((!(state->m_scu_regs[38] & 0x100) && (scanline % y_step) == 0) || - ((state->m_scu_regs[38] & 0x100) && (scanline == (state->m_scu_regs[36] & 0x3ff)*y_step))) + if((!(m_scu_regs[38] & 0x100) && (scanline % y_step) == 0) || + ((m_scu_regs[38] & 0x100) && (scanline == (m_scu_regs[36] & 0x3ff)*y_step))) { - if(!(state->m_scu.ism & IRQ_TIMER_1)) + if(!(m_scu.ism & IRQ_TIMER_1)) { - state->m_maincpu->set_input_line_and_vector(0xb, HOLD_LINE, 0x44 ); + m_maincpu->set_input_line_and_vector(0xb, HOLD_LINE, 0x44 ); scu_do_transfer(timer.machine(),4); } else - state->m_scu.ist |= (IRQ_TIMER_1); + m_scu.ist |= (IRQ_TIMER_1); } } } -static TIMER_DEVICE_CALLBACK( saturn_slave_scanline ) +TIMER_DEVICE_CALLBACK_MEMBER(saturn_state::saturn_slave_scanline ) { - saturn_state *state = timer.machine().driver_data<saturn_state>(); int scanline = param; int max_y = timer.machine().primary_screen->height(); int y_step,vblank_line; y_step = 2; - if((max_y == 263 && state->m_vdp2.pal == 0) || (max_y == 313 && state->m_vdp2.pal == 1)) + if((max_y == 263 && m_vdp2.pal == 0) || (max_y == 313 && m_vdp2.pal == 1)) y_step = 1; - vblank_line = (state->m_vdp2.pal) ? 288 : 240; + vblank_line = (m_vdp2.pal) ? 288 : 240; if(scanline == vblank_line*y_step) - state->m_slave->set_input_line_and_vector(0x6, HOLD_LINE, 0x43); + m_slave->set_input_line_and_vector(0x6, HOLD_LINE, 0x43); else if((scanline % y_step) == 0 && scanline < vblank_line*y_step) - state->m_slave->set_input_line_and_vector(0x2, HOLD_LINE, 0x41); + m_slave->set_input_line_and_vector(0x2, HOLD_LINE, 0x41); } /* Die Hard Trilogy tests RAM address 0x25e7ffe bit 2 with Slave during FRT minit irq, in-development tool for breaking execution of it? */ @@ -2185,12 +2184,12 @@ static MACHINE_CONFIG_START( saturn, saturn_state ) MCFG_CPU_ADD("maincpu", SH2, MASTER_CLOCK_352/2) // 28.6364 MHz MCFG_CPU_PROGRAM_MAP(saturn_mem) MCFG_CPU_CONFIG(sh2_conf_master) - MCFG_TIMER_ADD_SCANLINE("scantimer", saturn_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", saturn_state, saturn_scanline, "screen", 0, 1) MCFG_CPU_ADD("slave", SH2, MASTER_CLOCK_352/2) // 28.6364 MHz MCFG_CPU_PROGRAM_MAP(saturn_mem) MCFG_CPU_CONFIG(sh2_conf_slave) - MCFG_TIMER_ADD_SCANLINE("slave_scantimer", saturn_slave_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_scantimer", saturn_state, saturn_slave_scanline, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", M68000, 11289600) //256 x 44100 Hz = 11.2896 MHz MCFG_CPU_PROGRAM_MAP(sound_mem) @@ -2273,12 +2272,12 @@ static MACHINE_CONFIG_START( stv, saturn_state ) MCFG_CPU_ADD("maincpu", SH2, MASTER_CLOCK_352/2) // 28.6364 MHz MCFG_CPU_PROGRAM_MAP(stv_mem) MCFG_CPU_CONFIG(sh2_conf_master) - MCFG_TIMER_ADD_SCANLINE("scantimer", saturn_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", saturn_state, saturn_scanline, "screen", 0, 1) MCFG_CPU_ADD("slave", SH2, MASTER_CLOCK_352/2) // 28.6364 MHz MCFG_CPU_PROGRAM_MAP(stv_mem) MCFG_CPU_CONFIG(sh2_conf_slave) - MCFG_TIMER_ADD_SCANLINE("slave_scantimer", saturn_slave_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_scantimer", saturn_state, saturn_slave_scanline, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", M68000, 11289600) //11.2896 MHz MCFG_CPU_PROGRAM_MAP(sound_mem) diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c index 834bc818300..d3b558f276e 100644 --- a/src/mame/drivers/vegaeo.c +++ b/src/mame/drivers/vegaeo.c @@ -251,7 +251,7 @@ static QS1000_INTERFACE( qs1000_intf ) static MACHINE_CONFIG_START( vega, vegaeo_state ) MCFG_CPU_ADD("maincpu", GMS30C2132, XTAL_55MHz) MCFG_CPU_PROGRAM_MAP(vega_map) - MCFG_TIMER_ADD_SCANLINE("scantimer", eolith_speedup, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", vegaeo_state, eolith_speedup, "screen", 0, 1) MCFG_AT28C16_ADD("at28c16", NULL) |