Removed deprecat.h dependancy from gberet.c [Angelo Salese]

This commit is contained in:
Angelo Salese 2011-04-25 19:30:01 +00:00
parent 16a3d05367
commit eeefcd86be

View File

@ -15,10 +15,13 @@
gberetb is a bootleg hacked to run on different hardware.
TODO
- Original Green Beret is currently running too fast so it was downgraded to an unlikely
refresh rate (30 Hz). Possible causes ranges from irq sources not understood (there's a custom
IC that controls irq timings) or even waitstates (see MT #3600).
- Dump Green Beret Bootleg proms. Bootleg has four proms while the original has three
and correct the locations.
- Dump Green Beret Bootleg PAL
- Green Beret boolteg xtal is 20.000 MHz
- Green Beret bootleg xtal is 20.000 MHz
****************************************************************************
@ -73,7 +76,6 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "deprecat.h"
#include "sound/sn76496.h"
#include "includes/konamipt.h"
#include "includes/gberet.h"
@ -86,19 +88,37 @@
*
*************************************/
static INTERRUPT_GEN( gberet_interrupt )
static TIMER_DEVICE_CALLBACK( gberet_scanline )
{
gberet_state *state = device->machine().driver_data<gberet_state>();
if (cpu_getiloops(device) == 0)
gberet_state *state = timer.machine().driver_data<gberet_state>();
int scanline = param;
if(scanline == 240)
{
if (state->m_irq_enable)
device_set_input_line(device, 0, HOLD_LINE);
cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
}
if (cpu_getiloops(device) % 2)
else if ((scanline % 16) == 0)
{
if (state->m_nmi_enable)
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
}
}
static TIMER_DEVICE_CALLBACK( mrgoemon_scanline )
{
gberet_state *state = timer.machine().driver_data<gberet_state>();
int scanline = param;
if(scanline == 240)
{
if (state->m_irq_enable)
cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
}
else if ((scanline % 32) == 0)
{
if (state->m_nmi_enable)
cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
}
}
@ -392,7 +412,7 @@ static MACHINE_CONFIG_START( gberet, gberet_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) // X1S (generated by a custom IC)
MCFG_CPU_PROGRAM_MAP(gberet_map)
MCFG_CPU_VBLANK_INT_HACK(gberet_interrupt, 32) // 1 IRQ + 16 NMI (generated by a custom IC)
MCFG_TIMER_ADD_SCANLINE("scantimer", gberet_scanline, "screen", 0, 1)
MCFG_MACHINE_START(gberet)
MCFG_MACHINE_RESET(gberet)
@ -424,12 +444,12 @@ static MACHINE_CONFIG_DERIVED( gberetb, gberet )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(gberetb_map)
MCFG_CPU_VBLANK_INT_HACK(gberet_interrupt, 16) // 1 IRQ + 8 NMI
MCFG_TIMER_MODIFY("scantimer")//, mrgoemon_scanline, "screen", 0, 1)
MCFG_TIMER_CALLBACK(mrgoemon_scanline)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_UPDATE(gberetb)
MCFG_GFXDECODE(gberetb)
@ -440,12 +460,11 @@ static MACHINE_CONFIG_DERIVED( mrgoemon, gberet )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(mrgoemon_map)
MCFG_CPU_VBLANK_INT_HACK(gberet_interrupt, 16) // 1 IRQ + 8 NMI
MCFG_TIMER_MODIFY("scantimer")//, mrgoemon_scanline, "screen", 0, 1)
MCFG_TIMER_CALLBACK(mrgoemon_scanline)
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MACHINE_CONFIG_END
/*************************************