mirror of
https://github.com/holub/mame
synced 2025-05-17 19:24:59 +03:00
deprecat.h
This commit is contained in:
parent
c1840ddce9
commit
8f067c9bbf
@ -160,7 +160,6 @@ Notes:
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "includes/namcona1.h"
|
#include "includes/namcona1.h"
|
||||||
#include "sound/c140.h"
|
#include "sound/c140.h"
|
||||||
#include "cpu/m37710/m37710.h"
|
#include "cpu/m37710/m37710.h"
|
||||||
|
@ -40,7 +40,6 @@ So this is the correct behavior of real hardware, not an emulation bug.
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
#include "sound/2151intf.h"
|
#include "sound/2151intf.h"
|
||||||
@ -61,42 +60,44 @@ static INTERRUPT_GEN( nemesis_interrupt )
|
|||||||
device_set_input_line(device, 1, HOLD_LINE);
|
device_set_input_line(device, 1, HOLD_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( konamigt_interrupt )
|
static TIMER_DEVICE_CALLBACK( konamigt_interrupt )
|
||||||
{
|
{
|
||||||
nemesis_state *state = device->machine().driver_data<nemesis_state>();
|
nemesis_state *state = timer.machine().driver_data<nemesis_state>();
|
||||||
|
int scanline = param;
|
||||||
|
|
||||||
if (cpu_getiloops(device) == 0)
|
if(scanline == 240)
|
||||||
{
|
{
|
||||||
if ((state->m_irq_on) && (state->m_gx400_irq1_cnt++ & 1))
|
if ((state->m_irq_on) && ((timer.machine().primary_screen->frame_number() & 1) == 0))
|
||||||
device_set_input_line(device, 1, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||||
}
|
}
|
||||||
else
|
else if(scanline == 0)
|
||||||
{
|
{
|
||||||
if (state->m_irq2_on)
|
if (state->m_irq2_on)
|
||||||
device_set_input_line(device, 2, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( gx400_interrupt )
|
static TIMER_DEVICE_CALLBACK( gx400_interrupt )
|
||||||
{
|
{
|
||||||
nemesis_state *state = device->machine().driver_data<nemesis_state>();
|
nemesis_state *state = timer.machine().driver_data<nemesis_state>();
|
||||||
|
int scanline = param;
|
||||||
|
|
||||||
switch (cpu_getiloops(device))
|
if(scanline == 240)
|
||||||
|
{
|
||||||
|
if ((state->m_irq_on) && ((timer.machine().primary_screen->frame_number() & 1) == 0))
|
||||||
|
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(scanline == 0)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
if (state->m_irq2_on)
|
if (state->m_irq2_on)
|
||||||
device_set_input_line(device, 2, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||||
break;
|
}
|
||||||
|
|
||||||
case 1:
|
if(scanline == 120)
|
||||||
if ((state->m_irq1_on) && (state->m_gx400_irq1_cnt++ & 1))
|
{
|
||||||
device_set_input_line(device, 1, HOLD_LINE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
if (state->m_irq4_on)
|
if (state->m_irq4_on)
|
||||||
device_set_input_line(device, 4, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1735,7 +1736,7 @@ static MACHINE_CONFIG_START( gx400, nemesis_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(gx400_map)
|
MCFG_CPU_PROGRAM_MAP(gx400_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
|
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
|
||||||
@ -1782,7 +1783,7 @@ static MACHINE_CONFIG_START( konamigt, nemesis_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
|
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
|
||||||
MCFG_CPU_PROGRAM_MAP(konamigt_map)
|
MCFG_CPU_PROGRAM_MAP(konamigt_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(konamigt_interrupt,2)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", konamigt_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||||
@ -1825,7 +1826,7 @@ static MACHINE_CONFIG_START( rf2_gx400, nemesis_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(rf2_gx400_map)
|
MCFG_CPU_PROGRAM_MAP(rf2_gx400_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
|
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
|
||||||
@ -2068,7 +2069,7 @@ static MACHINE_CONFIG_START( hcrash, nemesis_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000,18432000/3) /* 6.144MHz */
|
MCFG_CPU_ADD("maincpu", M68000,18432000/3) /* 6.144MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(hcrash_map)
|
MCFG_CPU_PROGRAM_MAP(hcrash_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(konamigt_interrupt,2)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", konamigt_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(sal_sound_map)
|
MCFG_CPU_PROGRAM_MAP(sal_sound_map)
|
||||||
@ -2817,7 +2818,7 @@ static MACHINE_CONFIG_START( bubsys, nemesis_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(gx400_map)
|
MCFG_CPU_PROGRAM_MAP(gx400_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
|
// MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1)
|
||||||
MCFG_DEVICE_DISABLE()
|
MCFG_DEVICE_DISABLE()
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "sound/speaker.h"
|
#include "sound/speaker.h"
|
||||||
|
|
||||||
@ -18,13 +17,17 @@ class photon2_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
photon2_state(const machine_config &mconfig, device_type type, const char *tag)
|
photon2_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_spectrum_video_ram;
|
UINT8 *m_spectrum_video_ram;
|
||||||
int m_spectrum_frame_number;
|
int m_spectrum_frame_number;
|
||||||
int m_spectrum_flash_invert;
|
int m_spectrum_flash_invert;
|
||||||
UINT8 m_spectrum_port_fe;
|
UINT8 m_spectrum_port_fe;
|
||||||
UINT8 m_nmi_enable;
|
UINT8 m_nmi_enable;
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -283,18 +286,20 @@ INPUT_PORTS_END
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INTERRUPT_GEN( spec_interrupt_hack )
|
static TIMER_DEVICE_CALLBACK( spec_interrupt_hack )
|
||||||
{
|
{
|
||||||
photon2_state *state = device->machine().driver_data<photon2_state>();
|
photon2_state *state = timer.machine().driver_data<photon2_state>();
|
||||||
if (cpu_getiloops(device) == 1)
|
int scanline = param;
|
||||||
|
|
||||||
|
if (scanline == SPEC_SCREEN_HEIGHT/2)
|
||||||
{
|
{
|
||||||
device_set_input_line(device, 0, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||||
}
|
}
|
||||||
else
|
else if(scanline == 0)
|
||||||
{
|
{
|
||||||
if ( state->m_nmi_enable )
|
if ( state->m_nmi_enable )
|
||||||
{
|
{
|
||||||
cputag_set_input_line(device->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
|
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -309,7 +314,7 @@ static MACHINE_CONFIG_START( photon2, photon2_state )
|
|||||||
MCFG_CPU_ADD("maincpu", Z80, 3500000) /* 3.5 MHz */
|
MCFG_CPU_ADD("maincpu", Z80, 3500000) /* 3.5 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(spectrum_mem)
|
MCFG_CPU_PROGRAM_MAP(spectrum_mem)
|
||||||
MCFG_CPU_IO_MAP(spectrum_io)
|
MCFG_CPU_IO_MAP(spectrum_io)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(spec_interrupt_hack, 2)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", spec_interrupt_hack, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_MACHINE_RESET( photon2 )
|
MCFG_MACHINE_RESET( photon2 )
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ Ping Pong (c) 1985 Konami
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "sound/sn76496.h"
|
#include "sound/sn76496.h"
|
||||||
#include "machine/nvram.h"
|
#include "machine/nvram.h"
|
||||||
#include "includes/pingpong.h"
|
#include "includes/pingpong.h"
|
||||||
@ -18,32 +17,15 @@ static WRITE8_HANDLER( cashquiz_question_bank_high_w )
|
|||||||
pingpong_state *state = space->machine().driver_data<pingpong_state>();
|
pingpong_state *state = space->machine().driver_data<pingpong_state>();
|
||||||
if( data != 0xff )
|
if( data != 0xff )
|
||||||
{
|
{
|
||||||
switch( ~data & 0xff )
|
int i;
|
||||||
|
|
||||||
|
for(i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
case 0x01:
|
if((~data & 0xff) == 1 << i)
|
||||||
state->m_question_addr_high = 0;
|
{
|
||||||
break;
|
state->m_question_addr_high = i*0x8000;
|
||||||
case 0x02:
|
return;
|
||||||
state->m_question_addr_high = 0x8000;
|
}
|
||||||
break;
|
|
||||||
case 0x04:
|
|
||||||
state->m_question_addr_high = 0x10000;
|
|
||||||
break;
|
|
||||||
case 0x08:
|
|
||||||
state->m_question_addr_high = 0x18000;
|
|
||||||
break;
|
|
||||||
case 0x10:
|
|
||||||
state->m_question_addr_high = 0x20000;
|
|
||||||
break;
|
|
||||||
case 0x20:
|
|
||||||
state->m_question_addr_high = 0x28000;
|
|
||||||
break;
|
|
||||||
case 0x40:
|
|
||||||
state->m_question_addr_high = 0x30000;
|
|
||||||
break;
|
|
||||||
case 0x80:
|
|
||||||
state->m_question_addr_high = 0x38000;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,16 +58,33 @@ static WRITE8_HANDLER( coin_w )
|
|||||||
/* other bits unknown */
|
/* other bits unknown */
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( pingpong_interrupt )
|
static TIMER_DEVICE_CALLBACK( pingpong_interrupt )
|
||||||
{
|
{
|
||||||
pingpong_state *state = device->machine().driver_data<pingpong_state>();
|
pingpong_state *state = timer.machine().driver_data<pingpong_state>();
|
||||||
if (cpu_getiloops(device) == 0)
|
int scanline = param;
|
||||||
|
|
||||||
|
if (scanline == 240)
|
||||||
{
|
{
|
||||||
if (state->m_intenable & 0x04) device_set_input_line(device, 0, HOLD_LINE);
|
if (state->m_intenable & 0x04) device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||||
}
|
}
|
||||||
else if (cpu_getiloops(device) % 2)
|
else if ((scanline % 32) == 0)
|
||||||
{
|
{
|
||||||
if (state->m_intenable & 0x08) device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
if (state->m_intenable & 0x08) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static TIMER_DEVICE_CALLBACK( merlinmm_interrupt )
|
||||||
|
{
|
||||||
|
pingpong_state *state = timer.machine().driver_data<pingpong_state>();
|
||||||
|
int scanline = param;
|
||||||
|
|
||||||
|
if (scanline == 240)
|
||||||
|
{
|
||||||
|
if (state->m_intenable & 0x04) device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||||
|
}
|
||||||
|
else if (scanline == 0)
|
||||||
|
{
|
||||||
|
if (state->m_intenable & 0x08) device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,14 +455,14 @@ static MACHINE_CONFIG_START( pingpong, pingpong_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu",Z80,18432000/6) /* 3.072 MHz (probably) */
|
MCFG_CPU_ADD("maincpu",Z80,18432000/6) /* 3.072 MHz (probably) */
|
||||||
MCFG_CPU_PROGRAM_MAP(pingpong_map)
|
MCFG_CPU_PROGRAM_MAP(pingpong_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(pingpong_interrupt,16) /* 1 IRQ + 8 NMI */
|
MCFG_TIMER_ADD_SCANLINE("scantimer", pingpong_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
MCFG_SCREEN_REFRESH_RATE(60)
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
MCFG_SCREEN_SIZE(456, 262)
|
||||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||||
MCFG_SCREEN_UPDATE(pingpong)
|
MCFG_SCREEN_UPDATE(pingpong)
|
||||||
|
|
||||||
@ -484,7 +483,8 @@ MACHINE_CONFIG_END
|
|||||||
static MACHINE_CONFIG_DERIVED( merlinmm, pingpong )
|
static MACHINE_CONFIG_DERIVED( merlinmm, pingpong )
|
||||||
MCFG_CPU_MODIFY("maincpu")
|
MCFG_CPU_MODIFY("maincpu")
|
||||||
MCFG_CPU_PROGRAM_MAP(merlinmm_map)
|
MCFG_CPU_PROGRAM_MAP(merlinmm_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(pingpong_interrupt,2)
|
MCFG_TIMER_MODIFY("scantimer")
|
||||||
|
MCFG_TIMER_CALLBACK(merlinmm_interrupt)
|
||||||
|
|
||||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
@ -22,7 +22,6 @@ GP1 HDD data contents:
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "machine/idectrl.h"
|
#include "machine/idectrl.h"
|
||||||
#include "sound/k054539.h"
|
#include "sound/k054539.h"
|
||||||
@ -270,22 +269,19 @@ static READ16_HANDLER( gp2_ide_std_r )
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INTERRUPT_GEN(qdrmfgp_interrupt)
|
static TIMER_DEVICE_CALLBACK(qdrmfgp_interrupt)
|
||||||
{
|
{
|
||||||
qdrmfgp_state *state = device->machine().driver_data<qdrmfgp_state>();
|
qdrmfgp_state *state = timer.machine().driver_data<qdrmfgp_state>();
|
||||||
switch (cpu_getiloops(device))
|
int scanline = param;
|
||||||
{
|
|
||||||
case 0:
|
if(scanline == 0)
|
||||||
if (state->m_control & 0x0001)
|
if (state->m_control & 0x0001)
|
||||||
device_set_input_line(device, 1, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
/* trigger V-blank interrupt */
|
/* trigger V-blank interrupt */
|
||||||
|
if(scanline == 240)
|
||||||
if (state->m_control & 0x0004)
|
if (state->m_control & 0x0004)
|
||||||
device_set_input_line(device, 3, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ide_interrupt(device_t *device, int state)
|
static void ide_interrupt(device_t *device, int state)
|
||||||
@ -682,7 +678,7 @@ static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16.000 MHz */
|
MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16.000 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(qdrmfgp_map)
|
MCFG_CPU_PROGRAM_MAP(qdrmfgp_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(qdrmfgp_interrupt, 2)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", qdrmfgp_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_MACHINE_START(qdrmfgp)
|
MCFG_MACHINE_START(qdrmfgp)
|
||||||
MCFG_MACHINE_RESET(qdrmfgp)
|
MCFG_MACHINE_RESET(qdrmfgp)
|
||||||
|
@ -43,7 +43,6 @@ To Do:
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "machine/tmp68301.h"
|
#include "machine/tmp68301.h"
|
||||||
#include "includes/realbrk.h"
|
#include "includes/realbrk.h"
|
||||||
#include "sound/2413intf.h"
|
#include "sound/2413intf.h"
|
||||||
@ -667,13 +666,8 @@ GFXDECODE_END
|
|||||||
|
|
||||||
static INTERRUPT_GEN( realbrk_interrupt )
|
static INTERRUPT_GEN( realbrk_interrupt )
|
||||||
{
|
{
|
||||||
switch ( cpu_getiloops(device) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
/* VBlank is connected to INT1 (external interrupts pin 1) */
|
/* VBlank is connected to INT1 (external interrupts pin 1) */
|
||||||
tmp68301_external_interrupt_1(device->machine());
|
tmp68301_external_interrupt_1(device->machine());
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( realbrk, realbrk_state )
|
static MACHINE_CONFIG_START( realbrk, realbrk_state )
|
||||||
|
@ -101,7 +101,6 @@ $8000 - $ffff ROM
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/m6502/m6502.h"
|
#include "cpu/m6502/m6502.h"
|
||||||
#include "cpu/m6809/m6809.h"
|
#include "cpu/m6809/m6809.h"
|
||||||
#include "cpu/m6805/m6805.h"
|
#include "cpu/m6805/m6805.h"
|
||||||
@ -638,25 +637,15 @@ static WRITE8_HANDLER( bankswitch_w )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( renegade_interrupt )
|
static TIMER_DEVICE_CALLBACK( renegade_interrupt )
|
||||||
{
|
{
|
||||||
#if 0
|
renegade_state *state = timer.machine().driver_data<renegade_state>();
|
||||||
int port = input_port_read(machine, "IN1") & 0xc0;
|
int scanline = param;
|
||||||
if (port != 0xc0)
|
|
||||||
{
|
|
||||||
if (state->m_coin == 0)
|
|
||||||
{
|
|
||||||
state->m_coin = 1;
|
|
||||||
return irq0_line_hold();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else state->m_coin = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (cpu_getiloops(device))
|
if (scanline == 112) // ???
|
||||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
else
|
else if(scanline == 240)
|
||||||
device_set_input_line(device, 0, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE8_HANDLER( renegade_coin_counter_w )
|
static WRITE8_HANDLER( renegade_coin_counter_w )
|
||||||
@ -927,7 +916,7 @@ static MACHINE_CONFIG_START( renegade, renegade_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M6502, 12000000/8) /* 1.5 MHz (measured) */
|
MCFG_CPU_ADD("maincpu", M6502, 12000000/8) /* 1.5 MHz (measured) */
|
||||||
MCFG_CPU_PROGRAM_MAP(renegade_map)
|
MCFG_CPU_PROGRAM_MAP(renegade_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(renegade_interrupt,2)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", renegade_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", M6809, 12000000/8)
|
MCFG_CPU_ADD("audiocpu", M6809, 12000000/8)
|
||||||
MCFG_CPU_PROGRAM_MAP(renegade_sound_map) /* IRQs are caused by the main CPU */
|
MCFG_CPU_PROGRAM_MAP(renegade_sound_map) /* IRQs are caused by the main CPU */
|
||||||
|
@ -13,7 +13,6 @@ driver by Barry Rodewald
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/i8085/i8085.h"
|
#include "cpu/i8085/i8085.h"
|
||||||
|
|
||||||
|
|
||||||
@ -21,10 +20,14 @@ class rotaryf_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
rotaryf_state(const machine_config &mconfig, device_type type, const char *tag)
|
rotaryf_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;
|
UINT8 *m_videoram;
|
||||||
size_t m_videoram_size;
|
size_t m_videoram_size;
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -38,14 +41,17 @@ public:
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INTERRUPT_GEN( rotaryf_interrupt )
|
static TIMER_DEVICE_CALLBACK( rotaryf_interrupt )
|
||||||
{
|
{
|
||||||
if (device->machine().primary_screen->vblank())
|
rotaryf_state *state = timer.machine().driver_data<rotaryf_state>();
|
||||||
device_set_input_line(device, I8085_RST55_LINE, HOLD_LINE);
|
int scanline = param;
|
||||||
else
|
|
||||||
|
if (scanline == 256)
|
||||||
|
device_set_input_line(state->m_maincpu, I8085_RST55_LINE, HOLD_LINE);
|
||||||
|
else if((scanline % 64) == 0)
|
||||||
{
|
{
|
||||||
device_set_input_line(device, I8085_RST75_LINE, ASSERT_LINE);
|
device_set_input_line(state->m_maincpu, I8085_RST75_LINE, ASSERT_LINE);
|
||||||
device_set_input_line(device, I8085_RST75_LINE, CLEAR_LINE);
|
device_set_input_line(state->m_maincpu, I8085_RST75_LINE, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +173,7 @@ static MACHINE_CONFIG_START( rotaryf, rotaryf_state )
|
|||||||
MCFG_CPU_ADD("maincpu",I8085A,4000000) /* ?? MHz */
|
MCFG_CPU_ADD("maincpu",I8085A,4000000) /* ?? MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(rotaryf_map)
|
MCFG_CPU_PROGRAM_MAP(rotaryf_map)
|
||||||
MCFG_CPU_IO_MAP(rotaryf_io_map)
|
MCFG_CPU_IO_MAP(rotaryf_io_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(rotaryf_interrupt,5)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", rotaryf_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "sound/dac.h"
|
#include "sound/dac.h"
|
||||||
#include "sound/sn76477.h"
|
#include "sound/sn76477.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
|
@ -39,7 +39,6 @@ PROMs : NEC B406 (1kx4) x2
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/i8085/i8085.h"
|
#include "cpu/i8085/i8085.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/mcs48/mcs48.h"
|
#include "cpu/mcs48/mcs48.h"
|
||||||
#include "video/resnet.h"
|
#include "video/resnet.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
|
@ -100,7 +100,6 @@ reelquak:
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "memconv.h"
|
#include "memconv.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "includes/seta2.h"
|
#include "includes/seta2.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "machine/tmp68301.h"
|
#include "machine/tmp68301.h"
|
||||||
@ -2004,26 +2003,13 @@ GFXDECODE_END
|
|||||||
|
|
||||||
static INTERRUPT_GEN( seta2_interrupt )
|
static INTERRUPT_GEN( seta2_interrupt )
|
||||||
{
|
{
|
||||||
switch ( cpu_getiloops(device) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
/* VBlank is connected to INT0 (external interrupts pin 0) */
|
/* VBlank is connected to INT0 (external interrupts pin 0) */
|
||||||
tmp68301_external_interrupt_0(device->machine());
|
tmp68301_external_interrupt_0(device->machine());
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( samshoot_interrupt )
|
static INTERRUPT_GEN( samshoot_interrupt )
|
||||||
{
|
{
|
||||||
switch ( cpu_getiloops(device) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
tmp68301_external_interrupt_0(device->machine()); // vblank
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
tmp68301_external_interrupt_2(device->machine()); // to do: hook up x1-10 interrupts
|
tmp68301_external_interrupt_2(device->machine()); // to do: hook up x1-10 interrupts
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const x1_010_interface x1_010_sound_intf =
|
static const x1_010_interface x1_010_sound_intf =
|
||||||
@ -2158,7 +2144,7 @@ MACHINE_CONFIG_END
|
|||||||
static MACHINE_CONFIG_DERIVED( samshoot, seta2 )
|
static MACHINE_CONFIG_DERIVED( samshoot, seta2 )
|
||||||
MCFG_CPU_MODIFY("maincpu")
|
MCFG_CPU_MODIFY("maincpu")
|
||||||
MCFG_CPU_PROGRAM_MAP(samshoot_map)
|
MCFG_CPU_PROGRAM_MAP(samshoot_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(samshoot_interrupt,2)
|
MCFG_CPU_PERIODIC_INT(samshoot_interrupt,60)
|
||||||
|
|
||||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||||
|
|
||||||
@ -2172,13 +2158,16 @@ MACHINE_CONFIG_END
|
|||||||
Funcube
|
Funcube
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static INTERRUPT_GEN( funcube_interrupt )
|
static TIMER_DEVICE_CALLBACK( funcube_interrupt )
|
||||||
{
|
{
|
||||||
switch ( cpu_getiloops(device) )
|
seta2_state *state = timer.machine().driver_data<seta2_state>();
|
||||||
{
|
int scanline = param;
|
||||||
case 1: device_set_input_line(device, 2, HOLD_LINE); break;
|
|
||||||
case 0: device_set_input_line(device, 1, HOLD_LINE); break;
|
if(scanline == 368)
|
||||||
}
|
device_set_input_line(state->m_maincpu, 1, HOLD_LINE);
|
||||||
|
|
||||||
|
if(scanline == 0)
|
||||||
|
device_set_input_line(state->m_maincpu, 2, HOLD_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( funcube_sub_timer_irq )
|
static INTERRUPT_GEN( funcube_sub_timer_irq )
|
||||||
@ -2222,7 +2211,7 @@ static MACHINE_CONFIG_START( funcube, seta2_state )
|
|||||||
|
|
||||||
MCFG_CPU_ADD("maincpu", MCF5206E, XTAL_25_447MHz)
|
MCFG_CPU_ADD("maincpu", MCF5206E, XTAL_25_447MHz)
|
||||||
MCFG_CPU_PROGRAM_MAP(funcube_map)
|
MCFG_CPU_PROGRAM_MAP(funcube_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(funcube_interrupt,2)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", funcube_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("sub", H83007, FUNCUBE_SUB_CPU_CLOCK)
|
MCFG_CPU_ADD("sub", H83007, FUNCUBE_SUB_CPU_CLOCK)
|
||||||
MCFG_CPU_PROGRAM_MAP(funcube_sub_map)
|
MCFG_CPU_PROGRAM_MAP(funcube_sub_map)
|
||||||
|
@ -264,7 +264,6 @@ Stephh's notes (based on the games Z80 code and some tests) :
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/m6805/m6805.h"
|
#include "cpu/m6805/m6805.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
#include "includes/slapfght.h"
|
#include "includes/slapfght.h"
|
||||||
@ -760,7 +759,7 @@ static MACHINE_CONFIG_START( perfrman, slapfght_state )
|
|||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,16000000/8) /* 2MHz ???, 16MHz Oscillator */
|
MCFG_CPU_ADD("audiocpu", Z80,16000000/8) /* 2MHz ???, 16MHz Oscillator */
|
||||||
MCFG_CPU_PROGRAM_MAP(perfrman_sound_map)
|
MCFG_CPU_PROGRAM_MAP(perfrman_sound_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(getstar_interrupt,4) /* music speed, verified */
|
MCFG_CPU_PERIODIC_INT(getstar_interrupt,4*60) /* music speed, verified */
|
||||||
|
|
||||||
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
|
MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
|
||||||
|
|
||||||
@ -903,7 +902,7 @@ static MACHINE_CONFIG_START( slapfigh, slapfght_state )
|
|||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_36MHz/12) /* verified on pcb */
|
MCFG_CPU_ADD("audiocpu", Z80, XTAL_36MHz/12) /* verified on pcb */
|
||||||
MCFG_CPU_PROGRAM_MAP(slapfght_sound_map)
|
MCFG_CPU_PROGRAM_MAP(slapfght_sound_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(getstar_interrupt, 3)
|
MCFG_CPU_PERIODIC_INT(getstar_interrupt, 3*60)
|
||||||
|
|
||||||
MCFG_CPU_ADD("mcu", M68705, XTAL_36MHz/12) /* verified on pcb */
|
MCFG_CPU_ADD("mcu", M68705, XTAL_36MHz/12) /* verified on pcb */
|
||||||
MCFG_CPU_PROGRAM_MAP(slapfight_m68705_map)
|
MCFG_CPU_PROGRAM_MAP(slapfight_m68705_map)
|
||||||
|
@ -281,7 +281,6 @@ Stephh's notes (based on the games M6502 code and some tests) :
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/m6502/m6502.h"
|
#include "cpu/m6502/m6502.h"
|
||||||
#include "video/mc6845.h"
|
#include "video/mc6845.h"
|
||||||
#include "sound/sn76477.h"
|
#include "sound/sn76477.h"
|
||||||
@ -446,6 +445,11 @@ ADDRESS_MAP_END
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
|
static INPUT_CHANGED( coin_inserted )
|
||||||
|
{
|
||||||
|
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
|
||||||
|
}
|
||||||
|
|
||||||
static INPUT_PORTS_START( snk6502_generic_joy8way )
|
static INPUT_PORTS_START( snk6502_generic_joy8way )
|
||||||
PORT_START("IN0")
|
PORT_START("IN0")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||||
@ -468,8 +472,8 @@ static INPUT_PORTS_START( snk6502_generic_joy8way )
|
|||||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||||
|
|
||||||
PORT_START("IN2")
|
PORT_START("IN2")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||||
@ -519,7 +523,7 @@ static INPUT_PORTS_START( satansat )
|
|||||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk6502_music0_r, NULL) /* music0 playing */
|
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk6502_music0_r, NULL) /* music0 playing */
|
||||||
|
|
||||||
PORT_START("IN2")
|
PORT_START("IN2")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
|
||||||
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* NC */
|
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* NC */
|
||||||
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sasuke_count_r, NULL) /* connected to a binary counter */
|
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sasuke_count_r, NULL) /* connected to a binary counter */
|
||||||
|
|
||||||
@ -743,34 +747,12 @@ static INTERRUPT_GEN( satansat_interrupt )
|
|||||||
{
|
{
|
||||||
snk6502_state *state = device->machine().driver_data<snk6502_state>();
|
snk6502_state *state = device->machine().driver_data<snk6502_state>();
|
||||||
|
|
||||||
if (cpu_getiloops(device) != 0)
|
if(state->m_irq_mask)
|
||||||
{
|
|
||||||
UINT8 val = input_port_read(device->machine(), "IN2"); /* TODO: use CUSTOM_INPUT */
|
|
||||||
|
|
||||||
coin_counter_w(device->machine(), 0, val & 1);
|
|
||||||
|
|
||||||
/* user asks to insert coin: generate a NMI interrupt. */
|
|
||||||
if (val & 0x01)
|
|
||||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
|
||||||
}
|
|
||||||
else if(state->m_irq_mask)
|
|
||||||
device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */
|
device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( snk6502_interrupt )
|
static INTERRUPT_GEN( snk6502_interrupt )
|
||||||
{
|
{
|
||||||
if (cpu_getiloops(device) != 0)
|
|
||||||
{
|
|
||||||
UINT8 val = input_port_read(device->machine(), "IN2"); /* TODO: use CUSTOM_INPUT */
|
|
||||||
|
|
||||||
coin_counter_w(device->machine(), 0, val & 1);
|
|
||||||
coin_counter_w(device->machine(), 1, val & 2);
|
|
||||||
|
|
||||||
/* user asks to insert coin: generate a NMI interrupt. */
|
|
||||||
if (val & 0x03)
|
|
||||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */
|
device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,7 +827,7 @@ static MACHINE_CONFIG_START( sasuke, snk6502_state )
|
|||||||
// basic machine hardware
|
// basic machine hardware
|
||||||
MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 16) // 700 kHz
|
MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 16) // 700 kHz
|
||||||
MCFG_CPU_PROGRAM_MAP(sasuke_map)
|
MCFG_CPU_PROGRAM_MAP(sasuke_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(satansat_interrupt, 2)
|
MCFG_CPU_VBLANK_INT("screen",satansat_interrupt)
|
||||||
|
|
||||||
MCFG_MACHINE_RESET(sasuke)
|
MCFG_MACHINE_RESET(sasuke)
|
||||||
|
|
||||||
@ -921,7 +903,7 @@ static MACHINE_CONFIG_START( vanguard, snk6502_state )
|
|||||||
//MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 8) // 1.4 MHz
|
//MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK / 8) // 1.4 MHz
|
||||||
MCFG_CPU_ADD("maincpu", M6502, 930000) // adjusted
|
MCFG_CPU_ADD("maincpu", M6502, 930000) // adjusted
|
||||||
MCFG_CPU_PROGRAM_MAP(vanguard_map)
|
MCFG_CPU_PROGRAM_MAP(vanguard_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(snk6502_interrupt, 2)
|
MCFG_CPU_VBLANK_INT("screen",snk6502_interrupt)
|
||||||
|
|
||||||
MCFG_MACHINE_RESET(vanguard)
|
MCFG_MACHINE_RESET(vanguard)
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ OSC : 8.0000MHz(X1) 21.477 MHz(X2) 384kHz(X3)
|
|||||||
#include "sound/2203intf.h"
|
#include "sound/2203intf.h"
|
||||||
#include "sound/msm5205.h"
|
#include "sound/msm5205.h"
|
||||||
#include "video/v9938.h"
|
#include "video/v9938.h"
|
||||||
#include "deprecat.h"
|
|
||||||
|
|
||||||
|
|
||||||
class sothello_state : public driver_device
|
class sothello_state : public driver_device
|
||||||
@ -317,9 +316,9 @@ static void sothello_vdp_interrupt(running_machine &machine, int i)
|
|||||||
cputag_set_input_line(machine, "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
|
cputag_set_input_line(machine, "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( sothello_interrupt )
|
static TIMER_DEVICE_CALLBACK( sothello_interrupt )
|
||||||
{
|
{
|
||||||
v9938_interrupt(device->machine(), 0);
|
v9938_interrupt(timer.machine(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void adpcm_int(device_t *device)
|
static void adpcm_int(device_t *device)
|
||||||
@ -369,7 +368,7 @@ static MACHINE_CONFIG_START( sothello, sothello_state )
|
|||||||
MCFG_CPU_ADD("maincpu",Z80, MAINCPU_CLOCK)
|
MCFG_CPU_ADD("maincpu",Z80, MAINCPU_CLOCK)
|
||||||
MCFG_CPU_PROGRAM_MAP(maincpu_mem_map)
|
MCFG_CPU_PROGRAM_MAP(maincpu_mem_map)
|
||||||
MCFG_CPU_IO_MAP(maincpu_io_map)
|
MCFG_CPU_IO_MAP(maincpu_io_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(sothello_interrupt,262)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", sothello_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("soundcpu",Z80, SOUNDCPU_CLOCK)
|
MCFG_CPU_ADD("soundcpu",Z80, SOUNDCPU_CLOCK)
|
||||||
MCFG_CPU_PROGRAM_MAP(soundcpu_mem_map)
|
MCFG_CPU_PROGRAM_MAP(soundcpu_mem_map)
|
||||||
|
@ -23,7 +23,6 @@ Notes:
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/m6502/m6502.h"
|
#include "cpu/m6502/m6502.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/m6809/m6809.h"
|
#include "cpu/m6809/m6809.h"
|
||||||
#include "sound/3812intf.h"
|
#include "sound/3812intf.h"
|
||||||
#include "sound/msm5205.h"
|
#include "sound/msm5205.h"
|
||||||
@ -419,18 +418,15 @@ static MACHINE_CONFIG_START( spdodgeb, spdodgeb_state )
|
|||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M6502,12000000/6) /* 2MHz ? */
|
MCFG_CPU_ADD("maincpu", M6502,12000000/6) /* 2MHz ? */
|
||||||
MCFG_CPU_PROGRAM_MAP(spdodgeb_map)
|
MCFG_CPU_PROGRAM_MAP(spdodgeb_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(spdodgeb_interrupt,33) /* 1 IRQ every 8 visible scanlines, plus NMI for vblank */
|
MCFG_TIMER_ADD_SCANLINE("scantimer", spdodgeb_interrupt, "screen", 0, 1) /* 1 IRQ every 8 visible scanlines, plus NMI for vblank */
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", M6809,12000000/6) /* 2MHz ? */
|
MCFG_CPU_ADD("audiocpu", M6809,12000000/6) /* 2MHz ? */
|
||||||
MCFG_CPU_PROGRAM_MAP(spdodgeb_sound_map)
|
MCFG_CPU_PROGRAM_MAP(spdodgeb_sound_map)
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
MCFG_SCREEN_RAW_PARAMS(12000000/2, 384, 0, 256, 272, 0, 240)
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(500) /* not accurate */)
|
|
||||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
|
||||||
MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 1*8, 31*8-1)
|
|
||||||
MCFG_SCREEN_UPDATE(spdodgeb)
|
MCFG_SCREEN_UPDATE(spdodgeb)
|
||||||
|
|
||||||
MCFG_GFXDECODE(spdodgeb)
|
MCFG_GFXDECODE(spdodgeb)
|
||||||
|
@ -56,7 +56,6 @@ Notes:
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "sound/sn76496.h"
|
#include "sound/sn76496.h"
|
||||||
#include "includes/sprcros2.h"
|
#include "includes/sprcros2.h"
|
||||||
|
|
||||||
@ -231,19 +230,20 @@ static GFXDECODE_START( sprcros2 )
|
|||||||
GFXDECODE_ENTRY( "gfx3", 0, sprcros2_fglayout, 512, 64 )
|
GFXDECODE_ENTRY( "gfx3", 0, sprcros2_fglayout, 512, 64 )
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
static INTERRUPT_GEN( sprcros2_m_interrupt )
|
static TIMER_DEVICE_CALLBACK( sprcros2_m_interrupt )
|
||||||
{
|
{
|
||||||
sprcros2_state *state = device->machine().driver_data<sprcros2_state>();
|
sprcros2_state *state = timer.machine().driver_data<sprcros2_state>();
|
||||||
|
int scanline = param;
|
||||||
|
|
||||||
if (cpu_getiloops(device) == 0)
|
if (scanline == 240)
|
||||||
{
|
{
|
||||||
if(state->m_port7&0x01)
|
if(state->m_port7&0x01)
|
||||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
device_set_input_line(state->m_master, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
}
|
}
|
||||||
else
|
else if(scanline == 0)
|
||||||
{
|
{
|
||||||
if(state->m_port7&0x08)
|
if(state->m_port7&0x08)
|
||||||
device_set_input_line(device, 0, HOLD_LINE);
|
device_set_input_line(state->m_master, 0, HOLD_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,12 +269,12 @@ static MACHINE_CONFIG_START( sprcros2, sprcros2_state )
|
|||||||
MCFG_CPU_ADD("master", Z80,10000000/2)
|
MCFG_CPU_ADD("master", Z80,10000000/2)
|
||||||
MCFG_CPU_PROGRAM_MAP(sprcros2_master_map)
|
MCFG_CPU_PROGRAM_MAP(sprcros2_master_map)
|
||||||
MCFG_CPU_IO_MAP(sprcros2_master_io_map)
|
MCFG_CPU_IO_MAP(sprcros2_master_io_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(sprcros2_m_interrupt,2) //1 nmi + 1 irq
|
MCFG_TIMER_ADD_SCANLINE("scantimer", sprcros2_m_interrupt, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("slave", Z80,10000000/2)
|
MCFG_CPU_ADD("slave", Z80,10000000/2)
|
||||||
MCFG_CPU_PROGRAM_MAP(sprcros2_slave_map)
|
MCFG_CPU_PROGRAM_MAP(sprcros2_slave_map)
|
||||||
MCFG_CPU_IO_MAP(sprcros2_slave_io_map)
|
MCFG_CPU_IO_MAP(sprcros2_slave_io_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(sprcros2_s_interrupt,2) //2 nmis
|
MCFG_CPU_PERIODIC_INT(sprcros2_s_interrupt,2*60) //2 nmis
|
||||||
|
|
||||||
MCFG_MACHINE_START(sprcros2)
|
MCFG_MACHINE_START(sprcros2)
|
||||||
|
|
||||||
|
@ -2,7 +2,9 @@ class pingpong_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
pingpong_state(const machine_config &mconfig, device_type type, const char *tag)
|
pingpong_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_intenable;
|
int m_intenable;
|
||||||
int m_question_addr_high;
|
int m_question_addr_high;
|
||||||
@ -11,6 +13,8 @@ public:
|
|||||||
tilemap_t *m_bg_tilemap;
|
tilemap_t *m_bg_tilemap;
|
||||||
UINT8 *m_spriteram;
|
UINT8 *m_spriteram;
|
||||||
size_t m_spriteram_size;
|
size_t m_spriteram_size;
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,8 +3,11 @@ class qdrmfgp_state : public driver_device
|
|||||||
public:
|
public:
|
||||||
qdrmfgp_state(const machine_config &mconfig, device_type type, const char *tag)
|
qdrmfgp_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_nvram(*this, "nvram") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_nvram(*this, "nvram")
|
||||||
|
{ }
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
required_shared_ptr<UINT8> m_nvram;
|
required_shared_ptr<UINT8> m_nvram;
|
||||||
UINT8 *m_sndram;
|
UINT8 *m_sndram;
|
||||||
UINT16 *m_workram;
|
UINT16 *m_workram;
|
||||||
|
@ -4,7 +4,9 @@ class renegade_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
renegade_state(const machine_config &mconfig, device_type type, const char *tag)
|
renegade_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_bank;
|
UINT8 m_bank;
|
||||||
int m_mcu_sim;
|
int m_mcu_sim;
|
||||||
@ -35,6 +37,8 @@ public:
|
|||||||
tilemap_t *m_bg_tilemap;
|
tilemap_t *m_bg_tilemap;
|
||||||
tilemap_t *m_fg_tilemap;
|
tilemap_t *m_fg_tilemap;
|
||||||
UINT8 *m_spriteram;
|
UINT8 *m_spriteram;
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,8 +3,10 @@ class seta2_state : public driver_device
|
|||||||
public:
|
public:
|
||||||
seta2_state(const machine_config &mconfig, device_type type, const char *tag)
|
seta2_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_nvram(*this, "nvram") { }
|
m_nvram(*this, "nvram") { }
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_shared_ptr<UINT16> m_nvram;
|
optional_shared_ptr<UINT16> m_nvram;
|
||||||
|
|
||||||
UINT16 *m_vregs;
|
UINT16 *m_vregs;
|
||||||
|
@ -2,7 +2,9 @@ class spdodgeb_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
spdodgeb_state(const machine_config &mconfig, device_type type, const char *tag)
|
spdodgeb_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_toggle;
|
||||||
int m_adpcm_pos[2];
|
int m_adpcm_pos[2];
|
||||||
@ -29,6 +31,8 @@ public:
|
|||||||
int m_lastscroll;
|
int m_lastscroll;
|
||||||
UINT8 *m_spriteram;
|
UINT8 *m_spriteram;
|
||||||
size_t m_spriteram_size;
|
size_t m_spriteram_size;
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -37,7 +41,7 @@ public:
|
|||||||
PALETTE_INIT( spdodgeb );
|
PALETTE_INIT( spdodgeb );
|
||||||
VIDEO_START( spdodgeb );
|
VIDEO_START( spdodgeb );
|
||||||
SCREEN_UPDATE( spdodgeb );
|
SCREEN_UPDATE( spdodgeb );
|
||||||
INTERRUPT_GEN( spdodgeb_interrupt );
|
TIMER_DEVICE_CALLBACK( spdodgeb_interrupt );
|
||||||
WRITE8_HANDLER( spdodgeb_scrollx_lo_w );
|
WRITE8_HANDLER( spdodgeb_scrollx_lo_w );
|
||||||
WRITE8_HANDLER( spdodgeb_ctrl_w );
|
WRITE8_HANDLER( spdodgeb_ctrl_w );
|
||||||
WRITE8_HANDLER( spdodgeb_videoram_w );
|
WRITE8_HANDLER( spdodgeb_videoram_w );
|
||||||
|
@ -2,7 +2,10 @@ class sprcros2_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
sprcros2_state(const machine_config &mconfig, device_type type, const char *tag)
|
sprcros2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag) { }
|
: driver_device(mconfig, type, tag),
|
||||||
|
m_master(*this,"master"),
|
||||||
|
m_slave(*this,"slave")
|
||||||
|
{ }
|
||||||
|
|
||||||
UINT8 m_s_port3;
|
UINT8 m_s_port3;
|
||||||
UINT8 m_port7;
|
UINT8 m_port7;
|
||||||
@ -12,6 +15,9 @@ public:
|
|||||||
UINT8 *m_bgvideoram;
|
UINT8 *m_bgvideoram;
|
||||||
UINT8 *m_spriteram;
|
UINT8 *m_spriteram;
|
||||||
size_t m_spriteram_size;
|
size_t m_spriteram_size;
|
||||||
|
|
||||||
|
required_device<cpu_device> m_master;
|
||||||
|
required_device<cpu_device> m_slave;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "deprecat.h"
|
|
||||||
#include "cpu/m6502/m6502.h"
|
#include "cpu/m6502/m6502.h"
|
||||||
#include "includes/spdodgeb.h"
|
#include "includes/spdodgeb.h"
|
||||||
|
|
||||||
@ -84,20 +83,20 @@ VIDEO_START( spdodgeb )
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
INTERRUPT_GEN( spdodgeb_interrupt )
|
TIMER_DEVICE_CALLBACK( spdodgeb_interrupt )
|
||||||
{
|
{
|
||||||
int iloop = cpu_getiloops(device);
|
spdodgeb_state *state = timer.machine().driver_data<spdodgeb_state>();
|
||||||
int scanline = (32-iloop) * 8;
|
int scanline = param;
|
||||||
|
|
||||||
if (iloop > 1 && iloop < 32)
|
if (scanline == 256)
|
||||||
{
|
{
|
||||||
device_set_input_line(device, M6502_IRQ_LINE, HOLD_LINE);
|
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
device->machine().primary_screen->update_partial(scanline+7);
|
timer.machine().primary_screen->update_partial(256);
|
||||||
}
|
}
|
||||||
else if (!iloop)
|
else if ((scanline % 8) == 0)
|
||||||
{
|
{
|
||||||
device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
|
device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
|
||||||
device->machine().primary_screen->update_partial(256);
|
timer.machine().primary_screen->update_partial(scanline+16); /* TODO: pretty off ... */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user