diff options
author | 2019-10-13 16:45:03 +0200 | |
---|---|---|
committer | 2019-10-13 16:45:30 +0200 | |
commit | a89b7d194d77cacfe73dd1936c3db68c52ba0b36 (patch) | |
tree | d6463bf9ef1417f470227660bb9a4c3a98482524 | |
parent | 3812869c54c98505f08d88c54c430eb93991b8bf (diff) |
netlist: mame netlist reorganization. [Couriersud]
- moved netlists out of driver code into audio/ or machine/ as
nl_xxx.cpp files.
- identified and documented extended validation
- updated arcade, mess and nl targets
35 files changed, 457 insertions, 364 deletions
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 5a0a5f01793..7479bafb003 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -1231,10 +1231,10 @@ files { MAME_DIR .. "src/mame/audio/orbit.cpp", MAME_DIR .. "src/mame/video/orbit.cpp", MAME_DIR .. "src/mame/drivers/pong.cpp", - MAME_DIR .. "src/mame/machine/nl_pong.cpp", - MAME_DIR .. "src/mame/machine/nl_pong.h", - MAME_DIR .. "src/mame/machine/nl_pongd.cpp", - MAME_DIR .. "src/mame/machine/nl_pongd.h", + MAME_DIR .. "src/mame/machine/nl_pongf.cpp", + MAME_DIR .. "src/mame/machine/nl_pongf.h", + MAME_DIR .. "src/mame/machine/nl_pongdoubles.cpp", + MAME_DIR .. "src/mame/machine/nl_pongdoubles.h", MAME_DIR .. "src/mame/machine/nl_breakout.cpp", MAME_DIR .. "src/mame/machine/nl_breakout.h", MAME_DIR .. "src/mame/machine/nl_rebound.cpp", @@ -1437,6 +1437,8 @@ files { MAME_DIR .. "src/mame/drivers/1942.cpp", MAME_DIR .. "src/mame/includes/1942.h", MAME_DIR .. "src/mame/video/1942.cpp", + MAME_DIR .. "src/mame/audio/nl_1942.cpp", + MAME_DIR .. "src/mame/audio/nl_1942.h", MAME_DIR .. "src/mame/drivers/1943.cpp", MAME_DIR .. "src/mame/includes/1943.h", MAME_DIR .. "src/mame/video/1943.cpp", @@ -3074,6 +3076,8 @@ files { MAME_DIR .. "src/mame/drivers/popeye.cpp", MAME_DIR .. "src/mame/includes/popeye.h", MAME_DIR .. "src/mame/video/popeye.cpp", + MAME_DIR .. "src/mame/audio/nl_popeye.cpp", + MAME_DIR .. "src/mame/audio/nl_popeye.h", MAME_DIR .. "src/mame/drivers/punchout.cpp", MAME_DIR .. "src/mame/includes/punchout.h", MAME_DIR .. "src/mame/video/punchout.cpp", @@ -4651,6 +4655,8 @@ files { MAME_DIR .. "src/mame/drivers/clowndwn.cpp", MAME_DIR .. "src/mame/drivers/clpoker.cpp", MAME_DIR .. "src/mame/drivers/cocoloco.cpp", + MAME_DIR .. "src/mame/audio/nl_cocoloco.h", + MAME_DIR .. "src/mame/audio/nl_cocoloco.cpp", MAME_DIR .. "src/mame/drivers/coinmstr.cpp", MAME_DIR .. "src/mame/drivers/coinmvga.cpp", MAME_DIR .. "src/mame/drivers/comebaby.cpp", diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 3d9b9c01448..b6964de9723 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3787,6 +3787,8 @@ files { MAME_DIR .. "src/mame/drivers/crvision.cpp", MAME_DIR .. "src/mame/includes/crvision.h", MAME_DIR .. "src/mame/drivers/gamemachine.cpp", + MAME_DIR .. "src/mame/audio/nl_gamemachine.h", + MAME_DIR .. "src/mame/audio/nl_gamemachine.cpp", MAME_DIR .. "src/mame/drivers/geniusiq.cpp", MAME_DIR .. "src/mame/drivers/geniusjr.cpp", MAME_DIR .. "src/mame/drivers/glcx.cpp", diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua index 2e79d168ac0..75afd846c24 100644 --- a/scripts/target/mame/nl.lua +++ b/scripts/target/mame/nl.lua @@ -126,10 +126,10 @@ function createProjects_mame_nl(_target, _subtarget) files{ MAME_DIR .. "src/mame/drivers/pong.cpp", - MAME_DIR .. "src/mame/machine/nl_pong.cpp", - MAME_DIR .. "src/mame/machine/nl_pong.h", - MAME_DIR .. "src/mame/machine/nl_pongd.cpp", - MAME_DIR .. "src/mame/machine/nl_pongd.h", + MAME_DIR .. "src/mame/machine/nl_pongf.cpp", + MAME_DIR .. "src/mame/machine/nl_pongf.h", + MAME_DIR .. "src/mame/machine/nl_pongdoubles.cpp", + MAME_DIR .. "src/mame/machine/nl_pongdoubles.h", MAME_DIR .. "src/mame/machine/nl_breakout.cpp", MAME_DIR .. "src/mame/machine/nl_breakout.h", MAME_DIR .. "src/mame/machine/nl_rebound.cpp", @@ -148,12 +148,18 @@ files{ MAME_DIR .. "src/mame/drivers/1942.cpp", MAME_DIR .. "src/mame/includes/1942.h", MAME_DIR .. "src/mame/video/1942.cpp", - + MAME_DIR .. "src/mame/audio/nl_1942.cpp", + MAME_DIR .. "src/mame/audio/nl_1942.h", + MAME_DIR .. "src/mame/drivers/gamemachine.cpp", + MAME_DIR .. "src/mame/audio/nl_gamemachine.h", + MAME_DIR .. "src/mame/audio/nl_gamemachine.cpp", MAME_DIR .. "src/mame/drivers/popeye.cpp", MAME_DIR .. "src/mame/includes/popeye.h", MAME_DIR .. "src/mame/video/popeye.cpp", + MAME_DIR .. "src/mame/audio/nl_popeye.cpp", + MAME_DIR .. "src/mame/audio/nl_popeye.h", MAME_DIR .. "src/mame/drivers/mario.cpp", MAME_DIR .. "src/mame/includes/mario.h", @@ -187,6 +193,8 @@ files{ MAME_DIR .. "src/mame/video/zaccaria.cpp", MAME_DIR .. "src/mame/drivers/cocoloco.cpp", + MAME_DIR .. "src/mame/audio/nl_cocoloco.h", + MAME_DIR .. "src/mame/audio/nl_cocoloco.cpp", MAME_DIR .. "src/mame/drivers/palestra.cpp", MAME_DIR .. "src/mame/machine/nl_palestra.cpp", diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 2c5b9cc85a1..04b6aed587a 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -1084,7 +1084,7 @@ plib::unique_ptr<netlist::netlist_t> netlist_mame_device::base_validity_check(va //netlist_mame_t lnetlist(*this, "netlist", plib::make_unique<netlist_validate_callbacks_t>()); auto lnetlist = plib::make_unique<netlist::netlist_t>("netlist", plib::make_unique<netlist_validate_callbacks_t>()); // enable validation mode - lnetlist->nlstate().setup().enable_validation(); + lnetlist->nlstate().setup().set_extended_validation(false); common_dev_start(lnetlist.get()); for (device_t &d : subdevices()) @@ -1101,6 +1101,7 @@ plib::unique_ptr<netlist::netlist_t> netlist_mame_device::base_validity_check(va } catch (memregion_not_set &err) { + // Do not report an error. Validity check has no access to ROM area. osd_printf_verbose("%s\n", err.what()); } catch (emu_fatalerror &err) diff --git a/src/lib/netlist/devices/nld_7497.cpp b/src/lib/netlist/devices/nld_7497.cpp index 2c54d63bf09..cfbab15157e 100644 --- a/src/lib/netlist/devices/nld_7497.cpp +++ b/src/lib/netlist/devices/nld_7497.cpp @@ -172,7 +172,7 @@ namespace netlist }; - NETLIB_DEVICE_IMPL(7497, "TTL_7497", "+CLK,+STRBQ,+ENQ,+UNITYQ,+CLR,+B0,+B1,+B2,+B3,+B4,+B5, @VCC, @GND") + NETLIB_DEVICE_IMPL(7497, "TTL_7497", "+CLK,+STRBQ,+ENQ,+UNITYQ,+CLR,+B0,+B1,+B2,+B3,+B4,+B5,@VCC,@GND") NETLIB_DEVICE_IMPL(7497_dip, "TTL_7497_DIP", "") } //namespace devices diff --git a/src/lib/netlist/devices/nlid_proxy.cpp b/src/lib/netlist/devices/nlid_proxy.cpp index 2a9fccd1dc6..fe42f5e8582 100644 --- a/src/lib/netlist/devices/nlid_proxy.cpp +++ b/src/lib/netlist/devices/nlid_proxy.cpp @@ -126,7 +126,7 @@ namespace netlist else { log().verbose("D/A Proxy: Found power terminals on device {1}", out_proxied->device().name()); - if (setup().is_validation()) + if (setup().is_extended_validation()) { // During validation, don't connect to terminals found // This will cause terminals not connected to a rail net to diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h index 8d9c4f86039..bed4c2bb8d2 100644 --- a/src/lib/netlist/devices/nlid_system.h +++ b/src/lib/netlist/devices/nlid_system.h @@ -438,7 +438,7 @@ namespace devices nld_power_pins(device_t &owner, const pstring &sVCC = "VCC", const pstring &sGND = "GND", bool force_analog_input = false) { - if (owner.setup().is_validation() || force_analog_input) + if (owner.setup().is_extended_validation() || force_analog_input) { m_GND = plib::make_unique<analog_input_t>(owner, sGND, NETLIB_DELEGATE(power_pins, noop)); m_VCC = plib::make_unique<analog_input_t>(owner, sVCC, NETLIB_DELEGATE(power_pins, noop)); diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index fb175ae0c18..37c010607c9 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -827,7 +827,7 @@ NETLIST_END() #ifndef __PLIB_PREPROCESSOR__ #define DM9312_TT(name) \ - NET_REGISTER_DEV(DM9312_TT, name) + NET_REGISTER_DEV(DM9312, name) #endif static NETLIST_START(DM9312_DIP) @@ -1340,7 +1340,7 @@ NETLIST_START(TTL74XX_lib) TT_FAMILY("74XX") TRUTHTABLE_END() - TRUTHTABLE_START(DM9312_TT, 12, 2, "+A,+B,+C,+G,+D0,+D1,+D2,+D3,+D4,+D5,+D6,+D7,@VCC,@GND") + TRUTHTABLE_START(DM9312, 12, 2, "+A,+B,+C,+G,+D0,+D1,+D2,+D3,+D4,+D5,+D6,+D7,@VCC,@GND") TT_HEAD(" C, B, A, G,D0,D1,D2,D3,D4,D5,D6,D7| Y,YQ") TT_LINE(" X, X, X, 1, X, X, X, X, X, X, X, X| 0, 1|33,19") TT_LINE(" 0, 0, 0, 0, 0, X, X, X, X, X, X, X| 0, 1|33,28") diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index 8afc465490d..4c9e8c4d553 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -281,7 +281,7 @@ NET_REGISTER_DEV(TTL_74279_DIP, name) #define DM9312(name, cA, cB, cC, cSTROBE, cD0, cD1, cD2, cD3, cD4, cD5, cD6, cD7) \ - NET_REGISTER_DEV(DM9312_TT, name) \ + NET_REGISTER_DEV(DM9312, name) \ NET_CONNECT(name, VCC, VCC) \ NET_CONNECT(name, GND, GND) \ NET_CONNECT(name, A, cA) \ diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp index 8816cba95aa..c0cf595119c 100644 --- a/src/lib/netlist/nl_parser.cpp +++ b/src/lib/netlist/nl_parser.cpp @@ -413,8 +413,8 @@ void parser_t::device(const pstring &dev_type) nl_double parser_t::eval_param(const token_t &tok) { - static std::array<pstring, 6> macs = {"", "RES_K", "RES_M", "CAP_U", "CAP_N", "CAP_P"}; - static std::array<nl_double, 6> facs = {1, 1e3, 1e6, 1e-6, 1e-9, 1e-12}; + static std::array<pstring, 7> macs = {"", "RES_R", "RES_K", "RES_M", "CAP_U", "CAP_N", "CAP_P"}; + static std::array<nl_double, 7> facs = {1, 1, 1e3, 1e6, 1e-6, 1e-9, 1e-12}; std::size_t f=0; nl_double ret(0); diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h index 318720c7a06..977732623b9 100644 --- a/src/lib/netlist/nl_setup.h +++ b/src/lib/netlist/nl_setup.h @@ -393,8 +393,15 @@ namespace netlist /* validation */ - void enable_validation() { m_validation = true; } - bool is_validation() const { return m_validation; } + /* The extended validation mode is not intended for running. + * The intention is to identify power pins which are not properly + * connected. The downside is that this mode creates a netlist which + * is different (and not able to run). + * + * Extended validation is supported by nltool validate option. + */ + void set_extended_validation(bool val) { m_validation = val; } + bool is_extended_validation() const { return m_validation; } private: void merge_nets(detail::net_t &thisnet, detail::net_t &othernet); diff --git a/src/lib/netlist/plib/pparser.h b/src/lib/netlist/plib/pparser.h index 0f0e57fca12..3d4f18b3eb1 100644 --- a/src/lib/netlist/plib/pparser.h +++ b/src/lib/netlist/plib/pparser.h @@ -175,6 +175,7 @@ public: using defines_map_type = std::unordered_map<pstring, define_t>; explicit ppreprocessor(defines_map_type *defines = nullptr); + ~ppreprocessor() override { delete rdbuf(); diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index d4c220da6b2..f7ff843801c 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -41,7 +41,10 @@ public: opt_grp2(*this, "Options for run and static commands", "These options apply to run and static commands."), opt_name(*this, "n", "name", "", "the netlist in file specified by ""-f"" option to run; default is first one"), - opt_grp3(*this, "Options for run command", "These options are only used by the run command."), + opt_grp3(*this, "Options for static command", "These options apply to static command."), + opt_dir(*this, "d", "dir", "", "output directory for the generated files"), + + opt_grp4(*this, "Options for run command", "These options are only used by the run command."), opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)\n\n abc def\n\n xyz"), opt_stats(*this, "s", "statistics", "gather runtime statistics"), opt_logs(*this, "l", "log" , "define terminal to log. This option may be specified repeatedly."), @@ -49,10 +52,13 @@ public: opt_loadstate(*this,"", "loadstate", "", "load state from file and continue from there"), opt_savestate(*this,"", "savestate", "", "save state to file at end of run"), - opt_grp4(*this, "Options for convert command", "These options are only used by the convert command."), + opt_grp5(*this, "Options for convert command", "These options are only used by the convert command."), opt_type(*this, "y", "type", 0, std::vector<pstring>({"spice","eagle","rinf"}), "type of file to be converted: spice,eagle,rinf"), - opt_grp5(*this, "Options for header command", "These options are only used by the header command."), + opt_grp6(*this, "Options for validate command", "These options are only used by the validate command."), + opt_extended_validation(*this, "", "extended", "Identify issues with power terminals."), + + opt_grp7(*this, "Options for header command", "These options are only used by the header command."), opt_tabwidth(*this, "", "tab-width", 4, "Tab width for output."), opt_linewidth(*this,"", "line-width", 72, "Line width for output."), @@ -79,15 +85,19 @@ public: plib::option_group opt_grp2; plib::option_str opt_name; plib::option_group opt_grp3; + plib::option_str opt_dir; + plib::option_group opt_grp4; plib::option_num<double> opt_ttr; plib::option_bool opt_stats; plib::option_vec opt_logs; plib::option_str opt_inp; plib::option_str opt_loadstate; plib::option_str opt_savestate; - plib::option_group opt_grp4; - plib::option_str_limit<unsigned> opt_type; plib::option_group opt_grp5; + plib::option_str_limit<unsigned> opt_type; + plib::option_group opt_grp6; + plib::option_bool opt_extended_validation; + plib::option_group opt_grp7; plib::option_num<unsigned> opt_tabwidth; plib::option_num<unsigned> opt_linewidth; plib::option_example opt_ex1; @@ -455,7 +465,7 @@ void tool_app_t::validate() m_errors = 0; m_warnings = 0; - nt.setup().enable_validation(); + nt.setup().set_extended_validation(opt_extended_validation()); try { @@ -484,6 +494,9 @@ void tool_app_t::validate() void tool_app_t::static_compile() { + if (!opt_dir.was_specified()) + throw netlist::nl_exception("--dir option needs to be specified"); + netlist_tool_t nt(*this, "netlist"); nt.init(); @@ -506,7 +519,8 @@ void tool_app_t::static_compile() for (auto &e : mp) { - pout.write(e.second); + auto sout(std::ofstream(opt_dir() + "/" + e.first + ".c" )); + sout << e.second; } nt.stop(); diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp index 88823811858..2ad6cae7903 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.cpp +++ b/src/lib/netlist/solver/nld_matrix_solver.cpp @@ -559,14 +559,8 @@ namespace devices if (m_params.m_dynamic_ts) { -#if 0 - for (std::size_t k = 0, iN=m_terms.size(); k < iN; k++) - { - terms_for_net_t *t = m_terms[k].get(); -#else for (auto &t : m_terms) { -#endif //const nl_double DD_n = (n->Q_Analog() - t->m_last_V); // avoid floating point exceptions const nl_double DD_n = std::max(-1e100, std::min(1e100,(t->getV() - t->m_last_V))); diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h index bf8ee2acb60..cda9336c1c9 100644 --- a/src/lib/netlist/solver/nld_ms_gcr.h +++ b/src/lib/netlist/solver/nld_ms_gcr.h @@ -136,9 +136,13 @@ namespace devices pstring symname = static_compile_name(); m_proc.load(this->state().lib(), symname); if (m_proc.resolved()) + { this->log().info("External static solver {1} found ...", symname); + } else + { this->log().warning("External static solver {1} not found ...", symname); + } } } @@ -213,7 +217,6 @@ namespace devices plib::putf8_fmt_writer w(&t); generate_code(w); std::hash<typename std::remove_const<std::remove_reference<decltype(t.str())>::type>::type> h; - return plib::pfmt("nl_gcr_{1:x}_{2}")(h( t.str() ))(mat.nz_num); } diff --git a/src/mame/audio/nl_1942.cpp b/src/mame/audio/nl_1942.cpp new file mode 100644 index 00000000000..234b716cb11 --- /dev/null +++ b/src/mame/audio/nl_1942.cpp @@ -0,0 +1,93 @@ +// license:BSD-3-Clause +// copyright-holders:Couriersud +#include "netlist/devices/net_lib.h" + +/* ---------------------------------------------------------------------------- + * 1942 schematics + * ---------------------------------------------------------------------------*/ + +NETLIST_START(1942) + + /* Standard stuff */ + + SOLVER(Solver, 48000) + ANALOG_INPUT(V5, 5) + + /* AY 8910 internal resistors */ + + RES(R_AY1_1, 1000) + RES(R_AY1_2, 1000) + RES(R_AY1_3, 1000) + RES(R_AY2_1, 1000) + RES(R_AY2_2, 1000) + RES(R_AY2_3, 1000) + + RES(R2, 220000) + RES(R3, 220000) + RES(R4, 220000) + RES(R5, 220000) + RES(R6, 220000) + RES(R7, 220000) + + RES(R11, 10000) + RES(R12, 10000) + RES(R13, 10000) + RES(R14, 10000) + RES(R15, 10000) + RES(R16, 10000) + + CAP(CC7, 10e-6) + CAP(CC8, 10e-6) + CAP(CC9, 10e-6) + CAP(CC10, 10e-6) + CAP(CC11, 10e-6) + CAP(CC12, 10e-6) + + NET_C(V5, R_AY2_3.1, R_AY2_2.1, R_AY2_1.1, R_AY1_3.1, R_AY1_2.1, R_AY1_1.1) + NET_C(GND, R13.2, R15.2, R11.2, R12.2, R14.2, R16.2) + //NLFILT(R_AY2_3, R13, CC7, R2) + NET_C(R_AY2_3.2, R13.1) + NET_C(R13.1, CC7.1) + NET_C(CC7.2, R2.1) + //NLFILT(R_AY2_2, R15, CC8, R3) + NET_C(R_AY2_2.2, R15.1) + NET_C(R15.1, CC8.1) + NET_C(CC8.2, R3.1) + //NLFILT(R_AY2_1, R11, CC9, R4) + NET_C(R_AY2_1.2, R11.1) + NET_C(R11.1, CC9.1) + NET_C(CC9.2, R4.1) + + //NLFILT(R_AY1_3, R12, CC10, R5) + NET_C(R_AY1_3.2, R12.1) + NET_C(R12.1, CC10.1) + NET_C(CC10.2, R5.1) + //NLFILT(R_AY1_2, R14, CC11, R6) + NET_C(R_AY1_2.2, R14.1) + NET_C(R14.1, CC11.1) + NET_C(CC11.2, R6.1) + //NLFILT(R_AY1_1, R16, CC12, R7) + NET_C(R_AY1_1.2, R16.1) + NET_C(R16.1, CC12.1) + NET_C(CC12.2, R7.1) + + POT(VR, 2000) + NET_C(VR.3, GND) + + NET_C(R2.2, VR.1) + NET_C(R3.2, VR.1) + NET_C(R4.2, VR.1) + NET_C(R5.2, VR.1) + NET_C(R6.2, VR.1) + NET_C(R7.2, VR.1) + + CAP(CC6, 10e-6) + RES(R1, 100000) + + NET_C(CC6.1, VR.2) + NET_C(CC6.2, R1.1) + CAP(CC3, 220e-6) + NET_C(R1.2, CC3.1) + NET_C(CC3.2, GND) + +NETLIST_END() diff --git a/src/mame/audio/nl_1942.h b/src/mame/audio/nl_1942.h new file mode 100644 index 00000000000..a6ef34e4c41 --- /dev/null +++ b/src/mame/audio/nl_1942.h @@ -0,0 +1,6 @@ +// license:BSD-3-Clause +// copyright-holders:Couriersud + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(1942) diff --git a/src/mame/audio/nl_cocoloco.cpp b/src/mame/audio/nl_cocoloco.cpp new file mode 100644 index 00000000000..57ff637a85b --- /dev/null +++ b/src/mame/audio/nl_cocoloco.cpp @@ -0,0 +1,53 @@ +// license:CC0 +// copyright-holders:Couriersud + +#include "netlist/devices/net_lib.h" + +/* ---------------------------------------------------------------------------- + * cocoloco schematics + * ---------------------------------------------------------------------------*/ + +// 7W LM383T Amplifier not included below + +NETLIST_START(cocoloco) + + /* Standard stuff */ + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-5) + ANALOG_INPUT(V5, 5) + + /* AY 8910 internal resistors */ + + RES(R_AY1_1, 1000) + RES(R_AY1_2, 1000) + RES(R_AY1_3, 1000) + + RES(R1, 4700) + RES(R2, 4700) + RES(R3, 4700) + RES(RAMP, 150000) + //RES(RAMP, 150) + POT(P1, 5000) + PARAM(P1.DIAL, 0.5) // 50% + + CAP(C1, 10e-6) + + NET_C(V5, R_AY1_1.1, R_AY1_2.1, R_AY1_3.1) + + NET_C(R_AY1_1.2, R1.1) + NET_C(R_AY1_2.2, R2.1) + NET_C(R_AY1_3.2, R3.1) + + NET_C(R1.2, R2.2, R3.2, P1.1) + + NET_C(P1.3, RAMP.2, GND) + NET_C(P1.2, C1.1) + NET_C(C1.2, RAMP.1) +#if 0 + CAP(C2, 0.1e-6) + NET_C(C2.2, GND) + NET_C(C2.1, RAMP.1) +#endif +NETLIST_END() + diff --git a/src/mame/audio/nl_cocoloco.h b/src/mame/audio/nl_cocoloco.h new file mode 100644 index 00000000000..a81ce56cad1 --- /dev/null +++ b/src/mame/audio/nl_cocoloco.h @@ -0,0 +1,6 @@ +// license:CC0 +// copyright-holders:Couriersud + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(cocoloco) diff --git a/src/mame/audio/nl_gamemachine.cpp b/src/mame/audio/nl_gamemachine.cpp new file mode 100644 index 00000000000..9d7f9a24388 --- /dev/null +++ b/src/mame/audio/nl_gamemachine.cpp @@ -0,0 +1,88 @@ +// license:CC0 +// copyright-holders:Couriersud +// thanks-to:Sean Riddle + +#include "netlist/devices/net_lib.h" + +/* ---------------------------------------------------------------------------- + * Gamemachine schematics + * ---------------------------------------------------------------------------*/ + +NETLIST_START(gamemachine) + + /* Standard stuff */ + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-7) + ANALOG_INPUT(V5, 5) + + /* Schematics: http://seanriddle.com/gamemachineaudio.JPG + * + * 3870 datasheet: http://nice.kaze.com/MK3870.pdf + * + * The 3870 has mask-programmable outputs (page VIII-7 in datasheet). + * + * Given the schematics, in this case the OPENDRAIN configuration is the + * most probable. + * + */ + + NET_MODEL("OPENDRAIN FAMILY(OVL=0.0 OVH=0.0 ORL=1.0 ORH=1e12)") + NET_MODEL("TYPE6K FAMILY(OVL=0.05 OVH=0.05 ORL=1.0 ORH=6000)") + NET_MODEL("DIRECTDRIVE FAMILY(OVL=0.05 OVH=0.05 ORL=1.0 ORH=1000)") + + LOGIC_INPUT(P08, 1, "OPENDRAIN") + LOGIC_INPUT(P09, 1, "OPENDRAIN") + LOGIC_INPUT(P10, 1, "OPENDRAIN") + LOGIC_INPUT(P11, 1, "OPENDRAIN") + LOGIC_INPUT(P12, 1, "OPENDRAIN") + LOGIC_INPUT(P13, 1, "OPENDRAIN") + LOGIC_INPUT(P14, 1, "OPENDRAIN") + LOGIC_INPUT(P15, 1, "OPENDRAIN") + + RES(R1, RES_K(2.4)) + RES(R2, RES_K(10)) + RES(R3, RES_K(4.3)) + RES(R4, RES_K(150)) + RES(R5, RES_K(240)) + RES(R6, RES_K(2.4)) + RES(SPK1, 8) + + CAP(C1, CAP_P(50)) + CAP(C2, CAP_U(0.001)) + CAP(C3, CAP_U(0.002)) + CAP(C4, CAP_U(0.005)) + CAP(C5, CAP_U(0.010)) + + CAP(C6, CAP_P(50)) + CAP(C7, CAP_U(0.01)) + CAP(C8, CAP_U(470)) + + QBJT_EB(Q1, "9013") + + MC1455P_DIP(IC1) + + NET_C(P08.Q, R2.2, IC1.4) + NET_C(P09.Q, C8.2) + NET_C(P15.Q, R1.2) + + NET_C(C1.1, P10.Q) + NET_C(C2.1, P11.Q) + NET_C(C3.1, P12.Q) + NET_C(C4.1, P13.Q) + NET_C(C5.1, P14.Q) + + NET_C(C1.2, C2.2, C3.2, C4.2, C5.2, C6.2, IC1.2, IC1.6, R5.2) + NET_C(GND, C6.1, IC1.1, Q1.E) + NET_C(R5.1, R4.2, IC1.7) + NET_C(V5, R4.1, R2.1, IC1.8, SPK1.1, R3.1) + + NET_C(C7.1, R6.1, IC1.3) + + NET_C(C7.2, R6.2, Q1.B) + NET_C(Q1.C, SPK1.2) + + NET_C(C8.1, R1.1, R3.2, IC1.5) + +NETLIST_END() + diff --git a/src/mame/audio/nl_gamemachine.h b/src/mame/audio/nl_gamemachine.h new file mode 100644 index 00000000000..d4655c166e5 --- /dev/null +++ b/src/mame/audio/nl_gamemachine.h @@ -0,0 +1,7 @@ +// license:CC0 +// copyright-holders:Couriersud +// thanks-to:Sean Riddle + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(gamemachine) diff --git a/src/mame/audio/nl_kidniki.cpp b/src/mame/audio/nl_kidniki.cpp index ce5fcb4434e..0cbcc0af857 100644 --- a/src/mame/audio/nl_kidniki.cpp +++ b/src/mame/audio/nl_kidniki.cpp @@ -7,9 +7,9 @@ #endif #ifndef NLTOOL_VERSION -#define USE_FRONTIERS 0 +#define USE_FRONTIERS 1 #else -#define USE_FRONTIERS 0 +#define USE_FRONTIERS 1 #endif /* if we use frontiers, use fixed STV for smaller matrix sizes */ @@ -361,7 +361,7 @@ NETLIST_END() NETLIST_START(kidniki) -#if (1 || USE_FRONTIERS) +#if (0 || USE_FRONTIERS) SOLVER(Solver, 48000) PARAM(Solver.ACCURACY, 1e-7) PARAM(Solver.NR_LOOPS, 300) diff --git a/src/mame/audio/nl_popeye.cpp b/src/mame/audio/nl_popeye.cpp new file mode 100644 index 00000000000..6dd3656c47c --- /dev/null +++ b/src/mame/audio/nl_popeye.cpp @@ -0,0 +1,93 @@ +// license:BSD-3-Clause +// copyright-holders:Couriersud +#include "netlist/devices/net_lib.h" + +/* ---------------------------------------------------------------------------- + * popeye schematics + * ---------------------------------------------------------------------------*/ + +/* This is the output stage of the audio circuit. + * It is solely an impedance changer and could be left away + */ + +static NETLIST_START(popeye_imp_changer) + RES(R62, 510000) + RES(R63, 100) + RES(R64, 510000) + RES(R65, 2100) + RES(R66, 330) + RES(R67, 51) + + QBJT_EB(Q8, "2SC1815") + QBJT_EB(Q9, "2SA1015") + + NET_C(V5, R62.1, Q8.C, R66.1) + NET_C(R62.2, R64.1, R63.1, C7.2) + NET_C(R63.2, Q8.B) + NET_C(Q8.E, R65.1, Q9.B) + NET_C(R66.2, Q9.E, R67.1) + + NET_C(GND, Q9.C, R65.2, R64.2) +NETLIST_END() + +NETLIST_START(popeye) + + /* register hard coded netlists */ + + LOCAL_SOURCE(popeye_imp_changer) + + /* Standard stuff */ + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-5) + ANALOG_INPUT(V5, 5) + + /* AY 8910 internal resistors */ + + RES(R_AY1_1, 1000) + RES(R_AY1_2, 1000) + RES(R_AY1_3, 1000) + + RES(R52, 2000) + RES(R55, 2000) + RES(R58, 2000) + RES(R53, 2000) + RES(R56, 2000) + RES(R59, 2000) + RES(R51, 20000) + RES(R57, 30000) + RES(R60, 30000) + + RES(R61, 120000) + + RES(ROUT, 5000) + + CAP(C4, 0.047e-6) + CAP(C5, 330e-12) + CAP(C6, 330e-12) + CAP(C7, 3.3e-6) + CAP(C40, 680e-12) + + NET_C(V5, R_AY1_1.1, R_AY1_2.1, R_AY1_3.1) + + NET_C(R_AY1_1.2, R52.1, R53.1) + NET_C(R_AY1_2.2, R55.1, R56.1) + NET_C(R_AY1_3.2, R58.1, R59.1) + + NET_C(R53.2, R51.1, C4.1) + NET_C(R56.2, R57.1, C5.1) + NET_C(R59.2, R60.1, C6.1) + + NET_C(R51.2, R57.2, R60.2, R61.1, C40.1, C7.1) + + NET_C(GND, R52.2, R55.2, R58.2, C4.2, C5.2, C6.2, R61.2, C40.2) + + INCLUDE(popeye_imp_changer) + + /* output resistor (actually located in TV */ + + NET_C(R67.2, ROUT.1) + + NET_C(GND, ROUT.2) + +NETLIST_END() diff --git a/src/mame/audio/nl_popeye.h b/src/mame/audio/nl_popeye.h new file mode 100644 index 00000000000..30746e2a4a0 --- /dev/null +++ b/src/mame/audio/nl_popeye.h @@ -0,0 +1,6 @@ +// license:BSD-3-Clause +// copyright-holders:Couriersud + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(popeye) diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp index 7127d99557b..3a7c85ceb04 100644 --- a/src/mame/drivers/1942.cpp +++ b/src/mame/drivers/1942.cpp @@ -70,7 +70,7 @@ correctly. #include "screen.h" #include "speaker.h" -#include "netlist/devices/net_lib.h" +#include "audio/nl_1942.h" namespace { @@ -87,84 +87,6 @@ constexpr XTAL AUDIO_CLOCK_1942P(MASTER_CLOCK_1942P/16); } // anonymous namespace -#define NLFILT(RA, R1, C1, R2) \ - NET_C(RA.1, V5) \ - NET_C(RA.2, R1.1) \ - NET_C(R1.2, GND) \ - NET_C(R1.1, C1.1) \ - NET_C(C1.2, R2.1) - -static NETLIST_START(nl_1942) - - /* Standard stuff */ - - SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) - PARAM(Solver.ACCURACY, 1e-6) - PARAM(Solver.GS_LOOPS, 6) - PARAM(Solver.SOR_FACTOR, 1.0) - //PARAM(Solver.DYNAMIC_TS, 1) - //PARAM(Solver.LTE, 5e-8) - - /* AY 8910 internal resistors */ - - RES(R_AY1_1, 1000); - RES(R_AY1_2, 1000); - RES(R_AY1_3, 1000); - RES(R_AY2_1, 1000); - RES(R_AY2_2, 1000); - RES(R_AY2_3, 1000); - - RES(R2, 220000) - RES(R3, 220000) - RES(R4, 220000) - RES(R5, 220000) - RES(R6, 220000) - RES(R7, 220000) - - RES(R11, 10000) - RES(R12, 10000) - RES(R13, 10000) - RES(R14, 10000) - RES(R15, 10000) - RES(R16, 10000) - - CAP(CC7, 10e-6) - CAP(CC8, 10e-6) - CAP(CC9, 10e-6) - CAP(CC10, 10e-6) - CAP(CC11, 10e-6) - CAP(CC12, 10e-6) - - NLFILT(R_AY2_3, R13, CC7, R2) - NLFILT(R_AY2_2, R15, CC8, R3) - NLFILT(R_AY2_1, R11, CC9, R4) - - NLFILT(R_AY1_3, R12, CC10, R5) - NLFILT(R_AY1_2, R14, CC11, R6) - NLFILT(R_AY1_1, R16, CC12, R7) - - POT(VR, 2000) - NET_C(VR.3, GND) - - NET_C(R2.2, VR.1) - NET_C(R3.2, VR.1) - NET_C(R4.2, VR.1) - NET_C(R5.2, VR.1) - NET_C(R6.2, VR.1) - NET_C(R7.2, VR.1) - - CAP(CC6, 10e-6) - RES(R1, 100000) - - NET_C(CC6.1, VR.2) - NET_C(CC6.2, R1.1) - CAP(CC3, 220e-6) - NET_C(R1.2, CC3.1) - NET_C(CC3.2, GND) - -NETLIST_END() - WRITE8_MEMBER(_1942_state::_1942_bankswitch_w) { membank("bank1")->set_entry(data & 0x03); @@ -612,7 +534,7 @@ void _1942_state::_1942(machine_config &config) /* Minimize resampling between ay8910 and netlist */ NETLIST_SOUND(config, "snd_nl", AUDIO_CLOCK / 8 / 2) - .set_source(NETLIST_NAME(nl_1942)) + .set_source(NETLIST_NAME(1942)) .add_route(ALL_OUTPUTS, "mono", 5.0); NETLIST_STREAM_INPUT(config, "snd_nl:cin0", 0, "R_AY1_1.R"); NETLIST_STREAM_INPUT(config, "snd_nl:cin1", 1, "R_AY1_2.R"); diff --git a/src/mame/drivers/cocoloco.cpp b/src/mame/drivers/cocoloco.cpp index 75e549760a8..2f17240892c 100644 --- a/src/mame/drivers/cocoloco.cpp +++ b/src/mame/drivers/cocoloco.cpp @@ -185,8 +185,7 @@ #include "emupal.h" #include "screen.h" #include "speaker.h" - -#include "netlist/devices/net_lib.h" +#include "audio/nl_cocoloco.h" #define MASTER_CLOCK XTAL(20'000'000) // confirmed @@ -233,47 +232,6 @@ private: * Sound Hardware * ***********************************/ -static NETLIST_START(nl_cocoloco) - - /* Standard stuff */ - - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-5) - ANALOG_INPUT(V5, 5) - - /* AY 8910 internal resistors */ - - RES(R_AY1_1, 1000); - RES(R_AY1_2, 1000); - RES(R_AY1_3, 1000); - - RES(R1, 4700) - RES(R2, 4700) - RES(R3, 4700) - RES(RAMP, 150000) - //RES(RAMP, 150) - POT(P1, 5000) - PARAM(P1.DIAL, 0.5) // 50% - - CAP(C1, 10e-6) - - NET_C(V5, R_AY1_1.1, R_AY1_2.1, R_AY1_3.1) - - NET_C(R_AY1_1.2, R1.1) - NET_C(R_AY1_2.2, R2.1) - NET_C(R_AY1_3.2, R3.1) - - NET_C(R1.2, R2.2, R3.2, P1.1) - - NET_C(P1.3, RAMP.2, GND) - NET_C(P1.2, C1.1) - NET_C(C1.2, RAMP.1) -#if 0 - CAP(C2, 0.1e-6) - NET_C(C2.2, GND) - NET_C(C2.1, RAMP.1) -#endif -NETLIST_END() /*********************************** @@ -538,7 +496,7 @@ void cocoloco_state::cocoloco(machine_config &config) /* NETLIST configuration using internal AY8910 resistor values */ NETLIST_SOUND(config, "snd_nl", 48000) - .set_source(NETLIST_NAME(nl_cocoloco)) + .set_source(NETLIST_NAME(cocoloco)) .add_route(ALL_OUTPUTS, "mono", 1.0); NETLIST_STREAM_INPUT(config, "snd_nl:cin0", 0, "R_AY1_1.R"); diff --git a/src/mame/drivers/gamemachine.cpp b/src/mame/drivers/gamemachine.cpp index 33adcd9e1f6..c71a2854491 100644 --- a/src/mame/drivers/gamemachine.cpp +++ b/src/mame/drivers/gamemachine.cpp @@ -65,95 +65,11 @@ Grand Prix: #include "machine/f3853.h" #include "speaker.h" #include "machine/netlist.h" -#include "netlist/devices/net_lib.h" +#include "audio/nl_gamemachine.h" // internal artwork #include "tgm.lh" - -/* - * Netlist below provided under Creative Commons CC0 - */ - -static NETLIST_START(nl_gamemachine) - - /* Standard stuff */ - - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-7) - ANALOG_INPUT(V5, 5) - - /* Schematics: http://seanriddle.com/gamemachineaudio.JPG - * - * 3870 datasheet: http://nice.kaze.com/MK3870.pdf - * - * The 3870 has mask-programmable outputs (page VIII-7 in datasheet). - * - * Given the schematics, in this case the OPENDRAIN configuration is the - * most probable. - * - */ - - NET_MODEL("OPENDRAIN FAMILY(OVL=0.0 OVH=0.0 ORL=1.0 ORH=1e12)") - NET_MODEL("TYPE6K FAMILY(OVL=0.05 OVH=0.05 ORL=1.0 ORH=6000)") - NET_MODEL("DIRECTDRIVE FAMILY(OVL=0.05 OVH=0.05 ORL=1.0 ORH=1000)") - - LOGIC_INPUT(P08, 1, "OPENDRAIN") - LOGIC_INPUT(P09, 1, "OPENDRAIN") - LOGIC_INPUT(P10, 1, "OPENDRAIN") - LOGIC_INPUT(P11, 1, "OPENDRAIN") - LOGIC_INPUT(P12, 1, "OPENDRAIN") - LOGIC_INPUT(P13, 1, "OPENDRAIN") - LOGIC_INPUT(P14, 1, "OPENDRAIN") - LOGIC_INPUT(P15, 1, "OPENDRAIN") - - RES(R1, RES_K(2.4)) - RES(R2, RES_K(10)) - RES(R3, RES_K(4.3)) - RES(R4, RES_K(150)) - RES(R5, RES_K(240)) - RES(R6, RES_K(2.4)) - RES(SPK1, 8) - - CAP(C1, CAP_P(50)) - CAP(C2, CAP_U(0.001)) - CAP(C3, CAP_U(0.002)) - CAP(C4, CAP_U(0.005)) - CAP(C5, CAP_U(0.010)) - - CAP(C6, CAP_P(50)) - CAP(C7, CAP_U(0.01)) - CAP(C8, CAP_U(470)) - - QBJT_EB(Q1, "9013") - - MC1455P_DIP(IC1) - - NET_C(P08.Q, R2.2, IC1.4) - NET_C(P09.Q, C8.2) - NET_C(P15.Q, R1.2) - - NET_C(C1.1, P10.Q) - NET_C(C2.1, P11.Q) - NET_C(C3.1, P12.Q) - NET_C(C4.1, P13.Q) - NET_C(C5.1, P14.Q) - - NET_C(C1.2, C2.2, C3.2, C4.2, C5.2, C6.2, IC1.2, IC1.6, R5.2) - NET_C(GND, C6.1, IC1.1, Q1.E) - NET_C(R5.1, R4.2, IC1.7) - NET_C(V5, R4.1, R2.1, IC1.8, SPK1.1, R3.1) - - NET_C(C7.1, R6.1, IC1.3) - - NET_C(C7.2, R6.2, Q1.B) - NET_C(Q1.C, SPK1.2) - - NET_C(C8.1, R1.1, R3.2, IC1.5) - -NETLIST_END() - - namespace { class tgm_state : public driver_device @@ -359,7 +275,7 @@ void tgm_state::tgm(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); NETLIST_SOUND(config, "snd_nl", 48000) - .set_source(netlist_nl_gamemachine) + .set_source(NETLIST_NAME(gamemachine)) .add_route(ALL_OUTPUTS, "speaker", 1.0); NETLIST_STREAM_OUTPUT(config, "snd_nl:cout0", 0, "SPK1.2").set_mult_offset(-10000.0, 10000.0 * 3.75); diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp index c4e34de9a16..7359f8038b4 100644 --- a/src/mame/drivers/pong.cpp +++ b/src/mame/drivers/pong.cpp @@ -59,9 +59,9 @@ TODO: Volleyball... #include "netlist/devices/net_lib.h" #include "machine/nl_breakout.h" -#include "machine/nl_pong.h" -#include "machine/nl_pongd.h" #include "machine/nl_rebound.h" +#include "machine/nl_pongf.h" +#include "machine/nl_pongdoubles.h" #include "screen.h" #include "speaker.h" @@ -299,17 +299,6 @@ public: void rebound(machine_config &config); - NETLIST_START(rebound) - - //MEMREGION_SOURCE("maincpu") - LOCAL_SOURCE(rebound_schematics) - PARAM(NETLIST.USE_DEACTIVATE, 1) - //FIXME: unknown name causes segmentation fault - //INCLUDE(rebound) - INCLUDE(rebound_schematics) - - NETLIST_END() - protected: // driver_device overrides @@ -563,7 +552,7 @@ void pong_state::pongf(machine_config &config) /* basic machine hardware */ - subdevice<netlist_mame_device>("maincpu")->set_setup_func(NETLIST_NAME(pong_fast)); + subdevice<netlist_mame_device>("maincpu")->set_setup_func(NETLIST_NAME(pongf)); } void pong_state::pongd(machine_config &config) @@ -607,7 +596,7 @@ void pong_state::pongd(machine_config &config) void rebound_state::rebound(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(NETLIST_NAME(rebound_schematics)); + NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(NETLIST_NAME(rebound)); // FIXME: Later NETLIST_ANALOG_INPUT(config, "maincpu:pot1", "POTP1.DIAL"); diff --git a/src/mame/drivers/popeye.cpp b/src/mame/drivers/popeye.cpp index b8b738fe623..06712fd4b8d 100644 --- a/src/mame/drivers/popeye.cpp +++ b/src/mame/drivers/popeye.cpp @@ -22,94 +22,7 @@ Notes: #include "netlist/devices/net_lib.h" #include "screen.h" #include "speaker.h" - -/* This is the output stage of the audio circuit. - * It is solely an impedance changer and could be left away - */ - -static NETLIST_START(nl_popeye_imp_changer) - RES(R62, 510000) - RES(R63, 100) - RES(R64, 510000) - RES(R65, 2100) - RES(R66, 330) - RES(R67, 51) - - QBJT_EB(Q8, "2SC1815") - QBJT_EB(Q9, "2SA1015") - - NET_C(V5, R62.1, Q8.C, R66.1) - NET_C(R62.2, R64.1, R63.1, C7.2) - NET_C(R63.2, Q8.B) - NET_C(Q8.E, R65.1, Q9.B) - NET_C(R66.2, Q9.E, R67.1) - - NET_C(GND, Q9.C, R65.2, R64.2) -NETLIST_END() - -static NETLIST_START(nl_popeye) - - /* register hard coded netlists */ - - LOCAL_SOURCE(nl_popeye_imp_changer) - - /* Standard stuff */ - - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-5) - ANALOG_INPUT(V5, 5) - - /* AY 8910 internal resistors */ - - RES(R_AY1_1, 1000); - RES(R_AY1_2, 1000); - RES(R_AY1_3, 1000); - - RES(R52, 2000) - RES(R55, 2000) - RES(R58, 2000) - RES(R53, 2000) - RES(R56, 2000) - RES(R59, 2000) - RES(R51, 20000) - RES(R57, 30000) - RES(R60, 30000) - - RES(R61, 120000) - - RES(ROUT, 5000) - - CAP(C4, 0.047e-6) - CAP(C5, 330e-12) - CAP(C6, 330e-12) - CAP(C7, 3.3e-6) - CAP(C40, 680e-12) - - NET_C(V5, R_AY1_1.1, R_AY1_2.1, R_AY1_3.1) - - NET_C(R_AY1_1.2, R52.1, R53.1) - NET_C(R_AY1_2.2, R55.1, R56.1) - NET_C(R_AY1_3.2, R58.1, R59.1) - - NET_C(R53.2, R51.1, C4.1) - NET_C(R56.2, R57.1, C5.1) - NET_C(R59.2, R60.1, C6.1) - - NET_C(R51.2, R57.2, R60.2, R61.1, C40.1, C7.1) - - NET_C(GND, R52.2, R55.2, R58.2, C4.2, C5.2, C6.2, R61.2, C40.2) - - INCLUDE(nl_popeye_imp_changer) - - /* output resistor (actually located in TV */ - - NET_C(R67.2, ROUT.1) - - NET_C(GND, ROUT.2) - -NETLIST_END() - - +#include "audio/nl_popeye.h" void tnx1_state::driver_start() { @@ -641,7 +554,7 @@ void tpp2_state::config(machine_config &config) /* NETLIST configuration using internal AY8910 resistor values */ NETLIST_SOUND(config, "snd_nl", 48000) - .set_source(netlist_nl_popeye) + .set_source(NETLIST_NAME(popeye)) .add_route(ALL_OUTPUTS, "mono", 1.0); NETLIST_STREAM_INPUT(config, "snd_nl:cin0", 0, "R_AY1_1.R"); diff --git a/src/mame/machine/nl_pongd.cpp b/src/mame/machine/nl_pongdoubles.cpp index 4d7ae1f98ff..4d7ae1f98ff 100644 --- a/src/mame/machine/nl_pongd.cpp +++ b/src/mame/machine/nl_pongdoubles.cpp diff --git a/src/mame/machine/nl_pongd.h b/src/mame/machine/nl_pongdoubles.h index 2d7ff28b9a6..2d7ff28b9a6 100644 --- a/src/mame/machine/nl_pongd.h +++ b/src/mame/machine/nl_pongdoubles.h diff --git a/src/mame/machine/nl_pong.cpp b/src/mame/machine/nl_pongf.cpp index 746f7e7e8c3..f3d5c3048a9 100644 --- a/src/mame/machine/nl_pong.cpp +++ b/src/mame/machine/nl_pongf.cpp @@ -14,7 +14,7 @@ #define FAST_CLOCK (1) -NETLIST_START(pong_fast) +NETLIST_START(pongf) SOLVER(Solver, 48000) PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers diff --git a/src/mame/machine/nl_pong.h b/src/mame/machine/nl_pongf.h index 0152f07e32b..80f96e6b7da 100644 --- a/src/mame/machine/nl_pong.h +++ b/src/mame/machine/nl_pongf.h @@ -1,4 +1,4 @@ // license:GPL-2.0+ // copyright-holders: Couriersud -NETLIST_EXTERNAL(pong_fast) +NETLIST_EXTERNAL(pongf) diff --git a/src/mame/machine/nl_rebound.cpp b/src/mame/machine/nl_rebound.cpp index 62deb191175..d6a2d96b9a2 100644 --- a/src/mame/machine/nl_rebound.cpp +++ b/src/mame/machine/nl_rebound.cpp @@ -69,16 +69,7 @@ #include "netlist/devices/net_lib.h" #endif -NETLIST_START(rebound_schematics) - SOLVER(Solver, 48000) - PARAM(Solver.DYNAMIC_TS, 1) - PARAM(Solver.DYNAMIC_LTE, 1e-3) - PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 5e-7) - - PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers - PARAM(Solver.ACCURACY, 1e-9) - PARAM(NETLIST.USE_DEACTIVATE, 1) - HINT(F9.B, NO_DEACTIVATE) +static NETLIST_START(rebound_schematics) ANALOG_INPUT(V5, 5) @@ -1293,3 +1284,19 @@ NETLIST_START(rebound_schematics) J1.7, J2.7, J3.10, J4.7, J5.7, J6.7, J7.7, J8.8, J9.10, K2.10, K3.8, K4.7, K5.7, K6.7, K7.8, K8.8, K9.10) NETLIST_END() + +NETLIST_START(rebound) + + LOCAL_SOURCE(rebound_schematics) + SOLVER(Solver, 48000) + PARAM(Solver.DYNAMIC_TS, 1) + PARAM(Solver.DYNAMIC_LTE, 1e-3) + PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 5e-7) + + PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers + PARAM(Solver.ACCURACY, 1e-9) + PARAM(NETLIST.USE_DEACTIVATE, 1) + HINT(F9.B, NO_DEACTIVATE) + INCLUDE(rebound_schematics) + +NETLIST_END() diff --git a/src/mame/machine/nl_rebound.h b/src/mame/machine/nl_rebound.h index 9caa161e281..593df187502 100644 --- a/src/mame/machine/nl_rebound.h +++ b/src/mame/machine/nl_rebound.h @@ -1,4 +1,4 @@ // license:GPL-2.0+ // copyright-holders: Couriersud -NETLIST_EXTERNAL(rebound_schematics) +NETLIST_EXTERNAL(rebound) |