summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2020-08-02 13:30:45 -0700
committer Aaron Giles <aaron@aarongiles.com>2020-08-02 13:30:45 -0700
commit4fc9044e4329ab8ade03739480b3a5bdaabe3ee1 (patch)
tree1c2ebce1029c5ec5caaeb576c5f17957150fde81
parent22d81a04465892ffcec3f869313e62bb250a5031 (diff)
parent8b43aabf0ee47ba09e1a42081fb3fb1dd3af9221 (diff)
Merge branch 'master' into nl_dips
-rw-r--r--hash/odyssey2.xml8
-rw-r--r--scripts/target/mame/arcade.lua2
-rw-r--r--src/devices/bus/a2bus/a2themill.cpp22
-rw-r--r--src/devices/bus/a2bus/a2themill.h3
-rw-r--r--src/devices/video/i8244.cpp14
-rw-r--r--src/devices/video/i8244.h2
-rw-r--r--src/emu/debug/debugcmd.cpp112
-rw-r--r--src/emu/debug/debugcmd.h1
-rw-r--r--src/emu/debug/debughlp.cpp17
-rw-r--r--src/emu/xtal.cpp2
-rw-r--r--src/lib/netlist/devices/nld_2102A.cpp16
-rw-r--r--src/lib/netlist/devices/nld_2102A.h20
-rw-r--r--src/lib/netlist/devices/nld_4006.cpp36
-rw-r--r--src/lib/netlist/devices/nld_4006.h38
-rw-r--r--src/lib/netlist/devices/nld_4013.cpp34
-rw-r--r--src/lib/netlist/devices/nld_4013.h38
-rw-r--r--src/lib/netlist/devices/nld_4017.cpp34
-rw-r--r--src/lib/netlist/devices/nld_4017.h36
-rw-r--r--src/lib/netlist/devices/nld_4020.cpp34
-rw-r--r--src/lib/netlist/devices/nld_4020.h36
-rw-r--r--src/lib/netlist/devices/nld_4053.cpp20
-rw-r--r--src/lib/netlist/devices/nld_4053.h22
-rw-r--r--src/lib/netlist/devices/nld_4066.cpp18
-rw-r--r--src/lib/netlist/devices/nld_4066.h20
-rw-r--r--src/lib/netlist/devices/nld_4316.cpp19
-rw-r--r--src/lib/netlist/devices/nld_4316.h21
-rw-r--r--src/lib/netlist/devices/nld_74107.cpp58
-rw-r--r--src/lib/netlist/devices/nld_74107.h60
-rw-r--r--src/lib/netlist/devices/nld_74113.cpp54
-rw-r--r--src/lib/netlist/devices/nld_74113.h56
-rw-r--r--src/lib/netlist/devices/nld_74123.cpp43
-rw-r--r--src/lib/netlist/devices/nld_74123.h45
-rw-r--r--src/lib/netlist/devices/nld_74153.cpp39
-rw-r--r--src/lib/netlist/devices/nld_74153.h41
-rw-r--r--src/lib/netlist/devices/nld_74164.cpp38
-rw-r--r--src/lib/netlist/devices/nld_74164.h38
-rw-r--r--src/lib/netlist/devices/nld_74165.cpp19
-rw-r--r--src/lib/netlist/devices/nld_74165.h23
-rw-r--r--src/lib/netlist/devices/nld_74166.cpp19
-rw-r--r--src/lib/netlist/devices/nld_74166.h23
-rw-r--r--src/lib/netlist/devices/nld_74174.cpp63
-rw-r--r--src/lib/netlist/devices/nld_74174.h32
-rw-r--r--src/lib/netlist/devices/nld_74175.cpp30
-rw-r--r--src/lib/netlist/devices/nld_74175.h32
-rw-r--r--src/lib/netlist/devices/nld_74192.cpp23
-rw-r--r--src/lib/netlist/devices/nld_74192.h25
-rw-r--r--src/lib/netlist/devices/nld_74193.cpp20
-rw-r--r--src/lib/netlist/devices/nld_74193.h22
-rw-r--r--src/lib/netlist/devices/nld_74194.cpp19
-rw-r--r--src/lib/netlist/devices/nld_74194.h23
-rw-r--r--src/lib/netlist/devices/nld_74365.cpp17
-rw-r--r--src/lib/netlist/devices/nld_74365.h22
-rw-r--r--src/lib/netlist/devices/nld_74377.cpp45
-rw-r--r--src/lib/netlist/devices/nld_74377.h47
-rw-r--r--src/lib/netlist/devices/nld_74393.cpp16
-rw-r--r--src/lib/netlist/devices/nld_74393.h18
-rw-r--r--src/lib/netlist/devices/nld_7448.cpp18
-rw-r--r--src/lib/netlist/devices/nld_7448.h20
-rw-r--r--src/lib/netlist/devices/nld_7450.cpp20
-rw-r--r--src/lib/netlist/devices/nld_7450.h20
-rw-r--r--src/lib/netlist/devices/nld_7473.cpp54
-rw-r--r--src/lib/netlist/devices/nld_7473.h56
-rw-r--r--src/lib/netlist/devices/nld_7474.cpp36
-rw-r--r--src/lib/netlist/devices/nld_7474.h38
-rw-r--r--src/lib/netlist/devices/nld_7475.cpp28
-rw-r--r--src/lib/netlist/devices/nld_7475.h31
-rw-r--r--src/lib/netlist/devices/nld_7483.cpp21
-rw-r--r--src/lib/netlist/devices/nld_7483.h23
-rw-r--r--src/lib/netlist/devices/nld_7485.cpp17
-rw-r--r--src/lib/netlist/devices/nld_7485.h19
-rw-r--r--src/lib/netlist/devices/nld_7490.cpp49
-rw-r--r--src/lib/netlist/devices/nld_7490.h51
-rw-r--r--src/lib/netlist/devices/nld_7492.cpp46
-rw-r--r--src/lib/netlist/devices/nld_7492.h49
-rw-r--r--src/lib/netlist/devices/nld_7493.cpp49
-rw-r--r--src/lib/netlist/devices/nld_7493.h53
-rw-r--r--src/lib/netlist/devices/nld_7497.cpp28
-rw-r--r--src/lib/netlist/devices/nld_7497.h31
-rw-r--r--src/lib/netlist/devices/nld_74ls629.cpp22
-rw-r--r--src/lib/netlist/devices/nld_74ls629.h24
-rw-r--r--src/lib/netlist/devices/nld_82S115.cpp20
-rw-r--r--src/lib/netlist/devices/nld_82S115.h24
-rw-r--r--src/lib/netlist/devices/nld_82S16.cpp19
-rw-r--r--src/lib/netlist/devices/nld_82S16.h20
-rw-r--r--src/lib/netlist/devices/nld_9316.cpp76
-rw-r--r--src/lib/netlist/devices/nld_9316.h80
-rw-r--r--src/lib/netlist/devices/nld_9322.cpp13
-rw-r--r--src/lib/netlist/devices/nld_9322.h17
-rw-r--r--src/lib/netlist/devices/nld_am2847.cpp13
-rw-r--r--src/lib/netlist/devices/nld_am2847.h17
-rw-r--r--src/lib/netlist/devices/nld_devinc.h2
-rw-r--r--src/lib/netlist/devices/nld_dm9314.cpp13
-rw-r--r--src/lib/netlist/devices/nld_dm9314.h17
-rw-r--r--src/lib/netlist/devices/nld_dm9334.cpp57
-rw-r--r--src/lib/netlist/devices/nld_dm9334.h61
-rw-r--r--src/lib/netlist/devices/nld_log.cpp12
-rw-r--r--src/lib/netlist/devices/nld_log.h14
-rw-r--r--src/lib/netlist/devices/nld_mm5837.cpp13
-rw-r--r--src/lib/netlist/devices/nld_mm5837.h15
-rw-r--r--src/lib/netlist/devices/nld_r2r_dac.cpp40
-rw-r--r--src/lib/netlist/devices/nld_r2r_dac.h42
-rw-r--r--src/lib/netlist/devices/nld_tms4800.cpp20
-rw-r--r--src/lib/netlist/devices/nld_tms4800.h24
-rw-r--r--src/lib/netlist/devices/nld_tristate.cpp2
-rw-r--r--src/lib/netlist/devices/nld_tristate.h6
-rw-r--r--src/lib/netlist/macro/nlm_roms.h6
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.cpp60
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver_ext.h18
-rw-r--r--src/mame/audio/nl_tankbatt.cpp165
-rw-r--r--src/mame/audio/nl_tankbatt.h10
-rw-r--r--src/mame/drivers/apple2e.cpp11
-rw-r--r--src/mame/drivers/cit101.cpp58
-rw-r--r--src/mame/drivers/dai.cpp54
-rw-r--r--src/mame/drivers/midvunit.cpp13
-rw-r--r--src/mame/drivers/nes_sh6578.cpp3
-rw-r--r--src/mame/drivers/odyssey2.cpp161
-rw-r--r--src/mame/drivers/tankbatt.cpp193
-rw-r--r--src/mame/drivers/votrtnt.cpp14
-rw-r--r--src/mame/includes/dai.h76
-rw-r--r--src/mame/includes/tankbatt.h36
-rw-r--r--src/mame/machine/cit101_kbd.cpp2
-rw-r--r--src/mame/machine/dai.cpp105
-rw-r--r--src/mame/mame.lst9
-rw-r--r--src/mame/video/apple2.cpp160
-rw-r--r--src/mame/video/apple2.h4
-rw-r--r--src/mame/video/dai.cpp6
126 files changed, 2283 insertions, 1956 deletions
diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml
index f9b5b879164..fc5f3005c2d 100644
--- a/hash/odyssey2.xml
+++ b/hash/odyssey2.xml
@@ -107,7 +107,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM.
</part>
</software>
- <software name="musician">
+ <software name="musician" supported="no">
<description>Musician (Euro)</description>
<year>1981</year>
<publisher>Philips</publisher>
@@ -271,7 +271,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM.
<!-- Games -->
- <software name="4in1">
+ <software name="4in1" supported="no">
<description>4 in 1 Row (Euro)</description>
<year>1982</year>
<publisher>Philips</publisher>
@@ -284,7 +284,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM.
</part>
</software>
- <software name="4en1" cloneof="4in1">
+ <software name="4en1" cloneof="4in1" supported="no">
<description>4 en 1 Ligne (Fra)</description>
<year>1982</year>
<publisher>Radiola</publisher>
@@ -1355,7 +1355,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM.
</part>
</software>
- <software name="qbert">
+ <software name="qbert" supported="partial">
<description>Q*bert (Euro)</description>
<year>1983</year>
<publisher>Parker Brothers</publisher>
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index 836b217dbee..6204a58c2dc 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -2975,6 +2975,8 @@ files {
MAME_DIR .. "src/mame/includes/skykid.h",
MAME_DIR .. "src/mame/video/skykid.cpp",
MAME_DIR .. "src/mame/drivers/sweetland.cpp",
+ MAME_DIR .. "src/mame/audio/nl_tankbatt.h",
+ MAME_DIR .. "src/mame/audio/nl_tankbatt.cpp",
MAME_DIR .. "src/mame/drivers/tankbatt.cpp",
MAME_DIR .. "src/mame/includes/tankbatt.h",
MAME_DIR .. "src/mame/video/tankbatt.cpp",
diff --git a/src/devices/bus/a2bus/a2themill.cpp b/src/devices/bus/a2bus/a2themill.cpp
index 87a4e330ddd..44925c4c68b 100644
--- a/src/devices/bus/a2bus/a2themill.cpp
+++ b/src/devices/bus/a2bus/a2themill.cpp
@@ -18,8 +18,6 @@
ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot
the disc and type "-DEMO1" and press Enter to launch the simple demo.
- TODO: Add DIP switch to select standard and OS-9 modes.
-
*********************************************************************/
#include "emu.h"
@@ -43,6 +41,23 @@ void a2bus_themill_device::m6809_mem(address_map &map)
map(0x0000, 0xffff).rw(FUNC(a2bus_themill_device::dma_r), FUNC(a2bus_themill_device::dma_w));
}
+static INPUT_PORTS_START( themill )
+ PORT_START("MILLCFG")
+ PORT_DIPNAME( 0x01, 0x01, "6809 Mapping" )
+ PORT_DIPSETTING( 0x00, "Original")
+ PORT_DIPSETTING( 0x01, "OS-9")
+INPUT_PORTS_END
+
+//-------------------------------------------------
+// input_ports - device-specific input ports
+//-------------------------------------------------
+
+ioport_constructor a2bus_themill_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( themill );
+}
+
+
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
@@ -65,6 +80,7 @@ a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device
: device_t(mconfig, type, tag, owner, clock)
, device_a2bus_card_interface(mconfig, *this)
, m_6809(*this, "m6809")
+ , m_cfgsw(*this, "MILLCFG")
, m_bEnabled(false)
, m_flipAddrSpace(false)
, m_6809Mode(false)
@@ -93,7 +109,7 @@ void a2bus_themill_device::device_reset()
{
m_bEnabled = false;
m_flipAddrSpace = false;
- m_6809Mode = true;
+ m_6809Mode = (m_cfgsw->read() & 1) ? true : false;
m_status = 0xc0; // OS9 loader relies on this
m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
diff --git a/src/devices/bus/a2bus/a2themill.h b/src/devices/bus/a2bus/a2themill.h
index 152cfa6882d..59f0c2316d1 100644
--- a/src/devices/bus/a2bus/a2themill.h
+++ b/src/devices/bus/a2bus/a2themill.h
@@ -33,6 +33,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
// overrides of standard a2bus slot functions
virtual uint8_t read_c0nx(uint8_t offset) override;
@@ -41,6 +42,8 @@ protected:
private:
required_device<cpu_device> m_6809;
+ required_ioport m_cfgsw;
+
bool m_bEnabled;
bool m_flipAddrSpace;
bool m_6809Mode;
diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp
index cc19dd2081e..72c59bfb587 100644
--- a/src/devices/video/i8244.cpp
+++ b/src/devices/video/i8244.cpp
@@ -2,10 +2,14 @@
// copyright-holders:Wilbert Pol
/***************************************************************************
- i8244.c
-
- Intel 8244 (NTSC)/8245 (PAL) Graphics and sound chip
+Intel 8244 (NTSC)/8245 (PAL) Graphics and sound chip
+TODO:
+- make the character rom external, but first verify it is correct (the table
+ below has 0x3f characters, it is missing 8 bytes)
+- NTSC has 263 scanlines, PAL has 313 scanlines, a quick fix will probably
+ cause small regressions here and there
+- PAL has 228 clocks per line (so, 456 half clocks)
***************************************************************************/
@@ -141,7 +145,7 @@ void i8244_device::device_config_complete()
return;
if (!screen().refresh_attoseconds())
- screen().set_raw(clock(), LINE_CLOCKS, START_ACTIVE_SCAN, END_ACTIVE_SCAN, m_screen_lines, START_Y, START_Y + SCREEN_HEIGHT);
+ screen().set_raw(clock()*2, LINE_CLOCKS, START_ACTIVE_SCAN, END_ACTIVE_SCAN, m_screen_lines, START_Y, START_Y + SCREEN_HEIGHT);
}
@@ -164,7 +168,7 @@ void i8244_device::device_start()
m_postprocess_func.resolve_safe();
// allocate a stream
- m_stream = stream_alloc( 0, 1, clock()/(LINE_CLOCKS*4) );
+ m_stream = stream_alloc( 0, 1, (clock()*2)/(LINE_CLOCKS*4) );
// register our state
save_pointer(NAME(m_vdc.reg), 0x100);
diff --git a/src/devices/video/i8244.h b/src/devices/video/i8244.h
index b9c28d070af..03710d9e8cc 100644
--- a/src/devices/video/i8244.h
+++ b/src/devices/video/i8244.h
@@ -2,8 +2,6 @@
// copyright-holders:Wilbert Pol
/***************************************************************************
- i8244.h
-
Intel 8244 (NTSC)/8245 (PAL) Graphics and sound chip
***************************************************************************/
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 20263e435c7..b431bb88732 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -272,6 +272,11 @@ debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu
m_console.register_command("fo", CMDFLAG_KEEP_QUOTES, AS_OPCODES, 3, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_find, this, _1, _2));
m_console.register_command("findo", CMDFLAG_KEEP_QUOTES, AS_OPCODES, 3, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_find, this, _1, _2));
+ m_console.register_command("fill", CMDFLAG_KEEP_QUOTES, AS_PROGRAM, 3, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_fill, this, _1, _2));
+ m_console.register_command("filld", CMDFLAG_KEEP_QUOTES, AS_DATA, 3, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_fill, this, _1, _2));
+ m_console.register_command("filli", CMDFLAG_KEEP_QUOTES, AS_IO, 3, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_fill, this, _1, _2));
+ m_console.register_command("fillo", CMDFLAG_KEEP_QUOTES, AS_OPCODES, 3, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_fill, this, _1, _2));
+
m_console.register_command("dasm", CMDFLAG_NONE, 0, 3, 5, std::bind(&debugger_commands::execute_dasm, this, _1, _2));
m_console.register_command("trace", CMDFLAG_NONE, 0, 1, 4, std::bind(&debugger_commands::execute_trace, this, _1, _2));
@@ -2909,6 +2914,113 @@ void debugger_commands::execute_find(int ref, const std::vector<std::string> &pa
}
+//-------------------------------------------------
+// execute_fill - execute the fill command
+//-------------------------------------------------
+
+void debugger_commands::execute_fill(int ref, const std::vector<std::string> &params)
+{
+ u64 offset, length;
+ address_space *space;
+
+ // validate parameters
+ if (!validate_number_parameter(params[0], offset))
+ return;
+ if (!validate_number_parameter(params[1], length))
+ return;
+ if (!validate_cpu_space_parameter(nullptr, ref, space))
+ return;
+
+ // further validation
+ offset = space->address_to_byte(offset & space->addrmask());
+ int cur_data_size = space->addr_shift() > 0 ? 2 : 1 << -space->addr_shift();
+ if (cur_data_size == 0)
+ cur_data_size = 1;
+
+ // parse the data parameters
+ u64 fill_data[256];
+ u8 fill_data_size[256];
+ int data_count = 0;
+ for (int i = 2; i < params.size(); i++)
+ {
+ const char *pdata = params[i].c_str();
+ size_t pdatalen = strlen(pdata) - 1;
+
+ // check for a string
+ if (pdata[0] == '"' && pdata[pdatalen] == '"')
+ {
+ for (int j = 1; j < pdatalen; j++)
+ {
+ fill_data[data_count] = pdata[j];
+ fill_data_size[data_count++] = 1;
+ }
+ }
+
+ // otherwise, validate as a number
+ else
+ {
+ // check for a 'b','w','d',or 'q' prefix
+ fill_data_size[data_count] = cur_data_size;
+ if (tolower(u8(pdata[0])) == 'b' && pdata[1] == '.') { fill_data_size[data_count] = cur_data_size = 1; pdata += 2; }
+ if (tolower(u8(pdata[0])) == 'w' && pdata[1] == '.') { fill_data_size[data_count] = cur_data_size = 2; pdata += 2; }
+ if (tolower(u8(pdata[0])) == 'd' && pdata[1] == '.') { fill_data_size[data_count] = cur_data_size = 4; pdata += 2; }
+ if (tolower(u8(pdata[0])) == 'q' && pdata[1] == '.') { fill_data_size[data_count] = cur_data_size = 8; pdata += 2; }
+
+ // validate as a number
+ if (!validate_number_parameter(pdata, fill_data[data_count++]))
+ return;
+ }
+ }
+ if (data_count == 0)
+ return;
+
+ // now fill memory
+ device_memory_interface &memory = space->device().memory();
+ auto dis = space->device().machine().disable_side_effects();
+ u64 count = space->address_to_byte(length);
+ while (count != 0)
+ {
+ // write the entire string
+ for (int j = 0; j < data_count; j++)
+ {
+ offs_t address = space->byte_to_address(offset) & space->logaddrmask();
+ if (!memory.translate(space->spacenum(), TRANSLATE_WRITE_DEBUG, address))
+ {
+ m_console.printf("Fill aborted due to page fault at %0*X\n", space->logaddrchars(), space->byte_to_address(offset) & space->logaddrmask());
+ length = 0;
+ break;
+ }
+ switch (fill_data_size[j])
+ {
+ case 1:
+ space->write_byte(address, fill_data[j]);
+ break;
+
+ case 2:
+ space->write_word_unaligned(address, fill_data[j]);
+ break;
+
+ case 4:
+ space->write_dword_unaligned(address, fill_data[j]);
+ break;
+
+ case 8:
+ space->read_qword_unaligned(address, fill_data[j]);
+ break;
+ }
+ offset += fill_data_size[j];
+ if (count <= fill_data_size[j])
+ {
+ count = 0;
+ break;
+ }
+ else
+ count -= fill_data_size[j];
+ }
+ }
+}
+
+
/*-------------------------------------------------
execute_dasm - execute the dasm command
-------------------------------------------------*/
diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h
index 04f54a4d75d..dad1979da39 100644
--- a/src/emu/debug/debugcmd.h
+++ b/src/emu/debug/debugcmd.h
@@ -152,6 +152,7 @@ private:
void execute_cheatundo(int ref, const std::vector<std::string> &params);
void execute_dasm(int ref, const std::vector<std::string> &params);
void execute_find(int ref, const std::vector<std::string> &params);
+ void execute_fill(int ref, const std::vector<std::string> &params);
void execute_trace(int ref, const std::vector<std::string> &params);
void execute_traceover(int ref, const std::vector<std::string> &params);
void execute_traceflush(int ref, const std::vector<std::string> &params);
diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp
index 014c574c586..88dcf85bda8 100644
--- a/src/emu/debug/debughlp.cpp
+++ b/src/emu/debug/debughlp.cpp
@@ -603,6 +603,23 @@ static const help_item static_help_list[] =
"followed by the string \"BEN\", followed by a word-sized 0.\n"
},
{
+ "fill",
+ "\n"
+ " fill[{d|i}] <address>,<length>[,<data>[,...]]\n"
+ "\n"
+ "The fill/filld/filli commands overwrite a block of memory with copies of the specified "
+ "sequence of data. 'fill' will fill program space memory, while 'filld' will fill data space "
+ "memory and 'filli' will fill I/O space memory. <address> indicates the address to begin "
+ "writing, and <length> indicates how much memory to fill. <data> can either be a quoted "
+ "string or a numeric value or expression. Non-string data is written by default in the "
+ "native word size of the CPU. To override the data size for non-strings, you can prefix "
+ "the value with b. to force byte-sized fill, w. for word-sized fill, d. for dword-sized, "
+ "and q. for qword-sized. Overrides are remembered, so if you want to fill with a series of "
+ "words, you need only to prefix the first value with a w. Note also that you can intermix "
+ "sizes in order to perform more complex fills. The fill operation may be truncated if a page "
+ "fault occurs or if part of the sequence or string would fall beyond <address>+<length>-1.\n"
+ },
+ {
"dump",
"\n"
" dump[{d|i}] <filename>,<address>,<length>[,<size>[,<ascii>[,<CPU>]]]\n"
diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp
index 6ae281e19f9..543aafc3499 100644
--- a/src/emu/xtal.cpp
+++ b/src/emu/xtal.cpp
@@ -143,6 +143,7 @@ const double XTAL::known_xtals[] = {
8'467'200, /* 8.4672_MHz_XTAL Subsino's Ying Hua Lian */
8'664'000, /* 8.664_MHz_XTAL Touchmaster */
8'700'000, /* 8.7_MHz_XTAL Tandberg TDV 2324 */
+ 8'867'000, /* 8.867_MHz_XTAL Philips G7400 (~2x PAL subcarrier) */
8'867'236, /* 8.867236_MHz_XTAL RCA CDP1869 PAL color clock (~2x PAL subcarrier) */
8'867'238, /* 8.867238_MHz_XTAL ETI-660 (~2x PAL subcarrier) */
8'945'000, /* 8.945_MHz_XTAL Hit Me */
@@ -265,6 +266,7 @@ const double XTAL::known_xtals[] = {
17'600'000, /* 17.6_MHz_XTAL LSI Octopus */
17'734'470, /* 17.73447_MHz_XTAL (~4x PAL subcarrier) */
17'734'472, /* 17.734472_MHz_XTAL actually ~4x PAL subcarrier */
+ 17'812'000, /* 17.812_MHz_XTAL Videopac C52 */
17'971'200, /* 17.9712_MHz_XTAL Compucolor II, Hazeltine Esprit III */
18'000'000, /* 18_MHz_XTAL S.A.R, Ikari Warriors 3 */
18'414'000, /* 18.414_MHz_XTAL Ann Arbor Ambassador */
diff --git a/src/lib/netlist/devices/nld_2102A.cpp b/src/lib/netlist/devices/nld_2102A.cpp
index 134e2aae945..e2fcd7ef9e1 100644
--- a/src/lib/netlist/devices/nld_2102A.cpp
+++ b/src/lib/netlist/devices/nld_2102A.cpp
@@ -3,6 +3,22 @@
/*
* nld_2102A.cpp
*
+ * 2102: 1024 x 1-bit Static RAM
+ *
+ * +--------------+
+ * A6 |1 ++ 16| A7
+ * A5 |2 15| A8
+ * RWQ |3 14| A9
+ * A1 |4 82S16 13| CEQ
+ * A2 |5 12| DO
+ * A3 |6 11| DI
+ * A4 |7 10| VCC
+ * A0 |8 9| GND
+ * +--------------+
+ *
+ *
+ * Naming conventions follow Intel datasheet
+ *
*/
#include "nld_2102A.h"
diff --git a/src/lib/netlist/devices/nld_2102A.h b/src/lib/netlist/devices/nld_2102A.h
index b617a209fdc..30e693f0e00 100644
--- a/src/lib/netlist/devices/nld_2102A.h
+++ b/src/lib/netlist/devices/nld_2102A.h
@@ -1,25 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_2102A.h
- *
- * 2102: 1024 x 1-bit Static RAM
- *
- * +--------------+
- * A6 |1 ++ 16| A7
- * A5 |2 15| A8
- * RWQ |3 14| A9
- * A1 |4 82S16 13| CEQ
- * A2 |5 12| DO
- * A3 |6 11| DI
- * A4 |7 10| VCC
- * A0 |8 9| GND
- * +--------------+
- *
- *
- * Naming conventions follow Intel datasheet
- *
- */
#ifndef NLD_2102A_H_
#define NLD_2102A_H_
diff --git a/src/lib/netlist/devices/nld_4006.cpp b/src/lib/netlist/devices/nld_4006.cpp
index d616c7c7258..1e49a46b724 100644
--- a/src/lib/netlist/devices/nld_4006.cpp
+++ b/src/lib/netlist/devices/nld_4006.cpp
@@ -1,7 +1,41 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_4006.c
+ * nld_4006.cpp
+ *
+ * CD4006: CMOS 18-Stage Static Register
+ *
+ * Description
+ *
+ * CD4006BMS types are composed of 4 separate shift register sections: two
+ * sections of four stages and two sections of five stages with an output tap
+ * at the fourth stage. Each section has an independent single-rail data path.
+ *
+ * A common clock signal is used for all stages. Data are shifted to the next
+ * stages on negative-going transitions of the clock. Through appropriate
+ * connections of inputs and outputs, multiple register sections of 4, 5, 8,
+ * and 9 stages or single register sections of 10, 12, 13, 14, 16, 17 and 18
+ * stages can be implemented using one CD4006BMS package. Longer shift register
+ * sections can be assembled by using more than one CD4006BMS.
+ *
+ * To facilitate cascading stages when clock rise and fall times are slow,
+ * an optional output (D1 + 4’) that is delayed one-half clockcycle, is
+ * provided.
+ *
+ * +--------------+
+ * D1 |1 ++ 14| VDD
+ * D1+4' |2 13| D1+4
+ * CLOCK |3 12| D2+5
+ * D2 |4 4006 11| D2+4
+ * D3 |5 10| D3+4
+ * D4 |6 9| D4+5
+ * VSS |7 8| D4+4
+ * +--------------+
+ *
+ *
+ * Naming conventions follow SYC datasheet
+ *
+ * FIXME: Timing depends on VDD-VSS
*
*/
diff --git a/src/lib/netlist/devices/nld_4006.h b/src/lib/netlist/devices/nld_4006.h
index 77ff7528fc8..86092c254dc 100644
--- a/src/lib/netlist/devices/nld_4006.h
+++ b/src/lib/netlist/devices/nld_4006.h
@@ -1,43 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_4006.h
- *
- * CD4006: CMOS 18-Stage Static Register
- *
- * Description
- *
- * CD4006BMS types are composed of 4 separate shift register sections: two
- * sections of four stages and two sections of five stages with an output tap
- * at the fourth stage. Each section has an independent single-rail data path.
- *
- * A common clock signal is used for all stages. Data are shifted to the next
- * stages on negative-going transitions of the clock. Through appropriate
- * connections of inputs and outputs, multiple register sections of 4, 5, 8,
- * and 9 stages or single register sections of 10, 12, 13, 14, 16, 17 and 18
- * stages can be implemented using one CD4006BMS package. Longer shift register
- * sections can be assembled by using more than one CD4006BMS.
- *
- * To facilitate cascading stages when clock rise and fall times are slow,
- * an optional output (D1 + 4’) that is delayed one-half clockcycle, is
- * provided.
- *
- * +--------------+
- * D1 |1 ++ 14| VDD
- * D1+4' |2 13| D1+4
- * CLOCK |3 12| D2+5
- * D2 |4 4006 11| D2+4
- * D3 |5 10| D3+4
- * D4 |6 9| D4+5
- * VSS |7 8| D4+4
- * +--------------+
- *
- *
- * Naming conventions follow SYC datasheet
- *
- * FIXME: Timing depends on VDD-VSS
- *
- */
#ifndef NLD_4006_H_
#define NLD_4006_H_
diff --git a/src/lib/netlist/devices/nld_4013.cpp b/src/lib/netlist/devices/nld_4013.cpp
index 455a4926d1f..66d03e09fbd 100644
--- a/src/lib/netlist/devices/nld_4013.cpp
+++ b/src/lib/netlist/devices/nld_4013.cpp
@@ -3,6 +3,40 @@
/*
* nld_4013.cpp
*
+ * CD4013: Dual Positive-Edge-Triggered D Flip-Flops
+ * with Set, Reset and Complementary Outputs
+ *
+ * +--------------+
+ * Q1 |1 ++ 14| VDD
+ * Q1Q |2 13| Q2
+ * CLOCK1 |3 12| Q2Q
+ * RESET1 |4 4013 11| CLOCK2
+ * DATA1 |5 10| RESET2
+ * SET1 |6 9| DATA2
+ * VSS |7 8| SET2
+ * +--------------+
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | SET | RES | CLK | D || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 1 | 0 | X | X || 1 | 0 |
+ * | 0 | 1 | X | X || 0 | 1 |
+ * | 1 | 1 | X | X || 1 | 1 | (*)
+ * | 0 | 0 | R | 1 || 1 | 0 |
+ * | 0 | 0 | R | 0 || 0 | 1 |
+ * | 0 | 0 | 0 | X || Q0| Q0Q |
+ * +-----+-----+-----+---++---+-----+
+ *
+ * (*) This configuration is not stable, i.e. it will not persist
+ * when either the preset and or clear inputs return to their inactive (high) level
+ *
+ * Q0 The output logic level of Q before the indicated input conditions were established
+ *
+ * R: 0 -. 1
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
+ * FIXME: Check that (*) is emulated properly
*/
#include "netlist/nl_base.h"
diff --git a/src/lib/netlist/devices/nld_4013.h b/src/lib/netlist/devices/nld_4013.h
index bb47796a553..7a2623bb8df 100644
--- a/src/lib/netlist/devices/nld_4013.h
+++ b/src/lib/netlist/devices/nld_4013.h
@@ -1,43 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_4013.h
- *
- * CD4013: Dual Positive-Edge-Triggered D Flip-Flops
- * with Set, Reset and Complementary Outputs
- *
- * +--------------+
- * Q1 |1 ++ 14| VDD
- * Q1Q |2 13| Q2
- * CLOCK1 |3 12| Q2Q
- * RESET1 |4 4013 11| CLOCK2
- * DATA1 |5 10| RESET2
- * SET1 |6 9| DATA2
- * VSS |7 8| SET2
- * +--------------+
- *
- * +-----+-----+-----+---++---+-----+
- * | SET | RES | CLK | D || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 1 | 0 | X | X || 1 | 0 |
- * | 0 | 1 | X | X || 0 | 1 |
- * | 1 | 1 | X | X || 1 | 1 | (*)
- * | 0 | 0 | R | 1 || 1 | 0 |
- * | 0 | 0 | R | 0 || 0 | 1 |
- * | 0 | 0 | 0 | X || Q0| Q0Q |
- * +-----+-----+-----+---++---+-----+
- *
- * (*) This configuration is not stable, i.e. it will not persist
- * when either the preset and or clear inputs return to their inactive (high) level
- *
- * Q0 The output logic level of Q before the indicated input conditions were established
- *
- * R: 0 -. 1
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- * FIXME: Check that (*) is emulated properly
- */
#ifndef NLD_4013_H_
#define NLD_4013_H_
diff --git a/src/lib/netlist/devices/nld_4017.cpp b/src/lib/netlist/devices/nld_4017.cpp
index c396ff73cd2..d680eaa4829 100644
--- a/src/lib/netlist/devices/nld_4017.cpp
+++ b/src/lib/netlist/devices/nld_4017.cpp
@@ -1,7 +1,39 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_4017.c
+ * nld_4017.cpp
+ *
+ * CD4017: Decade Counter/Divider with 10 Decoded Outputs
+ *
+ * +--------------+
+ * Q5 |1 ++ 16| VDD
+ * Q1 |2 15| RESET
+ * Q0 |3 14| CLOCK
+ * Q2 |4 4017 13| CLOCK ENABLE
+ * Q6 |5 12| CARRY OUT
+ * Q7 |6 11| Q9
+ * Q3 |7 10| Q4
+ * VSS |8 9| Q8
+ * +--------------+
+ *
+ *
+ * CD4022: Divide-by-8 Counter/Divider with 8 Decoded Outputs
+ *
+ * +--------------+
+ * Q1 |1 ++ 16| VDD
+ * Q0 |2 15| RESET
+ * Q2 |3 14| CLOCK
+ * Q5 |4 4022 13| CLOCK ENABLE
+ * Q6 |5 12| CARRY OUT
+ * NC |6 11| Q4
+ * Q3 |7 10| Q7
+ * VSS |8 9| NC
+ * +--------------+
+ *
+ * Naming conventions follow Fairchild datasheet
+ *
+ * FIXME: Timing depends on VDD-VSS
+ * This needs a cmos d-a/a-d proxy implementation.
*
*/
diff --git a/src/lib/netlist/devices/nld_4017.h b/src/lib/netlist/devices/nld_4017.h
index 58ff0dabcb9..e97c45586ca 100644
--- a/src/lib/netlist/devices/nld_4017.h
+++ b/src/lib/netlist/devices/nld_4017.h
@@ -1,41 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_4017.h
- *
- * CD4017: Decade Counter/Divider with 10 Decoded Outputs
- *
- * +--------------+
- * Q5 |1 ++ 16| VDD
- * Q1 |2 15| RESET
- * Q0 |3 14| CLOCK
- * Q2 |4 4017 13| CLOCK ENABLE
- * Q6 |5 12| CARRY OUT
- * Q7 |6 11| Q9
- * Q3 |7 10| Q4
- * VSS |8 9| Q8
- * +--------------+
- *
- *
- * CD4022: Divide-by-8 Counter/Divider with 8 Decoded Outputs
- *
- * +--------------+
- * Q1 |1 ++ 16| VDD
- * Q0 |2 15| RESET
- * Q2 |3 14| CLOCK
- * Q5 |4 4022 13| CLOCK ENABLE
- * Q6 |5 12| CARRY OUT
- * NC |6 11| Q4
- * Q3 |7 10| Q7
- * VSS |8 9| NC
- * +--------------+
- *
- * Naming conventions follow Fairchild datasheet
- *
- * FIXME: Timing depends on VDD-VSS
- * This needs a cmos d-a/a-d proxy implementation.
- *
- */
#ifndef NLD_4017_H_
#define NLD_4017_H_
diff --git a/src/lib/netlist/devices/nld_4020.cpp b/src/lib/netlist/devices/nld_4020.cpp
index b6ae2b45bd1..4143f66da8d 100644
--- a/src/lib/netlist/devices/nld_4020.cpp
+++ b/src/lib/netlist/devices/nld_4020.cpp
@@ -1,7 +1,39 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_4020.c
+ * nld_4020.cpp
+ *
+ * CD4020: 14-Stage Ripple Carry Binary Counters
+ *
+ * +--------------+
+ * Q12 |1 ++ 16| VDD
+ * Q13 |2 15| Q11
+ * Q14 |3 14| Q10
+ * Q6 |4 4020 13| Q8
+ * Q5 |5 12| Q9
+ * Q7 |6 11| RESET
+ * Q4 |7 10| IP (Input pulses)
+ * VSS |8 9| Q1
+ * +--------------+
+ *
+ *
+ * CD4024: 7-Stage Ripple Carry Binary Counters
+ *
+ * +--------------+
+ * IP |1 ++ 14| VDD
+ * RESET |2 13| NC
+ * Q7 |3 12| Q1
+ * Q6 |4 4024 11| Q2
+ * Q5 |5 10| NC
+ * Q4 |6 9| Q3
+ * VSS |7 8| NC
+ * +--------------+
+ *
+ *
+ * Naming conventions follow Texas Instruments datasheet
+ *
+ * FIXME: Timing depends on VDD-VSS
+ * This needs a cmos d-a/a-d proxy implementation.
*
*/
diff --git a/src/lib/netlist/devices/nld_4020.h b/src/lib/netlist/devices/nld_4020.h
index d3c9a60acd6..942b2f2d457 100644
--- a/src/lib/netlist/devices/nld_4020.h
+++ b/src/lib/netlist/devices/nld_4020.h
@@ -1,41 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_4020.h
- *
- * CD4020: 14-Stage Ripple Carry Binary Counters
- *
- * +--------------+
- * Q12 |1 ++ 16| VDD
- * Q13 |2 15| Q11
- * Q14 |3 14| Q10
- * Q6 |4 4020 13| Q8
- * Q5 |5 12| Q9
- * Q7 |6 11| RESET
- * Q4 |7 10| IP (Input pulses)
- * VSS |8 9| Q1
- * +--------------+
- *
- *
- * CD4024: 7-Stage Ripple Carry Binary Counters
- *
- * +--------------+
- * IP |1 ++ 14| VDD
- * RESET |2 13| NC
- * Q7 |3 12| Q1
- * Q6 |4 4024 11| Q2
- * Q5 |5 10| NC
- * Q4 |6 9| Q3
- * VSS |7 8| NC
- * +--------------+
- *
- *
- * Naming conventions follow Texas Instruments datasheet
- *
- * FIXME: Timing depends on VDD-VSS
- * This needs a cmos d-a/a-d proxy implementation.
- *
- */
#ifndef NLD_4020_H_
#define NLD_4020_H_
diff --git a/src/lib/netlist/devices/nld_4053.cpp b/src/lib/netlist/devices/nld_4053.cpp
index 37099e2d9d1..62db781fbfa 100644
--- a/src/lib/netlist/devices/nld_4053.cpp
+++ b/src/lib/netlist/devices/nld_4053.cpp
@@ -1,10 +1,28 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_4053.c
+ * nld_4053.cpp
+ *
+ * CD4053: Triple 2-Channel Analog Multiplexer/Demultiplexer
+ *
+ * +--------------+
+ * INOUTBY |1 ++ 16| VDD
+ * INOUTBX |2 15| OUTINB
+ * INOUTCY |3 14| OUTINA
+ * OUTINC |4 4053 13| INOUTAY
+ * INOUTCX |5 12| INOUTAX
+ * INH |6 11| A
+ * VEE |7 10| B
+ * VSS |8 9| C
+ * +--------------+
+ *
+ * FIXME: These devices are slow (~125 ns). This is currently not reflected
+ *
+ * Naming conventions follow National semiconductor datasheet
*
*/
+
#include "nld_4053.h"
#include "netlist/analog/nlid_twoterm.h"
diff --git a/src/lib/netlist/devices/nld_4053.h b/src/lib/netlist/devices/nld_4053.h
index 27c2257cc65..83636ef636c 100644
--- a/src/lib/netlist/devices/nld_4053.h
+++ b/src/lib/netlist/devices/nld_4053.h
@@ -1,27 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_4053.h
- *
- * CD4053: Triple 2-Channel Analog Multiplexer/Demultiplexer
- *
- * +--------------+
- * INOUTBY |1 ++ 16| VDD
- * INOUTBX |2 15| OUTINB
- * INOUTCY |3 14| OUTINA
- * OUTINC |4 4053 13| INOUTAY
- * INOUTCX |5 12| INOUTAX
- * INH |6 11| A
- * VEE |7 10| B
- * VSS |8 9| C
- * +--------------+
- *
- * FIXME: These devices are slow (~125 ns). This is currently not reflected
- *
- * Naming conventions follow National semiconductor datasheet
- *
- */
-
#ifndef NLD_4053_H_
#define NLD_4053_H_
diff --git a/src/lib/netlist/devices/nld_4066.cpp b/src/lib/netlist/devices/nld_4066.cpp
index fd66d982ac5..1c6723dcb1e 100644
--- a/src/lib/netlist/devices/nld_4066.cpp
+++ b/src/lib/netlist/devices/nld_4066.cpp
@@ -1,7 +1,23 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_4066.c
+ * nld_4066.cpp
+ *
+ * CD4066: Quad Bilateral Switch
+ *
+ * +--------------+
+ * INOUTA |1 ++ 14| VDD
+ * OUTINA |2 13| CONTROLA
+ * OUTINB |3 12| CONTROLD
+ * INOUTB |4 4066 11| INOUTD
+ * CONTROLB |5 10| OUTIND
+ * CONTROLC |6 9| OUTINC
+ * VSS |7 8| INOUTC
+ * +--------------+
+ *
+ * FIXME: These devices are slow (~125 ns). This is currently not reflected
+ *
+ * Naming conventions follow National semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_4066.h b/src/lib/netlist/devices/nld_4066.h
index 0a43911d3ce..f30369f28d3 100644
--- a/src/lib/netlist/devices/nld_4066.h
+++ b/src/lib/netlist/devices/nld_4066.h
@@ -1,25 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_4066.h
- *
- * CD4066: Quad Bilateral Switch
- *
- * +--------------+
- * INOUTA |1 ++ 14| VDD
- * OUTINA |2 13| CONTROLA
- * OUTINB |3 12| CONTROLD
- * INOUTB |4 4066 11| INOUTD
- * CONTROLB |5 10| OUTIND
- * CONTROLC |6 9| OUTINC
- * VSS |7 8| INOUTC
- * +--------------+
- *
- * FIXME: These devices are slow (~125 ns). This is currently not reflected
- *
- * Naming conventions follow National semiconductor datasheet
- *
- */
#ifndef NLD_4066_H_
#define NLD_4066_H_
diff --git a/src/lib/netlist/devices/nld_4316.cpp b/src/lib/netlist/devices/nld_4316.cpp
index 7c0159dbe91..9bd042e1bcd 100644
--- a/src/lib/netlist/devices/nld_4316.cpp
+++ b/src/lib/netlist/devices/nld_4316.cpp
@@ -1,7 +1,24 @@
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
/*
- * nld_4316.c
+ * nld_4316.cpp
+ *
+ * CD4066: Quad Analog Switch with Level Translation
+ *
+ * +--------------+
+ * 1Z |1 ++ 16| VCC
+ * 1Y |2 15| 1S
+ * 2Y |3 14| 4S
+ * 2Z |4 4316 13| 4Z
+ * 2S |5 12| 4Y
+ * 3S |6 11| 3Y
+ * /E |7 10| 3Z
+ * GND |8 9| VEE
+ * +--------------+
+ *
+ * FIXME: These devices are slow (can be over 200 ns in HC types). This is currently not reflected
+ *
+ * Naming conventions follow Texas Instruments datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_4316.h b/src/lib/netlist/devices/nld_4316.h
index d19e16d171c..35c94bd30a0 100644
--- a/src/lib/netlist/devices/nld_4316.h
+++ b/src/lib/netlist/devices/nld_4316.h
@@ -1,26 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
-/*
- * nld_4316.h
- *
- * CD4066: Quad Analog Switch with Level Translation
- *
- * +--------------+
- * 1Z |1 ++ 16| VCC
- * 1Y |2 15| 1S
- * 2Y |3 14| 4S
- * 2Z |4 4316 13| 4Z
- * 2S |5 12| 4Y
- * 3S |6 11| 3Y
- * /E |7 10| 3Z
- * GND |8 9| VEE
- * +--------------+
- *
- * FIXME: These devices are slow (can be over 200 ns in HC types). This is currently not reflected
- *
- * Naming conventions follow Texas Instruments datasheet
- *
- */
#ifndef NLD_4316_H_
#define NLD_4316_H_
diff --git a/src/lib/netlist/devices/nld_74107.cpp b/src/lib/netlist/devices/nld_74107.cpp
index 4c24bd760f4..26df3f65bee 100644
--- a/src/lib/netlist/devices/nld_74107.cpp
+++ b/src/lib/netlist/devices/nld_74107.cpp
@@ -1,7 +1,63 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74107.c
+ * nld_74107.cpp
+ *
+ * DM74107: DUAL J-K FLIP-FLOPS WITH CLEAR
+ *
+ * +--------------+
+ * 1J |1 ++ 14| VCC
+ * 1QQ |2 13| 1CLRQ
+ * 1Q |3 12| 1CLK
+ * 1K |4 74107 11| 2K
+ * 2Q |5 10| 2CLRQ
+ * 2QQ |6 9| 2CLK
+ * GND |7 8| 2J
+ * +--------------+
+ *
+ *
+ * Function table 107
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | CLRQ| CLK | J | K || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | X | X | X || 0 | 1 |
+ * | 1 | * | 0 | 0 || Q0| Q0Q |
+ * | 1 | * | 1 | 0 || 1 | 0 |
+ * | 1 | * | 0 | 1 || 0 | 1 |
+ * | 1 | * | 1 | 1 || TOGGLE |
+ * +-----+-----+-----+---++---+-----+
+ * _
+ * * = _| |_
+ *
+ * This is positive triggered, J and K
+ * are latched during clock high and
+ * transferred when CLK falls. The
+ * datasheet requires J and K to be
+ * stable during clock high.
+ *
+ * Function table 107A
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | CLRQ| CLK | J | K || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | X | X | X || 0 | 1 |
+ * | 1 | F | 0 | 0 || Q0| Q0Q |
+ * | 1 | F | 1 | 0 || 1 | 0 |
+ * | 1 | F | 0 | 1 || 0 | 1 |
+ * | 1 | F | 1 | 1 || TOGGLE |
+ * | 1 | 1 | X | X || Q0| Q0Q |
+ * +-----+-----+-----+---++---+-----+
+ *
+ * THe 107A is negative triggered.
+ *
+ * Naming conventions follow Texas instruments datasheet
+ *
+ * TODO: Currently, only the 107A is implemented.
+ * The 107 uses the same model, but different timings.
+ * The requirement that J and K must be stable during
+ * clock high indicates that the chip may exhibit undefined
+ * behaviour.
*
*/
diff --git a/src/lib/netlist/devices/nld_74107.h b/src/lib/netlist/devices/nld_74107.h
index 6ca1316b0bf..3a954dbe09a 100644
--- a/src/lib/netlist/devices/nld_74107.h
+++ b/src/lib/netlist/devices/nld_74107.h
@@ -1,65 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74107.h
- *
- * DM74107: DUAL J-K FLIP-FLOPS WITH CLEAR
- *
- * +--------------+
- * 1J |1 ++ 14| VCC
- * 1QQ |2 13| 1CLRQ
- * 1Q |3 12| 1CLK
- * 1K |4 74107 11| 2K
- * 2Q |5 10| 2CLRQ
- * 2QQ |6 9| 2CLK
- * GND |7 8| 2J
- * +--------------+
- *
- *
- * Function table 107
- *
- * +-----+-----+-----+---++---+-----+
- * | CLRQ| CLK | J | K || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | X | X | X || 0 | 1 |
- * | 1 | * | 0 | 0 || Q0| Q0Q |
- * | 1 | * | 1 | 0 || 1 | 0 |
- * | 1 | * | 0 | 1 || 0 | 1 |
- * | 1 | * | 1 | 1 || TOGGLE |
- * +-----+-----+-----+---++---+-----+
- * _
- * * = _| |_
- *
- * This is positive triggered, J and K
- * are latched during clock high and
- * transferred when CLK falls. The
- * datasheet requires J and K to be
- * stable during clock high.
- *
- * Function table 107A
- *
- * +-----+-----+-----+---++---+-----+
- * | CLRQ| CLK | J | K || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | X | X | X || 0 | 1 |
- * | 1 | F | 0 | 0 || Q0| Q0Q |
- * | 1 | F | 1 | 0 || 1 | 0 |
- * | 1 | F | 0 | 1 || 0 | 1 |
- * | 1 | F | 1 | 1 || TOGGLE |
- * | 1 | 1 | X | X || Q0| Q0Q |
- * +-----+-----+-----+---++---+-----+
- *
- * THe 107A is negative triggered.
- *
- * Naming conventions follow Texas instruments datasheet
- *
- * TODO: Currently, only the 107A is implemented.
- * The 107 uses the same model, but different timings.
- * The requirement that J and K must be stable during
- * clock high indicates that the chip may exhibit undefined
- * behaviour.
- *
- */
#ifndef NLD_74107_H_
#define NLD_74107_H_
diff --git a/src/lib/netlist/devices/nld_74113.cpp b/src/lib/netlist/devices/nld_74113.cpp
index 37b81c01499..1198771695e 100644
--- a/src/lib/netlist/devices/nld_74113.cpp
+++ b/src/lib/netlist/devices/nld_74113.cpp
@@ -1,7 +1,59 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74113.c
+ * nld_74113.cpp
+ *
+ * 74113: Dual Master-Slave J-K Flip-Flops with Set and Complementary Outputs
+ * 74113A: Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flops with Set and Complementary Outputs
+ *
+ * +----------+
+ * 1CLK |1 ++ 14| VCC
+ * 1K |2 13| 2CLK
+ * 1J |3 12| 2K
+ * 1SETQ |4 74113 11| 2J
+ * 1Q |5 10| 2SETQ
+ * 1QQ |6 9| 2Q
+ * GND |7 8| 2QQ
+ * +----------+
+ *
+ *
+ * Function table 113
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | SETQ| CLK | J | K || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | X | X | X || 1 | 0 |
+ * | 1 | * | 0 | 0 || Q0| Q0Q |
+ * | 1 | * | 1 | 0 || 1 | 0 |
+ * | 1 | * | 0 | 1 || 0 | 1 |
+ * | 1 | * | 1 | 1 || TOGGLE |
+ * +-----+-----+-----+---++---+-----+
+ * _
+ * * = _| |_
+ *
+ * This is positive triggered, J and K
+ * are latched during clock high and
+ * transferred when CLK falls.
+ *
+ * Function table 113A
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | CLRQ| CLK | J | K || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | X | X | X || 0 | 1 |
+ * | 1 | F | 0 | 0 || Q0| Q0Q |
+ * | 1 | F | 1 | 0 || 1 | 0 |
+ * | 1 | F | 0 | 1 || 0 | 1 |
+ * | 1 | F | 1 | 1 || TOGGLE |
+ * | 1 | 1 | X | X || Q0| Q0Q |
+ * +-----+-----+-----+---++---+-----+
+ *
+ * THe 113A is negative triggered.
+ *
+ * Naming conventions follow Texas instruments datasheet
+ *
+ * FIXME: Currently, only the 113 is implemented.
+ * The 113A uses the same model.
*
*/
diff --git a/src/lib/netlist/devices/nld_74113.h b/src/lib/netlist/devices/nld_74113.h
index e43915d8e9d..0a33de8cac6 100644
--- a/src/lib/netlist/devices/nld_74113.h
+++ b/src/lib/netlist/devices/nld_74113.h
@@ -1,61 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74113.h
- *
- * 74113: Dual Master-Slave J-K Flip-Flops with Set and Complementary Outputs
- * 74113A: Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flops with Set and Complementary Outputs
- *
- * +----------+
- * 1CLK |1 ++ 14| VCC
- * 1K |2 13| 2CLK
- * 1J |3 12| 2K
- * 1SETQ |4 74113 11| 2J
- * 1Q |5 10| 2SETQ
- * 1QQ |6 9| 2Q
- * GND |7 8| 2QQ
- * +----------+
- *
- *
- * Function table 113
- *
- * +-----+-----+-----+---++---+-----+
- * | SETQ| CLK | J | K || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | X | X | X || 1 | 0 |
- * | 1 | * | 0 | 0 || Q0| Q0Q |
- * | 1 | * | 1 | 0 || 1 | 0 |
- * | 1 | * | 0 | 1 || 0 | 1 |
- * | 1 | * | 1 | 1 || TOGGLE |
- * +-----+-----+-----+---++---+-----+
- * _
- * * = _| |_
- *
- * This is positive triggered, J and K
- * are latched during clock high and
- * transferred when CLK falls.
- *
- * Function table 113A
- *
- * +-----+-----+-----+---++---+-----+
- * | CLRQ| CLK | J | K || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | X | X | X || 0 | 1 |
- * | 1 | F | 0 | 0 || Q0| Q0Q |
- * | 1 | F | 1 | 0 || 1 | 0 |
- * | 1 | F | 0 | 1 || 0 | 1 |
- * | 1 | F | 1 | 1 || TOGGLE |
- * | 1 | 1 | X | X || Q0| Q0Q |
- * +-----+-----+-----+---++---+-----+
- *
- * THe 113A is negative triggered.
- *
- * Naming conventions follow Texas instruments datasheet
- *
- * FIXME: Currently, only the 113 is implemented.
- * The 113A uses the same model.
- *
- */
#ifndef NLD_74113_H_
#define NLD_74113_H_
diff --git a/src/lib/netlist/devices/nld_74123.cpp b/src/lib/netlist/devices/nld_74123.cpp
index 31f59dbbc22..f19f0042be1 100644
--- a/src/lib/netlist/devices/nld_74123.cpp
+++ b/src/lib/netlist/devices/nld_74123.cpp
@@ -1,7 +1,48 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74123.c
+ * nld_74123.cpp
+ *
+ * 74123: Dual Retriggerable One-Shot with Clear and Complementary Outputs
+ *
+ * +--------------+
+ * A1 |1 ++ 16| VCC
+ * B1 |2 15| RC1
+ * CLR1 |3 14| C1
+ * Q1Q |4 74123 13| Q1
+ * Q2 |5 12| Q2Q
+ * C2 |6 11| CLR2
+ * RC2 |7 10| B2
+ * GND |8 9| A2
+ * +--------------+
+ *
+ * Naming conventions follow Fairchild Semiconductor datasheet
+ *
+ * DM9602: Dual Retriggerable, Resettable One Shots
+ *
+ * +--------------+
+ * C1 |1 ++ 16| VCC
+ * RC1 |2 15| C2
+ * CLR1 |3 14| RC2
+ * B1 |4 9602 13| CLR2
+ * A1 |5 12| B2
+ * Q1 |6 11| A2
+ * Q1Q |7 10| Q2
+ * GND |8 9| Q2Q
+ * +--------------+
+ *
+ * CD4538: Dual Retriggerable, Resettable One Shots
+ *
+ * +--------------+
+ * C1 |1 ++ 16| VCC
+ * RC1 |2 15| C2
+ * CLR1 |3 14| RC2
+ * A1 |4 4538 13| CLR2
+ * B1 |5 12| A2
+ * Q1 |6 11| B2
+ * Q1Q |7 10| Q2
+ * GND |8 9| Q2Q
+ * +--------------+
*
*/
diff --git a/src/lib/netlist/devices/nld_74123.h b/src/lib/netlist/devices/nld_74123.h
index 9557b0382b6..be07c60f6d4 100644
--- a/src/lib/netlist/devices/nld_74123.h
+++ b/src/lib/netlist/devices/nld_74123.h
@@ -1,50 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74123.h
- *
- * 74123: Dual Retriggerable One-Shot with Clear and Complementary Outputs
- *
- * +--------------+
- * A1 |1 ++ 16| VCC
- * B1 |2 15| RC1
- * CLR1 |3 14| C1
- * Q1Q |4 74123 13| Q1
- * Q2 |5 12| Q2Q
- * C2 |6 11| CLR2
- * RC2 |7 10| B2
- * GND |8 9| A2
- * +--------------+
- *
- * Naming conventions follow Fairchild Semiconductor datasheet
- *
- * DM9602: Dual Retriggerable, Resettable One Shots
- *
- * +--------------+
- * C1 |1 ++ 16| VCC
- * RC1 |2 15| C2
- * CLR1 |3 14| RC2
- * B1 |4 9602 13| CLR2
- * A1 |5 12| B2
- * Q1 |6 11| A2
- * Q1Q |7 10| Q2
- * GND |8 9| Q2Q
- * +--------------+
- *
- * CD4538: Dual Retriggerable, Resettable One Shots
- *
- * +--------------+
- * C1 |1 ++ 16| VCC
- * RC1 |2 15| C2
- * CLR1 |3 14| RC2
- * A1 |4 4538 13| CLR2
- * B1 |5 12| A2
- * Q1 |6 11| B2
- * Q1Q |7 10| Q2
- * GND |8 9| Q2Q
- * +--------------+
- *
- */
#ifndef NLD_74123_H_
#define NLD_74123_H_
diff --git a/src/lib/netlist/devices/nld_74153.cpp b/src/lib/netlist/devices/nld_74153.cpp
index 09602abd2f8..6fea1a711d3 100644
--- a/src/lib/netlist/devices/nld_74153.cpp
+++ b/src/lib/netlist/devices/nld_74153.cpp
@@ -1,7 +1,44 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74153.c
+ * nld_74153.cpp
+ *
+ * DM74153: Dual 4-Line to 1-Line Data Selectors Multiplexers
+ *
+ * +--------------+
+ * G1 |1 ++ 16| VCC
+ * B |2 15| G2
+ * 1C3 |3 14| A
+ * 1C2 |4 74153 13| 2C3
+ * 1C1 |5 12| 2C2
+ * 1C0 |6 11| 2C1
+ * Y1 |7 10| 2C0
+ * GND |8 9| Y2
+ * +--------------+
+ *
+ *
+ * Function table
+ *
+ * +-----+-----++----+----+----+----++----+----+
+ * | B | A || C0 | C1 | C2 | C3 || G | Y |
+ * +=====+=====++====+====+====+====++====+====+
+ * | X | X || X | X | X | X || H | L |
+ * | L | L || L | X | X | X || L | L |
+ * | L | L || H | X | X | X || L | H |
+ * | L | H || X | L | X | X || L | L |
+ * | L | H || X | H | X | X || L | H |
+ * | H | L || X | X | L | X || L | L |
+ * | H | L || X | X | H | X || L | H |
+ * | H | H || X | X | X | L || L | L |
+ * | H | H || X | X | X | H || L | H |
+ * +-----+-----++----+----+----+----++----+----+
+ *
+ * A, B : Select Inputs
+ * C* : Data inputs
+ * G : Strobe
+ * Y : Output
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_74153.h b/src/lib/netlist/devices/nld_74153.h
index 4a0e24d1aa3..b291e1dd231 100644
--- a/src/lib/netlist/devices/nld_74153.h
+++ b/src/lib/netlist/devices/nld_74153.h
@@ -1,46 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74153.h
- *
- * DM74153: Dual 4-Line to 1-Line Data Selectors Multiplexers
- *
- * +--------------+
- * G1 |1 ++ 16| VCC
- * B |2 15| G2
- * 1C3 |3 14| A
- * 1C2 |4 74153 13| 2C3
- * 1C1 |5 12| 2C2
- * 1C0 |6 11| 2C1
- * Y1 |7 10| 2C0
- * GND |8 9| Y2
- * +--------------+
- *
- *
- * Function table
- *
- * +-----+-----++----+----+----+----++----+----+
- * | B | A || C0 | C1 | C2 | C3 || G | Y |
- * +=====+=====++====+====+====+====++====+====+
- * | X | X || X | X | X | X || H | L |
- * | L | L || L | X | X | X || L | L |
- * | L | L || H | X | X | X || L | H |
- * | L | H || X | L | X | X || L | L |
- * | L | H || X | H | X | X || L | H |
- * | H | L || X | X | L | X || L | L |
- * | H | L || X | X | H | X || L | H |
- * | H | H || X | X | X | L || L | L |
- * | H | H || X | X | X | H || L | H |
- * +-----+-----++----+----+----+----++----+----+
- *
- * A, B : Select Inputs
- * C* : Data inputs
- * G : Strobe
- * Y : Output
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_74153_H_
#define NLD_74153_H_
diff --git a/src/lib/netlist/devices/nld_74164.cpp b/src/lib/netlist/devices/nld_74164.cpp
index 05aab8b5ccd..9626232a309 100644
--- a/src/lib/netlist/devices/nld_74164.cpp
+++ b/src/lib/netlist/devices/nld_74164.cpp
@@ -7,6 +7,44 @@
* implementing this was simple.
*
*/
+/*****************************************************************************
+
+ 5/74164 8-bit parallel-out serial shift registers
+
+***********************************************************************
+
+ Connection Diagram:
+ ___ ___
+ A 1 |* u | 14 Vcc
+ B 2 | | 13 QH
+ QA 3 | | 12 QG
+ QB 4 | | 11 QF
+ QC 5 | | 10 QE
+ QD 6 | | 9 *Clear
+ GND 7 |_______| 8 Clock
+
+***********************************************************************
+ Function Table:
+ +-------------------------+----------------+
+ | Inputs | Qutputs* |
+ +-------+-------+---------+----------------+
+ | Clear | Clock | A B | QA QB ... QH |
+ +-------+-------+---------+----------------+
+ | L | X | X X | L L L |
+ | H | L | X X | QA0 QB0 QH0 |
+ | H | ^ | H H | H QAn QGn |
+ | H | ^ | L X | L QAn QGn |
+ | H | ^ | X L | L QAn QGn |
+ +-------+-------+---------+----------------+
+
+ H = High Level (steady state)
+ L = Low Level (steady state)
+ X = Don't Care
+ ^ = Transition from low to high level
+ QA0, QB0 ... QH0 = The level of QA, QB ... QH before the indicated steady-state input conditions were established.
+ QAn, QGn = The level of QA or QG before the most recent ^ transition of the clock; indicates a 1 bit shift.
+
+**********************************************************************/
#include "nld_74164.h"
#include "netlist/nl_base.h"
diff --git a/src/lib/netlist/devices/nld_74164.h b/src/lib/netlist/devices/nld_74164.h
index f4da1568a85..f732301e1f9 100644
--- a/src/lib/netlist/devices/nld_74164.h
+++ b/src/lib/netlist/devices/nld_74164.h
@@ -1,43 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Joakim Larsson Edstrom
-/*****************************************************************************
-
- 5/74164 8-bit parallel-out serial shift registers
-
-***********************************************************************
-
- Connection Diagram:
- ___ ___
- A 1 |* u | 14 Vcc
- B 2 | | 13 QH
- QA 3 | | 12 QG
- QB 4 | | 11 QF
- QC 5 | | 10 QE
- QD 6 | | 9 *Clear
- GND 7 |_______| 8 Clock
-
-***********************************************************************
- Function Table:
- +-------------------------+----------------+
- | Inputs | Qutputs* |
- +-------+-------+---------+----------------+
- | Clear | Clock | A B | QA QB ... QH |
- +-------+-------+---------+----------------+
- | L | X | X X | L L L |
- | H | L | X X | QA0 QB0 QH0 |
- | H | ^ | H H | H QAn QGn |
- | H | ^ | L X | L QAn QGn |
- | H | ^ | X L | L QAn QGn |
- +-------+-------+---------+----------------+
-
- H = High Level (steady state)
- L = Low Level (steady state)
- X = Don't Care
- ^ = Transition from low to high level
- QA0, QB0 ... QH0 = The level of QA, QB ... QH before the indicated steady-state input conditions were established.
- QAn, QGn = The level of QA or QG before the most recent ^ transition of the clock; indicates a 1 bit shift.
-
-**********************************************************************/
#ifndef NLD_74164_H_
#define NLD_74164_H_
diff --git a/src/lib/netlist/devices/nld_74165.cpp b/src/lib/netlist/devices/nld_74165.cpp
index d27c14953ea..3db58672418 100644
--- a/src/lib/netlist/devices/nld_74165.cpp
+++ b/src/lib/netlist/devices/nld_74165.cpp
@@ -3,6 +3,25 @@
/*
* nld_74165.cpp
*
+ * 74165: Parallel-Load 8-Bit Shift Register
+ *
+ * +--------------+
+ * SH/LDQ |1 ++ 16| VCC
+ * CLK |2 15| CLKINH
+ * E |3 14| D
+ * F |4 74165 13| C
+ * G |5 12| B
+ * H |6 11| A
+ * QHQ |7 10| SER
+ * GND |8 9| QH
+ * +--------------+
+ *
+ * SH/LDQ: Shift / !Load
+ * CLKINH: Clock Inhibit
+ * SER: Serial In
+ *
+ * Naming convention attempts to follow NTE Electronics datasheet
+ *
*/
#include "nld_74165.h"
diff --git a/src/lib/netlist/devices/nld_74165.h b/src/lib/netlist/devices/nld_74165.h
index b4918276779..72e1a415342 100644
--- a/src/lib/netlist/devices/nld_74165.h
+++ b/src/lib/netlist/devices/nld_74165.h
@@ -1,28 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_74165.h
- *
- * 74165: Parallel-Load 8-Bit Shift Register
- *
- * +--------------+
- * SH/LDQ |1 ++ 16| VCC
- * CLK |2 15| CLKINH
- * E |3 14| D
- * F |4 74165 13| C
- * G |5 12| B
- * H |6 11| A
- * QHQ |7 10| SER
- * GND |8 9| QH
- * +--------------+
- *
- * SH/LDQ: Shift / !Load
- * CLKINH: Clock Inhibit
- * SER: Serial In
- *
- * Naming convention attempts to follow NTE Electronics datasheet
- *
- */
#ifndef NLD_74165_H_
#define NLD_74165_H_
diff --git a/src/lib/netlist/devices/nld_74166.cpp b/src/lib/netlist/devices/nld_74166.cpp
index ebe911662bc..467132c9451 100644
--- a/src/lib/netlist/devices/nld_74166.cpp
+++ b/src/lib/netlist/devices/nld_74166.cpp
@@ -3,6 +3,25 @@
/*
* nld_74166.cpp
*
+ * 74166: Parallel-Load 8-Bit Shift Register
+ *
+ * +--------------+
+ * SER |1 ++ 16| VCC
+ * A |2 15| SH/LDQ
+ * B |3 14| H
+ * C |4 74166 13| QH
+ * D |5 12| G
+ * CLKINH |6 11| F
+ * CLK |7 10| E
+ * GND |8 9| CLRQ
+ * +--------------+
+ *
+ * SH/LDQ: Shift / !Load
+ * CLKINH: Clock Inhibit
+ * SER: Serial In
+ *
+ * Naming convention attempts to follow Texas Instruments datasheet
+ *
*/
#include "nld_74166.h"
diff --git a/src/lib/netlist/devices/nld_74166.h b/src/lib/netlist/devices/nld_74166.h
index fa001e4c6a2..8184c2610d3 100644
--- a/src/lib/netlist/devices/nld_74166.h
+++ b/src/lib/netlist/devices/nld_74166.h
@@ -1,28 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_74166.h
- *
- * 74166: Parallel-Load 8-Bit Shift Register
- *
- * +--------------+
- * SER |1 ++ 16| VCC
- * A |2 15| SH/LDQ
- * B |3 14| H
- * C |4 74166 13| QH
- * D |5 12| G
- * CLKINH |6 11| F
- * CLK |7 10| E
- * GND |8 9| CLRQ
- * +--------------+
- *
- * SH/LDQ: Shift / !Load
- * CLKINH: Clock Inhibit
- * SER: Serial In
- *
- * Naming convention attempts to follow Texas Instruments datasheet
- *
- */
#ifndef NLD_74166_H_
#define NLD_74166_H_
diff --git a/src/lib/netlist/devices/nld_74174.cpp b/src/lib/netlist/devices/nld_74174.cpp
index 72e6058a1af..cdc08aa8d8e 100644
--- a/src/lib/netlist/devices/nld_74174.cpp
+++ b/src/lib/netlist/devices/nld_74174.cpp
@@ -3,6 +3,34 @@
/*
* nld_74174.cpp
*
+ * DM74174: Hex D Flip-Flops with Clear
+ *
+ * +--------------+
+ * CLR |1 ++ 16| VCC
+ * Q1 |2 15| Q6
+ * D1 |3 14| D6
+ * D2 |4 74174 13| D5
+ * Q2 |5 12| Q5
+ * D3 |6 11| D4
+ * Q3 |7 10| Q4
+ * GND |8 9| CLK
+ * +--------------+
+ *
+ * +-----+-----+---++---+-----+
+ * | CLR | CLK | D || Q | QQ |
+ * +=====+=====+===++===+=====+
+ * | 0 | X | X || 0 | 1 |
+ * | 1 | R | 1 || 1 | 0 |
+ * | 1 | R | 0 || 0 | 1 |
+ * | 1 | 0 | X || Q0| Q0Q |
+ * +-----+-----+---++---+-----+
+ *
+ * Q0 The output logic level of Q before the indicated input conditions were established
+ *
+ * R: 0 -> 1
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
*/
#include "nld_74174.h"
@@ -34,7 +62,7 @@ namespace devices
NETLIB_HANDLERI(other)
{
- uint_fast8_t d = m_D();
+ netlist_sig_t d = m_D();
m_clrq = m_CLRQ();
if (!m_clrq)
{
@@ -47,6 +75,7 @@ namespace devices
}
}
+ private:
NETLIB_HANDLERI(clk)
{
if (m_clrq)
@@ -56,13 +85,11 @@ namespace devices
}
}
- friend class NETLIB_NAME(74174);
- private:
logic_input_t m_CLK;
logic_output_t m_Q;
state_var<netlist_sig_t> m_clrq;
- state_var<unsigned> m_data;
+ state_var<netlist_sig_t> m_data;
logic_input_t m_D;
logic_input_t m_CLRQ;
@@ -79,37 +106,37 @@ namespace devices
, E(*this, "E")
, F(*this, "F")
{
- register_subalias("CLRQ", A.m_CLRQ);
+ register_subalias("CLRQ", "A.CLRQ");
connect("A.CLRQ", "B.CLRQ");
connect("A.CLRQ", "C.CLRQ");
connect("A.CLRQ", "D.CLRQ");
connect("A.CLRQ", "E.CLRQ");
connect("A.CLRQ", "F.CLRQ");
- register_subalias("CLK", A.m_CLK);
+ register_subalias("CLK", "A.CLK");
connect("A.CLK", "B.CLK");
connect("A.CLK", "C.CLK");
connect("A.CLK", "D.CLK");
connect("A.CLK", "E.CLK");
connect("A.CLK", "F.CLK");
- register_subalias("D1", A.m_D);
- register_subalias("Q1", A.m_Q);
+ register_subalias("D1", "A.D");
+ register_subalias("Q1", "A.Q");
- register_subalias("D2", B.m_D);
- register_subalias("Q2", B.m_Q);
+ register_subalias("D2", "B.D");
+ register_subalias("Q2", "B.Q");
- register_subalias("D3", C.m_D);
- register_subalias("Q3", C.m_Q);
+ register_subalias("D3", "C.D");
+ register_subalias("Q3", "C.Q");
- register_subalias("D4", D.m_D);
- register_subalias("Q4", D.m_Q);
+ register_subalias("D4", "D.D");
+ register_subalias("Q4", "D.Q");
- register_subalias("D5", E.m_D);
- register_subalias("Q5", E.m_Q);
+ register_subalias("D5", "E.D");
+ register_subalias("Q5", "E.Q");
- register_subalias("D6", F.m_D);
- register_subalias("Q6", F.m_Q);
+ register_subalias("D6", "F.D");
+ register_subalias("Q6", "F.Q");
register_subalias("GND", "A.GND");
connect("A.GND", "B.GND");
diff --git a/src/lib/netlist/devices/nld_74174.h b/src/lib/netlist/devices/nld_74174.h
index f5708fd2e90..7b41f818787 100644
--- a/src/lib/netlist/devices/nld_74174.h
+++ b/src/lib/netlist/devices/nld_74174.h
@@ -1,37 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74174.h
- *
- * DM74174: Hex D Flip-Flops with Clear
- *
- * +--------------+
- * CLR |1 ++ 16| VCC
- * Q1 |2 15| Q6
- * D1 |3 14| D6
- * D2 |4 74174 13| D5
- * Q2 |5 12| Q5
- * D3 |6 11| D4
- * Q3 |7 10| Q4
- * GND |8 9| CLK
- * +--------------+
- *
- * +-----+-----+---++---+-----+
- * | CLR | CLK | D || Q | QQ |
- * +=====+=====+===++===+=====+
- * | 0 | X | X || 0 | 1 |
- * | 1 | R | 1 || 1 | 0 |
- * | 1 | R | 0 || 0 | 1 |
- * | 1 | 0 | X || Q0| Q0Q |
- * +-----+-----+---++---+-----+
- *
- * Q0 The output logic level of Q before the indicated input conditions were established
- *
- * R: 0 -> 1
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_74174_H_
#define NLD_74174_H_
diff --git a/src/lib/netlist/devices/nld_74175.cpp b/src/lib/netlist/devices/nld_74175.cpp
index 5f1b483e5c3..4e30785de08 100644
--- a/src/lib/netlist/devices/nld_74175.cpp
+++ b/src/lib/netlist/devices/nld_74175.cpp
@@ -1,7 +1,35 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74175.c
+ * nld_74175.cpp
+ *
+ * DM74175: Quad D Flip-Flops with Clear
+ *
+ * +--------------+
+ * CLR |1 ++ 16| VCC
+ * Q1 |2 15| Q4
+ * Q1Q |3 14| Q4Q
+ * D1 |4 74175 13| D4
+ * D2 |5 12| D3
+ * Q2Q |6 11| Q3Q
+ * Q2 |7 10| Q3
+ * GND |8 9| CLK
+ * +--------------+
+ *
+ * +-----+-----+---++---+-----+
+ * | CLR | CLK | D || Q | QQ |
+ * +=====+=====+===++===+=====+
+ * | 0 | X | X || 0 | 1 |
+ * | 1 | R | 1 || 1 | 0 |
+ * | 1 | R | 0 || 0 | 1 |
+ * | 1 | 0 | X || Q0| Q0Q |
+ * +-----+-----+---++---+-----+
+ *
+ * Q0 The output logic level of Q before the indicated input conditions were established
+ *
+ * R: 0 -> 1
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_74175.h b/src/lib/netlist/devices/nld_74175.h
index b29d4680813..0687df96947 100644
--- a/src/lib/netlist/devices/nld_74175.h
+++ b/src/lib/netlist/devices/nld_74175.h
@@ -1,37 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74175.h
- *
- * DM74175: Quad D Flip-Flops with Clear
- *
- * +--------------+
- * CLR |1 ++ 16| VCC
- * Q1 |2 15| Q4
- * Q1Q |3 14| Q4Q
- * D1 |4 74175 13| D4
- * D2 |5 12| D3
- * Q2Q |6 11| Q3Q
- * Q2 |7 10| Q3
- * GND |8 9| CLK
- * +--------------+
- *
- * +-----+-----+---++---+-----+
- * | CLR | CLK | D || Q | QQ |
- * +=====+=====+===++===+=====+
- * | 0 | X | X || 0 | 1 |
- * | 1 | R | 1 || 1 | 0 |
- * | 1 | R | 0 || 0 | 1 |
- * | 1 | 0 | X || Q0| Q0Q |
- * +-----+-----+---++---+-----+
- *
- * Q0 The output logic level of Q before the indicated input conditions were established
- *
- * R: 0 -> 1
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_74175_H_
#define NLD_74175_H_
diff --git a/src/lib/netlist/devices/nld_74192.cpp b/src/lib/netlist/devices/nld_74192.cpp
index f395e8e3df4..5e77e245f97 100644
--- a/src/lib/netlist/devices/nld_74192.cpp
+++ b/src/lib/netlist/devices/nld_74192.cpp
@@ -1,7 +1,28 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74192.c
+ * nld_74192.cpp
+ *
+ * DM74192: Synchronous 4-Bit Binary Counter with Dual Clock
+ * Decade counter
+ *
+ * FIXME: This should be merged with the 74193 which counts to 16
+ *
+ * +--------------+
+ * B |1 ++ 16| VCC
+ * QB |2 15| A
+ * QA |3 14| CLEAR
+ * CD |4 74192 13| BORROWQ
+ * CU |5 12| CARRYQ
+ * QC |6 11| LOADQ
+ * QD |7 10| C
+ * GND |8 9| D
+ * +--------------+
+ *
+ * CD: Count up
+ * CU: Count down
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_74192.h b/src/lib/netlist/devices/nld_74192.h
index 81397f355ae..30e80ad28fa 100644
--- a/src/lib/netlist/devices/nld_74192.h
+++ b/src/lib/netlist/devices/nld_74192.h
@@ -1,30 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74192.h
- *
- * DM74192: Synchronous 4-Bit Binary Counter with Dual Clock
- * Decade counter
- *
- * FIXME: This should be merged with the 74193 which counts to 16
- *
- * +--------------+
- * B |1 ++ 16| VCC
- * QB |2 15| A
- * QA |3 14| CLEAR
- * CD |4 74192 13| BORROWQ
- * CU |5 12| CARRYQ
- * QC |6 11| LOADQ
- * QD |7 10| C
- * GND |8 9| D
- * +--------------+
- *
- * CD: Count up
- * CU: Count down
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_74192_H_
#define NLD_74192_H_
diff --git a/src/lib/netlist/devices/nld_74193.cpp b/src/lib/netlist/devices/nld_74193.cpp
index 38933a89a62..40ea170087b 100644
--- a/src/lib/netlist/devices/nld_74193.cpp
+++ b/src/lib/netlist/devices/nld_74193.cpp
@@ -1,7 +1,25 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74193.c
+ * nld_74193.cpp
+ *
+ * DM74193: Synchronous 4-Bit Binary Counter with Dual Clock
+ *
+ * +--------------+
+ * B |1 ++ 16| VCC
+ * QB |2 15| A
+ * QA |3 14| CLEAR
+ * CD |4 74193 13| BORROWQ
+ * CU |5 12| CARRYQ
+ * QC |6 11| LOADQ
+ * QD |7 10| C
+ * GND |8 9| D
+ * +--------------+
+ *
+ * CD: Count up
+ * CU: Count down
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_74193.h b/src/lib/netlist/devices/nld_74193.h
index 493e6854266..5049f783016 100644
--- a/src/lib/netlist/devices/nld_74193.h
+++ b/src/lib/netlist/devices/nld_74193.h
@@ -1,27 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74193.h
- *
- * DM74193: Synchronous 4-Bit Binary Counter with Dual Clock
- *
- * +--------------+
- * B |1 ++ 16| VCC
- * QB |2 15| A
- * QA |3 14| CLEAR
- * CD |4 74193 13| BORROWQ
- * CU |5 12| CARRYQ
- * QC |6 11| LOADQ
- * QD |7 10| C
- * GND |8 9| D
- * +--------------+
- *
- * CD: Count up
- * CU: Count down
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_74193_H_
#define NLD_74193_H_
diff --git a/src/lib/netlist/devices/nld_74194.cpp b/src/lib/netlist/devices/nld_74194.cpp
index 6cd30ff648a..5eba4549a5e 100644
--- a/src/lib/netlist/devices/nld_74194.cpp
+++ b/src/lib/netlist/devices/nld_74194.cpp
@@ -3,8 +3,27 @@
/*
* nld_74194.cpp
*
+ * 74194: Parallel-Load 8-Bit Shift Register
+ *
+ * +--------------+
+ * CLRQ |1 ++ 16| VCC
+ * SRIN |2 15| QA
+ * A |3 14| QB
+ * B |4 74194 13| QC
+ * C |5 12| QD
+ * D |6 11| CLK
+ * SLIN |7 10| S1
+ * GND |8 9| S0
+ * +--------------+
+ *
+ * CLR: Clear
+ * SRIN: Shift Right Serial Input
+ * SLIN: Shift Left Serial Input
+ * CLK: Clock
+ *
*/
+
#include "nld_74194.h"
#include "netlist/nl_base.h"
diff --git a/src/lib/netlist/devices/nld_74194.h b/src/lib/netlist/devices/nld_74194.h
index 2432a6ece97..838c3c96406 100644
--- a/src/lib/netlist/devices/nld_74194.h
+++ b/src/lib/netlist/devices/nld_74194.h
@@ -1,28 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_74194.h
- *
- * 74194: Parallel-Load 8-Bit Shift Register
- *
- * +--------------+
- * CLRQ |1 ++ 16| VCC
- * SRIN |2 15| QA
- * A |3 14| QB
- * B |4 74194 13| QC
- * C |5 12| QD
- * D |6 11| CLK
- * SLIN |7 10| S1
- * GND |8 9| S0
- * +--------------+
- *
- * CLR: Clear
- * SRIN: Shift Right Serial Input
- * SLIN: Shift Left Serial Input
- * CLK: Clock
- *
- */
-
#ifndef NLD_74194_H_
#define NLD_74194_H_
diff --git a/src/lib/netlist/devices/nld_74365.cpp b/src/lib/netlist/devices/nld_74365.cpp
index 46a13a4d086..4b9f7be9afa 100644
--- a/src/lib/netlist/devices/nld_74365.cpp
+++ b/src/lib/netlist/devices/nld_74365.cpp
@@ -3,6 +3,23 @@
/*
* nld_74365.cpp
*
+ * SN74365: Hex Bus Driver with 3-State Outputs
+ *
+ * +--------------+
+ * G1Q |1 ++ 16| VCC
+ * A1 |2 15| G2Q
+ * Y1 |3 14| A6
+ * A2 |4 74365 13| Y6
+ * Y2 |5 12| A5
+ * A3 |6 11| Y5
+ * Y3 |7 10| A4
+ * GND |8 9| Y4
+ * +--------------+
+ *
+ * Naming conventions follow Texas Instruments datasheet
+ *
+ * Note: Currently the netlist system does not support proper tristate output, so this
+ * is not a "real" bus driver, it simply outputs 0 if the chip is not enabled.
*/
#include "nld_74365.h"
diff --git a/src/lib/netlist/devices/nld_74365.h b/src/lib/netlist/devices/nld_74365.h
index 1aeeddaff8d..9fc55f52243 100644
--- a/src/lib/netlist/devices/nld_74365.h
+++ b/src/lib/netlist/devices/nld_74365.h
@@ -1,27 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_74365.h
- *
- * SN74365: Hex Bus Driver with 3-State Outputs
- *
- * +--------------+
- * G1Q |1 ++ 16| VCC
- * A1 |2 15| G2Q
- * Y1 |3 14| A6
- * A2 |4 74365 13| Y6
- * Y2 |5 12| A5
- * A3 |6 11| Y5
- * Y3 |7 10| A4
- * GND |8 9| Y4
- * +--------------+
- *
- * Naming conventions follow Texas Instruments datasheet
- *
- * Note: Currently the netlist system does not support proper tristate output, so this
- * is not a "real" bus driver, it simply outputs 0 if the chip is not enabled.
- */
-
#ifndef NLD_74365_H_
#define NLD_74365_H_
diff --git a/src/lib/netlist/devices/nld_74377.cpp b/src/lib/netlist/devices/nld_74377.cpp
index 4f2e00f229a..8d5381ce92a 100644
--- a/src/lib/netlist/devices/nld_74377.cpp
+++ b/src/lib/netlist/devices/nld_74377.cpp
@@ -1,7 +1,50 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74377.c
+ * nld_74377.cpp
+ *
+ * DM74377: Octal D Flip-Flop With Enable
+ *
+ * +--------------+
+ * /E |1 ++ 20| VCC
+ * Q0 |2 19| Q7
+ * D0 |3 18| D7
+ * D1 |4 74377 17| D6
+ * Q1 |5 16| Q6
+ * Q2 |6 15| Q5
+ * D2 |7 14| D5
+ * D3 |8 13| D4
+ * Q3 |9 12| Q4
+ * GND |10 11| CP
+ * +--------------+
+ *
+ * DM74378: Hex D Flip-Flop With Enable
+ *
+ * +--------------+
+ * /E |1 ++ 16| VCC
+ * Q0 |2 15| Q5
+ * D0 |3 14| D5
+ * D1 |4 74378 13| D4
+ * Q1 |5 12| Q4
+ * D2 |6 11| D3
+ * Q2 |7 10| Q3
+ * GND |8 9| CP
+ * +--------------+
+ *
+ * DM74379: 4-bit D Flip-Flop With Enable
+ *
+ * +--------------+
+ * /E |1 ++ 16| VCC
+ * Q0 |2 15| Q3
+ * /Q0 |3 14| /Q3
+ * D0 |4 74379 13| D3
+ * D1 |5 12| D2
+ * /Q1 |6 11| /Q2
+ * Q1 |7 10| Q2
+ * GND |8 9| CP
+ * +--------------+
+ *
+ * Naming conventions follow Motorola datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_74377.h b/src/lib/netlist/devices/nld_74377.h
index 6f5a3aed14e..9b3d2b87210 100644
--- a/src/lib/netlist/devices/nld_74377.h
+++ b/src/lib/netlist/devices/nld_74377.h
@@ -1,52 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud,Aaron Giles
-/*
- * nld_74377.h
- *
- * DM74377: Octal D Flip-Flop With Enable
- *
- * +--------------+
- * /E |1 ++ 20| VCC
- * Q0 |2 19| Q7
- * D0 |3 18| D7
- * D1 |4 74377 17| D6
- * Q1 |5 16| Q6
- * Q2 |6 15| Q5
- * D2 |7 14| D5
- * D3 |8 13| D4
- * Q3 |9 12| Q4
- * GND |10 11| CP
- * +--------------+
- *
- * DM74378: Hex D Flip-Flop With Enable
- *
- * +--------------+
- * /E |1 ++ 16| VCC
- * Q0 |2 15| Q5
- * D0 |3 14| D5
- * D1 |4 74378 13| D4
- * Q1 |5 12| Q4
- * D2 |6 11| D3
- * Q2 |7 10| Q3
- * GND |8 9| CP
- * +--------------+
- *
- * DM74379: 4-bit D Flip-Flop With Enable
- *
- * +--------------+
- * /E |1 ++ 16| VCC
- * Q0 |2 15| Q3
- * /Q0 |3 14| /Q3
- * D0 |4 74379 13| D3
- * D1 |5 12| D2
- * /Q1 |6 11| /Q2
- * Q1 |7 10| Q2
- * GND |8 9| CP
- * +--------------+
- *
- * Naming conventions follow Motorola datasheet
- *
- */
#ifndef NLD_74377_H_
#define NLD_74377_H_
diff --git a/src/lib/netlist/devices/nld_74393.cpp b/src/lib/netlist/devices/nld_74393.cpp
index 377f7298ebe..38e42475eda 100644
--- a/src/lib/netlist/devices/nld_74393.cpp
+++ b/src/lib/netlist/devices/nld_74393.cpp
@@ -1,7 +1,21 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_74393.c
+ * nld_74393.cpp
+ *
+ * DM74393: Dual 4-Stage Binary Counter
+ *
+ * +--------------+
+ * /CP |1 ++ 14| VCC
+ * MR |2 13| /CP
+ * Q0 |3 12| MR
+ * Q1 |4 74393 11| Q0
+ * Q2 |5 10| Q1
+ * Q3 |6 9| Q2
+ * GND |7 8| Q3
+ * +--------------+
+ *
+ * Naming conventions follow Motorola datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_74393.h b/src/lib/netlist/devices/nld_74393.h
index a49b78ab1b2..cf4d3b82932 100644
--- a/src/lib/netlist/devices/nld_74393.h
+++ b/src/lib/netlist/devices/nld_74393.h
@@ -1,23 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74393.h
- *
- * DM74393: Dual 4-Stage Binary Counter
- *
- * +--------------+
- * /CP |1 ++ 14| VCC
- * MR |2 13| /CP
- * Q0 |3 12| MR
- * Q1 |4 74393 11| Q0
- * Q2 |5 10| Q1
- * Q3 |6 9| Q2
- * GND |7 8| Q3
- * +--------------+
- *
- * Naming conventions follow Motorola datasheet
- *
- */
#ifndef NLD_74393_H_
#define NLD_74393_H_
diff --git a/src/lib/netlist/devices/nld_7448.cpp b/src/lib/netlist/devices/nld_7448.cpp
index c2f4c386108..4ed102a4671 100644
--- a/src/lib/netlist/devices/nld_7448.cpp
+++ b/src/lib/netlist/devices/nld_7448.cpp
@@ -1,7 +1,23 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_7448.c
+ * nld_7448.cpp
+ *
+ * DM7448: BCD to 7-Segment decoders/drivers
+ *
+ * +--------------+
+ * B |1 ++ 16| VCC
+ * C |2 15| f
+ * LAMP TEST |3 14| g
+ * BI/RBQ |4 7448 13| a
+ * RBI |5 12| b
+ * D |6 11| c
+ * A |7 10| d
+ * GND |8 9| e
+ * +--------------+
+ *
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_7448.h b/src/lib/netlist/devices/nld_7448.h
index c25c80136e7..670f453ac0f 100644
--- a/src/lib/netlist/devices/nld_7448.h
+++ b/src/lib/netlist/devices/nld_7448.h
@@ -1,25 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7448.h
- *
- * DM7448: BCD to 7-Segment decoders/drivers
- *
- * +--------------+
- * B |1 ++ 16| VCC
- * C |2 15| f
- * LAMP TEST |3 14| g
- * BI/RBQ |4 7448 13| a
- * RBI |5 12| b
- * D |6 11| c
- * A |7 10| d
- * GND |8 9| e
- * +--------------+
- *
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_7448_H_
#define NLD_7448_H_
diff --git a/src/lib/netlist/devices/nld_7450.cpp b/src/lib/netlist/devices/nld_7450.cpp
index 1bca5128d44..1c997d466df 100644
--- a/src/lib/netlist/devices/nld_7450.cpp
+++ b/src/lib/netlist/devices/nld_7450.cpp
@@ -1,7 +1,23 @@
- // license:GPL-2.0+
+// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_7450.c
+ * nld_7450.cpp
+ *
+ * DM7450: DUAL 2-WIDE 2-INPUT AND-OR-INVERT GATES (ONE GATE EXPANDABLE)
+ *
+ * +--------------+
+ * 1A |1 ++ 14| VCC
+ * 2A |2 13| 1B
+ * 2B |3 12| 1XQ
+ * 2C |4 7450 11| 1X
+ * 2D |5 10| 1D
+ * 2Y |6 9| 1C
+ * GND |7 8| 1Y
+ * +--------------+
+ * _________________
+ * Y = (A & B) | (C & D)
+ *
+ * Naming conventions follow Texas Instruments datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_7450.h b/src/lib/netlist/devices/nld_7450.h
index 1e30d9ec856..f12d1b6d844 100644
--- a/src/lib/netlist/devices/nld_7450.h
+++ b/src/lib/netlist/devices/nld_7450.h
@@ -1,25 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7450.h
- *
- * DM7450: DUAL 2-WIDE 2-INPUT AND-OR-INVERT GATES (ONE GATE EXPANDABLE)
- *
- * +--------------+
- * 1A |1 ++ 14| VCC
- * 2A |2 13| 1B
- * 2B |3 12| 1XQ
- * 2C |4 7450 11| 1X
- * 2D |5 10| 1D
- * 2Y |6 9| 1C
- * GND |7 8| 1Y
- * +--------------+
- * _________________
- * Y = (A & B) | (C & D)
- *
- * Naming conventions follow Texas Instruments datasheet
- *
- */
#ifndef NLD_7450_H_
#define NLD_7450_H_
diff --git a/src/lib/netlist/devices/nld_7473.cpp b/src/lib/netlist/devices/nld_7473.cpp
index 2b7d803eb35..4a9d1ac27b3 100644
--- a/src/lib/netlist/devices/nld_7473.cpp
+++ b/src/lib/netlist/devices/nld_7473.cpp
@@ -1,7 +1,59 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_7473.c
+ * nld_7473.cpp
+ *
+ * 7473: Dual Master-Slave J-K Flip-Flops with Clear and Complementary Outputs
+ * 7473A: Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flops with Clear and Complementary Outputs
+ *
+ * +----------+
+ * 1CLK |1 ++ 14| 1J
+ * 1CLRQ |2 13| 1QQ
+ * 1K |3 12| 1Q
+ * VCC |4 7473 11| GND
+ * 2CLK |5 10| 2K
+ * 2CLRQ |6 9| 2Q
+ * 2J |7 8| 2QQ
+ * +----------+
+ *
+ *
+ * Function table 73
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | CLRQ| CLK | J | K || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | X | X | X || 0 | 1 |
+ * | 1 | * | 0 | 0 || Q0| Q0Q |
+ * | 1 | * | 1 | 0 || 1 | 0 |
+ * | 1 | * | 0 | 1 || 0 | 1 |
+ * | 1 | * | 1 | 1 || TOGGLE |
+ * +-----+-----+-----+---++---+-----+
+ * _
+ * * = _| |_
+ *
+ * This is positive triggered, J and K
+ * are latched during clock high and
+ * transferred when CLK falls.
+ *
+ * Function table 73A
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | CLRQ| CLK | J | K || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | X | X | X || 0 | 1 |
+ * | 1 | F | 0 | 0 || Q0| Q0Q |
+ * | 1 | F | 1 | 0 || 1 | 0 |
+ * | 1 | F | 0 | 1 || 0 | 1 |
+ * | 1 | F | 1 | 1 || TOGGLE |
+ * | 1 | 1 | X | X || Q0| Q0Q |
+ * +-----+-----+-----+---++---+-----+
+ *
+ * THe 73A is negative triggered.
+ *
+ * Naming conventions follow Texas instruments datasheet
+ *
+ * FIXME: Currently, only the 73 is implemented.
+ * The 73A uses the same model.
*
*/
diff --git a/src/lib/netlist/devices/nld_7473.h b/src/lib/netlist/devices/nld_7473.h
index 1a5e6937ea5..0ba195d4476 100644
--- a/src/lib/netlist/devices/nld_7473.h
+++ b/src/lib/netlist/devices/nld_7473.h
@@ -1,61 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7473.h
- *
- * 7473: Dual Master-Slave J-K Flip-Flops with Clear and Complementary Outputs
- * 7473A: Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flops with Clear and Complementary Outputs
- *
- * +----------+
- * 1CLK |1 ++ 14| 1J
- * 1CLRQ |2 13| 1QQ
- * 1K |3 12| 1Q
- * VCC |4 7473 11| GND
- * 2CLK |5 10| 2K
- * 2CLRQ |6 9| 2Q
- * 2J |7 8| 2QQ
- * +----------+
- *
- *
- * Function table 73
- *
- * +-----+-----+-----+---++---+-----+
- * | CLRQ| CLK | J | K || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | X | X | X || 0 | 1 |
- * | 1 | * | 0 | 0 || Q0| Q0Q |
- * | 1 | * | 1 | 0 || 1 | 0 |
- * | 1 | * | 0 | 1 || 0 | 1 |
- * | 1 | * | 1 | 1 || TOGGLE |
- * +-----+-----+-----+---++---+-----+
- * _
- * * = _| |_
- *
- * This is positive triggered, J and K
- * are latched during clock high and
- * transferred when CLK falls.
- *
- * Function table 73A
- *
- * +-----+-----+-----+---++---+-----+
- * | CLRQ| CLK | J | K || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | X | X | X || 0 | 1 |
- * | 1 | F | 0 | 0 || Q0| Q0Q |
- * | 1 | F | 1 | 0 || 1 | 0 |
- * | 1 | F | 0 | 1 || 0 | 1 |
- * | 1 | F | 1 | 1 || TOGGLE |
- * | 1 | 1 | X | X || Q0| Q0Q |
- * +-----+-----+-----+---++---+-----+
- *
- * THe 73A is negative triggered.
- *
- * Naming conventions follow Texas instruments datasheet
- *
- * FIXME: Currently, only the 73 is implemented.
- * The 73A uses the same model.
- *
- */
#ifndef NLD_7473_H_
#define NLD_7473_H_
diff --git a/src/lib/netlist/devices/nld_7474.cpp b/src/lib/netlist/devices/nld_7474.cpp
index 5b2f2b4a589..2bf97703374 100644
--- a/src/lib/netlist/devices/nld_7474.cpp
+++ b/src/lib/netlist/devices/nld_7474.cpp
@@ -2,8 +2,42 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_7474.c
+ * nld_7474.cpp
*
+ * DM7474: Dual Positive-Edge-Triggered D Flip-Flops
+ * with Preset, Clear and Complementary Outputs
+ *
+ * +--------------+
+ * CLR1 |1 ++ 14| VCC
+ * D1 |2 13| CLR2
+ * CLK1 |3 12| D2
+ * PR1 |4 7474 11| CLK2
+ * Q1 |5 10| PR2
+ * Q1Q |6 9| Q2
+ * GND |7 8| Q2Q
+ * +--------------+
+ *
+ * +-----+-----+-----+---++---+-----+
+ * | PR | CLR | CLK | D || Q | QQ |
+ * +=====+=====+=====+===++===+=====+
+ * | 0 | 1 | X | X || 1 | 0 |
+ * | 1 | 0 | X | X || 0 | 1 |
+ * | 0 | 0 | X | X || 1 | 1 | (*)
+ * | 1 | 1 | R | 1 || 1 | 0 |
+ * | 1 | 1 | R | 0 || 0 | 1 |
+ * | 1 | 1 | 0 | X || Q0| Q0Q |
+ * +-----+-----+-----+---++---+-----+
+ *
+ * (*) This configuration is not stable, i.e. it will not persist
+ * when either the preset and or clear inputs return to their inactive (high) level
+ *
+ * Q0 The output logic level of Q before the indicated input conditions were established
+ *
+ * R: 0 -. 1
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
+ * FIXME: Check that (*) is emulated properly
*/
#include "nld_7474.h"
diff --git a/src/lib/netlist/devices/nld_7474.h b/src/lib/netlist/devices/nld_7474.h
index ffe0c046405..d44a2759e67 100644
--- a/src/lib/netlist/devices/nld_7474.h
+++ b/src/lib/netlist/devices/nld_7474.h
@@ -1,43 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7474.h
- *
- * DM7474: Dual Positive-Edge-Triggered D Flip-Flops
- * with Preset, Clear and Complementary Outputs
- *
- * +--------------+
- * CLR1 |1 ++ 14| VCC
- * D1 |2 13| CLR2
- * CLK1 |3 12| D2
- * PR1 |4 7474 11| CLK2
- * Q1 |5 10| PR2
- * Q1Q |6 9| Q2
- * GND |7 8| Q2Q
- * +--------------+
- *
- * +-----+-----+-----+---++---+-----+
- * | PR | CLR | CLK | D || Q | QQ |
- * +=====+=====+=====+===++===+=====+
- * | 0 | 1 | X | X || 1 | 0 |
- * | 1 | 0 | X | X || 0 | 1 |
- * | 0 | 0 | X | X || 1 | 1 | (*)
- * | 1 | 1 | R | 1 || 1 | 0 |
- * | 1 | 1 | R | 0 || 0 | 1 |
- * | 1 | 1 | 0 | X || Q0| Q0Q |
- * +-----+-----+-----+---++---+-----+
- *
- * (*) This configuration is not stable, i.e. it will not persist
- * when either the preset and or clear inputs return to their inactive (high) level
- *
- * Q0 The output logic level of Q before the indicated input conditions were established
- *
- * R: 0 -. 1
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- * FIXME: Check that (*) is emulated properly
- */
#ifndef NLD_7474_H_
#define NLD_7474_H_
diff --git a/src/lib/netlist/devices/nld_7475.cpp b/src/lib/netlist/devices/nld_7475.cpp
index 0ddf97eaaec..785906e7b9b 100644
--- a/src/lib/netlist/devices/nld_7475.cpp
+++ b/src/lib/netlist/devices/nld_7475.cpp
@@ -4,6 +4,34 @@
* nld_7475.cpp
*
* TODO: Correct timing for clock-induced state changes, rather than assuming timing is always due to data-induced state changes
+ *
+ * 7475: 4-Bit Bistable Latches with Complementary Outputs
+ * 7477: 4-Bit Bistable Latches
+ *
+ * +----------+ +----------+
+ * 1QQ |1 ++ 16| 1Q 1D |1 ++ 14| 1Q
+ * 1D |2 15| 2Q 2D |2 13| 2Q
+ * 2D |3 14| 2QQ 3C4C |3 12| 1C2C
+ * 3C4C |4 7475 13| 1C2C VCC |4 7477 11| GND
+ * VCC |5 12| GND 3D |5 10| NC
+ * 3D |6 11| 3QQ 4D |6 9| 3Q
+ * 4D |7 10| 3Q NC |7 8| 4Q
+ * 4QQ |8 9| 4Q +----------+
+ * +----------+
+ *
+ *
+ * Function table
+ *
+ * +---+---++---+-----+
+ * | D | C || Q | QQ |
+ * +===+===++===+=====+
+ * | 0 | 1 || 0 | 1 |
+ * | 1 | 1 || 1 | 0 |
+ * | X | 0 || Q0| Q0Q |
+ * +---+---++---+-----+
+ *
+ * Naming conventions follow Texas instruments datasheet
+ *
*/
#include "nld_7475.h"
diff --git a/src/lib/netlist/devices/nld_7475.h b/src/lib/netlist/devices/nld_7475.h
index 2e0abd97b4c..0e44886f7de 100644
--- a/src/lib/netlist/devices/nld_7475.h
+++ b/src/lib/netlist/devices/nld_7475.h
@@ -1,36 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_7475.h
- *
- * 7475: 4-Bit Bistable Latches with Complementary Outputs
- * 7477: 4-Bit Bistable Latches
- *
- * +----------+ +----------+
- * 1QQ |1 ++ 16| 1Q 1D |1 ++ 14| 1Q
- * 1D |2 15| 2Q 2D |2 13| 2Q
- * 2D |3 14| 2QQ 3C4C |3 12| 1C2C
- * 3C4C |4 7475 13| 1C2C VCC |4 7477 11| GND
- * VCC |5 12| GND 3D |5 10| NC
- * 3D |6 11| 3QQ 4D |6 9| 3Q
- * 4D |7 10| 3Q NC |7 8| 4Q
- * 4QQ |8 9| 4Q +----------+
- * +----------+
- *
- *
- * Function table
- *
- * +---+---++---+-----+
- * | D | C || Q | QQ |
- * +===+===++===+=====+
- * | 0 | 1 || 0 | 1 |
- * | 1 | 1 || 1 | 0 |
- * | X | 0 || Q0| Q0Q |
- * +---+---++---+-----+
- *
- * Naming conventions follow Texas instruments datasheet
- *
- */
#ifndef NLD_7475_H_
#define NLD_7475_H_
diff --git a/src/lib/netlist/devices/nld_7483.cpp b/src/lib/netlist/devices/nld_7483.cpp
index 6f9eb3353d9..08905727ef4 100644
--- a/src/lib/netlist/devices/nld_7483.cpp
+++ b/src/lib/netlist/devices/nld_7483.cpp
@@ -1,7 +1,26 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_7483.c
+ * nld_7483.cpp
+ *
+ * DM7483: 4-Bit Binary Adder with Fast Carry
+ *
+ * +--------------+
+ * A4 |1 ++ 16| B4
+ * S3 |2 15| S4
+ * A3 |3 14| C4
+ * B3 |4 7483 13| C0
+ * VCC |5 12| GND
+ * S2 |6 11| B1
+ * B2 |7 10| A1
+ * A2 |8 9| S1
+ * +--------------+
+ *
+ * S = (A + B + C0) & 0x0f
+ *
+ * C4 = (A + B + C) > 15 ? 1 : 0
+ *
+ * Naming conventions follow Fairchild Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_7483.h b/src/lib/netlist/devices/nld_7483.h
index 32aede92ec6..a8751f2a7c5 100644
--- a/src/lib/netlist/devices/nld_7483.h
+++ b/src/lib/netlist/devices/nld_7483.h
@@ -1,28 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7483.h
- *
- * DM7483: 4-Bit Binary Adder with Fast Carry
- *
- * +--------------+
- * A4 |1 ++ 16| B4
- * S3 |2 15| S4
- * A3 |3 14| C4
- * B3 |4 7483 13| C0
- * VCC |5 12| GND
- * S2 |6 11| B1
- * B2 |7 10| A1
- * A2 |8 9| S1
- * +--------------+
- *
- * S = (A + B + C0) & 0x0f
- *
- * C4 = (A + B + C) > 15 ? 1 : 0
- *
- * Naming conventions follow Fairchild Semiconductor datasheet
- *
- */
#ifndef NLD_7483_H_
#define NLD_7483_H_
diff --git a/src/lib/netlist/devices/nld_7485.cpp b/src/lib/netlist/devices/nld_7485.cpp
index 01638671c1c..0d960ac9006 100644
--- a/src/lib/netlist/devices/nld_7485.cpp
+++ b/src/lib/netlist/devices/nld_7485.cpp
@@ -3,6 +3,23 @@
/*
* nld_7485.cpp
*
+ * FIXME: Truthtable candidate
+ *
+ * DM7485: 4-bit Magnitude Comparators
+ *
+ * +------------+
+ * B3 |1 ++ 16| VCC
+ * LTIN |2 15| A3
+ * EQIN |3 14| B2
+ * GTIN |4 7485 13| A2
+ * GTOUT |5 12| A1
+ * EQOUT |6 11| B1
+ * LTOUT |7 10| A0
+ * GND |8 9| B0
+ * +------------+
+ *
+ * Naming convention attempts to follow Texas Instruments datasheet
+ *
*/
#include "nld_7485.h"
diff --git a/src/lib/netlist/devices/nld_7485.h b/src/lib/netlist/devices/nld_7485.h
index 3f9e3a8a2ed..1211c47c4d5 100644
--- a/src/lib/netlist/devices/nld_7485.h
+++ b/src/lib/netlist/devices/nld_7485.h
@@ -1,24 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_7485.h
- *
- * DM7485: 4-bit Magnitude Comparators
- *
- * +------------+
- * B3 |1 ++ 16| VCC
- * LTIN |2 15| A3
- * EQIN |3 14| B2
- * GTIN |4 7485 13| A2
- * GTOUT |5 12| A1
- * EQOUT |6 11| B1
- * LTOUT |7 10| A0
- * GND |8 9| B0
- * +------------+
- *
- * Naming convention attempts to follow Texas Instruments datasheet
- *
- */
#ifndef NLD_7485_H_
#define NLD_7485_H_
diff --git a/src/lib/netlist/devices/nld_7490.cpp b/src/lib/netlist/devices/nld_7490.cpp
index bf68b13d807..aa8388c2615 100644
--- a/src/lib/netlist/devices/nld_7490.cpp
+++ b/src/lib/netlist/devices/nld_7490.cpp
@@ -1,7 +1,54 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_7490.c
+ * nld_7490.cpp
+ *
+ * DM7490: Decade Counters
+ *
+ * +--------------+
+ * B |1 ++ 14| A
+ * R01 |2 13| NC
+ * R02 |3 12| QA
+ * NC |4 7490 11| QD
+ * VCC |5 10| GND
+ * R91 |6 9| QB
+ * R92 |7 8| QC
+ * +--------------+
+ *
+ * Counter Sequence
+ *
+ * +-------++----+----+----+----+
+ * | COUNT || QD | QC | QB | QA |
+ * +=======++====+====+====+====+
+ * | 0 || 0 | 0 | 0 | 0 |
+ * | 1 || 0 | 0 | 0 | 1 |
+ * | 2 || 0 | 0 | 1 | 0 |
+ * | 3 || 0 | 0 | 1 | 1 |
+ * | 4 || 0 | 1 | 0 | 0 |
+ * | 5 || 0 | 1 | 0 | 1 |
+ * | 6 || 0 | 1 | 1 | 0 |
+ * | 7 || 0 | 1 | 1 | 1 |
+ * | 8 || 1 | 0 | 0 | 0 |
+ * | 9 || 1 | 0 | 0 | 1 |
+ * +-------++----+----+----+----+
+ *
+ * Note A Output QA is connected to input B for BCD count
+ *
+ * Reset Count Function table
+ *
+ * +-----+-----+-----+-----++----+----+----+----+
+ * | R01 | R02 | R91 | R92 || QD | QC | QB | QA |
+ * +=====+=====+=====+=====++====+====+====+====+
+ * | 1 | 1 | 0 | X || 0 | 0 | 0 | 0 |
+ * | 1 | 1 | X | 0 || 0 | 0 | 0 | 0 |
+ * | X | X | 1 | 1 || 1 | 0 | 0 | 1 |
+ * | X | 0 | X | 0 || COUNT |
+ * | 0 | X | 0 | X || COUNT |
+ * | 0 | X | X | 0 || COUNT |
+ * | X | 0 | 0 | X || COUNT |
+ * +-----+-----+-----+-----++----+----+----+----+
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_7490.h b/src/lib/netlist/devices/nld_7490.h
index 6bf59ff1aa0..725ebb8b949 100644
--- a/src/lib/netlist/devices/nld_7490.h
+++ b/src/lib/netlist/devices/nld_7490.h
@@ -1,56 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7490.h
- *
- * DM7490: Decade Counters
- *
- * +--------------+
- * B |1 ++ 14| A
- * R01 |2 13| NC
- * R02 |3 12| QA
- * NC |4 7490 11| QD
- * VCC |5 10| GND
- * R91 |6 9| QB
- * R92 |7 8| QC
- * +--------------+
- *
- * Counter Sequence
- *
- * +-------++----+----+----+----+
- * | COUNT || QD | QC | QB | QA |
- * +=======++====+====+====+====+
- * | 0 || 0 | 0 | 0 | 0 |
- * | 1 || 0 | 0 | 0 | 1 |
- * | 2 || 0 | 0 | 1 | 0 |
- * | 3 || 0 | 0 | 1 | 1 |
- * | 4 || 0 | 1 | 0 | 0 |
- * | 5 || 0 | 1 | 0 | 1 |
- * | 6 || 0 | 1 | 1 | 0 |
- * | 7 || 0 | 1 | 1 | 1 |
- * | 8 || 1 | 0 | 0 | 0 |
- * | 9 || 1 | 0 | 0 | 1 |
- * +-------++----+----+----+----+
- *
- * Note A Output QA is connected to input B for BCD count
- *
- * Reset Count Function table
- *
- * +-----+-----+-----+-----++----+----+----+----+
- * | R01 | R02 | R91 | R92 || QD | QC | QB | QA |
- * +=====+=====+=====+=====++====+====+====+====+
- * | 1 | 1 | 0 | X || 0 | 0 | 0 | 0 |
- * | 1 | 1 | X | 0 || 0 | 0 | 0 | 0 |
- * | X | X | 1 | 1 || 1 | 0 | 0 | 1 |
- * | X | 0 | X | 0 || COUNT |
- * | 0 | X | 0 | X || COUNT |
- * | 0 | X | X | 0 || COUNT |
- * | X | 0 | 0 | X || COUNT |
- * +-----+-----+-----+-----++----+----+----+----+
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_7490_H_
#define NLD_7490_H_
diff --git a/src/lib/netlist/devices/nld_7492.cpp b/src/lib/netlist/devices/nld_7492.cpp
index 2e15bdfb052..56a579dcb8a 100644
--- a/src/lib/netlist/devices/nld_7492.cpp
+++ b/src/lib/netlist/devices/nld_7492.cpp
@@ -3,9 +3,53 @@
/*
* nld_7492.cpp
*
+ * SN7492: Divide-by-12 Counter
+ *
+ * +--------------+
+ * B |1 ++ 14| A
+ * NC |2 13| NC
+ * NC |3 12| QA
+ * NC |4 7492 11| QD
+ * VCC |5 10| GND
+ * R01 |6 9| QB
+ * R02 |7 8| QC
+ * +--------------+
+ *
+ * Counter Sequence
+ *
+ * +-------++----+----+----+----+
+ * | COUNT || QD | QC | QB | QA |
+ * +=======++====+====+====+====+
+ * | 0 || 0 | 0 | 0 | 0 |
+ * | 1 || 0 | 0 | 0 | 1 |
+ * | 2 || 0 | 0 | 1 | 0 |
+ * | 3 || 0 | 0 | 1 | 1 |
+ * | 4 || 0 | 1 | 0 | 0 |
+ * | 5 || 0 | 1 | 0 | 1 |
+ * | 6 || 1 | 0 | 0 | 0 |
+ * | 7 || 1 | 0 | 0 | 1 |
+ * | 8 || 1 | 0 | 1 | 0 |
+ * | 9 || 1 | 0 | 1 | 1 |
+ * | 10 || 1 | 1 | 0 | 0 |
+ * | 11 || 1 | 1 | 0 | 1 |
+ * +-------++----+----+----+----+
+ *
+ * Note A Output QA is connected to input B
+ *
+ * Reset Count Function table
+ *
+ * +-----+-----++----+----+----+----+
+ * | R01 | R02 || QD | QC | QB | QA |
+ * +=====+=====++====+====+====+====+
+ * | 1 | 1 || 0 | 0 | 0 | 0 |
+ * | 0 | X || COUNT |
+ * | X | 0 || COUNT |
+ * +-----+-----++----+----+----+----+
+ *
+ * Naming conventions follow Texas Instruments datasheet
+ *
*/
-#include "nld_7492.h"
#include "netlist/nl_base.h"
namespace netlist
diff --git a/src/lib/netlist/devices/nld_7492.h b/src/lib/netlist/devices/nld_7492.h
index 93b2b9b0329..c4cab8909e8 100644
--- a/src/lib/netlist/devices/nld_7492.h
+++ b/src/lib/netlist/devices/nld_7492.h
@@ -1,54 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7492.h
- *
- * SN7492: Divide-by-12 Counter
- *
- * +--------------+
- * B |1 ++ 14| A
- * NC |2 13| NC
- * NC |3 12| QA
- * NC |4 7492 11| QD
- * VCC |5 10| GND
- * R01 |6 9| QB
- * R02 |7 8| QC
- * +--------------+
- *
- * Counter Sequence
- *
- * +-------++----+----+----+----+
- * | COUNT || QD | QC | QB | QA |
- * +=======++====+====+====+====+
- * | 0 || 0 | 0 | 0 | 0 |
- * | 1 || 0 | 0 | 0 | 1 |
- * | 2 || 0 | 0 | 1 | 0 |
- * | 3 || 0 | 0 | 1 | 1 |
- * | 4 || 0 | 1 | 0 | 0 |
- * | 5 || 0 | 1 | 0 | 1 |
- * | 6 || 1 | 0 | 0 | 0 |
- * | 7 || 1 | 0 | 0 | 1 |
- * | 8 || 1 | 0 | 1 | 0 |
- * | 9 || 1 | 0 | 1 | 1 |
- * | 10 || 1 | 1 | 0 | 0 |
- * | 11 || 1 | 1 | 0 | 1 |
- * +-------++----+----+----+----+
- *
- * Note A Output QA is connected to input B
- *
- * Reset Count Function table
- *
- * +-----+-----++----+----+----+----+
- * | R01 | R02 || QD | QC | QB | QA |
- * +=====+=====++====+====+====+====+
- * | 1 | 1 || 0 | 0 | 0 | 0 |
- * | 0 | X || COUNT |
- * | X | 0 || COUNT |
- * +-----+-----++----+----+----+----+
- *
- * Naming conventions follow Texas Instruments datasheet
- *
- */
#ifndef NLD_7492_H_
#define NLD_7492_H_
diff --git a/src/lib/netlist/devices/nld_7493.cpp b/src/lib/netlist/devices/nld_7493.cpp
index 57a981c65ac..7ad8aedc13f 100644
--- a/src/lib/netlist/devices/nld_7493.cpp
+++ b/src/lib/netlist/devices/nld_7493.cpp
@@ -3,6 +3,55 @@
/*
* nld_7493.cpp
*
+ * DM7493: Binary Counters
+ *
+ * +--------------+
+ * B |1 ++ 14| A
+ * R01 |2 13| NC
+ * R02 |3 12| QA
+ * NC |4 7493 11| QD
+ * VCC |5 10| GND
+ * NC |6 9| QB
+ * NC |7 8| QC
+ * +--------------+
+ *
+ * Counter Sequence
+ *
+ * +-------++----+----+----+----+
+ * | COUNT || QD | QC | QB | QA |
+ * +=======++====+====+====+====+
+ * | 0 || 0 | 0 | 0 | 0 |
+ * | 1 || 0 | 0 | 0 | 1 |
+ * | 2 || 0 | 0 | 1 | 0 |
+ * | 3 || 0 | 0 | 1 | 1 |
+ * | 4 || 0 | 1 | 0 | 0 |
+ * | 5 || 0 | 1 | 0 | 1 |
+ * | 6 || 0 | 1 | 1 | 0 |
+ * | 7 || 0 | 1 | 1 | 1 |
+ * | 8 || 1 | 0 | 0 | 0 |
+ * | 9 || 1 | 0 | 0 | 1 |
+ * | 10 || 1 | 0 | 1 | 0 |
+ * | 11 || 1 | 0 | 1 | 1 |
+ * | 12 || 1 | 1 | 0 | 0 |
+ * | 13 || 1 | 1 | 0 | 1 |
+ * | 14 || 1 | 1 | 1 | 0 |
+ * | 15 || 1 | 1 | 1 | 1 |
+ * +-------++----+----+----+----+
+ *
+ * Note C Output QA is connected to input B
+ *
+ * Reset Count Function table
+ *
+ * +-----+-----++----+----+----+----+
+ * | R01 | R02 || QD | QC | QB | QA |
+ * +=====+=====++====+====+====+====+
+ * | 1 | 1 || 0 | 0 | 0 | 0 |
+ * | 0 | X || COUNT |
+ * | X | 0 || COUNT |
+ * +-----+-----++----+----+----+----+
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
*/
#include "nld_7493.h"
diff --git a/src/lib/netlist/devices/nld_7493.h b/src/lib/netlist/devices/nld_7493.h
index 0b25ef659db..34041d61373 100644
--- a/src/lib/netlist/devices/nld_7493.h
+++ b/src/lib/netlist/devices/nld_7493.h
@@ -1,58 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_7493.h
- *
- * DM7493: Binary Counters
- *
- * +--------------+
- * B |1 ++ 14| A
- * R01 |2 13| NC
- * R02 |3 12| QA
- * NC |4 7493 11| QD
- * VCC |5 10| GND
- * NC |6 9| QB
- * NC |7 8| QC
- * +--------------+
- *
- * Counter Sequence
- *
- * +-------++----+----+----+----+
- * | COUNT || QD | QC | QB | QA |
- * +=======++====+====+====+====+
- * | 0 || 0 | 0 | 0 | 0 |
- * | 1 || 0 | 0 | 0 | 1 |
- * | 2 || 0 | 0 | 1 | 0 |
- * | 3 || 0 | 0 | 1 | 1 |
- * | 4 || 0 | 1 | 0 | 0 |
- * | 5 || 0 | 1 | 0 | 1 |
- * | 6 || 0 | 1 | 1 | 0 |
- * | 7 || 0 | 1 | 1 | 1 |
- * | 8 || 1 | 0 | 0 | 0 |
- * | 9 || 1 | 0 | 0 | 1 |
- * | 10 || 1 | 0 | 1 | 0 |
- * | 11 || 1 | 0 | 1 | 1 |
- * | 12 || 1 | 1 | 0 | 0 |
- * | 13 || 1 | 1 | 0 | 1 |
- * | 14 || 1 | 1 | 1 | 0 |
- * | 15 || 1 | 1 | 1 | 1 |
- * +-------++----+----+----+----+
- *
- * Note C Output QA is connected to input B
- *
- * Reset Count Function table
- *
- * +-----+-----++----+----+----+----+
- * | R01 | R02 || QD | QC | QB | QA |
- * +=====+=====++====+====+====+====+
- * | 1 | 1 || 0 | 0 | 0 | 0 |
- * | 0 | X || COUNT |
- * | X | 0 || COUNT |
- * +-----+-----++----+----+----+----+
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_7493_H_
#define NLD_7493_H_
diff --git a/src/lib/netlist/devices/nld_7497.cpp b/src/lib/netlist/devices/nld_7497.cpp
index 74e443936d7..4fdf282a9fd 100644
--- a/src/lib/netlist/devices/nld_7497.cpp
+++ b/src/lib/netlist/devices/nld_7497.cpp
@@ -7,6 +7,34 @@
*
* - STRB and EN
* - Timing
+ *
+ * SN7497: Synchronous 6-Bit Binary Rate Multiplier
+ *
+ * +--------------+
+ * B1 |1 16| VCC
+ * B4 |2 15| B3
+ * B5 |3 14| B2
+ * B0 |4 7497 13| CLR
+ * Z |5 12| UNITY/CAS
+ * Y |6 11| ENin (EN)
+ * ENout |7 10| STRB
+ * GND |8 9| CLK
+ * +--------------+
+ *
+ * Naming conventions follow TI datasheet
+ *
+ * The counter is enabled when the clear, strobe, and enable inputs are low.
+ *
+ * When the rate input is binary 0 (all rate inputs low), Z remains high [and Y low].
+ *
+ * The unity/cascade input, when connected to the clock input, passes
+ * clock frequency (inverted) to the Y output when the rate input/decoding
+ * gates are inhibited by the strobe.
+ *
+ * When CLR is H, states of CLK and STRB can affect Y and Z. Default are
+ * Y L, Z H, ENout H.
+ *
+ * Unity/cascade is used to inhibit output Y (UNITY L -> Y H)
*/
#include "nld_7497.h"
diff --git a/src/lib/netlist/devices/nld_7497.h b/src/lib/netlist/devices/nld_7497.h
index bd0ad3a21c1..c187ad24b3b 100644
--- a/src/lib/netlist/devices/nld_7497.h
+++ b/src/lib/netlist/devices/nld_7497.h
@@ -1,36 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Sergey Svishchev
-/*
- * nld_7497.h
- *
- * SN7497: Synchronous 6-Bit Binary Rate Multiplier
- *
- * +--------------+
- * B1 |1 16| VCC
- * B4 |2 15| B3
- * B5 |3 14| B2
- * B0 |4 7497 13| CLR
- * Z |5 12| UNITY/CAS
- * Y |6 11| ENin (EN)
- * ENout |7 10| STRB
- * GND |8 9| CLK
- * +--------------+
- *
- * Naming conventions follow TI datasheet
- *
- * The counter is enabled when the clear, strobe, and enable inputs are low.
- *
- * When the rate input is binary 0 (all rate inputs low), Z remains high [and Y low].
- *
- * The unity/cascade input, when connected to the clock input, passes
- * clock frequency (inverted) to the Y output when the rate input/decoding
- * gates are inhibited by the strobe.
- *
- * When CLR is H, states of CLK and STRB can affect Y and Z. Default are
- * Y L, Z H, ENout H.
- *
- * Unity/cascade is used to inhibit output Y (UNITY L -> Y H)
- */
#ifndef NLD_7497_H_
#define NLD_7497_H_
diff --git a/src/lib/netlist/devices/nld_74ls629.cpp b/src/lib/netlist/devices/nld_74ls629.cpp
index 31f4056fb39..669c57912e3 100644
--- a/src/lib/netlist/devices/nld_74ls629.cpp
+++ b/src/lib/netlist/devices/nld_74ls629.cpp
@@ -1,7 +1,27 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_SN74LS629.c
+ * nld_SN74LS629.cpp
+ *
+ * SN74LS629: VOLTAGE-CONTROLLED OSCILLATORS
+ *
+ * +--------------+
+ * 2FC |1 ++ 16| VCC
+ * 1FC |2 15| QSC VCC
+ * 1RNG |3 14| 2RNG
+ * 1CX1 |4 74LS629 13| 2CX1
+ * 1CX2 |5 12| 2CX2
+ * 1ENQ |6 11| 2ENQ
+ * 1Y |7 10| 2Y
+ * OSC GND |8 9| GND
+ * +--------------+
+ *
+ * Naming conventions follow Texas Instruments datasheet
+ *
+ * NOTE: The CX1 and CX2 pins are not connected!
+ * The capacitor value has to be specified as a parameter.
+ * There are more comments on the challenges of emulating this
+ * chip in the *.c file
*
*/
diff --git a/src/lib/netlist/devices/nld_74ls629.h b/src/lib/netlist/devices/nld_74ls629.h
index 72ad5ad8b61..840dae357b8 100644
--- a/src/lib/netlist/devices/nld_74ls629.h
+++ b/src/lib/netlist/devices/nld_74ls629.h
@@ -1,29 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_74LS629.h
- *
- * SN74LS629: VOLTAGE-CONTROLLED OSCILLATORS
- *
- * +--------------+
- * 2FC |1 ++ 16| VCC
- * 1FC |2 15| QSC VCC
- * 1RNG |3 14| 2RNG
- * 1CX1 |4 74LS629 13| 2CX1
- * 1CX2 |5 12| 2CX2
- * 1ENQ |6 11| 2ENQ
- * 1Y |7 10| 2Y
- * OSC GND |8 9| GND
- * +--------------+
- *
- * Naming conventions follow Texas Instruments datasheet
- *
- * NOTE: The CX1 and CX2 pins are not connected!
- * The capacitor value has to be specified as a parameter.
- * There are more comments on the challenges of emulating this
- * chip in the *.c file
- *
- */
#ifndef NLD_74LS629_H_
#define NLD_74LS629_H_
diff --git a/src/lib/netlist/devices/nld_82S115.cpp b/src/lib/netlist/devices/nld_82S115.cpp
index 377199e2190..317b16e5e80 100644
--- a/src/lib/netlist/devices/nld_82S115.cpp
+++ b/src/lib/netlist/devices/nld_82S115.cpp
@@ -3,6 +3,26 @@
/*
* nld_82S115.cpp
*
+ * 82S115: 4K-bit TTL bipolar PROM (512 x 8)
+ *
+ * +--------------+
+ * A3 |1 ++ 24| VCC
+ * A4 |2 23| A2
+ * A5 |3 22| A1
+ * A6 |4 82S115 21| A0
+ * A7 |5 20| CE1Q
+ * A8 |6 19| CE2
+ * O1 |7 18| STROBE
+ * O2 |8 17| O8
+ * O3 |9 16| O7
+ * O4 |10 15| O6
+ * FE2 |11 14| O5
+ * GND |12 13| FE1
+ * +--------------+
+ *
+ *
+ * Naming conventions follow Signetics datasheet
+ *
*/
#include "nld_82S115.h"
diff --git a/src/lib/netlist/devices/nld_82S115.h b/src/lib/netlist/devices/nld_82S115.h
index 1bb3cfb5289..c3f22dffee4 100644
--- a/src/lib/netlist/devices/nld_82S115.h
+++ b/src/lib/netlist/devices/nld_82S115.h
@@ -1,29 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_82S115.h
- *
- * 82S115: 4K-bit TTL bipolar PROM (512 x 8)
- *
- * +--------------+
- * A3 |1 ++ 24| VCC
- * A4 |2 23| A2
- * A5 |3 22| A1
- * A6 |4 82S115 21| A0
- * A7 |5 20| CE1Q
- * A8 |6 19| CE2
- * O1 |7 18| STROBE
- * O2 |8 17| O8
- * O3 |9 16| O7
- * O4 |10 15| O6
- * FE2 |11 14| O5
- * GND |12 13| FE1
- * +--------------+
- *
- *
- * Naming conventions follow Signetics datasheet
- *
- */
#ifndef NLD_82S115_H_
#define NLD_82S115_H_
diff --git a/src/lib/netlist/devices/nld_82S16.cpp b/src/lib/netlist/devices/nld_82S16.cpp
index acfa05ef247..ee798e11eb5 100644
--- a/src/lib/netlist/devices/nld_82S16.cpp
+++ b/src/lib/netlist/devices/nld_82S16.cpp
@@ -1,7 +1,24 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_82S16.c
+ * nld_82S16.cpp
+ *
+ *
+ * DM82S16: 256 Bit bipolar ram
+ *
+ * +--------------+
+ * A1 |1 ++ 16| VCC
+ * A0 |2 15| A2
+ * CE1Q |3 14| A3
+ * CE2Q |4 82S16 13| DIN
+ * CE3Q |5 12| WEQ
+ * DOUTQ |6 11| A7
+ * A4 |7 10| A6
+ * GND |8 9| A5
+ * +--------------+
+ *
+ *
+ * Naming conventions follow Signetics datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_82S16.h b/src/lib/netlist/devices/nld_82S16.h
index 635a81b245f..60e6fb22994 100644
--- a/src/lib/netlist/devices/nld_82S16.h
+++ b/src/lib/netlist/devices/nld_82S16.h
@@ -1,25 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_82S16.h
- *
- * DM82S16: 256 Bit bipolar ram
- *
- * +--------------+
- * A1 |1 ++ 16| VCC
- * A0 |2 15| A2
- * CE1Q |3 14| A3
- * CE2Q |4 82S16 13| DIN
- * CE3Q |5 12| WEQ
- * DOUTQ |6 11| A7
- * A4 |7 10| A6
- * GND |8 9| A5
- * +--------------+
- *
- *
- * Naming conventions follow Signetics datasheet
- *
- */
#ifndef NLD_82S16_H_
#define NLD_82S16_H_
diff --git a/src/lib/netlist/devices/nld_9316.cpp b/src/lib/netlist/devices/nld_9316.cpp
index 130b1103f36..1444eab368e 100644
--- a/src/lib/netlist/devices/nld_9316.cpp
+++ b/src/lib/netlist/devices/nld_9316.cpp
@@ -3,6 +3,82 @@
/*
* nld_9316.cpp
*
+ * DM9316: Synchronous 4-Bit Counters
+ *
+ * +--------------+
+ * /CLEAR |1 ++ 16| VCC
+ * CLOCK |2 15| RC (Ripple Carry)
+ * A |3 14| QA
+ * B |4 9316 13| QB
+ * C |5 12| QC
+ * D |6 11| QD
+ * Enable P |7 10| Enable T
+ * GND |8 9| /LOAD
+ * +--------------+
+ *
+ * Counter Sequence
+ *
+ * +-------++----+----+----+----+----+
+ * | COUNT || QD | QC | QB | QA | RC |
+ * +=======++====+====+====+====+====+
+ * | 0 || 0 | 0 | 0 | 0 | 0 |
+ * | 1 || 0 | 0 | 0 | 1 | 0 |
+ * | 2 || 0 | 0 | 1 | 0 | 0 |
+ * | 3 || 0 | 0 | 1 | 1 | 0 |
+ * | 4 || 0 | 1 | 0 | 0 | 0 |
+ * | 5 || 0 | 1 | 0 | 1 | 0 |
+ * | 6 || 0 | 1 | 1 | 0 | 0 |
+ * | 7 || 0 | 1 | 1 | 1 | 0 |
+ * | 8 || 1 | 0 | 0 | 0 | 0 |
+ * | 9 || 1 | 0 | 0 | 1 | 0 |
+ * | 10 || 1 | 0 | 1 | 0 | 0 |
+ * | 11 || 1 | 0 | 1 | 1 | 0 |
+ * | 12 || 1 | 1 | 0 | 0 | 0 |
+ * | 13 || 1 | 1 | 0 | 1 | 0 |
+ * | 14 || 1 | 1 | 1 | 0 | 0 |
+ * | 15 || 1 | 1 | 1 | 1 | 1 |
+ * +-------++----+----+----+----+----+
+ *
+ * Reset count function: Please refer to
+ * National Semiconductor datasheet (timing diagram)
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
+ * DM9310: Synchronous 4-Bit Counters
+ *
+ * +--------------+
+ * CLEAR |1 ++ 16| VCC
+ * CLOCK |2 15| RC (Ripple Carry)
+ * A |3 14| QA
+ * B |4 9310 13| QB
+ * C |5 12| QC
+ * D |6 11| QD
+ * Enable P |7 10| Enable T
+ * GND |8 9| LOAD
+ * +--------------+
+ *
+ * Counter Sequence
+ *
+ * +-------++----+----+----+----+----+
+ * | COUNT || QD | QC | QB | QA | RC |
+ * +=======++====+====+====+====+====+
+ * | 0 || 0 | 0 | 0 | 0 | 0 |
+ * | 1 || 0 | 0 | 0 | 1 | 0 |
+ * | 2 || 0 | 0 | 1 | 0 | 0 |
+ * | 3 || 0 | 0 | 1 | 1 | 0 |
+ * | 4 || 0 | 1 | 0 | 0 | 0 |
+ * | 5 || 0 | 1 | 0 | 1 | 0 |
+ * | 6 || 0 | 1 | 1 | 0 | 0 |
+ * | 7 || 0 | 1 | 1 | 1 | 0 |
+ * | 8 || 1 | 0 | 0 | 0 | 0 |
+ * | 9 || 1 | 0 | 0 | 1 | 0 |
+ * +-------++----+----+----+----+----+
+ *
+ * Reset count function: Please refer to
+ * National Semiconductor datasheet (timing diagram)
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
*/
#include "nl_base.h"
diff --git a/src/lib/netlist/devices/nld_9316.h b/src/lib/netlist/devices/nld_9316.h
index 97820f735e4..008104888ef 100644
--- a/src/lib/netlist/devices/nld_9316.h
+++ b/src/lib/netlist/devices/nld_9316.h
@@ -1,85 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_9316.h
- *
- * DM9316: Synchronous 4-Bit Counters
- *
- * +--------------+
- * /CLEAR |1 ++ 16| VCC
- * CLOCK |2 15| RC (Ripple Carry)
- * A |3 14| QA
- * B |4 9316 13| QB
- * C |5 12| QC
- * D |6 11| QD
- * Enable P |7 10| Enable T
- * GND |8 9| /LOAD
- * +--------------+
- *
- * Counter Sequence
- *
- * +-------++----+----+----+----+----+
- * | COUNT || QD | QC | QB | QA | RC |
- * +=======++====+====+====+====+====+
- * | 0 || 0 | 0 | 0 | 0 | 0 |
- * | 1 || 0 | 0 | 0 | 1 | 0 |
- * | 2 || 0 | 0 | 1 | 0 | 0 |
- * | 3 || 0 | 0 | 1 | 1 | 0 |
- * | 4 || 0 | 1 | 0 | 0 | 0 |
- * | 5 || 0 | 1 | 0 | 1 | 0 |
- * | 6 || 0 | 1 | 1 | 0 | 0 |
- * | 7 || 0 | 1 | 1 | 1 | 0 |
- * | 8 || 1 | 0 | 0 | 0 | 0 |
- * | 9 || 1 | 0 | 0 | 1 | 0 |
- * | 10 || 1 | 0 | 1 | 0 | 0 |
- * | 11 || 1 | 0 | 1 | 1 | 0 |
- * | 12 || 1 | 1 | 0 | 0 | 0 |
- * | 13 || 1 | 1 | 0 | 1 | 0 |
- * | 14 || 1 | 1 | 1 | 0 | 0 |
- * | 15 || 1 | 1 | 1 | 1 | 1 |
- * +-------++----+----+----+----+----+
- *
- * Reset count function: Please refer to
- * National Semiconductor datasheet (timing diagram)
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- * DM9310: Synchronous 4-Bit Counters
- *
- * +--------------+
- * CLEAR |1 ++ 16| VCC
- * CLOCK |2 15| RC (Ripple Carry)
- * A |3 14| QA
- * B |4 9310 13| QB
- * C |5 12| QC
- * D |6 11| QD
- * Enable P |7 10| Enable T
- * GND |8 9| LOAD
- * +--------------+
- *
- * Counter Sequence
- *
- * +-------++----+----+----+----+----+
- * | COUNT || QD | QC | QB | QA | RC |
- * +=======++====+====+====+====+====+
- * | 0 || 0 | 0 | 0 | 0 | 0 |
- * | 1 || 0 | 0 | 0 | 1 | 0 |
- * | 2 || 0 | 0 | 1 | 0 | 0 |
- * | 3 || 0 | 0 | 1 | 1 | 0 |
- * | 4 || 0 | 1 | 0 | 0 | 0 |
- * | 5 || 0 | 1 | 0 | 1 | 0 |
- * | 6 || 0 | 1 | 1 | 0 | 0 |
- * | 7 || 0 | 1 | 1 | 1 | 0 |
- * | 8 || 1 | 0 | 0 | 0 | 0 |
- * | 9 || 1 | 0 | 0 | 1 | 0 |
- * +-------++----+----+----+----+----+
- *
- * Reset count function: Please refer to
- * National Semiconductor datasheet (timing diagram)
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_9316_H_
#define NLD_9316_H_
diff --git a/src/lib/netlist/devices/nld_9322.cpp b/src/lib/netlist/devices/nld_9322.cpp
index 3b963111bb3..11b7659b581 100644
--- a/src/lib/netlist/devices/nld_9322.cpp
+++ b/src/lib/netlist/devices/nld_9322.cpp
@@ -3,6 +3,19 @@
/*
* nld_9322.cpp
*
+ * 9322: Quad 2-Line to 1-Line Data Selectors/Multiplexers
+ *
+ * +------------+
+ * SELECT |1 ++ 16| VCC
+ * A1 |2 15| STROBE
+ * B1 |3 14| A4
+ * Y1 |4 9322 13| B4
+ * A2 |5 12| Y4
+ * B2 |6 11| A3
+ * Y2 |7 10| B3
+ * GND |8 9| Y3
+ * +------------+
+ *
*/
#include "nld_9322.h"
diff --git a/src/lib/netlist/devices/nld_9322.h b/src/lib/netlist/devices/nld_9322.h
index 9a20f4ca2ac..d53d0c210e5 100644
--- a/src/lib/netlist/devices/nld_9322.h
+++ b/src/lib/netlist/devices/nld_9322.h
@@ -1,22 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_9322.h
- *
- * 9322: Quad 2-Line to 1-Line Data Selectors/Multiplexers
- *
- * +------------+
- * SELECT |1 ++ 16| VCC
- * A1 |2 15| STROBE
- * B1 |3 14| A4
- * Y1 |4 9322 13| B4
- * A2 |5 12| Y4
- * B2 |6 11| A3
- * Y2 |7 10| B3
- * GND |8 9| Y3
- * +------------+
- *
- */
#ifndef NLD_9322_H_
#define NLD_9322_H_
diff --git a/src/lib/netlist/devices/nld_am2847.cpp b/src/lib/netlist/devices/nld_am2847.cpp
index 7dff2cdb07e..0b0b321efa4 100644
--- a/src/lib/netlist/devices/nld_am2847.cpp
+++ b/src/lib/netlist/devices/nld_am2847.cpp
@@ -3,6 +3,19 @@
/*
* nld_am2847.cpp
*
+ * Am2847: Quad 80-Bit Static Shift Register
+ *
+ * +--------------+
+ * OUTA |1 ++ 16| VSS
+ * RCA |2 15| IND
+ * INA |3 14| RCD
+ * OUTB |4 Am2847 13| OUTD
+ * RCB |5 12| VGG
+ * INB |6 11| CP
+ * OUTC |7 10| INC
+ * VDD |8 9| RCC
+ * +--------------+
+ *
*/
#include "nld_am2847.h"
diff --git a/src/lib/netlist/devices/nld_am2847.h b/src/lib/netlist/devices/nld_am2847.h
index f1347545984..bad7331e8f6 100644
--- a/src/lib/netlist/devices/nld_am2847.h
+++ b/src/lib/netlist/devices/nld_am2847.h
@@ -1,22 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_am2847.h
- *
- * Am2847: Quad 80-Bit Static Shift Register
- *
- * +--------------+
- * OUTA |1 ++ 16| VSS
- * RCA |2 15| IND
- * INA |3 14| RCD
- * OUTB |4 Am2847 13| OUTD
- * RCB |5 12| VGG
- * INB |6 11| CP
- * OUTC |7 10| INC
- * VDD |8 9| RCC
- * +--------------+
- *
- */
#ifndef NLD_AM2847_H_
#define NLD_AM2847_H_
diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h
index 298db9083cb..48e41f6e561 100644
--- a/src/lib/netlist/devices/nld_devinc.h
+++ b/src/lib/netlist/devices/nld_devinc.h
@@ -595,7 +595,7 @@
// ---------------------------------------------------------------------
// Source: src/lib/netlist/devices/nld_4006.cpp
// ---------------------------------------------------------------------
-// usage : CD4006(name, pCLOCK, pD1, pD2, pD3, pD4, pD1P4, pD1P4S, pD2P4, pD2P5, pD3P4, pD4P4, pD3P5)
+// usage : CD4006(name, pCLOCK, pD1, pD2, pD3, pD4, pD1P4, pD1P4S, pD2P4, pD2P5, pD3P4, pD4P4, pD4P5)
// auto connect: VCC, GND
#define CD4006(...) \
NET_REGISTER_DEVEXT(CD4006, __VA_ARGS__)
diff --git a/src/lib/netlist/devices/nld_dm9314.cpp b/src/lib/netlist/devices/nld_dm9314.cpp
index 2ded51abbd4..c941aadc0cf 100644
--- a/src/lib/netlist/devices/nld_dm9314.cpp
+++ b/src/lib/netlist/devices/nld_dm9314.cpp
@@ -3,6 +3,19 @@
/*
* nld_dm9314.cpp
*
+ * DM9314: 4-Bit Latches
+ *
+ * +--------------+
+ * /E |1 ++ 16| VCC
+ * /S0 |2 15| Q0
+ * D0 |3 14| /S1
+ * D1 |4 DM9314 13| Q1
+ * /S2 |5 12| Q2
+ * D2 |6 11| /S3
+ * D3 |7 10| Q3
+ * GND |8 9| /MR
+ * +--------------+
+ *
*/
#include "nld_dm9314.h"
diff --git a/src/lib/netlist/devices/nld_dm9314.h b/src/lib/netlist/devices/nld_dm9314.h
index 73edfaa1205..4fc855c40b2 100644
--- a/src/lib/netlist/devices/nld_dm9314.h
+++ b/src/lib/netlist/devices/nld_dm9314.h
@@ -1,22 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Felipe Sanches
-/*
- * nld_DM9314.h
- *
- * DM9314: 4-Bit Latches
- *
- * +--------------+
- * /E |1 ++ 16| VCC
- * /S0 |2 15| Q0
- * D0 |3 14| /S1
- * D1 |4 DM9314 13| Q1
- * /S2 |5 12| Q2
- * D2 |6 11| /S3
- * D3 |7 10| Q3
- * GND |8 9| /MR
- * +--------------+
- *
- */
#ifndef NLD_DM9314_H_
#define NLD_DM9314_H_
diff --git a/src/lib/netlist/devices/nld_dm9334.cpp b/src/lib/netlist/devices/nld_dm9334.cpp
index cdc38827755..0755c4532f1 100644
--- a/src/lib/netlist/devices/nld_dm9334.cpp
+++ b/src/lib/netlist/devices/nld_dm9334.cpp
@@ -3,6 +3,63 @@
/*
* nld_dm9334.cpp
*
+ * DM9334: 8-Bit Addressable Latch
+ *
+ * +--------------+
+ * A0 |1 ++ 16| VCC
+ * A1 |2 15| /C
+ * A2 |3 14| /E
+ * Q0 |4 DM9334 13| D
+ * Q1 |5 12| Q7
+ * Q2 |6 11| Q6
+ * Q3 |7 10| Q5
+ * GND |8 9| Q4
+ * +--------------+
+ *
+ * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
+ * | C | E || D || A0| A1| A2|| Q0| Q1| Q2| Q3| Q4| Q5| Q6| Q7|
+ * +===+===++===++===+===+===++===+===+===+===+===+===+===+===+
+ * | 1 | 0 || X || X | X | X || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
+ * | 1 | 1 || 0 || 0 | 0 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 0 | 0 | 0 || 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 0 || 0 | 0 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 0 | 0 | 1 || 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 0 || 0 | 1 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 0 | 1 | 0 || 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 0 || 0 | 1 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 0 | 1 | 1 || 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 0 || 1 | 0 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 1 | 0 | 0 || 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
+ * | 1 | 1 || 0 || 1 | 0 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 1 | 0 | 1 || 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
+ * | 1 | 1 || 0 || 1 | 1 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 1 | 1 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
+ * | 1 | 1 || 0 || 1 | 1 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+ * | 1 | 1 || 1 || 1 | 1 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
+ * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
+ * | 0 | 0 || X || X | X | X || P | P | P | P | P | P | P | P |
+ * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
+ * | 0 | 1 || 0 || 0 | 0 | 0 || 0 | P | P | P | P | P | P | P |
+ * | 0 | 1 || 1 || 0 | 0 | 0 || 1 | P | P | P | P | P | P | P |
+ * | 0 | 1 || 0 || 0 | 0 | 1 || P | 0 | P | P | P | P | P | P |
+ * | 0 | 1 || 1 || 0 | 0 | 1 || P | 1 | P | P | P | P | P | P |
+ * | 0 | 1 || 0 || 0 | 1 | 0 || P | P | 0 | P | P | P | P | P |
+ * | 0 | 1 || 1 || 0 | 1 | 0 || P | P | 1 | P | P | P | P | P |
+ * | 0 | 1 || 0 || 0 | 1 | 1 || P | P | P | 0 | P | P | P | P |
+ * | 0 | 1 || 1 || 0 | 1 | 1 || P | P | P | 1 | P | P | P | P |
+ * | 0 | 1 || 0 || 1 | 0 | 0 || P | P | P | P | 0 | P | P | P |
+ * | 0 | 1 || 1 || 1 | 0 | 0 || P | P | P | P | 1 | P | P | P |
+ * | 0 | 1 || 0 || 1 | 0 | 1 || P | P | P | P | P | 0 | P | P |
+ * | 0 | 1 || 1 || 1 | 0 | 1 || P | P | P | P | P | 1 | P | P |
+ * | 0 | 1 || 0 || 1 | 1 | 0 || P | P | P | P | P | P | 0 | P |
+ * | 0 | 1 || 1 || 1 | 1 | 0 || P | P | P | P | P | P | 1 | P |
+ * | 0 | 1 || 0 || 1 | 1 | 1 || P | P | P | P | P | P | P | 0 |
+ * | 0 | 1 || 1 || 1 | 1 | 1 || P | P | P | P | P | P | P | 1 |
+ * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
+ *
+ * Naming convention attempts to follow Texas Instruments / National Semiconductor datasheet Literature Number SNOS382A
+ *
*/
#include "nld_dm9334.h"
diff --git a/src/lib/netlist/devices/nld_dm9334.h b/src/lib/netlist/devices/nld_dm9334.h
index 2f4ab1f18c1..f4edeb97306 100644
--- a/src/lib/netlist/devices/nld_dm9334.h
+++ b/src/lib/netlist/devices/nld_dm9334.h
@@ -1,66 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_DM9334.h
- *
- * DM9334: 8-Bit Addressable Latch
- *
- * +--------------+
- * A0 |1 ++ 16| VCC
- * A1 |2 15| /C
- * A2 |3 14| /E
- * Q0 |4 DM9334 13| D
- * Q1 |5 12| Q7
- * Q2 |6 11| Q6
- * Q3 |7 10| Q5
- * GND |8 9| Q4
- * +--------------+
- *
- * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
- * | C | E || D || A0| A1| A2|| Q0| Q1| Q2| Q3| Q4| Q5| Q6| Q7|
- * +===+===++===++===+===+===++===+===+===+===+===+===+===+===+
- * | 1 | 0 || X || X | X | X || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
- * | 1 | 1 || 0 || 0 | 0 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 0 | 0 | 0 || 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 0 || 0 | 0 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 0 | 0 | 1 || 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 0 || 0 | 1 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 0 | 1 | 0 || 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 0 || 0 | 1 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 0 | 1 | 1 || 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 0 || 1 | 0 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 1 | 0 | 0 || 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
- * | 1 | 1 || 0 || 1 | 0 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 1 | 0 | 1 || 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
- * | 1 | 1 || 0 || 1 | 1 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 1 | 1 | 0 || 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
- * | 1 | 1 || 0 || 1 | 1 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- * | 1 | 1 || 1 || 1 | 1 | 1 || 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
- * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
- * | 0 | 0 || X || X | X | X || P | P | P | P | P | P | P | P |
- * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
- * | 0 | 1 || 0 || 0 | 0 | 0 || 0 | P | P | P | P | P | P | P |
- * | 0 | 1 || 1 || 0 | 0 | 0 || 1 | P | P | P | P | P | P | P |
- * | 0 | 1 || 0 || 0 | 0 | 1 || P | 0 | P | P | P | P | P | P |
- * | 0 | 1 || 1 || 0 | 0 | 1 || P | 1 | P | P | P | P | P | P |
- * | 0 | 1 || 0 || 0 | 1 | 0 || P | P | 0 | P | P | P | P | P |
- * | 0 | 1 || 1 || 0 | 1 | 0 || P | P | 1 | P | P | P | P | P |
- * | 0 | 1 || 0 || 0 | 1 | 1 || P | P | P | 0 | P | P | P | P |
- * | 0 | 1 || 1 || 0 | 1 | 1 || P | P | P | 1 | P | P | P | P |
- * | 0 | 1 || 0 || 1 | 0 | 0 || P | P | P | P | 0 | P | P | P |
- * | 0 | 1 || 1 || 1 | 0 | 0 || P | P | P | P | 1 | P | P | P |
- * | 0 | 1 || 0 || 1 | 0 | 1 || P | P | P | P | P | 0 | P | P |
- * | 0 | 1 || 1 || 1 | 0 | 1 || P | P | P | P | P | 1 | P | P |
- * | 0 | 1 || 0 || 1 | 1 | 0 || P | P | P | P | P | P | 0 | P |
- * | 0 | 1 || 1 || 1 | 1 | 0 || P | P | P | P | P | P | 1 | P |
- * | 0 | 1 || 0 || 1 | 1 | 1 || P | P | P | P | P | P | P | 0 |
- * | 0 | 1 || 1 || 1 | 1 | 1 || P | P | P | P | P | P | P | 1 |
- * +---+---++---++---+---+---++---+---+---+---+---+---+---+---+
- *
- * Naming convention attempts to follow Texas Instruments / National Semiconductor datasheet Literature Number SNOS382A
- *
- */
#ifndef NLD_DM9334_H_
#define NLD_DM9334_H_
diff --git a/src/lib/netlist/devices/nld_log.cpp b/src/lib/netlist/devices/nld_log.cpp
index 5c0c550e11c..dacc208f5a0 100644
--- a/src/lib/netlist/devices/nld_log.cpp
+++ b/src/lib/netlist/devices/nld_log.cpp
@@ -1,7 +1,17 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_log.c
+ * nld_log.cpp
+ *
+ * Devices supporting analysis and logging
+ *
+ * nld_log:
+ *
+ * +---------+
+ * | ++ |
+ * I | | ==> Log to file "netlist_" + name() + ".log"
+ * | |
+ * +---------+
*
*/
diff --git a/src/lib/netlist/devices/nld_log.h b/src/lib/netlist/devices/nld_log.h
index 13c71ea7257..470506a430e 100644
--- a/src/lib/netlist/devices/nld_log.h
+++ b/src/lib/netlist/devices/nld_log.h
@@ -1,19 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_log.h
- *
- * Devices supporting analysis and logging
- *
- * nld_log:
- *
- * +---------+
- * | ++ |
- * I | | ==> Log to file "netlist_" + name() + ".log"
- * | |
- * +---------+
- *
- */
#ifndef NLD_LOG_H_
#define NLD_LOG_H_
diff --git a/src/lib/netlist/devices/nld_mm5837.cpp b/src/lib/netlist/devices/nld_mm5837.cpp
index aac0d38fe82..c43509fac7d 100644
--- a/src/lib/netlist/devices/nld_mm5837.cpp
+++ b/src/lib/netlist/devices/nld_mm5837.cpp
@@ -1,7 +1,18 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_MM5837.c
+ * nld_MM5837.cpp
+ *
+ * MM5837: Digital noise source
+ *
+ * +--------+
+ * VDD |1 ++ 8| NC
+ * VGG |2 7| NC
+ * OUT |3 6| NC
+ * VSS |4 5| NC
+ * +--------+
+ *
+ * Naming conventions follow National Semiconductor datasheet
*
*/
diff --git a/src/lib/netlist/devices/nld_mm5837.h b/src/lib/netlist/devices/nld_mm5837.h
index 8f764aa651f..0fe862f964e 100644
--- a/src/lib/netlist/devices/nld_mm5837.h
+++ b/src/lib/netlist/devices/nld_mm5837.h
@@ -1,20 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_MM5837.h
- *
- * MM5837: Digital noise source
- *
- * +--------+
- * VDD |1 ++ 8| NC
- * VGG |2 7| NC
- * OUT |3 6| NC
- * VSS |4 5| NC
- * +--------+
- *
- * Naming conventions follow National Semiconductor datasheet
- *
- */
#ifndef NLD_MM5837_H_
#define NLD_MM5837_H_
diff --git a/src/lib/netlist/devices/nld_r2r_dac.cpp b/src/lib/netlist/devices/nld_r2r_dac.cpp
index 2ea95ca4996..703ba3a536e 100644
--- a/src/lib/netlist/devices/nld_r2r_dac.cpp
+++ b/src/lib/netlist/devices/nld_r2r_dac.cpp
@@ -1,7 +1,45 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
- * nld_R2R_dac.c
+ * nld_r2r_dac.cpp
+ *
+ * DMR2R_DAC: R-2R DAC
+ *
+ * Generic R-2R DAC ... This is fast.
+ * 2R
+ * Bit n >----RRR----+---------> Vout
+ * |
+ * R
+ * R R
+ * R
+ * |
+ * .
+ * .
+ * 2R |
+ * Bit 2 >----RRR----+
+ * |
+ * R
+ * R R
+ * R
+ * |
+ * 2R |
+ * Bit 1 >----RRR----+
+ * |
+ * R
+ * R 2R
+ * R
+ * |
+ * V0
+ *
+ * Using Thevenin's Theorem, this can be written as
+ *
+ * +---RRR-----------> Vout
+ * |
+ * V
+ * V V = VAL / 2^n * Vin
+ * V
+ * |
+ * V0
*
*/
diff --git a/src/lib/netlist/devices/nld_r2r_dac.h b/src/lib/netlist/devices/nld_r2r_dac.h
index d440f999d67..85af880bddb 100644
--- a/src/lib/netlist/devices/nld_r2r_dac.h
+++ b/src/lib/netlist/devices/nld_r2r_dac.h
@@ -1,47 +1,5 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * nld_R2R_DAC.h
- *
- * DMR2R_DAC: R-2R DAC
- *
- * Generic R-2R DAC ... This is fast.
- * 2R
- * Bit n >----RRR----+---------> Vout
- * |
- * R
- * R R
- * R
- * |
- * .
- * .
- * 2R |
- * Bit 2 >----RRR----+
- * |
- * R
- * R R
- * R
- * |
- * 2R |
- * Bit 1 >----RRR----+
- * |
- * R
- * R 2R
- * R
- * |
- * V0
- *
- * Using Thevenin's Theorem, this can be written as
- *
- * +---RRR-----------> Vout
- * |
- * V
- * V V = VAL / 2^n * Vin
- * V
- * |
- * V0
- *
- */
#ifndef NLD_R2R_DAC_H_
#define NLD_R2R_DAC_H_
diff --git a/src/lib/netlist/devices/nld_tms4800.cpp b/src/lib/netlist/devices/nld_tms4800.cpp
index 3f9de696ea8..d55827c2416 100644
--- a/src/lib/netlist/devices/nld_tms4800.cpp
+++ b/src/lib/netlist/devices/nld_tms4800.cpp
@@ -3,6 +3,26 @@
/*
* nld_tms4800.cpp
*
+ * TMS-4800: 16 Kbit (2Kb x 8) READ ONLY MEMORY
+ *
+ * +----------------+
+ * VSS |1 ++ 24| OE1
+ * A1 |2 23| O1
+ * A2 |3 22| O2
+ * A3 |4 TMS-4800 21| O3
+ * A4 |5 20| O4
+ * A5 |6 19| O5
+ * A6 |7 18| O6
+ * A10 |8 17| O7
+ * VGG |9 16| O8
+ * A9 |10 15| A11
+ * A8 |11 14| OE2
+ * A7 |12 13| AR
+ * +----------------+
+ *
+ *
+ * Naming conventions follow Texas Instruments datasheet:
+ * http://bitsavers.trailing-edge.com/components/ti/_dataBooks/1975_TI_The_Semiconductor_Memory_Data_Book.pdf
*/
#include "nld_tms4800.h"
diff --git a/src/lib/netlist/devices/nld_tms4800.h b/src/lib/netlist/devices/nld_tms4800.h
index 14d7d40dc64..63bcff9e7e9 100644
--- a/src/lib/netlist/devices/nld_tms4800.h
+++ b/src/lib/netlist/devices/nld_tms4800.h
@@ -1,29 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Felipe Sanches
-/*
- * nld_tms4800.h
- *
- * TMS-4800: 16 Kbit (2Kb x 8) READ ONLY MEMORY
- *
- * +----------------+
- * VSS |1 ++ 24| OE1
- * A1 |2 23| O1
- * A2 |3 22| O2
- * A3 |4 TMS-4800 21| O3
- * A4 |5 20| O4
- * A5 |6 19| O5
- * A6 |7 18| O6
- * A10 |8 17| O7
- * VGG |9 16| O8
- * A9 |10 15| A11
- * A8 |11 14| OE2
- * A7 |12 13| AR
- * +----------------+
- *
- *
- * Naming conventions follow Texas Instruments datasheet:
- * http://bitsavers.trailing-edge.com/components/ti/_dataBooks/1975_TI_The_Semiconductor_Memory_Data_Book.pdf
- */
#ifndef NLD_TMS4800_H_
#define NLD_TMS4800_H_
diff --git a/src/lib/netlist/devices/nld_tristate.cpp b/src/lib/netlist/devices/nld_tristate.cpp
index 93dcbb4913d..013a0514420 100644
--- a/src/lib/netlist/devices/nld_tristate.cpp
+++ b/src/lib/netlist/devices/nld_tristate.cpp
@@ -3,6 +3,8 @@
/*
* nld_tristate.cpp
*
+ * tristate: Hack to merge two tri-stated outputs together
+ *
*/
#include "nld_tristate.h"
diff --git a/src/lib/netlist/devices/nld_tristate.h b/src/lib/netlist/devices/nld_tristate.h
index 71f97d9812d..0cb32c73d12 100644
--- a/src/lib/netlist/devices/nld_tristate.h
+++ b/src/lib/netlist/devices/nld_tristate.h
@@ -1,11 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
-/*
- * nld_tristate.h
- *
- * tristate: Hack to merge two tri-stated outputs together
- *
- */
#ifndef NLD_TRISTATE_H_
#define NLD_TRISTATE_H_
diff --git a/src/lib/netlist/macro/nlm_roms.h b/src/lib/netlist/macro/nlm_roms.h
index cc5a3b53328..3398af98d6f 100644
--- a/src/lib/netlist/macro/nlm_roms.h
+++ b/src/lib/netlist/macro/nlm_roms.h
@@ -18,6 +18,9 @@
#if !NL_AUTO_DEVICES
+#define PROM_82S115_DIP(name) \
+ NET_REGISTER_DEV(PROM_82S115_DIP, name)
+
#define PROM_82S126_DIP(name) \
NET_REGISTER_DEV(PROM_82S126_DIP, name)
@@ -39,6 +42,9 @@
#define RAM_2102A_DIP(name) \
NET_REGISTER_DEV(RAM_2102A_DIP, name)
+#define RAM_2102A_DIP(name) \
+ NET_REGISTER_DEV(RAM_2102A_DIP, name)
+
#endif // NL_AUTO_DEVICES
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp
index 422ac024a84..d3bf5d75ec6 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.cpp
+++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp
@@ -2022,17 +2022,61 @@ NETLIST_END()
* SN74LS629: VOLTAGE-CONTROLLED OSCILLATORS
*
* +--------------+
- * 2FC |1 ++ 16| VCC
- * 1FC |2 15| QSC VCC
- * 1RNG |3 14| 2RNG
- * 1CX1 |4 74LS629 13| 2CX1
- * 1CX2 |5 12| 2CX2
- * 1ENQ |6 11| 2ENQ
- * 1Y |7 10| 2Y
- * OSC GND |8 9| GND
+ * /CP |1 ++ 14| VCC
+ * MR |2 13| /CP
+ * Q0 |3 12| MR
+ * Q1 |4 74393 11| Q0
+ * Q2 |5 10| Q1
+ * Q3 |6 9| Q2
+ * GND |7 8| Q3
* +--------------+
+ *
+ * Naming conventions follow Motorola datasheet
*/
+static NETLIST_START(TTL_74393_DIP)
+ TTL_74393(A)
+ TTL_74393(B)
+
+ NET_C(A.VCC, B.VCC)
+ NET_C(A.GND, B.GND)
+
+ DIPPINS( /* +------------+ */
+ A.CP, /* /CP |1 ++ 14| VCC */ A.VCC,
+ A.MR, /* MR |2 13| /CP */ B.CP,
+ A.Q0, /* Q0 |3 12| MR */ B.MR,
+ A.Q1, /* Q1 |4 74393 11| Q0 */ B.Q0,
+ A.Q2, /* Q2 |5 10| Q1 */ B.Q1,
+ A.Q3, /* Q3 |6 9| Q2 */ B.Q2,
+ A.GND, /* GND |7 8| Q3 */ B.Q3
+ /* +------------+ */
+ )
+NETLIST_END()
+
+//- Identifier: SN74LS629_DIP
+//- Title: SN74LS629 VOLTAGE-CONTROLLED OSCILLATORS
+//- Description: Please add a detailed description
+//- FIXME: Missing description
+//-
+//- Pinalias: 2FC,1FC,1RNG,1CX1,1CX2,1ENQ,1Y,OSC_GND,GND,2Y,2ENQ,2CX2,2CX1,2RNG,OSC_VCC,VCC
+//- Package: DIP
+//- Param: A.CAP
+//- Capacitor value of capacitor connected to 1CX1 and 1CX2 pins
+//- Param: B.CAP
+//- Capacitor value of capacitor connected to 2CX1 and 2CX2 pins
+//- Limitations:
+//- The capacitor inputs are NC. Capacitor values need to be specified as
+//- ```
+//- SN74LS629_DIP(X)
+//- PARAM(X.A.CAP, CAP_U(1))
+//- PARAM(X.B.CAP, CAP_U(2))
+//- ```
+//-
+//- Example: 74ls629.cpp,74ls629_example
+//-
+//- FunctionTable:
+//- http://pdf.datasheetcatalog.com/datasheets/400/335051_DS.pdf
+//-
static NETLIST_START(SN74LS629_DIP)
SN74LS629(A, CAP_U(1))
SN74LS629(B, CAP_U(1))
diff --git a/src/lib/netlist/solver/nld_matrix_solver_ext.h b/src/lib/netlist/solver/nld_matrix_solver_ext.h
index d308f1cf7c1..8938d7c25e4 100644
--- a/src/lib/netlist/solver/nld_matrix_solver_ext.h
+++ b/src/lib/netlist/solver/nld_matrix_solver_ext.h
@@ -171,7 +171,7 @@ namespace solver
netlist_time compute_next_timestep(fptype cur_ts, fptype min_ts, fptype max_ts) override
{
- fptype new_solver_timestep(max_ts);
+ fptype new_solver_timestep_sq(max_ts * max_ts);
for (std::size_t k = 0; k < size(); k++)
{
@@ -185,21 +185,21 @@ namespace solver
const fptype hn = cur_ts;
fptype DD2 = (DD_n / hn - m_DD_n_m_1[k] / m_h_n_m_1[k]) / (hn + m_h_n_m_1[k]);
- fptype new_net_timestep(0);
m_h_n_m_1[k] = hn;
m_DD_n_m_1[k] = DD_n;
if (plib::abs(DD2) > fp_constants<fptype>::TIMESTEP_MINDIV()) // avoid div-by-zero
- new_net_timestep = plib::sqrt(m_params.m_dynamic_lte / plib::abs(nlconst::half()*DD2));
- else
- new_net_timestep = max_ts;
-
- new_solver_timestep = std::min(new_net_timestep, new_solver_timestep);
+ {
+ // save the sqrt for the end
+ const fptype new_net_timestep_sq = m_params.m_dynamic_lte / plib::abs(nlconst::half()*DD2);
+ new_solver_timestep_sq = std::min(new_net_timestep_sq, new_solver_timestep_sq);
+ }
}
- new_solver_timestep = std::max(new_solver_timestep, min_ts);
+
+ new_solver_timestep_sq = std::max(plib::sqrt(new_solver_timestep_sq), min_ts);
// FIXME: Factor 2 below is important. Without, we get timing issues. This must be a bug elsewhere.
- return std::max(netlist_time::from_fp(new_solver_timestep), netlist_time::quantum() * 2);
+ return std::max(netlist_time::from_fp(new_solver_timestep_sq), netlist_time::quantum() * 2);
}
template <typename M>
diff --git a/src/mame/audio/nl_tankbatt.cpp b/src/mame/audio/nl_tankbatt.cpp
new file mode 100644
index 00000000000..f318daf1cd1
--- /dev/null
+++ b/src/mame/audio/nl_tankbatt.cpp
@@ -0,0 +1,165 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+//
+// Netlist for Tank Battalion
+//
+// Derived from the schematics in the manual.
+//
+// Known problems/issues:
+//
+// * None.
+//
+
+#include "netlist/devices/net_lib.h"
+#include "nl_tankbatt.h"
+
+//
+// Main netlist
+//
+
+NETLIST_START(tankbatt)
+
+ SOLVER(Solver, 48000)
+ ANALOG_INPUT(V5, 5)
+ ALIAS(VCC, V5)
+
+ CLOCK(2V, 4000) // 18.432MHz / (3 * 384 * 2)
+ CLOCK(4V, 2000) // 18.432MHz / (3 * 384 * 4)
+
+ TTL_INPUT(S1, 0) // active high
+ TTL_INPUT(S2, 0) // active high
+ TTL_INPUT(OFF, 1) // active high
+ TTL_INPUT(ENGINE_HI, 0) // active high
+ TTL_INPUT(SHOOT, 0) // active high
+ TTL_INPUT(HIT, 0) // active high
+
+ RES(R31, 470)
+ RES(R32, 470)
+ RES(R35, RES_K(4.7))
+ RES(R36, RES_K(4.7))
+ RES(R37, RES_K(6.8))
+ RES(R38, RES_K(10))
+ //RES(R41, RES_K(22))
+ RES(R42, RES_K(22))
+ RES(R43, RES_K(22))
+ RES(R44, RES_K(33))
+ RES(R45, RES_K(47))
+ RES(R46, RES_K(4.7)) // Possible schematic or scan-quality error: Schematic says 47K
+ RES(R47, RES_K(4.7))
+ RES(R48, RES_K(4.7))
+ RES(R49, RES_K(4.7)) // Possible schematic or scan-quality error: Schematic says 47K
+ RES(R50, RES_K(150))
+ RES(R51, RES_K(150))
+ RES(R52, RES_K(220))
+ RES(R53, RES_K(470))
+ RES(R54, RES_K(470))
+ RES(R56_1, RES_K(1))
+ RES(R56_2, RES_K(1))
+ RES(R57, RES_K(10))
+ RES(R58, RES_K(1))
+ RES(R59, RES_K(1))
+ RES(R60, RES_K(1))
+ RES(R61, RES_K(1))
+
+ CAP(C10, CAP_U(2.2))
+ CAP(C11, CAP_U(2.2))
+ CAP(C12, CAP_U(2.2))
+ CAP(C13, CAP_U(2.2))
+ CAP(C14, CAP_U(0.1))
+ CAP(C15, CAP_U(0.01))
+ CAP(C16, CAP_U(0.01))
+ CAP(C17, CAP_U(0.01))
+ CAP(C18, CAP_U(0.01))
+ CAP(C42, CAP_U(0.1))
+
+ DIODE(D8, "D") // Generic diodes, types not listed on schematic
+ DIODE(D9, "D")
+ DIODE(D10, "D")
+ DIODE(D11, "D")
+
+ CD4006(_6F)
+ CD4066_DIP(_6L)
+ LM324_DIP(_6J)
+ TTL_7486_DIP(_6K)
+ TTL_7492_DIP(_5K)
+
+ NET_C(VCC, _5K.5, _6F.VDD, _6J.4, _6K.7, _6L.14, S1.VCC, S2.VCC, OFF.VCC, ENGINE_HI.VCC, SHOOT.VCC, HIT.VCC, 2V.VCC, 4V.VCC)
+ NET_C(GND, _5K.10, _6F.VSS, _6J.11, _6K.14, _6L.7, S1.GND, S2.GND, OFF.GND, ENGINE_HI.GND, SHOOT.GND, HIT.GND, 2V.GND, 4V.GND)
+
+ // Noise generation (presumably)
+ NET_C(_6F.CLOCK, 2V)
+ NET_C(_6F.D1P4, _6F.D3)
+ NET_C(_6F.D3P4, _6F.D4, _6L.12, _6L.6)
+ NET_C(_6F.D1, _6F.D2P5, _6K.A.A)
+ NET_C(_6F.D4P4, _6K.A.B)
+ NET_C(_6K.A.Q, R38.1)
+ NET_C(_6F.D2, R38.2, D9.K)
+ NET_C(_6F.D4P5, D8.A, R53.1)
+ NET_C(D8.K, R53.2, C42.1, _6J.2)
+ NET_C(_6J.1, C42.2, D9.A)
+ NET_C(_6J.3, C12.1, R43.1, R44.1, _6J.12, _6J.10)
+ NET_C(C12.2, GND)
+ NET_C(R43.2, GND)
+ NET_C(R44.2, V5)
+
+ // S1
+ NET_C(S1.Q, _6L.5)
+ NET_C(4V, _6L.4)
+ NET_C(_6L.3, R35.1)
+
+ // S2
+ NET_C(S2.Q, _6L.13)
+ NET_C(2V, _6L.1)
+ NET_C(_6L.2, R36.1)
+
+ // Hit
+ NET_C(HIT.Q, R31.1)
+ NET_C(R31.2, D10.A)
+ NET_C(D10.K, C10.1, _6L.8)
+ NET_C(C10.2, GND)
+ NET_C(_6L.9, R50.1)
+ NET_C(R50.2, R42.1, C15.1, C16.1)
+ NET_C(R42.2, GND)
+ NET_C(C16.2, R54.1, _6J.9)
+ NET_C(C15.2, R54.2, _6J.8, R56_1.1)
+
+ // Shoot
+ NET_C(SHOOT.Q, R32.1)
+ NET_C(R32.2, D11.A)
+ NET_C(D11.K, C11.1, _6L.11)
+ NET_C(C11.2, GND)
+ NET_C(_6L.10, R45.1)
+ NET_C(R45.2, R37.1, C17.1, C18.1)
+ NET_C(R37.2, GND)
+ NET_C(C18.2, R51.1, _6J.13)
+ NET_C(C17.2, R51.2, _6J.14, R56_2.1)
+
+ // Engine Rumble
+ NET_C(ENGINE_HI.Q, _6K.B.A)
+ NET_C(_6K.B.B, _6K.C.Q)
+ NET_C(_6K.B.Q, R52.1, _5K.1)
+ NET_C(R52.2, R46.1, _6J.6, C14.1)
+ NET_C(C14.2, GND)
+ NET_C(_6J.5, R47.1, R48.1, R49.1)
+ NET_C(R47.2, V5)
+ NET_C(R48.2, GND)
+ NET_C(R49.2, R57.1, _6J.7, R46.2, _6K.C.A)
+ NET_C(R57.2, GND)
+ NET_C(_6K.C.B, VCC)
+ NET_C(_5K.7, VCC)
+ NET_C(_5K.6, OFF.Q)
+ NET_C(_5K.11, R60.1, _6K.D.A)
+ NET_C(_5K.8, R58.1, _6K.D.B)
+ NET_C(_6K.D.Q, _5K.14)
+ NET_C(_5K.12, R61.1)
+ NET_C(R58.2, R60.2, R61.2, C13.1, R59.1)
+ NET_C(C13.2, GND)
+
+ // Mixing
+ //NET_C(R56_1.2, R56_2.2)
+ //NET_C(R35.2, R36.2)
+ //NET_C(R56_2.2, R59.2)
+ NET_C(R35.2, R36.2, R56_1.2, R56_2.2, R59.2)
+ //NET_C(R41.2, GND)
+NETLIST_END()
diff --git a/src/mame/audio/nl_tankbatt.h b/src/mame/audio/nl_tankbatt.h
new file mode 100644
index 00000000000..6fa318cc2d6
--- /dev/null
+++ b/src/mame/audio/nl_tankbatt.h
@@ -0,0 +1,10 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+#ifndef MAME_AUDIO_NL_TANKBATT_H
+#define MAME_AUDIO_NL_TANKBATT_H
+
+#pragma once
+
+NETLIST_EXTERNAL(tankbatt)
+
+#endif // MAME_AUDIO_NL_TANKBATT_H
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 9a3b5f01b43..3366c68a326 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -3100,7 +3100,7 @@ void apple2e_state::apple2c_map(address_map &map)
map(0xc000, 0xc07f).rw(FUNC(apple2e_state::c000_iic_r), FUNC(apple2e_state::c000_iic_w));
map(0xc080, 0xc0ff).rw(FUNC(apple2e_state::c080_r), FUNC(apple2e_state::c080_w));
map(0xc098, 0xc09b).rw(m_acia1, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
- map(0xc0a8, 0xc0ab).rw(IIC_ACIA2_TAG, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
+ map(0xc0a8, 0xc0ab).rw(m_acia2, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
map(0xc100, 0xc2ff).m(m_c100bank, FUNC(address_map_bank_device::amap8));
map(0xc300, 0xc3ff).m(m_c300bank, FUNC(address_map_bank_device::amap8));
map(0xc400, 0xc7ff).m(m_c400bank, FUNC(address_map_bank_device::amap8));
@@ -3119,7 +3119,7 @@ void apple2e_state::apple2c_memexp_map(address_map &map)
map(0xc000, 0xc07f).rw(FUNC(apple2e_state::c000_iic_r), FUNC(apple2e_state::c000_iic_w));
map(0xc080, 0xc0ff).rw(FUNC(apple2e_state::c080_r), FUNC(apple2e_state::c080_w));
map(0xc098, 0xc09b).rw(m_acia1, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
- map(0xc0a8, 0xc0ab).rw(IIC_ACIA2_TAG, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
+ map(0xc0a8, 0xc0ab).rw(m_acia2, FUNC(mos6551_device::read), FUNC(mos6551_device::write));
map(0xc0c0, 0xc0c3).rw(FUNC(apple2e_state::memexp_r), FUNC(apple2e_state::memexp_w));
map(0xc100, 0xc2ff).m(m_c100bank, FUNC(address_map_bank_device::amap8));
map(0xc300, 0xc3ff).m(m_c300bank, FUNC(address_map_bank_device::amap8));
@@ -3352,11 +3352,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2e_state::ay3600_repeat)
static INPUT_PORTS_START( apple2_sysconfig )
PORT_START("a2_config")
- PORT_CONFNAME(0x03, 0x00, "Composite monitor type")
+ PORT_CONFNAME(0x07, 0x00, "Monitor type")
PORT_CONFSETTING(0x00, "Color")
PORT_CONFSETTING(0x01, "B&W")
PORT_CONFSETTING(0x02, "Green")
PORT_CONFSETTING(0x03, "Amber")
+ PORT_CONFSETTING(0x04, "Video-7 RGB")
PORT_CONFNAME(0x10, 0x00, "CPU type")
PORT_CONFSETTING(0x00, "Standard")
@@ -4691,10 +4692,12 @@ void apple2e_state::apple2c(machine_config &config)
MOS6551(config, m_acia1, 0);
m_acia1->set_xtal(XTAL(14'318'181) / 8); // ~1.789 MHz
m_acia1->txd_handler().set(PRINTER_PORT_TAG, FUNC(rs232_port_device::write_txd));
+ m_acia1->irq_handler().set(FUNC(apple2e_state::a2bus_irq_w));
MOS6551(config, m_acia2, 0);
- m_acia2->set_xtal(XTAL(1'843'200)); // matches SSC so modem software is compatible
+ m_acia2->set_xtal(1.8432_MHz_XTAL); // matches SSC so modem software is compatible
m_acia2->txd_handler().set("modem", FUNC(rs232_port_device::write_txd));
+ m_acia2->irq_handler().set(FUNC(apple2e_state::a2bus_irq_w));
rs232_port_device &printer(RS232_PORT(config, PRINTER_PORT_TAG, default_rs232_devices, nullptr));
printer.rxd_handler().set(m_acia1, FUNC(mos6551_device::write_rxd));
diff --git a/src/mame/drivers/cit101.cpp b/src/mame/drivers/cit101.cpp
index d5c2468bb97..15997a93876 100644
--- a/src/mame/drivers/cit101.cpp
+++ b/src/mame/drivers/cit101.cpp
@@ -68,10 +68,12 @@ class cit101_state : public driver_device
public:
cit101_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
, m_screen(*this, "screen")
, m_nvr(*this, "nvr")
, m_comuart(*this, "comuart")
, m_kbduart(*this, "kbduart")
+ , m_rombank(*this, "rombank")
, m_chargen(*this, "chargen")
, m_mainram(*this, "mainram")
, m_extraram(*this, "extraram")
@@ -88,6 +90,8 @@ private:
void draw_line(uint32_t *pixptr, int minx, int maxx, int line, bool last_line, u16 rowaddr, u16 rowattr, u8 scrattr);
u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ u8 bank_switch_r(offs_t offset);
+
u8 c000_ram_r(offs_t offset);
void c000_ram_w(offs_t offset, u8 data);
u8 e0_latch_r();
@@ -101,6 +105,7 @@ private:
void nvr_control_w(u8 data);
void mem_map(address_map &map);
+ void mem_map_101e(address_map &map);
void io_map(address_map &map);
u8 m_e0_latch;
@@ -108,10 +113,12 @@ private:
bool m_blink;
u8 m_brightness;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<er2055_device> m_nvr;
required_device<i8251_device> m_comuart;
required_device<i8251_device> m_kbduart;
+ optional_memory_bank m_rombank;
required_region_ptr<u8> m_chargen;
required_shared_ptr<u8> m_mainram;
required_shared_ptr<u8> m_extraram;
@@ -120,6 +127,12 @@ private:
void cit101_state::machine_start()
{
+ if (m_rombank.found())
+ {
+ m_rombank->configure_entries(0, 8, memregion("banked")->base(), 0x1000);
+ m_rombank->set_entry(0);
+ }
+
m_comuart->write_cts(0);
m_kbduart->write_cts(0);
@@ -220,6 +233,14 @@ u32 cit101_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, con
}
+u8 cit101_state::bank_switch_r(offs_t offset)
+{
+ if (!machine().side_effects_disabled())
+ m_rombank->set_entry(offset);
+
+ return 0xc9; // RET
+}
+
u8 cit101_state::c000_ram_r(offs_t offset)
{
if (!machine().side_effects_disabled())
@@ -303,6 +324,23 @@ void cit101_state::mem_map(address_map &map)
map(0xfcc0, 0xfcc3).w("pit1", FUNC(pit8253_device::write));
}
+void cit101_state::mem_map_101e(address_map &map)
+{
+ map(0x0000, 0x2fff).rom().region("maincpu", 0);
+ map(0x3000, 0x3ff7).bankr("rombank");
+ map(0x3ff8, 0x3fff).r(FUNC(cit101_state::bank_switch_r));
+ map(0x4000, 0x7fff).ram().share("mainram");
+ map(0x8000, 0xbfff).ram().share("extraram"); // 6 bits wide here?
+ map(0x8000, 0x8000).w(FUNC(cit101_state::screen_control_w));
+ map(0xc000, 0xdfff).rw(FUNC(cit101_state::c000_ram_r), FUNC(cit101_state::c000_ram_w));
+ map(0xfc00, 0xfc01).rw("auxuart", FUNC(i8251_device::read), FUNC(i8251_device::write));
+ map(0xfc20, 0xfc21).rw("comuart", FUNC(i8251_device::read), FUNC(i8251_device::write));
+ map(0xfc40, 0xfc41).rw("kbduart", FUNC(i8251_device::read), FUNC(i8251_device::write));
+ map(0xfc60, 0xfc63).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xfc80, 0xfc83).w("pit0", FUNC(pit8253_device::write));
+ map(0xfcc0, 0xfcc3).w("pit1", FUNC(pit8253_device::write));
+}
+
void cit101_state::io_map(address_map &map)
{
map(0x00, 0x01).rw("auxuart", FUNC(i8251_device::read), FUNC(i8251_device::write));
@@ -314,17 +352,17 @@ void cit101_state::io_map(address_map &map)
}
-static INPUT_PORTS_START( cit101 )
+static INPUT_PORTS_START(cit101)
INPUT_PORTS_END
void cit101_state::cit101(machine_config &config)
{
- i8085a_cpu_device &maincpu(I8085A(config, "maincpu", 6.144_MHz_XTAL));
- maincpu.set_addrmap(AS_PROGRAM, &cit101_state::mem_map);
- maincpu.set_addrmap(AS_IO, &cit101_state::io_map);
- maincpu.in_sid_func().set_constant(0); // used to time NVR reads
- maincpu.out_sod_func().set(FUNC(cit101_state::blink_w));
+ I8085A(config, m_maincpu, 6.144_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cit101_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &cit101_state::io_map);
+ m_maincpu->in_sid_func().set_constant(0); // used to time NVR reads
+ m_maincpu->out_sod_func().set(FUNC(cit101_state::blink_w));
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
//m_screen->set_raw(14.976_MHz_XTAL, 960, 0, 800, 260, 0, 240);
@@ -397,6 +435,8 @@ void cit101_state::cit101e(machine_config &config)
{
cit101(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cit101_state::mem_map_101e);
+
//m_screen->set_raw(19.6608_MHz_XTAL, 1000, 0, 800, 300, 0, 240); // 65.3 Hz nominal vertical frequency
m_screen->set_raw(27.956_MHz_XTAL, 1476, 0, 1188, 300, 0, 240); // 63.2 Hz nominal vertical frequency
@@ -434,10 +474,12 @@ ROM_END
// Peripherals: 3x NEC D8251AFC (7M, 7N, 7R); 2x NEC D8253C-2 (7J, 7K); NEC D8255AC-2 (6N); GI ER-2055 (5R)
// Oscillators: 19.6608 (XTAL1), 27.956 (XTAL2), 6.144 (XTAL3)
ROM_START(cit101e)
- ROM_REGION(0x5000, "maincpu", 0)
+ ROM_REGION(0x3000, "maincpu", 0)
ROM_LOAD("101e_v12c__12.7a", 0x0000, 0x2000, CRC(bc71ad27) SHA1(e61481752e20b115531b76688242691d265853e7))
ROM_LOAD("101e_v12c__3.7c", 0x2000, 0x1000, CRC(b4c63dd1) SHA1(aff9bd8e79e83c176c882fa3251a1419a283e753))
- ROM_LOAD("101e_v12c__ab.7f", 0x3000, 0x2000, CRC(6d6bc1ee) SHA1(f42596b379bfda0468045d9e3810a1f0990f76f6))
+
+ ROM_REGION(0x8000, "banked", ROMREGION_ERASEFF)
+ ROM_LOAD("101e_v12c__ab.7f", 0x0000, 0x2000, CRC(6d6bc1ee) SHA1(f42596b379bfda0468045d9e3810a1f0990f76f6))
ROM_REGION(0x1000, "chargen", 0)
ROM_LOAD("cit-101e_char_gen.3g", 0x0000, 0x1000, CRC(ccf259b4) SHA1(d918f16ce148c813a865280a43a766983673464a)) // position labeled 2732/2332
diff --git a/src/mame/drivers/dai.cpp b/src/mame/drivers/dai.cpp
index 7bc2af9a8e2..5cc6d97261f 100644
--- a/src/mame/drivers/dai.cpp
+++ b/src/mame/drivers/dai.cpp
@@ -63,26 +63,21 @@ Timings:
#include "emu.h"
#include "includes/dai.h"
#include "screen.h"
-#include "softlist.h"
#include "speaker.h"
-/* I/O ports */
-void dai_state::dai_io(address_map &map)
-{
-}
/* memory w/r functions */
-void dai_state::dai_mem(address_map &map)
+void dai_state::mem_map(address_map &map)
{
- map(0x0000, 0xbfff).bankrw("bank1");
- map(0xc000, 0xdfff).rom();
+ map(0x0000, 0xbfff).ram().share("mainram");
+ map(0xc000, 0xdfff).rom().region("maincpu",0);
map(0xe000, 0xefff).bankr("bank2");
- map(0xf000, 0xf7ff).w(FUNC(dai_state::dai_stack_interrupt_circuit_w));
+ map(0xf000, 0xf7ff).w(FUNC(dai_state::stack_interrupt_circuit_w));
map(0xf800, 0xf8ff).ram();
- map(0xfb00, 0xfbff).rw(FUNC(dai_state::dai_amd9511_r), FUNC(dai_state::dai_amd9511_w));
- map(0xfc00, 0xfcff).rw(FUNC(dai_state::dai_pit_r), FUNC(dai_state::dai_pit_w)); // .rw("pit8253", FUNC(pit8253_device::read), FUNC(pit8253_device::write));
- map(0xfd00, 0xfdff).rw(FUNC(dai_state::dai_io_discrete_devices_r), FUNC(dai_state::dai_io_discrete_devices_w));
- map(0xfe00, 0xfeff).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xfb00, 0xfbff).rw(FUNC(dai_state::amd9511_r), FUNC(dai_state::amd9511_w));
+ map(0xfc00, 0xfcff).rw(FUNC(dai_state::pit_r), FUNC(dai_state::pit_w)); // .rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write));
+ map(0xfd00, 0xfdff).rw(FUNC(dai_state::io_discrete_devices_r), FUNC(dai_state::io_discrete_devices_w));
+ map(0xfe00, 0xfeff).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xff00, 0xff0f).mirror(0xf0).m(m_tms5501, FUNC(tms5501_device::io_map));
}
@@ -183,7 +178,7 @@ static const gfx_layout dai_charlayout =
};
static GFXDECODE_START( gfx_dai )
- GFXDECODE_ENTRY( "gfx1", 0x0000, dai_charlayout, 0, 8 )
+ GFXDECODE_ENTRY( "chargen", 0x0000, dai_charlayout, 0, 8 )
GFXDECODE_END
/* machine definition */
@@ -191,8 +186,7 @@ void dai_state::dai(machine_config &config)
{
/* basic machine hardware */
I8080(config, m_maincpu, 2000000);
- m_maincpu->set_addrmap(AS_PROGRAM, &dai_state::dai_mem);
- m_maincpu->set_addrmap(AS_IO, &dai_state::dai_io);
+ m_maincpu->set_addrmap(AS_PROGRAM, &dai_state::mem_map);
m_maincpu->set_irq_acknowledge_callback(FUNC(dai_state::int_ack));
config.set_maximum_quantum(attotime::from_hz(60));
@@ -204,7 +198,7 @@ void dai_state::dai(machine_config &config)
m_pit->set_clk<2>(2000000);
m_pit->out_handler<2>().set(m_sound, FUNC(dai_sound_device::set_input_ch2));
- I8255(config, "ppi8255");
+ I8255(config, "ppi");
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
@@ -212,7 +206,7 @@ void dai_state::dai(machine_config &config)
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_size(1056, 542);
screen.set_visarea(0, 1056-1, 0, 302-1);
- screen.set_screen_update(FUNC(dai_state::screen_update_dai));
+ screen.set_screen_update(FUNC(dai_state::screen_update));
screen.set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_dai);
@@ -234,11 +228,8 @@ void dai_state::dai(machine_config &config)
/* tms5501 */
TMS5501(config, m_tms5501, 2000000);
m_tms5501->int_callback().set_inputline("maincpu", I8085_INTR_LINE);
- m_tms5501->xi_callback().set(FUNC(dai_state::dai_keyboard_r));
- m_tms5501->xo_callback().set(FUNC(dai_state::dai_keyboard_w));
-
- /* internal ram */
- RAM(config, RAM_TAG).set_default_size("48K");
+ m_tms5501->xi_callback().set(FUNC(dai_state::keyboard_r));
+ m_tms5501->xo_callback().set(FUNC(dai_state::keyboard_w));
/* software lists */
SOFTWARE_LIST(config, "cass_list").set_original("dai_cass");
@@ -246,15 +237,16 @@ void dai_state::dai(machine_config &config)
ROM_START(dai)
- ROM_REGION(0x14000,"maincpu",0)
- ROM_LOAD("dai.bin", 0xc000, 0x2000, CRC(ca71a7d5) SHA1(6bbe2336c717354beab2ae201debeb4fd055bdcb))
- ROM_LOAD("dai00.bin", 0x10000, 0x1000, CRC(fa7d39ac) SHA1(3d1824a1f273882f934249ef3cb1b38ef99de7b9))
- ROM_LOAD("dai01.bin", 0x11000, 0x1000, CRC(cb5809f2) SHA1(523656f0a9d98888cd3e2bd66886c589e9ae75b4))
- ROM_LOAD("dai02.bin", 0x12000, 0x1000, CRC(03f72d4a) SHA1(573d65dc82321970dcaf81d7638a02252ea18a7a))
- ROM_LOAD("dai03.bin", 0x13000, 0x1000, CRC(c475c96f) SHA1(96fc3cc4b8a2873f0d044bd8033d1e7b7197dd97))
- ROM_REGION(0x2000, "gfx1",0)
+ ROM_REGION(0x6000,"maincpu",0)
+ ROM_LOAD("dai.bin", 0x0000, 0x2000, CRC(ca71a7d5) SHA1(6bbe2336c717354beab2ae201debeb4fd055bdcb))
+ ROM_LOAD("dai00.bin", 0x2000, 0x1000, CRC(fa7d39ac) SHA1(3d1824a1f273882f934249ef3cb1b38ef99de7b9))
+ ROM_LOAD("dai01.bin", 0x3000, 0x1000, CRC(cb5809f2) SHA1(523656f0a9d98888cd3e2bd66886c589e9ae75b4))
+ ROM_LOAD("dai02.bin", 0x4000, 0x1000, CRC(03f72d4a) SHA1(573d65dc82321970dcaf81d7638a02252ea18a7a))
+ ROM_LOAD("dai03.bin", 0x5000, 0x1000, CRC(c475c96f) SHA1(96fc3cc4b8a2873f0d044bd8033d1e7b7197dd97))
+
+ ROM_REGION(0x2000, "chargen",0)
ROM_LOAD ("nch.bin", 0x0000, 0x1000, CRC(a9f5b30b) SHA1(24119b2984ab4e50dc0dabae1065ff6d6c1f237d))
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
-COMP( 1978, dai, 0, 0, dai, dai, dai_state, empty_init, "Data Applications International", "DAI Personal Computer", 0)
+COMP( 1978, dai, 0, 0, dai, dai, dai_state, empty_init, "Data Applications International", "DAI Personal Computer", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp
index 34234fbd365..5db2802f8e7 100644
--- a/src/mame/drivers/midvunit.cpp
+++ b/src/mame/drivers/midvunit.cpp
@@ -1450,6 +1450,19 @@ ROM_START( crusnusa21 ) /* Version 2.1, Wed Nov 09 1994 - 16:28:10 */
ROM_END
+/*
+Some Cruis'n World PCBs have mask ROMs for the data ROMs
+
+Mask ROMs are in the following format:
+-------------------------------- --------------------------------
+| MIDWAY GAMES INC | | MIDWAY GAMES INC |
+| CRUISN WORLD | | CRUISN WORLD |
+) 5341-15282-01 | ) 5341-15287-01 |
+| U3 SOUND | | U14 VIDEO IMAGE |
+| (C)1996 MIDWAY GAMES | | (C)1996 MIDWAY GAMES |
+-------------------------------- --------------------------------
+
+*/
ROM_START( crusnwld ) /* Version 2.5, Wed Nov 04 1998 - 15:50:52 */
ROM_REGION16_LE( 0x1000000, "dcs", ROMREGION_ERASEFF ) /* sound data */
ROM_LOAD16_BYTE( "1.0_cruisn_world_u2_sound.u2", 0x000000, 0x80000, CRC(7a233c89) SHA1(ecfad4bc48a69cd3399e3b3266c81574082e0169) )
diff --git a/src/mame/drivers/nes_sh6578.cpp b/src/mame/drivers/nes_sh6578.cpp
index b8c39561109..497884a1bf1 100644
--- a/src/mame/drivers/nes_sh6578.cpp
+++ b/src/mame/drivers/nes_sh6578.cpp
@@ -729,4 +729,5 @@ CONS( 200?, maxx5in1, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_state, init_ne
CONS( 200?, maxx6in1, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_state, init_nes_sh6578, "Senario", "Vs Maxx 6-in-1 Casino / Senario Card & Casino Games", 0 ) // advertised on box as "With Texas Hold 'Em" (which is the added game since the 5-in-1)
-CONS( 200?, max10in1, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_max10in1_state, init_nes_sh6578, "Senario", "Vs Maxx 10-in-1 Casino / Senario Card & Casino Games", 0 ) \ No newline at end of file
+CONS( 200?, max10in1, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_max10in1_state, init_nes_sh6578, "Senario", "Vs Maxx 10-in-1 Casino / Senario Card & Casino Games", 0 )
+
diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp
index 8aa36c20609..798fd564d4d 100644
--- a/src/mame/drivers/odyssey2.cpp
+++ b/src/mame/drivers/odyssey2.cpp
@@ -5,9 +5,14 @@
Driver file to handle emulation of the Odyssey2.
TODO:
+- odyssey3 cpu/video should have different clocks
+- 4in1(4 in a row)/musician needs a new mappertype to work: 3KB program ROM
+ and 1KB bankswitched data ROM
- backgam does not work, it only shows the background graphics
- chess has graphics issues near the screen borders: missing A-H at bottom,
rightmost column is not erased properly, wrongly places chars at top
+- qbert has major graphics problems, similar to chess?
+- missing questionmark graphics in turtles
- homecomp does not work, needs new slot device
- a lot more issues, probably, this TODO list was written by someone with
no knowledge on odyssey2
@@ -41,9 +46,9 @@ public:
m_joysticks(*this, "JOY.%u", 0)
{ }
- void odyssey2_cartslot(machine_config &config);
- void videopac(machine_config &config);
void odyssey2(machine_config &config);
+ void videopac(machine_config &config);
+ void videopacf(machine_config &config);
void init_odyssey2();
@@ -676,18 +681,10 @@ GFXDECODE_END
-void odyssey2_state::odyssey2_cartslot(machine_config &config)
-{
- O2_CART_SLOT(config, m_cart, o2_cart, nullptr);
-
- SOFTWARE_LIST(config, "cart_list").set_original("odyssey2");
-}
-
-
void odyssey2_state::odyssey2(machine_config &config)
{
/* basic machine hardware */
- I8048(config, m_maincpu, ((XTAL(7'159'090) * 3) / 4));
+ I8048(config, m_maincpu, (XTAL(7'159'090) * 3) / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &odyssey2_state::odyssey2_mem);
m_maincpu->set_addrmap(AS_IO, &odyssey2_state::odyssey2_io);
m_maincpu->p1_in_cb().set(FUNC(odyssey2_state::p1_read));
@@ -699,62 +696,48 @@ void odyssey2_state::odyssey2(machine_config &config)
m_maincpu->t0_in_cb().set("cartslot", FUNC(o2_cart_slot_device::t0_read));
m_maincpu->t1_in_cb().set(FUNC(odyssey2_state::t1_read));
- config.set_maximum_quantum(attotime::from_hz(60));
-
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
- PALETTE(config, "palette", FUNC(odyssey2_state::odyssey2_palette), 32);
+ PALETTE(config, "palette", FUNC(odyssey2_state::odyssey2_palette), 16);
- /* sound hardware */
SPEAKER(config, "mono").front_center();
- I8244(config, m_i8244, XTAL(7'159'090)/2 * 2);
+ I8244(config, m_i8244, XTAL(7'159'090) / 2);
m_i8244->set_screen("screen");
m_i8244->irq_cb().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
m_i8244->postprocess_cb().set(FUNC(odyssey2_state::scanline_postprocess));
m_i8244->add_route(ALL_OUTPUTS, "mono", 0.40);
- odyssey2_cartslot(config);
+ /* cartridge */
+ O2_CART_SLOT(config, m_cart, o2_cart, nullptr);
+ SOFTWARE_LIST(config, "cart_list").set_original("odyssey2");
}
-
void odyssey2_state::videopac(machine_config &config)
{
- /* basic machine hardware */
- I8048(config, m_maincpu, (XTAL(17'734'470) / 3));
- m_maincpu->set_addrmap(AS_PROGRAM, &odyssey2_state::odyssey2_mem);
- m_maincpu->set_addrmap(AS_IO, &odyssey2_state::odyssey2_io);
- m_maincpu->p1_in_cb().set(FUNC(odyssey2_state::p1_read));
- m_maincpu->p1_out_cb().set(FUNC(odyssey2_state::p1_write));
- m_maincpu->p2_in_cb().set(FUNC(odyssey2_state::p2_read));
- m_maincpu->p2_out_cb().set(FUNC(odyssey2_state::p2_write));
- m_maincpu->bus_in_cb().set(FUNC(odyssey2_state::bus_read));
- m_maincpu->bus_out_cb().set(FUNC(odyssey2_state::bus_write));
- m_maincpu->t0_in_cb().set("cartslot", FUNC(o2_cart_slot_device::t0_read));
- m_maincpu->t1_in_cb().set(FUNC(odyssey2_state::t1_read));
-
- config.set_maximum_quantum(attotime::from_hz(60));
-
- /* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
- screen.set_palette("palette");
+ odyssey2(config);
- GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
- PALETTE(config, "palette", FUNC(odyssey2_state::odyssey2_palette), 16);
+ // different master XTAL
+ m_maincpu->set_clock(XTAL(17'734'470) / 3);
- /* sound hardware */
- SPEAKER(config, "mono").front_center();
- I8245(config, m_i8244, XTAL(17'734'470)/5 * 2);
+ // PAL video chip
+ I8245(config.replace(), m_i8244, XTAL(17'734'470) / 5);
m_i8244->set_screen("screen");
m_i8244->irq_cb().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
m_i8244->postprocess_cb().set(FUNC(odyssey2_state::scanline_postprocess));
m_i8244->add_route(ALL_OUTPUTS, "mono", 0.40);
+}
+
+void odyssey2_state::videopacf(machine_config &config)
+{
+ videopac(config);
- odyssey2_cartslot(config);
+ // different master XTAL
+ m_maincpu->set_clock(XTAL(17'812'000) / 3);
+ m_i8244->set_clock(XTAL(17'812'000) / 5);
}
@@ -774,8 +757,6 @@ void g7400_state::g7400(machine_config &config)
m_maincpu->t1_in_cb().set(FUNC(g7400_state::t1_read));
m_maincpu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
- config.set_maximum_quantum(attotime::from_hz(60));
-
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
@@ -790,109 +771,77 @@ void g7400_state::g7400(machine_config &config)
m_i8243->p6_out_cb().set(FUNC(g7400_state::i8243_p6_w));
m_i8243->p7_out_cb().set(FUNC(g7400_state::i8243_p7_w));
- EF9340_1(config, m_ef9340_1, 3540000, "screen");
+ EF9340_1(config, m_ef9340_1, XTAL(8'867'000)/5 * 2, "screen");
SPEAKER(config, "mono").front_center();
- I8245(config, m_i8244, 3540000 * 2);
+ I8245(config, m_i8244, XTAL(8'867'000)/5 * 2);
m_i8244->set_screen("screen");
m_i8244->irq_cb().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
m_i8244->postprocess_cb().set(FUNC(g7400_state::scanline_postprocess));
m_i8244->add_route(ALL_OUTPUTS, "mono", 0.40);
- odyssey2_cartslot(config);
- SOFTWARE_LIST(config.replace(), "cart_list").set_original("g7400");
+ /* cartridge */
+ O2_CART_SLOT(config, m_cart, o2_cart, nullptr);
+ SOFTWARE_LIST(config, "cart_list").set_original("g7400");
SOFTWARE_LIST(config, "ody2_list").set_compatible("odyssey2");
}
-
void g7400_state::odyssey3(machine_config &config)
{
- /* basic machine hardware */
- I8048(config, m_maincpu, XTAL(5'911'000));
- m_maincpu->set_addrmap(AS_PROGRAM, &g7400_state::odyssey2_mem);
- m_maincpu->set_addrmap(AS_IO, &g7400_state::g7400_io);
- m_maincpu->p1_in_cb().set(FUNC(g7400_state::p1_read));
- m_maincpu->p1_out_cb().set(FUNC(g7400_state::p1_write));
- m_maincpu->p2_in_cb().set(FUNC(g7400_state::p2_read));
- m_maincpu->p2_out_cb().set(FUNC(g7400_state::p2_write));
- m_maincpu->bus_in_cb().set(FUNC(g7400_state::bus_read));
- m_maincpu->bus_out_cb().set(FUNC(g7400_state::bus_write));
- m_maincpu->t0_in_cb().set("cartslot", FUNC(o2_cart_slot_device::t0_read));
- m_maincpu->t1_in_cb().set(FUNC(g7400_state::t1_read));
- m_maincpu->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w));
-
- config.set_maximum_quantum(attotime::from_hz(60));
-
- /* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
- screen.set_palette("palette");
-
- GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
- PALETTE(config, "palette", FUNC(g7400_state::g7400_palette), 16);
+ g7400(config);
- I8243(config, m_i8243);
- m_i8243->p4_out_cb().set(FUNC(g7400_state::i8243_p4_w));
- m_i8243->p5_out_cb().set(FUNC(g7400_state::i8243_p5_w));
- m_i8243->p6_out_cb().set(FUNC(g7400_state::i8243_p6_w));
- m_i8243->p7_out_cb().set(FUNC(g7400_state::i8243_p7_w));
-
- EF9340_1(config, m_ef9340_1, 3540000, "screen");
-
- SPEAKER(config, "mono").front_center();
- I8244(config, m_i8244, 3540000 * 2);
+ // NTSC video chip
+ I8244(config.replace(), m_i8244, XTAL(8'867'000)/5 * 2);
m_i8244->set_screen("screen");
m_i8244->irq_cb().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
m_i8244->postprocess_cb().set(FUNC(g7400_state::scanline_postprocess));
m_i8244->add_route(ALL_OUTPUTS, "mono", 0.40);
-
- odyssey2_cartslot(config);
- SOFTWARE_LIST(config.replace(), "cart_list").set_original("g7400");
- SOFTWARE_LIST(config, "ody2_list").set_compatible("odyssey2");
}
ROM_START (odyssey2)
- ROM_REGION(0x10000,"maincpu",0) /* safer for the memory handler/bankswitching??? */
+ ROM_REGION(0x0400,"maincpu",0)
ROM_LOAD ("o2bios.rom", 0x0000, 0x0400, CRC(8016a315) SHA1(b2e1955d957a475de2411770452eff4ea19f4cee))
ROM_REGION(0x100, "gfx1", ROMREGION_ERASEFF)
ROM_END
-
ROM_START (videopac)
- ROM_REGION(0x10000,"maincpu",0) /* safer for the memory handler/bankswitching??? */
- ROM_SYSTEM_BIOS( 0, "g7000", "g7000" )
- ROMX_LOAD ("o2bios.rom", 0x0000, 0x0400, CRC(8016a315) SHA1(b2e1955d957a475de2411770452eff4ea19f4cee), ROM_BIOS(0))
- ROM_SYSTEM_BIOS( 1, "c52", "c52" )
- ROMX_LOAD ("c52.bin", 0x0000, 0x0400, CRC(a318e8d6) SHA1(a6120aed50831c9c0d95dbdf707820f601d9452e), ROM_BIOS(1))
+ ROM_REGION(0x0400,"maincpu",0)
+ ROM_LOAD ("o2bios.rom", 0x0000, 0x0400, CRC(8016a315) SHA1(b2e1955d957a475de2411770452eff4ea19f4cee))
+ ROM_REGION(0x100, "gfx1", ROMREGION_ERASEFF)
+ROM_END
+
+ROM_START (videopacf)
+ ROM_REGION(0x0400,"maincpu",0)
+ ROM_LOAD ("c52.rom", 0x0000, 0x0400, CRC(a318e8d6) SHA1(a6120aed50831c9c0d95dbdf707820f601d9452e))
ROM_REGION(0x100, "gfx1", ROMREGION_ERASEFF)
ROM_END
ROM_START (g7400)
- ROM_REGION(0x10000,"maincpu",0) /* safer for the memory handler/bankswitching??? */
+ ROM_REGION(0x0400,"maincpu",0)
ROM_LOAD ("g7400.bin", 0x0000, 0x0400, CRC(e20a9f41) SHA1(5130243429b40b01a14e1304d0394b8459a6fbae))
ROM_REGION(0x100, "gfx1", ROMREGION_ERASEFF)
ROM_END
-
ROM_START (jopac)
- ROM_REGION(0x10000,"maincpu",0) /* safer for the memory handler/bankswitching??? */
+ ROM_REGION(0x0400,"maincpu",0)
ROM_LOAD ("jopac.bin", 0x0000, 0x0400, CRC(11647ca5) SHA1(54b8d2c1317628de51a85fc1c424423a986775e4))
ROM_REGION(0x100, "gfx1", ROMREGION_ERASEFF)
ROM_END
-
ROM_START (odyssey3)
- ROM_REGION(0x10000, "maincpu", 0)
+ ROM_REGION(0x0400, "maincpu", 0)
ROM_LOAD ("odyssey3.bin", 0x0000, 0x0400, CRC(e2b23324) SHA1(0a38c5f2cea929d2fe0a23e5e1a60de9155815dc))
-
ROM_REGION(0x100, "gfx1", ROMREGION_ERASEFF)
ROM_END
-/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1978, odyssey2, 0, 0, odyssey2, odyssey2, odyssey2_state, init_odyssey2, "Magnavox", "Odyssey 2", 0 )
-COMP( 1979, videopac, odyssey2, 0, videopac, odyssey2, odyssey2_state, init_odyssey2, "Philips", "Videopac G7000/C52", 0 )
-COMP( 1983, g7400, odyssey2, 0, g7400, odyssey2, g7400_state, init_odyssey2, "Philips", "Videopac Plus G7400", MACHINE_IMPERFECT_GRAPHICS )
-COMP( 1983, jopac, odyssey2, 0, g7400, odyssey2, g7400_state, init_odyssey2, "Brandt", "Jopac JO7400", MACHINE_IMPERFECT_GRAPHICS )
-COMP( 1983, odyssey3, odyssey2, 0, odyssey3, odyssey2, g7400_state, init_odyssey2, "Magnavox", "Odyssey 3 Command Center (prototype)", MACHINE_IMPERFECT_GRAPHICS ) // USA version of G7400
+
+/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */
+COMP( 1978, odyssey2, 0, 0, odyssey2, odyssey2, odyssey2_state, init_odyssey2, "Magnavox", "Odyssey 2 (US)", 0 )
+COMP( 1979, videopac, odyssey2, 0, videopac, odyssey2, odyssey2_state, init_odyssey2, "Philips", "Videopac G7000 (Europe)", 0 )
+COMP( 1979, videopacf, odyssey2, 0, videopacf, odyssey2, odyssey2_state, init_odyssey2, "Philips", "Videopac C52 (France)", 0 )
+
+COMP( 1983, g7400, 0, 0, g7400, odyssey2, g7400_state, init_odyssey2, "Philips", "Videopac Plus G7400 (Europe)", MACHINE_IMPERFECT_GRAPHICS )
+COMP( 1983, jopac, g7400, 0, g7400, odyssey2, g7400_state, init_odyssey2, "Philips (Brandt license)", "Jopac JO7400 (France)", MACHINE_IMPERFECT_GRAPHICS )
+COMP( 1983, odyssey3, g7400, 0, odyssey3, odyssey2, g7400_state, init_odyssey2, "Magnavox", "Odyssey 3 Command Center (US, prototype)", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/tankbatt.cpp b/src/mame/drivers/tankbatt.cpp
index 8b7b2f127d0..daa014fc07c 100644
--- a/src/mame/drivers/tankbatt.cpp
+++ b/src/mame/drivers/tankbatt.cpp
@@ -6,49 +6,71 @@ Tank Battalion memory map (verified)
driver by Brad Oliver
-$0000-$000f : bullet ram, first entry is player's bullet
-$0010-$01ff : zero page & stack
-$0200-$07ff : RAM
-$0800-$0bff : videoram
-$0c00-$0c1f : I/O
-
-Read:
- $0c00-$0c03 : p1 joystick
- $0c04
- $0c07 : stop at grid self-test if bit 7 is low
- $0c0f : stop at first self-test if bit 7 is low
-
- $0c18 : Cabinet, 0 = table, 1 = upright
- $0c19-$0c1a : Coinage, 00 = free play, 01 = 2 coin 1 credit, 10 = 1 coin 2 credits, 11 = 1 coin 1 credit
- $0c1b-$0c1c : Bonus, 00 = 10000, 01 = 15000, 10 = 20000, 11 = none
- $0c1d : Tanks, 0 = 3, 1 = 2
- $0c1e-$0c1f : ??
-
-Write:
- $0c00-$0c01 : p1/p2 start leds
- $0c02 : ?? written to at end of IRQ, either 0 or 1 - coin counter?
- $0c03 : ?? written to during IRQ if grid test is on
- $0c08 : ?? written to during IRQ if grid test is on
- $0c09 : Sound - coin ding
- $0c0a : Sound enable (active low) ?? game only ??
- $0c0b : Sound - background noise, 0 - low rumble, 1 - high rumble
- $0c0c : Sound - player fire
- $0c0d : Sound - explosion
- $0c0f : NMI enable (active high) ?? demo only ??
-
- $0c10 : IRQ ack (written at the end of the irq routine)
- $0c18 : Watchdog
-
-$2000-$3fff : ROM (A14, A15 not decoded)
+Memory Map:
+ $0000-$03ff : Work RAM 0
+ $0400-$07ff : Work RAM 1
+ $0800-$0bff : VRAM
+ $0c00-$0fff : I/O
+ $2000-$3fff : ROM
+
+A 4-bit BCD value is created from the following four bits:
+ Bit 0: A3
+ Bit 1: A4
+ Bit 2: Read
+ Bit 3: !(A10 & A11)
+
+For writes, the following upper ranges are decoded:
+ xxxx 11xx xxx0 0xxx: OUT0
+ xxxx 11xx xxx0 1xxx: OUT1
+ xxxx 11xx xxx1 0xxx: INTACK
+ xxxx 11xx xxx1 1xxx: Watchdog
+
+For reads, the following upper ranges are decoded:
+ xxxx 11xx xxx0 0xxx: IN0
+ xxxx 11xx xxx0 1xxx: IN1
+ xxxx 11xx xxx1 0xxx: -
+ xxxx 11xx xxx1 1xxx: DIP switches
+
+OUT0:
+ 000: Edge Pin F P1 LED (schematic states Unused)
+ 001: Edge Pin 6 P2 LED (schematic states Unused)
+ 010: Edge Pin H Coin Counter (schematic states Unused)
+ 011: Edge Pin 7 Coin Lockout (schematic states Coin Counter)
+ 1xx: Unused
+
+OUT1:
+ 000: S1 (Square Wave 1, connected to 2V)
+ 001: S2 (Square Wave 2, connected to 4V)
+ 010: Sound off (1), on (0)
+ 011: Rumble hi (1), rumble low (0)
+ 100: Shoot sound effect
+ 101: Hit sound effect
+ 110: Unused
+ 111: NMI Enable
+
+IN0:
+ 000: Edge Pin Y Joystick Up
+ 001: Edge Pin M Joystick Left
+ 010: Edge Pin 14 Joystick Down
+ 011: Edge Pin 11 Joystick Right
+ 100: Edge Pin N Shoot
+ 101: Edge Pin J Coin 1
+ 110: Edge Pin 8 Coin 2
+ 111: Edge Pin 9 Service Switch
+
+IN1:
+ 000: Edge Pin 21 Joystick Up (Cocktail)
+ 001: Edge Pin P Joystick Left (Cocktail)
+ 010: Edge Pin V Joystick Down (Cocktail)
+ 011: Edge Pin 13 Joystick Right (Cocktail)
+ 100: Edge Pin 12 Shoot (Cocktail)
+ 101: Edge Pin L P1 Start
+ 110: Edge Pin 10 P2 Start
+ 111: Edge Pin K Test DIP Switch
TODO:
- . Needs proper discrete emulation
. Resistor values on the color prom need to be corrected
-Known issues:
- . The 'moving' tank rumble noise seems to keep playing a second too long
- . Sample support is all a crapshoot. I have no idea how it really works
-
***************************************************************************/
#include "emu.h"
@@ -58,7 +80,6 @@ Known issues:
#include "machine/74259.h"
#include "machine/input_merger.h"
#include "machine/watchdog.h"
-#include "sound/samples.h"
#include "screen.h"
#include "speaker.h"
@@ -70,62 +91,17 @@ void tankbatt_state::machine_start()
uint8_t tankbatt_state::in0_r(offs_t offset)
{
- int val;
-
- val = ioport("P1")->read();
- return ((val << (7 - offset)) & 0x80);
+ return BIT(m_player_input[0]->read(), offset) << 7;
}
uint8_t tankbatt_state::in1_r(offs_t offset)
{
- int val;
-
- val = ioport("P2")->read();
- return ((val << (7 - offset)) & 0x80);
+ return BIT(m_player_input[1]->read(), offset) << 7;
}
uint8_t tankbatt_state::dsw_r(offs_t offset)
{
- int val;
-
- val = ioport("DSW")->read();
- return ((val << (7 - offset)) & 0x80);
-}
-
-WRITE_LINE_MEMBER(tankbatt_state::sound_off_w)
-{
- m_sound_enable = !state;
-
- // turn off the engine noise
- if (state) m_samples->stop(2);
-}
-
-WRITE_LINE_MEMBER(tankbatt_state::sh_expl_w)
-{
- if (state) // rising edge
- {
- m_samples->start(1, 3);
- }
-}
-
-WRITE_LINE_MEMBER(tankbatt_state::sh_engine_w)
-{
- if (m_sound_enable)
- {
- if (state)
- m_samples->start(2, 2, true);
- else
- m_samples->start(2, 1, true);
- }
- else m_samples->stop(2);
-}
-
-WRITE_LINE_MEMBER(tankbatt_state::sh_fire_w)
-{
- if (state) // rising edge
- {
- m_samples->start(0, 0);
- }
+ return BIT(m_dips->read(), offset) << 7;
}
void tankbatt_state::intack_w(uint8_t data)
@@ -172,7 +148,7 @@ static INPUT_PORTS_START( tankbatt )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_START("P2") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
@@ -237,17 +213,6 @@ GFXDECODE_END
-static const char *const tankbatt_sample_names[] =
-{
- "*tankbatt",
- "fire",
- "engine1",
- "engine2",
- "explode1",
- nullptr /* end of array */
-};
-
-
void tankbatt_state::tankbatt(machine_config &config)
{
/* basic machine hardware */
@@ -268,12 +233,12 @@ void tankbatt_state::tankbatt(machine_config &config)
// Q4 through Q7 are not connected
cd4099_device &outlatch1(CD4099(config, "outlatch1")); // 4099 at 4H or 259 at 4J
- outlatch1.q_out_cb<0>().set_nop(); // TODO: S1 tone
- outlatch1.q_out_cb<1>().set_nop(); // TODO: S2 tone
- outlatch1.q_out_cb<2>().set(FUNC(tankbatt_state::sound_off_w));
- outlatch1.q_out_cb<3>().set(FUNC(tankbatt_state::sh_engine_w));
- outlatch1.q_out_cb<4>().set(FUNC(tankbatt_state::sh_fire_w));
- outlatch1.q_out_cb<5>().set(FUNC(tankbatt_state::sh_expl_w)); // bit 7 also set by ASL instruction
+ outlatch1.q_out_cb<0>().set(m_sound_s1, FUNC(netlist_mame_logic_input_device::write_line));
+ outlatch1.q_out_cb<1>().set(m_sound_s2, FUNC(netlist_mame_logic_input_device::write_line));
+ outlatch1.q_out_cb<2>().set(m_sound_off, FUNC(netlist_mame_logic_input_device::write_line));
+ outlatch1.q_out_cb<3>().set(m_sound_engine_hi, FUNC(netlist_mame_logic_input_device::write_line));
+ outlatch1.q_out_cb<4>().set(m_sound_shoot, FUNC(netlist_mame_logic_input_device::write_line));
+ outlatch1.q_out_cb<5>().set(m_sound_hit, FUNC(netlist_mame_logic_input_device::write_line));
// Q6 is not connected
outlatch1.q_out_cb<7>().set("nmigate", FUNC(input_merger_device::in_w<1>));
@@ -290,10 +255,18 @@ void tankbatt_state::tankbatt(machine_config &config)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- SAMPLES(config, m_samples);
- m_samples->set_channels(3);
- m_samples->set_samples_names(tankbatt_sample_names);
- m_samples->add_route(ALL_OUTPUTS, "mono", 0.25);
+ NETLIST_SOUND(config, "sound_nl", 48000)
+ .set_source(NETLIST_NAME(tankbatt))
+ .add_route(ALL_OUTPUTS, "mono", 1.0);
+
+ NETLIST_LOGIC_INPUT(config, "sound_nl:s1", "S1.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:s2", "S2.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:off", "OFF.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:engine_hi", "ENGINE_HI.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:shoot", "SHOOT.IN", 0);
+ NETLIST_LOGIC_INPUT(config, "sound_nl:hit", "HIT.IN", 0);
+
+ NETLIST_STREAM_OUTPUT(config, "sound_nl:cout0", 0, "R35.2").set_mult_offset(10000.0, 0.0);
}
diff --git a/src/mame/drivers/votrtnt.cpp b/src/mame/drivers/votrtnt.cpp
index 89de200b62d..74251ceb5dc 100644
--- a/src/mame/drivers/votrtnt.cpp
+++ b/src/mame/drivers/votrtnt.cpp
@@ -55,7 +55,7 @@ public:
private:
virtual void machine_reset() override;
- void _6802_mem(address_map &map);
+ void mem_map(address_map &map);
required_device<m6802_cpu_device> m_maincpu;
required_device<votrax_sc01_device> m_votrax;
@@ -81,13 +81,13 @@ private:
x 1 1 x * * * * * * * * * * * * R ROM (2332 4kx8 Mask ROM, inside potted brick)
*/
-void votrtnt_state::_6802_mem(address_map &map)
+void votrtnt_state::mem_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x03ff).mirror(0x9c00).ram(); /* RAM, 2114*2 (0x400 bytes) mirrored 4x */
map(0x2000, 0x2001).mirror(0x9ffe).rw("acia", FUNC(acia6850_device::read), FUNC(acia6850_device::write));
map(0x4000, 0x4000).mirror(0x9fff).w(m_votrax, FUNC(votrax_sc01_device::write));
- map(0x6000, 0x6fff).mirror(0x9000).rom(); /* ROM in potted block */
+ map(0x6000, 0x6fff).mirror(0x9000).rom().region("maincpu",0); /* ROM in potted block */
}
@@ -141,7 +141,7 @@ void votrtnt_state::votrtnt(machine_config &config)
/* basic machine hardware */
M6802(config, m_maincpu, 2.4576_MHz_XTAL); // 2.4576MHz XTAL, verified; divided by 4 inside the MC6802
m_maincpu->set_ram_enable(false);
- m_maincpu->set_addrmap(AS_PROGRAM, &votrtnt_state::_6802_mem);
+ m_maincpu->set_addrmap(AS_PROGRAM, &votrtnt_state::mem_map);
/* video hardware */
//config.set_default_layout(layout_votrtnt);
@@ -173,8 +173,8 @@ void votrtnt_state::votrtnt(machine_config &config)
******************************************************************************/
ROM_START(votrtnt)
- ROM_REGION(0x10000, "maincpu", 0)
- ROM_LOAD("cn49752n.bin", 0x6000, 0x1000, CRC(a44e1af3) SHA1(af83b9e84f44c126b24ee754a22e34ca992a8d3d)) /* 2332 mask rom inside potted brick */
+ ROM_REGION(0x1000, "maincpu", 0)
+ ROM_LOAD("cn49752n.bin", 0x0000, 0x1000, CRC(a44e1af3) SHA1(af83b9e84f44c126b24ee754a22e34ca992a8d3d)) /* 2332 mask rom inside potted brick */
ROM_END
@@ -183,4 +183,4 @@ ROM_END
******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, votrtnt_state, empty_init, "Votrax", "Type 'N Talk", 0 )
+COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, votrtnt_state, empty_init, "Votrax", "Type 'N Talk", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/dai.h b/src/mame/includes/dai.h
index ac99048d192..56b8612cf60 100644
--- a/src/mame/includes/dai.h
+++ b/src/mame/includes/dai.h
@@ -13,7 +13,6 @@
#include "audio/dai_snd.h"
#include "machine/i8255.h"
#include "machine/pit8253.h"
-#include "machine/ram.h"
#include "machine/tms5501.h"
#include "imagedev/cassette.h"
#include "emupal.h"
@@ -22,15 +21,17 @@
class dai_state : public driver_device
{
public:
- dai_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_pit(*this, "pit8253"),
- m_tms5501(*this, "tms5501"),
- m_sound(*this, "custom"),
- m_cassette(*this, "cassette"),
- m_ram(*this, RAM_TAG),
- m_palette(*this, "palette")
+ dai_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_pit(*this, "pit")
+ , m_tms5501(*this, "tms5501")
+ , m_sound(*this, "custom")
+ , m_cassette(*this, "cassette")
+ , m_rom(*this, "maincpu")
+ , m_ram(*this, "mainram")
+ , m_palette(*this, "palette")
+ , m_io_keyboard(*this, "IN%u", 0U)
{ }
void dai(machine_config &config);
@@ -38,46 +39,45 @@ public:
private:
enum
{
- TIMER_BOOTSTRAP,
TIMER_TMS5501
};
- required_device<cpu_device> m_maincpu;
- required_device<pit8253_device> m_pit;
- required_device<tms5501_device> m_tms5501;
- required_device<dai_sound_device> m_sound;
- required_device<cassette_image_device> m_cassette;
- required_device<ram_device> m_ram;
- required_device<palette_device> m_palette;
-
- uint8_t m_paddle_select;
- uint8_t m_paddle_enable;
- uint8_t m_cassette_motor[2];
- uint8_t m_keyboard_scan_mask;
- unsigned short m_4_colours_palette[4];
- void dai_stack_interrupt_circuit_w(uint8_t data);
- uint8_t dai_io_discrete_devices_r(offs_t offset);
- void dai_io_discrete_devices_w(offs_t offset, uint8_t data);
- uint8_t dai_amd9511_r();
- void dai_amd9511_w(offs_t offset, uint8_t data);
- uint8_t dai_pit_r(offs_t offset);
- void dai_pit_w(offs_t offset, uint8_t data);
- uint8_t dai_keyboard_r();
- void dai_keyboard_w(uint8_t data);
+ u8 m_paddle_select;
+ u8 m_paddle_enable;
+ u8 m_cassette_motor[2];
+ u8 m_keyboard_scan_mask;
+ u8 m_4_colours_palette[4];
+ void stack_interrupt_circuit_w(u8 data);
+ u8 io_discrete_devices_r(offs_t offset);
+ void io_discrete_devices_w(offs_t offset, u8 data);
+ u8 amd9511_r();
+ void amd9511_w(offs_t offset, u8 data);
+ u8 pit_r(offs_t offset);
+ void pit_w(offs_t offset, u8 data);
+ u8 keyboard_r();
+ void keyboard_w(u8 data);
void dai_palette(palette_device &palette) const;
- uint32_t screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void dai_update_memory(int dai_rom_bank);
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
IRQ_CALLBACK_MEMBER(int_ack);
- void dai_io(address_map &map);
- void dai_mem(address_map &map);
+ void mem_map(address_map &map);
static const rgb_t s_palette[16];
-protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ memory_passthrough_handler *m_rom_shadow_tap;
+ required_device<cpu_device> m_maincpu;
+ required_device<pit8253_device> m_pit;
+ required_device<tms5501_device> m_tms5501;
+ required_device<dai_sound_device> m_sound;
+ required_device<cassette_image_device> m_cassette;
+ required_region_ptr<u8> m_rom;
+ required_shared_ptr<u8> m_ram;
+ required_device<palette_device> m_palette;
+ required_ioport_array<9> m_io_keyboard;
};
diff --git a/src/mame/includes/tankbatt.h b/src/mame/includes/tankbatt.h
index 1617ceb8a52..c27436328e4 100644
--- a/src/mame/includes/tankbatt.h
+++ b/src/mame/includes/tankbatt.h
@@ -6,7 +6,11 @@
#pragma once
#include "machine/timer.h"
-#include "sound/samples.h"
+#include "machine/netlist.h"
+
+#include "netlist/nl_setup.h"
+#include "audio/nl_tankbatt.h"
+
#include "emupal.h"
#include "tilemap.h"
@@ -16,37 +20,49 @@ public:
tankbatt_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_samples(*this, "samples"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_bulletsram(*this, "bulletsram"),
- m_videoram(*this, "videoram")
+ m_videoram(*this, "videoram"),
+ m_player_input(*this, "P%u", 1U),
+ m_dips(*this, "DSW"),
+ m_sound_s1(*this, "sound_nl:s1"),
+ m_sound_s2(*this, "sound_nl:s2"),
+ m_sound_off(*this, "sound_nl:off"),
+ m_sound_engine_hi(*this, "sound_nl:engine_hi"),
+ m_sound_shoot(*this, "sound_nl:shoot"),
+ m_sound_hit(*this, "sound_nl:hit")
{ }
void tankbatt(machine_config &config);
private:
required_device<cpu_device> m_maincpu;
- required_device<samples_device> m_samples;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_bulletsram;
required_shared_ptr<uint8_t> m_videoram;
+ required_ioport_array<2> m_player_input;
+ required_ioport m_dips;
+
+ required_device<netlist_mame_logic_input_device> m_sound_s1;
+ required_device<netlist_mame_logic_input_device> m_sound_s2;
+ required_device<netlist_mame_logic_input_device> m_sound_off;
+ required_device<netlist_mame_logic_input_device> m_sound_engine_hi;
+ required_device<netlist_mame_logic_input_device> m_sound_shoot;
+ required_device<netlist_mame_logic_input_device> m_sound_hit;
+
int m_sound_enable;
tilemap_t *m_bg_tilemap;
uint8_t in0_r(offs_t offset);
uint8_t in1_r(offs_t offset);
uint8_t dsw_r(offs_t offset);
- DECLARE_WRITE_LINE_MEMBER(sound_off_w);
- DECLARE_WRITE_LINE_MEMBER(sh_expl_w);
- DECLARE_WRITE_LINE_MEMBER(sh_engine_w);
- DECLARE_WRITE_LINE_MEMBER(sh_fire_w);
void intack_w(uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(coincounter_w);
- DECLARE_WRITE_LINE_MEMBER(coinlockout_w);
+ void coincounter_w(int state);
+ void coinlockout_w(int state);
void videoram_w(offs_t offset, uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_interrupt);
diff --git a/src/mame/machine/cit101_kbd.cpp b/src/mame/machine/cit101_kbd.cpp
index 831b6040ba4..ca5b898ffad 100644
--- a/src/mame/machine/cit101_kbd.cpp
+++ b/src/mame/machine/cit101_kbd.cpp
@@ -14,7 +14,7 @@
modifiers encoded in the next two bits):
80 (No key pressed)
- 82 Set-Up
+ 82 Set-Up
83 Return (host may interpret this as CR or CR+LF)
84 Up
85 Down
diff --git a/src/mame/machine/dai.cpp b/src/mame/machine/dai.cpp
index 06cca62cf93..c569f898399 100644
--- a/src/mame/machine/dai.cpp
+++ b/src/mame/machine/dai.cpp
@@ -23,11 +23,8 @@ void dai_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
{
switch (id)
{
- case TIMER_BOOTSTRAP:
- m_maincpu->set_pc(0xc000);
- break;
case TIMER_TMS5501:
- m_tms5501->xi7_w((ioport("IN8")->read() & 0x04) ? 1:0);
+ m_tms5501->xi7_w(BIT(m_io_keyboard[8]->read(), 2));
timer_set(attotime::from_hz(100), TIMER_TMS5501);
break;
default:
@@ -41,33 +38,24 @@ void dai_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
/* Memory */
-void dai_state::dai_stack_interrupt_circuit_w(uint8_t data)
+void dai_state::stack_interrupt_circuit_w(uint8_t data)
{
m_tms5501->sens_w(1);
m_tms5501->sens_w(0);
}
-void dai_state::dai_update_memory(int dai_rom_bank)
-{
- membank("bank2")->set_entry(dai_rom_bank);
-}
-
-
-uint8_t dai_state::dai_keyboard_r()
+uint8_t dai_state::keyboard_r()
{
uint8_t data = 0x00;
- static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" };
- for (int i = 0; i < 8; i++)
- {
+ for (u8 i = 0; i < 8; i++)
if (m_keyboard_scan_mask & (1 << i))
- data |= ioport(keynames[i])->read();
- }
+ data |= m_io_keyboard[i]->read();
return data;
}
-void dai_state::dai_keyboard_w(uint8_t data)
+void dai_state::keyboard_w(uint8_t data)
{
m_keyboard_scan_mask = data;
}
@@ -79,16 +67,33 @@ IRQ_CALLBACK_MEMBER(dai_state::int_ack)
void dai_state::machine_start()
{
- membank("bank2")->configure_entries(0, 4, memregion("maincpu")->base() + 0x010000, 0x1000);
- timer_set(attotime::zero, TIMER_BOOTSTRAP);
+ membank("bank2")->configure_entries(0, 4, m_rom + 0x2000, 0x1000);
timer_set(attotime::from_hz(100), TIMER_TMS5501);
-
- memset(m_ram->pointer(), 0, m_ram->size());
+ save_item(NAME(m_paddle_select));
+ save_item(NAME(m_paddle_enable));
+ save_item(NAME(m_cassette_motor));
+ save_item(NAME(m_keyboard_scan_mask));
+ save_item(NAME(m_4_colours_palette));
}
void dai_state::machine_reset()
{
- membank("bank1")->set_base(m_ram->pointer());
+ address_space &program = m_maincpu->space(AS_PROGRAM);
+ program.install_rom(0x0000, 0x07ff, m_rom); // do it here for F3
+ m_rom_shadow_tap = program.install_read_tap(0xc000, 0xc7ff, "rom_shadow_r",[this](offs_t offset, u8 &data, u8 mem_mask)
+ {
+ if (!machine().side_effects_disabled())
+ {
+ // delete this tap
+ m_rom_shadow_tap->remove();
+
+ // reinstall ram over the rom shadow
+ m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x07ff, m_ram);
+ }
+
+ // return the original data
+ return data;
+ });
}
/***************************************************************************
@@ -120,13 +125,13 @@ void dai_state::machine_reset()
bit 6-7 ROM bank switching
***************************************************************************/
-uint8_t dai_state::dai_io_discrete_devices_r(offs_t offset)
+uint8_t dai_state::io_discrete_devices_r(offs_t offset)
{
- uint8_t data = 0x00;
+ uint8_t data = 0xff;
- switch(offset & 0x000f) {
- case 0x00:
- data = ioport("IN8")->read();
+ switch(offset & 0x0f) {
+ case 0:
+ data = m_io_keyboard[8]->read();
data |= 0x08; // serial ready
if (machine().rand()&0x01)
data |= 0x40; // random number generator
@@ -135,42 +140,40 @@ uint8_t dai_state::dai_io_discrete_devices_r(offs_t offset)
break;
default:
- data = 0xff;
LOG_DAI_PORT_R (offset, data, "discrete devices - unmapped");
-
break;
}
return data;
}
-void dai_state::dai_io_discrete_devices_w(offs_t offset, uint8_t data)
+void dai_state::io_discrete_devices_w(offs_t offset, uint8_t data)
{
switch(offset & 0x000f) {
case 0x04:
m_sound->set_volume(offset, data);
LOG_DAI_PORT_W (offset, data&0x0f, "discrete devices - osc. 0 volume");
- LOG_DAI_PORT_W (offset, (data&0xf0)>>4, "discrete devices - osc. 1 volume");
+ LOG_DAI_PORT_W (offset, BIT(data, 4, 4), "discrete devices - osc. 1 volume");
break;
case 0x05:
m_sound->set_volume(offset, data);
LOG_DAI_PORT_W (offset, data&0x0f, "discrete devices - osc. 2 volume");
- LOG_DAI_PORT_W (offset, (data&0xf0)>>4, "discrete devices - noise volume");
+ LOG_DAI_PORT_W (offset, BIT(data, 4, 4), "discrete devices - noise volume");
break;
case 0x06:
- m_paddle_select = (data&0x06)>>2;
- m_paddle_enable = (data&0x08)>>3;
- m_cassette_motor[0] = (data&0x10)>>4;
- m_cassette_motor[1] = (data&0x20)>>5;
+ m_paddle_select = BIT(data, 1, 2);
+ m_paddle_enable = BIT(data, 3);
+ m_cassette_motor[0] = BIT(data, 4);
+ m_cassette_motor[1] = BIT(data, 5);
m_cassette->change_state(m_cassette_motor[0]?CASSETTE_MOTOR_DISABLED:CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
- m_cassette->output((data & 0x01) ? -1.0 : 1.0);
- dai_update_memory ((data&0xc0)>>6);
- LOG_DAI_PORT_W (offset, (data&0x06)>>2, "discrete devices - paddle select");
- LOG_DAI_PORT_W (offset, (data&0x08)>>3, "discrete devices - paddle enable");
- LOG_DAI_PORT_W (offset, (data&0x10)>>4, "discrete devices - cassette motor 1");
- LOG_DAI_PORT_W (offset, (data&0x20)>>5, "discrete devices - cassette motor 2");
- LOG_DAI_PORT_W (offset, (data&0xc0)>>6, "discrete devices - ROM bank");
+ m_cassette->output(BIT(data, 0) ? -1.0 : 1.0);
+ membank("bank2")->set_entry(BIT(data, 6, 2));
+ LOG_DAI_PORT_W (offset, BIT(data, 1, 2), "discrete devices - paddle select");
+ LOG_DAI_PORT_W (offset, BIT(data, 3), "discrete devices - paddle enable");
+ LOG_DAI_PORT_W (offset, BIT(data, 4), "discrete devices - cassette motor 1");
+ LOG_DAI_PORT_W (offset, BIT(data, 5), "discrete devices - cassette motor 2");
+ LOG_DAI_PORT_W (offset, BIT(data, 6, 2), "discrete devices - ROM bank");
break;
default:
@@ -188,14 +191,14 @@ void dai_state::dai_io_discrete_devices_w(offs_t offset, uint8_t data)
***************************************************************************/
-uint8_t dai_state::dai_pit_r(offs_t offset)
+uint8_t dai_state::pit_r(offs_t offset)
{
- return m_pit->read((offset >> 1) & 3);
+ return m_pit->read(BIT(offset, 1, 2));
}
-void dai_state::dai_pit_w(offs_t offset, uint8_t data)
+void dai_state::pit_w(offs_t offset, uint8_t data)
{
- m_pit->write((offset >> 1) & 3, data);
+ m_pit->write(BIT(offset, 1, 2), data);
}
/***************************************************************************
@@ -204,13 +207,13 @@ void dai_state::dai_pit_w(offs_t offset, uint8_t data)
***************************************************************************/
-uint8_t dai_state::dai_amd9511_r()
+uint8_t dai_state::amd9511_r()
{
- /* optional and no present at this moment */
+ /* optional and not present at this moment */
return 0xff;
}
-void dai_state::dai_amd9511_w(offs_t offset, uint8_t data)
+void dai_state::amd9511_w(offs_t offset, uint8_t data)
{
logerror ("Writing to AMD9511 math chip, %04x, %02x\n", offset, data);
}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index b821ad36db7..ee3410972d0 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -15862,6 +15862,8 @@ hec2hrx //
hec2mdhrx //
hec2mx40 //
hec2mx80 //
+hector1 //
+interact //
victor //
@source:hektor.cpp
@@ -16705,10 +16707,6 @@ intlc440 //
@source:intellect02.cpp
intel02 //
-@source:interact.cpp
-hector1 //
-interact //
-
@source:interpro.cpp
ip2000 // Intergraph InterPro/InterServe 20x0
ip2400 // Intergraph InterPro/InterServe 24x0
@@ -32568,7 +32566,8 @@ g7400 // 1983 Videopac Plus G7400
jopac // 1983 Jopac JO7400
odyssey2 // Magnavox Odyssey 2 - 1978-1983
odyssey3 // Magnavox Odyssey 3 / Command Center (prototype)
-videopac // 1979 Videopac G7000/C52
+videopac // 1979 Videopac G7000
+videopacf // 1979 Videopac C52
@source:offtwall.cpp
offtwall // 136090 (c) 1991
diff --git a/src/mame/video/apple2.cpp b/src/mame/video/apple2.cpp
index b3eeec75eb6..37e3819052c 100644
--- a/src/mame/video/apple2.cpp
+++ b/src/mame/video/apple2.cpp
@@ -118,6 +118,7 @@ void a2_video_device::device_start()
save_item(NAME(m_GSborder));
save_item(NAME(m_newvideo));
save_item(NAME(m_monochrome));
+ save_item(NAME(m_rgbmode));
save_item(NAME(m_shr_palette));
}
@@ -136,6 +137,7 @@ void a2_video_device::device_reset()
m_80store = false;
m_monohgr = false;
m_newvideo = 0x01;
+ m_rgbmode = 3; // default to color DHGR
}
WRITE_LINE_MEMBER(a2_video_device::txt_w)
@@ -174,6 +176,14 @@ WRITE_LINE_MEMBER(a2_video_device::dhires_w)
{
// select double hi-res
screen().update_now();
+
+ // RGB cards shift in a mode bit on the rising edge
+ if ((m_dhires) && (state))
+ {
+ m_rgbmode = (m_rgbmode << 1) & 3;
+ m_rgbmode |= m_80col ? 1 : 0;
+ }
+
m_dhires = !state;
}
@@ -453,7 +463,7 @@ void a2_video_device::lores_update(screen_device &screen, bitmap_ind16 &bitmap,
switch (m_sysconfig & 0x03)
{
- case 0: fg = WHITE; break;
+ case 0: case 4: fg = WHITE; break;
case 1: fg = WHITE; break;
case 2: fg = GREEN; break;
case 3: fg = ORANGE; break;
@@ -570,7 +580,7 @@ void a2_video_device::dlores_update(screen_device &screen, bitmap_ind16 &bitmap,
switch (m_sysconfig & 0x03)
{
- case 0: fg = WHITE; break;
+ case 0: case 4: fg = WHITE; break;
case 1: fg = WHITE; break;
case 2: fg = GREEN; break;
case 3: fg = ORANGE; break;
@@ -750,13 +760,14 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c
int fg = 0;
int bg = 0;
+ if (m_aux_ptr)
+ {
+ aux_page = m_aux_ptr;
+ }
+
if (m_80col)
{
start_address = 0x400;
- if (m_aux_ptr)
- {
- aux_page = m_aux_ptr;
- }
}
else
{
@@ -768,7 +779,7 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c
switch (m_sysconfig & 0x03)
{
- case 0: fg = WHITE; break;
+ case 0: case 4: fg = WHITE; break;
case 1: fg = WHITE; break;
case 2: fg = GREEN; break;
case 3: fg = ORANGE; break;
@@ -795,6 +806,13 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c
{
/* calculate address */
address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
+ if (((m_sysconfig & 7) == 4) && (m_dhires))
+ {
+ u8 tmp = aux_page[address];
+ fg = tmp>>4;
+ bg = tmp & 0xf;
+ }
+
plot_text_character(bitmap, col * 14, row, 2, m_ram_ptr[address],
m_char_ptr, m_char_size, fg, bg);
}
@@ -815,7 +833,7 @@ void a2_video_device::text_update_orig(screen_device &screen, bitmap_ind16 &bitm
switch (m_sysconfig & 0x03)
{
- case 0: fg = WHITE; break;
+ case 0: case 4: fg = WHITE; break;
case 1: fg = WHITE; break;
case 2: fg = GREEN; break;
case 3: fg = ORANGE; break;
@@ -1027,6 +1045,12 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
mon_type = 1;
}
+ // IIgs $C021 monochrome HGR
+ if (m_monochrome & 0x80)
+ {
+ mon_type = 1;
+ }
+
switch (mon_type)
{
case 0:
@@ -1225,6 +1249,8 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
uint32_t w;
int page = m_page2 ? 0x4000 : 0x2000;
int mon_type = m_sysconfig & 0x03;
+ bool bIsRGB = ((m_sysconfig & 7) == 4);
+ bool bIsRGBMixed = ((bIsRGB) && (m_rgbmode == 1));
// IIgs force-monochrome-DHR setting
if (m_newvideo & 0x20)
@@ -1232,6 +1258,12 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
mon_type = 1;
}
+ // IIe RGB card monochrome DHR
+ if ((bIsRGB) && (m_rgbmode == 0))
+ {
+ mon_type = 1;
+ }
+
/* sanity checks */
if (beginrow < cliprect.top())
beginrow = cliprect.top();
@@ -1265,19 +1297,96 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
p = &bitmap.pix16(row);
+ // RGB DHR 160-wide mode
+ if ((bIsRGB) && (m_rgbmode == 2))
+ {
+ mon_type = 4;
+ }
+
for (col = 0; col < 80; col++)
{
w = (((uint32_t) vram_row[col+0] & 0x7f) << 0)
| (((uint32_t) vram_row[col+1] & 0x7f) << 7)
| (((uint32_t) vram_row[col+2] & 0x7f) << 14);
+ /*
+ DHGR pixel layout:
+ column & 3 = 0 1 2 3
+ nBBBAAAA nDDCCCCB nFEEEEDD nGGGGFFF
+
+ n is don't care on the stock hardware's NTSC output.
+
+ On RGB cards, in mixed mode (DHGR with special mode value == 1), n
+ controls if a pixel quad starting in that byte is color or monochrome.
+ Pixel quads A&B are controlled by n in byte 0, C&D by n in byte 1,
+ E&F by n in byte 2, and G by n in byte 3.
+ */
+
switch (mon_type)
{
case 0:
- for (b = 0; b < 7; b++)
+ // every 3rd column, the first pixel quad is controlled by the previous
+ // byte's MSB, because we always draw 2 quads per column.
+ if ((bIsRGBMixed) && ((col & 3) == 3))
{
- v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F];
- *(p++) = v;
+ uint32_t tw = (w >> 6);
+
+ if (!(vram_row[col-1] & 0x80))
+ {
+ for (b = 0; b < 4; b++)
+ {
+ v = (tw & 1);
+ tw >>= 1;
+ *(p++) = v ? WHITE : BLACK;
+ }
+ }
+ else
+ {
+ for (b = 0; b < 4; b++)
+ {
+ v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F];
+ *(p++) = v;
+ }
+ }
+
+ if (!(vram_row[col] & 0x80))
+ {
+ for (b = 4; b < 7; b++)
+ {
+ v = (tw & 1);
+ tw >>= 1;
+ *(p++) = v ? WHITE : BLACK;
+ }
+ }
+ else
+ {
+ for (b = 4; b < 7; b++)
+ {
+ v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F];
+ *(p++) = v;
+ }
+ }
+ }
+ else
+ {
+ if ((bIsRGBMixed) && !(vram_row[col] & 0x80))
+ {
+ uint32_t tw = (w >> 6);
+ for (b = 0; b < 7; b++)
+ {
+ v = (tw & 1);
+ tw >>= 1;
+ *(p++) = v ? WHITE : BLACK;
+ }
+ }
+ else
+ {
+ for (b = 0; b < 7; b++)
+ {
+ v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F];
+ *(p++) = v;
+ }
+ }
}
break;
@@ -1310,6 +1419,35 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
*(p++) = v ? ORANGE : BLACK;
}
break;
+
+ // RGB 160-wide mode (which has a much simpler VRAM layout)
+ case 4:
+ if (col == 0)
+ {
+ // Center the 480-wide image in the 560-wide display.
+ // Aspect ratio won't be perfect, but it's in range.
+ for (b = 0; b < 40; b++)
+ {
+ *(p++) = BLACK;
+ }
+ }
+ v = vram_row[col];
+ *(p++) = v & 0xf;
+ *(p++) = v & 0xf;
+ *(p++) = v & 0xf;
+ v >>= 4;
+ *(p++) = v & 0xf;
+ *(p++) = v & 0xf;
+ *(p++) = v & 0xf;
+ break;
+ }
+ }
+
+ if (mon_type == 4)
+ {
+ for (b = 0; b < 40; b++)
+ {
+ *(p++) = BLACK;
}
}
}
diff --git a/src/mame/video/apple2.h b/src/mame/video/apple2.h
index c5256f37728..a87c2aab6ce 100644
--- a/src/mame/video/apple2.h
+++ b/src/mame/video/apple2.h
@@ -32,8 +32,8 @@ public:
bool m_an2;
bool m_80store;
bool m_monohgr;
- uint8_t m_GSfg, m_GSbg, m_GSborder, m_newvideo, m_monochrome;
- uint32_t m_GSborder_colors[16], m_shr_palette[256];
+ u8 m_GSfg, m_GSbg, m_GSborder, m_newvideo, m_monochrome, m_rgbmode;
+ u32 m_GSborder_colors[16], m_shr_palette[256];
std::unique_ptr<bitmap_ind16> m_8bit_graphics;
std::unique_ptr<uint16_t[]> m_hires_artifact_map;
std::unique_ptr<uint16_t[]> m_dhires_artifact_map;
diff --git a/src/mame/video/dai.cpp b/src/mame/video/dai.cpp
index 77f507957eb..13891a8cda9 100644
--- a/src/mame/video/dai.cpp
+++ b/src/mame/video/dai.cpp
@@ -9,7 +9,7 @@
Krzysztof Strzecha
All video modes are emulated but not fully tested yet.
- dai_state::screen_update_dai() function needs strong cleanup and optimalisation.
+ dai_state::screen_update() function needs strong cleanup and optimisation.
***************************************************************************/
@@ -47,12 +47,12 @@ void dai_state::dai_palette(palette_device &palette) const
palette.set_pen_colors(0, s_palette);
}
-uint32_t dai_state::screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t dai_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
int i, j, k, l;
- uint8_t* char_rom = memregion("gfx1")->base();
+ uint8_t* char_rom = memregion("chargen")->base();
uint16_t dai_video_memory_start = 0xbfff;
uint16_t dai_scan_lines = 604; /* scan lines of PAL tv */