mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
deprecat.h, also MT #4356
This commit is contained in:
parent
dd3f938e0b
commit
44c0314cb3
@ -65,7 +65,6 @@ Stephh's notes (based on the game Z80 code and some tests) :
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/segacrpt.h"
|
||||
#include "includes/pbaction.h"
|
||||
@ -293,7 +292,7 @@ static MACHINE_CONFIG_START( pbaction, pbaction_state )
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3072000)
|
||||
MCFG_CPU_PROGRAM_MAP(pbaction_sound_map)
|
||||
MCFG_CPU_IO_MAP(pbaction_sound_io_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(pbaction_interrupt,2) /* ??? */
|
||||
MCFG_CPU_PERIODIC_INT(pbaction_interrupt,2*60) /* ??? */
|
||||
/* IRQs are caused by the main CPU */
|
||||
|
||||
MCFG_MACHINE_START(pbaction)
|
||||
|
@ -295,7 +295,6 @@ Notes:
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/arm7/arm7.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/ics2115.h"
|
||||
#include "cpu/arm7/arm7core.h"
|
||||
#include "machine/nvram.h"
|
||||
@ -1268,43 +1267,45 @@ GFXDECODE_END
|
||||
|
||||
/* only dragon world 2 NEEDs irq4, Puzzli 2 explicitly doesn't want it, what
|
||||
is the source? maybe the protection device? */
|
||||
static INTERRUPT_GEN( drgw_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( drgw_interrupt )
|
||||
{
|
||||
if (cpu_getiloops(device) == 0)
|
||||
{
|
||||
//printf("vbl\n");
|
||||
device_set_input_line(device, 6, HOLD_LINE);
|
||||
}
|
||||
else
|
||||
device_set_input_line(device, 4, HOLD_LINE);
|
||||
pgm_state *state = timer.machine().driver_data<pgm_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 224)
|
||||
device_set_input_line(state->m_maincpu, 6, HOLD_LINE);
|
||||
|
||||
if(scanline == 0)
|
||||
device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_START( pgm )
|
||||
{
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
|
||||
machine.base_datetime(state->m_systime);
|
||||
// machine.base_datetime(state->m_systime);
|
||||
|
||||
state->m_maincpu = machine.device<cpu_device>("maincpu");
|
||||
state->m_soundcpu = machine.device<cpu_device>("soundcpu");
|
||||
state->m_prot = machine.device<cpu_device>("prot");
|
||||
state->m_ics = machine.device("ics");
|
||||
|
||||
state->save_item(NAME(state->m_cal_val));
|
||||
state->save_item(NAME(state->m_cal_mask));
|
||||
state->save_item(NAME(state->m_cal_com));
|
||||
state->save_item(NAME(state->m_cal_cnt));
|
||||
// state->save_item(NAME(state->m_cal_val));
|
||||
// state->save_item(NAME(state->m_cal_mask));
|
||||
// state->save_item(NAME(state->m_cal_com));
|
||||
// state->save_item(NAME(state->m_cal_cnt));
|
||||
}
|
||||
|
||||
static MACHINE_RESET( pgm )
|
||||
{
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
// pgm_state *state = machine.driver_data<pgm_state>();
|
||||
|
||||
cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
|
||||
|
||||
state->m_cal_val = 0;
|
||||
state->m_cal_mask = 0;
|
||||
state->m_cal_com = 0;
|
||||
state->m_cal_cnt = 0;
|
||||
// state->m_cal_val = 0;
|
||||
// state->m_cal_mask = 0;
|
||||
// state->m_cal_com = 0;
|
||||
// state->m_cal_cnt = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1349,11 +1350,14 @@ static MACHINE_CONFIG_START( pgm, pgm_state )
|
||||
MCFG_FRAGMENT_ADD(pgmbase)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
// needs an extra IRQ, puzzli2 doesn't want this irq!
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( drgw2, pgm )
|
||||
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_VBLANK_INT_HACK(drgw_interrupt,2) // needs an extra IRQ, puzzli2 doesn't want this irq!
|
||||
MCFG_DEVICE_REMOVE("maincpu")
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000)
|
||||
MCFG_CPU_PROGRAM_MAP(pgm_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", drgw_interrupt, "screen", 0, 1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_RESET( killbld );
|
||||
@ -1371,9 +1375,11 @@ static MACHINE_RESET( dw3 );
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( dw3, pgm )
|
||||
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(killbld_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(drgw_interrupt,2) // needs an extra IRQ, puzzli2 doesn't want this irq!
|
||||
MCFG_DEVICE_REMOVE("maincpu")
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000)
|
||||
MCFG_CPU_PROGRAM_MAP(pgm_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", drgw_interrupt, "screen", 0, 1)
|
||||
|
||||
|
||||
MCFG_MACHINE_RESET(dw3)
|
||||
|
||||
@ -1402,9 +1408,11 @@ MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( kov_disabled_arm, pgm )
|
||||
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(kovsh_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(drgw_interrupt,2) // needs an extra IRQ, puzzli2 doesn't want this irq!
|
||||
MCFG_DEVICE_REMOVE("maincpu")
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000)
|
||||
MCFG_CPU_PROGRAM_MAP(pgm_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", drgw_interrupt, "screen", 0, 1)
|
||||
|
||||
|
||||
/* protection CPU */
|
||||
MCFG_CPU_ADD("prot", ARM7, 20000000) // 55857E/F/G
|
||||
@ -1425,9 +1433,10 @@ MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( svg, pgm )
|
||||
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_DEVICE_REMOVE("maincpu")
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000)
|
||||
MCFG_CPU_PROGRAM_MAP(svg_68k_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(drgw_interrupt,2) // needs an extra IRQ, puzzli2 doesn't want this irq!
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", drgw_interrupt, "screen", 0, 1)
|
||||
|
||||
/* protection CPU */
|
||||
MCFG_CPU_ADD("prot", ARM7, 20000000) // 55857G
|
||||
@ -1435,11 +1444,14 @@ static MACHINE_CONFIG_DERIVED( svg, pgm )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( oldsplus, oldsplus_state )
|
||||
static MACHINE_CONFIG_START( oldsplus, pgm_state )
|
||||
MCFG_FRAGMENT_ADD(pgmbase)
|
||||
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_VBLANK_INT_HACK(drgw_interrupt,2) // needs an extra IRQ, puzzli2 doesn't want this irq!
|
||||
MCFG_DEVICE_REMOVE("maincpu")
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000)
|
||||
MCFG_CPU_PROGRAM_MAP(pgm_mem)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", drgw_interrupt, "screen", 0, 1)
|
||||
|
||||
|
||||
// Simulated for now
|
||||
// MCFG_CPU_ADD("prot", ARM7, 20000000)
|
||||
@ -1483,9 +1495,8 @@ static MACHINE_CONFIG_START( cavepgm, cavepgm_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 20000000)
|
||||
|
||||
MCFG_CPU_PROGRAM_MAP(cavepgm_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(drgw_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", drgw_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 33868800/4)
|
||||
MCFG_CPU_PROGRAM_MAP(z80_mem)
|
||||
|
@ -37,7 +37,6 @@ is a YM2413 compatible chip.
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "video/v9938.h"
|
||||
#include "sound/2413intf.h"
|
||||
@ -354,11 +353,16 @@ static void msx_vdp_interrupt(running_machine &machine, int i)
|
||||
cputag_set_input_line (machine, "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( sangho_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( sangho_interrupt )
|
||||
{
|
||||
v9938_set_sprite_limit(0, 0);
|
||||
v9938_set_resolution(0, RENDER_HIGH);
|
||||
v9938_interrupt(device->machine(), 0);
|
||||
int scanline = param;
|
||||
|
||||
if((scanline % 2) == 0)
|
||||
{
|
||||
v9938_set_sprite_limit(0, 0);
|
||||
v9938_set_resolution(0, RENDER_HIGH);
|
||||
v9938_interrupt(timer.machine(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -373,7 +377,7 @@ static MACHINE_CONFIG_START( pzlestar, sangho_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80,8000000) // ?
|
||||
MCFG_CPU_PROGRAM_MAP(sangho_map)
|
||||
MCFG_CPU_IO_MAP(pzlestar_io_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(sangho_interrupt,262)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sangho_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
||||
@ -406,7 +410,7 @@ static MACHINE_CONFIG_START( sexyboom, sangho_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80,8000000) // ?
|
||||
MCFG_CPU_PROGRAM_MAP(sangho_map)
|
||||
MCFG_CPU_IO_MAP(sexyboom_io_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(sangho_interrupt,262)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sangho_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/mcs51/mcs51.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/segaic16.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/segas16.h"
|
||||
@ -1269,9 +1268,6 @@ MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( system18_8751, system18 )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_VBLANK_INT_HACK(NULL,0) /* TODO: ??? */
|
||||
|
||||
MCFG_CPU_ADD("mcu", I8751, 8000000)
|
||||
MCFG_CPU_IO_MAP(mcu_io_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
|
||||
|
@ -335,7 +335,6 @@ Notes:
|
||||
|
||||
#define ADDRESS_MAP_MODERN
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/ym2151.h"
|
||||
#include "sound/dac.h"
|
||||
@ -987,30 +986,29 @@ READ16_MEMBER(segas24_state::irq_r)
|
||||
return irq_tval & 0xfff;
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN(irq_vbl)
|
||||
static TIMER_DEVICE_CALLBACK(irq_vbl)
|
||||
{
|
||||
segas24_state *state = device->machine().driver_data<segas24_state>();
|
||||
segas24_state *state = timer.machine().driver_data<segas24_state>();
|
||||
int irq, mask;
|
||||
int scanline = param;
|
||||
|
||||
if(cpu_getiloops(device)) {
|
||||
irq = IRQ_SPRITE;
|
||||
state->irq_sprite = 1;
|
||||
} else {
|
||||
irq = IRQ_VBLANK;
|
||||
state->irq_vblank = 1;
|
||||
}
|
||||
/* TODO: perhaps vblank irq happens at 400, sprite IRQ certainly don't at 0! */
|
||||
if(scanline == 0) { irq = IRQ_SPRITE; state->irq_sprite = 1; }
|
||||
else if(scanline == 384) { irq = IRQ_VBLANK; state->irq_vblank = 1; }
|
||||
else
|
||||
return;
|
||||
|
||||
state->irq_timer_clear->adjust(attotime::from_hz(HSYNC_CLOCK));
|
||||
|
||||
mask = 1 << irq;
|
||||
|
||||
if(state->irq_allow0 & mask)
|
||||
cputag_set_input_line(device->machine(), "maincpu", 1+irq, ASSERT_LINE);
|
||||
cputag_set_input_line(timer.machine(), "maincpu", 1+irq, ASSERT_LINE);
|
||||
|
||||
if(state->irq_allow1 & mask)
|
||||
cputag_set_input_line(device->machine(), "sub", 1+irq, ASSERT_LINE);
|
||||
cputag_set_input_line(timer.machine(), "sub", 1+irq, ASSERT_LINE);
|
||||
|
||||
if(!cpu_getiloops(device)) {
|
||||
if(scanline == 384) {
|
||||
// Ensure one index pulse every 20 frames
|
||||
// The is some code in bnzabros at 0x852 that makes it crash
|
||||
// if the pulse train is too fast
|
||||
@ -1020,7 +1018,7 @@ static INTERRUPT_GEN(irq_vbl)
|
||||
}
|
||||
|
||||
state->irq_timer_sync();
|
||||
state->irq_vsynctime = device->machine().time();
|
||||
state->irq_vsynctime = timer.machine().time();
|
||||
}
|
||||
|
||||
static void irq_ym(device_t *device, int irq)
|
||||
@ -1951,7 +1949,7 @@ static MACHINE_CONFIG_START( system24, segas24_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(system24_cpu1_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(irq_vbl, 2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", irq_vbl, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("sub", M68000, MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(system24_cpu2_map)
|
||||
|
@ -56,7 +56,6 @@ YM2203C
|
||||
#include "video/v9938.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
|
||||
class sfkick_state : public driver_device
|
||||
@ -458,10 +457,11 @@ static MACHINE_RESET(sfkick)
|
||||
sfkick_remap_banks(machine);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( sfkick_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( sfkick_interrupt )
|
||||
{
|
||||
v9938_interrupt(device->machine(), 0);
|
||||
v9938_interrupt(timer.machine(), 0);
|
||||
}
|
||||
|
||||
static void irqhandler(device_t *device, int irq)
|
||||
{
|
||||
cputag_set_input_line_and_vector(device->machine(), "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff);
|
||||
@ -482,7 +482,7 @@ static MACHINE_CONFIG_START( sfkick, sfkick_state )
|
||||
MCFG_CPU_ADD("maincpu",Z80,MASTER_CLOCK/6)
|
||||
MCFG_CPU_PROGRAM_MAP(sfkick_map)
|
||||
MCFG_CPU_IO_MAP(sfkick_io_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(sfkick_interrupt,262)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sfkick_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(60000))
|
||||
|
||||
|
@ -8,21 +8,20 @@ driver by Allard Van Der Bas
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/sn76496.h"
|
||||
#include "includes/shaolins.h"
|
||||
|
||||
#define MASTER_CLOCK XTAL_18_432MHz
|
||||
|
||||
static INTERRUPT_GEN( shaolins_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( shaolins_interrupt )
|
||||
{
|
||||
shaolins_state *state = device->machine().driver_data<shaolins_state>();
|
||||
shaolins_state *state = timer.machine().driver_data<shaolins_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (cpu_getiloops(device) == 0) device_set_input_line(device, 0, HOLD_LINE);
|
||||
else if (cpu_getiloops(device) % 2)
|
||||
{
|
||||
if (state->m_nmi_enable & 0x02) device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
if(scanline == 240)
|
||||
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||
else if((scanline % 32) == 0)
|
||||
if (state->m_nmi_enable & 0x02) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +192,7 @@ static MACHINE_CONFIG_START( shaolins, shaolins_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/12) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(shaolins_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(shaolins_interrupt,16) /* 1 IRQ + 8 NMI */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", shaolins_interrupt, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -88,7 +88,6 @@ Notes:
|
||||
*************************************************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/okim9810.h"
|
||||
#include "sound/ymz280b.h"
|
||||
@ -101,7 +100,9 @@ class sigmab98_state : public driver_device
|
||||
{
|
||||
public:
|
||||
sigmab98_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_spriteram;
|
||||
size_t m_spriteram_size;
|
||||
@ -116,6 +117,11 @@ public:
|
||||
UINT8 m_vblank;
|
||||
UINT8 m_out[3];
|
||||
UINT8 *m_nvram;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
UINT8 m_vblank_vector;
|
||||
UINT8 m_timer0_vector;
|
||||
UINT8 m_timer1_vector;
|
||||
};
|
||||
|
||||
|
||||
@ -1755,87 +1761,48 @@ MACHINE_CONFIG_END
|
||||
Animal Catch
|
||||
***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( animalc )
|
||||
static TIMER_DEVICE_CALLBACK( sammymd1_irq )
|
||||
{
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x00); // increment counter
|
||||
break;
|
||||
sigmab98_state *state = timer.machine().driver_data<sigmab98_state>();
|
||||
int scanline = param;
|
||||
|
||||
case 1:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x1c); // read hopper state
|
||||
break;
|
||||
if(scanline == 240)
|
||||
device_set_input_line_and_vector(state->m_maincpu,0,HOLD_LINE, state->m_vblank_vector);
|
||||
|
||||
case 2:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x1e); // drive hopper motor
|
||||
break;
|
||||
}
|
||||
if(scanline == 128)
|
||||
device_set_input_line_and_vector(state->m_maincpu,0,HOLD_LINE, state->m_timer0_vector);
|
||||
|
||||
if(scanline == 32)
|
||||
device_set_input_line_and_vector(state->m_maincpu,0,HOLD_LINE, state->m_timer1_vector);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( animalc, sammymdl )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP( animalc_map )
|
||||
MCFG_CPU_IO_MAP( animalc_io )
|
||||
MCFG_CPU_VBLANK_INT_HACK(animalc, 3) // IM 2 needs a vector on the data bus
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sammymd1_irq, "screen", 0, 1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
Hae Hae Ka Ka Ka
|
||||
***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( haekaka )
|
||||
{
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x04);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x1a);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x1c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( haekaka, sammymdl )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP( haekaka_map )
|
||||
MCFG_CPU_IO_MAP( haekaka_io )
|
||||
MCFG_CPU_VBLANK_INT_HACK(haekaka, 3) // IM 2 needs a vector on the data bus
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sammymd1_irq, "screen", 0, 1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
Itazura Monkey
|
||||
***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( itazuram )
|
||||
{
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x00); // sprites
|
||||
break;
|
||||
|
||||
case 1:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x02); // copy palette
|
||||
break;
|
||||
|
||||
case 2:
|
||||
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x16); // hopper, i/o
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( itazuram, sammymdl )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP( itazuram_map )
|
||||
MCFG_CPU_IO_MAP( itazuram_io )
|
||||
MCFG_CPU_VBLANK_INT_HACK(itazuram, 3) // IM 2 needs a vector on the data bus
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sammymd1_irq, "screen", 0, 1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
@ -1846,7 +1813,7 @@ static MACHINE_CONFIG_DERIVED( pyenaget, sammymdl )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP( haekaka_map )
|
||||
MCFG_CPU_IO_MAP( pyenaget_io )
|
||||
MCFG_CPU_VBLANK_INT_HACK(haekaka, 3) // IM 2 needs a vector on the data bus
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sammymd1_irq, "screen", 0, 1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
@ -1857,7 +1824,7 @@ static MACHINE_CONFIG_DERIVED( tdoboon, sammymdl )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP( tdoboon_map )
|
||||
MCFG_CPU_IO_MAP( tdoboon_io )
|
||||
MCFG_CPU_VBLANK_INT_HACK(haekaka, 3) // IM 2 needs a vector on the data bus
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", sammymd1_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_VISIBLE_AREA(0,0x140-1, 0+4,0xf0+4-1)
|
||||
@ -2142,6 +2109,10 @@ static DRIVER_INIT( animalc )
|
||||
state->m_spriteram_size = 0x1000;
|
||||
memory_configure_bank(machine, "sprbank", 0, 5, state->m_spriteram, 0x1000);
|
||||
memory_set_bank(machine, "sprbank", 0);
|
||||
|
||||
state->m_vblank_vector = 0x00; // increment counter
|
||||
state->m_timer0_vector = 0x1c; // read hopper state
|
||||
state->m_timer1_vector = 0x1e; // drive hopper motor
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -2186,6 +2157,10 @@ static DRIVER_INIT( itazuram )
|
||||
state->m_spriteram_size = 0x1000;
|
||||
memory_set_bankptr(machine, "sprbank0", state->m_spriteram + 0x1000*4); // scratch
|
||||
memory_set_bankptr(machine, "sprbank1", state->m_spriteram + 0x1000*4); // scratch
|
||||
|
||||
state->m_vblank_vector = 0x00;
|
||||
state->m_timer0_vector = 0x02;
|
||||
state->m_timer1_vector = 0x16;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -2295,6 +2270,10 @@ static DRIVER_INIT( haekaka )
|
||||
|
||||
state->m_rombank = 0x65;
|
||||
state->m_rambank = 0x53;
|
||||
|
||||
state->m_vblank_vector = 0x04;
|
||||
state->m_timer0_vector = 0x1a;
|
||||
state->m_timer1_vector = 0x1c;
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,7 +88,6 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/skydiver.h"
|
||||
#include "sound/discrete.h"
|
||||
|
||||
@ -377,7 +376,7 @@ static MACHINE_CONFIG_START( skydiver, skydiver_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6800,MASTER_CLOCK/16) /* ???? */
|
||||
MCFG_CPU_PROGRAM_MAP(skydiver_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(skydiver_interrupt, 5)
|
||||
MCFG_CPU_PERIODIC_INT(skydiver_interrupt, 5*60)
|
||||
MCFG_WATCHDOG_VBLANK_INIT(8) // 128V clocks the same as VBLANK
|
||||
|
||||
MCFG_MACHINE_RESET(skydiver)
|
||||
|
@ -63,7 +63,6 @@ out of the sprite list at that point.. (verify on real hw)
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/snowbros.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
@ -116,18 +115,36 @@ static WRITE16_HANDLER( snowbros_irq2_ack_w )
|
||||
cputag_set_input_line(space->machine(), "maincpu", 2, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( snowbros_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( snowbros_irq )
|
||||
{
|
||||
device_set_input_line(device, cpu_getiloops(device) + 2, ASSERT_LINE); /* IRQs 4, 3, and 2 */
|
||||
snowbros_state *state = timer.machine().driver_data<snowbros_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
|
||||
|
||||
if(scanline == 128)
|
||||
device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
|
||||
|
||||
if(scanline == 32)
|
||||
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( snowbro3_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( snowbros3_irq )
|
||||
{
|
||||
snowbros_state *state = device->machine().driver_data<snowbros_state>();
|
||||
okim6295_device *adpcm = device->machine().device<okim6295_device>("oki");
|
||||
snowbros_state *state = timer.machine().driver_data<snowbros_state>();
|
||||
okim6295_device *adpcm = timer.machine().device<okim6295_device>("oki");
|
||||
int status = adpcm->read_status();
|
||||
int scanline = param;
|
||||
|
||||
device_set_input_line(device, cpu_getiloops(device) + 2, ASSERT_LINE); /* IRQs 4, 3, and 2 */
|
||||
if(scanline == 240)
|
||||
device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
|
||||
|
||||
if(scanline == 128)
|
||||
device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
|
||||
|
||||
if(scanline == 32)
|
||||
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||
|
||||
if (state->m_sb3_music_is_playing)
|
||||
{
|
||||
@ -1430,7 +1447,7 @@ static MACHINE_RESET (semiprot)
|
||||
int i;
|
||||
|
||||
for (i = 0;i < 0x200/2;i++)
|
||||
state->m_hyperpac_ram[0xf000/2 + i] = PROTDATA[i];
|
||||
state->m_hyperpac_ram[0xf000/2 + i] = PROTDATA[i];
|
||||
}
|
||||
|
||||
static MACHINE_RESET (finalttr)
|
||||
@ -1440,7 +1457,7 @@ static MACHINE_RESET (finalttr)
|
||||
int i;
|
||||
|
||||
for (i = 0;i < 0x200/2;i++)
|
||||
state->m_hyperpac_ram[0x2000/2 + i] = PROTDATA[i];
|
||||
state->m_hyperpac_ram[0x2000/2 + i] = PROTDATA[i];
|
||||
}
|
||||
|
||||
static const kaneko_pandora_interface snowbros_pandora_config =
|
||||
@ -1455,7 +1472,7 @@ static MACHINE_CONFIG_START( snowbros, snowbros_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 Mhz - confirmed */
|
||||
MCFG_CPU_PROGRAM_MAP(snowbros_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(snowbros_interrupt,3)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 6000000) /* 6 MHz - confirmed */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
@ -1466,7 +1483,7 @@ static MACHINE_CONFIG_START( snowbros, snowbros_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(57.5) /* ~57.5 - confirmed */
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_SIZE(32*8, 262)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MCFG_SCREEN_UPDATE(snowbros)
|
||||
MCFG_SCREEN_EOF(snowbros)
|
||||
@ -1566,7 +1583,7 @@ static MACHINE_CONFIG_START( honeydol, snowbros_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(honeydol_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(snowbros_interrupt,3)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(honeydol_sound_map)
|
||||
@ -1577,7 +1594,7 @@ static MACHINE_CONFIG_START( honeydol, snowbros_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(57.5)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_SIZE(32*8, 262)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MCFG_SCREEN_UPDATE(honeydol)
|
||||
|
||||
@ -1603,7 +1620,7 @@ static MACHINE_CONFIG_START( twinadv, snowbros_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000) // or 12
|
||||
MCFG_CPU_PROGRAM_MAP(twinadv_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(snowbros_interrupt,3)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", Z80, 4000000)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
@ -1615,7 +1632,7 @@ static MACHINE_CONFIG_START( twinadv, snowbros_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(57.5)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_SIZE(32*8, 262)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MCFG_SCREEN_UPDATE(twinadv)
|
||||
|
||||
@ -1681,7 +1698,7 @@ static MACHINE_CONFIG_START( snowbro3, snowbros_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16mhz or 12mhz ? */
|
||||
MCFG_CPU_PROGRAM_MAP(snowbros3_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(snowbro3_interrupt,3)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros3_irq, "screen", 0, 1)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -145,7 +145,6 @@ NEP-16
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/ymz280b.h"
|
||||
#include "cpu/sh2/sh2.h"
|
||||
#include "machine/nvram.h"
|
||||
@ -317,7 +316,7 @@ static WRITE32_HANDLER ( skns_hit2_w )
|
||||
case 'A':
|
||||
if (data < 2) hit.disconnect= 0;
|
||||
break;
|
||||
// unknow country id, unlock per default
|
||||
// unknown country id, unlock per default
|
||||
default:
|
||||
hit.disconnect= 0;
|
||||
break;
|
||||
@ -438,19 +437,15 @@ static MACHINE_RESET(skns)
|
||||
}
|
||||
|
||||
|
||||
static INTERRUPT_GEN(skns_interrupt)
|
||||
static TIMER_DEVICE_CALLBACK(skns_irq)
|
||||
{
|
||||
UINT8 interrupt = 5;
|
||||
switch(cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
interrupt = 5; // VBLANK
|
||||
break;
|
||||
case 1:
|
||||
interrupt = 1; // SPC
|
||||
break;
|
||||
}
|
||||
device_set_input_line(device,interrupt,HOLD_LINE);
|
||||
skns_state *state = timer.machine().driver_data<skns_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
device_set_input_line(state->m_maincpu,5,HOLD_LINE); //vblank
|
||||
else if(scanline == 0)
|
||||
device_set_input_line(state->m_maincpu,1,HOLD_LINE); // spc
|
||||
}
|
||||
|
||||
/**********************************************************************************
|
||||
@ -815,7 +810,7 @@ static const ymz280b_interface ymz280b_intf =
|
||||
static MACHINE_CONFIG_START( skns, skns_state )
|
||||
MCFG_CPU_ADD("maincpu", SH2,28638000)
|
||||
MCFG_CPU_PROGRAM_MAP(skns_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(skns_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", skns_irq, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_RESET(skns)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
@ -833,7 +828,7 @@ static MACHINE_CONFIG_START( skns, skns_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(59.5971) // measured by Guru
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||
MCFG_SCREEN_SIZE(320,240)
|
||||
MCFG_SCREEN_SIZE(340,262)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0,319,0,239)
|
||||
MCFG_SCREEN_UPDATE(skns)
|
||||
MCFG_SCREEN_EOF(skns)
|
||||
|
@ -3,7 +3,8 @@ class pgm_state : public driver_device
|
||||
{
|
||||
public:
|
||||
pgm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag) { }
|
||||
: driver_device(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
/* memory pointers */
|
||||
// UINT16 * m_mainram; // currently this is also used by nvram handler
|
||||
@ -80,6 +81,7 @@ public:
|
||||
system_time m_systime;
|
||||
|
||||
/* devices */
|
||||
cpu_device *m_maincpu;
|
||||
cpu_device *m_soundcpu;
|
||||
cpu_device *m_prot;
|
||||
device_t *m_ics;
|
||||
|
@ -2,7 +2,9 @@ class shaolins_state : public driver_device
|
||||
{
|
||||
public:
|
||||
shaolins_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")
|
||||
{ }
|
||||
|
||||
size_t m_spriteram_size;
|
||||
UINT8 *m_spriteram;
|
||||
@ -12,6 +14,8 @@ public:
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
UINT8 m_nmi_enable;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -4,7 +4,9 @@ class snowbros_state : public driver_device
|
||||
{
|
||||
public:
|
||||
snowbros_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_hyperpac_ram;
|
||||
int m_sb3_music_is_playing;
|
||||
@ -13,5 +15,7 @@ public:
|
||||
UINT8 *m_spriteram;
|
||||
UINT16 *m_bootleg_spriteram16;
|
||||
size_t m_spriteram_size;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,9 @@ class skns_state : public driver_device
|
||||
{
|
||||
public:
|
||||
skns_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")
|
||||
{ }
|
||||
|
||||
sknsspr_device* m_spritegen;
|
||||
UINT32 *m_tilemapA_ram;
|
||||
@ -63,6 +65,8 @@ public:
|
||||
tilemap_t *m_tilemap_B;
|
||||
|
||||
UINT8 m_region;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user