gottlieb_a: use mos6530/2_new_device, sync writes, improve gottlieb_sound_p3_device,

gts80: use mos6532_new_device
This commit is contained in:
hap 2023-07-25 20:24:46 +02:00
parent b47bbbc581
commit 12b64149ff
11 changed files with 596 additions and 542 deletions

View File

@ -2,10 +2,14 @@
// copyright-holders:Alex Pasadyn,Zsolt Vasvari,Aaron Giles
/****************************************************************************
Gottlieb Exterminator hardware
Premier Technology (Gottlieb) Exterminator hardware
driver by Zsolt Vasvari and Alex Pasadyn
Premier Technology was the successor to Mylstar Electronics in the mid-80s.
It still says Gottlieb on the title screen and the cabinet, but that's
just a marketing brand name.
*****************************************************************************
Master CPU (TMS34010, all addresses are in bits)
@ -520,4 +524,4 @@ ROM_END
*
*************************************/
GAME( 1989, exterm, 0, exterm, exterm, exterm_state, empty_init, ROT0, "Gottlieb / Premier Technology", "Exterminator", MACHINE_SUPPORTS_SAVE )
GAME( 1989, exterm, 0, exterm, exterm, exterm_state, empty_init, ROT0, "Premier Technology", "Exterminator", MACHINE_SUPPORTS_SAVE )

View File

@ -260,7 +260,6 @@ public:
void gottlieb2(machine_config &config);
void gottlieb2_ram_rom(machine_config &config);
void reactor(machine_config &config);
void tylz(machine_config &config);
void g2laser(machine_config &config);
void qbert(machine_config &config);
void qbert_knocker(machine_config &config);
@ -2164,6 +2163,12 @@ void gottlieb_state::gottlieb1(machine_config &config)
GOTTLIEB_SOUND_REV1(config, m_r1_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
}
void gottlieb_state::gottlieb1_votrax(machine_config &config)
{
gottlieb_core(config);
GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
}
void gottlieb_state::gottlieb1_rom(machine_config &config)
{
gottlieb1(config);
@ -2209,13 +2214,6 @@ void gottlieb_state::g2laser(machine_config &config)
*
*************************************/
void gottlieb_state::gottlieb1_votrax(machine_config &config)
{
gottlieb_core(config);
GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
}
void gottlieb_state::reactor(machine_config &config)
{
gottlieb1_votrax(config);
@ -2234,11 +2232,6 @@ void gottlieb_state::qbert(machine_config &config)
qbert_knocker(config);
}
void gottlieb_state::tylz(machine_config &config)
{
gottlieb1_votrax(config);
}
void gottlieb_state::screwloo(machine_config &config)
{
gottlieb2(config);
@ -2271,6 +2264,7 @@ void gottlieb_state::cobram3(machine_config &config)
}
/*************************************
*
* ROM definitions
@ -3040,7 +3034,7 @@ GAME( 1982, myqbert, qbert, qbert, qbert, gottlieb_state, i
GAME( 1982, qberttst, qbert, qbert, qbert, gottlieb_state, init_qbert, ROT270, "Gottlieb", "Q*bert (early test version)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1982, qbtrktst, qbert, qbert, qbert, gottlieb_state, init_qbert, ROT270, "Gottlieb", "Q*bert Board Input Test Rom", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1982, insector, 0, gottlieb1, insector, gottlieb_state, init_romtiles, ROT0, "Gottlieb", "Insector (prototype)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, tylz, 0, tylz, tylz, gottlieb_state, init_romtiles, ROT0, "Mylstar", "Tylz (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // modified sound hw?
GAME( 1982, tylz, 0, gottlieb1_votrax, tylz, gottlieb_state, init_romtiles, ROT0, "Mylstar", "Tylz (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // modified sound hw?
GAME( 1984, argusg, 0, gottlieb1_rom, argusg, gottlieb_state, init_ramtiles, ROT0, "Gottlieb", "Argus (Gottlieb, prototype)" , MACHINE_SUPPORTS_SAVE ) // aka Guardian / Protector?
GAME( 1983, mplanets, 0, gottlieb1, mplanets, gottlieb_state, init_romtiles, ROT270, "Gottlieb", "Mad Planets", MACHINE_SUPPORTS_SAVE )
GAME( 1983, mplanetsuk, mplanets, gottlieb1, mplanets, gottlieb_state, init_romtiles, ROT270, "Gottlieb (Taitel license)", "Mad Planets (UK)", MACHINE_SUPPORTS_SAVE )

View File

@ -124,6 +124,10 @@ public:
void p1(machine_config &config); // ne555 tones
void p2(machine_config &config); // multi-mode sound card
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
u8 gts1_solenoid_r(offs_t offset);
void gts1_solenoid_w(offs_t offset, u8 data);
@ -139,9 +143,6 @@ private:
void gts1_do_w(u8 data);
void nvram_w();
virtual void machine_start() override;
virtual void machine_reset() override;
void gts1_map(address_map &map);
void gts1_data(address_map &map);
void gts1_io(address_map &map);
@ -821,8 +822,9 @@ ROM_START(astannie)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------
@ -836,8 +838,9 @@ ROM_START(buckrgrs)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------
@ -900,8 +903,9 @@ ROM_START(geniep)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------
@ -957,8 +961,9 @@ ROM_START(roldisco)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------
@ -1019,8 +1024,9 @@ ROM_START(hulk)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------
@ -1034,8 +1040,9 @@ ROM_START(torch)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------
@ -1049,8 +1056,9 @@ ROM_START(totem)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sys1.bin", 0x0000, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
ROM_END
/*-------------------------------------------------------------------

View File

@ -93,6 +93,10 @@ public:
void p7(machine_config &config); // p7 sound card
DECLARE_INPUT_CHANGED_MEMBER(test_inp);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
void segbank_w(offs_t offset, u8 data);
u8 u4a_r();
@ -103,14 +107,14 @@ private:
void u5a_w(u8 data);
void nmi_w(int state);
void mem_map(address_map &map);
bool m_dispclk = false;
bool m_lampclk = false;
u8 m_digit = 0U;
u8 m_row = 0U; // for lamps and switches
u8 m_segment[4]{};
u8 m_u4b = 0U;
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m65c02_device> m_maincpu;
required_device<via6522_device> m_u4;
required_device<via6522_device> m_u5;

View File

@ -87,6 +87,10 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(test_inp);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
void segbank_w(u8 data);
u8 u4a_r();
@ -108,8 +112,7 @@ private:
u8 m_row = 0U; // for lamps and switches
u8 m_segment = 0U;
u8 m_u4b = 0U;
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m65c02_device> m_maincpu;
required_device<m65c02_device> m_dmdcpu;
required_memory_bank m_bank1;

View File

@ -78,9 +78,12 @@ public:
void p0(machine_config &config); // no sound card
void p2(machine_config &config); // multi-mode card
void r1v(machine_config &config); // r1 with votrax
void r1(machine_config &config); // r1
DECLARE_INPUT_CHANGED_MEMBER(slam_w);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
u8 port1a_r();
u8 port2a_r();
@ -96,12 +99,11 @@ private:
u8 m_swrow = 0U;
u8 m_soundex = 0U;
u8 m_sol_state[9][2]{};
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m6502_device> m_maincpu;
required_device<riot6532_device> m_riot1;
required_device<riot6532_device> m_riot2;
required_device<riot6532_device> m_riot3;
required_device<mos6532_new_device> m_riot1;
required_device<mos6532_new_device> m_riot2;
required_device<mos6532_new_device> m_riot3;
required_ioport_array<4> m_io_dips;
required_ioport_array<9> m_io_keyboard;
optional_device<gottlieb_sound_p2_device> m_p2_sound;
@ -113,11 +115,13 @@ private:
void gts80_state::gts80_map(address_map &map)
{
map.global_mask(0x3fff);
map(0x0000, 0x017f).ram();
map(0x0000, 0x007f).m(m_riot1, FUNC(mos6532_new_device::ram_map));
map(0x0080, 0x00ff).m(m_riot2, FUNC(mos6532_new_device::ram_map));
map(0x0100, 0x017f).m(m_riot3, FUNC(mos6532_new_device::ram_map));
map(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0280, 0x02ff).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0300, 0x037f).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0200, 0x021f).mirror(0x0060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x029f).mirror(0x0060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x031f).mirror(0x0060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x17ff).rom();
map(0x1800, 0x18ff).ram().share("nvram"); // 5101L-1 256x4
map(0x2000, 0x2fff).rom();
@ -315,7 +319,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER( gts80_state::slam_w )
{
m_riot2->porta_in_set(newval ? 0x80 : 0, 0x80);
m_riot2->pa_bit_w<7>(newval);
}
u8 gts80_state::port1a_r()
@ -511,21 +515,21 @@ void gts80_state::p0(machine_config &config)
config.set_default_layout(layout_gts80);
/* Devices */
RIOT6532(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->in_pa_callback().set(FUNC(gts80_state::port1a_r)); // sw_r
m_riot1->out_pb_callback().set(FUNC(gts80_state::port1b_w)); // sw_w
m_riot1->irq_callback().set("irq", FUNC(input_merger_device::in_w<0>));
MOS6532_NEW(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->pa_rd_callback().set(FUNC(gts80_state::port1a_r)); // sw_r
m_riot1->pb_wr_callback().set(FUNC(gts80_state::port1b_w)); // sw_w
m_riot1->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<0>));
RIOT6532(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->in_pa_callback().set(FUNC(gts80_state::port2a_r)); // pa7 - slam tilt
m_riot2->out_pa_callback().set(FUNC(gts80_state::port2a_w)); // digit select
m_riot2->out_pb_callback().set(FUNC(gts80_state::port2b_w)); // seg
m_riot2->irq_callback().set("irq", FUNC(input_merger_device::in_w<1>));
MOS6532_NEW(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->pa_rd_callback().set(FUNC(gts80_state::port2a_r)); // pa7 - slam tilt
m_riot2->pa_wr_callback().set(FUNC(gts80_state::port2a_w)); // digit select
m_riot2->pb_wr_callback().set(FUNC(gts80_state::port2b_w)); // seg
m_riot2->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<1>));
RIOT6532(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->out_pa_callback().set(FUNC(gts80_state::port3a_w)); // sol, snd
m_riot3->out_pb_callback().set(FUNC(gts80_state::port3b_w)); // lamps
m_riot3->irq_callback().set("irq", FUNC(input_merger_device::in_w<2>));
MOS6532_NEW(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->pa_wr_callback().set(FUNC(gts80_state::port3a_w)); // sol, snd
m_riot3->pb_wr_callback().set(FUNC(gts80_state::port3b_w)); // lamps
m_riot3->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<2>));
INPUT_MERGER_ANY_HIGH(config, "irq").output_handler().set_inputline("maincpu", m6502_device::IRQ_LINE);
@ -540,12 +544,6 @@ void gts80_state::p2(machine_config &config)
GOTTLIEB_SOUND_PIN2(config, m_p2_sound).add_route(ALL_OUTPUTS, "mono", 0.75);
}
void gts80_state::r1(machine_config &config)
{
p0(config);
GOTTLIEB_SOUND_REV1(config, m_r1_sound).add_route(ALL_OUTPUTS, "mono", 0.75);
}
void gts80_state::r1v(machine_config &config)
{
p0(config);
@ -625,8 +623,9 @@ ROM_START(blckhols)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("668-a-s.snd", 0x0400, 0x0400, CRC(5175f307) SHA1(97be8f2bbc393cc45a07fa43daec4bbba2336af8))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -641,8 +640,9 @@ ROM_START(circusp)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("654.snd", 0x0400, 0x0400, CRC(75c3ad67) SHA1(4f59c451b8659d964d5242728814c2d97f68445b))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -657,8 +657,9 @@ ROM_START(cntforce)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("656.snd", 0x0400, 0x0400, CRC(0be2cbe9) SHA1(306a3e7d93733562360285de35b331b5daae7250))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -675,8 +676,9 @@ ROM_START(eclipse)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("671-a-s.snd", 0x0400, 0x0400, CRC(5175f307) SHA1(97be8f2bbc393cc45a07fa43daec4bbba2336af8))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -688,8 +690,9 @@ ROM_START(forceii)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) // no sound
ROM_LOAD("661.snd", 0x0400, 0x0400, CRC(650158a7) SHA1(c7a9d521d1e7de1e00e7abc3a97aaaee04f8052e))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -722,8 +725,9 @@ ROM_START(jamesb)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("658.snd", 0x0400, 0x0400, CRC(962c03df) SHA1(e8ff5d502a038531a921380b75c27ef79b6feac8))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
ROM_START(jamesb2)
@ -732,8 +736,9 @@ ROM_START(jamesb2)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("658.snd", 0x0400, 0x0400, CRC(962c03df) SHA1(e8ff5d502a038531a921380b75c27ef79b6feac8))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -775,8 +780,9 @@ ROM_START(panthera)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("652.snd", 0x0400, 0x0400, CRC(4d0cf2c0) SHA1(0da5d118ffd19b1e78dfaaee3e31c43750d45c8d))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
ROM_START(grand8)
@ -797,8 +803,9 @@ ROM_START(pnkpnthr)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("664.snd", 0x0400, 0x0400, CRC(18f4abfd) SHA1(9e85eb7e9b1e2fe71be828ff1b5752424ed42588))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -813,8 +820,9 @@ ROM_START(starrace)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("657.snd", 0x0400, 0x0400, CRC(3a1d3995) SHA1(6f0bdb34c4fa11d5f8ecbb98ae55bafeb5d62c9e))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -829,8 +837,9 @@ ROM_START(spidermn)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("653.snd", 0x0400, 0x0400, CRC(f5650c46) SHA1(2d0e50fa2f4b3d633daeaa7454630e3444453cb2))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -847,8 +856,9 @@ ROM_START(timeline)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("659.snd", 0x0400, 0x0400, CRC(28185568) SHA1(2fd26e7e0a8f050d67159f17634df2b1fc47cbd3))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -869,8 +879,9 @@ ROM_START(vlcno_1c)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("667-a-s.snd", 0x0400, 0x0400, CRC(894b4e2e) SHA1(d888f8e00b2b50cef5cc916d46e4c5e6699914a1))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
ROM_START(vlcno_1b)
@ -879,8 +890,9 @@ ROM_START(vlcno_1b)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("667-a-s.snd", 0x0400, 0x0400, CRC(894b4e2e) SHA1(d888f8e00b2b50cef5cc916d46e4c5e6699914a1))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
ROM_START(vlcno_1a)
@ -889,8 +901,9 @@ ROM_START(vlcno_1a)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("667-a-s.snd", 0x0400, 0x0400, CRC(894b4e2e) SHA1(d888f8e00b2b50cef5cc916d46e4c5e6699914a1))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -930,6 +943,6 @@ GAME(1981, vlcno_1a, vlcno_1c, p2, gts80, gts80_state, empty_init, ROT0, "Gott
GAME(1981, blckhole, 0, r1v, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Black Hole (Rev. 4)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1981, blckhole2, blckhole, r1v, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Black Hole (Rev. 2)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1981, blckhols, 0, p2, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Black Hole (Sound Only)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1982, hh, 0, r1, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Haunted House (Rev. 2)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1982, hh_1, hh, r1, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Haunted House (Rev. 1)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1982, hh, 0, r1v, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Haunted House (Rev. 2)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1982, hh_1, hh, r1v, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Haunted House (Rev. 1)", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME(1981, eclipse, 0, p2, gts80, gts80_state, empty_init, ROT0, "Gottlieb", "Eclipse", MACHINE_MECHANICAL | MACHINE_SUPPORTS_SAVE )

View File

@ -48,9 +48,6 @@ Status:
- All games (except caveman) are playable
- Lots of issues with the sound
ToDo:
- rflshdlx: no sound
*****************************************************************************************************************/
#include "emu.h"
@ -95,6 +92,10 @@ public:
void r1v(machine_config &config); // r1 with votrax
DECLARE_INPUT_CHANGED_MEMBER(slam_w);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
u8 port1a_r();
u8 port2a_r();
@ -110,12 +111,11 @@ private:
u8 m_swrow = 0U;
u8 m_soundex = 0U;
u8 m_sol_state[9][2]{};
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m6502_device> m_maincpu;
required_device<riot6532_device> m_riot1;
required_device<riot6532_device> m_riot2;
required_device<riot6532_device> m_riot3;
required_device<mos6532_new_device> m_riot1;
required_device<mos6532_new_device> m_riot2;
required_device<mos6532_new_device> m_riot3;
required_ioport_array<4> m_io_dips;
required_ioport_array<9> m_io_keyboard;
optional_device<gottlieb_sound_p2_device> m_p2_sound;
@ -128,11 +128,13 @@ private:
void gts80a_state::gts80a_map(address_map &map)
{
map.global_mask(0x3fff);
map(0x0000, 0x017f).ram();
map(0x0000, 0x007f).m(m_riot1, FUNC(mos6532_new_device::ram_map));
map(0x0080, 0x00ff).m(m_riot2, FUNC(mos6532_new_device::ram_map));
map(0x0100, 0x017f).m(m_riot3, FUNC(mos6532_new_device::ram_map));
map(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0280, 0x02ff).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0300, 0x037f).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0200, 0x021f).mirror(0x0060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x029f).mirror(0x0060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x031f).mirror(0x0060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x17ff).rom();
map(0x1800, 0x18ff).ram().share("nvram"); // 5101L-1 256x4
map(0x2000, 0x2fff).rom();
@ -330,7 +332,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER( gts80a_state::slam_w )
{
m_riot2->porta_in_set(newval ? 0x80 : 0, 0x80);
m_riot2->pa_bit_w<7>(newval);
}
u8 gts80a_state::port1a_r()
@ -532,21 +534,21 @@ void gts80a_state::p0(machine_config &config)
config.set_default_layout(layout_gts80a);
/* Devices */
RIOT6532(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->in_pa_callback().set(FUNC(gts80a_state::port1a_r)); // sw_r
m_riot1->out_pb_callback().set(FUNC(gts80a_state::port1b_w)); // sw_w
m_riot1->irq_callback().set("irq", FUNC(input_merger_device::in_w<0>));
MOS6532_NEW(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->pa_rd_callback().set(FUNC(gts80a_state::port1a_r)); // sw_r
m_riot1->pb_wr_callback().set(FUNC(gts80a_state::port1b_w)); // sw_w
m_riot1->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<0>));
RIOT6532(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->in_pa_callback().set(FUNC(gts80a_state::port2a_r)); // pa7 - slam tilt
m_riot2->out_pa_callback().set(FUNC(gts80a_state::port2a_w)); // digit select
m_riot2->out_pb_callback().set(FUNC(gts80a_state::port2b_w)); // seg
m_riot2->irq_callback().set("irq", FUNC(input_merger_device::in_w<1>));
MOS6532_NEW(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->pa_rd_callback().set(FUNC(gts80a_state::port2a_r)); // pa7 - slam tilt
m_riot2->pa_wr_callback().set(FUNC(gts80a_state::port2a_w)); // digit select
m_riot2->pb_wr_callback().set(FUNC(gts80a_state::port2b_w)); // seg
m_riot2->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<1>));
RIOT6532(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->out_pa_callback().set(FUNC(gts80a_state::port3a_w)); // sol, snd
m_riot3->out_pb_callback().set(FUNC(gts80a_state::port3b_w)); // lamps
m_riot3->irq_callback().set("irq", FUNC(input_merger_device::in_w<2>));
MOS6532_NEW(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->pa_wr_callback().set(FUNC(gts80a_state::port3a_w)); // sol, snd
m_riot3->pb_wr_callback().set(FUNC(gts80a_state::port3b_w)); // lamps
m_riot3->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<2>));
INPUT_MERGER_ANY_HIGH(config, "irq").output_handler().set_inputline("maincpu", m6502_device::IRQ_LINE); // wire-or'd
@ -765,8 +767,9 @@ ROM_START(dvlsdre2)
ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("670-a-s.snd", 0x0400, 0x0400, CRC(f141d535) SHA1(91e4ab9ce63b5ff3e395b6447a104286327b5533))
ROM_RELOAD( 0x0800, 0x0400)
ROM_LOAD("6530sy80.bin", 0x0c00, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_REGION( 0x0400, "p2sound:r6530", 0 )
ROM_LOAD("6530sy80.bin", 0x0000, 0x0400, CRC(c8ba951d) SHA1(e4aa152b36695a0205c19a8914e4d77373f64c6c))
ROM_END
/*-------------------------------------------------------------------
@ -975,11 +978,11 @@ GAME( 1982, punk, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Got
GAME( 1982, striker, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Striker (Pinball)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, krullp, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Krull (Pinball)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, qbquest, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Q*Bert's Quest", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, sorbit, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Super Orbit", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, rflshdlx, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Royal Flush Deluxe", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, sorbit, 0, r1, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Super Orbit", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, rflshdlx, 0, r1, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Royal Flush Deluxe", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, goinnuts, 0, r1, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Goin' Nuts", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, amazonh, 0, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Amazon Hunt", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, amazonha, amazonh, r1v, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Amazon Hunt (alternate set)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, amazonh, 0, r1, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Amazon Hunt", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, amazonha, amazonh, r1, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Amazon Hunt (alternate set)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, rackempp, 0, p3, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Rack 'em Up! (Pinball)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1983, raimfire, 0, p3, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Ready...Aim...Fire!", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
GAME( 1984, jack2opn, 0, p3, gts80a, gts80a_state, empty_init, ROT0, "Gottlieb", "Jacks to Open", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )

View File

@ -106,6 +106,10 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(slam_w);
void init_s80c() { m_slam_low = true; }
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
u8 port1a_r();
u8 port2a_r();
@ -127,12 +131,10 @@ private:
u8 m_digit[2]{};
bool m_slam_low = false;
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m6502_device> m_maincpu;
required_device<riot6532_device> m_riot1;
required_device<riot6532_device> m_riot2;
required_device<riot6532_device> m_riot3;
required_device<mos6532_new_device> m_riot1;
required_device<mos6532_new_device> m_riot2;
required_device<mos6532_new_device> m_riot3;
required_ioport_array<4> m_io_dips;
required_ioport_array<9> m_io_keyboard;
optional_device<gottlieb_sound_p3_device> m_p3_sound;
@ -147,11 +149,13 @@ private:
void gts80b_state::gts80b_map(address_map &map)
{
map.global_mask(0xbfff);
map(0x0000, 0x017f).mirror(0x8000).ram();
map(0x0000, 0x007f).mirror(0x8000).m(m_riot1, FUNC(mos6532_new_device::ram_map));
map(0x0080, 0x00ff).mirror(0x8000).m(m_riot2, FUNC(mos6532_new_device::ram_map));
map(0x0100, 0x017f).mirror(0x8000).m(m_riot3, FUNC(mos6532_new_device::ram_map));
map(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).mirror(0x8000).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0280, 0x02ff).mirror(0x8000).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0300, 0x037f).mirror(0x8000).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0200, 0x021f).mirror(0x8060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x029f).mirror(0x8060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x031f).mirror(0x8060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x17ff).rom();
map(0x1800, 0x18ff).mirror(0x8000).ram().share("nvram"); // 5101L-1 256x4
map(0x2000, 0x2fff).rom();
@ -163,11 +167,13 @@ void gts80b_state::gts80b_map(address_map &map)
void gts80b_state::master_map(address_map &map)
{
map(0x0000, 0x7fff).mirror(0x8000).rom();
map(0x0000, 0x017f).mirror(0x8000).ram();
map(0x0000, 0x007f).mirror(0x8000).m(m_riot1, FUNC(mos6532_new_device::ram_map));
map(0x0080, 0x00ff).mirror(0x8000).m(m_riot2, FUNC(mos6532_new_device::ram_map));
map(0x0100, 0x017f).mirror(0x8000).m(m_riot3, FUNC(mos6532_new_device::ram_map));
map(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).mirror(0x8000).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0280, 0x02ff).mirror(0x8000).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0300, 0x037f).mirror(0x8000).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0200, 0x021f).mirror(0x8060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x029f).mirror(0x8060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x031f).mirror(0x8060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1800, 0x18ff).mirror(0x8000).ram().share("nvram"); // 5101L-1 256x4
}
@ -363,8 +369,8 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER( gts80b_state::slam_w )
{
u8 val = m_slam_low ? 0 : 0x80;
m_riot2->porta_in_set(newval ? val : val^0x80, 0x80);
u8 val = m_slam_low ? 0 : 1;
m_riot2->pa_bit_w<7>(newval ? val : val^1);
}
static const uint16_t patterns[] = {
@ -612,21 +618,21 @@ void gts80b_state::p0(machine_config &config)
config.set_default_layout(layout_gts80b);
/* Devices */
RIOT6532(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->in_pa_callback().set(FUNC(gts80b_state::port1a_r)); // sw_r
m_riot1->out_pb_callback().set(FUNC(gts80b_state::port1b_w)); // sw_w
m_riot1->irq_callback().set("irq", FUNC(input_merger_device::in_w<0>));
MOS6532_NEW(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->pa_rd_callback().set(FUNC(gts80b_state::port1a_r)); // sw_r
m_riot1->pb_wr_callback().set(FUNC(gts80b_state::port1b_w)); // sw_w
m_riot1->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<0>));
RIOT6532(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->in_pa_callback().set(FUNC(gts80b_state::port2a_r)); // pa7 - slam tilt
m_riot2->out_pa_callback().set(FUNC(gts80b_state::port2a_w)); // digit select
m_riot2->out_pb_callback().set(FUNC(gts80b_state::port2b_w)); // seg
m_riot2->irq_callback().set("irq", FUNC(input_merger_device::in_w<1>));
MOS6532_NEW(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->pa_rd_callback().set(FUNC(gts80b_state::port2a_r)); // pa7 - slam tilt
m_riot2->pa_wr_callback().set(FUNC(gts80b_state::port2a_w)); // digit select
m_riot2->pb_wr_callback().set(FUNC(gts80b_state::port2b_w)); // seg
m_riot2->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<1>));
RIOT6532(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->out_pa_callback().set(FUNC(gts80b_state::port3a_w)); // sol, snd
m_riot3->out_pb_callback().set(FUNC(gts80b_state::port3b_w)); // lamps
m_riot3->irq_callback().set("irq", FUNC(input_merger_device::in_w<2>));
MOS6532_NEW(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->pa_wr_callback().set(FUNC(gts80b_state::port3a_w)); // sol, snd
m_riot3->pb_wr_callback().set(FUNC(gts80b_state::port3b_w)); // lamps
m_riot3->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<2>));
INPUT_MERGER_ANY_HIGH(config, "irq").output_handler().set_inputline("maincpu", m6502_device::IRQ_LINE);

View File

@ -150,7 +150,7 @@ u8 spectra_state::porta_r()
u8 key = m_io_keyboard[row]->read();
u8 ret = ((BIT(key, m_porta & 7)) ? 0x40 : 0) | (m_porta & 0xbf);
if (ret == 0x1b && m_p_ram[0x7b] < 0x1E)
if (ret == 0x1b && m_p_ram[0x7b] < 0x1e)
m_samples->start(3, 8); // coin
return ret;
@ -209,21 +209,25 @@ TIMER_DEVICE_CALLBACK_MEMBER( spectra_state::outtimer)
u8 segments = patterns[data&15] | (BIT(data, 4) ? 0x80 : 0);
m_digits[m_out_offs] = segments;
}
else if (m_out_offs < 0x6f)
else
if (m_out_offs < 0x6f)
{
m_out_offs = 0x6f;
}
else if (m_out_offs < 0x74)
else
if (m_out_offs < 0x74)
{
if (m_p_ram[m_out_offs])
m_samples->start(0, 5); // holes
}
else if (m_out_offs < 0x77)
else
if (m_out_offs < 0x77)
{
if (m_p_ram[m_out_offs])
m_samples->start(1, 0); // bumpers
}
else if (m_out_offs < 0x79)
else
if (m_out_offs < 0x79)
{
if (m_p_ram[m_out_offs])
m_samples->start(2, 7); // slings

View File

@ -48,23 +48,17 @@ DEFINE_DEVICE_TYPE(GOTTLIEB_SOUND_REV2, gottlieb_sound_r2_device,
// gottlieb_sound_p2_device - constructors
//-------------------------------------------------
gottlieb_sound_p2_device::gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GOTTLIEB_SOUND_PIN2, tag, owner, clock)
, device_mixer_interface(mconfig, *this)
, m_cpu(*this, "audiocpu")
, m_r6530(*this, "r6530")
, m_sndcmd(0)
gottlieb_sound_p2_device::gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p2_device(mconfig, GOTTLIEB_SOUND_PIN2, tag, owner, clock)
{
}
//-------------------------------------------------
// read port -
//-------------------------------------------------
uint8_t gottlieb_sound_p2_device::r6530b_r()
gottlieb_sound_p2_device::gottlieb_sound_p2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, type, tag, owner, clock)
, device_mixer_interface(mconfig, *this)
, m_cpu(*this, "audiocpu")
, m_r6530(*this, "r6530")
{
return m_sndcmd;
}
@ -72,26 +66,31 @@ uint8_t gottlieb_sound_p2_device::r6530b_r()
// write - handle an external command write
//-------------------------------------------------
void gottlieb_sound_p2_device::write(uint8_t data)
void gottlieb_sound_p2_device::write_sync(int param)
{
// write the command data to bits 0-3 (also bit 6 used in system1 pinballs)
uint8_t pb0_3 = ~data & 0x4f; // U7
uint8_t pb4_7 = ioport("SB0")->read() & 0x90;
m_sndcmd = pb0_3 | pb4_7;
m_r6530->write(2, m_sndcmd); // push to portB, but doesn't seem to be needed
u8 pb0_3 = ~param & 0x4f; // U7
u8 pb4_7 = ioport("SB1")->read() & 0x90;
m_r6530->pb_w(0, pb0_3 | pb4_7, 0xdf);
}
void gottlieb_sound_p2_device::write(u8 data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(gottlieb_sound_p2_device::write_sync), this), data);
}
//-------------------------------------------------
// audio CPU map
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_p2_device::p2_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x017f).ram();
map(0x0200, 0x03ff).rw(m_r6530, FUNC(mos6530_device::read), FUNC(mos6530_device::write));
map(0x0400, 0x0fff).rom();
map(0x0000, 0x003f).mirror(0x1c0).m(m_r6530, FUNC(mos6530_new_device::ram_map));
map(0x0200, 0x020f).mirror(0x1f0).m(m_r6530, FUNC(mos6530_new_device::io_map));
map(0x0400, 0x07ff).rom();
map(0x0c00, 0x0fff).m(m_r6530, FUNC(mos6530_new_device::rom_map));
}
@ -100,22 +99,28 @@ void gottlieb_sound_p2_device::p2_map(address_map &map)
//-------------------------------------------------
INPUT_PORTS_START( gottlieb_sound_p2 )
PORT_START("SB0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Sound Test") PORT_CODE(KEYCODE_7_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, gottlieb_sound_p2_device, audio_nmi, 0)
PORT_DIPNAME( 0x80, 0x80, "Sound or Tones" )
PORT_START("SB1")
PORT_DIPNAME( 0x80, 0x80, "Sound or Tones" ) PORT_DIPLOCATION("SB1:1")
PORT_DIPSETTING( 0x80, "Sound" )
PORT_DIPSETTING( 0x00, "Tones" )
PORT_DIPNAME( 0x10, 0x00, "Attract Sound" )
PORT_DIPNAME( 0x10, 0x00, "Attract Sound" ) PORT_DIPLOCATION("SB1:2")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // Makes a sound every 6 minutes
// The sound test will only work if the 2 above dips are in opposing directions (one off and one on)
PORT_START("TEST")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Sound Test") PORT_CODE(KEYCODE_7_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, gottlieb_sound_p2_device, audio_nmi, 0)
INPUT_PORTS_END
// The sound test will only work if the 2 above dips are in opposing directions (one off and one on)
INPUT_CHANGED_MEMBER( gottlieb_sound_p2_device::audio_nmi )
ioport_constructor gottlieb_sound_p2_device::device_input_ports() const
{
// Diagnostic button sends a pulse to NMI pin
if (!newval)
m_cpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
return INPUT_PORTS_NAME(gottlieb_sound_p2);
}
INPUT_CHANGED_MEMBER(gottlieb_sound_p2_device::audio_nmi)
{
// Diagnostic button is tied to NMI pin
m_cpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
@ -130,101 +135,99 @@ void gottlieb_sound_p2_device::device_add_mconfig(machine_config &config)
m_cpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_p2_device::p2_map);
// I/O configuration
MOS6530(config, m_r6530, 800'000); // same as cpu
m_r6530->out_pa_callback().set("dac", FUNC(dac_byte_interface::data_w));
m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_p2_device::r6530b_r));
MOS6530_NEW(config, m_r6530, 800'000); // same as cpu
m_r6530->pa_wr_callback().set("dac", FUNC(dac_byte_interface::data_w));
// sound devices
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.50); // SSS1408-6P
}
//-------------------------------------------------
// device_input_ports - return a pointer to
// the device's I/O ports
//-------------------------------------------------
ioport_constructor gottlieb_sound_p2_device::device_input_ports() const
{
return INPUT_PORTS_NAME( gottlieb_sound_p2 );
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void gottlieb_sound_p2_device::device_start()
{
save_item(NAME(m_sndcmd));
// register for save states
save_item(NAME(m_dummy));
}
//**************************************************************************
// PIN 3 SOUND BOARD: 6502 + 6530 + DAC
// No schematic found, so it's reversed engineered guesswork
// PIN 3 SOUND BOARD: p2 with a piggyback board in the R6530 socket for larger external ROM and IRQ support
//**************************************************************************
//-------------------------------------------------
// gottlieb_sound_p3_device - constructors
//-------------------------------------------------
gottlieb_sound_p3_device::gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GOTTLIEB_SOUND_PIN3, tag, owner, clock)
, device_mixer_interface(mconfig, *this)
, m_cpu(*this, "audiocpu")
, m_r6530(*this, "r6530")
, m_sndcmd(0)
gottlieb_sound_p3_device::gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p2_device(mconfig, GOTTLIEB_SOUND_PIN3, tag, owner, clock)
, m_irqclock(false)
, m_irqenable(false)
{
}
//-------------------------------------------------
// read port -
//-------------------------------------------------
uint8_t gottlieb_sound_p3_device::r6530b_r()
{
return m_sndcmd;
}
//-------------------------------------------------
// write port -
//-------------------------------------------------
void gottlieb_sound_p3_device::r6530b_w(u8 data)
{
// if (BIT(data, 6))
// m_cpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
}
//-------------------------------------------------
// write - handle an external command write
//-------------------------------------------------
void gottlieb_sound_p3_device::write(uint8_t data)
void gottlieb_sound_p3_device::write_sync(int param)
{
data = (data ^ 15) & 15;
//if (data) printf("%X ",data);
u8 pb7 = (data) ? 0 : 0x80;
m_sndcmd = data | pb7;
//m_r6530->write(2, m_sndcmd); // has no effect
if (!pb7)
m_cpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
// low 4 bits NORed together, triggers IRQ on falling edge
bool irqclock = (~param & 0xf) == 0;
if (!irqclock && m_irqclock && m_irqenable)
m_cpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
m_irqclock = irqclock;
// same as p2, except for PB6
gottlieb_sound_p2_device::write_sync(param & 0xf);
}
//-------------------------------------------------
// audio CPU map
// internal I/O
//-------------------------------------------------
void gottlieb_sound_p3_device::r6530b_w(u8 data)
{
m_irqenable = bool(data & 0x40);
if (!m_irqenable)
m_cpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
}
//-------------------------------------------------
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_p3_device::p3_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x017f).ram();
map(0x0200, 0x03ff).rw(m_r6530, FUNC(mos6530_device::read), FUNC(mos6530_device::write));
map(0x0400, 0x0fff).rom();
p2_map(map);
map(0x0400, 0x07ff).unmapr(); // unpopulated
map(0x0800, 0x0fff).rom();
}
//-------------------------------------------------
// input ports
//-------------------------------------------------
INPUT_PORTS_START( gottlieb_sound_p3 )
PORT_START("SB1")
PORT_DIPNAME( 0x80, 0x80, "Sound Test" ) PORT_DIPLOCATION("SB1:1")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SB1:2" )
INPUT_PORTS_END
ioport_constructor gottlieb_sound_p3_device::device_input_ports() const
{
return INPUT_PORTS_NAME(gottlieb_sound_p3);
}
@ -234,18 +237,10 @@ void gottlieb_sound_p3_device::p3_map(address_map &map)
void gottlieb_sound_p3_device::device_add_mconfig(machine_config &config)
{
// audio CPU
M6503(config, m_cpu, 800'000); // clock is a gate, a resistor and a capacitor. Freq 675-1000kHz.
gottlieb_sound_p2_device::device_add_mconfig(config);
m_cpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_p3_device::p3_map);
// I/O configuration
MOS6530(config, m_r6530, 800'000); // same as cpu
m_r6530->out_pa_callback().set("dac", FUNC(dac_byte_interface::data_w));
m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_p3_device::r6530b_r));
m_r6530->out_pb_callback().set(FUNC(gottlieb_sound_p3_device::r6530b_w));
// sound devices
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.50); // SSS1408-6P
m_r6530->pb_wr_callback().set(FUNC(gottlieb_sound_p3_device::r6530b_w));
}
@ -255,10 +250,15 @@ void gottlieb_sound_p3_device::device_add_mconfig(machine_config &config)
void gottlieb_sound_p3_device::device_start()
{
save_item(NAME(m_sndcmd));
gottlieb_sound_p2_device::device_start();
// register for save states
save_item(NAME(m_irqclock));
save_item(NAME(m_irqenable));
}
//**************************************************************************
// REV 1 SOUND BOARD: 6502 + DAC; part number MA-309
//**************************************************************************
@ -267,17 +267,12 @@ void gottlieb_sound_p3_device::device_start()
// gottlieb_sound_r1_device - constructors
//-------------------------------------------------
gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_r1_device(mconfig, GOTTLIEB_SOUND_REV1, tag, owner, clock)
{
}
gottlieb_sound_r1_device::gottlieb_sound_r1_device(
const machine_config &mconfig,
device_type type,
const char *tag,
device_t *owner,
uint32_t clock)
gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, type, tag, owner, clock)
, device_mixer_interface(mconfig, *this)
, m_dac(*this, "dac")
@ -290,17 +285,22 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(
// write - handle an external command write
//-------------------------------------------------
void gottlieb_sound_r1_device::write_sync(int param)
{
// write the command data to the low 6 bits, the low 4 bits are also NANDed together and go to PA7
u8 pa0_5 = ~param & 0x3f;
u8 pa7 = (param & 0x0f) != 0xf;
m_riot->pa_w(0, pa0_5 | (pa7 << 7), 0xbf);
}
void gottlieb_sound_r1_device::write(u8 data)
{
// write the command data to the low 6 bits, and the trigger to the upper bit
uint8_t pa7 = (data & 0x0f) != 0xf;
uint8_t pa0_5 = ~data & 0x3f;
m_riot->porta_in_set(pa0_5 | (pa7 << 7), 0xbf);
machine().scheduler().synchronize(timer_expired_delegate(FUNC(gottlieb_sound_r1_device::write_sync), this), data);
}
//-------------------------------------------------
// audio CPU map
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_r1_device::r1_map(address_map &map)
@ -308,21 +308,12 @@ void gottlieb_sound_r1_device::r1_map(address_map &map)
// A15 not decoded except in expansion socket
map.global_mask(0x7fff);
map.unmap_value_high();
map(0x0000, 0x007f).mirror(0x0d80).ram();
map(0x0200, 0x021f).mirror(0x0de0).rw("riot", FUNC(riot6532_device::read), FUNC(riot6532_device::write));
map(0x0000, 0x007f).mirror(0x0d80).m(m_riot, FUNC(mos6532_new_device::ram_map));
map(0x0200, 0x021f).mirror(0x0de0).m(m_riot, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x1000).mirror(0x0fff).w("dac", FUNC(dac_byte_interface::data_w));
map(0x6000, 0x7fff).rom();
}
void gottlieb_sound_r1_with_votrax_device::r1_map(address_map &map)
{
// A15 not decoded except in expansion socket
gottlieb_sound_r1_device::r1_map(map);
map.unmap_value_high();
map(0x2000, 0x2000).mirror(0x0fff).w(FUNC(gottlieb_sound_r1_with_votrax_device::votrax_data_w));
map(0x3000, 0x3000).mirror(0x0fff).w(FUNC(gottlieb_sound_r1_with_votrax_device::speech_clock_dac_w));
}
//-------------------------------------------------
// input ports
@ -342,11 +333,10 @@ INPUT_PORTS_START( gottlieb_sound_r1 )
PORT_BIT( 0x80, 0x80, IPT_CUSTOM )
INPUT_PORTS_END
INPUT_PORTS_START( gottlieb_sound_r1_with_votrax )
PORT_INCLUDE(gottlieb_sound_r1)
PORT_MODIFY("SB1")
PORT_BIT( 0x80, 0x80, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("votrax", votrax_sc01_device, request)
INPUT_PORTS_END
ioport_constructor gottlieb_sound_r1_device::device_input_ports() const
{
return INPUT_PORTS_NAME(gottlieb_sound_r1);
}
//-------------------------------------------------
@ -362,27 +352,16 @@ void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config)
INPUT_MERGER_ANY_HIGH(config, "nmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
// I/O configuration
RIOT6532(config, m_riot, SOUND1_CLOCK/4);
m_riot->in_pb_callback().set_ioport("SB1");
m_riot->out_pb_callback().set("nmi", FUNC(input_merger_device::in_w<0>)).bit(7).invert(); // unsure if this is ever used, but the NMI is connected to the RIOT's PB7
m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE);
MOS6532_NEW(config, m_riot, SOUND1_CLOCK/4);
m_riot->pb_rd_callback().set_ioport("SB1");
m_riot->pb_wr_callback().set("nmi", FUNC(input_merger_device::in_w<0>)).bit(7).invert(); // unsure if this is ever used, but the NMI is connected to the RIOT's PB7
m_riot->irq_wr_callback().set_inputline("audiocpu", M6502_IRQ_LINE);
// sound devices
MC1408(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 0.25);
}
//-------------------------------------------------
// device_input_ports - return a pointer to
// the device's I/O ports
//-------------------------------------------------
ioport_constructor gottlieb_sound_r1_device::device_input_ports() const
{
return INPUT_PORTS_NAME( gottlieb_sound_r1 );
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@ -404,14 +383,78 @@ void gottlieb_sound_r1_device::device_start()
// constructor
//-------------------------------------------------
gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_r1_device(mconfig, GOTTLIEB_SOUND_REV1_VOTRAX, tag, owner, clock)
, m_votrax(*this, "votrax")
, m_last_speech_clock(0)
, m_speech_clock(0)
{
}
//-------------------------------------------------
// votrax_data_w - write data to the Votrax SC-01
// speech chip
//-------------------------------------------------
void gottlieb_sound_r1_with_votrax_device::votrax_data_w(u8 data)
{
m_votrax->inflection_w(data >> 6);
m_votrax->write(~data & 0x3f);
}
//-------------------------------------------------
// speech_clock_dac_w - modify the clock driving
// the Votrax SC-01 speech chip
//-------------------------------------------------
u32 gottlieb_sound_r1_with_votrax_device::convert_speech_clock(u8 data)
{
// prevent negative clock values (and possible crash)
if (data < 0x40) data = 0x40;
// totally random guesswork; would like to get real measurements on a board
m_speech_clock = 950000 + (data - 0xa0) * 5500;
return m_speech_clock;
}
void gottlieb_sound_r1_with_votrax_device::speech_clock_dac_w(u8 data)
{
//logerror("clock = %02X\n", data);
m_votrax->set_unscaled_clock(convert_speech_clock(data));
}
//-------------------------------------------------
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_r1_with_votrax_device::r1_map(address_map &map)
{
gottlieb_sound_r1_device::r1_map(map);
map(0x2000, 0x2000).mirror(0x0fff).w(FUNC(gottlieb_sound_r1_with_votrax_device::votrax_data_w));
map(0x3000, 0x3000).mirror(0x0fff).w(FUNC(gottlieb_sound_r1_with_votrax_device::speech_clock_dac_w));
}
//-------------------------------------------------
// input ports
//-------------------------------------------------
INPUT_PORTS_START( gottlieb_sound_r1_with_votrax )
PORT_INCLUDE( gottlieb_sound_r1 )
PORT_MODIFY("SB1")
PORT_BIT( 0x80, 0x80, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("votrax", votrax_sc01_device, request)
INPUT_PORTS_END
ioport_constructor gottlieb_sound_r1_with_votrax_device::device_input_ports() const
{
return INPUT_PORTS_NAME(gottlieb_sound_r1_with_votrax);
}
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
@ -423,23 +466,13 @@ void gottlieb_sound_r1_with_votrax_device::device_add_mconfig(machine_config &co
m_dac->reset_routes();
m_dac->add_route(ALL_OUTPUTS, *this, 0.20);
VOTRAX_SC01A(config, m_votrax, 720000); // Note: early boards use an SC-01 (reactor, q-bert test version, maybe some early pinball machines?) while later boards (qbert main release, most pinball machines) use an SC-01-A
// Note: early boards use an SC-01 (reactor, q-bert test version, maybe some early pinball machines?) while later boards (qbert main release, most pinball machines) use an SC-01-A
VOTRAX_SC01A(config, m_votrax, convert_speech_clock(0));
m_votrax->ar_callback().set("nmi", FUNC(input_merger_device::in_w<1>));
m_votrax->add_route(ALL_OUTPUTS, *this, 0.80);
}
//-------------------------------------------------
// device_input_ports - return a pointer to
// the device's I/O ports
//-------------------------------------------------
ioport_constructor gottlieb_sound_r1_with_votrax_device::device_input_ports() const
{
return INPUT_PORTS_NAME( gottlieb_sound_r1_with_votrax );
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@ -447,50 +480,9 @@ ioport_constructor gottlieb_sound_r1_with_votrax_device::device_input_ports() co
void gottlieb_sound_r1_with_votrax_device::device_start()
{
gottlieb_sound_r1_device::device_start();
save_item(NAME(m_last_speech_clock));
}
void gottlieb_sound_r1_with_votrax_device::device_post_load()
{
gottlieb_sound_r1_device::device_post_load();
// totally random guesswork; would like to get real measurements on a board
m_votrax->set_unscaled_clock(900000 + (m_last_speech_clock - 0xa0) * 9000);
}
//-------------------------------------------------
// votrax_data_w - write data to the Votrax SC-01
// speech chip
//-------------------------------------------------
void gottlieb_sound_r1_with_votrax_device::votrax_data_w(uint8_t data)
{
m_votrax->inflection_w(data >> 6);
m_votrax->write(~data & 0x3f);
}
//-------------------------------------------------
// speech_clock_dac_w - modify the clock driving
// the Votrax SC-01 speech chip
//-------------------------------------------------
void gottlieb_sound_r1_with_votrax_device::speech_clock_dac_w(uint8_t data)
{
// prevent negative clock values (and possible crash)
if (data < 0x60) data = 0x60;
// nominal clock is 0xa0
if (data != m_last_speech_clock)
{
logerror("clock = %02X\n", data);
// totally random guesswork; would like to get real measurements on a board
m_votrax->set_unscaled_clock(950000 + (data - 0xa0) * 5500);
m_last_speech_clock = data;
}
// register for save states
save_item(NAME(m_speech_clock));
}
@ -503,7 +495,7 @@ void gottlieb_sound_r1_with_votrax_device::speech_clock_dac_w(uint8_t data)
// gottlieb_sound_r2_device - constructor
//-------------------------------------------------
gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p4_device(mconfig, GOTTLIEB_SOUND_REV2, tag, owner, clock)
, m_sp0250(*this, "spsnd")
, m_cobram3_mod(false)
@ -517,7 +509,7 @@ gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig
// request line as an input port bit
//-------------------------------------------------
CUSTOM_INPUT_MEMBER( gottlieb_sound_r2_device::speech_drq_custom_r )
CUSTOM_INPUT_MEMBER(gottlieb_sound_r2_device::speech_drq_custom_r)
{
return m_sp0250->drq_r();
}
@ -528,9 +520,9 @@ CUSTOM_INPUT_MEMBER( gottlieb_sound_r2_device::speech_drq_custom_r )
// register on the speech board
//-------------------------------------------------
void gottlieb_sound_r2_device::speech_control_w(uint8_t data)
void gottlieb_sound_r2_device::speech_control_w(u8 data)
{
uint8_t previous = m_speech_control;
u8 previous = m_speech_control;
m_speech_control = data;
// bit 0 enables/disables the NMI line
@ -584,14 +576,14 @@ void gottlieb_sound_r2_device::speech_control_w(uint8_t data)
// SP0250 latch register
//-------------------------------------------------
void gottlieb_sound_r2_device::sp0250_latch_w(uint8_t data)
void gottlieb_sound_r2_device::sp0250_latch_w(u8 data)
{
m_sp0250_latch = data;
}
//-------------------------------------------------
// sound CPU address map
// audio CPU address maps
//-------------------------------------------------
void gottlieb_sound_r2_device::r2_dmap(address_map &map)
@ -604,11 +596,6 @@ void gottlieb_sound_r2_device::r2_dmap(address_map &map)
map(0xc000, 0xdfff).mirror(0x2000).rom();
}
//-------------------------------------------------
// speech CPU address map
//-------------------------------------------------
void gottlieb_sound_r2_device::r2_ymap(address_map &map)
{
map.unmap_value_high();
@ -639,6 +626,11 @@ INPUT_PORTS_START( gottlieb_sound_r2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_sound_r2_device, speech_drq_custom_r)
INPUT_PORTS_END
ioport_constructor gottlieb_sound_r2_device::device_input_ports() const
{
return INPUT_PORTS_NAME(gottlieb_sound_r2);
}
//-------------------------------------------------
// device_add_mconfig - add device configuration
@ -667,17 +659,6 @@ void gottlieb_sound_r2_device::device_add_mconfig(machine_config &config)
}
//-------------------------------------------------
// device_input_ports - return a pointer to
// the device's I/O ports
//-------------------------------------------------
ioport_constructor gottlieb_sound_r2_device::device_input_ports() const
{
return INPUT_PORTS_NAME( gottlieb_sound_r2 );
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@ -695,6 +676,7 @@ void gottlieb_sound_r2_device::device_start()
}
//**************************************************************************
// PIN4 SOUND BOARD: 6502 + 2 x DAC + 2 x AY-8913
//**************************************************************************
@ -703,12 +685,12 @@ void gottlieb_sound_r2_device::device_start()
// gottlieb_sound_p4_device - constructor
//-------------------------------------------------
gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p4_device(mconfig, GOTTLIEB_SOUND_PIN4, tag, owner, clock)
{
}
gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, type, tag, owner, clock)
, device_mixer_interface(mconfig, *this)
, m_dcpu(*this, "audiocpu")
@ -718,7 +700,6 @@ gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig
, m_ay2(*this, "ay2")
, m_nmi_timer(nullptr)
, m_nmi_clear_timer(nullptr)
, m_latch_timer(nullptr)
, m_nmi_rate(0)
, m_nmi_state(0)
, m_dcpu_latch(0)
@ -736,13 +717,16 @@ gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig
// write - handle an external command write
//-------------------------------------------------
void gottlieb_sound_p4_device::write(u8 data)
void gottlieb_sound_p4_device::write_sync(int param)
{
// when data is not 0xff, the transparent latch at A3 allows it to pass through unmolested
if (data != 0xff)
if (param != 0xff)
{
// sync the latch data write
m_latch_timer->adjust(attotime::zero, data);
// each CPU has its own latch
m_dcpu_latch = param;
m_ycpu_latch = param;
if (m_dcpu2)
m_dcpu2_latch = param;
// if the previous data was 0xff, clock an IRQ on each
if (m_last_command == 0xff)
@ -753,7 +737,12 @@ void gottlieb_sound_p4_device::write(u8 data)
m_dcpu2->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
}
}
m_last_command = data;
m_last_command = param;
}
void gottlieb_sound_p4_device::write(u8 data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(gottlieb_sound_p4_device::write_sync), this), data);
}
@ -786,7 +775,7 @@ inline void gottlieb_sound_p4_device::nmi_state_update()
// from the audio CPU
//-------------------------------------------------
uint8_t gottlieb_sound_p4_device::audio_data_r()
u8 gottlieb_sound_p4_device::audio_data_r()
{
if (!machine().side_effects_disabled())
m_dcpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
@ -799,7 +788,7 @@ uint8_t gottlieb_sound_p4_device::audio_data_r()
// from the speech CPU
//-------------------------------------------------
uint8_t gottlieb_sound_p4_device::speech_data_r()
u8 gottlieb_sound_p4_device::speech_data_r()
{
if (!machine().side_effects_disabled())
m_ycpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
@ -812,7 +801,7 @@ uint8_t gottlieb_sound_p4_device::speech_data_r()
// speech CPU to the audio CPU
//-------------------------------------------------
uint8_t gottlieb_sound_p4_device::signal_audio_nmi_r()
u8 gottlieb_sound_p4_device::signal_audio_nmi_r()
{
if (!machine().side_effects_disabled())
signal_audio_nmi_w();
@ -825,7 +814,7 @@ uint8_t gottlieb_sound_p4_device::signal_audio_nmi_r()
// speech CPU to the audio CPU
//-------------------------------------------------
void gottlieb_sound_p4_device::signal_audio_nmi_w(uint8_t data)
void gottlieb_sound_p4_device::signal_audio_nmi_w(u8 data)
{
m_dcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
if (m_dcpu2)
@ -838,7 +827,7 @@ void gottlieb_sound_p4_device::signal_audio_nmi_w(uint8_t data)
// CPU
//-------------------------------------------------
void gottlieb_sound_p4_device::nmi_rate_w(uint8_t data)
void gottlieb_sound_p4_device::nmi_rate_w(u8 data)
{
// the new rate is picked up when the previous timer expires
m_nmi_rate = data;
@ -850,9 +839,9 @@ void gottlieb_sound_p4_device::nmi_rate_w(uint8_t data)
// register on the speech board
//-------------------------------------------------
void gottlieb_sound_p4_device::speech_ctrl_w(uint8_t data)
void gottlieb_sound_p4_device::speech_ctrl_w(u8 data)
{
uint8_t previous = m_speech_control;
u8 previous = m_speech_control;
m_speech_control = data;
// bit 0 enables/disables the NMI line
@ -879,14 +868,14 @@ void gottlieb_sound_p4_device::speech_ctrl_w(uint8_t data)
// latch register
//-------------------------------------------------
void gottlieb_sound_p4_device::psg_latch_w(uint8_t data)
void gottlieb_sound_p4_device::psg_latch_w(u8 data)
{
m_psg_latch = data;
}
//-------------------------------------------------
// sound CPU address map
// audio CPU address maps
//-------------------------------------------------
void gottlieb_sound_p4_device::p4_dmap(address_map &map)
@ -899,11 +888,6 @@ void gottlieb_sound_p4_device::p4_dmap(address_map &map)
map(0x8000, 0xffff).rom();
}
//-------------------------------------------------
// speech CPU address map
//-------------------------------------------------
void gottlieb_sound_p4_device::p4_ymap(address_map &map)
{
map.unmap_value_high();
@ -956,9 +940,6 @@ void gottlieb_sound_p4_device::device_start()
m_nmi_rate = 0;
nmi_timer_adjust();
// set up other timers
m_latch_timer = timer_alloc(FUNC(gottlieb_sound_p4_device::update_latch), this);
// register for save states
save_item(NAME(m_nmi_rate));
save_item(NAME(m_nmi_state));
@ -994,14 +975,6 @@ TIMER_CALLBACK_MEMBER(gottlieb_sound_p4_device::clear_nmi)
nmi_state_update();
}
TIMER_CALLBACK_MEMBER(gottlieb_sound_p4_device::update_latch)
{
// each CPU has its own latch
m_dcpu_latch = param;
m_ycpu_latch = param;
if (m_dcpu2)
m_dcpu2_latch = param;
}
//**************************************************************************
@ -1012,28 +985,29 @@ TIMER_CALLBACK_MEMBER(gottlieb_sound_p4_device::update_latch)
// gottlieb_sound_p5_device - constructor
//-------------------------------------------------
gottlieb_sound_p5_device::gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_p5_device::gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p5_device(mconfig, GOTTLIEB_SOUND_PIN5, tag, owner, clock)
{
}
gottlieb_sound_p5_device::gottlieb_sound_p5_device(
const machine_config &mconfig,
device_type type,
const char *tag,
device_t *owner,
uint32_t clock)
gottlieb_sound_p5_device::gottlieb_sound_p5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p4_device(mconfig, type, tag, owner, clock)
, m_ym2151(*this, "ym2151")
{
}
//-------------------------------------------------
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_p5_device::p5_ymap(address_map &map)
{
gottlieb_sound_p4_device::p4_ymap(map);
p4_ymap(map);
map(0x4000, 0x4000).mirror(0x1fff).lw8(NAME([this](u8 data) { m_ym2151->write(BIT(m_speech_control, 7), data); } ));
}
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
@ -1046,12 +1020,18 @@ void gottlieb_sound_p5_device::device_add_mconfig(machine_config &config)
YM2151(config, m_ym2151, SOUND2_CLOCK).add_route(ALL_OUTPUTS, *this, 0.75);
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void gottlieb_sound_p5_device::device_start()
{
gottlieb_sound_p4_device::device_start();
}
//**************************************************************************
// PIN6 SOUND BOARD: same as p5 + extra 6502 + AD7528
//**************************************************************************
@ -1060,19 +1040,28 @@ void gottlieb_sound_p5_device::device_start()
// gottlieb_sound_p6_device - constructor
//-------------------------------------------------
gottlieb_sound_p6_device::gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_p6_device::gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p5_device(mconfig, GOTTLIEB_SOUND_PIN6, tag, owner, clock)
{
}
uint8_t gottlieb_sound_p6_device::d2_data_r()
//-------------------------------------------------
// internal I/O
//-------------------------------------------------
u8 gottlieb_sound_p6_device::d2_data_r()
{
if (!machine().side_effects_disabled())
m_dcpu2->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
return m_dcpu2_latch;
}
//-------------------------------------------------
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_p6_device::p6_dmap(address_map &map)
{
map.unmap_value_high();
@ -1083,6 +1072,7 @@ void gottlieb_sound_p6_device::p6_dmap(address_map &map)
map(0x8000, 0xffff).rom();
}
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
@ -1102,12 +1092,18 @@ void gottlieb_sound_p6_device::device_add_mconfig(machine_config &config)
.add_route(0, "dac2", -1.0, DAC_INPUT_RANGE_LO);
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void gottlieb_sound_p6_device::device_start()
{
gottlieb_sound_p5_device::device_start();
}
//**************************************************************************
// PIN7 SOUND BOARD: same as p5 + MSM6295
//**************************************************************************
@ -1116,13 +1112,20 @@ void gottlieb_sound_p6_device::device_start()
// gottlieb_sound_p7_device - constructor
//-------------------------------------------------
gottlieb_sound_p7_device::gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
gottlieb_sound_p7_device::gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: gottlieb_sound_p5_device(mconfig, GOTTLIEB_SOUND_PIN7, tag, owner, clock)
, m_oki(*this, "oki")
, m_msm_latch1(0)
, m_msm_latch2(0)
{
}
void gottlieb_sound_p7_device::y_ctrl_w(uint8_t data)
//-------------------------------------------------
// internal I/O
//-------------------------------------------------
void gottlieb_sound_p7_device::y_ctrl_w(u8 data)
{
gottlieb_sound_p4_device::speech_ctrl_w(data);
@ -1130,25 +1133,31 @@ void gottlieb_sound_p7_device::y_ctrl_w(uint8_t data)
m_msm_latch2 = m_msm_latch1;
if (!BIT(m_msm_latch2, 2))
m_oki->write(m_msm_latch1);
m_oki->set_pin7(BIT(m_msm_latch2, 4));
u8 t = BIT(m_msm_latch2, 6) | (BIT(m_msm_latch2, 3) << 1);
m_oki->set_rom_bank(t);
m_oki->set_rom_bank(BIT(m_msm_latch2, 6) | (BIT(m_msm_latch2, 3) << 1));
}
void gottlieb_sound_p7_device::y_latch_w(uint8_t data)
void gottlieb_sound_p7_device::y_latch_w(u8 data)
{
m_msm_latch1 = data;
if (!BIT(m_msm_latch2, 2))
m_oki->write(m_msm_latch1);
}
//-------------------------------------------------
// audio CPU address map
//-------------------------------------------------
void gottlieb_sound_p7_device::p7_ymap(address_map &map)
{
gottlieb_sound_p5_device::p5_ymap(map);
p5_ymap(map);
map(0x7800, 0x7800).mirror(0x07ff).w(FUNC(gottlieb_sound_p7_device::y_latch_w));
map(0xa000, 0xa000).mirror(0x1fff).w(FUNC(gottlieb_sound_p7_device::y_ctrl_w));
}
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
@ -1162,9 +1171,16 @@ void gottlieb_sound_p7_device::device_add_mconfig(machine_config &config)
m_oki->add_route(ALL_OUTPUTS, *this, 1.0);
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void gottlieb_sound_p7_device::device_start()
{
gottlieb_sound_p5_device::device_start();
// register for save states
save_item(NAME(m_msm_latch1));
save_item(NAME(m_msm_latch2));
}

View File

@ -8,8 +8,7 @@
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/m6503.h"
#include "machine/mos6530.h"
#include "machine/6532riot.h"
#include "machine/mos6530n.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "sound/okim6295.h"
@ -43,60 +42,56 @@ class gottlieb_sound_p2_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// read/write
void write(uint8_t data);
void write(u8 data);
// internal communications
DECLARE_INPUT_CHANGED_MEMBER(audio_nmi);
protected:
gottlieb_sound_p2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
virtual void write_sync(int param);
void p2_map(address_map &map);
// devices
required_device<m6503_device> m_cpu;
required_device<mos6530_new_device> m_r6530;
private:
u8 m_dummy; // needed for save-state support
};
// ======================> gottlieb_sound_p3_device
class gottlieb_sound_p3_device : public gottlieb_sound_p2_device
{
public:
// construction/destruction
gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
protected:
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
void p2_map(address_map &map);
virtual void write_sync(int param) override;
private:
// devices
required_device<m6503_device> m_cpu;
required_device<mos6530_device> m_r6530;
uint8_t m_sndcmd = 0;
uint8_t r6530b_r();
};
// ======================> gottlieb_sound_p3_device
class gottlieb_sound_p3_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// read/write
void write(uint8_t data);
protected:
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
void r6530b_w(u8 data);
void p3_map(address_map &map);
private:
// devices
required_device<m6503_device> m_cpu;
required_device<mos6530_device> m_r6530;
uint8_t m_sndcmd = 0;
uint8_t r6530b_r();
void r6530b_w(u8);
bool m_irqclock;
bool m_irqenable;
};
@ -107,28 +102,29 @@ class gottlieb_sound_r1_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// read/write
void write(u8 data);
protected:
gottlieb_sound_r1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
gottlieb_sound_r1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
void write_sync(int param);
virtual void r1_map(address_map &map);
protected:
// devices
required_device<mc1408_device> m_dac;
required_device<mos6532_new_device> m_riot;
private:
// devices
required_device<riot6532_device> m_riot;
u8 m_dummy = 0; // needed for save-state support
u8 m_dummy; // needed for save-state support
};
@ -139,27 +135,28 @@ class gottlieb_sound_r1_with_votrax_device : public gottlieb_sound_r1_device
{
public:
// construction/destruction
gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
protected:
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
virtual void device_post_load() override;
// internal communications
void votrax_data_w(uint8_t data);
void speech_clock_dac_w(uint8_t data);
virtual void device_post_load() override { m_votrax->set_unscaled_clock(m_speech_clock); }
virtual void r1_map(address_map &map) override;
private:
// internal communications
void votrax_data_w(u8 data);
void speech_clock_dac_w(u8 data);
u32 convert_speech_clock(u8 data);
// devices
required_device<votrax_sc01_device> m_votrax;
// internal state
uint8_t m_last_speech_clock = 0;
u32 m_speech_clock;
};
@ -170,30 +167,30 @@ class gottlieb_sound_p4_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// read/write
void write(u8 data);
protected:
gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
void write_sync(int param);
TIMER_CALLBACK_MEMBER(set_nmi);
TIMER_CALLBACK_MEMBER(clear_nmi);
TIMER_CALLBACK_MEMBER(update_latch);
// internal communications
uint8_t speech_data_r();
uint8_t audio_data_r();
uint8_t signal_audio_nmi_r();
void signal_audio_nmi_w(uint8_t data = 0);
void nmi_rate_w(uint8_t data);
void speech_ctrl_w(uint8_t data);
void psg_latch_w(uint8_t data);
u8 speech_data_r();
u8 audio_data_r();
u8 signal_audio_nmi_r();
void signal_audio_nmi_w(u8 data = 0);
void nmi_rate_w(u8 data);
void speech_ctrl_w(u8 data);
void psg_latch_w(u8 data);
void p4_dmap(address_map &map);
void p4_ymap(address_map &map);
@ -210,18 +207,17 @@ protected:
required_device<ay8913_device> m_ay2;
// internal state
emu_timer * m_nmi_timer;
emu_timer * m_nmi_clear_timer;
emu_timer * m_latch_timer;
uint8_t m_nmi_rate;
uint8_t m_nmi_state;
uint8_t m_dcpu_latch;
uint8_t m_ycpu_latch;
uint8_t m_speech_control;
uint8_t m_last_command;
uint8_t m_psg_latch;
uint8_t m_psg_data_latch;
uint8_t m_dcpu2_latch;
emu_timer *m_nmi_timer;
emu_timer *m_nmi_clear_timer;
u8 m_nmi_rate;
u8 m_nmi_state;
u8 m_dcpu_latch;
u8 m_ycpu_latch;
u8 m_speech_control;
u8 m_last_command;
u8 m_psg_latch;
u8 m_psg_data_latch;
u8 m_dcpu2_latch;
};
@ -232,12 +228,12 @@ class gottlieb_sound_r2_device : public gottlieb_sound_p4_device
{
public:
// construction/destruction
gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// configuration helpers
void enable_cobram3_mods() { m_cobram3_mod = true; }
CUSTOM_INPUT_MEMBER( speech_drq_custom_r );
CUSTOM_INPUT_MEMBER(speech_drq_custom_r);
protected:
// device-level overrides
@ -247,8 +243,8 @@ protected:
private:
// internal communications
void sp0250_latch_w(uint8_t data);
void speech_control_w(uint8_t data);
void sp0250_latch_w(u8 data);
void speech_control_w(u8 data);
void r2_dmap(address_map &map);
void r2_ymap(address_map &map);
@ -257,8 +253,8 @@ private:
optional_device<sp0250_device> m_sp0250;
// internal state
bool m_cobram3_mod = 0;
uint8_t m_sp0250_latch = 0;
bool m_cobram3_mod;
u8 m_sp0250_latch;
};
@ -269,16 +265,17 @@ class gottlieb_sound_p5_device : public gottlieb_sound_p4_device
{
public:
// construction/destruction
gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
protected:
gottlieb_sound_p5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
gottlieb_sound_p5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
// device-level overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
void p5_ymap(address_map &map);
optional_device<ym2151_device> m_ym2151;
};
@ -290,7 +287,7 @@ class gottlieb_sound_p6_device : public gottlieb_sound_p5_device
{
public:
// construction/destruction
gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
protected:
// device-level overrides
@ -299,7 +296,7 @@ protected:
private:
void p6_dmap(address_map &map);
uint8_t d2_data_r();
u8 d2_data_r();
};
@ -310,7 +307,7 @@ class gottlieb_sound_p7_device : public gottlieb_sound_p5_device
{
public:
// construction/destruction
gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
protected:
// device-level overrides
@ -321,8 +318,10 @@ private:
void p7_ymap(address_map &map);
void y_ctrl_w(u8);
void y_latch_w(u8);
uint8_t m_msm_latch1 = 0;
uint8_t m_msm_latch2 = 0;
optional_device<okim6295_device> m_oki;
u8 m_msm_latch1;
u8 m_msm_latch2;
};