More deprecat.h ...

This commit is contained in:
Angelo Salese 2011-05-01 21:15:18 +00:00
parent 660971ca6e
commit bbc5d4056c
4 changed files with 52 additions and 76 deletions

View File

@ -85,7 +85,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 "audio/seibu.h"
@ -105,34 +104,6 @@ public:
};
#if 0
static void ar_coin_hack(running_machine &machine)
{
cshooter_state *state = machine.driver_data<cshooter_state>();
if(input_port_read(machine, "COIN") & 1)
{
if(state->m_coin_stat==0)
{
state->m_coin_stat=1;
if(state->m_mainram[0]==0)
{
state->m_mainram[0]=0x80;
}
state->m_mainram[0x234]++;
}
}
else
{
state->m_coin_stat=0;
}
}
#endif
static TILE_GET_INFO( get_cstx_tile_info )
{
cshooter_state *state = machine.driver_data<cshooter_state>();
@ -215,20 +186,19 @@ static SCREEN_UPDATE(cshooter)
/* main cpu */
static INTERRUPT_GEN( cshooter_interrupt )
static TIMER_DEVICE_CALLBACK( cshooter_scanline )
{
//cshooter_state *state = device->machine().driver_data<cshooter_state>();
if(cpu_getiloops(device))
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x08);
else
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x10);
int scanline = param;
// if(state->m_mainram!=NULL)
// ar_coin_hack(device->machine());
if(scanline == 240) // vblank-out irq
cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x10); /* RST 10h */
if(scanline == 0) // vblank-in irq
cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x08); /* RST 08h */
}
static MACHINE_RESET( cshooter )
{
cshooter_state *state = machine.driver_data<cshooter_state>();
@ -456,7 +426,7 @@ GFXDECODE_END
static MACHINE_CONFIG_START( cshooter, cshooter_state )
MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(cshooter_map)
MCFG_CPU_VBLANK_INT_HACK(cshooter_interrupt,2)
MCFG_TIMER_ADD_SCANLINE("scantimer", cshooter_scanline, "screen", 0, 1)
MCFG_CPU_ADD("audiocpu", Z80,XTAL_14_31818MHz/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map)
@ -485,7 +455,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( airraid, cshooter_state )
MCFG_CPU_ADD("maincpu", Z80,XTAL_12MHz/2) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(airraid_map)
MCFG_CPU_VBLANK_INT_HACK(cshooter_interrupt,2)
MCFG_TIMER_ADD_SCANLINE("scantimer", cshooter_scanline, "screen", 0, 1)
SEIBU2_AIRRAID_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verified on pcb */

View File

@ -25,7 +25,6 @@ TODO:
#include "emu.h"
#include "cpu/z80/z80.h"
#include "deprecat.h"
#include "audio/t5182.h"
#include "includes/darkmist.h"
@ -215,12 +214,15 @@ static GFXDECODE_START( darkmist )
GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0, 16*4 )
GFXDECODE_END
static INTERRUPT_GEN( darkmist_interrupt )
static TIMER_DEVICE_CALLBACK( darkmist_scanline )
{
if(cpu_getiloops(device))
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x08);
else
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0x10);
int scanline = param;
if(scanline == 240) // vblank-out irq
cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x10); /* RST 10h */
if(scanline == 0) // vblank-in irq
cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0x08); /* RST 08h */
}
@ -229,7 +231,7 @@ static MACHINE_CONFIG_START( darkmist, darkmist_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */
MCFG_CPU_PROGRAM_MAP(memmap)
MCFG_CPU_VBLANK_INT_HACK(darkmist_interrupt,2)
MCFG_TIMER_ADD_SCANLINE("scantimer", darkmist_scanline, "screen", 0, 1)
MCFG_CPU_ADD(CPUTAG_T5182,Z80,14318180/4) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(t5182_map)

View File

@ -51,31 +51,25 @@ Notes:
*/
#include "emu.h"
#include "deprecat.h"
#include "video/konicdev.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "includes/dbz.h"
#include "video/konicdev.h"
static INTERRUPT_GEN( dbz_interrupt )
static TIMER_DEVICE_CALLBACK( dbz_scanline )
{
dbz_state *state = device->machine().driver_data<dbz_state>();
dbz_state *state = timer.machine().driver_data<dbz_state>();
int scanline = param;
switch (cpu_getiloops(device))
{
case 0:
device_set_input_line(device, M68K_IRQ_2, HOLD_LINE);
break;
if(scanline == 256) // vblank-out irq
cputag_set_input_line(timer.machine(), "maincpu", M68K_IRQ_2, HOLD_LINE);
case 1:
if (k053246_is_irq_enabled(state->m_k053246))
device_set_input_line(device, M68K_IRQ_4, HOLD_LINE);
break;
}
if(scanline == 0 && k053246_is_irq_enabled(state->m_k053246)) // vblank-in irq
cputag_set_input_line(timer.machine(), "maincpu", M68K_IRQ_4, HOLD_LINE);
}
#if 0
@ -117,10 +111,7 @@ static void dbz_sound_irq( device_t *device, int irq )
{
dbz_state *state = device->machine().driver_data<dbz_state>();
if (irq)
device_set_input_line(state->m_audiocpu, 0, ASSERT_LINE);
else
device_set_input_line(state->m_audiocpu, 0, CLEAR_LINE);
device_set_input_line(state->m_audiocpu, 0, (irq) ? ASSERT_LINE : CLEAR_LINE);
}
static ADDRESS_MAP_START( dbz_map, AS_PROGRAM, 16 )
@ -374,7 +365,7 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 16000000)
MCFG_CPU_PROGRAM_MAP(dbz_map)
MCFG_CPU_VBLANK_INT_HACK(dbz_interrupt,2)
MCFG_TIMER_ADD_SCANLINE("scantimer", dbz_scanline, "screen", 0, 1)
MCFG_CPU_ADD("audiocpu", Z80, 4000000)
MCFG_CPU_PROGRAM_MAP(dbz_sound_map)
@ -390,7 +381,7 @@ static MACHINE_CONFIG_START( dbz, dbz_state )
MCFG_SCREEN_REFRESH_RATE(55)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MCFG_SCREEN_SIZE(64*8, 32*8)
MCFG_SCREEN_SIZE(64*8, 40*8)
MCFG_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 32*8-1)
MCFG_SCREEN_UPDATE(dbz)

View File

@ -38,7 +38,6 @@ Dip locations and factory settings verified with US manual
#include "emu.h"
#include "cpu/nec/nec.h"
#include "deprecat.h"
#include "audio/seibu.h"
#include "sound/2203intf.h"
#include "sound/msm5205.h"
@ -207,12 +206,26 @@ GFXDECODE_END
/* Interrupt Generators */
static INTERRUPT_GEN( deadang_interrupt )
static TIMER_DEVICE_CALLBACK( deadang_main_scanline )
{
if (cpu_getiloops(device))
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xc8/4); /* VBL */
else
device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xc4/4); /* VBL */
int scanline = param;
if(scanline == 240) // vblank-out irq
cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xc4/4);
if(scanline == 0) // vblank-in irq
cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xc8/4);
}
static TIMER_DEVICE_CALLBACK( deadang_sub_scanline )
{
int scanline = param;
if(scanline == 240) // vblank-out irq
cputag_set_input_line_and_vector(timer.machine(), "sub", 0, HOLD_LINE,0xc4/4);
if(scanline == 0) // vblank-in irq
cputag_set_input_line_and_vector(timer.machine(), "sub", 0, HOLD_LINE,0xc8/4);
}
/* Machine Drivers */
@ -222,11 +235,11 @@ static MACHINE_CONFIG_START( deadang, deadang_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", V30,XTAL_16MHz/2) /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT_HACK(deadang_interrupt,2)
MCFG_TIMER_ADD_SCANLINE("scantimer1", deadang_main_scanline, "screen", 0, 1)
MCFG_CPU_ADD("sub", V30,XTAL_16MHz/2) /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */
MCFG_CPU_PROGRAM_MAP(sub_map)
MCFG_CPU_VBLANK_INT_HACK(deadang_interrupt,2)
MCFG_TIMER_ADD_SCANLINE("scantimer2", deadang_sub_scanline, "screen", 0, 1)
SEIBU3A_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4)