mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
cubeqst: Use MCFG_SCREEN_VBLANK_CALLBACK instead of MCFG_CPU_VBLANK_INT (nw)
This commit is contained in:
parent
9b304fb122
commit
cb354b3109
@ -34,6 +34,7 @@ public:
|
||||
cubeqst_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_laserdisc(*this, "laserdisc"),
|
||||
m_maincpu(*this, "main_cpu"),
|
||||
m_rotatecpu(*this, "rotate_cpu"),
|
||||
m_linecpu(*this, "line_cpu"),
|
||||
m_soundcpu(*this, "sound_cpu"),
|
||||
@ -57,6 +58,7 @@ public:
|
||||
uint8_t m_io_latch;
|
||||
uint8_t m_reset_latch;
|
||||
required_device<simutrek_special_device> m_laserdisc;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cquestrot_cpu_device> m_rotatecpu;
|
||||
required_device<cquestlin_cpu_device> m_linecpu;
|
||||
required_device<cquestsnd_cpu_device> m_soundcpu;
|
||||
@ -83,7 +85,7 @@ public:
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_cubeqst(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vblank);
|
||||
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
|
||||
TIMER_CALLBACK_MEMBER(delayed_bank_swap);
|
||||
void swap_linecpu_banks();
|
||||
void cubeqst(machine_config &config);
|
||||
@ -207,14 +209,17 @@ READ16_MEMBER(cubeqst_state::line_r)
|
||||
return m_screen->vpos();
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(cubeqst_state::vblank)
|
||||
WRITE_LINE_MEMBER(cubeqst_state::vblank_irq)
|
||||
{
|
||||
int int_level = m_video_field == 0 ? 5 : 6;
|
||||
if (state)
|
||||
{
|
||||
int int_level = m_video_field == 0 ? 5 : 6;
|
||||
|
||||
device.execute().set_input_line(int_level, HOLD_LINE);
|
||||
m_maincpu->set_input_line(int_level, HOLD_LINE);
|
||||
|
||||
/* Update the laserdisc */
|
||||
m_video_field ^= 1;
|
||||
/* Update the laserdisc */
|
||||
m_video_field ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -522,7 +527,6 @@ WRITE16_MEMBER( cubeqst_state::sound_dac_w )
|
||||
MACHINE_CONFIG_START(cubeqst_state::cubeqst)
|
||||
MCFG_CPU_ADD("main_cpu", M68000, XTAL(16'000'000) / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(m68k_program_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", cubeqst_state, vblank)
|
||||
|
||||
MCFG_CPU_ADD("rotate_cpu", CQUESTROT, XTAL(10'000'000) / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(rotate_map)
|
||||
@ -547,7 +551,7 @@ MACHINE_CONFIG_START(cubeqst_state::cubeqst)
|
||||
MCFG_LASERDISC_OVERLAY_SCALE(1.0f, 1.030f)
|
||||
|
||||
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
|
||||
|
||||
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(cubeqst_state, vblank_irq))
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user