From 1b43a3e093ce8ee803afaf87a080721fa3919db7 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 11 Jan 2023 16:43:40 +0100 Subject: bship: add netlist sound Systems promoted to working --------------------------- Electronic Battleship (TMS1000 version, Rev. A) --- src/mame/handheld/hh_cop400.cpp | 53 ++++----- src/mame/handheld/hh_pic16.cpp | 10 +- src/mame/handheld/hh_pps41.cpp | 2 +- src/mame/handheld/hh_tms1k.cpp | 103 ++++++++++------- src/mame/handheld/nl_bship.cpp | 223 ++++++++++++++++++++++++++++++++++++ src/mame/handheld/nl_bship.h | 6 + src/mame/handheld/nl_sfxphasor.cpp | 10 +- src/mame/layout/bship82.lay | 226 ------------------------------------- src/mame/layout/bshipg.lay | 226 +++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 2 +- src/mame/nl.flt | 3 + 11 files changed, 563 insertions(+), 301 deletions(-) create mode 100644 src/mame/handheld/nl_bship.cpp create mode 100644 src/mame/handheld/nl_bship.h delete mode 100644 src/mame/layout/bship82.lay create mode 100644 src/mame/layout/bshipg.lay diff --git a/src/mame/handheld/hh_cop400.cpp b/src/mame/handheld/hh_cop400.cpp index f3e8335d674..847c57a0b25 100644 --- a/src/mame/handheld/hh_cop400.cpp +++ b/src/mame/handheld/hh_cop400.cpp @@ -31,7 +31,7 @@ TODO: #include "speaker.h" // internal artwork -#include "bship82.lh" // clickable +#include "bshipg.lh" // clickable #include "ctstein.lh" // clickable #include "einvaderc.lh" #include "funjacks.lh" // clickable @@ -542,11 +542,11 @@ ROM_END * COP421 (likely a development chip) * 36+9 LEDs, 1-bit sound - This game is presumedly unreleased. The title is unknown, the patent simply names - it "Hand-held electronic game". There is no mass-manufacture company assigned - to it either. The game seems unfinished(no scorekeeping, some bugs), and the design - is very complex. Player ship and bullets are on a moving "wand", a 2-way mirror - makes it appear on the same plane as the enemies and barriers. + This game is presumedly unreleased. The title is unknown, the patent simply + names it "Hand-held electronic game". There is no mass-manufacture company + assigned to it either. The game seems unfinished(no scorekeeping, some bugs), + and the design is very complex. Player ship and bullets are on a moving "wand", + a 2-way mirror makes it appear on the same plane as the enemies and barriers. ***************************************************************************/ @@ -1855,22 +1855,23 @@ ROM_END /*************************************************************************** - Milton Bradley Electronic Battleship (1982 version) + Milton Bradley Electronic Battleship (model 4750G) + * PCB label: 7924750G02 REV A * COP420 MCU label COP420-JWE/N see hh_tms1k.cpp bship driver for more information ***************************************************************************/ -class bship82_state : public hh_cop400_state +class bshipg_state : public hh_cop400_state { public: - bship82_state(const machine_config &mconfig, device_type type, const char *tag) : + bshipg_state(const machine_config &mconfig, device_type type, const char *tag) : hh_cop400_state(mconfig, type, tag), m_dac(*this, "dac") { } - void bship82(machine_config &config); + void bshipg(machine_config &config); private: required_device m_dac; @@ -1884,32 +1885,32 @@ private: // handlers -void bship82_state::write_d(u8 data) +void bshipg_state::write_d(u8 data) { // D: input mux m_inp_mux = data; } -void bship82_state::write_g(u8 data) +void bshipg_state::write_g(u8 data) { // G0-G2: speaker out via 3.9K, 2.2K, 1.0K resistors // G3: enable speaker m_dac->write((data & 8) ? (data & 7) : 0); } -u8 bship82_state::read_l() +u8 bshipg_state::read_l() { // L: multiplexed inputs return read_inputs(4, 0xff); } -u8 bship82_state::read_in() +u8 bshipg_state::read_in() { // IN: multiplexed inputs return read_inputs(4, 0xf00) >> 8; } -WRITE_LINE_MEMBER(bship82_state::write_so) +WRITE_LINE_MEMBER(bshipg_state::write_so) { // SO: led m_display->matrix(1, state); @@ -1917,7 +1918,7 @@ WRITE_LINE_MEMBER(bship82_state::write_so) // config -static INPUT_PORTS_START( bship82 ) +static INPUT_PORTS_START( bshipg ) PORT_START("IN.0") // D0 ports L,IN PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("P1 Clear Last Entry") // CLE PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("P1 A") @@ -1978,21 +1979,21 @@ static INPUT_PORTS_START( bship82 ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_TOGGLE PORT_CODE(KEYCODE_F1) PORT_NAME("Load/Go") // switch INPUT_PORTS_END -void bship82_state::bship82(machine_config &config) +void bshipg_state::bshipg(machine_config &config) { // basic machine hardware - COP420(config, m_maincpu, 750000); // approximation - RC osc. R=14K, C=100pF + COP420(config, m_maincpu, 800000); // approximation - RC osc. R=14K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed - m_maincpu->write_d().set(FUNC(bship82_state::write_d)); - m_maincpu->write_g().set(FUNC(bship82_state::write_g)); - m_maincpu->read_l().set(FUNC(bship82_state::read_l)); - m_maincpu->read_in().set(FUNC(bship82_state::read_in)); - m_maincpu->write_so().set(FUNC(bship82_state::write_so)); + m_maincpu->write_d().set(FUNC(bshipg_state::write_d)); + m_maincpu->write_g().set(FUNC(bshipg_state::write_g)); + m_maincpu->read_l().set(FUNC(bshipg_state::read_l)); + m_maincpu->read_in().set(FUNC(bshipg_state::read_in)); + m_maincpu->write_so().set(FUNC(bshipg_state::write_so)); m_maincpu->read_si().set_ioport("IN.4"); // video hardware PWM_DISPLAY(config, m_display).set_size(1, 1); - config.set_default_layout(layout_bship82); + config.set_default_layout(layout_bshipg); // sound hardware SPEAKER(config, "mono").front_center(); @@ -2001,7 +2002,7 @@ void bship82_state::bship82(machine_config &config) // roms -ROM_START( bship82 ) +ROM_START( bshipg ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "cop420-jwe_n", 0x0000, 0x0400, CRC(5ea8111a) SHA1(34931463b806b48dce4f8ae2361512510bae0ebf) ) ROM_END @@ -2493,7 +2494,7 @@ CONS( 1981, mdallas, 0, 0, mdallas, mdallas, mdallas_state, e CONS( 1980, plus1, 0, 0, plus1, plus1, plus1_state, empty_init, "Milton Bradley", "Plus One", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_CONTROLS ) // *** CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, lightfgt_state, empty_init, "Milton Bradley", "Electronic Lightfight - The Games of Dueling Lights", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1982, bship82, bship, 0, bship82, bship82, bship82_state, empty_init, "Milton Bradley", "Electronic Battleship (1982 version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // *** +CONS( 1982, bshipg, bship, 0, bshipg, bshipg, bshipg_state, empty_init, "Milton Bradley", "Electronic Battleship (COP420 version, Rev. G)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // *** CONS( 1979, qkracer, 0, 0, qkracer, qkracer, qkracer_state, empty_init, "National Semiconductor", "QuizKid Racer (COP420 version)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) COMP( 1982, copspa, 0, 0, mdallas, copspa, mdallas_state, empty_init, "National Semiconductor", "COPS Pocket Assistant", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/handheld/hh_pic16.cpp b/src/mame/handheld/hh_pic16.cpp index 6dbff62795b..1a49dacecde 100644 --- a/src/mame/handheld/hh_pic16.cpp +++ b/src/mame/handheld/hh_pic16.cpp @@ -345,6 +345,10 @@ ROM_END * PIC 1655A-043 * 1 7seg LED + 36 other LEDs, CD4028, 1-bit sound + The box says (C) Calfax, Inc. 1979. Manufactured in Hong Kong for Caprice + Electronics, exclusively for Kmart Corporation. Calfax / Caprice is basically + the same company. + ***************************************************************************/ class pabball_state : public hh_pic16_state @@ -2163,9 +2167,9 @@ ROM_END ***************************************************************************/ // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -CONS( 1979, touchme, 0, 0, touchme, touchme, touchme_state, empty_init, "Atari", "Touch Me (handheld, Rev 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1979, touchme, 0, 0, touchme, touchme, touchme_state, empty_init, "Atari", "Touch Me (handheld, Rev. 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1979, pabball, 0, 0, pabball, pabball, pabball_state, empty_init, "Caprice / Calfax", "Pro-Action Baseball", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1979, pabball, 0, 0, pabball, pabball, pabball_state, empty_init, "Calfax / Caprice Electronics", "Pro-Action Electronic-Computerized Baseball", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) CONS( 1981, sfxphasor, 0, 0, sfxphasor, sfxphasor, sfxphasor_state, empty_init, "Electroplay", "Sound FX Phasor", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) @@ -2176,7 +2180,7 @@ CONS( 1980, flash, 0, 0, flash, flash, flash_state, empty_ CONS( 1980, matchme, 0, 0, matchme, matchme, matchme_state, empty_init, "Kingsford", "Match Me", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1979, drdunk, 0, 0, drdunk, drdunk, drdunk_state, empty_init, "Kmart", "Dr. Dunk", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, drdunk, 0, 0, drdunk, drdunk, drdunk_state, empty_init, "Kmart Corporation", "Dr. Dunk", MACHINE_SUPPORTS_SAVE ) CONS( 1980, leboom, 0, 0, leboom, leboom, leboom_state, empty_init, "Lakeside", "Le Boom", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/handheld/hh_pps41.cpp b/src/mame/handheld/hh_pps41.cpp index 7d4e761bfda..21603912d52 100644 --- a/src/mame/handheld/hh_pps41.cpp +++ b/src/mame/handheld/hh_pps41.cpp @@ -1601,7 +1601,7 @@ CONS( 1979, ftri1, 0, 0, ftri1, ftri1, ftri1_state, empty_in CONS( 1979, mastmind, 0, 0, mastmind, mastmind, mastmind_state, empty_init, "Invicta", "Electronic Master Mind (Invicta)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) CONS( 1979, smastmind, 0, 0, smastmind, mastmind, mastmind_state, empty_init, "Invicta", "Super-Sonic Electronic Master Mind", MACHINE_SUPPORTS_SAVE ) -CONS( 1979, dunksunk, 0, 0, dunksunk, dunksunk, dunksunk_state, empty_init, "Kmart", "Dunk 'n Sunk", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, dunksunk, 0, 0, dunksunk, dunksunk, dunksunk_state, empty_init, "Kmart Corporation", "Dunk 'n Sunk", MACHINE_SUPPORTS_SAVE ) CONS( 1978, memoquiz, 0, 0, memoquiz, memoquiz, memoquiz_state, empty_init, "M.E.M. Belgium", "Memoquiz", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) diff --git a/src/mame/handheld/hh_tms1k.cpp b/src/mame/handheld/hh_tms1k.cpp index 22b686b4539..1c83c62c621 100644 --- a/src/mame/handheld/hh_tms1k.cpp +++ b/src/mame/handheld/hh_tms1k.cpp @@ -49,8 +49,7 @@ TODO: - t7in1ss: in 2-player mode, game select and skill select can be configured after selecting a game? Possibly BTANB, players are expected to quickly press the "First Up" button after the alarm sound. -- bship discrete sound, netlist is documented -- finish bshipb SN76477 sound +- finish bshipb SN76477 sound (incomplete output PLA) - redo internal artwork for the baseball games (embedded SVG for diamond shapes) - improve elecbowl driver - tithermos temperature sensor comparator (right now just the digital clock works) @@ -127,7 +126,7 @@ on Joerg Woerner's datamath.org: http://www.datamath.org/IC_List.htm @MP3201 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750A) @MP3206 TMS1000 1978, Concept 2000 Mr. Mus-I-Cal (model 560) *MP3207 TMS1000 1978, Concept 2000 Lite 'n Learn: Electronic Organ (model 554) - @MP3208 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750B) + @MP3208 TMS1000 1978, Milton Bradley Electronic Battleship (1977, model 4750B) @MP3226 TMS1000 1978, Milton Bradley Simon (Rev A) *MP3228 TMS1000 1979, Texas Instruments OEM melody chip *MP3232 TMS1000 1979, Fonas 2 Player Baseball (no "MP" on chip label) @@ -208,6 +207,7 @@ on Joerg Woerner's datamath.org: http://www.datamath.org/IC_List.htm #include "machine/clock.h" #include "machine/ds8874.h" +#include "machine/netlist.h" #include "machine/timer.h" #include "machine/tmc0999.h" #include "machine/tms1024.h" @@ -223,6 +223,7 @@ on Joerg Woerner's datamath.org: http://www.datamath.org/IC_List.htm #include "screen.h" #include "speaker.h" +#include "nl_bship.h" #include "utf8.h" // internal artwork @@ -5578,6 +5579,9 @@ ROM_END - USA: 2 Player Baseball, published by Sears - Canada: 2 Player Baseball, published by Talbot Electronics + Calfax / Caprice Pro-Action Strategy Baseball is also suspected to be the + same game, even though it looks a bit different. + led translation table: led zz from game PCB = MAME y.x: 0 = - 10 = 2.2 20 = 4.0 30 = 4.4 @@ -5714,6 +5718,10 @@ ROM_END It's not known if this game has an official title. The current one is taken from the handheld front side. + + Calfax / Caprice separate Football / Basketball / Soccer handhelds are + suspected to be the same ROM. + MAME external artwork is needed for the switchable overlays. ***************************************************************************/ @@ -7915,7 +7923,7 @@ ROM_END /*************************************************************************** - Milton Bradley Electronic Battleship (1977 version, model 4750A) + Milton Bradley Electronic Battleship (model 4750A) * PCB label: 4750A * TMS1000NL MP3201 (die label: 1000C, MP3201) * LM324N, MC14016CP/TP4016AN, NE555P, discrete sound @@ -7924,13 +7932,14 @@ ROM_END This is a 2-player electronic board game. It still needs game pieces like the original Battleship board game. - It went through at least 5 hardware revisions (not counting Talking Battleship): + It went through at least 6 hardware revisions (not counting Talking Battleship): 1977: model 4750A, TMS1000 discrete sound, see notes above - 1977: model 4750B, TMS1000 SN76477 sound, see notes at bshipb (driver below this) + 1978: model 4750B, TMS1000 SN76477 sound, see notes at bshipb (driver below this) 1979: model 4750C: cost-reduced single-chip design, lesser quality game board. The chip is assumed to be custom, no MCU: 28-pin DIP, label 4750, SCUS 0462 - 1982: similar custom single-chip hardware, chip label MB4750 SCUS 0562 - 1982: back to MCU, COP420 instead of choosing TI, emulated in hh_cop400.cpp + 1982: model 4750E: similar custom single-chip hardware, chip label MB4750 SCUS 0562 + 1982: model 4750G: back to MCU, COP420 instead of TI, emulated in hh_cop400.cpp + 1982: model 4750H: unknown hardware, probably also COP420 ***************************************************************************/ @@ -7938,12 +7947,15 @@ class bship_state : public hh_tms1k_state { public: bship_state(const machine_config &mconfig, device_type type, const char *tag) : - hh_tms1k_state(mconfig, type, tag) + hh_tms1k_state(mconfig, type, tag), + m_sound_nl(*this, "sound_nl:o%u", 0) { } void bship(machine_config &config); private: + optional_device_array m_sound_nl; + void write_r(u32 data); void write_o(u16 data); u8 read_k(); @@ -7960,9 +7972,11 @@ void bship_state::write_r(u32 data) void bship_state::write_o(u16 data) { // O4: explosion light bulb - m_display->matrix(1, data >> 4 & 1); + m_display->matrix(1, BIT(data, 4)); // other: sound + for (int i = 0; i < 8; i++) + if (i != 4) m_sound_nl[i]->write_line(BIT(data, i)); } u8 bship_state::read_k() @@ -8060,7 +8074,17 @@ void bship_state::bship(machine_config &config) config.set_default_layout(layout_bship); // sound hardware - // TODO + SPEAKER(config, "mono").front_center(); + NETLIST_SOUND(config, "sound_nl", 48000).set_source(NETLIST_NAME(bship)).add_route(ALL_OUTPUTS, "mono", 0.125); + NETLIST_STREAM_OUTPUT(config, "sound_nl:cout0", 0, "SPK1.1").set_mult_offset(1.0, 0.0); + + NETLIST_LOGIC_INPUT(config, "sound_nl:o0", "O0.IN", 0); + NETLIST_LOGIC_INPUT(config, "sound_nl:o1", "O1.IN", 0); + NETLIST_LOGIC_INPUT(config, "sound_nl:o2", "O2.IN", 0); + NETLIST_LOGIC_INPUT(config, "sound_nl:o3", "O3.IN", 0); + NETLIST_LOGIC_INPUT(config, "sound_nl:o5", "O5.IN", 0); + NETLIST_LOGIC_INPUT(config, "sound_nl:o6", "O6.IN", 0); + NETLIST_LOGIC_INPUT(config, "sound_nl:o7", "O7.IN", 0); } // roms @@ -8081,7 +8105,7 @@ ROM_END /*************************************************************************** - Milton Bradley Electronic Battleship (1977 version, model 4750B) + Milton Bradley Electronic Battleship (model 4750B) * PCB label: MB 4750B * TMS1000NLL MP3208 (die label: 1000C, MP3208) * SN75494N (acting as inverters), SN76477 sound @@ -8129,30 +8153,23 @@ void bshipb_state::write_o(u16 data) // O1: 75494 to R4 100K to SN76477 pin 18 // O2: 75494 to R3 150K to SN76477 pin 18 - double o12 = RES_INF; - switch (~data >> 1 & 3) - { - case 0: o12 = RES_INF; break; - case 1: o12 = RES_K(100); break; - case 2: o12 = RES_K(150); break; - case 3: o12 = RES_2_PARALLEL(RES_K(100), RES_K(150)); break; - } - m_sn->vco_res_w(o12); + const double o12[4] = { RES_INF, RES_K(100), RES_K(150), RES_2_PARALLEL(RES_K(100), RES_K(150)) }; + m_sn->vco_res_w(o12[~data >> 1 & 3]); // O2,O6: (TODO) to SN76477 pin 21 //m_sn->slf_cap_w(x); // O4: SN76477 pin 22 - m_sn->vco_w(data >> 4 & 1); + m_sn->vco_w(BIT(data, 4)); // O5: R11 27K to SN76477 pin 23 m_sn->one_shot_cap_w((data & 0x20) ? RES_K(27) : 0); // O6: SN76477 pin 25 - m_sn->mixer_b_w(data >> 6 & 1); + m_sn->mixer_b_w(BIT(data, 6)); // O7: 75494 to light bulb - m_display->matrix(1, data >> 7 & 1); + m_display->matrix(1, BIT(data, 7)); } u8 bshipb_state::read_k() @@ -8180,19 +8197,19 @@ void bshipb_state::bshipb(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); SN76477(config, m_sn); - m_sn->set_noise_params(RES_K(47), RES_K(100), CAP_P(47)); // R18, R17, C8 - m_sn->set_decay_res(RES_M(3.3)); // R16 - m_sn->set_attack_params(CAP_U(0.47), RES_K(15)); // C7, R20 - m_sn->set_amp_res(RES_K(100)); // R19 - m_sn->set_feedback_res(RES_K(39)); // R7 - m_sn->set_vco_params(5.0 * RES_VOLTAGE_DIVIDER(RES_K(47), RES_K(33)), CAP_U(0.01), RES_K(270)); // R15/R14, C5, switchable R5/R3/R4 + m_sn->set_noise_params(RES_K(47), RES_K(100), CAP_P(47)); + m_sn->set_decay_res(RES_M(3.3)); + m_sn->set_attack_params(CAP_U(0.47), RES_K(15)); + m_sn->set_amp_res(RES_K(100)); + m_sn->set_feedback_res(RES_K(39)); + m_sn->set_vco_params(5.0 * RES_VOLTAGE_DIVIDER(RES_K(47), RES_K(33)), CAP_U(0.01), RES_K(270)); m_sn->set_pitch_voltage(5.0); - m_sn->set_slf_params(CAP_U(22), RES_K(750)); // switchable C4, switchable R13/R12 - m_sn->set_oneshot_params(0, RES_INF); // NC, switchable R11 - m_sn->set_vco_mode(0); // switchable - m_sn->set_mixer_params(0, 0, 0); // switchable, GND, GND - m_sn->set_envelope_params(1, 0); // Vreg, GND - m_sn->set_enable(0); // switchable + m_sn->set_slf_params(CAP_U(22), RES_K(750)); + m_sn->set_oneshot_params(0, RES_INF); + m_sn->set_vco_mode(0); + m_sn->set_mixer_params(0, 0, 0); + m_sn->set_envelope_params(1, 0); + m_sn->set_enable(0); m_sn->add_route(ALL_OUTPUTS, "mono", 0.35); } @@ -8205,7 +8222,7 @@ ROM_START( bshipb ) ROM_REGION( 867, "maincpu:mpla", 0 ) ROM_LOAD( "tms1000_common1_micro.pla", 0, 867, CRC(4becec19) SHA1(3c8a9be0f00c88c81f378b76886c39b10304f330) ) ROM_REGION( 365, "maincpu:opla", 0 ) - ROM_LOAD( "tms1000_bshipb_output.pla", 0, 365, BAD_DUMP CRC(74a9a244) SHA1(479c1f1e37cf8f75352e10226b20322906bee813) ) // part of decap photo was obscured + ROM_LOAD( "tms1000_bshipb_output.pla", 0, 365, BAD_DUMP CRC(74a9a244) SHA1(479c1f1e37cf8f75352e10226b20322906bee813) ) // a corner of the die broke off ROM_END @@ -14597,6 +14614,10 @@ ROM_END It's a 2-in-1 handheld, Strategy Football and Space Game. MAME external artwork is recommended for the switchable overlays. + known releases: + - USA(1): Space Cruiser, published by U.S. Games + - USA(2): Pro-Action Strategy Football, published by Calfax / Caprice + ***************************************************************************/ class scruiser_state : public hh_tms1k_state @@ -15159,10 +15180,10 @@ COMP( 1979, horseran, 0, 0, horseran, horseran, horseran_state, emp CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, mdndclab_state, empty_init, "Mattel Electronics", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS ) // *** CONS( 1977, comp4, 0, 0, comp4, comp4, comp4_state, empty_init, "Milton Bradley", "Comp IV", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) -CONS( 1977, bship, 0, 0, bship, bship, bship_state, empty_init, "Milton Bradley", "Electronic Battleship (1977 version, model 4750A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // *** -CONS( 1977, bshipb, bship, 0, bshipb, bship, bshipb_state, empty_init, "Milton Bradley", "Electronic Battleship (1977 version, model 4750B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // *** -CONS( 1978, simon, 0, 0, simon, simon, simon_state, empty_init, "Milton Bradley", "Simon (Rev A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1979, simonf, simon, 0, simon, simon, simon_state, empty_init, "Milton Bradley", "Simon (Rev F)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1977, bship, 0, 0, bship, bship, bship_state, empty_init, "Milton Bradley", "Electronic Battleship (TMS1000 version, Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) // *** +CONS( 1978, bshipb, bship, 0, bshipb, bship, bshipb_state, empty_init, "Milton Bradley", "Electronic Battleship (TMS1000 version, Rev. B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // *** +CONS( 1978, simon, 0, 0, simon, simon, simon_state, empty_init, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1979, simonf, simon, 0, simon, simon, simon_state, empty_init, "Milton Bradley", "Simon (Rev. F)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, ssimon, 0, 0, ssimon, ssimon, ssimon_state, empty_init, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, bigtrak_state, empty_init, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // *** CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, mbdtower_state, empty_init, "Milton Bradley", "Dark Tower (Milton Bradley)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_MECHANICAL ) // *** diff --git a/src/mame/handheld/nl_bship.cpp b/src/mame/handheld/nl_bship.cpp new file mode 100644 index 00000000000..0d062bc606e --- /dev/null +++ b/src/mame/handheld/nl_bship.cpp @@ -0,0 +1,223 @@ +// license:CC0-1.0 +// copyright-holders:hap +// thanks-to:Sean Riddle +/* + +Milton Bradley Electronic Battleship model 4750A (hh_tms1k.cpp) + +TODO: +- OPENDRAIN parameters are not fully known +- Q2 should be a 2N3703 +- D6 should be a 1K60? (germanium, type unknown, but looks like 1K60) +- move 1N754A to netlist library? + +There are no labels on the PCB for the components. The commented-out ones +are on the PCB, but not used for sound. + +Noise source (used for explosion sound) is a zener diode, this is partially +HLE'd, as I don't think MAME's netlist simulates that. + +Things to look out for when tweaking SOLVER frequency: Most notably the sweep +sound when you fire (Load/Go switch in Go mode, simply press Fire to test). +Small tweaks can alter the sound a lot, and it's hard to get everything right. +At 165000, P2 beeps sound wrong, but overall it's pretty good. + +*/ + +#include "netlist/devices/net_lib.h" + +#define HLE_NOISE_GEN (1) + + +NETLIST_START(bship) +{ + SOLVER(Solver, 165000) + PARAM(Solver.ACCURACY, 1e-7) + ANALOG_INPUT(VBATT1, 9) + ANALOG_INPUT(VBATT2, 9) + + NET_MODEL("OPENDRAIN FAMILY(TYPE=MOS OVL=0.6 OVH=0.6 ORL=1.0 ORH=1.0)") + + LOGIC_INPUT(O0, 0, "OPENDRAIN") + LOGIC_INPUT(O1, 0, "OPENDRAIN") + LOGIC_INPUT(O2, 0, "OPENDRAIN") + LOGIC_INPUT(O3, 0, "OPENDRAIN") + //LOGIC_INPUT(O4, 0, "OPENDRAIN") + LOGIC_INPUT(O5, 0, "OPENDRAIN") + LOGIC_INPUT(O6, 0, "OPENDRAIN") + LOGIC_INPUT(O7, 0, "OPENDRAIN") + NET_C(VBATT1, O0.VDD, O1.VDD, O2.VDD, O3.VDD, O5.VDD, O6.VDD, O7.VDD) + NET_C(GND, O0.VSS, O1.VSS, O2.VSS, O3.VSS, O5.VSS, O6.VSS, O7.VSS) + + RES(R1, RES_M(4.7)) + RES(R2, RES_K(51)) + RES(R3, RES_K(51)) + RES(R4, RES_K(47)) + RES(R5, RES_K(3.3)) + RES(R6, RES_K(100)) + RES(R7, RES_K(20)) + RES(R8, RES_K(51)) + RES(R9, RES_K(10)) + RES(R10, RES_K(4.7)) + RES(R11, RES_K(9.1)) + RES(R12, RES_K(22)) + RES(R13, RES_K(51)) + RES(R14, RES_K(51)) + //RES(R15, RES_K(100)) + RES(R16, RES_K(330)) + RES(R17, RES_K(15)) + RES(R18, RES_K(470)) + RES(R19, RES_K(51)) + RES(R20, RES_K(51)) + RES(R21, RES_M(1)) + RES(R22, RES_K(51)) + //RES(R23, 33) + RES(R24, RES_K(4.7)) + RES(R25, RES_K(100)) + RES(R26, RES_K(39)) + RES(R27, RES_K(51)) + RES(R28, RES_K(100)) + RES(R29, RES_M(1.5)) + RES(R30, RES_K(51)) + RES(R31, RES_M(1)) + //RES(R32, RES_K(10)) + RES(R33, RES_M(1)) + RES(SPK1, 8) + + CAP(C1, CAP_U(6.8)) + CAP(C2, CAP_U(4.7)) + //CAP(C3, CAP_P(47)) + CAP(C4, CAP_U(0.1)) + CAP(C5, CAP_U(1)) + CAP(C6, CAP_U(0.1)) + CAP(C7, CAP_U(0.022)) + CAP(C8, CAP_U(0.1)) + CAP(C9, CAP_U(1)) + CAP(C10, CAP_U(1)) + CAP(C11, CAP_U(1)) + //CAP(C12, CAP_U(0.1)) + //CAP(C13, CAP_U(6.8)) + + DIODE(D1, "1N4148") + DIODE(D2, "1N4148") + DIODE(D3, "1N4148") + DIODE(D4, "1N4148") + ZDIODE(D5, "D(BV=6.8 IBV=0.020 NBV=1)") // 1N754A + DIODE(D6, "1N34A") // 1K60? + DIODE(D7, "1N4148") + //DIODE(D8, "1N4148") + + QBJT_EB(Q1, "2N3704") // NPN + QBJT_EB(Q2, "2N3702") // 2N3703 PNP + //QBJT_EB(Q3, "2N3704") // NPN + QBJT_EB(Q4, "2N3704") // NPN + QBJT_EB(Q5, "2N3704") // NPN + + LM324_DIP(IC1) // LM324N + CD4016_DIP(IC2) // TP4016AN + NE555_DIP(IC3) // NE555P + + // O0 + NET_C(O0.Q, R14.1, D4.A) + NET_C(R14.2, GND) + NET_C(D4.K, R5.1) + NET_C(R5.2, R4.2, C2.1, R1.1, IC1.10, IC2.9) + NET_C(C2.2, GND) + NET_C(R1.2, GND) + NET_C(R4.1, D3.K) + + // O1 + NET_C(O1.Q, R3.1, D2.A) + NET_C(R3.2, GND) + NET_C(D2.K, R24.2, R26.2, C7.1, IC3.2, IC3.6) + NET_C(R24.1, IC2.3) + NET_C(R26.1, R11.2, IC2.4, IC3.7) + NET_C(C7.2, GND) + + NET_C(R11.1, R12.1, IC2.10) + NET_C(R12.2, VBATT1) + + // O2 + NET_C(O2.Q, R2.1, D1.A) + NET_C(R2.2, GND) + NET_C(D1.K, R21.2, R22.1, IC1.6) + + NET_C(R21.1, C4.1, IC1.7) + NET_C(R7.2, C4.2) + NET_C(R7.1, R6.2, R16.2, IC1.13) + + NET_C(R6.1, Q1.E, Q2.E, SPK1.1) + NET_C(SPK1.2, C1.1) + NET_C(C1.2, GND) + + NET_C(R22.2, C6.1) + NET_C(C6.2, R18.2, IC1.1) + NET_C(R18.1, R17.1, IC1.2) + NET_C(R17.2, C8.2) + NET_C(C8.1, R28.1, R29.1, Q4.C) + + NET_C(R29.2, C10.1, D5.A) + NET_C(C10.2, GND) + +#if HLE_NOISE_GEN + // zener diode noise + CLOCK(NOISE_CLOCK, 10000) + NET_C(NOISE_CLOCK.GND, GND) + NET_C(NOISE_CLOCK.VCC, VBATT1) + + SYS_NOISE_MT_N(NOISE, 0.0075) + NET_C(NOISE_CLOCK.Q, NOISE.I) + NET_C(Q4.B, NOISE.1) + NET_C(D5.K, NOISE.2) + +#else + // should be simply like this + NET_C(D5.K, Q4.B) +#endif + + // O3 + NET_C(O3.Q, D3.A, R8.1, IC2.13) + NET_C(R8.2, GND) + + // O5 + NET_C(O5.Q, R30.1, D6.A, D7.A) + NET_C(R30.2, GND) + NET_C(D6.K, R28.2, C9.1) + NET_C(C9.2, GND) + + NET_C(D7.K, R31.2, R33.1, C11.1) + NET_C(R33.2, GND) + NET_C(C11.2, GND) + NET_C(R31.1, Q5.B) + NET_C(Q5.C, IC3.3) + NET_C(Q5.E, R16.1) + + // O6 + NET_C(O6.Q, R27.1, IC2.6) + NET_C(R27.2, GND) + + // O7 + NET_C(O7.Q, R13.1, IC2.12) + NET_C(R13.2, GND) + + // misc + NET_C(VBATT1, IC1.4, IC2.14, IC3.4, IC3.8) + NET_C(VBATT2, Q1.C) + NET_C(GND, Q2.C, Q4.E, IC1.11, IC2.1, IC2.7, IC3.1) + HINT(IC3.5, NC) + + NET_C(IC1.3, R19.1, R20.1, C5.1, IC1.5, IC1.12) + NET_C(R19.2, VBATT1) + NET_C(R20.2, GND) + NET_C(C5.2, GND) + + NET_C(IC1.8, IC1.9, IC2.11) + NET_C(IC1.14, Q1.B, Q2.B) + + NET_C(IC2.2, R25.1, IC2.5) + NET_C(R25.2, VBATT1) + + NET_C(IC2.8, R9.1, R10.1) + NET_C(R9.2, GND) + NET_C(R10.2, VBATT1) +} diff --git a/src/mame/handheld/nl_bship.h b/src/mame/handheld/nl_bship.h new file mode 100644 index 00000000000..f8e195e5e21 --- /dev/null +++ b/src/mame/handheld/nl_bship.h @@ -0,0 +1,6 @@ +// license:CC0-1.0 +// copyright-holders:hap + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(bship) diff --git a/src/mame/handheld/nl_sfxphasor.cpp b/src/mame/handheld/nl_sfxphasor.cpp index 1717ae20ab9..bb10da2279a 100644 --- a/src/mame/handheld/nl_sfxphasor.cpp +++ b/src/mame/handheld/nl_sfxphasor.cpp @@ -1,10 +1,14 @@ // license:CC0-1.0 // copyright-holders:hap +// thanks-to:=CO=Windler /* Electroplay Sound FX Phasor (hh_pic16.cpp) 3-bit sound with volume envelope +TODO: +- transistors should be BC183 + */ #include "netlist/devices/net_lib.h" @@ -45,9 +49,9 @@ NETLIST_START(sfxphasor) DIODE(D3, "1N4002") DIODE(D4, "1N4002") - QBJT_EB(T2, "2N3904") // BC183 - QBJT_EB(T3, "2N3904") // BC183 - QBJT_EB(T4, "2N3904") // BC183 + QBJT_EB(T2, "2N3904") // BC183 NPN + QBJT_EB(T3, "2N3904") // BC183 NPN + QBJT_EB(T4, "2N3904") // BC183 NPN // pin 10 NET_C(P10.Q, R7.1, C2.1) diff --git a/src/mame/layout/bship82.lay b/src/mame/layout/bship82.lay deleted file mode 100644 index 1d683e8155f..00000000000 --- a/src/mame/layout/bship82.lay +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/layout/bshipg.lay b/src/mame/layout/bshipg.lay new file mode 100644 index 00000000000..1d683e8155f --- /dev/null +++ b/src/mame/layout/bshipg.lay @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index a51a25d2a5d..20db6b0b6db 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16581,7 +16581,7 @@ hexion // GX122 (c) 1992 hexionb // bootleg @source:handheld/hh_cop400.cpp -bship82 // Milton Bradley +bshipg // Milton Bradley copspa // National Semiconductor ctstein // Castle Toy einvaderc // Entex diff --git a/src/mame/nl.flt b/src/mame/nl.flt index 8d4f4510ba2..3a2f7d804a5 100644 --- a/src/mame/nl.flt +++ b/src/mame/nl.flt @@ -29,6 +29,9 @@ zaccaria/zaccaria.cpp // from handheld/hh_pic16.cpp +sfxphasor +// from handheld/hh_tms1k.cpp ++bship + // from midw8080/mw8080bw.cpp +280zzzap +gunfight -- cgit v1.2.3