deprecat.h

This commit is contained in:
Angelo Salese 2011-12-05 21:30:58 +00:00
parent 3e4f663ffd
commit c9812adf06
3 changed files with 20 additions and 21 deletions

View File

@ -443,7 +443,6 @@ or Fatal Fury for example).
#include "emu.h" #include "emu.h"
#include "cpu/z80/z80.h" #include "cpu/z80/z80.h"
#include "cpu/nec/nec.h" #include "cpu/nec/nec.h"
#include "deprecat.h"
#include "cpu/mips/mips3.h" #include "cpu/mips/mips3.h"
#include "machine/nvram.h" #include "machine/nvram.h"
#include "includes/hng64.h" #include "includes/hng64.h"

View File

@ -58,7 +58,6 @@ To Do:
***************************************************************************************/ ***************************************************************************************/
#include "emu.h" #include "emu.h"
#include "deprecat.h"
#include "cpu/z80/z80.h" #include "cpu/z80/z80.h"
#include "cpu/mcs51/mcs51.h" #include "cpu/mcs51/mcs51.h"
#include "sound/2203intf.h" #include "sound/2203intf.h"
@ -86,9 +85,6 @@ public:
UINT16 m_scrolly; UINT16 m_scrolly;
UINT16 m_port0_data; UINT16 m_port0_data;
/* Interrupts */
UINT8 m_int_vector;
/* Mermaid */ /* Mermaid */
UINT8 m_data_to_mermaid; UINT8 m_data_to_mermaid;
UINT8 m_data_to_z80; UINT8 m_data_to_z80;
@ -129,7 +125,6 @@ static MACHINE_RESET( hvyunit )
{ {
hvyunit_state *state = machine.driver_data<hvyunit_state>(); hvyunit_state *state = machine.driver_data<hvyunit_state>();
state->m_int_vector = 0xff;
state->m_mermaid_int0_l = 1; state->m_mermaid_int0_l = 1;
state->m_mermaid_to_z80_full = 0; state->m_mermaid_to_z80_full = 0;
state->m_z80_to_mermaid_full = 0; state->m_z80_to_mermaid_full = 0;
@ -618,12 +613,18 @@ GFXDECODE_END
* *
*************************************/ *************************************/
static INTERRUPT_GEN( hvyunit_interrupt ) /* Main Z80 uses IM2 */
static TIMER_DEVICE_CALLBACK( hvyunit_scanline )
{ {
hvyunit_state *state = device->machine().driver_data<hvyunit_state>(); hvyunit_state *state = timer.machine().driver_data<hvyunit_state>();
int scanline = param;
state->m_int_vector ^= 0x02; if(scanline == 240) // vblank-out irq
device_set_input_line_and_vector(device, 0, HOLD_LINE, state->m_int_vector); device_set_input_line_and_vector(state->m_master_cpu, 0, HOLD_LINE, 0xfd);
/* Pandora "sprite end dma" irq? TODO: timing is likely off */
if(scanline == 64)
device_set_input_line_and_vector(state->m_master_cpu, 0, HOLD_LINE, 0xff);
} }
static const kaneko_pandora_interface hvyunit_pandora_config = static const kaneko_pandora_interface hvyunit_pandora_config =
@ -645,7 +646,7 @@ static MACHINE_CONFIG_START( hvyunit, hvyunit_state )
MCFG_CPU_ADD("master", Z80, 6000000) MCFG_CPU_ADD("master", Z80, 6000000)
MCFG_CPU_PROGRAM_MAP(master_memory) MCFG_CPU_PROGRAM_MAP(master_memory)
MCFG_CPU_IO_MAP(master_io) MCFG_CPU_IO_MAP(master_io)
MCFG_CPU_VBLANK_INT_HACK(hvyunit_interrupt, 2) MCFG_TIMER_ADD_SCANLINE("scantimer", hvyunit_scanline, "screen", 0, 1)
MCFG_CPU_ADD("slave", Z80, 6000000) MCFG_CPU_ADD("slave", Z80, 6000000)
MCFG_CPU_PROGRAM_MAP(slave_memory) MCFG_CPU_PROGRAM_MAP(slave_memory)

View File

@ -36,7 +36,6 @@ fix comms so it boots, it's a bit of a hack for hyperduel at the moment ;-)
#include "emu.h" #include "emu.h"
#include "cpu/m68000/m68000.h" #include "cpu/m68000/m68000.h"
#include "deprecat.h"
#include "sound/2151intf.h" #include "sound/2151intf.h"
#include "sound/okim6295.h" #include "sound/okim6295.h"
#include "sound/2413intf.h" #include "sound/2413intf.h"
@ -60,23 +59,23 @@ static TIMER_CALLBACK( vblank_end_callback )
state->m_requested_int &= ~param; state->m_requested_int &= ~param;
} }
static INTERRUPT_GEN( hyprduel_interrupt ) static TIMER_DEVICE_CALLBACK( hyprduel_interrupt )
{ {
hyprduel_state *state = device->machine().driver_data<hyprduel_state>(); hyprduel_state *state = timer.machine().driver_data<hyprduel_state>();
int line = RASTER_LINES - cpu_getiloops(device); int line = param;
if (line == RASTER_LINES) if (line == 0) /* TODO: fix this! */
{ {
state->m_requested_int |= 0x01; /* vblank */ state->m_requested_int |= 0x01; /* vblank */
state->m_requested_int |= 0x20; state->m_requested_int |= 0x20;
device_set_input_line(device, 2, HOLD_LINE); device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
/* the duration is a guess */ /* the duration is a guess */
device->machine().scheduler().timer_set(attotime::from_usec(2500), FUNC(vblank_end_callback), 0x20); timer.machine().scheduler().timer_set(attotime::from_usec(2500), FUNC(vblank_end_callback), 0x20);
} }
else else
state->m_requested_int |= 0x12; /* hsync */ state->m_requested_int |= 0x12; /* hsync */
update_irq_state(device->machine()); update_irq_state(timer.machine());
} }
static READ16_HANDLER( hyprduel_irq_cause_r ) static READ16_HANDLER( hyprduel_irq_cause_r )
@ -676,7 +675,7 @@ static MACHINE_CONFIG_START( hyprduel, hyprduel_state )
/* basic machine hardware */ /* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */ MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */
MCFG_CPU_PROGRAM_MAP(hyprduel_map) MCFG_CPU_PROGRAM_MAP(hyprduel_map)
MCFG_CPU_VBLANK_INT_HACK(hyprduel_interrupt,RASTER_LINES) MCFG_TIMER_ADD_SCANLINE("scantimer", hyprduel_interrupt, "screen", 0, 1)
MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */ MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */
MCFG_CPU_PROGRAM_MAP(hyprduel_map2) MCFG_CPU_PROGRAM_MAP(hyprduel_map2)
@ -719,7 +718,7 @@ static MACHINE_CONFIG_START( magerror, hyprduel_state )
/* basic machine hardware */ /* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */ MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */
MCFG_CPU_PROGRAM_MAP(magerror_map) MCFG_CPU_PROGRAM_MAP(magerror_map)
MCFG_CPU_VBLANK_INT_HACK(hyprduel_interrupt,RASTER_LINES) MCFG_TIMER_ADD_SCANLINE("scantimer", hyprduel_interrupt, "screen", 0, 1)
MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */ MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */
MCFG_CPU_PROGRAM_MAP(magerror_map2) MCFG_CPU_PROGRAM_MAP(magerror_map2)