mirror of
https://github.com/holub/mame
synced 2025-06-07 05:13:46 +03:00
TIMER_CALLBACK_DEVICE_MEMBER modernization part 1 (no whatsnew)
This commit is contained in:
parent
b29b84dd77
commit
6c40f0f292
@ -869,18 +869,17 @@ WRITE8_MEMBER(_8080bw_state::schaser_sh_port_2_w)
|
||||
}
|
||||
|
||||
|
||||
TIMER_DEVICE_CALLBACK( schaser_effect_555_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::schaser_effect_555_cb)
|
||||
{
|
||||
_8080bw_state *state = timer.machine().driver_data<_8080bw_state>();
|
||||
int effect = param;
|
||||
attotime new_time;
|
||||
|
||||
/* Toggle 555 output */
|
||||
state->m_schaser_effect_555_is_low = !state->m_schaser_effect_555_is_low;
|
||||
state->m_schaser_effect_555_time_remain = attotime::zero;
|
||||
state->m_schaser_effect_555_time_remain_savable = state->m_schaser_effect_555_time_remain.as_double();
|
||||
m_schaser_effect_555_is_low = !m_schaser_effect_555_is_low;
|
||||
m_schaser_effect_555_time_remain = attotime::zero;
|
||||
m_schaser_effect_555_time_remain_savable = m_schaser_effect_555_time_remain.as_double();
|
||||
|
||||
if (state->m_schaser_effect_555_is_low)
|
||||
if (m_schaser_effect_555_is_low)
|
||||
new_time = PERIOD_OF_555_ASTABLE(0, RES_K(20), CAP_U(1)) / 2;
|
||||
else
|
||||
{
|
||||
@ -889,9 +888,9 @@ TIMER_DEVICE_CALLBACK( schaser_effect_555_cb )
|
||||
else
|
||||
new_time = attotime::never;
|
||||
}
|
||||
state->m_schaser_effect_555_timer->adjust(new_time, effect);
|
||||
sn76477_enable_w(state->m_sn, !(state->m_schaser_effect_555_is_low || state->m_schaser_explosion));
|
||||
sn76477_one_shot_cap_voltage_w(state->m_sn, !(state->m_schaser_effect_555_is_low || state->m_schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT);
|
||||
m_schaser_effect_555_timer->adjust(new_time, effect);
|
||||
sn76477_enable_w(m_sn, !(m_schaser_effect_555_is_low || m_schaser_explosion));
|
||||
sn76477_one_shot_cap_voltage_w(m_sn, !(m_schaser_effect_555_is_low || m_schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT);
|
||||
}
|
||||
|
||||
|
||||
|
@ -426,33 +426,31 @@ WRITE8_MEMBER(n8080_state::helifire_sound_ctrl_w)
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( spacefev_vco_voltage_timer )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::spacefev_vco_voltage_timer)
|
||||
{
|
||||
device_t *sn = timer.machine().device("snsnd");
|
||||
n8080_state *state = timer.machine().driver_data<n8080_state>();
|
||||
device_t *sn = machine().device("snsnd");
|
||||
double voltage = 0;
|
||||
|
||||
if (state->m_mono_flop[2])
|
||||
if (m_mono_flop[2])
|
||||
{
|
||||
voltage = 5 * (1 - exp(- state->m_sound_timer[2]->elapsed().as_double() / 0.22));
|
||||
voltage = 5 * (1 - exp(- m_sound_timer[2]->elapsed().as_double() / 0.22));
|
||||
}
|
||||
|
||||
sn76477_vco_voltage_w(sn, voltage);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( helifire_dac_volume_timer )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::helifire_dac_volume_timer)
|
||||
{
|
||||
n8080_state *state = timer.machine().driver_data<n8080_state>();
|
||||
double t = state->m_helifire_dac_timing - timer.machine().time().as_double();
|
||||
double t = m_helifire_dac_timing - machine().time().as_double();
|
||||
|
||||
if (state->m_helifire_dac_phase)
|
||||
if (m_helifire_dac_phase)
|
||||
{
|
||||
state->m_helifire_dac_volume = 1 - exp(t / ATTACK_RATE);
|
||||
m_helifire_dac_volume = 1 - exp(t / ATTACK_RATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_helifire_dac_volume = exp(t / DECAY_RATE);
|
||||
m_helifire_dac_volume = exp(t / DECAY_RATE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -577,7 +575,7 @@ MACHINE_CONFIG_FRAGMENT( spacefev_sound )
|
||||
MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map)
|
||||
MCFG_CPU_IO_MAP(n8080_sound_io_map)
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("vco_timer", spacefev_vco_voltage_timer, attotime::from_hz(1000))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("vco_timer", n8080_state, spacefev_vco_voltage_timer, attotime::from_hz(1000))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -617,7 +615,7 @@ MACHINE_CONFIG_FRAGMENT( helifire_sound )
|
||||
MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map)
|
||||
MCFG_CPU_IO_MAP(helifire_sound_io_map)
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("helifire_dac", helifire_dac_volume_timer, attotime::from_hz(1000) )
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -74,15 +74,15 @@ WRITE8_MEMBER(_1942_state::c1942_bankswitch_w)
|
||||
membank("bank1")->set_entry(data & 0x03);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( c1942_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(_1942_state::c1942_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
|
||||
|
||||
if(scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch)
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ static MACHINE_CONFIG_START( 1942, _1942_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, MAIN_CPU_CLOCK) /* 4 MHz ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(c1942_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", c1942_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", _1942_state, c1942_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 3 MHz ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -1067,7 +1067,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( schaser, mw8080bw_root, _8080bw_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(_8080bw_state,schaser)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,schaser)
|
||||
|
||||
MCFG_TIMER_ADD("schaser_sh_555", schaser_effect_555_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("schaser_sh_555", _8080bw_state, schaser_effect_555_cb)
|
||||
|
||||
/* add shifter */
|
||||
MCFG_MB14241_ADD("mb14241")
|
||||
@ -2341,12 +2341,11 @@ Claybuster is on the same hardware, PCB labels CS 235A and CS 238A as well
|
||||
|
||||
*/
|
||||
|
||||
TIMER_DEVICE_CALLBACK( claybust_gun_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::claybust_gun_callback)
|
||||
{
|
||||
_8080bw_state *state = timer.machine().driver_data<_8080bw_state>();
|
||||
|
||||
// reset gun latch
|
||||
state->m_claybust_gun_pos = 0;
|
||||
m_claybust_gun_pos = 0;
|
||||
}
|
||||
|
||||
CUSTOM_INPUT_MEMBER(_8080bw_state::claybust_gun_on_r)
|
||||
@ -2460,7 +2459,7 @@ MACHINE_CONFIG_DERIVED_CLASS( claybust, invaders, _8080bw_state )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_IO_MAP(claybust_io_map)
|
||||
|
||||
MCFG_TIMER_ADD("claybust_gun", claybust_gun_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("claybust_gun", _8080bw_state, claybust_gun_callback)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(_8080bw_state, claybust)
|
||||
|
||||
|
@ -548,16 +548,16 @@ static const ym2203_interface ym2203_config =
|
||||
/* Interrupt Generators */
|
||||
|
||||
/* Main Z80 uses IM2 */
|
||||
static TIMER_DEVICE_CALLBACK( airbustr_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(airbustr_state::airbustr_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
|
||||
/* Pandora "sprite end dma" irq? TODO: timing is likely off */
|
||||
if(scanline == 64)
|
||||
timer.machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
|
||||
machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
|
||||
}
|
||||
|
||||
/* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */
|
||||
@ -625,7 +625,7 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
|
||||
MCFG_CPU_ADD("master", Z80, 6000000) // ???
|
||||
MCFG_CPU_PROGRAM_MAP(master_map)
|
||||
MCFG_CPU_IO_MAP(master_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", airbustr_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", airbustr_state, airbustr_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("slave", Z80, 6000000) // ???
|
||||
MCFG_CPU_PROGRAM_MAP(slave_map)
|
||||
|
@ -129,26 +129,26 @@ Known issues :
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( argus_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(argus_state::argus_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
|
||||
if(scanline == 16) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( butasan_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(argus_state::butasan_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 248) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
|
||||
if(scanline == 8) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
/* Handler called by the YM2203 emulator when the internal timers cause an IRQ */
|
||||
@ -545,7 +545,7 @@ static MACHINE_CONFIG_START( argus, argus_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 4 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(argus_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", argus_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, argus_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 5000000)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map_a)
|
||||
@ -589,7 +589,7 @@ static MACHINE_CONFIG_START( valtric, argus_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(valtric_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", argus_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, argus_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 5000000)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map_a)
|
||||
@ -633,7 +633,7 @@ static MACHINE_CONFIG_START( butasan, argus_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(butasan_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", butasan_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, butasan_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 5000000)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map_b)
|
||||
|
@ -87,10 +87,9 @@ READ8_MEMBER(astrof_state::irq_clear_r)
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( irq_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(astrof_state::irq_callback)
|
||||
{
|
||||
astrof_state *state = timer.machine().driver_data<astrof_state>();
|
||||
state->m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -943,7 +942,7 @@ static MACHINE_CONFIG_START( base, astrof_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK)
|
||||
MCFG_TIMER_ADD_SCANLINE("vblank", irq_callback, "screen", VBSTART, 0)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("vblank", astrof_state, irq_callback, "screen", VBSTART, 0)
|
||||
|
||||
/* video hardware */
|
||||
|
||||
|
@ -250,12 +250,11 @@ MACHINE_RESET_MEMBER(atarisy1_state,atarisy1)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( delayed_joystick_int )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::delayed_joystick_int)
|
||||
{
|
||||
atarisy1_state *state = timer.machine().driver_data<atarisy1_state>();
|
||||
state->m_joystick_value = param;
|
||||
state->m_joystick_int = 1;
|
||||
atarigen_update_interrupts(timer.machine());
|
||||
m_joystick_value = param;
|
||||
m_joystick_int = 1;
|
||||
atarigen_update_interrupts(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -771,10 +770,10 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(atarisy1_state,atarisy1)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("joystick_timer", delayed_joystick_int)
|
||||
MCFG_TIMER_ADD("scan_timer", atarisy1_int3_callback)
|
||||
MCFG_TIMER_ADD("int3off_timer", atarisy1_int3off_callback)
|
||||
MCFG_TIMER_ADD("yreset_timer", atarisy1_reset_yscroll_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("joystick_timer", atarisy1_state, delayed_joystick_int)
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", atarisy1_state, atarisy1_int3_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("int3off_timer", atarisy1_state, atarisy1_int3off_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("yreset_timer", atarisy1_state, atarisy1_reset_yscroll_callback)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -1212,10 +1212,10 @@ static MACHINE_CONFIG_START( balsente, balsente_state )
|
||||
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD("scan_timer", balsente_interrupt_timer)
|
||||
MCFG_TIMER_ADD("8253_0_timer", balsente_clock_counter_0_ff)
|
||||
MCFG_TIMER_ADD("8253_1_timer", balsente_counter_callback)
|
||||
MCFG_TIMER_ADD("8253_2_timer", balsente_counter_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", balsente_state, balsente_interrupt_timer)
|
||||
MCFG_TIMER_DRIVER_ADD("8253_0_timer", balsente_state, balsente_clock_counter_0_ff)
|
||||
MCFG_TIMER_DRIVER_ADD("8253_1_timer", balsente_state, balsente_counter_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("8253_2_timer", balsente_state, balsente_counter_callback)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -234,7 +234,7 @@ static MACHINE_CONFIG_START( battlera, battlera_state )
|
||||
MCFG_CPU_ADD("maincpu", H6280,21477200/3)
|
||||
MCFG_CPU_PROGRAM_MAP(battlera_map)
|
||||
MCFG_CPU_IO_MAP(battlera_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", battlera_irq, "screen", 0, 1) /* 8 prelines, 232 lines, 16 vblank? */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", battlera_state, battlera_irq, "screen", 0, 1) /* 8 prelines, 232 lines, 16 vblank? */
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", H6280,21477200/3)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -144,17 +144,16 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( scanline_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback)
|
||||
{
|
||||
beathead_state *state = timer.machine().driver_data<beathead_state>();
|
||||
int scanline = param;
|
||||
|
||||
/* update the video */
|
||||
timer.machine().primary_screen->update_now();
|
||||
machine().primary_screen->update_now();
|
||||
|
||||
/* on scanline zero, clear any halt condition */
|
||||
if (scanline == 0)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
|
||||
/* wrap around at 262 */
|
||||
scanline++;
|
||||
@ -162,11 +161,11 @@ static TIMER_DEVICE_CALLBACK( scanline_callback )
|
||||
scanline = 0;
|
||||
|
||||
/* set the scanline IRQ */
|
||||
state->m_irq_state[2] = 1;
|
||||
state->update_interrupts();
|
||||
m_irq_state[2] = 1;
|
||||
update_interrupts();
|
||||
|
||||
/* set the timer for the next one */
|
||||
timer.adjust(timer.machine().primary_screen->time_until_pos(scanline) - state->m_hblank_offset, scanline);
|
||||
timer.adjust(machine().primary_screen->time_until_pos(scanline) - m_hblank_offset, scanline);
|
||||
}
|
||||
|
||||
|
||||
@ -436,7 +435,7 @@ static MACHINE_CONFIG_START( beathead, beathead_state )
|
||||
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD("scan_timer", scanline_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", beathead_state, scanline_callback)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -88,7 +88,7 @@ static MACHINE_CONFIG_START( beezer, beezer_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6809, 1000000) /* 1 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", beezer_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", beezer_state, beezer_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6809, 1000000) /* 1 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -123,15 +123,15 @@ READ16_MEMBER(bionicc_state::hacked_soundcommand_r)
|
||||
|
||||
********************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( bionicc_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(bionicc_state::bionicc_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
|
||||
if(scanline == 0) // vblank-in or i8751 related irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -354,7 +354,7 @@ static MACHINE_CONFIG_START( bionicc, bionicc_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 2) /* 12 MHz - verified in schematics */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bionicc_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bionicc_state, bionicc_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, EXO3_F0_CLK / 4) /* EXO3 C,B=GND, A=5V ==> Divisor 2^2 */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -106,18 +106,17 @@ WRITE16_MEMBER(bishi_state::control2_w)
|
||||
COMBINE_DATA(&m_cur_control2);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( bishi_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(bishi_state::bishi_scanline)
|
||||
{
|
||||
bishi_state *state = timer.machine().driver_data<bishi_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (state->m_cur_control & 0x800)
|
||||
if (m_cur_control & 0x800)
|
||||
{
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_3, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_IRQ_3, HOLD_LINE);
|
||||
|
||||
if(scanline == 0) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,7 +410,7 @@ static MACHINE_CONFIG_START( bishi, bishi_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) /* 12MHz (24MHz OSC / 2 ) */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bishi_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bishi_state, bishi_scanline, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
|
@ -36,16 +36,15 @@
|
||||
#include "includes/bladestl.h"
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( bladestl_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(bladestl_state::bladestl_scanline)
|
||||
{
|
||||
bladestl_state *state = timer.machine().driver_data<bladestl_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && k007342_is_int_enabled(state->m_k007342)) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(HD6309_FIRQ_LINE, HOLD_LINE);
|
||||
if(scanline == 240 && k007342_is_int_enabled(m_k007342)) // vblank-out irq
|
||||
machine().device("maincpu")->execute().set_input_line(HD6309_FIRQ_LINE, HOLD_LINE);
|
||||
|
||||
if(scanline == 0) // vblank-in or timer irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
@ -333,7 +332,7 @@ static MACHINE_CONFIG_START( bladestl, bladestl_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, 24000000/2) /* 24MHz/2 (?) */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bladestl_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bladestl_state, bladestl_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6809, 2000000)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -293,16 +293,15 @@ void blockout_state::machine_reset()
|
||||
m_color = 0;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( blockout_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(blockout_state::blockout_scanline)
|
||||
{
|
||||
blockout_state *state = timer.machine().driver_data<blockout_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 248) // vblank-out irq
|
||||
state->m_maincpu->set_input_line(6, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(6, ASSERT_LINE);
|
||||
|
||||
if(scanline == 0) // vblank-in irq or directly tied to coin inputs (TODO: check)
|
||||
state->m_maincpu->set_input_line(5, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(5, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( blockout, blockout_state )
|
||||
@ -310,7 +309,7 @@ static MACHINE_CONFIG_START( blockout, blockout_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, MAIN_CLOCK) /* MRH - 8.76 makes gfx/adpcm samples sync better -- but 10 is correct speed*/
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", blockout_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", blockout_state, blockout_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, AUDIO_CLOCK) /* 3.579545 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(audio_map)
|
||||
|
@ -249,7 +249,7 @@ static MACHINE_CONFIG_START( bsktball, bsktball_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6502,750000)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bsktball_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bsktball_state, bsktball_scanline, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
|
@ -183,12 +183,11 @@ WRITE8_MEMBER(btime_state::ay_audio_nmi_enable_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( audio_nmi_gen )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(btime_state::audio_nmi_gen)
|
||||
{
|
||||
btime_state *state = timer.machine().driver_data<btime_state>();
|
||||
int scanline = param;
|
||||
state->m_audio_nmi_state = scanline & 8;
|
||||
state->m_audiocpu->set_input_line(INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_audio_nmi_state = scanline & 8;
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1463,7 +1462,7 @@ static MACHINE_CONFIG_START( btime, btime_state )
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, HCLK1/3/2)
|
||||
MCFG_CPU_PROGRAM_MAP(audio_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("audionmi", audio_nmi_gen, "screen", 0, 8)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("audionmi", btime_state, audio_nmi_gen, "screen", 0, 8)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -123,14 +123,13 @@ TIMER_CALLBACK_MEMBER(cave_state::cave_vblank_end)
|
||||
m_agallet_vblank_irq = 0;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( cave_vblank_start )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start)
|
||||
{
|
||||
cave_state *state = timer.machine().driver_data<cave_state>();
|
||||
state->m_vblank_irq = 1;
|
||||
update_irq_state(timer.machine());
|
||||
cave_get_sprite_info(timer.machine());
|
||||
state->m_agallet_vblank_irq = 1;
|
||||
timer.machine().scheduler().timer_set(attotime::from_usec(2000), timer_expired_delegate(FUNC(cave_state::cave_vblank_end),state));
|
||||
m_vblank_irq = 1;
|
||||
update_irq_state(machine());
|
||||
cave_get_sprite_info(machine());
|
||||
m_agallet_vblank_irq = 1;
|
||||
machine().scheduler().timer_set(attotime::from_usec(2000), timer_expired_delegate(FUNC(cave_state::cave_vblank_end),this));
|
||||
}
|
||||
|
||||
/* Called once/frame to generate the VBLANK interrupt */
|
||||
@ -1858,7 +1857,7 @@ static MACHINE_CONFIG_START( dfeveron, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1900,7 +1899,7 @@ static MACHINE_CONFIG_START( ddonpach, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1946,7 +1945,7 @@ static MACHINE_CONFIG_START( donpachi, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1992,7 +1991,7 @@ static MACHINE_CONFIG_START( esprade, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2032,7 +2031,7 @@ static MACHINE_CONFIG_START( gaia, cave_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2073,7 +2072,7 @@ static MACHINE_CONFIG_START( guwange, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2117,7 +2116,7 @@ static MACHINE_CONFIG_START( hotdogst, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2169,7 +2168,7 @@ static MACHINE_CONFIG_START( korokoro, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_8BIT_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2223,7 +2222,7 @@ static MACHINE_CONFIG_START( mazinger, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2281,7 +2280,7 @@ static MACHINE_CONFIG_START( metmqstr, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2336,7 +2335,7 @@ static MACHINE_CONFIG_START( pacslot, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C46_pacslot)
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2392,7 +2391,7 @@ static MACHINE_CONFIG_START( pwrinst2, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2455,7 +2454,7 @@ static MACHINE_CONFIG_START( sailormn, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2509,7 +2508,7 @@ static MACHINE_CONFIG_START( tjumpman, cave_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2550,7 +2549,7 @@ static MACHINE_CONFIG_START( uopoko, cave_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", cave_vblank_start)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -441,16 +441,16 @@ each direction to assign the boundries.
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( generate_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(centiped_state::generate_interrupt)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
/* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */
|
||||
if (scanline & 16)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* do a partial update now to handle sprite multiplexing (Maze Invaders) */
|
||||
timer.machine().primary_screen->update_partial(scanline);
|
||||
machine().primary_screen->update_partial(scanline);
|
||||
}
|
||||
|
||||
|
||||
@ -1759,7 +1759,7 @@ static MACHINE_CONFIG_START( centiped_base, centiped_state )
|
||||
MCFG_ATARIVGEAROM_ADD("earom")
|
||||
|
||||
/* timer */
|
||||
MCFG_TIMER_ADD_SCANLINE("32v", generate_interrupt, "screen", 0, 16)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("32v", centiped_state, generate_interrupt, "screen", 0, 16)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -402,14 +402,14 @@ static const ay8910_interface ay8910_interface_2 =
|
||||
};
|
||||
|
||||
|
||||
TIMER_DEVICE_CALLBACK( changela_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(changela_state::changela_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 256) // vblank irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xdf);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xdf);
|
||||
else if(((scanline % 64) == 0)) // timer irq, 3 times per given vblank field
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf);
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(changela_state::chl_mcu_irq)
|
||||
@ -503,7 +503,7 @@ static MACHINE_CONFIG_START( changela, changela_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", Z80,5000000)
|
||||
MCFG_CPU_PROGRAM_MAP(changela_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", changela_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", changela_state, changela_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("mcu", M68705,2500000)
|
||||
MCFG_CPU_PROGRAM_MAP(mcu_map)
|
||||
|
@ -26,15 +26,14 @@
|
||||
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( chqflag_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(chqflag_state::chqflag_scanline)
|
||||
{
|
||||
chqflag_state *state = timer.machine().driver_data<chqflag_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && k051960_is_irq_enabled(state->m_k051960)) // vblank irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && (k051960_is_nmi_enabled(state->m_k051960))) // timer irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if(scanline == 240 && k051960_is_irq_enabled(m_k051960)) // vblank irq
|
||||
machine().device("maincpu")->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && (k051960_is_nmi_enabled(m_k051960))) // timer irq
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(chqflag_state::chqflag_bankswitch_w)
|
||||
@ -356,7 +355,7 @@ static MACHINE_CONFIG_START( chqflag, chqflag_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", KONAMI,XTAL_24MHz/8) /* 052001 (verified on pcb) */
|
||||
MCFG_CPU_PROGRAM_MAP(chqflag_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", chqflag_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", chqflag_state, chqflag_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(chqflag_sound_map)
|
||||
|
@ -347,12 +347,12 @@ static MACHINE_CONFIG_START( robotbwl, circus_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( crash_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(circus_state::crash_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 256 || scanline == 0) // vblank-out / in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( crash, circus_state )
|
||||
@ -360,7 +360,7 @@ static MACHINE_CONFIG_START( crash, circus_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6502, XTAL_11_289MHz / 16) /* 705.562kHz */
|
||||
MCFG_CPU_PROGRAM_MAP(circus_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", crash_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", circus_state, crash_scanline, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
|
@ -1533,18 +1533,18 @@ GFXDECODE_END
|
||||
**************************************************************************/
|
||||
|
||||
/* TODO: this is hackish */
|
||||
static TIMER_DEVICE_CALLBACK( bigrun_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::bigrun_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("cpu1")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("cpu1")->execute().set_input_line(4, HOLD_LINE);
|
||||
|
||||
if(scanline == 154)
|
||||
timer.machine().device("cpu1")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("cpu1")->execute().set_input_line(2, HOLD_LINE);
|
||||
|
||||
if(scanline == 69)
|
||||
timer.machine().device("cpu1")->execute().set_input_line(1, HOLD_LINE);
|
||||
machine().device("cpu1")->execute().set_input_line(1, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1560,7 +1560,7 @@ static MACHINE_CONFIG_START( bigrun, cischeat_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("cpu1", M68000, 10000000)
|
||||
MCFG_CPU_PROGRAM_MAP(bigrun_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bigrun_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cischeat_state, bigrun_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("cpu2", M68000, 10000000)
|
||||
MCFG_CPU_PROGRAM_MAP(bigrun_map2)
|
||||
@ -1691,15 +1691,15 @@ MACHINE_CONFIG_END
|
||||
4] == 3
|
||||
*/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( scudhamm_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::scudhamm_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
|
||||
if(scanline == 120) // timer irq (clears a flag, presumably sprite DMA end)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( scudhamm, cischeat_state )
|
||||
@ -1707,7 +1707,7 @@ static MACHINE_CONFIG_START( scudhamm, cischeat_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu",M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(scudhamm_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", scudhamm_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cischeat_state, scudhamm_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK | VIDEO_HAS_SHADOWS)
|
||||
@ -1741,15 +1741,15 @@ MACHINE_CONFIG_END
|
||||
Arm Champs II
|
||||
**************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( armchamp2_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::armchamp2_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
|
||||
if(scanline == 120) // timer irq (TODO: timing)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( armchmp2, scudhamm )
|
||||
@ -1758,7 +1758,7 @@ static MACHINE_CONFIG_DERIVED( armchmp2, scudhamm )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(armchmp2_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(armchamp2_scanline)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(cischeat_state, armchamp2_scanline)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -68,12 +68,10 @@ WRITE16_MEMBER(cninja_state::stoneage_sound_w)
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( interrupt_gen )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cninja_state::interrupt_gen)
|
||||
{
|
||||
cninja_state *state = timer.machine().driver_data<cninja_state>();
|
||||
|
||||
state->m_maincpu->set_input_line((state->m_irq_mask & 0x10) ? 3 : 4, ASSERT_LINE);
|
||||
state->m_raster_irq_timer->reset();
|
||||
m_maincpu->set_input_line((m_irq_mask & 0x10) ? 3 : 4, ASSERT_LINE);
|
||||
m_raster_irq_timer->reset();
|
||||
}
|
||||
|
||||
READ16_MEMBER(cninja_state::cninja_irq_r)
|
||||
@ -912,7 +910,7 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("raster_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -964,7 +962,7 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
|
||||
MCFG_CPU_PROGRAM_MAP(stoneage_s_map)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("raster_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1016,7 +1014,7 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
|
||||
MCFG_CPU_PROGRAM_MAP(stoneage_s_map)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("raster_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1059,7 +1057,7 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("raster_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1111,7 +1109,7 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("raster_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -155,10 +155,9 @@ MACHINE_RESET_MEMBER(coolpool_state,coolpool)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( nvram_write_timeout )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(coolpool_state::nvram_write_timeout)
|
||||
{
|
||||
coolpool_state *state = timer.machine().driver_data<coolpool_state>();
|
||||
state->m_nvram_write_enable = 0;
|
||||
m_nvram_write_enable = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -205,12 +204,10 @@ WRITE16_MEMBER(coolpool_state::nvram_thrash_data_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( amerdart_audio_int_gen )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(coolpool_state::amerdart_audio_int_gen)
|
||||
{
|
||||
coolpool_state *state = timer.machine().driver_data<coolpool_state>();
|
||||
|
||||
state->m_dsp->execute().set_input_line(0, ASSERT_LINE);
|
||||
state->m_dsp->execute().set_input_line(0, CLEAR_LINE);
|
||||
m_dsp->execute().set_input_line(0, ASSERT_LINE);
|
||||
m_dsp->execute().set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -858,12 +855,12 @@ static MACHINE_CONFIG_START( amerdart, coolpool_state )
|
||||
MCFG_CPU_PROGRAM_MAP(amerdart_dsp_pgm_map)
|
||||
/* Data Map is internal to the CPU */
|
||||
MCFG_CPU_IO_MAP(amerdart_dsp_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("audioint", amerdart_audio_int_gen, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("audioint", coolpool_state, amerdart_audio_int_gen, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(coolpool_state,amerdart)
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD("nvram_timer", nvram_write_timeout)
|
||||
MCFG_TIMER_DRIVER_ADD("nvram_timer", coolpool_state, nvram_write_timeout)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -892,7 +889,7 @@ static MACHINE_CONFIG_START( coolpool, coolpool_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(coolpool_state,coolpool)
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD("nvram_timer", nvram_write_timeout)
|
||||
MCFG_TIMER_DRIVER_ADD("nvram_timer", coolpool_state, nvram_write_timeout)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
|
||||
|
@ -1000,15 +1000,15 @@ static MACHINE_CONFIG_START( cosmic, cosmic_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( panic_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(cosmic_state::panic_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
|
||||
if(scanline == 0) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
|
||||
@ -1017,7 +1017,7 @@ static MACHINE_CONFIG_DERIVED( panic, cosmic )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(panic_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", panic_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cosmic_state, panic_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_GFXDECODE(panic)
|
||||
|
@ -254,7 +254,7 @@ static MACHINE_CONFIG_START( dambustr, dambustr_state )
|
||||
MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL)
|
||||
MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback)
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", dambustr_state, galaxold_interrupt_timer)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -213,15 +213,15 @@ static GFXDECODE_START( darkmist )
|
||||
GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0, 16*4 )
|
||||
GFXDECODE_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( darkmist_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(darkmist_state::darkmist_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */
|
||||
|
||||
if(scanline == 0) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
|
||||
}
|
||||
|
||||
|
||||
@ -230,7 +230,7 @@ static MACHINE_CONFIG_START( darkmist, darkmist_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(memmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", darkmist_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", darkmist_state, darkmist_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD(CPUTAG_T5182,Z80,14318180/4) /* 3.579545 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(t5182_map)
|
||||
|
@ -61,16 +61,15 @@ Notes:
|
||||
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( dbz_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dbz_state::dbz_scanline)
|
||||
{
|
||||
dbz_state *state = timer.machine().driver_data<dbz_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 256) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_2, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_IRQ_2, ASSERT_LINE);
|
||||
|
||||
if(scanline == 0 && k053246_is_irq_enabled(state->m_k053246)) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); //auto-acks apparently
|
||||
if(scanline == 0 && k053246_is_irq_enabled(m_k053246)) // vblank-in irq
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); //auto-acks apparently
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -383,7 +382,7 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(dbz_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", dbz_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dbz_state, dbz_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(dbz_sound_map)
|
||||
|
@ -116,25 +116,24 @@ INLINE int scanline_to_vcount( int scanline )
|
||||
return (vcount - 0x18) | 0x100;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( ddragon_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ddragon_state::ddragon_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);
|
||||
}
|
||||
|
||||
|
||||
@ -966,7 +965,7 @@ static MACHINE_CONFIG_START( ddragon, ddragon_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, MAIN_CLOCK) /* 12 MHz / 4 internally */
|
||||
MCFG_CPU_PROGRAM_MAP(ddragon_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, ddragon_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", HD63701, MAIN_CLOCK / 2) /* 6 MHz / 4 internally */
|
||||
MCFG_CPU_PROGRAM_MAP(sub_map)
|
||||
@ -1029,7 +1028,7 @@ static MACHINE_CONFIG_START( ddragon6809, ddragon_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK / 8) /* 1.5 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(ddragon_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, ddragon_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", M6809, MAIN_CLOCK / 8) /* 1.5 Mhz */
|
||||
MCFG_CPU_PROGRAM_MAP(sub_map)
|
||||
@ -1075,7 +1074,7 @@ static MACHINE_CONFIG_START( ddragon2, ddragon_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, MAIN_CLOCK) /* 12 MHz / 4 internally */
|
||||
MCFG_CPU_PROGRAM_MAP(dd2_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, ddragon_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", Z80, MAIN_CLOCK / 3) /* 4 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(dd2_sub_map)
|
||||
|
@ -531,24 +531,23 @@ static const ym2151_interface ym2151_config =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( ddragon3_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_state::ddragon3_scanline)
|
||||
{
|
||||
ddragon3_state *state = timer.machine().driver_data<ddragon3_state>();
|
||||
int scanline = param;
|
||||
|
||||
/* An interrupt is generated every 16 scanlines */
|
||||
if (scanline % 16 == 0)
|
||||
{
|
||||
if (scanline > 0)
|
||||
timer.machine().primary_screen->update_partial(scanline - 1);
|
||||
state->m_maincpu->set_input_line(5, ASSERT_LINE);
|
||||
machine().primary_screen->update_partial(scanline - 1);
|
||||
m_maincpu->set_input_line(5, ASSERT_LINE);
|
||||
}
|
||||
|
||||
/* Vblank is raised on scanline 248 */
|
||||
if (scanline == 248)
|
||||
{
|
||||
timer.machine().primary_screen->update_partial(scanline - 1);
|
||||
state->m_maincpu->set_input_line(6, ASSERT_LINE);
|
||||
machine().primary_screen->update_partial(scanline - 1);
|
||||
m_maincpu->set_input_line(6, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -593,7 +592,7 @@ static MACHINE_CONFIG_START( ddragon3, ddragon3_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(ddragon3_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon3_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon3_state, ddragon3_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -206,26 +206,26 @@ GFXDECODE_END
|
||||
|
||||
/* Interrupt Generators */
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( deadang_main_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::deadang_main_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
|
||||
|
||||
if(scanline == 0) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( deadang_sub_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::deadang_sub_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
|
||||
machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4);
|
||||
|
||||
if(scanline == 0) // vblank-in irq
|
||||
timer.machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
|
||||
machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4);
|
||||
}
|
||||
|
||||
/* Machine Drivers */
|
||||
@ -235,11 +235,11 @@ static MACHINE_CONFIG_START( deadang, deadang_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", V30,XTAL_16MHz/2) /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer1", deadang_main_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer1", deadang_state, deadang_main_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", V30,XTAL_16MHz/2) /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */
|
||||
MCFG_CPU_PROGRAM_MAP(sub_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer2", deadang_sub_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer2", deadang_state, deadang_sub_scanline, "screen", 0, 1)
|
||||
|
||||
SEIBU3A_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4)
|
||||
|
||||
|
@ -277,9 +277,9 @@ static const deco16ic_interface fghthist_deco16ic_tilegen2_intf =
|
||||
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( interrupt_gen )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deco32_state::interrupt_gen)
|
||||
{
|
||||
timer.machine().device("maincpu")->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
READ32_MEMBER(deco32_state::deco32_irq_controller_r)
|
||||
@ -1742,7 +1742,7 @@ static MACHINE_CONFIG_START( captaven, deco32_state )
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(deco32_state,deco32)
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", deco32_state, interrupt_gen)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -1951,7 +1951,7 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(deco32_state,deco32)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", deco32_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -1992,21 +1992,20 @@ static MACHINE_CONFIG_START( dragngun, dragngun_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( lockload_vbl_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deco32_state::lockload_vbl_irq)
|
||||
{
|
||||
deco32_state *state = timer.machine().driver_data<deco32_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 31*8)
|
||||
{
|
||||
state->m_irq_source = 0;
|
||||
state->m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
m_irq_source = 0;
|
||||
m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 0)
|
||||
{
|
||||
state->m_irq_source = 1;
|
||||
state->m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
m_irq_source = 1;
|
||||
m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2016,7 +2015,7 @@ static MACHINE_CONFIG_START( lockload, dragngun_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", ARM, 28000000/4)
|
||||
MCFG_CPU_PROGRAM_MAP(lockload_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", lockload_vbl_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", deco32_state, lockload_vbl_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 32220000/8)
|
||||
MCFG_CPU_PROGRAM_MAP(nslasher_sound)
|
||||
@ -2027,7 +2026,7 @@ static MACHINE_CONFIG_START( lockload, dragngun_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(deco32_state,deco32)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", deco32_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -167,11 +167,10 @@ READ32_MEMBER(deco_mlc_state::mlc_scanline_r)
|
||||
return machine().primary_screen->vpos();
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( interrupt_gen )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deco_mlc_state::interrupt_gen)
|
||||
{
|
||||
deco_mlc_state *state = timer.machine().driver_data<deco_mlc_state>();
|
||||
// logerror("hit scanline IRQ %d (%08x)\n", machine.primary_screen->vpos(), info.i);
|
||||
timer.machine().device("maincpu")->execute().set_input_line(state->m_mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(m_mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE);
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(deco_mlc_state::mlc_irq_w)
|
||||
@ -384,7 +383,7 @@ static MACHINE_CONFIG_START( avengrgs, deco_mlc_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(deco_mlc_state,mlc)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom") /* Actually 93c45 */
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", deco_mlc_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -416,7 +415,7 @@ static MACHINE_CONFIG_START( mlc, deco_mlc_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(deco_mlc_state,mlc)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom") /* Actually 93c45 */
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", interrupt_gen)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", deco_mlc_state, interrupt_gen)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -760,7 +760,7 @@ static MACHINE_CONFIG_START( decocass, decocass_state )
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, HCLK1/3/2)
|
||||
MCFG_CPU_PROGRAM_MAP(decocass_sound_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("audionmi", decocass_audio_nmi_gen, "screen", 0, 8)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("audionmi", decocass_state, decocass_audio_nmi_gen, "screen", 0, 8)
|
||||
|
||||
MCFG_CPU_ADD("mcu", I8041, HCLK)
|
||||
MCFG_CPU_IO_MAP(decocass_mcu_portmap)
|
||||
|
@ -499,16 +499,16 @@ GFXDECODE_END
|
||||
/******************************************************************************/
|
||||
|
||||
/* Main Z80 uses IM2 */
|
||||
static TIMER_DEVICE_CALLBACK( djboy_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(djboy_state::djboy_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd);
|
||||
|
||||
/* Pandora "sprite end dma" irq? TODO: timing is clearly off, attract mode relies on this */
|
||||
if(scanline == 64)
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
static const kaneko_pandora_interface djboy_pandora_config =
|
||||
@ -572,7 +572,7 @@ static MACHINE_CONFIG_START( djboy, djboy_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80, 6000000)
|
||||
MCFG_CPU_PROGRAM_MAP(cpu0_am)
|
||||
MCFG_CPU_IO_MAP(cpu0_port_am)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", djboy_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", djboy_state, djboy_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("cpu1", Z80, 6000000)
|
||||
MCFG_CPU_PROGRAM_MAP(cpu1_am)
|
||||
|
@ -1062,15 +1062,15 @@ static MACHINE_CONFIG_START( primella, dooyong_state )
|
||||
MCFG_FRAGMENT_ADD( sound_2151 )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( rshark_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dooyong_state::rshark_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 248) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
|
||||
if(scanline == 120) // timer irq?
|
||||
timer.machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1079,7 +1079,7 @@ static MACHINE_CONFIG_START( rshark, dooyong_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* measured on super-x */
|
||||
MCFG_CPU_PROGRAM_MAP(rshark_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", rshark_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dooyong_state, rshark_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* measured on super-x */
|
||||
MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map)
|
||||
@ -1109,7 +1109,7 @@ static MACHINE_CONFIG_START( superx, dooyong_state ) // dif mem map
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* measured on super-x */
|
||||
MCFG_CPU_PROGRAM_MAP(superx_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", rshark_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dooyong_state, rshark_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* measured on super-x */
|
||||
MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map)
|
||||
@ -1139,7 +1139,7 @@ static MACHINE_CONFIG_START( popbingo, dooyong_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000)
|
||||
MCFG_CPU_PROGRAM_MAP(popbingo_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", rshark_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dooyong_state, rshark_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* measured on super-x */
|
||||
MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map)
|
||||
|
@ -10,26 +10,25 @@ Atari Drag Race Driver
|
||||
#include "sound/discrete.h"
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( dragrace_frame_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dragrace_state::dragrace_frame_callback)
|
||||
{
|
||||
dragrace_state *state = timer.machine().driver_data<dragrace_state>();
|
||||
int i;
|
||||
static const char *const portnames[] = { "P1", "P2" };
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
switch (timer.machine().root_device().ioport(portnames[i])->read())
|
||||
switch (machine().root_device().ioport(portnames[i])->read())
|
||||
{
|
||||
case 0x01: state->m_gear[i] = 1; break;
|
||||
case 0x02: state->m_gear[i] = 2; break;
|
||||
case 0x04: state->m_gear[i] = 3; break;
|
||||
case 0x08: state->m_gear[i] = 4; break;
|
||||
case 0x10: state->m_gear[i] = 0; break;
|
||||
case 0x01: m_gear[i] = 1; break;
|
||||
case 0x02: m_gear[i] = 2; break;
|
||||
case 0x04: m_gear[i] = 3; break;
|
||||
case 0x08: m_gear[i] = 4; break;
|
||||
case 0x10: m_gear[i] = 0; break;
|
||||
}
|
||||
}
|
||||
|
||||
/* watchdog is disabled during service mode */
|
||||
timer.machine().watchdog_enable(timer.machine().root_device().ioport("IN0")->read() & 0x20);
|
||||
machine().watchdog_enable(machine().root_device().ioport("IN0")->read() & 0x20);
|
||||
}
|
||||
|
||||
|
||||
@ -336,7 +335,7 @@ static MACHINE_CONFIG_START( dragrace, dragrace_state )
|
||||
MCFG_WATCHDOG_VBLANK_INIT(8)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("frame_timer", dragrace_frame_callback, attotime::from_hz(60))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("frame_timer", dragrace_state, dragrace_frame_callback, attotime::from_hz(60))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -4745,24 +4745,23 @@ void neruton_update_irq( running_machine &machine )
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x42);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( neruton_irq_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::neruton_irq_scanline)
|
||||
{
|
||||
dynax_state *state = timer.machine().driver_data<dynax_state>();
|
||||
int scanline = param;
|
||||
|
||||
// This is a kludge to avoid losing blitter interrupts
|
||||
// there should be a vblank ack mechanism
|
||||
if (state->m_blitter_irq) return;
|
||||
if (m_blitter_irq) return;
|
||||
|
||||
if(scanline == 256)
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40);
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40);
|
||||
else if((scanline % 32) == 0)
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x46);
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x46);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( neruton, mjelctrn )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", neruton_irq_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, neruton_irq_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(dynax_state,neruton)
|
||||
MACHINE_CONFIG_END
|
||||
@ -4775,24 +4774,23 @@ MACHINE_CONFIG_END
|
||||
0x42 and 0x44 are very similar, they should be triggered by the blitter
|
||||
0x40 is vblank */
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( majxtal7_vblank_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::majxtal7_vblank_interrupt)
|
||||
{
|
||||
dynax_state *state = timer.machine().driver_data<dynax_state>();
|
||||
int scanline = param;
|
||||
|
||||
// This is a kludge to avoid losing blitter interrupts
|
||||
// there should be a vblank ack mechanism
|
||||
if (state->m_blitter_irq) return;
|
||||
if (m_blitter_irq) return;
|
||||
|
||||
if(scanline == 256)
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40);
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40);
|
||||
else if((scanline % 32) == 0)
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x44); // temp kludge
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x44); // temp kludge
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( majxtal7, neruton )
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(majxtal7_vblank_interrupt)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(dynax_state, majxtal7_vblank_interrupt)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -4861,16 +4859,15 @@ MACHINE_CONFIG_END
|
||||
Mahjong Tenkaigen
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( tenkai_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::tenkai_interrupt)
|
||||
{
|
||||
dynax_state *state = timer.machine().driver_data<dynax_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 256)
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_IRQ1, HOLD_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ1, HOLD_LINE);
|
||||
}
|
||||
|
||||
static const ay8910_interface tenkai_ay8910_interface =
|
||||
@ -4905,7 +4902,7 @@ static MACHINE_CONFIG_START( tenkai, dynax_state )
|
||||
MCFG_CPU_ADD("maincpu",TMP91640, 21472700 / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(tenkai_map)
|
||||
MCFG_CPU_IO_MAP(tenkai_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", tenkai_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, tenkai_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(dynax_state,tenkai)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax)
|
||||
|
@ -575,26 +575,26 @@ static WRITE_LINE_DEVICE_HANDLER( equites_msm5232_gate )
|
||||
// Interrupt Handlers
|
||||
|
||||
// Equites Hardware
|
||||
static TIMER_DEVICE_CALLBACK( equites_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(equites_state::equites_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 232) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
|
||||
if(scanline == 24) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( splndrbt_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(equites_state::splndrbt_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
|
||||
if(scanline == 32) // vblank-in irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(equites_state::equites_8155_w)
|
||||
@ -1249,7 +1249,7 @@ static MACHINE_CONFIG_START( equites, equites_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz/4) /* 68000P8 running at 3mhz! verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(equites_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", equites_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", equites_state, equites_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_FRAGMENT_ADD(common_sound)
|
||||
|
||||
@ -1286,7 +1286,7 @@ static MACHINE_CONFIG_START( splndrbt, equites_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/4) /* 68000P8 running at 6mhz, verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(splndrbt_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", splndrbt_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", equites_state, splndrbt_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_FRAGMENT_ADD(common_sound)
|
||||
|
||||
|
@ -75,16 +75,15 @@ WRITE8_MEMBER(espial_state::espial_sound_nmi_mask_w)
|
||||
m_sound_nmi_enabled = data & 1;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( espial_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(espial_state::espial_scanline)
|
||||
{
|
||||
espial_state *state = timer.machine().driver_data<espial_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && state->m_main_nmi_enabled) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if(scanline == 240 && m_main_nmi_enabled) // vblank-out irq
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
|
||||
if(scanline == 16) // timer irq, checks soundlatch port then updates some sound related work RAM buffers
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -322,7 +321,7 @@ static MACHINE_CONFIG_START( espial, espial_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(espial_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", espial_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", espial_state, espial_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3072000) /* 2 MHz?????? */
|
||||
MCFG_CPU_PROGRAM_MAP(espial_sound_map)
|
||||
|
@ -16,15 +16,15 @@
|
||||
#include "includes/exedexes.h"
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( exedexes_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(exedexes_state::exedexes_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
|
||||
|
||||
if(scanline == 0) // unknown irq event
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
|
||||
@ -228,7 +228,7 @@ static MACHINE_CONFIG_START( exedexes, exedexes_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */
|
||||
MCFG_CPU_PROGRAM_MAP(exedexes_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", exedexes_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exedexes_state, exedexes_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 3 MHz ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -193,12 +193,11 @@ WRITE16_MEMBER(exterm_state::sound_latch_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( master_sound_nmi_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(exterm_state::master_sound_nmi_callback)
|
||||
{
|
||||
exterm_state *state = timer.machine().driver_data<exterm_state>();
|
||||
/* bit 0 of the sound control determines if the NMI is actually delivered */
|
||||
if (state->m_sound_control & 0x01)
|
||||
timer.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if (m_sound_control & 0x01)
|
||||
machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -457,7 +456,7 @@ static MACHINE_CONFIG_START( exterm, exterm_state )
|
||||
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD("snd_nmi_timer", master_sound_nmi_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("snd_nmi_timer", exterm_state, master_sound_nmi_callback)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_PALETTE_LENGTH(2048+32768)
|
||||
|
@ -16,16 +16,15 @@
|
||||
#include "includes/konamipt.h"
|
||||
#include "includes/fastlane.h"
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( fastlane_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(fastlane_state::fastlane_scanline)
|
||||
{
|
||||
fastlane_state *state = timer.machine().driver_data<fastlane_state>();
|
||||
int scanline = param;
|
||||
|
||||
address_space &space = state->generic_space();
|
||||
if(scanline == 240 && k007121_ctrlram_r(state->m_k007121, space, 7) & 0x02) // vblank irq
|
||||
state->m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && k007121_ctrlram_r(state->m_k007121, space, 7) & 0x01) // timer irq
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
address_space &space = generic_space();
|
||||
if(scanline == 240 && k007121_ctrlram_r(m_k007121, space, 7) & 0x02) // vblank irq
|
||||
m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && k007121_ctrlram_r(m_k007121, space, 7) & 0x01) // timer irq
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -219,7 +218,7 @@ static MACHINE_CONFIG_START( fastlane, fastlane_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8? */
|
||||
MCFG_CPU_PROGRAM_MAP(fastlane_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", fastlane_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastlane_state, fastlane_scanline, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
|
@ -22,15 +22,14 @@
|
||||
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( finalizr_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(finalizr_state::finalizr_scanline)
|
||||
{
|
||||
finalizr_state *state = timer.machine().driver_data<finalizr_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && state->m_irq_enable) // vblank irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && state->m_nmi_enable) // timer irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if(scanline == 240 && m_irq_enable) // vblank irq
|
||||
machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && m_nmi_enable) // timer irq
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -279,7 +278,7 @@ static MACHINE_CONFIG_START( finalizr, finalizr_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6809,XTAL_18_432MHz/6) /* ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", finalizr_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", finalizr_state, finalizr_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", I8039,XTAL_18_432MHz/2) /* 9.216MHz clkin ?? */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
@ -113,7 +113,7 @@ static void update_interrupts(running_machine &machine)
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( scanline_update )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
@ -123,7 +123,7 @@ static TIMER_DEVICE_CALLBACK( scanline_update )
|
||||
mystery yet */
|
||||
|
||||
/* INT 1 is on 32V */
|
||||
atarigen_scanline_int_gen(timer.machine().device("maincpu"));
|
||||
atarigen_scanline_int_gen(machine().device("maincpu"));
|
||||
|
||||
/* advance to the next interrupt */
|
||||
scanline += 64;
|
||||
@ -131,7 +131,7 @@ static TIMER_DEVICE_CALLBACK( scanline_update )
|
||||
scanline = 0;
|
||||
|
||||
/* set a timer for it */
|
||||
timer.adjust(timer.machine().primary_screen->time_until_pos(scanline), scanline);
|
||||
timer.adjust(machine().primary_screen->time_until_pos(scanline), scanline);
|
||||
}
|
||||
|
||||
|
||||
@ -363,7 +363,7 @@ static MACHINE_CONFIG_START( foodf, foodf_state )
|
||||
|
||||
MCFG_WATCHDOG_VBLANK_INIT(8)
|
||||
|
||||
MCFG_TIMER_ADD("scan_timer", scanline_update)
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", foodf_state, scanline_update)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_GFXDECODE(foodf)
|
||||
|
@ -288,7 +288,7 @@ static MACHINE_CONFIG_START( bang, gaelco2_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 30000000/2) /* 15 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(bang_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bang_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gaelco2_state, bang_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_EEPROM_ADD("eeprom", gaelco2_eeprom_interface)
|
||||
|
||||
|
@ -623,34 +623,33 @@ WRITE16_MEMBER(gaelco3d_state::adsp_rombank_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( adsp_autobuffer_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gaelco3d_state::adsp_autobuffer_irq)
|
||||
{
|
||||
gaelco3d_state *state = timer.machine().driver_data<gaelco3d_state>();
|
||||
cpu_device *adsp = timer.machine().device<cpu_device>("adsp");
|
||||
cpu_device *adsp = machine().device<cpu_device>("adsp");
|
||||
|
||||
/* get the index register */
|
||||
int reg = adsp->state_int(ADSP2100_I0 + state->m_adsp_ireg);
|
||||
int reg = adsp->state_int(ADSP2100_I0 + m_adsp_ireg);
|
||||
|
||||
/* copy the current data into the buffer */
|
||||
// logerror("ADSP buffer: I%d=%04X incs=%04X size=%04X\n", state->m_adsp_ireg, reg, state->m_adsp_incs, state->m_adsp_size);
|
||||
if (state->m_adsp_incs)
|
||||
dmadac_transfer(&state->m_dmadac[0], SOUND_CHANNELS, state->m_adsp_incs, SOUND_CHANNELS * state->m_adsp_incs, state->m_adsp_size / (SOUND_CHANNELS * state->m_adsp_incs), (INT16 *)&state->m_adsp_fastram_base[reg - 0x3800]);
|
||||
// logerror("ADSP buffer: I%d=%04X incs=%04X size=%04X\n", m_adsp_ireg, reg, m_adsp_incs, m_adsp_size);
|
||||
if (m_adsp_incs)
|
||||
dmadac_transfer(&m_dmadac[0], SOUND_CHANNELS, m_adsp_incs, SOUND_CHANNELS * m_adsp_incs, m_adsp_size / (SOUND_CHANNELS * m_adsp_incs), (INT16 *)&m_adsp_fastram_base[reg - 0x3800]);
|
||||
|
||||
/* increment it */
|
||||
reg += state->m_adsp_size;
|
||||
reg += m_adsp_size;
|
||||
|
||||
/* check for wrapping */
|
||||
if (reg >= state->m_adsp_ireg_base + state->m_adsp_size)
|
||||
if (reg >= m_adsp_ireg_base + m_adsp_size)
|
||||
{
|
||||
/* reset the base pointer */
|
||||
reg = state->m_adsp_ireg_base;
|
||||
reg = m_adsp_ireg_base;
|
||||
|
||||
/* generate the (internal, thats why the pulse) irq */
|
||||
generic_pulse_irq_line(adsp, ADSP2105_IRQ1, 1);
|
||||
generic_pulse_irq_line(*adsp, ADSP2105_IRQ1, 1);
|
||||
}
|
||||
|
||||
/* store it */
|
||||
adsp->set_state_int(ADSP2100_I0 + state->m_adsp_ireg, reg);
|
||||
adsp->set_state_int(ADSP2100_I0 + m_adsp_ireg, reg);
|
||||
}
|
||||
|
||||
|
||||
@ -1009,7 +1008,7 @@ static MACHINE_CONFIG_START( gaelco3d, gaelco3d_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
||||
|
||||
MCFG_TIMER_ADD("adsp_timer", adsp_autobuffer_irq)
|
||||
MCFG_TIMER_DRIVER_ADD("adsp_timer", gaelco3d_state, adsp_autobuffer_irq)
|
||||
MCFG_GAELCO_SERIAL_ADD("serial", 0, serial_interface)
|
||||
|
||||
/* video hardware */
|
||||
|
@ -1261,9 +1261,9 @@ WRITE8_MEMBER(galaxian_state::checkman_sound_command_w)
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( checkmaj_irq0_gen )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::checkmaj_irq0_gen)
|
||||
{
|
||||
timer.machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -2096,7 +2096,7 @@ static MACHINE_CONFIG_START( galaxian_base, galaxian_state )
|
||||
|
||||
|
||||
/* blinking frequency is determined by 555 counter with Ra=100k, Rb=10k, C=10uF */
|
||||
MCFG_TIMER_ADD_PERIODIC("stars", galaxian_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("stars", galaxian_state, galaxian_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -2276,7 +2276,7 @@ static MACHINE_CONFIG_DERIVED( checkmaj, galaxian_base )
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 1620000)
|
||||
MCFG_CPU_PROGRAM_MAP(checkmaj_sound_map)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("irq0", checkmaj_irq0_gen, "screen", 0, 8)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("irq0", galaxian_state, checkmaj_irq0_gen, "screen", 0, 8)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SOUND_ADD("aysnd", AY8910, 1620000)
|
||||
|
@ -2179,7 +2179,7 @@ static MACHINE_CONFIG_START( galaxold_base, galaxold_state )
|
||||
MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL)
|
||||
MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback)
|
||||
|
||||
MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer)
|
||||
MCFG_TIMER_DRIVER_ADD("int_timer", galaxold_state, galaxold_interrupt_timer)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_GFXDECODE(galaxian)
|
||||
|
@ -542,39 +542,37 @@ GFXDECODE_END
|
||||
|
||||
|
||||
/* CPU#1 Interrups , lev 3,4 & 5 are tested on power up. The rest is rte, but lev 6 */
|
||||
static TIMER_DEVICE_CALLBACK( galpani2_interrupt1 )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(galpani2_state::galpani2_interrupt1)
|
||||
{
|
||||
galpani2_state *state = timer.machine().driver_data<galpani2_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
state->m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
|
||||
/* MCU related? */
|
||||
if(scanline == 128)
|
||||
{
|
||||
state->m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
state->m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 0)
|
||||
state->m_maincpu->set_input_line(6, HOLD_LINE); // hblank?
|
||||
m_maincpu->set_input_line(6, HOLD_LINE); // hblank?
|
||||
}
|
||||
|
||||
/* CPU#2 interrupts, lev 3,4 & 5 are tested on power up. The rest is rte, but lev 7 */
|
||||
static TIMER_DEVICE_CALLBACK( galpani2_interrupt2 )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(galpani2_state::galpani2_interrupt2)
|
||||
{
|
||||
galpani2_state *state = timer.machine().driver_data<galpani2_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
state->m_subcpu->set_input_line(5, HOLD_LINE);
|
||||
m_subcpu->set_input_line(5, HOLD_LINE);
|
||||
|
||||
if(scanline == 128)
|
||||
state->m_subcpu->set_input_line(4, HOLD_LINE);
|
||||
m_subcpu->set_input_line(4, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
state->m_subcpu->set_input_line(3, HOLD_LINE);
|
||||
m_subcpu->set_input_line(3, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( galpani2, galpani2_state )
|
||||
@ -582,12 +580,12 @@ static MACHINE_CONFIG_START( galpani2, galpani2_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_27MHz/2) /* Confirmed on galpani2i PCB */
|
||||
MCFG_CPU_PROGRAM_MAP(galpani2_mem1)
|
||||
MCFG_TIMER_ADD_SCANLINE("m_scantimer", galpani2_interrupt1, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("m_scantimer", galpani2_state, galpani2_interrupt1, "screen", 0, 1)
|
||||
//MCFG_QUANTUM_PERFECT_CPU("maincpu")
|
||||
|
||||
MCFG_CPU_ADD("sub", M68000, XTAL_27MHz/2) /* Confirmed on galpani2i PCB */
|
||||
MCFG_CPU_PROGRAM_MAP(galpani2_mem2)
|
||||
MCFG_TIMER_ADD_SCANLINE("s_scantimer", galpani2_interrupt2, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", galpani2_state, galpani2_interrupt2, "screen", 0, 1)
|
||||
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
|
@ -134,32 +134,32 @@ void galpanic_state::screen_eof_galpanic(screen_device &screen, bool state)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( galpanic_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
|
||||
/* Pandora "sprite end dma" irq? */
|
||||
if(scanline == 32)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( galhustl_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galhustl_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
|
||||
/* Pandora "sprite end dma" irq? */
|
||||
if(scanline == 32)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
|
||||
if(scanline == 0) // timer irq?
|
||||
timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -559,7 +559,7 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(galpanic_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", galpanic_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -621,7 +621,7 @@ static MACHINE_CONFIG_DERIVED( supmodel, comad )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_CLOCK(12000000) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(supmodel_map)
|
||||
// MCFG_TIMER_ADD_SCANLINE("scantimer", galpanic_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
@ -654,7 +654,7 @@ static MACHINE_CONFIG_DERIVED( galhustl, comad )
|
||||
MCFG_CPU_CLOCK(12000000) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(galhustl_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(galhustl_scanline)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(galpanic_state, galhustl_scanline)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
@ -673,7 +673,7 @@ static MACHINE_CONFIG_DERIVED( zipzap, comad )
|
||||
MCFG_CPU_CLOCK(12000000) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(zipzap_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(galhustl_scanline)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(galpanic_state, galhustl_scanline)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
|
@ -82,23 +82,22 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( gberet_interrupt_tick )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gberet_state::gberet_interrupt_tick)
|
||||
{
|
||||
gberet_state *state = timer.machine().driver_data<gberet_state>();
|
||||
UINT8 ticks_mask = ~state->m_interrupt_ticks & (state->m_interrupt_ticks + 1); // 0->1
|
||||
state->m_interrupt_ticks++;
|
||||
UINT8 ticks_mask = ~m_interrupt_ticks & (m_interrupt_ticks + 1); // 0->1
|
||||
m_interrupt_ticks++;
|
||||
|
||||
// NMI on d0
|
||||
if (ticks_mask & state->m_interrupt_mask & 1)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
if (ticks_mask & m_interrupt_mask & 1)
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
|
||||
// IRQ on d3 (used by mrgoemon)
|
||||
if (ticks_mask & state->m_interrupt_mask<<2 & 8)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
if (ticks_mask & m_interrupt_mask<<2 & 8)
|
||||
machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
|
||||
// IRQ on d4 (used by gberet)
|
||||
if (ticks_mask & state->m_interrupt_mask<<2 & 16)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
if (ticks_mask & m_interrupt_mask<<2 & 16)
|
||||
machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -423,7 +422,7 @@ static MACHINE_CONFIG_START( gberet, gberet_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) // X1S (generated by a custom IC)
|
||||
MCFG_CPU_PROGRAM_MAP(gberet_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", gberet_interrupt_tick, "screen", 0, 16) // ?
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gberet_state, gberet_interrupt_tick, "screen", 0, 16)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(gberet_state,gberet)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(gberet_state,gberet)
|
||||
|
@ -106,16 +106,15 @@ INTERRUPT_GEN_MEMBER(gradius3_state::cpuA_interrupt)
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( gradius3_sub_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gradius3_state::gradius3_sub_scanline)
|
||||
{
|
||||
gradius3_state *state = timer.machine().driver_data<gradius3_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && state->m_irqBmask & 1) // vblank-out irq
|
||||
timer.machine().device("sub")->execute().set_input_line(1, HOLD_LINE);
|
||||
if(scanline == 240 && m_irqBmask & 1) // vblank-out irq
|
||||
machine().device("sub")->execute().set_input_line(1, HOLD_LINE);
|
||||
|
||||
if(scanline == 16 && state->m_irqBmask & 2) // sprite end DMA irq
|
||||
timer.machine().device("sub")->execute().set_input_line(2, HOLD_LINE);
|
||||
if(scanline == 16 && m_irqBmask & 2) // sprite end DMA irq
|
||||
machine().device("sub")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(gradius3_state::cpuB_irqtrigger_w)
|
||||
@ -320,7 +319,7 @@ static MACHINE_CONFIG_START( gradius3, gradius3_state )
|
||||
|
||||
MCFG_CPU_ADD("sub", M68000, 10000000) /* 10 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(gradius3_map2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", gradius3_sub_scanline, "screen", 0, 1) /* has three interrupt vectors, 1 2 and 4 */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gradius3_state, gradius3_sub_scanline, "screen", 0, 1)
|
||||
/* 4 is triggered by cpu A, the others are unknown but */
|
||||
/* required for the game to run. */
|
||||
|
||||
|
@ -381,14 +381,14 @@ void gundealr_state::machine_reset()
|
||||
m_scroll[3] = 0;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( gundealr_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gundealr_state::gundealr_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */
|
||||
else if((scanline == 0) || (scanline == 120) ) //timer irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
@ -410,7 +410,7 @@ static MACHINE_CONFIG_START( gundealr, gundealr_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80, 8000000) /* 8 MHz ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_IO_MAP(main_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", gundealr_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gundealr_state, gundealr_scanline, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
@ -433,20 +433,19 @@ static MACHINE_CONFIG_START( gundealr, gundealr_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( yamyam_mcu_sim )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(gundealr_state::yamyam_mcu_sim)
|
||||
{
|
||||
gundealr_state *state = timer.machine().driver_data<gundealr_state>();
|
||||
static const UINT8 snipped_cmd03[8] = { 0x3a, 0x00, 0xc0, 0x47, 0x3a, 0x01, 0xc0, 0xc9 };
|
||||
static const UINT8 snipped_cmd05_1[5] = { 0xcd, 0x20, 0xe0, 0x7e, 0xc9 };
|
||||
static const UINT8 snipped_cmd05_2[8] = { 0xc5, 0x01, 0x00, 0x00, 0x4f, 0x09, 0xc1, 0xc9 };
|
||||
|
||||
int i;
|
||||
|
||||
//logerror("e000 = %02x\n", state->m_rambase[0x000]);
|
||||
switch(state->m_rambase[0x000])
|
||||
//logerror("e000 = %02x\n", m_rambase[0x000]);
|
||||
switch(m_rambase[0x000])
|
||||
{
|
||||
case 0x03:
|
||||
state->m_rambase[0x001] = 0x03;
|
||||
m_rambase[0x001] = 0x03;
|
||||
/*
|
||||
read dip switches
|
||||
3a 00 c0 ld a,($c000)
|
||||
@ -455,14 +454,14 @@ static TIMER_DEVICE_CALLBACK( yamyam_mcu_sim )
|
||||
c9 ret
|
||||
*/
|
||||
for(i=0;i<8;i++)
|
||||
state->m_rambase[0x010+i] = snipped_cmd03[i];
|
||||
m_rambase[0x010+i] = snipped_cmd03[i];
|
||||
|
||||
break;
|
||||
case 0x04:
|
||||
state->m_rambase[0x001] = 0x04;
|
||||
m_rambase[0x001] = 0x04;
|
||||
break;
|
||||
case 0x05:
|
||||
state->m_rambase[0x001] = 0x05;
|
||||
m_rambase[0x001] = 0x05;
|
||||
/*
|
||||
add a to hl
|
||||
c5 push bc
|
||||
@ -473,7 +472,7 @@ static TIMER_DEVICE_CALLBACK( yamyam_mcu_sim )
|
||||
c9 ret
|
||||
*/
|
||||
for(i=0;i<8;i++)
|
||||
state->m_rambase[0x020+i] = snipped_cmd05_2[i];
|
||||
m_rambase[0x020+i] = snipped_cmd05_2[i];
|
||||
|
||||
/*
|
||||
lookup data in table
|
||||
@ -482,25 +481,25 @@ static TIMER_DEVICE_CALLBACK( yamyam_mcu_sim )
|
||||
c9 ret
|
||||
*/
|
||||
for(i=0;i<5;i++)
|
||||
state->m_rambase[0x010+i] = snipped_cmd05_1[i];
|
||||
m_rambase[0x010+i] = snipped_cmd05_1[i];
|
||||
|
||||
break;
|
||||
case 0x0a:
|
||||
state->m_rambase[0x001] = 0x08;
|
||||
m_rambase[0x001] = 0x08;
|
||||
break;
|
||||
case 0x0d:
|
||||
state->m_rambase[0x001] = 0x07;
|
||||
m_rambase[0x001] = 0x07;
|
||||
break;
|
||||
}
|
||||
|
||||
state->m_rambase[0x004] = timer.machine().root_device().ioport("IN2")->read();
|
||||
state->m_rambase[0x005] = timer.machine().root_device().ioport("IN1")->read();
|
||||
state->m_rambase[0x006] = timer.machine().root_device().ioport("IN0")->read();
|
||||
m_rambase[0x004] = machine().root_device().ioport("IN2")->read();
|
||||
m_rambase[0x005] = machine().root_device().ioport("IN1")->read();
|
||||
m_rambase[0x006] = machine().root_device().ioport("IN0")->read();
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( yamyam, gundealr )
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("mcusim", yamyam_mcu_sim, attotime::from_hz(8000000/60)) // not real, but for simulating the MCU
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcusim", gundealr_state, yamyam_mcu_sim, attotime::from_hz(8000000/60))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -199,15 +199,14 @@ static GFXDECODE_START( hexion )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( hexion_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(hexion_state::hexion_scanline)
|
||||
{
|
||||
//hexion_state *state = timer.machine().driver_data<hexion_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 256)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
else if ((scanline == 85) || (scanline == 170)) //TODO
|
||||
timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static const k053252_interface hexion_k053252_intf =
|
||||
@ -225,7 +224,7 @@ static MACHINE_CONFIG_START( hexion, hexion_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80,24000000/4) /* Z80B 6 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(hexion_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", hexion_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hexion_state, hexion_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_K053252_ADD("k053252", 24000000/2, hexion_k053252_intf)
|
||||
|
||||
|
@ -16,15 +16,15 @@ Use Player 1 joystick and button, then press START1 to go to next screen.
|
||||
#include "includes/higemaru.h"
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( higemaru_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(higemaru_state::higemaru_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h - vblank */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h - vblank */
|
||||
|
||||
if(scanline == 0) // unknown irq event, does various stuff like copying the spriteram
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ static MACHINE_CONFIG_START( higemaru, higemaru_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/4) /* 3 MHz Sharp LH0080A Z80A-CPU-D */
|
||||
MCFG_CPU_PROGRAM_MAP(higemaru_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", higemaru_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", higemaru_state, higemaru_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -1757,17 +1757,16 @@ void hng64_state::m_set_irq(UINT32 irq_vector)
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( hng64_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(hng64_state::hng64_irq)
|
||||
{
|
||||
hng64_state *state = timer.machine().driver_data<hng64_state>();
|
||||
int scanline = param;
|
||||
|
||||
switch(scanline)
|
||||
{
|
||||
case 224*2: state->m_set_irq(0x0001); break; // lv 0 vblank irq
|
||||
//case 0*2: state->m_set_irq(0x0002); break; // lv 1
|
||||
//case 64*2: state->m_set_irq(0x0004); break; // lv 2
|
||||
case 128*2: state->m_set_irq(0x0800); break; // lv 11 network irq?
|
||||
case 224*2: m_set_irq(0x0001); break; // lv 0 vblank irq
|
||||
//case 0*2: m_set_irq(0x0002); break; // lv 1
|
||||
//case 64*2: m_set_irq(0x0004); break; // lv 2
|
||||
case 128*2: m_set_irq(0x0800); break; // lv 11 network irq?
|
||||
}
|
||||
}
|
||||
|
||||
@ -1832,7 +1831,7 @@ static MACHINE_CONFIG_START( hng64, hng64_state )
|
||||
MCFG_CPU_ADD("maincpu", VR4300BE, MASTER_CLOCK) // actually R4300
|
||||
MCFG_CPU_CONFIG(vr4300_config)
|
||||
MCFG_CPU_PROGRAM_MAP(hng_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", hng64_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hng64_state, hng64_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", V33, 8000000) // v53, 16? mhz!
|
||||
MCFG_CPU_PROGRAM_MAP(hng_sound_map)
|
||||
|
@ -58,23 +58,22 @@ TIMER_CALLBACK_MEMBER(hyprduel_state::vblank_end_callback)
|
||||
m_requested_int &= ~param;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( hyprduel_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(hyprduel_state::hyprduel_interrupt)
|
||||
{
|
||||
hyprduel_state *state = timer.machine().driver_data<hyprduel_state>();
|
||||
int line = param;
|
||||
|
||||
if (line == 0) /* TODO: fix this! */
|
||||
{
|
||||
state->m_requested_int |= 0x01; /* vblank */
|
||||
state->m_requested_int |= 0x20;
|
||||
state->m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
m_requested_int |= 0x01; /* vblank */
|
||||
m_requested_int |= 0x20;
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
/* the duration is a guess */
|
||||
timer.machine().scheduler().timer_set(attotime::from_usec(2500), timer_expired_delegate(FUNC(hyprduel_state::vblank_end_callback),state), 0x20);
|
||||
machine().scheduler().timer_set(attotime::from_usec(2500), timer_expired_delegate(FUNC(hyprduel_state::vblank_end_callback),this), 0x20);
|
||||
}
|
||||
else
|
||||
state->m_requested_int |= 0x12; /* hsync */
|
||||
m_requested_int |= 0x12; /* hsync */
|
||||
|
||||
update_irq_state(timer.machine());
|
||||
update_irq_state(machine());
|
||||
}
|
||||
|
||||
READ16_MEMBER(hyprduel_state::hyprduel_irq_cause_r)
|
||||
@ -669,7 +668,7 @@ static MACHINE_CONFIG_START( hyprduel, hyprduel_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(hyprduel_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", hyprduel_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hyprduel_state, hyprduel_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(hyprduel_map2)
|
||||
@ -710,7 +709,7 @@ static MACHINE_CONFIG_START( magerror, hyprduel_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(magerror_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", hyprduel_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hyprduel_state, hyprduel_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(magerror_map2)
|
||||
|
@ -239,16 +239,15 @@ void ikki_state::machine_reset()
|
||||
m_flipscreen = 0;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( ikki_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ikki_state::ikki_irq)
|
||||
{
|
||||
ikki_state *state = timer.machine().driver_data<ikki_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 || scanline == 120) // TODO: where non-timer IRQ happens?
|
||||
{
|
||||
state->m_maincpu->set_input_line(0,HOLD_LINE);
|
||||
m_maincpu->set_input_line(0,HOLD_LINE);
|
||||
|
||||
state->m_irq_source = (scanline != 240);
|
||||
m_irq_source = (scanline != 240);
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,7 +259,7 @@ static MACHINE_CONFIG_START( ikki, ikki_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4.000MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(ikki_cpu1)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ikki_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ikki_state, ikki_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", Z80,8000000/2) /* 4.000MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(ikki_cpu2)
|
||||
|
@ -73,18 +73,17 @@ WRITE8_MEMBER(iqblock_state::grndtour_prot_w)
|
||||
}
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( iqblock_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(iqblock_state::iqblock_irq)
|
||||
{
|
||||
iqblock_state *state = timer.machine().driver_data<iqblock_state>();
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 16) != 0)
|
||||
return;
|
||||
|
||||
if((scanline % 32) == 16)
|
||||
state->m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
else if ((scanline % 32) == 0)
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -275,7 +274,7 @@ static MACHINE_CONFIG_START( iqblock, iqblock_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_IO_MAP(main_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", iqblock_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", iqblock_state, iqblock_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_I8255A_ADD( "ppi8255", ppi8255_intf )
|
||||
|
||||
|
@ -308,8 +308,8 @@ static MACHINE_CONFIG_START( irobot, irobot_state )
|
||||
MCFG_PALETTE_LENGTH(64 + 32) /* 64 for polygons, 32 for text */
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("irvg_timer", irobot_irvg_done_callback)
|
||||
MCFG_TIMER_ADD("irmb_timer", irobot_irmb_done_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("irvg_timer", irobot_state, irobot_irvg_done_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("irmb_timer", irobot_state, irobot_irmb_done_callback)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -20,20 +20,19 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( ironhors_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::ironhors_irq)
|
||||
{
|
||||
ironhors_state *state = timer.machine().driver_data<ironhors_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240)
|
||||
{
|
||||
if (*state->m_interrupt_enable & 4)
|
||||
state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
if (*m_interrupt_enable & 4)
|
||||
m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
else if (((scanline+16) % 64) == 0)
|
||||
{
|
||||
if (*state->m_interrupt_enable & 1)
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if (*m_interrupt_enable & 1)
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,7 +379,7 @@ static MACHINE_CONFIG_START( ironhors, ironhors_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6809,18432000/6) /* 3.072 MHz??? mod by Shingo Suzuki 1999/10/15 */
|
||||
MCFG_CPU_PROGRAM_MAP(master_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ironhors_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ironhors_state, ironhors_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu",Z80,18432000/6) /* 3.072 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(slave_map)
|
||||
@ -416,20 +415,19 @@ static MACHINE_CONFIG_START( ironhors, ironhors_state )
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( farwest_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::farwest_irq)
|
||||
{
|
||||
ironhors_state *state = timer.machine().driver_data<ironhors_state>();
|
||||
int scanline = param;
|
||||
|
||||
if ((scanline % 2) == 1)
|
||||
{
|
||||
if (*state->m_interrupt_enable & 4)
|
||||
state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
if (*m_interrupt_enable & 4)
|
||||
m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
else if ((scanline % 2) == 0)
|
||||
{
|
||||
if (*state->m_interrupt_enable & 1)
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if (*m_interrupt_enable & 1)
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -459,7 +457,7 @@ static MACHINE_CONFIG_DERIVED( farwest, ironhors )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(farwest_master_map)
|
||||
MCFG_DEVICE_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(farwest_irq)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(ironhors_state, farwest_irq)
|
||||
|
||||
MCFG_CPU_MODIFY("soundcpu")
|
||||
MCFG_CPU_PROGRAM_MAP(farwest_slave_map)
|
||||
|
@ -1806,7 +1806,7 @@ static MACHINE_CONFIG_DERIVED( grmatch, itech8_core_hi )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(itech8_state, screen_update_itech8_grmatch)
|
||||
|
||||
/* palette updater */
|
||||
MCFG_TIMER_ADD_SCANLINE("palette", grmatch_palette_update, "screen", 0, 0)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("palette", itech8_state, grmatch_palette_update, "screen", 0, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -196,14 +196,13 @@ READ16_MEMBER(jpmimpct_state::m68k_tms_r)
|
||||
* TxDB/TxDB: Data retrieval unit
|
||||
*/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( duart_1_timer_event )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(jpmimpct_state::duart_1_timer_event)
|
||||
{
|
||||
jpmimpct_state *state = timer.machine().driver_data<jpmimpct_state>();
|
||||
state->m_duart_1.tc = 0;
|
||||
state->m_duart_1.ISR |= 0x08;
|
||||
m_duart_1.tc = 0;
|
||||
m_duart_1.ISR |= 0x08;
|
||||
|
||||
state->m_duart_1_irq = 1;
|
||||
update_irqs(timer.machine());
|
||||
m_duart_1_irq = 1;
|
||||
update_irqs(machine());
|
||||
}
|
||||
|
||||
READ16_MEMBER(jpmimpct_state::duart_1_r)
|
||||
@ -827,7 +826,7 @@ static MACHINE_CONFIG_START( jpmimpct, jpmimpct_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(jpmimpct_state,jpmimpct)
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD( "duart_1_timer", duart_1_timer_event)
|
||||
MCFG_TIMER_DRIVER_ADD("duart_1_timer", jpmimpct_state, duart_1_timer_event)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(40000000/4, 156*4, 0, 100*4, 328, 0, 300)
|
||||
@ -1379,7 +1378,7 @@ static MACHINE_CONFIG_START( impctawp, jpmimpct_state )
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_I8255_ADD( "ppi8255", ppi8255_intf )
|
||||
MCFG_TIMER_ADD( "duart_1_timer", duart_1_timer_event)
|
||||
MCFG_TIMER_DRIVER_ADD("duart_1_timer", jpmimpct_state, duart_1_timer_event)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("upd",UPD7759, UPD7759_STANDARD_CLOCK)
|
||||
|
@ -1578,22 +1578,21 @@ GFXDECODE_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( kaneko16_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_state::kaneko16_interrupt)
|
||||
{
|
||||
kaneko16_state *state = timer.machine().driver_data<kaneko16_state>();
|
||||
int scanline = param;
|
||||
|
||||
// main vblank interrupt
|
||||
if(scanline == 224)
|
||||
state->m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
|
||||
// each of these 2 int are responsible of translating a part of sprite buffer
|
||||
// from work ram to sprite ram. How these are scheduled is unknown.
|
||||
if(scanline == 64)
|
||||
state->m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
|
||||
if(scanline == 144)
|
||||
state->m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
}
|
||||
|
||||
static const ay8910_interface ay8910_intf_dsw =
|
||||
@ -1644,7 +1643,7 @@ static MACHINE_CONFIG_START( berlwall, kaneko16_berlwall_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 12000000) /* MC68000P12 */
|
||||
MCFG_CPU_PROGRAM_MAP(berlwall)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) // mangled sprites otherwise
|
||||
@ -1695,7 +1694,7 @@ static MACHINE_CONFIG_START( bakubrkr, kaneko16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(bakubrkr)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_state,gtmr)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
@ -1763,7 +1762,7 @@ static MACHINE_CONFIG_START( blazeon, kaneko16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,12000000) /* TMP68HC000-12 */
|
||||
MCFG_CPU_PROGRAM_MAP(blazeon)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,4000000) /* D780C-2 */
|
||||
MCFG_CPU_PROGRAM_MAP(blazeon_soundmem)
|
||||
@ -1823,7 +1822,7 @@ static MACHINE_CONFIG_START( gtmr, kaneko16_gtmr_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(gtmr_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_gtmr_state,gtmr)
|
||||
|
||||
@ -1942,7 +1941,7 @@ static MACHINE_CONFIG_START( mgcrystl, kaneko16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(mgcrystl)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_state,mgcrystl)
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
@ -2009,22 +2008,21 @@ MACHINE_CONFIG_END
|
||||
other: busy loop
|
||||
*/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( shogwarr_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_state::shogwarr_interrupt)
|
||||
{
|
||||
kaneko16_shogwarr_state *state = timer.machine().driver_data<kaneko16_shogwarr_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224)
|
||||
{
|
||||
// the code for this interrupt is provided by the MCU..
|
||||
state->m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 64)
|
||||
state->m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
|
||||
if(scanline == 144)
|
||||
state->m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2066,7 +2064,7 @@ static MACHINE_CONFIG_START( shogwarr, kaneko16_shogwarr_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(shogwarr)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", shogwarr_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, shogwarr_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_shogwarr_state,mgcrystl)
|
||||
|
||||
|
@ -653,15 +653,14 @@ INTERRUPT_GEN_MEMBER(konamigx_state::konamigx_vbinterrupt)
|
||||
dmastart_callback(0);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(konamigx_hbinterrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(konamigx_state::konamigx_hbinterrupt)
|
||||
{
|
||||
konamigx_state *state = timer.machine().driver_data<konamigx_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240)
|
||||
{
|
||||
// lift idle suspension
|
||||
if (resume_trigger && suspension_active) { suspension_active = 0; timer.machine().scheduler().trigger(resume_trigger); }
|
||||
if (resume_trigger && suspension_active) { suspension_active = 0; machine().scheduler().trigger(resume_trigger); }
|
||||
|
||||
// IRQ 1 is the main 60hz vblank interrupt
|
||||
// the gx_syncen & 0x20 test doesn't work on type 3 or 4 ROM boards, likely because the ROM board
|
||||
@ -677,7 +676,7 @@ static TIMER_DEVICE_CALLBACK(konamigx_hbinterrupt)
|
||||
if ((konamigx_wrport1_1 & 0x81) == 0x81 || (gx_syncen & 1))
|
||||
{
|
||||
gx_syncen &= ~1;
|
||||
state->m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
|
||||
}
|
||||
}
|
||||
@ -694,7 +693,7 @@ static TIMER_DEVICE_CALLBACK(konamigx_hbinterrupt)
|
||||
if ((konamigx_wrport1_1 & 0x82) == 0x82 || (gx_syncen & 2))
|
||||
{
|
||||
gx_syncen &= ~2;
|
||||
state->m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1859,7 +1858,7 @@ static MACHINE_CONFIG_DERIVED( gxtype3, konamigx )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", M68EC020, 24000000)
|
||||
MCFG_CPU_PROGRAM_MAP(gx_type3_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", konamigx_hbinterrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", konamigx_state, konamigx_hbinterrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE)
|
||||
@ -1886,7 +1885,7 @@ static MACHINE_CONFIG_DERIVED( gxtype4, konamigx )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", M68EC020, 24000000)
|
||||
MCFG_CPU_PROGRAM_MAP(gx_type4_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", konamigx_hbinterrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", konamigx_state, konamigx_hbinterrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE)
|
||||
|
@ -455,18 +455,14 @@ static const ym2203_interface ym2203_config =
|
||||
DEVCB_LINE(irqhandler)
|
||||
};
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( lastduel_timer_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::lastduel_timer_cb)
|
||||
{
|
||||
lastduel_state *state = timer.machine().driver_data<lastduel_state>();
|
||||
|
||||
state->m_maincpu->set_input_line(4, HOLD_LINE); /* Controls */
|
||||
m_maincpu->set_input_line(4, HOLD_LINE); /* Controls */
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( madgear_timer_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::madgear_timer_cb)
|
||||
{
|
||||
lastduel_state *state = timer.machine().driver_data<lastduel_state>();
|
||||
|
||||
state->m_maincpu->set_input_line(6, HOLD_LINE); /* Controls */
|
||||
m_maincpu->set_input_line(6, HOLD_LINE); /* Controls */
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(lastduel_state,lastduel)
|
||||
@ -501,7 +497,7 @@ static MACHINE_CONFIG_START( lastduel, lastduel_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Could be 8 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(lastduel_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", lastduel_state, irq2_line_hold)
|
||||
MCFG_TIMER_ADD_PERIODIC("timer_irq", lastduel_timer_cb, attotime::from_hz(120)) /* control reads?? */
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", lastduel_state, lastduel_timer_cb, attotime::from_hz(120))
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* Accurate */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
@ -544,7 +540,7 @@ static MACHINE_CONFIG_START( madgear, lastduel_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Accurate */
|
||||
MCFG_CPU_PROGRAM_MAP(madgear_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", lastduel_state, irq5_line_hold)
|
||||
MCFG_TIMER_ADD_PERIODIC("timer_irq", madgear_timer_cb, attotime::from_hz(120)) /* control reads?? */
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", lastduel_state, madgear_timer_cb, attotime::from_hz(120))
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(madgear_sound_map)
|
||||
|
@ -236,32 +236,30 @@
|
||||
* The rate should be at about 1 Hz
|
||||
*************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( lazercmd_timer )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(lazercmd_state::lazercmd_timer)
|
||||
{
|
||||
lazercmd_state *state = timer.machine().driver_data<lazercmd_state>();
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 2) == 1)
|
||||
return;
|
||||
|
||||
if (++state->m_timer_count >= 64 * 128)
|
||||
if (++m_timer_count >= 64 * 128)
|
||||
{
|
||||
state->m_timer_count = 0;
|
||||
state->m_sense_state ^= 1;
|
||||
state->m_maincpu->set_input_line(1, (state->m_sense_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_timer_count = 0;
|
||||
m_sense_state ^= 1;
|
||||
m_maincpu->set_input_line(1, (m_sense_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( bbonk_timer )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(lazercmd_state::bbonk_timer)
|
||||
{
|
||||
lazercmd_state *state = timer.machine().driver_data<lazercmd_state>();
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 2) == 1)
|
||||
return;
|
||||
|
||||
if (++state->m_timer_count >= 64 * 128)
|
||||
state->m_timer_count = 0;
|
||||
if (++m_timer_count >= 64 * 128)
|
||||
m_timer_count = 0;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
@ -635,7 +633,7 @@ static MACHINE_CONFIG_START( lazercmd, lazercmd_state )
|
||||
thus requiring an extra loading of approx 3-5 */
|
||||
MCFG_CPU_PROGRAM_MAP(lazercmd_map)
|
||||
MCFG_CPU_IO_MAP(lazercmd_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", lazercmd_timer, "screen", 0, 1) /* 7680 Hz */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", lazercmd_state, lazercmd_timer, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
@ -669,7 +667,7 @@ static MACHINE_CONFIG_START( medlanes, lazercmd_state )
|
||||
thus requiring an extra loading of approx 3-5 */
|
||||
MCFG_CPU_PROGRAM_MAP(medlanes_map)
|
||||
MCFG_CPU_IO_MAP(lazercmd_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", lazercmd_timer, "screen", 0, 1) /* 7680 Hz */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", lazercmd_state, lazercmd_timer, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
@ -703,7 +701,7 @@ static MACHINE_CONFIG_START( bbonk, lazercmd_state )
|
||||
thus requiring an extra loading of approx 3-5 */
|
||||
MCFG_CPU_PROGRAM_MAP(bbonk_map)
|
||||
MCFG_CPU_IO_MAP(lazercmd_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bbonk_timer, "screen", 0, 1) /* 7680 Hz */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", lazercmd_state, bbonk_timer, "screen", 0, 1)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
|
@ -47,24 +47,23 @@ void m107_state::machine_start()
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( m107_scanline_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(m107_state::m107_scanline_interrupt)
|
||||
{
|
||||
running_machine &machine = timer.machine();
|
||||
m107_state *state = machine.driver_data<m107_state>();
|
||||
int scanline = param;
|
||||
m107_state *state = machine().driver_data<m107_state>();
|
||||
|
||||
/* raster interrupt */
|
||||
if (scanline == state->m_raster_irq_position)
|
||||
if (scanline == m_raster_irq_position)
|
||||
{
|
||||
machine.primary_screen->update_partial(scanline);
|
||||
machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_2);
|
||||
machine().primary_screen->update_partial(scanline);
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_2);
|
||||
}
|
||||
|
||||
/* VBLANK interrupt */
|
||||
else if (scanline == machine.primary_screen->visible_area().max_y + 1)
|
||||
else if (scanline == machine().primary_screen->visible_area().max_y + 1)
|
||||
{
|
||||
machine.primary_screen->update_partial(scanline);
|
||||
machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_0);
|
||||
machine().primary_screen->update_partial(scanline);
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -780,7 +779,7 @@ static MACHINE_CONFIG_START( firebarr, m107_state )
|
||||
MCFG_CPU_CONFIG(firebarr_config)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", m107_scanline_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m107_state, m107_scanline_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -225,23 +225,22 @@ MACHINE_RESET_MEMBER(m92_state,m92)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( m92_scanline_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(m92_state::m92_scanline_interrupt)
|
||||
{
|
||||
running_machine &machine = timer.machine();
|
||||
m92_state *state = machine.driver_data<m92_state>();
|
||||
m92_state *state = machine().driver_data<m92_state>();
|
||||
int scanline = param;
|
||||
|
||||
/* raster interrupt */
|
||||
if (scanline == state->m_raster_irq_position)
|
||||
if (scanline == m_raster_irq_position)
|
||||
{
|
||||
machine.primary_screen->update_partial(scanline);
|
||||
machine().primary_screen->update_partial(scanline);
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_2);
|
||||
}
|
||||
|
||||
/* VBLANK interrupt */
|
||||
else if (scanline == machine.primary_screen->visible_area().max_y + 1)
|
||||
else if (scanline == machine().primary_screen->visible_area().max_y + 1)
|
||||
{
|
||||
machine.primary_screen->update_partial(scanline);
|
||||
machine().primary_screen->update_partial(scanline);
|
||||
state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_0);
|
||||
}
|
||||
}
|
||||
@ -944,7 +943,7 @@ static MACHINE_CONFIG_START( m92, m92_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(m92_state,m92)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(m92_state,m92)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", m92_scanline_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m92_state, m92_scanline_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
|
||||
@ -1030,7 +1029,7 @@ static MACHINE_CONFIG_START( ppan, m92_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(m92_state,m92)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(m92_state,m92)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", m92_scanline_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m92_state, m92_scanline_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") // not really...
|
||||
|
@ -377,25 +377,23 @@ READ8_MEMBER(mcr_state::kick_ip1_r)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
TIMER_DEVICE_CALLBACK( dpoker_hopper_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mcr_state::dpoker_hopper_callback)
|
||||
{
|
||||
mcr_state *state = timer.machine().driver_data<mcr_state>();
|
||||
|
||||
if (dpoker_output & 0x40)
|
||||
{
|
||||
// hopper timing is a guesstimate
|
||||
dpoker_coin_status ^= 8;
|
||||
state->m_dpoker_hopper_timer->adjust(attotime::from_msec((dpoker_coin_status & 8) ? 100 : 250));
|
||||
m_dpoker_hopper_timer->adjust(attotime::from_msec((dpoker_coin_status & 8) ? 100 : 250));
|
||||
}
|
||||
else
|
||||
{
|
||||
dpoker_coin_status &= ~8;
|
||||
}
|
||||
|
||||
coin_counter_w(timer.machine(), 3, dpoker_coin_status & 8);
|
||||
coin_counter_w(machine(), 3, dpoker_coin_status & 8);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK( dpoker_coin_in_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mcr_state::dpoker_coin_in_callback)
|
||||
{
|
||||
dpoker_coin_status &= ~2;
|
||||
}
|
||||
@ -1827,7 +1825,7 @@ static MACHINE_CONFIG_START( mcr_90009, mcr_state )
|
||||
MCFG_CPU_CONFIG(mcr_daisy_chain)
|
||||
MCFG_CPU_PROGRAM_MAP(cpu_90009_map)
|
||||
MCFG_CPU_IO_MAP(cpu_90009_portmap)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mcr_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mcr_state, mcr_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_Z80CTC_ADD("ctc", MAIN_OSC_MCR_I/8 /* same as "maincpu" */, mcr_ctc_intf)
|
||||
|
||||
@ -1863,8 +1861,8 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( mcr_90009_dp, mcr_90009 )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_TIMER_ADD("dp_coinin", dpoker_coin_in_callback)
|
||||
MCFG_TIMER_ADD("dp_hopper", dpoker_hopper_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("dp_coinin", mcr_state, dpoker_coin_in_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("dp_hopper", mcr_state, dpoker_hopper_callback)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1939,7 +1937,7 @@ static MACHINE_CONFIG_DERIVED( mcr_91490_ipu, mcr_91490_snt )
|
||||
MCFG_CPU_PROGRAM_MAP(ipu_91695_map)
|
||||
MCFG_CPU_IO_MAP(ipu_91695_portmap)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(mcr_ipu_interrupt)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(mcr_state, mcr_ipu_interrupt)
|
||||
|
||||
MCFG_Z80CTC_ADD("ipu_ctc", 7372800/2 /* same as "ipu" */, nflfoot_ctc_intf)
|
||||
MCFG_Z80PIO_ADD("ipu_pio0", 7372800/2, nflfoot_pio_intf)
|
||||
|
@ -1081,7 +1081,7 @@ static MACHINE_CONFIG_START( mcrmono, mcr3_state )
|
||||
MCFG_CPU_PROGRAM_MAP(mcrmono_map)
|
||||
MCFG_CPU_IO_MAP(mcrmono_portmap)
|
||||
MCFG_CPU_CONFIG(mcr_daisy_chain)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mcr_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mcr3_state, mcr_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_Z80CTC_ADD("ctc", MASTER_CLOCK/4 /* same as "maincpu" */, mcr_ctc_intf)
|
||||
|
||||
|
@ -155,18 +155,18 @@ MACHINE_RESET_MEMBER(megasys1_state,megasys1_hachoo)
|
||||
[ Main CPU - System A / Z ]
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( megasys1A_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1A_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
|
||||
if(scanline == 128)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( megasys1A_map, AS_PROGRAM, 16, megasys1_state )
|
||||
@ -191,18 +191,18 @@ ADDRESS_MAP_END
|
||||
[ Main CPU - System B ]
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( megasys1B_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1B_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
|
||||
if(scanline == 128)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1466,7 +1466,7 @@ static MACHINE_CONFIG_START( system_A, megasys1_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, SYS_A_CPU_CLOCK) /* 6MHz verified */
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1A_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", megasys1A_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1A_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", M68000, SOUND_CPU_CLOCK) /* 7MHz verified */
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1A_sound_map)
|
||||
@ -1519,7 +1519,7 @@ static MACHINE_CONFIG_DERIVED( system_B, system_A )
|
||||
MCFG_CPU_CLOCK(SYS_B_CPU_CLOCK) /* 8MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1B_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(megasys1B_scanline)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(megasys1_state, megasys1B_scanline)
|
||||
|
||||
MCFG_CPU_MODIFY("soundcpu")
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1B_sound_map)
|
||||
@ -1531,7 +1531,7 @@ static MACHINE_CONFIG_START( system_Bbl, megasys1_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, SYS_B_CPU_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1B_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", megasys1B_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1B_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(megasys1_state,megasys1)
|
||||
|
||||
@ -1580,7 +1580,7 @@ static MACHINE_CONFIG_DERIVED( system_C, system_A )
|
||||
MCFG_CPU_CLOCK(SYS_C_CPU_CLOCK) /* 12MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1C_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(megasys1B_scanline)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(megasys1_state, megasys1B_scanline)
|
||||
|
||||
MCFG_CPU_MODIFY("soundcpu")
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1B_sound_map)
|
||||
@ -1664,7 +1664,7 @@ static MACHINE_CONFIG_START( system_Z, megasys1_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, SYS_A_CPU_CLOCK) /* 6MHz (12MHz / 2) */
|
||||
MCFG_CPU_PROGRAM_MAP(megasys1A_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", megasys1A_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1A_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 3000000) /* OSC 12MHz divided by 4 ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(z80_sound_map)
|
||||
|
@ -483,7 +483,7 @@ static MACHINE_CONFIG_START( mhavoc, mhavoc_state )
|
||||
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("5k_timer", mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("5k_timer", mhavoc_state, mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", VECTOR)
|
||||
|
@ -1078,16 +1078,15 @@ MACHINE_RESET_MEMBER(mitchell_state,mitchell)
|
||||
m_keymatrix = 0;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mitchell_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mitchell_state::mitchell_irq)
|
||||
{
|
||||
mitchell_state *state = timer.machine().driver_data<mitchell_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240 || scanline == 0)
|
||||
{
|
||||
state->m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
|
||||
state->m_irq_source = (scanline == 240);
|
||||
m_irq_source = (scanline == 240);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1097,7 +1096,7 @@ static MACHINE_CONFIG_START( mgakuen, mitchell_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* probably same clock as the other mitchell hardware games */
|
||||
MCFG_CPU_PROGRAM_MAP(mgakuen_map)
|
||||
MCFG_CPU_IO_MAP(mitchell_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) /* ??? one extra irq seems to be needed for music (see input5_r) */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell)
|
||||
@ -1134,7 +1133,7 @@ static MACHINE_CONFIG_START( pang, mitchell_state )
|
||||
MCFG_CPU_ADD("maincpu",Z80, XTAL_16MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(mitchell_map)
|
||||
MCFG_CPU_IO_MAP(mitchell_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) /* ??? one extra irq seems to be needed for music (see input5_r) */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell)
|
||||
@ -1273,7 +1272,7 @@ static MACHINE_CONFIG_START( marukin, mitchell_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(mitchell_map)
|
||||
MCFG_CPU_IO_MAP(mitchell_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) /* ??? one extra irq seems to be needed for music (see input5_r) */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
|
||||
|
||||
@ -1324,7 +1323,7 @@ static MACHINE_CONFIG_START( pkladiesbl, mitchell_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(mitchell_map)
|
||||
MCFG_CPU_IO_MAP(mitchell_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) /* ??? one extra irq seems to be needed for music (see input5_r) */
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_EEPROM_ADD("eeprom", eeprom_intf)
|
||||
|
||||
|
@ -725,23 +725,22 @@ static void irq_init(running_machine &machine)
|
||||
machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( model1_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(model1_state::model1_interrupt)
|
||||
{
|
||||
model1_state *state = timer.machine().driver_data<model1_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 384)
|
||||
{
|
||||
irq_raise(timer.machine(), 1);
|
||||
irq_raise(machine(), 1);
|
||||
}
|
||||
else if(scanline == 384/2)
|
||||
{
|
||||
irq_raise(timer.machine(), state->m_sound_irq);
|
||||
irq_raise(machine(), m_sound_irq);
|
||||
|
||||
// if the FIFO has something in it, signal the 68k too
|
||||
if (state->m_fifo_rptr != state->m_fifo_wptr)
|
||||
if (m_fifo_rptr != m_fifo_wptr)
|
||||
{
|
||||
timer.machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1520,7 +1519,7 @@ static MACHINE_CONFIG_START( model1, model1_state )
|
||||
MCFG_CPU_ADD("maincpu", V60, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_mem)
|
||||
MCFG_CPU_IO_MAP(model1_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model1_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model1_state, model1_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 10000000) // verified on real h/w
|
||||
MCFG_CPU_PROGRAM_MAP(model1_snd)
|
||||
@ -1565,7 +1564,7 @@ static MACHINE_CONFIG_START( model1_vr, model1_state )
|
||||
MCFG_CPU_ADD("maincpu", V60, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_vr_mem)
|
||||
MCFG_CPU_IO_MAP(model1_vr_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model1_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model1_state, model1_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 10000000) // verified on real h/w
|
||||
MCFG_CPU_PROGRAM_MAP(model1_snd)
|
||||
|
@ -288,22 +288,21 @@ WRITE32_MEMBER(model2_state::timers_w)
|
||||
m_timerrun[offset] = 1;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( model2_timer_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2_timer_cb)
|
||||
{
|
||||
model2_state *state = timer.machine().driver_data<model2_state>();
|
||||
int tnum = (int)(FPTR)ptr;
|
||||
int bit = tnum + 2;
|
||||
|
||||
state->m_timers[tnum]->reset();
|
||||
m_timers[tnum]->reset();
|
||||
|
||||
state->m_intreq |= (1<<bit);
|
||||
if (state->m_intena & (1<<bit))
|
||||
m_intreq |= (1<<bit);
|
||||
if (m_intena & (1<<bit))
|
||||
{
|
||||
timer.machine().device("maincpu")->execute().set_input_line(I960_IRQ2, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(I960_IRQ2, ASSERT_LINE);
|
||||
}
|
||||
|
||||
state->m_timervals[tnum] = 0;
|
||||
state->m_timerrun[tnum] = 0;
|
||||
m_timervals[tnum] = 0;
|
||||
m_timerrun[tnum] = 0;
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(model2_state,model2)
|
||||
@ -1746,50 +1745,48 @@ static INPUT_PORTS_START( rchase2 )
|
||||
PORT_BIT( 0x00ff, 0x0000, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(model2_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2_interrupt)
|
||||
{
|
||||
model2_state *state = timer.machine().driver_data<model2_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 0) // 384
|
||||
{
|
||||
state->m_intreq |= (1<<10);
|
||||
if (state->m_intena & (1<<10))
|
||||
state->m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE);
|
||||
m_intreq |= (1<<10);
|
||||
if (m_intena & (1<<10))
|
||||
m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 384/2)
|
||||
{
|
||||
state->m_intreq |= (1<<0);
|
||||
if (state->m_intena & (1<<0))
|
||||
state->m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE);
|
||||
m_intreq |= (1<<0);
|
||||
if (m_intena & (1<<0))
|
||||
m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(model2c_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2c_interrupt)
|
||||
{
|
||||
model2_state *state = timer.machine().driver_data<model2_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 0) // 384
|
||||
{
|
||||
state->m_intreq |= (1<<10);
|
||||
if (state->m_intena & (1<<10))
|
||||
state->m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE);
|
||||
m_intreq |= (1<<10);
|
||||
if (m_intena & (1<<10))
|
||||
m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 256)
|
||||
{
|
||||
state->m_intreq |= (1<<2);
|
||||
if (state->m_intena & (1<<2))
|
||||
state->m_maincpu->set_input_line(I960_IRQ2, ASSERT_LINE);
|
||||
m_intreq |= (1<<2);
|
||||
if (m_intena & (1<<2))
|
||||
m_maincpu->set_input_line(I960_IRQ2, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 128)
|
||||
{
|
||||
state->m_intreq |= (1<<0);
|
||||
if (state->m_intena & (1<<0))
|
||||
state->m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE);
|
||||
m_intreq |= (1<<0);
|
||||
if (m_intena & (1<<0))
|
||||
m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1967,7 +1964,7 @@ static const mb86233_cpu_core tgp_config =
|
||||
static MACHINE_CONFIG_START( model2o, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2o_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 10000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_snd)
|
||||
@ -1983,13 +1980,13 @@ static MACHINE_CONFIG_START( model2o, model2_state )
|
||||
MCFG_NVRAM_ADD_1FILL("backup1")
|
||||
MCFG_NVRAM_ADD_1FILL("backup2")
|
||||
|
||||
MCFG_TIMER_ADD("timer0", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)0)
|
||||
MCFG_TIMER_ADD("timer1", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)1)
|
||||
MCFG_TIMER_ADD("timer2", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)2)
|
||||
MCFG_TIMER_ADD("timer3", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)3)
|
||||
|
||||
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
|
||||
@ -2026,7 +2023,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_START( model2a, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2a_crx_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2_snd)
|
||||
@ -2041,13 +2038,13 @@ static MACHINE_CONFIG_START( model2a, model2_state )
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
MCFG_NVRAM_ADD_1FILL("backup1")
|
||||
|
||||
MCFG_TIMER_ADD("timer0", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)0)
|
||||
MCFG_TIMER_ADD("timer1", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)1)
|
||||
MCFG_TIMER_ADD("timer2", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)2)
|
||||
MCFG_TIMER_ADD("timer3", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)3)
|
||||
|
||||
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
|
||||
@ -2123,7 +2120,7 @@ static const sharc_config sharc_cfg =
|
||||
static MACHINE_CONFIG_START( model2b, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2b_crx_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2_snd)
|
||||
@ -2144,13 +2141,13 @@ static MACHINE_CONFIG_START( model2b, model2_state )
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
MCFG_NVRAM_ADD_1FILL("backup1")
|
||||
|
||||
MCFG_TIMER_ADD("timer0", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)0)
|
||||
MCFG_TIMER_ADD("timer1", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)1)
|
||||
MCFG_TIMER_ADD("timer2", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)2)
|
||||
MCFG_TIMER_ADD("timer3", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)3)
|
||||
|
||||
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
|
||||
@ -2180,7 +2177,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_START( model2c, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2c_crx_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2c_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2c_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2_snd)
|
||||
@ -2191,13 +2188,13 @@ static MACHINE_CONFIG_START( model2c, model2_state )
|
||||
MCFG_EEPROM_93C46_ADD("eeprom")
|
||||
MCFG_NVRAM_ADD_1FILL("backup1")
|
||||
|
||||
MCFG_TIMER_ADD("timer0", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)0)
|
||||
MCFG_TIMER_ADD("timer1", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)1)
|
||||
MCFG_TIMER_ADD("timer2", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)2)
|
||||
MCFG_TIMER_ADD("timer3", model2_timer_cb)
|
||||
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
|
||||
MCFG_TIMER_PTR((FPTR)3)
|
||||
|
||||
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
|
||||
|
@ -5251,15 +5251,14 @@ static const scsp_interface scsp2_interface =
|
||||
0x02: Video (VBLANK start?)
|
||||
0x01: Video (unused?)
|
||||
*/
|
||||
static TIMER_DEVICE_CALLBACK(model3_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(model3_state::model3_interrupt)
|
||||
{
|
||||
// model3_state *state = timer.machine().driver_data<model3_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 384)
|
||||
model3_set_irq_line(timer.machine(), 0x02, ASSERT_LINE);
|
||||
model3_set_irq_line(machine(), 0x02, ASSERT_LINE);
|
||||
else if(scanline == 0)
|
||||
model3_set_irq_line(timer.machine(), 0x0d, ASSERT_LINE);
|
||||
model3_set_irq_line(machine(), 0x0d, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static const powerpc_config model3_10 =
|
||||
@ -5290,7 +5289,7 @@ static MACHINE_CONFIG_START( model3_10, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603E, 66000000)
|
||||
MCFG_CPU_CONFIG(model3_10)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
@ -5333,7 +5332,7 @@ static MACHINE_CONFIG_START( model3_15, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603E, 100000000)
|
||||
MCFG_CPU_CONFIG(model3_15)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
@ -5374,7 +5373,7 @@ static MACHINE_CONFIG_START( model3_20, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603R, 166000000)
|
||||
MCFG_CPU_CONFIG(model3_2x)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
@ -5412,7 +5411,7 @@ static MACHINE_CONFIG_START( model3_21, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603R, 166000000)
|
||||
MCFG_CPU_CONFIG(model3_2x)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
|
@ -116,13 +116,12 @@ READ8_MEMBER(mrflea_state::mrflea_io_status_r)
|
||||
return m_status ^ 0x01;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mrflea_slave_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mrflea_state::mrflea_slave_interrupt)
|
||||
{
|
||||
mrflea_state *state = timer.machine().driver_data<mrflea_state>();
|
||||
int scanline = param;
|
||||
|
||||
if ((scanline == 248) || (scanline == 248/2 && (state->m_status & 0x08)))
|
||||
state->m_subcpu->set_input_line(0, HOLD_LINE);
|
||||
if ((scanline == 248) || (scanline == 248/2 && (m_status & 0x08)))
|
||||
m_subcpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(mrflea_state::mrflea_interrupt_type_r)
|
||||
@ -362,7 +361,7 @@ static MACHINE_CONFIG_START( mrflea, mrflea_state )
|
||||
MCFG_CPU_ADD("sub", Z80, 6000000)
|
||||
MCFG_CPU_PROGRAM_MAP(mrflea_slave_map)
|
||||
MCFG_CPU_IO_MAP(mrflea_slave_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mrflea_slave_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mrflea_state, mrflea_slave_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
||||
|
||||
|
@ -1304,11 +1304,11 @@ static void irq_raise(running_machine &machine, int level)
|
||||
}
|
||||
|
||||
/* TODO: fix this arrangement (derived from old deprecat lib) */
|
||||
static TIMER_DEVICE_CALLBACK(ms32_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ms32_state::ms32_interrupt)
|
||||
{
|
||||
int scanline = param;
|
||||
if( scanline == 0) irq_raise(timer.machine(), 10);
|
||||
if( scanline == 8) irq_raise(timer.machine(), 9);
|
||||
if( scanline == 0) irq_raise(machine(), 10);
|
||||
if( scanline == 8) irq_raise(machine(), 9);
|
||||
/* hayaosi1 needs at least 12 IRQ 0 per frame to work (see code at FFE02289)
|
||||
kirarast needs it too, at least 8 per frame, but waits for a variable amount
|
||||
47pi2 needs ?? per frame (otherwise it hangs when you lose)
|
||||
@ -1317,7 +1317,7 @@ static TIMER_DEVICE_CALLBACK(ms32_interrupt)
|
||||
desertwr
|
||||
p47aces
|
||||
*/
|
||||
if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise(timer.machine(), 0);
|
||||
if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise(machine(), 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1394,7 +1394,7 @@ static MACHINE_CONFIG_START( ms32, ms32_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", V70, 20000000) // 20MHz
|
||||
MCFG_CPU_PROGRAM_MAP(ms32_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", ms32_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ms32_state, ms32_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(ms32_sound_map)
|
||||
|
@ -2116,10 +2116,9 @@ MACHINE_CONFIG_END
|
||||
#define SPCENCTR_STROBE_DUTY_CYCLE (95) /* % */
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( spcenctr_strobe_timer_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mw8080bw_state::spcenctr_strobe_timer_callback)
|
||||
{
|
||||
mw8080bw_state *state = timer.machine().driver_data<mw8080bw_state>();
|
||||
output_set_value("STROBE", param && state->m_spcenctr_strobe_state);
|
||||
output_set_value("STROBE", param && m_spcenctr_strobe_state);
|
||||
}
|
||||
|
||||
|
||||
@ -2259,10 +2258,10 @@ static MACHINE_CONFIG_DERIVED( spcenctr, mw8080bw_root )
|
||||
MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ))
|
||||
|
||||
/* timers */
|
||||
MCFG_TIMER_ADD_PERIODIC("strobeon", spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("strobeon", mw8080bw_state, spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ))
|
||||
MCFG_TIMER_PARAM(TRUE) /* indicates strobe ON */
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("strobeoff", spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("strobeoff", mw8080bw_state, spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ))
|
||||
MCFG_TIMER_START_DELAY(attotime::from_hz(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_STROBE_DUTY_CYCLE))
|
||||
MCFG_TIMER_PARAM(FALSE) /* indicates strobe OFF */
|
||||
|
||||
|
@ -104,52 +104,49 @@ WRITE16_MEMBER(mystwarr_state::mmeeprom_w)
|
||||
/**********************************************************************************/
|
||||
/* IRQ controllers */
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(mystwarr_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::mystwarr_interrupt)
|
||||
{
|
||||
mystwarr_state *state = timer.machine().driver_data<mystwarr_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (!(state->m_mw_irq_control & 0x01)) return;
|
||||
if (!(m_mw_irq_control & 0x01)) return;
|
||||
|
||||
if(scanline == 240)
|
||||
state->m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
state->m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
|
||||
|
||||
/* writes to LSB of 0x410000 port and clears a work RAM flag, almost likely not really necessary. */
|
||||
// state->m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
// m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(metamrph_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::metamrph_interrupt)
|
||||
{
|
||||
mystwarr_state *state = timer.machine().driver_data<mystwarr_state>();
|
||||
int scanline = param;
|
||||
|
||||
/* irq 4 has an irq routine in metamrph, but it's not really called */
|
||||
// state->m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
|
||||
// m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
|
||||
|
||||
if(scanline == 24)
|
||||
state->m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
|
||||
if(scanline == 248)
|
||||
if (K053246_is_IRQ_enabled()) state->m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE);
|
||||
if (K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(mchamp_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::mchamp_interrupt)
|
||||
{
|
||||
mystwarr_state *state = timer.machine().driver_data<mystwarr_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (!(state->m_mw_irq_control & 0x02)) return;
|
||||
if (!(m_mw_irq_control & 0x02)) return;
|
||||
|
||||
if(scanline == 247)
|
||||
{
|
||||
if (K053246_is_IRQ_enabled()) state->m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
if (K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 23)
|
||||
state->m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE);
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(mystwarr_state::ddd_interrupt)
|
||||
@ -986,7 +983,7 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz (confirmed) */
|
||||
MCFG_CPU_PROGRAM_MAP(mystwarr_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mystwarr_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mystwarr_state, mystwarr_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 8000000)
|
||||
MCFG_CPU_PROGRAM_MAP(mystwarr_sound_map)
|
||||
@ -1038,7 +1035,7 @@ static MACHINE_CONFIG_DERIVED( viostorm, mystwarr )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(viostorm_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(metamrph_interrupt)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(mystwarr_state, metamrph_interrupt)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_START_OVERRIDE(mystwarr_state,viostorm)
|
||||
@ -1059,7 +1056,7 @@ static MACHINE_CONFIG_DERIVED( metamrph, mystwarr )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(metamrph_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(metamrph_interrupt)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(mystwarr_state, metamrph_interrupt)
|
||||
|
||||
MCFG_DEVICE_REMOVE("k053252")
|
||||
MCFG_K053252_ADD("k053252", 6000000, metamrph_k053252_intf) // 6 MHz?
|
||||
@ -1140,7 +1137,7 @@ static MACHINE_CONFIG_DERIVED( martchmp, mystwarr )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(martchmp_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(mchamp_interrupt)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(mystwarr_state, mchamp_interrupt)
|
||||
|
||||
MCFG_DEVICE_REMOVE("k053252")
|
||||
MCFG_K053252_ADD("k053252", 16000000/2, martchmp_k053252_intf)
|
||||
|
@ -428,22 +428,20 @@ INPUT_PORTS_END
|
||||
|
||||
/* Interrupts */
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( rst1_tick )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst1_tick)
|
||||
{
|
||||
n8080_state *n8080 = timer.machine().driver_data<n8080_state>();
|
||||
int state = n8080->m_inte ? ASSERT_LINE : CLEAR_LINE;
|
||||
int state = m_inte ? ASSERT_LINE : CLEAR_LINE;
|
||||
|
||||
/* V7 = 1, V6 = 0 */
|
||||
n8080->m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xcf);
|
||||
m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xcf);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( rst2_tick )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst2_tick)
|
||||
{
|
||||
n8080_state *n8080 = timer.machine().driver_data<n8080_state>();
|
||||
int state = n8080->m_inte ? ASSERT_LINE : CLEAR_LINE;
|
||||
int state = m_inte ? ASSERT_LINE : CLEAR_LINE;
|
||||
|
||||
/* vblank */
|
||||
n8080->m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xd7);
|
||||
m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xd7);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(n8080_state::n8080_inte_callback)
|
||||
@ -560,8 +558,8 @@ static MACHINE_CONFIG_START( spacefev, n8080_state )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(n8080_state,n8080)
|
||||
MCFG_VIDEO_START_OVERRIDE(n8080_state,spacefev)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("rst1", rst1_tick, "screen", 128, 256)
|
||||
MCFG_TIMER_ADD_SCANLINE("rst2", rst2_tick, "screen", 240, 256)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_FRAGMENT_ADD( spacefev_sound )
|
||||
@ -590,8 +588,8 @@ static MACHINE_CONFIG_START( sheriff, n8080_state )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(n8080_state,n8080)
|
||||
MCFG_VIDEO_START_OVERRIDE(n8080_state,sheriff)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("rst1", rst1_tick, "screen", 128, 256)
|
||||
MCFG_TIMER_ADD_SCANLINE("rst2", rst2_tick, "screen", 240, 256)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_FRAGMENT_ADD( sheriff_sound )
|
||||
@ -632,8 +630,8 @@ static MACHINE_CONFIG_START( helifire, n8080_state )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(n8080_state,helifire)
|
||||
MCFG_VIDEO_START_OVERRIDE(n8080_state,helifire)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("rst1", rst1_tick, "screen", 128, 256)
|
||||
MCFG_TIMER_ADD_SCANLINE("rst2", rst2_tick, "screen", 240, 256)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_FRAGMENT_ADD( helifire_sound )
|
||||
|
@ -543,25 +543,19 @@ TIMER_CALLBACK_MEMBER(namcofl_state::raster_interrupt_callback)
|
||||
m_raster_interrupt_timer->adjust(machine().primary_screen->frame_period());
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mcu_irq0_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcofl_state::mcu_irq0_cb)
|
||||
{
|
||||
namcofl_state *state = timer.machine().driver_data<namcofl_state>();
|
||||
|
||||
state->m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mcu_irq2_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcofl_state::mcu_irq2_cb)
|
||||
{
|
||||
namcofl_state *state = timer.machine().driver_data<namcofl_state>();
|
||||
|
||||
state->m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mcu_adc_cb )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcofl_state::mcu_adc_cb)
|
||||
{
|
||||
namcofl_state *state = timer.machine().driver_data<namcofl_state>();
|
||||
|
||||
state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -591,9 +585,9 @@ static MACHINE_CONFIG_START( namcofl, namcofl_state )
|
||||
MCFG_CPU_PROGRAM_MAP(namcoc75_am)
|
||||
MCFG_CPU_IO_MAP(namcoc75_io)
|
||||
/* TODO: irq generation for these */
|
||||
MCFG_TIMER_ADD_PERIODIC("mcu_irq0", mcu_irq0_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_ADD_PERIODIC("mcu_irq2", mcu_irq2_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_ADD_PERIODIC("mcu_adc", mcu_adc_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_irq0", namcofl_state, mcu_irq0_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_irq2", namcofl_state, mcu_irq2_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_adc", namcofl_state, mcu_adc_cb, attotime::from_hz(60))
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(namcofl_state,namcofl)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(namcofl_state,namcofl)
|
||||
|
@ -955,28 +955,27 @@ static ADDRESS_MAP_START( namcona1_mcu_io_map, AS_IO, 8, namcona1_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( namcona1_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcona1_state::namcona1_interrupt)
|
||||
{
|
||||
namcona1_state *state = timer.machine().driver_data<namcona1_state>();
|
||||
int scanline = param;
|
||||
int enabled = state->m_mEnableInterrupts ? ~state->m_vreg[0x1a/2] : 0;
|
||||
int enabled = m_mEnableInterrupts ? ~m_vreg[0x1a/2] : 0;
|
||||
|
||||
// vblank
|
||||
if (scanline == 224)
|
||||
{
|
||||
simulate_mcu( timer.machine() );
|
||||
simulate_mcu( machine() );
|
||||
if (enabled & 8)
|
||||
state->m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
// posirq, used with dolphin in Emeraldia's "how to play" attract mode
|
||||
int posirq_scanline = state->m_vreg[0x8a/2] & 0xff;
|
||||
int posirq_scanline = m_vreg[0x8a/2] & 0xff;
|
||||
if (scanline == posirq_scanline && enabled & 4)
|
||||
{
|
||||
if (posirq_scanline)
|
||||
timer.machine().primary_screen->update_partial(posirq_scanline);
|
||||
machine().primary_screen->update_partial(posirq_scanline);
|
||||
|
||||
state->m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -984,18 +983,17 @@ static TIMER_DEVICE_CALLBACK( namcona1_interrupt )
|
||||
// IRQ 1 =>
|
||||
// IRQ 2 =>
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mcu_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcona1_state::mcu_interrupt)
|
||||
{
|
||||
namcona1_state *state = timer.machine().driver_data<namcona1_state>();
|
||||
int scanline = param;
|
||||
|
||||
// vblank
|
||||
if (scanline == 224)
|
||||
state->m_mcu->set_input_line(M37710_LINE_IRQ1, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_IRQ1, HOLD_LINE);
|
||||
|
||||
// adc (timing guessed, when does this trigger?)
|
||||
if (scanline == 0)
|
||||
state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
}
|
||||
|
||||
static const c140_interface C140_interface_typeA =
|
||||
@ -1008,12 +1006,12 @@ static MACHINE_CONFIG_START( namcona1, namcona1_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 50113000/4)
|
||||
MCFG_CPU_PROGRAM_MAP(namcona1_main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scan_main", namcona1_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scan_main", namcona1_state, namcona1_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("mcu", M37702, 50113000/4)
|
||||
MCFG_CPU_PROGRAM_MAP(namcona1_mcu_map)
|
||||
MCFG_CPU_IO_MAP( namcona1_mcu_io_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scan_mcu", mcu_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scan_mcu", namcona1_state, mcu_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_NVRAM_HANDLER(namcosna1)
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(2400))
|
||||
|
@ -282,17 +282,17 @@ GFX: Custom 145 ( 80 pin PQFP)
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mcu_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namconb1_state::mcu_interrupt)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
/* TODO: real sources of these */
|
||||
if (scanline == 224)
|
||||
timer.machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
|
||||
machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
|
||||
else if (scanline == 0)
|
||||
timer.machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
|
||||
machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
|
||||
else if (scanline == 128)
|
||||
timer.machine().device("mcu")->execute().set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
machine().device("mcu")->execute().set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1010,7 +1010,7 @@ static MACHINE_CONFIG_START( namconb1, namconb1_state )
|
||||
MCFG_CPU_ADD("mcu", M37702, MASTER_CLOCK_HZ/3)
|
||||
MCFG_CPU_PROGRAM_MAP(namcoc75_am)
|
||||
MCFG_CPU_IO_MAP(namcoc75_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("mcu_st", mcu_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namconb1_state, mcu_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_NVRAM_HANDLER(namconb1)
|
||||
MCFG_MACHINE_START_OVERRIDE(namconb1_state,namconb)
|
||||
@ -1042,7 +1042,7 @@ static MACHINE_CONFIG_START( namconb2, namconb1_state )
|
||||
MCFG_CPU_ADD("mcu", M37702, MASTER_CLOCK_HZ/3)
|
||||
MCFG_CPU_PROGRAM_MAP(namcoc75_am)
|
||||
MCFG_CPU_IO_MAP(namcoc75_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("mcu_st", mcu_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namconb1_state, mcu_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_NVRAM_HANDLER(namconb1)
|
||||
MCFG_MACHINE_START_OVERRIDE(namconb1_state,namconb)
|
||||
|
@ -1683,36 +1683,34 @@ READ16_MEMBER(namcos22_state::master_serial_io_r)
|
||||
return m_mSerialDataSlaveToMasterCurrent;
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( dsp_master_serial_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::dsp_master_serial_irq)
|
||||
{
|
||||
namcos22_state *state = timer.machine().driver_data<namcos22_state>();
|
||||
int scanline = param;
|
||||
|
||||
if( state->m_mbEnableDspIrqs )
|
||||
if( m_mbEnableDspIrqs )
|
||||
{
|
||||
state->m_mSerialDataSlaveToMasterCurrent = state->m_mSerialDataSlaveToMasterNext;
|
||||
m_mSerialDataSlaveToMasterCurrent = m_mSerialDataSlaveToMasterNext;
|
||||
|
||||
if(scanline == 480)
|
||||
state->m_master->set_input_line(TMS32025_INT0, HOLD_LINE);
|
||||
m_master->set_input_line(TMS32025_INT0, HOLD_LINE);
|
||||
else if((scanline % 2) == 0)
|
||||
{
|
||||
state->m_master->set_input_line(TMS32025_RINT, HOLD_LINE);
|
||||
state->m_master->set_input_line(TMS32025_XINT, HOLD_LINE);
|
||||
m_master->set_input_line(TMS32025_RINT, HOLD_LINE);
|
||||
m_master->set_input_line(TMS32025_XINT, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( dsp_slave_serial_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::dsp_slave_serial_irq)
|
||||
{
|
||||
namcos22_state *state = timer.machine().driver_data<namcos22_state>();
|
||||
int scanline = param;
|
||||
|
||||
if( state->m_mbEnableDspIrqs )
|
||||
if( m_mbEnableDspIrqs )
|
||||
{
|
||||
if((scanline % 2) == 0)
|
||||
{
|
||||
state->m_slave->set_input_line(TMS32025_RINT, HOLD_LINE);
|
||||
state->m_slave->set_input_line(TMS32025_XINT, HOLD_LINE);
|
||||
m_slave->set_input_line(TMS32025_RINT, HOLD_LINE);
|
||||
m_slave->set_input_line(TMS32025_XINT, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2920,18 +2918,17 @@ static ADDRESS_MAP_START( mcu_s22_io, AS_IO, 8, namcos22_state )
|
||||
AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_s22_r )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( mcu_irq )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::mcu_irq)
|
||||
{
|
||||
namcos22_state *state = timer.machine().driver_data<namcos22_state>();
|
||||
int scanline = param;
|
||||
|
||||
/* TODO: real sources of these */
|
||||
if(scanline == 480)
|
||||
state->m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE);
|
||||
else if(scanline == 500)
|
||||
state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE);
|
||||
else if(scanline == 0)
|
||||
state->m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
|
||||
m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE);
|
||||
}
|
||||
|
||||
void namcos22_state::machine_reset()
|
||||
@ -2948,18 +2945,18 @@ static MACHINE_CONFIG_START( namcos22s, namcos22_state )
|
||||
MCFG_CPU_PROGRAM_MAP(master_dsp_program)
|
||||
MCFG_CPU_DATA_MAP(master_dsp_data)
|
||||
MCFG_CPU_IO_MAP(master_dsp_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("master_st", dsp_master_serial_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("master_st", namcos22_state, dsp_master_serial_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("slave", TMS32025,SS22_MASTER_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(slave_dsp_program)
|
||||
MCFG_CPU_DATA_MAP(slave_dsp_data)
|
||||
MCFG_CPU_IO_MAP(slave_dsp_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("slave_st", dsp_slave_serial_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("mcu", M37710, SS22_MASTER_CLOCK/3)
|
||||
MCFG_CPU_PROGRAM_MAP(mcu_program)
|
||||
MCFG_CPU_IO_MAP( mcu_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("mcu_st", mcu_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namcos22_state, mcu_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
||||
// MCFG_QUANTUM_PERFECT_CPU("maincpu")
|
||||
@ -3199,13 +3196,13 @@ static MACHINE_CONFIG_START( namcos22, namcos22_state )
|
||||
MCFG_CPU_PROGRAM_MAP(master_dsp_program)
|
||||
MCFG_CPU_DATA_MAP(master_dsp_data)
|
||||
MCFG_CPU_IO_MAP(master_dsp_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("master_st", dsp_master_serial_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("master_st", namcos22_state, dsp_master_serial_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("slave", TMS32025,SS22_MASTER_CLOCK) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(slave_dsp_program)
|
||||
MCFG_CPU_DATA_MAP(slave_dsp_data)
|
||||
MCFG_CPU_IO_MAP(slave_dsp_io)
|
||||
MCFG_TIMER_ADD_SCANLINE("slave_st", dsp_slave_serial_irq, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("mcu", M37702, SS22_MASTER_CLOCK/3) // C74 on the CPU board has no periodic interrupts, it runs entirely off Timer A0
|
||||
MCFG_CPU_PROGRAM_MAP( mcu_s22_program)
|
||||
|
@ -70,31 +70,29 @@ INTERRUPT_GEN_MEMBER(nemesis_state::blkpnthr_interrupt)
|
||||
device.execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( konamigt_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nemesis_state::konamigt_interrupt)
|
||||
{
|
||||
nemesis_state *state = timer.machine().driver_data<nemesis_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240 && state->m_irq_on && (timer.machine().primary_screen->frame_number() & 1) == 0)
|
||||
state->m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
if (scanline == 240 && m_irq_on && (machine().primary_screen->frame_number() & 1) == 0)
|
||||
m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
|
||||
if (scanline == 0 && state->m_irq2_on)
|
||||
state->m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
if (scanline == 0 && m_irq2_on)
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( gx400_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nemesis_state::gx400_interrupt)
|
||||
{
|
||||
nemesis_state *state = timer.machine().driver_data<nemesis_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240 && state->m_irq1_on && (timer.machine().primary_screen->frame_number() & 1) == 0)
|
||||
state->m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
if (scanline == 240 && m_irq1_on && (machine().primary_screen->frame_number() & 1) == 0)
|
||||
m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
|
||||
if (scanline == 0 && state->m_irq2_on)
|
||||
state->m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
if (scanline == 0 && m_irq2_on)
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
|
||||
if (scanline == 120 && state->m_irq4_on)
|
||||
state->m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
if (scanline == 120 && m_irq4_on)
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1598,7 +1596,7 @@ static MACHINE_CONFIG_START( gx400, nemesis_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(gx400_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
|
||||
@ -1641,7 +1639,7 @@ static MACHINE_CONFIG_START( konamigt, nemesis_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
|
||||
MCFG_CPU_PROGRAM_MAP(konamigt_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", konamigt_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, konamigt_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
@ -1680,7 +1678,7 @@ static MACHINE_CONFIG_START( rf2_gx400, nemesis_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(rf2_gx400_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
|
||||
@ -1903,7 +1901,7 @@ static MACHINE_CONFIG_START( hcrash, nemesis_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,18432000/3) /* 6.144MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(hcrash_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", konamigt_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, konamigt_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(sal_sound_map)
|
||||
@ -2648,7 +2646,7 @@ static MACHINE_CONFIG_START( bubsys, nemesis_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(gx400_map)
|
||||
// MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1)
|
||||
MCFG_DEVICE_DISABLE()
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||
|
@ -143,7 +143,7 @@ static MACHINE_CONFIG_START( nitedrvr, nitedrvr_state )
|
||||
MCFG_WATCHDOG_VBLANK_INIT(3)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("crash_timer", nitedrvr_crash_toggle_callback, PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1)))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("crash_timer", nitedrvr_state, nitedrvr_crash_toggle_callback, PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1)))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -867,14 +867,14 @@ static void mcu_run(running_machine &machine, UINT8 dsw_setting)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( tdragon_mcu_sim )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::tdragon_mcu_sim)
|
||||
{
|
||||
mcu_run(timer.machine(),1);
|
||||
mcu_run(machine(),1);
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( hachamf_mcu_sim )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::hachamf_mcu_sim)
|
||||
{
|
||||
mcu_run(timer.machine(),0);
|
||||
mcu_run(machine(),0);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( tdragon_map, AS_PROGRAM, 16, nmk16_state )
|
||||
@ -3512,30 +3512,30 @@ static const ym2203_interface ym2203_config =
|
||||
DEVCB_LINE(ym2203_irqhandler)
|
||||
};
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( nmk16_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
|
||||
/* This is either vblank-in or sprite dma irq complete, Vandyke definitely relies that irq fires at scanline ~0 instead of 112 (as per previous
|
||||
cpu_getiloops function implementation), mostly noticeable with sword collisions and related attract mode behaviour. */
|
||||
if(scanline == 0)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
/* bee-oh board, almost certainly it has different timings */
|
||||
static TIMER_DEVICE_CALLBACK( manybloc_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::manybloc_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 248) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
|
||||
/* This is either vblank-in or sprite dma irq complete */
|
||||
if(scanline == 0)
|
||||
timer.machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -3550,7 +3550,7 @@ static MACHINE_CONFIG_START( tharrier, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(tharrier_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3000000)
|
||||
MCFG_CPU_PROGRAM_MAP(tharrier_sound_map)
|
||||
@ -3595,7 +3595,7 @@ static MACHINE_CONFIG_START( manybloc, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10? MHz - check */
|
||||
MCFG_CPU_PROGRAM_MAP(manybloc_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 56)/* this needs to equal the framerate on this, rather than being double it .. */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", manybloc_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, manybloc_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3000000)
|
||||
MCFG_CPU_PROGRAM_MAP(tharrier_sound_map)
|
||||
@ -3638,7 +3638,7 @@ static MACHINE_CONFIG_START( mustang, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */
|
||||
MCFG_CPU_PROGRAM_MAP(mustang_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004)
|
||||
|
||||
@ -3679,7 +3679,7 @@ static MACHINE_CONFIG_START( mustangb, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */
|
||||
MCFG_CPU_PROGRAM_MAP(mustangb_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
@ -3713,7 +3713,7 @@ static MACHINE_CONFIG_START( bioship, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, BIOSHIP_CRYSTAL1 ) /* 10.0 MHz (verified) */
|
||||
MCFG_CPU_PROGRAM_MAP(bioship_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 100)/* 112 breaks the title screen */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004)
|
||||
|
||||
@ -3754,7 +3754,7 @@ static MACHINE_CONFIG_START( vandyke, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 68000p12 running at 10Mhz, verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(vandyke_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004)
|
||||
|
||||
@ -3795,7 +3795,7 @@ static MACHINE_CONFIG_START( vandykeb, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */
|
||||
MCFG_CPU_PROGRAM_MAP(vandykeb_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("mcu", PIC16C57, 12000000) /* 3MHz */
|
||||
MCFG_DEVICE_DISABLE()
|
||||
@ -3829,7 +3829,7 @@ static MACHINE_CONFIG_START( acrobatm, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz (verified on pcb) */
|
||||
MCFG_CPU_PROGRAM_MAP(acrobatm_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004)
|
||||
|
||||
@ -3872,7 +3872,7 @@ static MACHINE_CONFIG_START( tdragonb, nmk16_state ) /* bootleg using Raiden sou
|
||||
MCFG_CPU_PROGRAM_MAP(tdragonb_map)
|
||||
//MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
@ -3903,7 +3903,7 @@ static MACHINE_CONFIG_START( tdragon, nmk16_state )
|
||||
MCFG_CPU_PROGRAM_MAP(tdragon_map)
|
||||
//MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004)
|
||||
|
||||
@ -3920,7 +3920,7 @@ static MACHINE_CONFIG_START( tdragon, nmk16_state )
|
||||
MCFG_PALETTE_LENGTH(1024)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(nmk16_state,macross)
|
||||
MCFG_TIMER_ADD_PERIODIC("coinsim", tdragon_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("coinsim", nmk16_state, tdragon_mcu_sim, attotime::from_hz(10000))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -3978,7 +3978,7 @@ static MACHINE_CONFIG_START( strahl, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ? */
|
||||
MCFG_CPU_PROGRAM_MAP(strahl_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004)
|
||||
|
||||
@ -4036,7 +4036,7 @@ static MACHINE_CONFIG_START( hachamf, nmk16_state )
|
||||
MCFG_PALETTE_LENGTH(1024)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(nmk16_state,macross)
|
||||
MCFG_TIMER_ADD_PERIODIC("coinsim", hachamf_mcu_sim, attotime::from_hz(10000)) // not real, but for simulating the MCU
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("coinsim", nmk16_state, hachamf_mcu_sim, attotime::from_hz(10000))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -4815,7 +4815,7 @@ static MACHINE_CONFIG_START( stagger1, nmk16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,XTAL_12MHz) /* 68000p10 running at 12mhz, verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(afega)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(afega_sound_cpu)
|
||||
@ -4900,7 +4900,7 @@ static MACHINE_CONFIG_START( firehawk, nmk16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(afega)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80,4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(firehawk_sound_cpu)
|
||||
@ -4935,7 +4935,7 @@ static MACHINE_CONFIG_START( twinactn, nmk16_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000,12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(twinactn_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(twinactn_sound_cpu)
|
||||
|
@ -31,12 +31,11 @@ Atari Orbit Driver
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( nmi_32v )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(orbit_state::nmi_32v)
|
||||
{
|
||||
orbit_state *state = timer.machine().driver_data<orbit_state>();
|
||||
int scanline = param;
|
||||
int nmistate = (scanline & 32) && (state->m_misc_flags & 4);
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE);
|
||||
int nmistate = (scanline & 32) && (m_misc_flags & 4);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -300,7 +299,7 @@ static MACHINE_CONFIG_START( orbit, orbit_state )
|
||||
MCFG_CPU_PROGRAM_MAP(orbit_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", orbit_state, orbit_interrupt)
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("32v", nmi_32v, "screen", 0, 32)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("32v", orbit_state, nmi_32v, "screen", 0, 32)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
|
@ -74,16 +74,16 @@ WRITE16_MEMBER(overdriv_state::eeprom_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( overdriv_cpuA_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(overdriv_state::overdriv_cpuA_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
/* TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?) */
|
||||
/* this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow */
|
||||
if(scanline == 256 && timer.machine().primary_screen->frame_number() & 1) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
if(scanline == 256 && machine().primary_screen->frame_number() & 1) // vblank-out irq
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
else if((scanline % 128) == 0) // timer irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE);
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt)
|
||||
@ -328,7 +328,7 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(overdriv_master_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", overdriv_cpuA_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", overdriv_state, overdriv_cpuA_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", M68000,24000000/2) /* 12 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(overdriv_slave_map)
|
||||
|
@ -488,16 +488,15 @@ GFXDECODE_END
|
||||
|
||||
/* most games require IRQ4 for inputs to work, Puzzli 2 is explicit about not wanting it tho
|
||||
what is the source? */
|
||||
TIMER_DEVICE_CALLBACK( pgm_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(pgm_state::pgm_interrupt)
|
||||
{
|
||||
pgm_state *state = timer.machine().driver_data<pgm_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224)
|
||||
state->m_maincpu->set_input_line(6, HOLD_LINE);
|
||||
m_maincpu->set_input_line(6, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
if (!state->m_irq4_disabled) state->m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
if (!m_irq4_disabled) m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(pgm_state,pgm)
|
||||
@ -521,7 +520,7 @@ MACHINE_CONFIG_FRAGMENT( pgmbase )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000) /* 20 mhz! verified on real board */
|
||||
MCFG_CPU_PROGRAM_MAP(pgm_basic_mem)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", pgm_state, irq6_line_hold)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", pgm_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pgm_state, pgm_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 33868800/4)
|
||||
MCFG_CPU_PROGRAM_MAP(pgm_z80_mem)
|
||||
|
@ -55,33 +55,31 @@ WRITE8_MEMBER(pingpong_state::coin_w)
|
||||
/* other bits unknown */
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( pingpong_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(pingpong_state::pingpong_interrupt)
|
||||
{
|
||||
pingpong_state *state = timer.machine().driver_data<pingpong_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240)
|
||||
{
|
||||
if (state->m_intenable & 0x04) state->m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
if (m_intenable & 0x04) m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
else if ((scanline % 32) == 0)
|
||||
{
|
||||
if (state->m_intenable & 0x08) state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if (m_intenable & 0x08) m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( merlinmm_interrupt )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(pingpong_state::merlinmm_interrupt)
|
||||
{
|
||||
pingpong_state *state = timer.machine().driver_data<pingpong_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 240)
|
||||
{
|
||||
if (state->m_intenable & 0x04) state->m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
if (m_intenable & 0x04) m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
else if (scanline == 0)
|
||||
{
|
||||
if (state->m_intenable & 0x08) state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
if (m_intenable & 0x08) m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -464,7 +462,7 @@ static MACHINE_CONFIG_START( pingpong, pingpong_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu",Z80,18432000/6) /* 3.072 MHz (probably) */
|
||||
MCFG_CPU_PROGRAM_MAP(pingpong_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", pingpong_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pingpong_state, pingpong_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -491,7 +489,7 @@ static MACHINE_CONFIG_DERIVED( merlinmm, pingpong )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(merlinmm_map)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(merlinmm_interrupt)
|
||||
MCFG_TIMER_DRIVER_CALLBACK(pingpong_state, merlinmm_interrupt)
|
||||
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -445,18 +445,17 @@ static const namco_53xx_interface namco_53xx_intf =
|
||||
};
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( polepos_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polepos_state::polepos_scanline)
|
||||
{
|
||||
polepos_state *state = timer.machine().driver_data<polepos_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (((scanline == 64) || (scanline == 192)) && state->m_main_irq_mask) // 64V
|
||||
timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
if (((scanline == 64) || (scanline == 192)) && m_main_irq_mask) // 64V
|
||||
machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
|
||||
if (scanline == 240 && state->m_sub_irq_mask) // VBLANK
|
||||
if (scanline == 240 && m_sub_irq_mask) // VBLANK
|
||||
{
|
||||
timer.machine().device("sub")->execute().set_input_line(0, ASSERT_LINE);
|
||||
timer.machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE);
|
||||
machine().device("sub")->execute().set_input_line(0, ASSERT_LINE);
|
||||
machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -903,7 +902,7 @@ static MACHINE_CONFIG_START( polepos, polepos_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(polepos_state,polepos)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", polepos_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", polepos_state, polepos_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -982,7 +981,7 @@ static MACHINE_CONFIG_START( topracern, polepos_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(polepos_state,polepos)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", polepos_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", polepos_state, polepos_scanline, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -88,7 +88,7 @@ emulated now. ;)
|
||||
|
||||
|
||||
/* timer handling */
|
||||
static TIMER_DEVICE_CALLBACK( polyplay_timer_callback );
|
||||
|
||||
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ static MACHINE_CONFIG_START( polyplay, polyplay_state )
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", polyplay_state, coin_interrupt)
|
||||
|
||||
|
||||
MCFG_TIMER_ADD("timer", polyplay_timer_callback)
|
||||
MCFG_TIMER_DRIVER_ADD("timer", polyplay_state, polyplay_timer_callback)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
@ -342,9 +342,9 @@ ROM_START( polyplay )
|
||||
ROM_END
|
||||
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( polyplay_timer_callback )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polyplay_state::polyplay_timer_callback)
|
||||
{
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4c);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4c);
|
||||
}
|
||||
|
||||
/* game driver */
|
||||
|
@ -327,15 +327,15 @@ void psychic5_state::machine_reset()
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( psychic5_scanline )
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(psychic5_state::psychic5_scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */
|
||||
|
||||
if(scanline == 0) // sprite buffer irq
|
||||
timer.machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
|
||||
@ -663,7 +663,7 @@ static MACHINE_CONFIG_START( psychic5, psychic5_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(psychic5_main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", psychic5_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", psychic5_state, psychic5_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(psychic5_sound_map)
|
||||
@ -708,7 +708,7 @@ static MACHINE_CONFIG_START( bombsa, psychic5_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2 ) /* 6 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(bombsa_main_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", psychic5_scanline, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", psychic5_state, psychic5_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_5MHz )
|
||||
MCFG_CPU_PROGRAM_MAP(bombsa_sound_map)
|
||||
|
@ -264,19 +264,18 @@ READ16_MEMBER(qdrmfgp_state::gp2_ide_std_r)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(qdrmfgp_interrupt)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(qdrmfgp_state::qdrmfgp_interrupt)
|
||||
{
|
||||
qdrmfgp_state *state = timer.machine().driver_data<qdrmfgp_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 0)
|
||||
if (state->m_control & 0x0001)
|
||||
state->m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
if (m_control & 0x0001)
|
||||
m_maincpu->set_input_line(1, HOLD_LINE);
|
||||
|
||||
/* trigger V-blank interrupt */
|
||||
if(scanline == 240)
|
||||
if (state->m_control & 0x0004)
|
||||
state->m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
if (m_control & 0x0004)
|
||||
m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
}
|
||||
|
||||
static void ide_interrupt(device_t *device, int state)
|
||||
@ -675,7 +674,7 @@ static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16.000 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(qdrmfgp_map)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", qdrmfgp_interrupt, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", qdrmfgp_state, qdrmfgp_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(qdrmfgp_state,qdrmfgp)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user