deprecat.h

This commit is contained in:
Angelo Salese 2011-12-05 02:36:54 +00:00
parent 5e088af77c
commit dfbcf3106b
4 changed files with 18 additions and 16 deletions

View File

@ -13,6 +13,7 @@
Twice as much VRAM.
Todo:
- Convert this driver to use proper PC-Engine video.
- Priority is wrong for the submarine at the end of level 1.
- There seems to be a bug with a stuck note from the YM2203 FM channel
at the start of scene 3 and near the ending when your characters are
@ -21,7 +22,6 @@
**********************************************************************/
#include "emu.h"
#include "deprecat.h"
#include "cpu/h6280/h6280.h"
#include "sound/2203intf.h"
#include "sound/msm5205.h"
@ -236,7 +236,7 @@ static MACHINE_CONFIG_START( battlera, battlera_state )
MCFG_CPU_ADD("maincpu", H6280,21477200/3)
MCFG_CPU_PROGRAM_MAP(battlera_map)
MCFG_CPU_IO_MAP(battlera_portmap)
MCFG_CPU_VBLANK_INT_HACK(battlera_interrupt,256) /* 8 prelines, 232 lines, 16 vblank? */
MCFG_TIMER_ADD_SCANLINE("scantimer", battlera_irq, "screen", 0, 1) /* 8 prelines, 232 lines, 16 vblank? */
MCFG_CPU_ADD("audiocpu", H6280,21477200/3)
MCFG_CPU_PROGRAM_MAP(sound_map)

View File

@ -61,7 +61,6 @@
#include "sound/ay8910.h"
#include "video/v9938.h"
#include "machine/nvram.h"
#include "deprecat.h"
class big10_state : public driver_device
@ -86,9 +85,9 @@ static void big10_vdp_interrupt(running_machine &machine, int i)
cputag_set_input_line (machine, "maincpu", 0, (i ? ASSERT_LINE : CLEAR_LINE));
}
static INTERRUPT_GEN( big10_interrupt )
static TIMER_DEVICE_CALLBACK( big10_interrupt )
{
v9938_interrupt(device->machine(), 0);
v9938_interrupt(timer.machine(), 0);
}
@ -256,7 +255,7 @@ static MACHINE_CONFIG_START( big10, big10_state )
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* guess */
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_IO_MAP(main_io)
MCFG_CPU_VBLANK_INT_HACK(big10_interrupt, 262)
MCFG_TIMER_ADD_SCANLINE("scantimer", big10_interrupt, "screen", 0, 1)
MCFG_MACHINE_RESET(big10)

View File

@ -2,7 +2,9 @@ class battlera_state : public driver_device
{
public:
battlera_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) { }
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
int m_control_port_select;
int m_msm5205next;
@ -23,6 +25,8 @@ public:
int m_bb_enable;
int m_bldwolf_vblank;
UINT8 m_blank_tile[32];
required_device<cpu_device> m_maincpu;
};
@ -30,7 +34,7 @@ public:
SCREEN_UPDATE( battlera );
VIDEO_START( battlera );
INTERRUPT_GEN( battlera_interrupt );
TIMER_DEVICE_CALLBACK( battlera_irq );
READ8_HANDLER( HuC6270_register_r );
WRITE8_HANDLER( HuC6270_register_w );

View File

@ -8,7 +8,6 @@
*******************************************************************************/
#include "emu.h"
#include "deprecat.h"
#include "cpu/h6280/h6280.h"
#include "includes/battlera.h"
@ -370,23 +369,23 @@ SCREEN_UPDATE( battlera )
/******************************************************************************/
INTERRUPT_GEN( battlera_interrupt )
TIMER_DEVICE_CALLBACK( battlera_irq )
{
battlera_state *state = device->machine().driver_data<battlera_state>();
state->m_current_scanline=255-cpu_getiloops(device); /* 8 lines clipped at top */
battlera_state *state = timer.machine().driver_data<battlera_state>();
state->m_current_scanline = param; /* 8 lines clipped at top */
/* If raster interrupt occurs, refresh screen _up_ to this point */
if (state->m_rcr_enable && (state->m_current_scanline+56)==state->m_HuC6270_registers[6]) {
device->machine().primary_screen->update_partial(state->m_current_scanline);
device_set_input_line(device, 0, HOLD_LINE); /* RCR interrupt */
timer.machine().primary_screen->update_partial(state->m_current_scanline);
device_set_input_line(state->m_maincpu, 0, HOLD_LINE); /* RCR interrupt */
}
/* Start of vblank */
else if (state->m_current_scanline==240) {
state->m_bldwolf_vblank=1;
device->machine().primary_screen->update_partial(240);
timer.machine().primary_screen->update_partial(240);
if (state->m_irq_enable)
device_set_input_line(device, 0, HOLD_LINE); /* VBL */
device_set_input_line(state->m_maincpu, 0, HOLD_LINE); /* VBL */
}
/* End of vblank */