mirror of
https://github.com/holub/mame
synced 2025-05-17 11:15:06 +03:00
deprecat.h
This commit is contained in:
parent
780a2b019c
commit
c9c353c341
@ -24,7 +24,6 @@ Year + Game By Board Hardware
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -740,13 +739,16 @@ GFXDECODE_END
|
||||
Back Street Soccer
|
||||
***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( bssoccer_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( bssoccer_interrupt )
|
||||
{
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0: device_set_input_line(device, 1, HOLD_LINE); break;
|
||||
case 1: device_set_input_line(device, 2, HOLD_LINE); break;
|
||||
}
|
||||
suna16_state *state = timer.machine().driver_data<suna16_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); // does RAM to sprite buffer copy here
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( bssoccer, suna16_state )
|
||||
@ -754,7 +756,7 @@ static MACHINE_CONFIG_START( bssoccer, suna16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 8000000) /* ? */
|
||||
MCFG_CPU_PROGRAM_MAP(bssoccer_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(bssoccer_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bssoccer_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* Z80B */
|
||||
MCFG_CPU_PROGRAM_MAP(bssoccer_sound_map)
|
||||
@ -939,7 +941,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 24000000/4)
|
||||
MCFG_CPU_PROGRAM_MAP(bestbest_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(bssoccer_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", bssoccer_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 24000000/4)
|
||||
MCFG_CPU_PROGRAM_MAP(bestbest_sound_map)
|
||||
|
@ -27,7 +27,6 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/thedeep.h"
|
||||
#include "sound/2203intf.h"
|
||||
|
||||
@ -323,14 +322,16 @@ static const ym2203_interface thedeep_ym2203_intf =
|
||||
irqhandler
|
||||
};
|
||||
|
||||
static INTERRUPT_GEN( thedeep_interrupt )
|
||||
static TIMER_DEVICE_CALLBACK( thedeep_interrupt )
|
||||
{
|
||||
thedeep_state *state = device->machine().driver_data<thedeep_state>();
|
||||
if (cpu_getiloops(device))
|
||||
thedeep_state *state = timer.machine().driver_data<thedeep_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 124) // TODO: clean this
|
||||
{
|
||||
if (state->m_protection_command != 0x59)
|
||||
{
|
||||
int coins = input_port_read(device->machine(), "MCU");
|
||||
int coins = input_port_read(timer.machine(), "MCU");
|
||||
if (coins & 1) state->m_protection_data = 1;
|
||||
else if (coins & 2) state->m_protection_data = 2;
|
||||
else if (coins & 4) state->m_protection_data = 3;
|
||||
@ -340,14 +341,14 @@ static INTERRUPT_GEN( thedeep_interrupt )
|
||||
state->m_protection_irq = 1;
|
||||
}
|
||||
if (state->m_protection_irq)
|
||||
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)
|
||||
{
|
||||
device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
|
||||
device_set_input_line(device, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
|
||||
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -357,7 +358,7 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(thedeep_interrupt,2) /* IRQ by MCU, NMI by vblank (maskable) */
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", thedeep_interrupt, "screen", 0, 1) /* IRQ by MCU, NMI by vblank (maskable) */
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M65C02, XTAL_12MHz/8) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(audio_map)
|
||||
|
@ -2,13 +2,17 @@ class suna16_state : public driver_device
|
||||
{
|
||||
public:
|
||||
suna16_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_prot;
|
||||
UINT16 *m_paletteram;
|
||||
UINT16 *m_spriteram;
|
||||
UINT16 *m_spriteram2;
|
||||
int m_color_bank;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user