mirror of
https://github.com/holub/mame
synced 2025-07-07 10:58:41 +03:00
deprecat.h
This commit is contained in:
parent
c66a3696f8
commit
1ecdf1dc78
@ -655,7 +655,7 @@ static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, MSX2_TOTAL_YRES_PIXELS)
|
||||
MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2)
|
||||
MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
|
||||
MCFG_SCREEN_UPDATE(csplayh5)
|
||||
|
||||
|
@ -22,9 +22,9 @@ static TIMER_DEVICE_CALLBACK( fastlane_scanline )
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240 && k007121_ctrlram_r(state->m_k007121, 7) & 0x02) // vblank irq
|
||||
cputag_set_input_line(timer.machine(), "maincpu", HD6309_IRQ_LINE, HOLD_LINE);
|
||||
device_set_input_line(state->m_maincpu, HD6309_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && k007121_ctrlram_r(state->m_k007121, 7) & 0x01) // timer irq
|
||||
cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -233,7 +233,8 @@ static const k053252_interface hexion_k053252_intf =
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_LINE(hexion_irq_ack_w),
|
||||
DEVCB_LINE(hexion_nmi_ack_w)
|
||||
DEVCB_LINE(hexion_nmi_ack_w),
|
||||
0, 0
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( hexion, hexion_state )
|
||||
|
@ -17,20 +17,15 @@
|
||||
#include "includes/labyrunr.h"
|
||||
|
||||
|
||||
static INTERRUPT_GEN( labyrunr_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( labyrunr_scanline )
|
||||
{
|
||||
labyrunr_state *state = device->machine().driver_data<labyrunr_state>();
|
||||
labyrunr_state *state = timer.machine().driver_data<labyrunr_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (cpu_getiloops(device) == 0)
|
||||
{
|
||||
if (k007121_ctrlram_r(state->m_k007121, 7) & 0x02)
|
||||
device_set_input_line(device, HD6309_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
else if (cpu_getiloops(device) % 2)
|
||||
{
|
||||
if (k007121_ctrlram_r(state->m_k007121, 7) & 0x01)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
if(scanline == 240 && k007121_ctrlram_r(state->m_k007121, 7) & 0x02) // vblank irq
|
||||
device_set_input_line(state->m_maincpu, HD6309_IRQ_LINE, HOLD_LINE);
|
||||
else if(((scanline % 32) == 0) && k007121_ctrlram_r(state->m_k007121, 7) & 0x01) // timer irq
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( labyrunr_bankswitch_w )
|
||||
@ -198,7 +193,7 @@ static MACHINE_CONFIG_START( labyrunr, labyrunr_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8? */
|
||||
MCFG_CPU_PROGRAM_MAP(labyrunr_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(labyrunr_interrupt,8) /* 1 IRQ + 4 NMI (generated by 007121) */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", labyrunr_scanline, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START(labyrunr)
|
||||
|
||||
|
@ -117,7 +117,6 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/lastduel.h"
|
||||
@ -456,28 +455,24 @@ static const ym2203_interface ym2203_config =
|
||||
irqhandler
|
||||
};
|
||||
|
||||
static INTERRUPT_GEN( lastduel_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( lastduel_timer_cb )
|
||||
{
|
||||
if (cpu_getiloops(device) == 0)
|
||||
device_set_input_line(device, 2, HOLD_LINE); /* VBL */
|
||||
else
|
||||
device_set_input_line(device, 4, HOLD_LINE); /* Controls */
|
||||
lastduel_state *state = timer.machine().driver_data<lastduel_state>();
|
||||
|
||||
device_set_input_line(state->m_maincpu, 4, HOLD_LINE); /* Controls */
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( madgear_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( madgear_timer_cb )
|
||||
{
|
||||
if (cpu_getiloops(device) == 0)
|
||||
device_set_input_line(device, 5, HOLD_LINE); /* VBL */
|
||||
else
|
||||
device_set_input_line(device, 6, HOLD_LINE); /* Controls */
|
||||
lastduel_state *state = timer.machine().driver_data<lastduel_state>();
|
||||
|
||||
device_set_input_line(state->m_maincpu, 6, HOLD_LINE); /* Controls */
|
||||
}
|
||||
|
||||
static MACHINE_START( lastduel )
|
||||
{
|
||||
lastduel_state *state = machine.driver_data<lastduel_state>();
|
||||
|
||||
state->m_audiocpu = machine.device("audiocpu");
|
||||
|
||||
state->save_item(NAME(state->m_tilemap_priority));
|
||||
state->save_item(NAME(state->m_scroll));
|
||||
}
|
||||
@ -507,7 +502,8 @@ static MACHINE_CONFIG_START( lastduel, lastduel_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Could be 8 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(lastduel_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(lastduel_interrupt,3) /* 1 for vbl, 2 for control reads?? */
|
||||
MCFG_CPU_VBLANK_INT("screen",irq2_line_hold)
|
||||
MCFG_TIMER_ADD_PERIODIC("timer_irq", lastduel_timer_cb, attotime::from_hz(120)) /* control reads?? */
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* Accurate */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
@ -549,7 +545,8 @@ static MACHINE_CONFIG_START( madgear, lastduel_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Accurate */
|
||||
MCFG_CPU_PROGRAM_MAP(madgear_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(madgear_interrupt,3) /* 1 for vbl, 2 for control reads?? */
|
||||
MCFG_CPU_VBLANK_INT("screen",irq5_line_hold)
|
||||
MCFG_TIMER_ADD_PERIODIC("timer_irq", madgear_timer_cb, attotime::from_hz(120)) /* control reads?? */
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(madgear_sound_map)
|
||||
|
@ -63,7 +63,6 @@ Notes:
|
||||
*********************************************************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/h83002/h8.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
@ -71,7 +70,9 @@ class lastfght_state : public driver_device
|
||||
{
|
||||
public:
|
||||
lastfght_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")
|
||||
{ }
|
||||
|
||||
/* video-related */
|
||||
bitmap_t *m_bitmap[2];
|
||||
@ -97,7 +98,7 @@ public:
|
||||
UINT16 m_c00006;
|
||||
|
||||
/* devices */
|
||||
device_t *m_maincpu;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
|
||||
/* memory */
|
||||
UINT8 m_colorram[256 * 3];
|
||||
@ -520,23 +521,14 @@ INPUT_PORTS_END
|
||||
static INTERRUPT_GEN( unknown_interrupt )
|
||||
{
|
||||
lastfght_state *state = device->machine().driver_data<lastfght_state>();
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
generic_pulse_irq_line(device, 0);
|
||||
break;
|
||||
default:
|
||||
device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
|
||||
break;
|
||||
}
|
||||
|
||||
device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_START( lastfght )
|
||||
{
|
||||
lastfght_state *state = machine.driver_data<lastfght_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
|
||||
state->save_item(NAME(state->m_clr_offset));
|
||||
state->save_item(NAME(state->m_dest));
|
||||
state->save_item(NAME(state->m_hi));
|
||||
@ -582,7 +574,8 @@ static MACHINE_CONFIG_START( lastfght, lastfght_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", H83044, 32000000/2)
|
||||
MCFG_CPU_PROGRAM_MAP( lastfght_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(unknown_interrupt,2)
|
||||
MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
|
||||
MCFG_CPU_PERIODIC_INT(unknown_interrupt,60)
|
||||
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
|
@ -221,7 +221,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/s2650/s2650.h"
|
||||
#include "sound/dac.h"
|
||||
#include "includes/lazercmd.h"
|
||||
@ -237,21 +236,29 @@
|
||||
* The rate should be at about 1 Hz
|
||||
*************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( lazercmd_timer )
|
||||
static TIMER_DEVICE_CALLBACK( lazercmd_timer )
|
||||
{
|
||||
lazercmd_state *state = device->machine().driver_data<lazercmd_state>();
|
||||
lazercmd_state *state = timer.machine().driver_data<lazercmd_state>();
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 2) == 1)
|
||||
return;
|
||||
|
||||
if (++state->m_timer_count >= 64 * 128)
|
||||
{
|
||||
state->m_timer_count = 0;
|
||||
state->m_sense_state ^= 1;
|
||||
device_set_input_line(device, 1, (state->m_sense_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
device_set_input_line(state->m_maincpu, 1, (state->m_sense_state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( bbonk_timer )
|
||||
static TIMER_DEVICE_CALLBACK( bbonk_timer )
|
||||
{
|
||||
lazercmd_state *state = device->machine().driver_data<lazercmd_state>();
|
||||
lazercmd_state *state = timer.machine().driver_data<lazercmd_state>();
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 2) == 1)
|
||||
return;
|
||||
|
||||
if (++state->m_timer_count >= 64 * 128)
|
||||
state->m_timer_count = 0;
|
||||
@ -634,7 +641,7 @@ static MACHINE_CONFIG_START( lazercmd, lazercmd_state )
|
||||
thus requiring an extra loading of approx 3-5 */
|
||||
MCFG_CPU_PROGRAM_MAP(lazercmd_map)
|
||||
MCFG_CPU_IO_MAP(lazercmd_portmap)
|
||||
MCFG_CPU_VBLANK_INT_HACK(lazercmd_timer, 128) /* 7680 Hz */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", lazercmd_timer, "screen", 0, 1) /* 7680 Hz */
|
||||
|
||||
MCFG_MACHINE_START(lazercmd)
|
||||
MCFG_MACHINE_RESET(lazercmd)
|
||||
@ -644,7 +651,7 @@ static MACHINE_CONFIG_START( lazercmd, lazercmd_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR)
|
||||
MCFG_SCREEN_SIZE(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR + 16)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1,
|
||||
0 * VERT_CHR, (VERT_RES - 1) * VERT_CHR - 1)
|
||||
MCFG_SCREEN_UPDATE(lazercmd)
|
||||
@ -672,7 +679,7 @@ static MACHINE_CONFIG_START( medlanes, lazercmd_state )
|
||||
thus requiring an extra loading of approx 3-5 */
|
||||
MCFG_CPU_PROGRAM_MAP(medlanes_map)
|
||||
MCFG_CPU_IO_MAP(lazercmd_portmap)
|
||||
MCFG_CPU_VBLANK_INT_HACK(lazercmd_timer, 128) /* 7680 Hz */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", lazercmd_timer, "screen", 0, 1) /* 7680 Hz */
|
||||
|
||||
MCFG_MACHINE_START(lazercmd)
|
||||
MCFG_MACHINE_RESET(lazercmd)
|
||||
@ -710,7 +717,7 @@ static MACHINE_CONFIG_START( bbonk, lazercmd_state )
|
||||
thus requiring an extra loading of approx 3-5 */
|
||||
MCFG_CPU_PROGRAM_MAP(bbonk_map)
|
||||
MCFG_CPU_IO_MAP(lazercmd_portmap)
|
||||
MCFG_CPU_VBLANK_INT_HACK(bbonk_timer, 128) /* 7680 Hz */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bbonk_timer, "screen", 0, 1) /* 7680 Hz */
|
||||
|
||||
MCFG_MACHINE_START(lazercmd)
|
||||
MCFG_MACHINE_RESET(lazercmd)
|
||||
|
@ -284,7 +284,6 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/z80pio.h"
|
||||
#include "machine/z80sio.h"
|
||||
@ -1574,7 +1573,7 @@ static MACHINE_CONFIG_START( mcr_90009, mcr_state )
|
||||
MCFG_CPU_CONFIG(mcr_daisy_chain)
|
||||
MCFG_CPU_PROGRAM_MAP(cpu_90009_map)
|
||||
MCFG_CPU_IO_MAP(cpu_90009_portmap)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mcr_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mcr_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_Z80CTC_ADD("ctc", MAIN_OSC_MCR_I/8 /* same as "maincpu" */, mcr_ctc_intf)
|
||||
|
||||
@ -1663,7 +1662,8 @@ static MACHINE_CONFIG_DERIVED( mcr_91490_ipu, mcr_91490_snt )
|
||||
MCFG_CPU_CONFIG(mcr_ipu_daisy_chain)
|
||||
MCFG_CPU_PROGRAM_MAP(ipu_91695_map)
|
||||
MCFG_CPU_IO_MAP(ipu_91695_portmap)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mcr_ipu_interrupt,2)
|
||||
MCFG_TIMER_MODIFY("scantimer")
|
||||
MCFG_TIMER_CALLBACK(mcr_ipu_interrupt)
|
||||
|
||||
MCFG_Z80CTC_ADD("ipu_ctc", 7372800/2 /* same as "ipu" */, nflfoot_ctc_intf)
|
||||
MCFG_Z80PIO_ADD("ipu_pio0", 7372800/2, nflfoot_pio_intf)
|
||||
|
@ -103,7 +103,6 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "audio/mcr.h"
|
||||
#include "machine/nvram.h"
|
||||
@ -1094,7 +1093,7 @@ static MACHINE_CONFIG_START( mcrmono, mcr3_state )
|
||||
MCFG_CPU_PROGRAM_MAP(mcrmono_map)
|
||||
MCFG_CPU_IO_MAP(mcrmono_portmap)
|
||||
MCFG_CPU_CONFIG(mcr_daisy_chain)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mcr_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", mcr_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_Z80CTC_ADD("ctc", MASTER_CLOCK/4 /* same as "maincpu" */, mcr_ctc_intf)
|
||||
|
||||
|
@ -61,7 +61,6 @@ SOFT PSG & VOICE BY M.C & S.H
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/resnet.h"
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
@ -69,7 +68,9 @@ class meijinsn_state : public driver_device
|
||||
{
|
||||
public:
|
||||
meijinsn_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")
|
||||
{ }
|
||||
|
||||
/* memory pointers */
|
||||
UINT16 * m_shared_ram;
|
||||
@ -86,6 +87,8 @@ public:
|
||||
UINT8 m_credits;
|
||||
UINT8 m_coinvalue;
|
||||
int m_mcu_latch;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -222,7 +225,7 @@ static INPUT_PORTS_START( meijinsn )
|
||||
PORT_DIPSETTING( 0x02, "10:00" )
|
||||
PORT_DIPSETTING( 0x01, "20:00" )
|
||||
PORT_DIPSETTING( 0x00, "0:30" )
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Coinage ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) )
|
||||
PORT_DIPSETTING( 0x08, "A 1C/1C B 1C/5C" )
|
||||
PORT_DIPSETTING( 0x00, "A 1C/2C B 2C/1C" )
|
||||
PORT_DIPNAME( 0x10, 0x00, "2 Player" )
|
||||
@ -306,12 +309,16 @@ static SCREEN_UPDATE(meijinsn)
|
||||
}
|
||||
|
||||
|
||||
static INTERRUPT_GEN( meijinsn_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( meijinsn_interrupt )
|
||||
{
|
||||
if (cpu_getiloops(device) == 0)
|
||||
device_set_input_line(device, 1, HOLD_LINE);
|
||||
else
|
||||
device_set_input_line(device, 2, HOLD_LINE);
|
||||
meijinsn_state *state = timer.machine().driver_data<meijinsn_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static const ay8910_interface ay8910_config =
|
||||
@ -345,7 +352,7 @@ static MACHINE_CONFIG_START( meijinsn, meijinsn_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 9000000 )
|
||||
MCFG_CPU_PROGRAM_MAP(meijinsn_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(meijinsn_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", meijinsn_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(meijinsn_sound_map)
|
||||
|
@ -100,7 +100,6 @@ Not all regional versions are available for each Megatouch series
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -317,15 +316,21 @@ static int meritm_touch_coord_transform(running_machine &machine, int *touch_x,
|
||||
*************************************/
|
||||
|
||||
|
||||
static INTERRUPT_GEN( meritm_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( meritm_interrupt )
|
||||
{
|
||||
v9938_set_sprite_limit(0, 0);
|
||||
v9938_set_resolution(0, RENDER_HIGH);
|
||||
v9938_interrupt(device->machine(), 0);
|
||||
//meritm_state *state = timer.machine().driver_data<meritm_state>();
|
||||
int scanline = param;
|
||||
|
||||
v9938_set_sprite_limit(1, 0);
|
||||
v9938_set_resolution(1, RENDER_HIGH);
|
||||
v9938_interrupt(device->machine(), 1);
|
||||
if((scanline % 2) == 0)
|
||||
{
|
||||
v9938_set_sprite_limit(0, 0);
|
||||
v9938_set_resolution(0, RENDER_HIGH);
|
||||
v9938_interrupt(timer.machine(), 0);
|
||||
|
||||
v9938_set_sprite_limit(1, 0);
|
||||
v9938_set_resolution(1, RENDER_HIGH);
|
||||
v9938_interrupt(timer.machine(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void meritm_vdp0_interrupt(running_machine &machine, int i)
|
||||
@ -1071,7 +1076,7 @@ static MACHINE_CONFIG_START( meritm_crt250, meritm_state )
|
||||
MCFG_CPU_PROGRAM_MAP(meritm_crt250_map)
|
||||
MCFG_CPU_IO_MAP(meritm_crt250_io_map)
|
||||
MCFG_CPU_CONFIG(meritm_daisy_chain)
|
||||
MCFG_CPU_VBLANK_INT_HACK(meritm_interrupt,262)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", meritm_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START(meritm_crt250)
|
||||
|
||||
@ -1092,7 +1097,7 @@ static MACHINE_CONFIG_START( meritm_crt250, meritm_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, MSX2_TOTAL_YRES_PIXELS)
|
||||
MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2)
|
||||
MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
|
||||
MCFG_SCREEN_UPDATE(meritm)
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
|
@ -49,7 +49,9 @@ class sbowling_state : public driver_device
|
||||
{
|
||||
public:
|
||||
sbowling_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_bgmap;
|
||||
UINT8 *m_videoram;
|
||||
@ -60,6 +62,8 @@ public:
|
||||
UINT32 m_color_prom_address;
|
||||
UINT8 m_pix_sh;
|
||||
UINT8 m_pix[2];
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static TILE_GET_INFO( get_sb_tile_info )
|
||||
@ -153,11 +157,17 @@ static READ8_HANDLER( pix_data_r )
|
||||
|
||||
|
||||
|
||||
static INTERRUPT_GEN( sbw_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( sbw_interrupt )
|
||||
{
|
||||
int vector = device->machine().primary_screen->vblank() ? 0xcf : 0xd7; /* RST 08h/10h */
|
||||
sbowling_state *state = timer.machine().driver_data<sbowling_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 256)
|
||||
device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
|
||||
if(scanline == 128)
|
||||
device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, vector);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER (system_w)
|
||||
@ -316,9 +326,9 @@ INPUT_PORTS_END
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8,8,
|
||||
256,
|
||||
RGN_FRAC(1,3),
|
||||
3,
|
||||
{ 0x800*0*8, 0x800*1*8, 0x800*2*8 },
|
||||
{ RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) },
|
||||
{ 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
|
||||
8*8
|
||||
@ -369,12 +379,10 @@ static PALETTE_INIT( sbowling )
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( sbowling, sbowling_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", I8080, XTAL_19_968MHz/10) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_IO_MAP(port_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(sbw_interrupt, 2)
|
||||
MCFG_GFXDECODE(sbowling)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sbw_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -384,6 +392,8 @@ static MACHINE_CONFIG_START( sbowling, sbowling_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 4*8, 32*8-1)
|
||||
MCFG_SCREEN_UPDATE(sbowling)
|
||||
|
||||
MCFG_GFXDECODE(sbowling)
|
||||
|
||||
MCFG_PALETTE_LENGTH(0x400)
|
||||
MCFG_PALETTE_INIT(sbowling)
|
||||
MCFG_VIDEO_START(sbowling)
|
||||
|
@ -65,7 +65,6 @@ Updates:
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/konicdev.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
@ -176,19 +175,8 @@ static INTERRUPT_GEN(cuebrick_interrupt)
|
||||
{
|
||||
tmnt_state *state = device->machine().driver_data<tmnt_state>();
|
||||
|
||||
// cheap IRQ multiplexing to avoid losing sound IRQs
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
if (state->m_irq5_mask)
|
||||
device_set_input_line(device, M68K_IRQ_5, HOLD_LINE);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (state->m_cuebrick_snd_irqlatch)
|
||||
device_set_input_line(device, M68K_IRQ_6, HOLD_LINE);
|
||||
break;
|
||||
}
|
||||
if (state->m_irq5_mask)
|
||||
device_set_input_line(device, M68K_IRQ_5, HOLD_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( punkshot_interrupt )
|
||||
@ -2120,7 +2108,8 @@ INPUT_PORTS_END
|
||||
static void cuebrick_irq_handler( device_t *device, int state )
|
||||
{
|
||||
tmnt_state *tmnt = device->machine().driver_data<tmnt_state>();
|
||||
tmnt->m_cuebrick_snd_irqlatch = state;
|
||||
|
||||
device_set_input_line(tmnt->m_maincpu, M68K_IRQ_6, (state) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2151_interface ym2151_interface_cbj =
|
||||
@ -2342,7 +2331,7 @@ static MACHINE_CONFIG_START( cuebrick, tmnt_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(cuebrick_main_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(cuebrick_interrupt,10)
|
||||
MCFG_CPU_VBLANK_INT("screen",cuebrick_interrupt)
|
||||
|
||||
MCFG_MACHINE_START(common)
|
||||
MCFG_MACHINE_RESET(common)
|
||||
|
@ -59,14 +59,13 @@ Unresolved Issues:
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/konicdev.h"
|
||||
#include "machine/k053252.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/k053252.h"
|
||||
#include "sound/k054539.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/flt_vol.h"
|
||||
#include "video/konicdev.h"
|
||||
#include "includes/xexex.h"
|
||||
#include "includes/konamipt.h"
|
||||
|
||||
@ -285,39 +284,40 @@ static TIMER_CALLBACK( dmaend_callback )
|
||||
}
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( xexex_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( xexex_interrupt )
|
||||
{
|
||||
xexex_state *state = device->machine().driver_data<xexex_state>();
|
||||
xexex_state *state = timer.machine().driver_data<xexex_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (state->m_suspension_active)
|
||||
{
|
||||
state->m_suspension_active = 0;
|
||||
device->machine().scheduler().trigger(state->m_resume_trigger);
|
||||
timer.machine().scheduler().trigger(state->m_resume_trigger);
|
||||
}
|
||||
|
||||
switch (cpu_getiloops(device))
|
||||
if(scanline == 0)
|
||||
{
|
||||
case 0:
|
||||
// IRQ 6 is for test mode only
|
||||
// IRQ 6 is for test mode only
|
||||
if (state->m_cur_control2 & 0x0020)
|
||||
device_set_input_line(device, 6, HOLD_LINE);
|
||||
break;
|
||||
device_set_input_line(state->m_maincpu, 6, HOLD_LINE);
|
||||
}
|
||||
|
||||
case 1:
|
||||
if (k053246_is_irq_enabled(state->m_k053246))
|
||||
{
|
||||
// OBJDMA starts at the beginning of V-blank
|
||||
xexex_objdma(device->machine(), 0);
|
||||
/* TODO: vblank is at 256! (enable CCU then have fun in fixing offsetted layers) */
|
||||
if(scanline == 128)
|
||||
{
|
||||
if (k053246_is_irq_enabled(state->m_k053246))
|
||||
{
|
||||
// OBJDMA starts at the beginning of V-blank
|
||||
xexex_objdma(timer.machine(), 0);
|
||||
|
||||
// schedule DMA end interrupt
|
||||
state->m_dmadelay_timer->adjust(XE_DMADELAY);
|
||||
}
|
||||
// schedule DMA end interrupt
|
||||
state->m_dmadelay_timer->adjust(XE_DMADELAY);
|
||||
}
|
||||
|
||||
// IRQ 4 is the V-blank interrupt. It controls color, sound and
|
||||
// vital game logics that shouldn't be interfered by frame-drop.
|
||||
if (state->m_cur_control2 & 0x0800)
|
||||
device_set_input_line(device, 4, HOLD_LINE);
|
||||
break;
|
||||
// IRQ 4 is the V-blank interrupt. It controls color, sound and
|
||||
// vital game logics that shouldn't be interfered by frame-drop.
|
||||
if (state->m_cur_control2 & 0x0800)
|
||||
device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,7 +339,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16 )
|
||||
AM_RANGE(0x0c8000, 0x0c800f) AM_DEVREADWRITE_MODERN("k053250", k053250_t, reg_r, reg_w)
|
||||
AM_RANGE(0x0ca000, 0x0ca01f) AM_DEVWRITE("k054338", k054338_word_w) // CLTC
|
||||
AM_RANGE(0x0cc000, 0x0cc01f) AM_DEVWRITE("k053251", k053251_lsb_w) // priority encoder
|
||||
// AM_RANGE(0x0d0000, 0x0d001f) AM_DEVREADWRITE8("k053252", k053252_r,k053252_w,0x00ff) // CCU
|
||||
// AM_RANGE(0x0d0000, 0x0d001f) AM_DEVREADWRITE8("k053252", k053252_r,k053252_w,0x00ff) // CCU
|
||||
AM_RANGE(0x0d4000, 0x0d4001) AM_WRITE(sound_irq_w)
|
||||
AM_RANGE(0x0d600c, 0x0d600d) AM_WRITE(sound_cmd1_w)
|
||||
AM_RANGE(0x0d600e, 0x0d600f) AM_WRITE(sound_cmd2_w)
|
||||
@ -526,7 +526,7 @@ static MACHINE_CONFIG_START( xexex, xexex_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 32000000/2) // 16MHz (32MHz xtal)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(xexex_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", xexex_interrupt, "screen", 0, 1)
|
||||
|
||||
// 8MHz (PCB shows one 32MHz/18.432MHz xtal, reference: www.system16.com)
|
||||
// more likely 32MHz since 18.432MHz yields 4.608MHz(too slow) or 9.216MHz(too fast) with integer divisors
|
||||
|
@ -8,7 +8,9 @@ class fastlane_state : public driver_device
|
||||
{
|
||||
public:
|
||||
fastlane_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")
|
||||
{ }
|
||||
|
||||
/* memory pointers */
|
||||
UINT8 * m_videoram1;
|
||||
@ -26,6 +28,8 @@ public:
|
||||
/* devices */
|
||||
device_t *m_konami2;
|
||||
device_t *m_k007121;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -8,7 +8,9 @@ class labyrunr_state : public driver_device
|
||||
{
|
||||
public:
|
||||
labyrunr_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")
|
||||
{ }
|
||||
|
||||
/* memory pointers */
|
||||
UINT8 * m_videoram1;
|
||||
@ -25,6 +27,8 @@ public:
|
||||
|
||||
/* devices */
|
||||
device_t *m_k007121;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -8,7 +8,10 @@ class lastduel_state : public driver_device
|
||||
{
|
||||
public:
|
||||
lastduel_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"),
|
||||
m_audiocpu(*this, "audiocpu")
|
||||
{ }
|
||||
|
||||
/* memory pointers */
|
||||
UINT16 * m_vram;
|
||||
@ -27,7 +30,8 @@ public:
|
||||
int m_tilemap_priority;
|
||||
|
||||
/* devices */
|
||||
device_t *m_audiocpu;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
};
|
||||
|
||||
/*----------- defined in video/lastduel.c -----------*/
|
||||
|
@ -21,7 +21,9 @@ class lazercmd_state : public driver_device
|
||||
{
|
||||
public:
|
||||
lazercmd_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")
|
||||
{ }
|
||||
|
||||
/* memory pointers */
|
||||
UINT8 * m_videoram;
|
||||
@ -37,6 +39,7 @@ public:
|
||||
int m_dac_data;
|
||||
|
||||
/* device */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
device_t *m_dac;
|
||||
};
|
||||
|
||||
|
@ -17,9 +17,13 @@ class mcr_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mcr_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_videoram;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -48,8 +52,8 @@ MACHINE_START( mcr );
|
||||
MACHINE_RESET( mcr );
|
||||
MACHINE_START( nflfoot );
|
||||
|
||||
INTERRUPT_GEN( mcr_interrupt );
|
||||
INTERRUPT_GEN( mcr_ipu_interrupt );
|
||||
TIMER_DEVICE_CALLBACK( mcr_interrupt );
|
||||
TIMER_DEVICE_CALLBACK( mcr_ipu_interrupt );
|
||||
|
||||
WRITE8_HANDLER( mcr_control_port_w );
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "audio/mcr.h"
|
||||
#include "includes/mcr.h"
|
||||
|
||||
@ -188,32 +187,38 @@ MACHINE_RESET( mcr )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INTERRUPT_GEN( mcr_interrupt )
|
||||
TIMER_DEVICE_CALLBACK( mcr_interrupt )
|
||||
{
|
||||
device_t *ctc = device->machine().device("ctc");
|
||||
//mcr_state *state = timer.machine().driver_data<mcr_state>();
|
||||
device_t *ctc = timer.machine().device("ctc");
|
||||
int scanline = param;
|
||||
|
||||
/* CTC line 2 is connected to VBLANK, which is once every 1/2 frame */
|
||||
/* for the 30Hz interlaced display */
|
||||
z80ctc_trg2_w(ctc, 1);
|
||||
z80ctc_trg2_w(ctc, 0);
|
||||
if(scanline == 0 || scanline == 240)
|
||||
{
|
||||
z80ctc_trg2_w(ctc, 1);
|
||||
z80ctc_trg2_w(ctc, 0);
|
||||
}
|
||||
|
||||
/* CTC line 3 is connected to 493, which is signalled once every */
|
||||
/* frame at 30Hz */
|
||||
if (cpu_getiloops(device) == 0)
|
||||
if (scanline == 0)
|
||||
{
|
||||
z80ctc_trg3_w(ctc, 1);
|
||||
z80ctc_trg3_w(ctc, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INTERRUPT_GEN( mcr_ipu_interrupt )
|
||||
TIMER_DEVICE_CALLBACK( mcr_ipu_interrupt )
|
||||
{
|
||||
device_t *ctc = device->machine().device("ipu_ctc");
|
||||
//mcr_state *state = timer.machine().driver_data<mcr_state>();
|
||||
device_t *ctc = timer.machine().device("ctc");
|
||||
int scanline = param;
|
||||
|
||||
/* CTC line 3 is connected to 493, which is signalled once every */
|
||||
/* frame at 30Hz */
|
||||
if (cpu_getiloops(device) == 0)
|
||||
if (scanline == 0)
|
||||
{
|
||||
z80ctc_trg3_w(ctc, 1);
|
||||
z80ctc_trg3_w(ctc, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user