Make Zaccaria 1B11142 sound board a device in preparation for netlist sound

This commit is contained in:
Vas Crabb 2016-02-12 22:20:25 +11:00
parent 12a23988b3
commit 5ad3e6664d
8 changed files with 441 additions and 298 deletions

View File

@ -4021,6 +4021,8 @@ files {
createMAMEProjects(_target, _subtarget, "zaccaria")
files {
MAME_DIR .. "src/mame/audio/zaccaria.cpp",
MAME_DIR .. "src/mame/audio/zaccaria.h",
MAME_DIR .. "src/mame/drivers/laserbat.cpp",
MAME_DIR .. "src/mame/includes/laserbat.h",
MAME_DIR .. "src/mame/video/laserbat.cpp",

View File

@ -355,16 +355,6 @@ WRITE8_MEMBER(catnmous_state::pia_portb_w)
m_psg2->data_address_w(space, (data >> 2) & 0x01, m_pia->a_output());
}
WRITE_LINE_MEMBER(catnmous_state::pia_irqa)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE_LINE_MEMBER(catnmous_state::pia_irqb)
{
m_audiocpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(catnmous_state::psg1_porta_w)
{
// similar to zaccaria.c since we have no clue how this board really works

294
src/mame/audio/zaccaria.cpp Normal file
View File

@ -0,0 +1,294 @@
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
#include "emu.h"
#include "audio/zaccaria.h"
#include "cpu/m6800/m6800.h"
#include "machine/clock.h"
#include "sound/dac.h"
device_type const ZACCARIA_1B11142 = &device_creator<zac1b11142_audio_device>;
/*
* slave sound cpu, produces music and sound effects
* mapping:
* A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
* 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
* 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap ram)
* 0 0 1 x x x x x x x x x x x x x Open bus
* 0 1 0 x x x x x x x x x 0 0 x x Open bus
* 0 1 0 x x x x x x x x x 0 1 x x Open bus
* 0 1 0 x x x x x x x x x 1 0 x x Open bus
* 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
* 0 1 1 x x x x x x x x x x x x x Open bus
* 1 0 % % * * * * * * * * * * * * R /CS4A: Enable ROM 13
* 1 1 % % * * * * * * * * * * * * R /CS5A: Enable ROM 9
* note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
* monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
* hence for actual chips used, the mem map is:
* 1 0 x * * * * * * * * * * * * * R /CS4A: Enable ROM 13
* 1 1 x * * * * * * * * * * * * * R /CS5A: Enable ROM 9
*
* 6821 PIA:
* CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1)
* CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz)
* CA2 and CB2 are not connected
* PA0-7 connect to the data busses of the AY-3-8910 chips
* PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G
* PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H.
*/
static ADDRESS_MAP_START(zac1b11142_melody_map, AS_PROGRAM, 8, zac1b11142_audio_device)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
AM_RANGE(0x400c, 0x400f) AM_MIRROR(0x1ff0) AM_DEVREADWRITE("pia_4i", pia6821_device, read, write)
AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x2000) AM_ROM // rom 13
AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM // rom 9
ADDRESS_MAP_END
/*
* master sound cpu, controls speech directly
* mapping:
* A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
* 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
* x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
* x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
* x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
* x x 0 1 0 1 x x x x x x x x x x W Command to slave melody cpu
* x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80
* x x 0 1 1 1 x x x x x x x x x x Open bus
* % % 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8
* % % 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7
* note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms
* monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
* hence for actual chips used, the mem map is:
* x * 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8
* x * 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7
*
* 6821 PIA:
* PA0-7, PB0-1, CA2 and CB1 connect to the TMS5200
* CA1 and CB2 are not connected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4)
* PB3 connects to 'ACS' which goes to the Z80
*/
static ADDRESS_MAP_START(zac1b11142_audio_map, AS_PROGRAM, 8, zac1b11142_audio_device)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x8f6c) AM_DEVREADWRITE("pia_1i", pia6821_device, read, write)
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac_1f", dac_device, write_unsigned8) // MC1408
AM_RANGE(0x1400, 0x1400) AM_MIRROR(0xc3ff) AM_WRITE(melody_command_w)
AM_RANGE(0x1800, 0x1800) AM_MIRROR(0xc3ff) AM_READ(host_command_r)
AM_RANGE(0x2000, 0x2fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 low
AM_RANGE(0x3000, 0x3fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 low
AM_RANGE(0x6000, 0x6fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 high
AM_RANGE(0x7000, 0x7fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 high
ADDRESS_MAP_END
MACHINE_CONFIG_FRAGMENT(zac1b11142_config)
MCFG_CPU_ADD("melodycpu", M6802, XTAL_3_579545MHz) // verified on pcb
MCFG_CPU_PROGRAM_MAP(zac1b11142_melody_map)
MCFG_DEVICE_ADD("timebase", CLOCK, XTAL_3_579545MHz/4096/2) // CPU clock divided using 4040 and half of 74LS74
MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("pia_4i", pia6821_device, cb1_w))
MCFG_DEVICE_ADD("pia_4i", PIA6821, 0)
MCFG_PIA_READPA_HANDLER(READ8(zac1b11142_audio_device, pia_4i_porta_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(zac1b11142_audio_device, pia_4i_porta_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_4i_portb_w))
MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, nmi_line))
MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, irq_line))
MCFG_SOUND_ADD("ay_4g", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4g_porta_w))
MCFG_AY8910_PORT_B_READ_CB(READ8(zac1b11142_audio_device, ay_4g_portb_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15)
MCFG_SOUND_ADD("ay_4h", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_porta_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15)
MCFG_CPU_ADD("audiocpu", M6802, XTAL_3_579545MHz) // verified on pcb
MCFG_CPU_PROGRAM_MAP(zac1b11142_audio_map)
MCFG_CPU_PERIODIC_INT_DRIVER(zac1b11142_audio_device, input_poll, 60)
MCFG_DEVICE_ADD("pia_1i", PIA6821, 0)
MCFG_PIA_READPA_HANDLER(DEVREAD8("speech", tms5220_device, status_r))
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("speech", tms5220_device, data_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w))
MCFG_DAC_ADD("dac_1f")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80)
// There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF)
// 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz
MCFG_SOUND_ADD("speech", TMS5200, 649200) // ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that)
MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, cb1_w))
MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, ca2_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80)
MACHINE_CONFIG_END
INPUT_PORTS_START(zac1b11142_ioports)
PORT_START("1B11142")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("P1")
INPUT_PORTS_END
zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ZACCARIA_1B11142, "Zaccaria 1B11142 Sound Board", tag, owner, clock, "zac1b11142", __FILE__)
, device_mixer_interface(mconfig, *this, 1)
, m_acs_cb(*this)
, m_melodycpu(*this, "melodycpu")
, m_pia_4i(*this, "pia_4i")
, m_ay_4g(*this, "ay_4g")
, m_ay_4h(*this, "ay_4h")
, m_audiocpu(*this, "audiocpu")
, m_pia_1i(*this, "pia_1i")
, m_speech(*this, "speech")
, m_inputs(*this, "1B11142")
, m_host_command(0)
, m_melody_command(0)
{
}
WRITE8_MEMBER(zac1b11142_audio_device::hs_w)
{
m_host_command = data;
m_audiocpu->set_input_line(INPUT_LINE_IRQ0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
}
READ_LINE_MEMBER(zac1b11142_audio_device::acs_r)
{
return (~m_pia_1i->b_output() >> 3) & 0x01;
}
WRITE_LINE_MEMBER(zac1b11142_audio_device::ressound_w)
{
// TODO: there is a pulse-stretching network attached that should be simulated
m_melodycpu->set_input_line(INPUT_LINE_RESET, state);
// TODO: holds the reset line of m_pia_4i - can't implement this in MAME at this time
// TODO: holds the reset line of m_ay_4g - can't implement this in MAME at this time
// TODO: holds the reset line of m_ay_4h - can't implement this in MAME at this time
m_audiocpu->set_input_line(INPUT_LINE_RESET, state);
// TODO: holds the reset line of m_pia_1i - can't implement this in MAME at this time
// TODO: does some funky stuff with the VDD and VSS lines on the speech chip
}
READ8_MEMBER(zac1b11142_audio_device::pia_4i_porta_r)
{
UINT8 const control = m_pia_4i->b_output();
UINT8 data = 0xff;
if (0x01 == (control & 0x03))
data &= m_ay_4g->data_r(space, 0);
if (0x04 == (control & 0x0c))
data &= m_ay_4h->data_r(space, 0);
return data;
}
WRITE8_MEMBER(zac1b11142_audio_device::pia_4i_porta_w)
{
UINT8 const control = m_pia_4i->b_output();
if (control & 0x02)
m_ay_4g->data_address_w(space, (control >> 0) & 0x01, data);
if (control & 0x08)
m_ay_4h->data_address_w(space, (control >> 2) & 0x01, data);
}
WRITE8_MEMBER(zac1b11142_audio_device::pia_4i_portb_w)
{
if (data & 0x02)
m_ay_4g->data_address_w(space, (data >> 0) & 0x01, m_pia_4i->a_output());
if (data & 0x08)
m_ay_4h->data_address_w(space, (data >> 2) & 0x01, m_pia_4i->a_output());
}
WRITE8_MEMBER(zac1b11142_audio_device::ay_4g_porta_w)
{
// TODO: (data & 0x07) controls tromba mix volume
// TODO: (data & 0x08) controls cassa gate
// TODO: (data & 0x10) controls rullante gate
}
READ8_MEMBER(zac1b11142_audio_device::ay_4g_portb_r)
{
return m_melody_command;
}
WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_porta_w)
{
// TODO: data & 0x01 controls LEVEL
// TODO: data & 0x02 controls LEVELT
}
WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_portb_w)
{
// TODO: data & 0x01 controls ANAL3 filter
}
READ8_MEMBER(zac1b11142_audio_device::host_command_r)
{
return m_host_command;
}
WRITE8_MEMBER(zac1b11142_audio_device::melody_command_w)
{
m_melody_command = data;
m_pia_4i->ca1_w((data >> 7) & 0x01);
}
WRITE8_MEMBER(zac1b11142_audio_device::pia_1i_portb_w)
{
m_speech->rsq_w((data >> 0) & 0x01);
m_speech->wsq_w((data >> 1) & 0x01);
m_acs_cb((~data >> 3) & 0x01);
// TODO: a LED output().set_led_value(0, (data >> 4) & 0x01);
}
INTERRUPT_GEN_MEMBER(zac1b11142_audio_device::input_poll)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_inputs->read() & 0x80) ? CLEAR_LINE : ASSERT_LINE);
}
machine_config_constructor zac1b11142_audio_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME(zac1b11142_config);
}
ioport_constructor zac1b11142_audio_device::device_input_ports() const
{
return INPUT_PORTS_NAME(zac1b11142_ioports);
}
void zac1b11142_audio_device::device_config_complete()
{
}
void zac1b11142_audio_device::device_start()
{
m_acs_cb.resolve_safe();
save_item(NAME(m_host_command));
save_item(NAME(m_melody_command));
}
void zac1b11142_audio_device::device_reset()
{
m_host_command = 0;
m_melody_command = 0;
}

80
src/mame/audio/zaccaria.h Normal file
View File

@ -0,0 +1,80 @@
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
#pragma once
#ifndef __AUDIO_ZACCARIA_H__
#define __AUDIO_ZACCARIA_H__
#include "emu.h"
#include "machine/6821pia.h"
#include "machine/netlist.h"
#include "sound/ay8910.h"
#include "sound/tms5220.h"
extern device_type const ZACCARIA_1B11142;
#define MCFG_ZACCARIA_1B11142(_tag) \
MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11142, 0)
#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \
devcb = &zac1b11142_audio_device::static_set_acs_cb(*device, DEVCB_##_devcb);
class zac1b11142_audio_device : public device_t, public device_mixer_interface
{
public:
template<class _Object> static devcb_base &static_set_acs_cb(device_t &device, _Object object)
{ return downcast<zac1b11142_audio_device &>(device).m_acs_cb.set_callback(object); }
zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
~zac1b11142_audio_device() { }
// host interface
DECLARE_WRITE8_MEMBER(hs_w);
DECLARE_READ_LINE_MEMBER(acs_r);
DECLARE_WRITE_LINE_MEMBER(ressound_w);
// melody section handlers
DECLARE_READ8_MEMBER(pia_4i_porta_r);
DECLARE_WRITE8_MEMBER(pia_4i_porta_w);
DECLARE_WRITE8_MEMBER(pia_4i_portb_w);
DECLARE_WRITE8_MEMBER(ay_4g_porta_w);
DECLARE_READ8_MEMBER(ay_4g_portb_r);
DECLARE_WRITE8_MEMBER(ay_4h_porta_w);
DECLARE_WRITE8_MEMBER(ay_4h_portb_w);
// master audio section handlers
DECLARE_READ8_MEMBER(host_command_r);
DECLARE_WRITE8_MEMBER(melody_command_w);
DECLARE_WRITE8_MEMBER(pia_1i_portb_w);
// input ports don't push
INTERRUPT_GEN_MEMBER(input_poll);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_config_complete() override;
virtual void device_start() override;
virtual void device_reset() override;
devcb_write_line m_acs_cb;
required_device<cpu_device> m_melodycpu;
required_device<pia6821_device> m_pia_4i;
required_device<ay8910_device> m_ay_4g;
required_device<ay8910_device> m_ay_4h;
required_device<cpu_device> m_audiocpu;
required_device<pia6821_device> m_pia_1i;
required_device<tms5220_device> m_speech;
required_ioport m_inputs;
UINT8 m_host_command;
UINT8 m_melody_command;
};
#endif // __AUDIO_ZACCARIA_H__

View File

@ -555,8 +555,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( catnmous, laserbat_base, catnmous_state )
MCFG_PIA_READPA_HANDLER(READ8(catnmous_state, pia_porta_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(catnmous_state, pia_porta_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(catnmous_state, pia_portb_w))
MCFG_PIA_IRQA_HANDLER(WRITELINE(catnmous_state, pia_irqa))
MCFG_PIA_IRQB_HANDLER(WRITELINE(catnmous_state, pia_irqb))
MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, nmi_line))
MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, irq_line))
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -41,29 +41,19 @@ Notes:
#include "emu.h"
#include "cpu/z80/z80.h"
#include "cpu/m6800/m6800.h"
#include "machine/i8255.h"
#include "sound/dac.h"
#include "includes/zaccaria.h"
void zaccaria_state::machine_start()
{
save_item(NAME(m_dsw_sel));
save_item(NAME(m_active_8910));
save_item(NAME(m_port0a));
save_item(NAME(m_acs));
save_item(NAME(m_last_port0b));
save_item(NAME(m_nmi_mask));
}
void zaccaria_state::machine_reset()
{
m_dsw_sel = 0;
m_active_8910 = 0;
m_port0a = 0;
m_acs = 0;
m_last_port0b = 0;
m_nmi_mask = 0;
}
@ -71,21 +61,21 @@ WRITE8_MEMBER(zaccaria_state::dsw_sel_w)
{
switch (data & 0xf0)
{
case 0xe0:
m_dsw_sel = 0;
break;
case 0xe0:
m_dsw_sel = 0;
break;
case 0xd0:
m_dsw_sel = 1;
break;
case 0xd0:
m_dsw_sel = 1;
break;
case 0xb0:
m_dsw_sel = 2;
break;
case 0xb0:
m_dsw_sel = 2;
break;
default:
logerror("%s: portsel = %02x\n", machine().describe_context(), data);
break;
default:
logerror("%s: portsel = %02x\n", machine().describe_context(), data);
break;
}
}
@ -95,94 +85,6 @@ READ8_MEMBER(zaccaria_state::dsw_r)
}
WRITE8_MEMBER(zaccaria_state::ay8910_port0a_w)
{
/* bits 0-2 go to a 74LS156 with open collector outputs
* one out of 8 Resitors is than used to form a resistor
* divider with Analog input 5 (tromba)
*/
// bits 3-4 control the analog drum emulation on 8910 #0 ch. A
static const int table[8] = { 8200, 5600, 3300, 1500, 820, 390, 150, 47 };
int b0, b1, b2, ba, v;
b0 = data & 0x01;
b1 = (data & 0x02) >> 1;
b2 = (data & 0x04) >> 2;
ba = (b0<<2) | (b1<<1) | b2;
/* 150 below to scale to volume 100 */
v = (150 * table[ba]) / (4700 + table[ba]);
//printf("dac1w %02d %04d\n", ba, v);
m_ay2->set_volume(1, v);
}
READ8_MEMBER(zaccaria_state::port0a_r)
{
return (m_active_8910 == 0) ? m_ay1->data_r(space, 0) : m_ay2->data_r(space, 0);
}
WRITE8_MEMBER(zaccaria_state::port0a_w)
{
m_port0a = data;
}
WRITE8_MEMBER(zaccaria_state::port0b_w)
{
/* bit 1 goes to 8910 #0 BDIR pin */
if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00)
{
/* bit 0 goes to the 8910 #0 BC1 pin */
m_ay1->data_address_w(space, m_last_port0b, m_port0a);
}
else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02)
{
/* bit 0 goes to the 8910 #0 BC1 pin */
if (m_last_port0b & 0x01)
m_active_8910 = 0;
}
/* bit 3 goes to 8910 #1 BDIR pin */
if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00)
{
/* bit 2 goes to the 8910 #1 BC1 pin */
m_ay2->data_address_w(space, m_last_port0b >> 2, m_port0a);
}
else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08)
{
/* bit 2 goes to the 8910 #1 BC1 pin */
if (m_last_port0b & 0x04)
m_active_8910 = 1;
}
m_last_port0b = data;
}
WRITE8_MEMBER(zaccaria_state::port1b_w)
{
// bit 0 = /RS
m_tms->rsq_w((data >> 0) & 0x01);
// bit 1 = /WS
m_tms->wsq_w((data >> 1) & 0x01);
// bit 3 = "ACS" (goes, inverted, to input port 6 bit 3)
m_acs = ~data & 0x08;
// bit 4 = led (for testing?)
output().set_led_value(0,~data & 0x10);
}
WRITE8_MEMBER(zaccaria_state::sound_command_w)
{
soundlatch_byte_w(space, 0, data);
m_audio2->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
}
WRITE8_MEMBER(zaccaria_state::sound1_command_w)
{
m_pia0->ca1_w(data & 0x80);
soundlatch2_byte_w(space, 0, data);
}
GAME_EXTERN(monymony);
READ8_MEMBER(zaccaria_state::prot1_r)
@ -245,83 +147,23 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, zaccaria_state )
AM_RANGE(0x6800, 0x683f) AM_WRITE(attributes_w) AM_SHARE("attributesram")
AM_RANGE(0x6840, 0x685f) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x6881, 0x68c0) AM_RAM AM_SHARE("spriteram2")
AM_RANGE(0x6c00, 0x6c00) AM_WRITE(flip_screen_x_w)
AM_RANGE(0x6c01, 0x6c01) AM_WRITE(flip_screen_y_w)
AM_RANGE(0x6c02, 0x6c02) AM_WRITENOP /* sound reset */
AM_RANGE(0x6c06, 0x6c06) AM_WRITE(coin_w)
AM_RANGE(0x6c07, 0x6c07) AM_WRITE(nmi_mask_w)
AM_RANGE(0x6c00, 0x6c07) AM_READ(prot2_r)
AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(dsw_r, sound_command_w)
AM_RANGE(0x6c00, 0x6c00) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_x_w)
AM_RANGE(0x6c01, 0x6c01) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_y_w)
AM_RANGE(0x6c02, 0x6c02) AM_MIRROR(0x81f8) AM_WRITE(ressound_w)
AM_RANGE(0x6c06, 0x6c06) AM_MIRROR(0x81f8) AM_WRITE(coin_w)
AM_RANGE(0x6c07, 0x6c07) AM_MIRROR(0x81f8) AM_WRITE(nmi_mask_w)
AM_RANGE(0x6c00, 0x6c07) AM_MIRROR(0x81f8) AM_READ(prot2_r)
AM_RANGE(0x6e00, 0x6e00) AM_MIRROR(0x81f8) AM_READ(dsw_r) AM_DEVWRITE("audiopcb", zac1b11142_audio_device, hs_w)
AM_RANGE(0x7000, 0x77ff) AM_RAM
AM_RANGE(0x7800, 0x7803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x7c00, 0x7c00) AM_READ(watchdog_reset_r)
AM_RANGE(0x8000, 0xdfff) AM_ROM
ADDRESS_MAP_END
/* slave sound cpu, produces music and sound effects */
/* mapping:
A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap ram)
0 0 1 x x x x x x x x x x x x x Open bus
0 1 0 x x x x x x x x x 0 0 x x Open bus
0 1 0 x x x x x x x x x 0 1 x x Open bus
0 1 0 x x x x x x x x x 1 0 x x Open bus
0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
0 1 1 x x x x x x x x x x x x x Open bus
1 0 % % * * * * * * * * * * * * R /CS4A: Enable Rom 13
1 1 % % * * * * * * * * * * * * R /CS5A: Enable Rom 9
note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
hence for actual chips used, the mem map is:
1 0 x * * * * * * * * * * * * * R /CS4A: Enable Rom 13
1 1 x * * * * * * * * * * * * * R /CS5A: Enable Rom 9
6821 PIA: CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1); CB1 comes from a periodic counter clocked by the 6802's clock, divided by 4096. CA2 and CB2 are disconnected. PA0-7 connect to the data busses of the AY-3-8910 chips; PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G; PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H.
*/
static ADDRESS_MAP_START( sound_map_1, AS_PROGRAM, 8, zaccaria_state )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_device, read, write) AM_MIRROR(0x1ff0)
AM_RANGE(0x8000, 0x9fff) AM_ROM AM_MIRROR(0x2000) // rom 13
AM_RANGE(0xc000, 0xdfff) AM_ROM AM_MIRROR(0x2000) // rom 9
ADDRESS_MAP_END
/* master sound cpu, controls speech directly */
/* mapping:
A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
**** x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
x x 0 1 0 1 x x x x x x x x x x W Command to slave sound1 cpu
x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80
x x 0 1 1 1 x x x x x x x x x x Open bus
% % 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
% % 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms
monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
hence for actual chips used, the mem map is:
x * 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
x * 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
6821 PIA: PA0-7, CA2 and CB1 connect to the TMS5200; CA1 and CB2 are disconnected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4); PB3 connects to 'ACS' which goes to the z80.
*/
static ADDRESS_MAP_START( sound_map_2, AS_PROGRAM, 8, zaccaria_state )
AM_RANGE(0x0000, 0x007f) AM_RAM /* 6802 internal ram */
AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x8F6C)
AM_RANGE(0x1000, 0x1000) AM_DEVWRITE("mc1408", dac_device, write_unsigned8) AM_MIRROR(0x83FF) /* MC1408 */
AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w) AM_MIRROR(0xC3FF)
AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_MIRROR(0xC3FF)
AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 low
AM_RANGE(0x3000, 0x3fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 low
AM_RANGE(0x6000, 0x6fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 high
AM_RANGE(0x7000, 0x7fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 high
ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER(zaccaria_state::acs_r)
WRITE8_MEMBER(zaccaria_state::ressound_w)
{
return (m_acs & 0x08) ? 1 : 0;
m_audiopcb->ressound_w(data & 0x01);
}
static INPUT_PORTS_START( monymony )
@ -429,7 +271,7 @@ static INPUT_PORTS_START( monymony )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaccaria_state,acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("audiopcb", zac1b11142_audio_device, acs_r)
/* other bits come from a protection device */
INPUT_PORTS_END
@ -500,36 +342,12 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", zaccaria_state, vblank_irq)
// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
MCFG_CPU_ADD("audiocpu", M6802,XTAL_3_579545MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map_1)
MCFG_DEVICE_ADD("timebase", CLOCK, XTAL_3_579545MHz/4096/2) /* verified on pcb */
MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("pia0", pia6821_device, cb1_w))
// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(sound_map_2)
// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
MCFG_I8255_IN_PORTC_CB(IOPORT("SYSTEM"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(zaccaria_state, dsw_sel_w))
MCFG_DEVICE_ADD( "pia0", PIA6821, 0)
MCFG_PIA_READPA_HANDLER(READ8(zaccaria_state, port0a_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(zaccaria_state, port0a_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state, port0b_w))
MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, nmi_line))
MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, irq_line))
MCFG_DEVICE_ADD( "pia1", PIA6821, 0)
MCFG_PIA_READPA_HANDLER(DEVREAD8("tms", tms5220_device, status_r))
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("tms", tms5220_device, data_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state,port1b_w))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60.57) /* verified on pcb */
@ -546,24 +364,8 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch2_byte_r))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zaccaria_state, ay8910_port0a_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MCFG_DAC_ADD("mc1408")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
/* There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) */
/* 162kHz measured on pin 3 20 minutesa fter power on. Clock would then be 162*4=648kHz. */
MCFG_SOUND_ADD("tms", TMS5200, 649200) /* ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) */
MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, cb1_w))
MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, ca2_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_ZACCARIA_1B11142("audiopcb")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@ -589,11 +391,11 @@ ROM_START( monymony )
ROM_LOAD( "cpu6.2c", 0x5000, 0x1000, CRC(31da62b1) SHA1(486f07087244f8537510afacb64ddd59eb512a4d) )
ROM_CONTINUE( 0xd000, 0x1000 )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "snd13.2g", 0x8000, 0x2000, CRC(78b01b98) SHA1(2aabed56cdae9463deb513c0c5021f6c8dfd271e) )
ROM_LOAD( "snd9.1i", 0xc000, 0x2000, CRC(94e3858b) SHA1(04961f67b95798b530bd83355dec612389f22255) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "snd8.1h", 0x2000, 0x1000, CRC(aad76193) SHA1(e08fc184efced392ee902c4cc9daaaf3310cdfe2) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "snd7.1g", 0x3000, 0x1000, CRC(1e8ffe3e) SHA1(858ee7abe88d5801237e519cae2b50ae4bf33a58) )
@ -624,11 +426,11 @@ ROM_START( jackrabt )
ROM_LOAD( "cpu-01.5h", 0xc000, 0x1000, CRC(785e1a01) SHA1(a748d300be9455cad4f912e01c2279bb8465edfe) )
ROM_LOAD( "cpu-01.6h", 0xd000, 0x1000, CRC(dd5979cf) SHA1(e9afe7002b2258a1c3132bdd951c6e20d473fb6a) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
@ -663,11 +465,11 @@ ROM_START( jackrabt2 )
ROM_LOAD( "6cpu2.2c", 0x5000, 0x1000, CRC(404496eb) SHA1(44381e27e540fe9d8cacab4c3b1fe9a4f20d26a8) )
ROM_CONTINUE( 0xd000, 0x1000 )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
@ -704,11 +506,11 @@ ROM_START( jackrabts )
ROM_LOAD( "6cpu.2c", 0x5000, 0x1000, CRC(f53d6356) SHA1(9b167edca59cf81a2468368a372bab132f15e2ea) )
ROM_CONTINUE( 0xd000, 0x1000 )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )

View File

@ -203,8 +203,6 @@ public:
DECLARE_READ8_MEMBER(pia_porta_r);
DECLARE_WRITE8_MEMBER(pia_porta_w);
DECLARE_WRITE8_MEMBER(pia_portb_w);
DECLARE_WRITE_LINE_MEMBER(pia_irqa);
DECLARE_WRITE_LINE_MEMBER(pia_irqb);
// PSG handlers
DECLARE_WRITE8_MEMBER(psg1_porta_w);

View File

@ -1,60 +1,25 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
#include "machine/6821pia.h"
#include "machine/clock.h"
#include "sound/ay8910.h"
#include "sound/tms5220.h"
#include "emu.h"
#include "audio/zaccaria.h"
class zaccaria_state : public driver_device
{
public:
zaccaria_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audio2(*this, "audio2"),
m_pia0(*this, "pia0"),
m_ay1(*this, "ay1"),
m_ay2(*this, "ay2"),
m_tms(*this, "tms"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
m_attributesram(*this, "attributesram"),
m_spriteram(*this, "spriteram"),
m_spriteram2(*this, "spriteram2"),
m_dsw_port(*this, "DSW") { }
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audio2;
required_device<pia6821_device> m_pia0;
required_device<ay8910_device> m_ay1;
required_device<ay8910_device> m_ay2;
required_device<tms5220_device> m_tms;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
/* memory pointers */
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_attributesram;
required_shared_ptr<UINT8> m_spriteram;
required_shared_ptr<UINT8> m_spriteram2;
required_ioport_array<3> m_dsw_port;
int m_dsw_sel;
int m_active_8910;
int m_port0a;
int m_acs;
int m_last_port0b;
tilemap_t *m_bg_tilemap;
UINT8 m_nmi_mask;
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
, m_audiopcb(*this, "audiopcb")
, m_videoram(*this, "videoram")
, m_attributesram(*this, "attributesram")
, m_spriteram(*this, "spriteram")
, m_spriteram2(*this, "spriteram2")
, m_dsw_port(*this, "DSW")
{ }
DECLARE_READ8_MEMBER(dsw_r);
DECLARE_WRITE8_MEMBER(sound_command_w);
DECLARE_WRITE8_MEMBER(sound1_command_w);
DECLARE_READ8_MEMBER(prot1_r);
DECLARE_READ8_MEMBER(prot2_r);
DECLARE_WRITE8_MEMBER(coin_w);
@ -63,13 +28,8 @@ public:
DECLARE_WRITE8_MEMBER(attributes_w);
DECLARE_WRITE8_MEMBER(flip_screen_x_w);
DECLARE_WRITE8_MEMBER(flip_screen_y_w);
DECLARE_CUSTOM_INPUT_MEMBER(acs_r);
DECLARE_WRITE8_MEMBER(ressound_w);
DECLARE_WRITE8_MEMBER(dsw_sel_w);
DECLARE_WRITE8_MEMBER(ay8910_port0a_w);
DECLARE_READ8_MEMBER(port0a_r);
DECLARE_WRITE8_MEMBER(port0a_w);
DECLARE_WRITE8_MEMBER(port0b_w);
DECLARE_WRITE8_MEMBER(port1b_w);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
@ -78,4 +38,21 @@ public:
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_irq);
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section);
protected:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<zac1b11142_audio_device> m_audiopcb;
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_attributesram;
required_shared_ptr<UINT8> m_spriteram;
required_shared_ptr<UINT8> m_spriteram2;
required_ioport_array<3> m_dsw_port;
int m_dsw_sel;
tilemap_t *m_bg_tilemap;
UINT8 m_nmi_mask;
};