mirror of
https://github.com/holub/mame
synced 2025-05-17 03:10:43 +03:00
deprecat.h, 60 to go
This commit is contained in:
parent
7b345f39fa
commit
a3cb723be8
@ -42,7 +42,6 @@ Notes:
|
||||
************************************************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z180/z180.h"
|
||||
#include "machine/8255ppi.h"
|
||||
@ -54,7 +53,9 @@ class igs017_state : public driver_device
|
||||
{
|
||||
public:
|
||||
igs017_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_toggle;
|
||||
int m_debug_addr;
|
||||
@ -75,6 +76,8 @@ public:
|
||||
int m_irq1_enable;
|
||||
int m_irq2_enable;
|
||||
UINT8 *m_spriteram;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -2271,21 +2274,19 @@ GFXDECODE_END
|
||||
Machine Drivers
|
||||
***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( iqblocka_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( irqblocka_interrupt )
|
||||
{
|
||||
igs017_state *state = device->machine().driver_data<igs017_state>();
|
||||
if (cpu_getiloops(device) & 1)
|
||||
{
|
||||
if (state->m_nmi_enable)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state->m_irq_enable)
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
}
|
||||
igs017_state *state = timer.machine().driver_data<igs017_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && state->m_irq_enable)
|
||||
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||
|
||||
if(scanline == 0 && state->m_nmi_enable)
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
// Dips are read through the 8255
|
||||
static const ppi8255_interface iqblocka_ppi8255_intf =
|
||||
{
|
||||
@ -2310,7 +2311,7 @@ static MACHINE_CONFIG_START( iqblocka, igs017_state )
|
||||
MCFG_CPU_ADD("maincpu", Z180, XTAL_16MHz / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(iqblocka_map)
|
||||
MCFG_CPU_IO_MAP(iqblocka_io)
|
||||
MCFG_CPU_VBLANK_INT_HACK(iqblocka_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", irqblocka_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_PPI8255_ADD( "ppi8255", iqblocka_ppi8255_intf )
|
||||
|
||||
@ -2344,19 +2345,16 @@ MACHINE_CONFIG_END
|
||||
|
||||
// mgcs
|
||||
|
||||
static INTERRUPT_GEN( mgcs_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( mgcs_interrupt )
|
||||
{
|
||||
igs017_state *state = device->machine().driver_data<igs017_state>();
|
||||
if (cpu_getiloops(device) & 1)
|
||||
{
|
||||
if (state->m_irq2_enable)
|
||||
device_set_input_line(device, 2, HOLD_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state->m_irq1_enable)
|
||||
device_set_input_line(device, 1, HOLD_LINE);
|
||||
}
|
||||
igs017_state *state = timer.machine().driver_data<igs017_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && state->m_irq1_enable)
|
||||
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||
|
||||
if(scanline == 0 && state->m_irq2_enable)
|
||||
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_RESET( mgcs )
|
||||
@ -2383,7 +2381,7 @@ static const ppi8255_interface mgcs_ppi8255_intf =
|
||||
static MACHINE_CONFIG_START( mgcs, igs017_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_22MHz / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(mgcs)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mgcs_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mgcs_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET(mgcs)
|
||||
|
||||
@ -2428,7 +2426,7 @@ static const ppi8255_interface sdmg2_ppi8255_intf =
|
||||
static MACHINE_CONFIG_START( sdmg2, igs017_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_22MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(sdmg2)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mgcs_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mgcs_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET(mgcs)
|
||||
|
||||
@ -2458,19 +2456,16 @@ MACHINE_CONFIG_END
|
||||
|
||||
// mgdh
|
||||
|
||||
static INTERRUPT_GEN( mgdh_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( mgdh_interrupt )
|
||||
{
|
||||
igs017_state *state = device->machine().driver_data<igs017_state>();
|
||||
if (cpu_getiloops(device) & 1)
|
||||
{
|
||||
if (state->m_irq2_enable)
|
||||
device_set_input_line(device, 3, HOLD_LINE); // lev 3 instead of 2
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state->m_irq1_enable)
|
||||
device_set_input_line(device, 1, HOLD_LINE);
|
||||
}
|
||||
igs017_state *state = timer.machine().driver_data<igs017_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && state->m_irq1_enable)
|
||||
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||
|
||||
if(scanline == 0 && state->m_irq2_enable)
|
||||
device_set_input_line(state->m_maincpu, 3, HOLD_LINE); // lev 3 instead of 2
|
||||
}
|
||||
|
||||
static const ppi8255_interface mgdh_ppi8255_intf =
|
||||
@ -2487,7 +2482,7 @@ static const ppi8255_interface mgdh_ppi8255_intf =
|
||||
static MACHINE_CONFIG_START( mgdha, igs017_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_22MHz / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(mgdha_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mgdh_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mgdh_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET(mgcs)
|
||||
|
||||
@ -2521,7 +2516,7 @@ static MACHINE_CONFIG_START( tjsb, igs017_state )
|
||||
MCFG_CPU_ADD("maincpu", Z180, XTAL_16MHz / 2)
|
||||
MCFG_CPU_PROGRAM_MAP(tjsb_map)
|
||||
MCFG_CPU_IO_MAP(tjsb_io)
|
||||
MCFG_CPU_VBLANK_INT_HACK(iqblocka_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", irqblocka_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_PPI8255_ADD( "ppi8255", iqblocka_ppi8255_intf )
|
||||
|
||||
|
@ -65,7 +65,6 @@ FIX: PK Tetris have an input named AMUSE which I couldn't map. Maybe it is
|
||||
#define VERBOSE 0
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
@ -76,7 +75,9 @@ class igspoker_state : public driver_device
|
||||
{
|
||||
public:
|
||||
igspoker_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_nmi_enable;
|
||||
int m_bg_enable;
|
||||
@ -88,6 +89,8 @@ public:
|
||||
tilemap_t *m_bg_tilemap;
|
||||
UINT8 m_out[3];
|
||||
size_t m_protection_res;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -99,19 +102,27 @@ static MACHINE_RESET( igs )
|
||||
state->m_bg_enable = 1;
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( igs_interrupt )
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( igs_interrupt )
|
||||
{
|
||||
igspoker_state *state = device->machine().driver_data<igspoker_state>();
|
||||
if (cpu_getiloops(device) % 2) {
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
} else {
|
||||
if (state->m_nmi_enable)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
igspoker_state *state = timer.machine().driver_data<igspoker_state>();
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 32) != 0)
|
||||
return;
|
||||
|
||||
if((scanline % 64) == 32)
|
||||
device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
|
||||
|
||||
if((scanline % 64) == 0 && state->m_nmi_enable)
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( igs_irqack_r )
|
||||
{
|
||||
igspoker_state *state = space->machine().driver_data<igspoker_state>();
|
||||
device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1746,7 +1757,7 @@ static MACHINE_CONFIG_START( igspoker, igspoker_state )
|
||||
MCFG_CPU_ADD("maincpu",Z80, 3579545)
|
||||
MCFG_CPU_PROGRAM_MAP(igspoker_prg_map)
|
||||
MCFG_CPU_IO_MAP(igspoker_io_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(igs_interrupt,8)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", igs_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET(igs)
|
||||
|
||||
@ -1755,7 +1766,7 @@ static MACHINE_CONFIG_START( igspoker, igspoker_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(57)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(64*8, 32*8)
|
||||
MCFG_SCREEN_SIZE(64*8, 32*8) // TODO: wrong screen size!
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0, 32*8-1)
|
||||
MCFG_SCREEN_UPDATE(igs_video)
|
||||
|
||||
@ -2432,22 +2443,22 @@ ROM_END
|
||||
|
||||
|
||||
|
||||
GAMEL( 1993?, cpoker, 0, igspoker, cpoker, cpoker, ROT0, "IGS", "Champion Poker (v220I)", 0, layout_igspoker )
|
||||
GAMEL( 1993?, cpokert, cpoker, igspoker, cpoker, cpokert, ROT0, "IGS (Tuning license)", "Champion Poker (v200G)", 0, layout_igspoker )
|
||||
GAMEL( 1993, cpokerx, cpoker, igspoker, cpokerx, cpokert, ROT0, "IGS", "Champion Poker (v100)", 0, layout_igspoker )
|
||||
GAMEL( 2000, chleague, 0, igspoker, chleague, chleague, ROT0, "IGS", "Champion League (Poker)", 0, layout_igspoker )
|
||||
GAMEL( 2000, chleagul, chleague, igspoker, chleague, chleague, ROT0, "IGS", "Champion League (Lattine)", 0, layout_igspoker )
|
||||
GAMEL( 198?, csk227it, 0, csk227it, csk227, cska, ROT0, "IGS", "Champion Skill (with Ability)", 0, layout_igspoker ) /* SU 062 */
|
||||
GAMEL( 198?, csk234it, csk227it, csk234it, csk234, cska, ROT0, "IGS", "Champion Skill (Ability, Poker & Symbols)", 0, layout_igspoker ) /* SU 062 */
|
||||
GAMEL( 2000, number10, 0, number10, number10, number10, ROT0, "PlayMark SRL", "Number Dieci (Poker)", 0, layout_igspoker )
|
||||
GAMEL( 2000, numbr10l, number10, number10, number10, number10, ROT0, "PlayMark SRL", "Number Dieci (Lattine)", 0, layout_igspoker )
|
||||
GAMEL( 198?, igs_ncs, 0, igs_ncs, igs_ncs, igs_ncs, ROT0, "IGS", "New Champion Skill (v100n)", 0, layout_igspoker ) /* SU 062 */
|
||||
GAMEL( 199?, cpokerpk, 0, cpokerpk, cpokerpk, cpokerpk, ROT0, "bootleg (SGS)", "Champion Italian PK (bootleg, blue board)", 0, layout_igspoker )
|
||||
GAMEL( 199?, cpokerpkg, cpokerpk, cpokerpk, cpokerpk, cpokerpk, ROT0, "bootleg (SGS)", "Champion Italian PK (bootleg, green board)", 0, layout_igspoker )
|
||||
GAMEL( 199?, citalcup, cpokerpk, cpokerpk, cpokerpk, cpokerpk, ROT0, "bootleg (SGS)", "Champion Italian Cup (bootleg V220IT)", 0, layout_igspoker )
|
||||
GAMEL( 1993?,cpoker, 0, igspoker, cpoker, cpoker, ROT0, "IGS", "Champion Poker (v220I)", 0, layout_igspoker )
|
||||
GAMEL( 1993?,cpokert, cpoker, igspoker, cpoker, cpokert, ROT0, "IGS (Tuning license)", "Champion Poker (v200G)", 0, layout_igspoker )
|
||||
GAMEL( 1993, cpokerx, cpoker, igspoker, cpokerx, cpokert, ROT0, "IGS", "Champion Poker (v100)", 0, layout_igspoker )
|
||||
GAMEL( 2000, chleague, 0, igspoker, chleague, chleague, ROT0, "IGS", "Champion League (Poker)", 0, layout_igspoker )
|
||||
GAMEL( 2000, chleagul, chleague, igspoker, chleague, chleague, ROT0, "IGS", "Champion League (Lattine)", 0, layout_igspoker )
|
||||
GAMEL( 198?, csk227it, 0, csk227it, csk227, cska, ROT0, "IGS", "Champion Skill (with Ability)", 0, layout_igspoker ) /* SU 062 */
|
||||
GAMEL( 198?, csk234it, csk227it, csk234it, csk234, cska, ROT0, "IGS", "Champion Skill (Ability, Poker & Symbols)", 0, layout_igspoker ) /* SU 062 */
|
||||
GAMEL( 2000, number10, 0, number10, number10, number10, ROT0, "PlayMark SRL", "Number Dieci (Poker)", 0, layout_igspoker )
|
||||
GAMEL( 2000, numbr10l, number10, number10, number10, number10, ROT0, "PlayMark SRL", "Number Dieci (Lattine)", 0, layout_igspoker )
|
||||
GAMEL( 198?, igs_ncs, 0, igs_ncs, igs_ncs, igs_ncs, ROT0, "IGS", "New Champion Skill (v100n)", 0, layout_igspoker ) /* SU 062 */
|
||||
GAMEL( 199?, cpokerpk, 0, cpokerpk, cpokerpk, cpokerpk, ROT0, "bootleg (SGS)", "Champion Italian PK (bootleg, blue board)", 0, layout_igspoker )
|
||||
GAMEL( 199?, cpokerpkg, cpokerpk, cpokerpk, cpokerpk, cpokerpk, ROT0, "bootleg (SGS)", "Champion Italian PK (bootleg, green board)", 0, layout_igspoker )
|
||||
GAMEL( 199?, citalcup, cpokerpk, cpokerpk, cpokerpk, cpokerpk, ROT0, "bootleg (SGS)", "Champion Italian Cup (bootleg V220IT)", 0, layout_igspoker )
|
||||
|
||||
GAMEL( 2000, igs_ncs2, 0, igs_ncs, igs_ncs, igs_ncs2, ROT0, "IGS", "New Champion Skill (v100n 2000)", GAME_IMPERFECT_GRAPHICS, layout_igspoker )
|
||||
GAMEL( 2000, igs_ncs2, 0, igs_ncs, igs_ncs, igs_ncs2, ROT0, "IGS", "New Champion Skill (v100n 2000)", GAME_IMPERFECT_GRAPHICS, layout_igspoker )
|
||||
|
||||
GAMEL( 1998, stellecu, 0, number10, number10, 0, ROT0, "Sure", "Stelle e Cubi (Italy)", GAME_NOT_WORKING, layout_igspoker )
|
||||
GAMEL( 1998, stellecu, 0, number10, number10, 0, ROT0, "Sure", "Stelle e Cubi (Italy)", GAME_NOT_WORKING, layout_igspoker )
|
||||
|
||||
GAMEL( 1993?, pktet346, 0, pktetris, pktet346, pktet346, ROT0, "IGS", "PK Tetris (v346I)", 0, layout_igspoker )
|
||||
GAMEL( 1993?,pktet346, 0, pktetris, pktet346, pktet346, ROT0, "IGS", "PK Tetris (v346I)", 0, layout_igspoker )
|
||||
|
@ -74,7 +74,6 @@ Known issues:
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -87,7 +86,9 @@ class imolagp_state : public driver_device
|
||||
{
|
||||
public:
|
||||
imolagp_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")
|
||||
{ }
|
||||
|
||||
UINT8 *m_slave_workram; // used only ifdef HLE_COM
|
||||
|
||||
@ -110,6 +111,8 @@ public:
|
||||
|
||||
/* memory */
|
||||
UINT8 m_videoram[3][0x4000];
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -463,21 +466,13 @@ INPUT_PORTS_END
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( master_interrupt )
|
||||
|
||||
static TIMER_DEVICE_CALLBACK ( imolagp_nmi_cb )
|
||||
{
|
||||
imolagp_state *state = device->machine().driver_data<imolagp_state>();
|
||||
int which = cpu_getiloops(device);
|
||||
if (which == 0)
|
||||
imolagp_state *state = timer.machine().driver_data<imolagp_state>();
|
||||
|
||||
{
|
||||
#ifdef HLE_COM
|
||||
memcpy(&state->m_slave_workram[0x80], state->m_mComData, state->m_mComCount);
|
||||
state->m_mComCount = 0;
|
||||
#endif
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
int newsteer = input_port_read(device->machine(), "2802") & 0xf;
|
||||
int newsteer = input_port_read(timer.machine(), "2802") & 0xf;
|
||||
if (newsteer != state->m_oldsteer)
|
||||
{
|
||||
if (state->m_steerlatch == 0)
|
||||
@ -491,9 +486,20 @@ static INTERRUPT_GEN( master_interrupt )
|
||||
{
|
||||
state->m_oldsteer = (state->m_oldsteer + 1) & 0xf;
|
||||
}
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( vblank_irq )
|
||||
{
|
||||
imolagp_state *state = device->machine().driver_data<imolagp_state>();
|
||||
|
||||
#ifdef HLE_COM
|
||||
memcpy(&state->m_slave_workram[0x80], state->m_mComData, state->m_mComCount);
|
||||
state->m_mComCount = 0;
|
||||
#endif
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
} /* master_interrupt */
|
||||
|
||||
|
||||
@ -550,7 +556,8 @@ static MACHINE_CONFIG_START( imolagp, imolagp_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80,8000000) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(imolagp_master)
|
||||
MCFG_CPU_IO_MAP(readport_master)
|
||||
MCFG_CPU_VBLANK_INT_HACK(master_interrupt,4)
|
||||
MCFG_CPU_VBLANK_INT("screen",vblank_irq)
|
||||
MCFG_TIMER_ADD_PERIODIC("pot_irq", imolagp_nmi_cb, attotime::from_hz(60*3))
|
||||
|
||||
MCFG_CPU_ADD("slave", Z80,8000000) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(imolagp_slave)
|
||||
|
@ -42,7 +42,6 @@ The 2 ay-8910 read ports are responsible for reading the sound commands.
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "includes/jack.h"
|
||||
@ -860,15 +859,11 @@ static MACHINE_CONFIG_DERIVED( tripool, jack )
|
||||
MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* tripool needs 2 or the palette is broken */
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static INTERRUPT_GEN( joinem_interrupts )
|
||||
static INTERRUPT_GEN( joinem_vblank_irq )
|
||||
{
|
||||
if (cpu_getiloops(device) > 0)
|
||||
device_set_input_line(device, 0, HOLD_LINE);
|
||||
else
|
||||
{
|
||||
if (!(input_port_read(device->machine(), "IN2") & 0x80)) /* TODO: remove me */
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
/* TODO: looks hackish to me ... */
|
||||
if (!(input_port_read(device->machine(), "IN2") & 0x80))
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( joinem, jack )
|
||||
@ -876,7 +871,8 @@ static MACHINE_CONFIG_DERIVED( joinem, jack )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(joinem_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(joinem_interrupts,3)
|
||||
MCFG_CPU_VBLANK_INT("screen",joinem_vblank_irq)
|
||||
MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
|
||||
|
||||
MCFG_GFXDECODE(joinem)
|
||||
MCFG_PALETTE_LENGTH(0x100)
|
||||
|
@ -29,7 +29,6 @@ ft5_v6_c4.u58 /
|
||||
#define NVRAM_HACK 1
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/okim6295.h"
|
||||
|
||||
@ -38,7 +37,9 @@ class koftball_state : public driver_device
|
||||
{
|
||||
public:
|
||||
koftball_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")
|
||||
{ }
|
||||
|
||||
UINT16 *m_bmc_1_videoram;
|
||||
UINT16 *m_bmc_2_videoram;
|
||||
@ -48,6 +49,8 @@ public:
|
||||
UINT8 *m_bmc_colorram;
|
||||
int m_clr_offset;
|
||||
UINT16 m_prot_data;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -202,10 +205,19 @@ static INPUT_PORTS_START( koftball )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INTERRUPT_GEN( bmc_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( bmc_interrupt )
|
||||
{
|
||||
static const int bmcints[]={2,3,6};
|
||||
device_set_input_line(device, bmcints[cpu_getiloops(device)], HOLD_LINE);
|
||||
koftball_state *state = timer.machine().driver_data<koftball_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||
|
||||
if(scanline == 128)
|
||||
device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
|
||||
|
||||
if(scanline == 64)
|
||||
device_set_input_line(state->m_maincpu, 6, HOLD_LINE);
|
||||
}
|
||||
|
||||
static const gfx_layout tilelayout =
|
||||
@ -227,7 +239,7 @@ GFXDECODE_END
|
||||
static MACHINE_CONFIG_START( koftball, koftball_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, 21477270/2 )
|
||||
MCFG_CPU_PROGRAM_MAP(koftball_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(bmc_interrupt,3)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bmc_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
Loading…
Reference in New Issue
Block a user