summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2010-11-07 15:10:42 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2010-11-07 15:10:42 +0000
commita23dc5167e4498a74a5f17ec5c4845f0bfa7094a (patch)
tree35d4f8d1ca7759d45aa52a2281b2d536ea9aea9d
parenta4b0d0e79b43cf640ac9826a5234bb3d33d89ba9 (diff)
Removed deprecat.h usage and rewritten irq routines in DJ Boy [Angelo Salese]
-rw-r--r--src/mame/drivers/djboy.c23
-rw-r--r--src/mame/includes/djboy.h1
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c
index e00a70a1582..72e61c2fc29 100644
--- a/src/mame/drivers/djboy.c
+++ b/src/mame/drivers/djboy.c
@@ -137,7 +137,6 @@ Notes:
*/
#include "emu.h"
-#include "deprecat.h"
#include "cpu/z80/z80.h"
#include "cpu/mcs51/mcs51.h"
#include "sound/2203intf.h"
@@ -513,11 +512,17 @@ GFXDECODE_END
/******************************************************************************/
-static INTERRUPT_GEN( djboy_interrupt )
-{ /* CPU1 uses interrupt mode 2. For now, just alternate the two interrupts. */
- djboy_state *state = device->machine->driver_data<djboy_state>();
- state->addr ^= 0x02;
- cpu_set_input_line_and_vector(device, 0, HOLD_LINE, state->addr);
+/* Main Z80 uses IM2 */
+static TIMER_DEVICE_CALLBACK( djboy_scanline )
+{
+ int scanline = param;
+
+ if(scanline == 240) // vblank-out irq
+ cputag_set_input_line_and_vector(timer.machine, "maincpu", 0, HOLD_LINE, 0xfd);
+
+ /* Pandora "sprite end dma" irq? TODO: timing is clearly off, attract mode relies on this */
+ if(scanline == 64)
+ cputag_set_input_line_and_vector(timer.machine, "maincpu", 0, HOLD_LINE, 0xff);
}
static const kaneko_pandora_interface djboy_pandora_config =
@@ -553,8 +558,6 @@ static MACHINE_START( djboy )
state_save_register_global(machine, state->scrollx);
state_save_register_global(machine, state->scrolly);
- state_save_register_global(machine, state->addr);
-
/* Kaneko BEAST */
state_save_register_global(machine, state->data_to_beast);
state_save_register_global(machine, state->data_to_z80);
@@ -575,8 +578,6 @@ static MACHINE_RESET( djboy )
state->scrollx = 0;
state->scrolly = 0;
- state->addr = 0xff;
-
state->beast_int0_l = 1;
state->beast_to_z80_full = 0;
state->z80_to_beast_full = 0;
@@ -587,7 +588,7 @@ static MACHINE_CONFIG_START( djboy, djboy_state )
MDRV_CPU_ADD("maincpu", Z80, 6000000)
MDRV_CPU_PROGRAM_MAP(cpu0_am)
MDRV_CPU_IO_MAP(cpu0_port_am)
- MDRV_CPU_VBLANK_INT_HACK(djboy_interrupt, 2)
+ MDRV_TIMER_ADD_SCANLINE("scantimer", djboy_scanline, "screen", 0, 1)
MDRV_CPU_ADD("cpu1", Z80, 6000000)
MDRV_CPU_PROGRAM_MAP(cpu1_am)
diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h
index 7b2de4434c6..6195f12e0dd 100644
--- a/src/mame/includes/djboy.h
+++ b/src/mame/includes/djboy.h
@@ -18,7 +18,6 @@ public:
/* ROM banking */
UINT8 bankxor;
- UINT8 addr;
/* video-related */
tilemap_t *background;