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 // copyright-holders:Alex Pasadyn,Zsolt Vasvari,Aaron Giles
/**************************************************************************** /****************************************************************************
Gottlieb Exterminator hardware Premier Technology (Gottlieb) Exterminator hardware
driver by Zsolt Vasvari and Alex Pasadyn 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) 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(machine_config &config);
void gottlieb2_ram_rom(machine_config &config); void gottlieb2_ram_rom(machine_config &config);
void reactor(machine_config &config); void reactor(machine_config &config);
void tylz(machine_config &config);
void g2laser(machine_config &config); void g2laser(machine_config &config);
void qbert(machine_config &config); void qbert(machine_config &config);
void qbert_knocker(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); 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) void gottlieb_state::gottlieb1_rom(machine_config &config)
{ {
gottlieb1(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) void gottlieb_state::reactor(machine_config &config)
{ {
gottlieb1_votrax(config); gottlieb1_votrax(config);
@ -2234,11 +2232,6 @@ void gottlieb_state::qbert(machine_config &config)
qbert_knocker(config); qbert_knocker(config);
} }
void gottlieb_state::tylz(machine_config &config)
{
gottlieb1_votrax(config);
}
void gottlieb_state::screwloo(machine_config &config) void gottlieb_state::screwloo(machine_config &config)
{ {
gottlieb2(config); gottlieb2(config);
@ -2271,6 +2264,7 @@ void gottlieb_state::cobram3(machine_config &config)
} }
/************************************* /*************************************
* *
* ROM definitions * 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, 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, 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, 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( 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, 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 ) 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 p1(machine_config &config); // ne555 tones
void p2(machine_config &config); // multi-mode sound card void p2(machine_config &config); // multi-mode sound card
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private: private:
u8 gts1_solenoid_r(offs_t offset); u8 gts1_solenoid_r(offs_t offset);
void gts1_solenoid_w(offs_t offset, u8 data); void gts1_solenoid_w(offs_t offset, u8 data);
@ -139,9 +143,6 @@ private:
void gts1_do_w(u8 data); void gts1_do_w(u8 data);
void nvram_w(); void nvram_w();
virtual void machine_start() override;
virtual void machine_reset() override;
void gts1_map(address_map &map); void gts1_map(address_map &map);
void gts1_data(address_map &map); void gts1_data(address_map &map);
void gts1_io(address_map &map); void gts1_io(address_map &map);
@ -821,8 +822,9 @@ ROM_START(astannie)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -836,8 +838,9 @@ ROM_START(buckrgrs)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -900,8 +903,9 @@ ROM_START(geniep)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -957,8 +961,9 @@ ROM_START(roldisco)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -1019,8 +1024,9 @@ ROM_START(hulk)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -1034,8 +1040,9 @@ ROM_START(torch)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -1049,8 +1056,9 @@ ROM_START(totem)
ROM_REGION( 0x1000, "p2sound:audiocpu", 0) ROM_REGION( 0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -1065,7 +1073,7 @@ ROM_END
} // Anonymous namespace } // Anonymous namespace
GAME(1977, gts1, 0, p0, gts1, gts1_state, empty_init, ROT0, "Gottlieb", "System 1", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING) GAME(1977, gts1, 0, p0, gts1, gts1_state, empty_init, ROT0, "Gottlieb", "System 1", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING)
GAME(19??, sys1test, gts1, p0, gts1, gts1_state, empty_init, ROT0, "Gottlieb", "System 1 Test prom", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE ) GAME(19??, sys1test, gts1, p0, gts1, gts1_state, empty_init, ROT0, "Gottlieb", "System 1 Test prom", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE )
// chimes // chimes

View File

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

View File

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

View File

@ -78,9 +78,12 @@ public:
void p0(machine_config &config); // no sound card void p0(machine_config &config); // no sound card
void p2(machine_config &config); // multi-mode card void p2(machine_config &config); // multi-mode card
void r1v(machine_config &config); // r1 with votrax void r1v(machine_config &config); // r1 with votrax
void r1(machine_config &config); // r1
DECLARE_INPUT_CHANGED_MEMBER(slam_w); DECLARE_INPUT_CHANGED_MEMBER(slam_w);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private: private:
u8 port1a_r(); u8 port1a_r();
u8 port2a_r(); u8 port2a_r();
@ -96,12 +99,11 @@ private:
u8 m_swrow = 0U; u8 m_swrow = 0U;
u8 m_soundex = 0U; u8 m_soundex = 0U;
u8 m_sol_state[9][2]{}; u8 m_sol_state[9][2]{};
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m6502_device> m_maincpu; required_device<m6502_device> m_maincpu;
required_device<riot6532_device> m_riot1; required_device<mos6532_new_device> m_riot1;
required_device<riot6532_device> m_riot2; required_device<mos6532_new_device> m_riot2;
required_device<riot6532_device> m_riot3; required_device<mos6532_new_device> m_riot3;
required_ioport_array<4> m_io_dips; required_ioport_array<4> m_io_dips;
required_ioport_array<9> m_io_keyboard; required_ioport_array<9> m_io_keyboard;
optional_device<gottlieb_sound_p2_device> m_p2_sound; optional_device<gottlieb_sound_p2_device> m_p2_sound;
@ -113,11 +115,13 @@ private:
void gts80_state::gts80_map(address_map &map) void gts80_state::gts80_map(address_map &map)
{ {
map.global_mask(0x3fff); 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(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0200, 0x021f).mirror(0x0060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x02ff).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0280, 0x029f).mirror(0x0060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x037f).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0300, 0x031f).mirror(0x0060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x17ff).rom(); map(0x1000, 0x17ff).rom();
map(0x1800, 0x18ff).ram().share("nvram"); // 5101L-1 256x4 map(0x1800, 0x18ff).ram().share("nvram"); // 5101L-1 256x4
map(0x2000, 0x2fff).rom(); map(0x2000, 0x2fff).rom();
@ -315,7 +319,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER( gts80_state::slam_w ) 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() u8 gts80_state::port1a_r()
@ -511,21 +515,21 @@ void gts80_state::p0(machine_config &config)
config.set_default_layout(layout_gts80); config.set_default_layout(layout_gts80);
/* Devices */ /* Devices */
RIOT6532(config, m_riot1, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->in_pa_callback().set(FUNC(gts80_state::port1a_r)); // sw_r m_riot1->pa_rd_callback().set(FUNC(gts80_state::port1a_r)); // sw_r
m_riot1->out_pb_callback().set(FUNC(gts80_state::port1b_w)); // sw_w m_riot1->pb_wr_callback().set(FUNC(gts80_state::port1b_w)); // sw_w
m_riot1->irq_callback().set("irq", FUNC(input_merger_device::in_w<0>)); m_riot1->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<0>));
RIOT6532(config, m_riot2, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->in_pa_callback().set(FUNC(gts80_state::port2a_r)); // pa7 - slam tilt m_riot2->pa_rd_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->pa_wr_callback().set(FUNC(gts80_state::port2a_w)); // digit select
m_riot2->out_pb_callback().set(FUNC(gts80_state::port2b_w)); // seg m_riot2->pb_wr_callback().set(FUNC(gts80_state::port2b_w)); // seg
m_riot2->irq_callback().set("irq", FUNC(input_merger_device::in_w<1>)); m_riot2->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<1>));
RIOT6532(config, m_riot3, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->out_pa_callback().set(FUNC(gts80_state::port3a_w)); // sol, snd m_riot3->pa_wr_callback().set(FUNC(gts80_state::port3a_w)); // sol, snd
m_riot3->out_pb_callback().set(FUNC(gts80_state::port3b_w)); // lamps m_riot3->pb_wr_callback().set(FUNC(gts80_state::port3b_w)); // lamps
m_riot3->irq_callback().set("irq", FUNC(input_merger_device::in_w<2>)); 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); 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); 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) void gts80_state::r1v(machine_config &config)
{ {
p0(config); p0(config);
@ -625,8 +623,9 @@ ROM_START(blckhols)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("668-a-s.snd", 0x0400, 0x0400, CRC(5175f307) SHA1(97be8f2bbc393cc45a07fa43daec4bbba2336af8)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -641,8 +640,9 @@ ROM_START(circusp)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("654.snd", 0x0400, 0x0400, CRC(75c3ad67) SHA1(4f59c451b8659d964d5242728814c2d97f68445b)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -657,8 +657,9 @@ ROM_START(cntforce)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("656.snd", 0x0400, 0x0400, CRC(0be2cbe9) SHA1(306a3e7d93733562360285de35b331b5daae7250)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -675,8 +676,9 @@ ROM_START(eclipse)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("671-a-s.snd", 0x0400, 0x0400, CRC(5175f307) SHA1(97be8f2bbc393cc45a07fa43daec4bbba2336af8)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -688,8 +690,9 @@ ROM_START(forceii)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) // no sound ROM_REGION(0x1000, "p2sound:audiocpu", 0) // no sound
ROM_LOAD("661.snd", 0x0400, 0x0400, CRC(650158a7) SHA1(c7a9d521d1e7de1e00e7abc3a97aaaee04f8052e)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -722,8 +725,9 @@ ROM_START(jamesb)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("658.snd", 0x0400, 0x0400, CRC(962c03df) SHA1(e8ff5d502a038531a921380b75c27ef79b6feac8)) 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_END
ROM_START(jamesb2) ROM_START(jamesb2)
@ -732,8 +736,9 @@ ROM_START(jamesb2)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("658.snd", 0x0400, 0x0400, CRC(962c03df) SHA1(e8ff5d502a038531a921380b75c27ef79b6feac8)) 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_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -775,8 +780,9 @@ ROM_START(panthera)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("652.snd", 0x0400, 0x0400, CRC(4d0cf2c0) SHA1(0da5d118ffd19b1e78dfaaee3e31c43750d45c8d)) 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_END
ROM_START(grand8) ROM_START(grand8)
@ -797,8 +803,9 @@ ROM_START(pnkpnthr)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("664.snd", 0x0400, 0x0400, CRC(18f4abfd) SHA1(9e85eb7e9b1e2fe71be828ff1b5752424ed42588)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -813,8 +820,9 @@ ROM_START(starrace)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("657.snd", 0x0400, 0x0400, CRC(3a1d3995) SHA1(6f0bdb34c4fa11d5f8ecbb98ae55bafeb5d62c9e)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -829,8 +837,9 @@ ROM_START(spidermn)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("653.snd", 0x0400, 0x0400, CRC(f5650c46) SHA1(2d0e50fa2f4b3d633daeaa7454630e3444453cb2)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -847,8 +856,9 @@ ROM_START(timeline)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("659.snd", 0x0400, 0x0400, CRC(28185568) SHA1(2fd26e7e0a8f050d67159f17634df2b1fc47cbd3)) 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 ROM_END
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@ -869,8 +879,9 @@ ROM_START(vlcno_1c)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("667-a-s.snd", 0x0400, 0x0400, CRC(894b4e2e) SHA1(d888f8e00b2b50cef5cc916d46e4c5e6699914a1)) 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_END
ROM_START(vlcno_1b) ROM_START(vlcno_1b)
@ -879,8 +890,9 @@ ROM_START(vlcno_1b)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("667-a-s.snd", 0x0400, 0x0400, CRC(894b4e2e) SHA1(d888f8e00b2b50cef5cc916d46e4c5e6699914a1)) 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_END
ROM_START(vlcno_1a) ROM_START(vlcno_1a)
@ -889,8 +901,9 @@ ROM_START(vlcno_1a)
ROM_REGION(0x1000, "p2sound:audiocpu", 0) ROM_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("667-a-s.snd", 0x0400, 0x0400, CRC(894b4e2e) SHA1(d888f8e00b2b50cef5cc916d46e4c5e6699914a1)) 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_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, 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, 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(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, 0, r1v, 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_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 ) 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 - All games (except caveman) are playable
- Lots of issues with the sound - Lots of issues with the sound
ToDo:
- rflshdlx: no sound
*****************************************************************************************************************/ *****************************************************************************************************************/
#include "emu.h" #include "emu.h"
@ -95,6 +92,10 @@ public:
void r1v(machine_config &config); // r1 with votrax void r1v(machine_config &config); // r1 with votrax
DECLARE_INPUT_CHANGED_MEMBER(slam_w); DECLARE_INPUT_CHANGED_MEMBER(slam_w);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private: private:
u8 port1a_r(); u8 port1a_r();
u8 port2a_r(); u8 port2a_r();
@ -110,12 +111,11 @@ private:
u8 m_swrow = 0U; u8 m_swrow = 0U;
u8 m_soundex = 0U; u8 m_soundex = 0U;
u8 m_sol_state[9][2]{}; u8 m_sol_state[9][2]{};
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m6502_device> m_maincpu; required_device<m6502_device> m_maincpu;
required_device<riot6532_device> m_riot1; required_device<mos6532_new_device> m_riot1;
required_device<riot6532_device> m_riot2; required_device<mos6532_new_device> m_riot2;
required_device<riot6532_device> m_riot3; required_device<mos6532_new_device> m_riot3;
required_ioport_array<4> m_io_dips; required_ioport_array<4> m_io_dips;
required_ioport_array<9> m_io_keyboard; required_ioport_array<9> m_io_keyboard;
optional_device<gottlieb_sound_p2_device> m_p2_sound; optional_device<gottlieb_sound_p2_device> m_p2_sound;
@ -128,11 +128,13 @@ private:
void gts80a_state::gts80a_map(address_map &map) void gts80a_state::gts80a_map(address_map &map)
{ {
map.global_mask(0x3fff); 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(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0200, 0x021f).mirror(0x0060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x02ff).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0280, 0x029f).mirror(0x0060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x037f).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0300, 0x031f).mirror(0x0060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x17ff).rom(); map(0x1000, 0x17ff).rom();
map(0x1800, 0x18ff).ram().share("nvram"); // 5101L-1 256x4 map(0x1800, 0x18ff).ram().share("nvram"); // 5101L-1 256x4
map(0x2000, 0x2fff).rom(); map(0x2000, 0x2fff).rom();
@ -330,7 +332,7 @@ INPUT_PORTS_END
INPUT_CHANGED_MEMBER( gts80a_state::slam_w ) 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() u8 gts80a_state::port1a_r()
@ -532,21 +534,21 @@ void gts80a_state::p0(machine_config &config)
config.set_default_layout(layout_gts80a); config.set_default_layout(layout_gts80a);
/* Devices */ /* Devices */
RIOT6532(config, m_riot1, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->in_pa_callback().set(FUNC(gts80a_state::port1a_r)); // sw_r m_riot1->pa_rd_callback().set(FUNC(gts80a_state::port1a_r)); // sw_r
m_riot1->out_pb_callback().set(FUNC(gts80a_state::port1b_w)); // sw_w m_riot1->pb_wr_callback().set(FUNC(gts80a_state::port1b_w)); // sw_w
m_riot1->irq_callback().set("irq", FUNC(input_merger_device::in_w<0>)); m_riot1->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<0>));
RIOT6532(config, m_riot2, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->in_pa_callback().set(FUNC(gts80a_state::port2a_r)); // pa7 - slam tilt m_riot2->pa_rd_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->pa_wr_callback().set(FUNC(gts80a_state::port2a_w)); // digit select
m_riot2->out_pb_callback().set(FUNC(gts80a_state::port2b_w)); // seg m_riot2->pb_wr_callback().set(FUNC(gts80a_state::port2b_w)); // seg
m_riot2->irq_callback().set("irq", FUNC(input_merger_device::in_w<1>)); m_riot2->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<1>));
RIOT6532(config, m_riot3, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->out_pa_callback().set(FUNC(gts80a_state::port3a_w)); // sol, snd m_riot3->pa_wr_callback().set(FUNC(gts80a_state::port3a_w)); // sol, snd
m_riot3->out_pb_callback().set(FUNC(gts80a_state::port3b_w)); // lamps m_riot3->pb_wr_callback().set(FUNC(gts80a_state::port3b_w)); // lamps
m_riot3->irq_callback().set("irq", FUNC(input_merger_device::in_w<2>)); 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 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_REGION(0x1000, "p2sound:audiocpu", 0)
ROM_LOAD("670-a-s.snd", 0x0400, 0x0400, CRC(f141d535) SHA1(91e4ab9ce63b5ff3e395b6447a104286327b5533)) 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 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( 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, 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, 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, sorbit, 0, r1, 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, 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, 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, amazonh, 0, r1, 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, 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, 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( 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 ) 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); DECLARE_INPUT_CHANGED_MEMBER(slam_w);
void init_s80c() { m_slam_low = true; } void init_s80c() { m_slam_low = true; }
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private: private:
u8 port1a_r(); u8 port1a_r();
u8 port2a_r(); u8 port2a_r();
@ -127,12 +131,10 @@ private:
u8 m_digit[2]{}; u8 m_digit[2]{};
bool m_slam_low = false; bool m_slam_low = false;
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<m6502_device> m_maincpu; required_device<m6502_device> m_maincpu;
required_device<riot6532_device> m_riot1; required_device<mos6532_new_device> m_riot1;
required_device<riot6532_device> m_riot2; required_device<mos6532_new_device> m_riot2;
required_device<riot6532_device> m_riot3; required_device<mos6532_new_device> m_riot3;
required_ioport_array<4> m_io_dips; required_ioport_array<4> m_io_dips;
required_ioport_array<9> m_io_keyboard; required_ioport_array<9> m_io_keyboard;
optional_device<gottlieb_sound_p3_device> m_p3_sound; optional_device<gottlieb_sound_p3_device> m_p3_sound;
@ -147,11 +149,13 @@ private:
void gts80b_state::gts80b_map(address_map &map) void gts80b_state::gts80b_map(address_map &map)
{ {
map.global_mask(0xbfff); 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(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).mirror(0x8000).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0200, 0x021f).mirror(0x8060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x02ff).mirror(0x8000).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0280, 0x029f).mirror(0x8060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x037f).mirror(0x8000).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0300, 0x031f).mirror(0x8060).m(m_riot3, FUNC(mos6532_new_device::io_map));
map(0x1000, 0x17ff).rom(); map(0x1000, 0x17ff).rom();
map(0x1800, 0x18ff).mirror(0x8000).ram().share("nvram"); // 5101L-1 256x4 map(0x1800, 0x18ff).mirror(0x8000).ram().share("nvram"); // 5101L-1 256x4
map(0x2000, 0x2fff).rom(); map(0x2000, 0x2fff).rom();
@ -163,11 +167,13 @@ void gts80b_state::gts80b_map(address_map &map)
void gts80b_state::master_map(address_map &map) void gts80b_state::master_map(address_map &map)
{ {
map(0x0000, 0x7fff).mirror(0x8000).rom(); 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(0x01cb, 0x01cb).lr8(NAME([] () { return 0xff; })); // continual read
map(0x0200, 0x027f).mirror(0x8000).rw("riot1", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0200, 0x021f).mirror(0x8060).m(m_riot1, FUNC(mos6532_new_device::io_map));
map(0x0280, 0x02ff).mirror(0x8000).rw("riot2", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); map(0x0280, 0x029f).mirror(0x8060).m(m_riot2, FUNC(mos6532_new_device::io_map));
map(0x0300, 0x037f).mirror(0x8000).rw("riot3", FUNC(riot6532_device::read), FUNC(riot6532_device::write)); 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 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 ) INPUT_CHANGED_MEMBER( gts80b_state::slam_w )
{ {
u8 val = m_slam_low ? 0 : 0x80; u8 val = m_slam_low ? 0 : 1;
m_riot2->porta_in_set(newval ? val : val^0x80, 0x80); m_riot2->pa_bit_w<7>(newval ? val : val^1);
} }
static const uint16_t patterns[] = { static const uint16_t patterns[] = {
@ -612,21 +618,21 @@ void gts80b_state::p0(machine_config &config)
config.set_default_layout(layout_gts80b); config.set_default_layout(layout_gts80b);
/* Devices */ /* Devices */
RIOT6532(config, m_riot1, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot1, XTAL(3'579'545)/4);
m_riot1->in_pa_callback().set(FUNC(gts80b_state::port1a_r)); // sw_r m_riot1->pa_rd_callback().set(FUNC(gts80b_state::port1a_r)); // sw_r
m_riot1->out_pb_callback().set(FUNC(gts80b_state::port1b_w)); // sw_w m_riot1->pb_wr_callback().set(FUNC(gts80b_state::port1b_w)); // sw_w
m_riot1->irq_callback().set("irq", FUNC(input_merger_device::in_w<0>)); m_riot1->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<0>));
RIOT6532(config, m_riot2, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot2, XTAL(3'579'545)/4);
m_riot2->in_pa_callback().set(FUNC(gts80b_state::port2a_r)); // pa7 - slam tilt m_riot2->pa_rd_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->pa_wr_callback().set(FUNC(gts80b_state::port2a_w)); // digit select
m_riot2->out_pb_callback().set(FUNC(gts80b_state::port2b_w)); // seg m_riot2->pb_wr_callback().set(FUNC(gts80b_state::port2b_w)); // seg
m_riot2->irq_callback().set("irq", FUNC(input_merger_device::in_w<1>)); m_riot2->irq_wr_callback().set("irq", FUNC(input_merger_device::in_w<1>));
RIOT6532(config, m_riot3, XTAL(3'579'545)/4); MOS6532_NEW(config, m_riot3, XTAL(3'579'545)/4);
m_riot3->out_pa_callback().set(FUNC(gts80b_state::port3a_w)); // sol, snd m_riot3->pa_wr_callback().set(FUNC(gts80b_state::port3a_w)); // sol, snd
m_riot3->out_pb_callback().set(FUNC(gts80b_state::port3b_w)); // lamps m_riot3->pb_wr_callback().set(FUNC(gts80b_state::port3b_w)); // lamps
m_riot3->irq_callback().set("irq", FUNC(input_merger_device::in_w<2>)); 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); 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 key = m_io_keyboard[row]->read();
u8 ret = ((BIT(key, m_porta & 7)) ? 0x40 : 0) | (m_porta & 0xbf); 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 m_samples->start(3, 8); // coin
return ret; return ret;
@ -209,21 +209,25 @@ TIMER_DEVICE_CALLBACK_MEMBER( spectra_state::outtimer)
u8 segments = patterns[data&15] | (BIT(data, 4) ? 0x80 : 0); u8 segments = patterns[data&15] | (BIT(data, 4) ? 0x80 : 0);
m_digits[m_out_offs] = segments; m_digits[m_out_offs] = segments;
} }
else if (m_out_offs < 0x6f) else
if (m_out_offs < 0x6f)
{ {
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]) if (m_p_ram[m_out_offs])
m_samples->start(0, 5); // holes 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]) if (m_p_ram[m_out_offs])
m_samples->start(1, 0); // bumpers 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]) if (m_p_ram[m_out_offs])
m_samples->start(2, 7); // slings m_samples->start(2, 7); // slings

File diff suppressed because it is too large Load Diff

View File

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