From 0bb8f088f6e2e7bbfabe6d84f5a12d0be777c240 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Mon, 5 Dec 2011 13:52:27 +0000 Subject: [PATCH] deprecat.h --- src/mame/drivers/bnstars.c | 20 ++++++++++---------- src/mame/drivers/ms32.c | 16 +++++++++------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c index 84a3da598af..4884a4a7e86 100644 --- a/src/mame/drivers/bnstars.c +++ b/src/mame/drivers/bnstars.c @@ -89,7 +89,6 @@ ROMs : MR96004-10.1 [125661cd] (IC5 - Samples) #include "emu.h" #include "cpu/z80/z80.h" #include "cpu/v60/v60.h" -#include "deprecat.h" #include "sound/ymf271.h" #include "rendlay.h" #include "machine/jalcrpt.h" @@ -1332,11 +1331,12 @@ static void irq_raise(running_machine &machine, int level) cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); } - -static INTERRUPT_GEN(ms32_interrupt) +/* TODO: fix this arrangement (derived from old deprecat.h) */ +static TIMER_DEVICE_CALLBACK(ms32_interrupt) { - if( cpu_getiloops(device) == 0 ) irq_raise(device->machine(), 10); - if( cpu_getiloops(device) == 1 ) irq_raise(device->machine(), 9); + int scanline = param; + if( scanline == 0 ) irq_raise(timer.machine(), 10); + if( scanline == 8) irq_raise(timer.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) @@ -1345,7 +1345,7 @@ static INTERRUPT_GEN(ms32_interrupt) desertwr p47aces */ - if( cpu_getiloops(device) >= 3 && cpu_getiloops(device) <= 32 ) irq_raise(device->machine(), 0); + if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise(timer.machine(), 0); } static MACHINE_RESET( ms32 ) @@ -1359,7 +1359,7 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V70, 20000000) // 20MHz MCFG_CPU_PROGRAM_MAP(bnstars_map) - MCFG_CPU_VBLANK_INT_HACK(ms32_interrupt,32) + MCFG_TIMER_ADD_SCANLINE("scantimer", ms32_interrupt, "lscreen", 0, 1) // MCFG_CPU_ADD("audiocpu", Z80, 4000000) // MCFG_CPU_PROGRAM_MAP(bnstars_z80_map) @@ -1377,7 +1377,7 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state ) MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(40*8, 28*8) + MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE(bnstars) @@ -1385,7 +1385,7 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state ) MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(40*8, 28*8) + MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE(bnstars) @@ -1475,4 +1475,4 @@ static DRIVER_INIT (bnstars) memory_set_bankptr(machine, "bank1", machine.region("maincpu")->base()); } -GAME( 1997, bnstars1, 0, bnstars, bnstars, bnstars, ROT0, "Jaleco", "Vs. Janshi Brandnew Stars", GAME_NO_SOUND ) +GAME( 1997, bnstars1, 0, bnstars, bnstars, bnstars, ROT0, "Jaleco", "Vs. Janshi Brandnew Stars", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c index 7fcae06a885..4af5ed2ee6d 100644 --- a/src/mame/drivers/ms32.c +++ b/src/mame/drivers/ms32.c @@ -169,7 +169,6 @@ Super Strong Warriors #include "emu.h" #include "cpu/z80/z80.h" #include "cpu/v60/v60.h" -#include "deprecat.h" #include "sound/ymf271.h" #include "machine/jalcrpt.h" #include "includes/ms32.h" @@ -1325,11 +1324,13 @@ static void irq_raise(running_machine &machine, int level) cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); } -static INTERRUPT_GEN(ms32_interrupt) +/* TODO: fix this arrangement (derived from old deprecat.h) */ +static TIMER_DEVICE_CALLBACK(ms32_interrupt) { - if( cpu_getiloops(device) == 0 ) irq_raise(device->machine(), 10); - if( cpu_getiloops(device) == 1 ) irq_raise(device->machine(), 9); - /* hayaosi2 needs at least 12 IRQ 0 per frame to work (see code at FFE02289) + int scanline = param; + if( scanline == 0 ) irq_raise(timer.machine(), 10); + if( scanline == 8) irq_raise(timer.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) in different points. Could this be a raster interrupt? @@ -1337,9 +1338,10 @@ static INTERRUPT_GEN(ms32_interrupt) desertwr p47aces */ - if( cpu_getiloops(device) >= 3 && cpu_getiloops(device) <= 32 ) irq_raise(device->machine(), 0); + if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise(timer.machine(), 0); } + /********** SOUND **********/ /* @@ -1414,7 +1416,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_CPU_VBLANK_INT_HACK(ms32_interrupt,32) + MCFG_TIMER_ADD_SCANLINE("scantimer", ms32_interrupt, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(ms32_sound_map)