viper: revert to using internally generated vblank. voodoo: Write register data to intrCtrl. (nw)

This commit is contained in:
Ted Green 2017-06-14 14:00:10 -06:00
parent 60ceaff438
commit 86fce81b07
2 changed files with 13 additions and 2 deletions

View File

@ -2185,6 +2185,7 @@ int32_t voodoo_device::register_w(voodoo_device *vd, offs_t offset, uint32_t dat
switch (regnum)
{
case intrCtrl:
vd->reg[regnum].u = data;
// Setting bit 31 clears the PCI interrupts
if (data & 0x80000000) {
// Clear pci interrupt

View File

@ -433,6 +433,7 @@ public:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(viper_vblank);
WRITE_LINE_MEMBER(voodoo_pciint);
TIMER_CALLBACK_MEMBER(epic_global_timer_callback);
TIMER_CALLBACK_MEMBER(ds2430_timer_callback);
@ -2278,16 +2279,24 @@ INPUT_PORTS_END
/*****************************************************************************/
INTERRUPT_GEN_MEMBER(viper_state::viper_vblank)
{
mpc8240_interrupt(MPC8240_IRQ0);
//mpc8240_interrupt(MPC8240_IRQ3);
}
WRITE_LINE_MEMBER(viper_state::voodoo_vblank)
{
mpc8240_interrupt(MPC8240_IRQ4);
// FIXME: The driver seems to hang using the voodoo vblank signa
//if (state)
// mpc8240_interrupt(MPC8240_IRQ0);
//mpc8240_interrupt(MPC8240_IRQ3);
}
WRITE_LINE_MEMBER(viper_state::voodoo_pciint)
{
mpc8240_interrupt(MPC8240_IRQ0);
if (state)
mpc8240_interrupt(MPC8240_IRQ4);
}
void viper_state::machine_start()
@ -2325,6 +2334,7 @@ static MACHINE_CONFIG_START( viper )
MCFG_CPU_ADD("maincpu", MPC8240, 200000000)
MCFG_PPC_BUS_FREQUENCY(100000000)
MCFG_CPU_PROGRAM_MAP(viper_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", viper_state, viper_vblank)
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
MCFG_PCI_BUS_LEGACY_DEVICE(0, "mpc8240", mpc8240_pci_r, mpc8240_pci_w)