From a50dec8b3c8e446d312ba9ebd347209f4b8d0708 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 16 Apr 2015 12:30:13 +0200 Subject: extract libs and liboptions from pkg-config, prepare for future work (nw) --- scripts/src/osd/modules.lua | 44 ++++++++++++++++++++++++++++++++++++-------- scripts/src/osd/sdl.lua | 24 ++++++++++++------------ 2 files changed, 48 insertions(+), 20 deletions(-) (limited to 'scripts/src') diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index dd2e9a1cf8d..9bfdfb201c1 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -1,3 +1,29 @@ +function string.starts(String,Start) + return string.sub(String,1,string.len(Start))==Start +end + +function addlibfromstring(str) + if (str==nil) then return end + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==true then + links { + string.sub(w,3) + } + end + end +end + +function addoptionsfromstring(str) + if (str==nil) then return end + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==false then + linkoptions { + w + } + end + end +end + function osdmodulesbuild() removeflags { @@ -191,9 +217,9 @@ function osdmodulestargetconf() if _OPTIONS["NO_USE_MIDI"]~="1" then if _OPTIONS["targetos"]=="linux" then - linkoptions { - backtick("pkg-config --libs alsa"), - } + local str = backtick("pkg-config --libs alsa") + addlibfromstring(str) + addoptionsfromstring(str) elseif _OPTIONS["targetos"]=="macosx" then links { "CoreMIDI.framework", @@ -223,13 +249,15 @@ function osdmodulestargetconf() if _OPTIONS["QT_HOME"]~=nil then linkoptions { "-L" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"), - "-lQtGui", - "-lQtCore", } - else - linkoptions { - backtick("pkg-config --libs QtGui"), + links { + "QtGui", + "QtCore", } + else + local str = backtick("pkg-config --libs QtGui") + addlibfromstring(str) + addoptionsfromstring(str) end end end diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 8b713bf635a..d5852bcd298 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -37,9 +37,9 @@ function maintargetosdoptions(_target) "SDL_ttf", } end - linkoptions { - backtick("pkg-config --libs fontconfig"), - } + local str = backtick("pkg-config --libs fontconfig") + addlibfromstring(str) + addoptionsfromstring(str) end if _OPTIONS["targetos"]=="windows" then @@ -239,9 +239,9 @@ if BASE_TARGETOS=="unix" then } end else - linkoptions { - backtick(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'"), - } + local str = backtick(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) end else if _OPTIONS["NO_X11"]=="1" then @@ -259,9 +259,9 @@ if BASE_TARGETOS=="unix" then } end end - linkoptions { - backtick(sdlconfigcmd() .. " --libs"), - } + local str = backtick(sdlconfigcmd() .. " --libs") + addlibfromstring(str) + addoptionsfromstring(str) if _OPTIONS["targetos"]~="haiku" then links { "m", @@ -280,9 +280,9 @@ if BASE_TARGETOS=="unix" then end end elseif BASE_TARGETOS=="os2" then - linkoptions { - backtick(sdlconfigcmd() .. " --libs"), - } + local str = backtick(sdlconfigcmd() .. " --libs") + addlibfromstring(str) + addoptionsfromstring(str) links { "pthread" } -- cgit v1.2.3-70-g09d2 From fab6dab064f5f8308d7276ccdb1bf684db24cea8 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 16 Apr 2015 14:29:34 +0200 Subject: Make generated projects behave same as before revert (nw) --- scripts/src/main.lua | 1 + scripts/src/tools.lua | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) (limited to 'scripts/src') diff --git a/scripts/src/main.lua b/scripts/src/main.lua index 8604987ffda..a109bea87dd 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -12,6 +12,7 @@ function mainProject(_target, _subtarget) } flags { "NoManifest", + "Symbols", -- always include minimum symbols for executables } if _OPTIONS["SYMBOLS"] then diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index cb7602a5b54..64860177f2a 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -10,6 +10,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -42,6 +46,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -78,6 +86,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -110,6 +122,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -149,6 +165,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -184,6 +204,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -219,6 +243,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -251,6 +279,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -283,6 +315,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -315,6 +351,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -349,6 +389,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -381,6 +425,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -420,6 +468,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -456,6 +508,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -493,6 +549,10 @@ options { "ForceCPP", } +flags { + "Symbols", -- always include minimum symbols for executables +} + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end -- cgit v1.2.3-70-g09d2 From 3060bb0637af92deac7660812b29f3a95ae9b7fb Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 16 Apr 2015 15:26:26 +0200 Subject: fix for few more executable files (nw) --- scripts/src/osd/sdl.lua | 8 ++++++++ scripts/src/osd/windows.lua | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'scripts/src') diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index d5852bcd298..6360e79a89e 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -422,6 +422,10 @@ if _OPTIONS["with-tools"] then "ForceCPP", } + flags { + "Symbols", -- always include minimum symbols for executables + } + dofile("sdl_cfg.lua") includedirs { @@ -480,6 +484,10 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then "ForceCPP", } + flags { + "Symbols", -- always include minimum symbols for executables + } + dofile("sdl_cfg.lua") if _OPTIONS["SEPARATE_BIN"]~="1" then diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index 8c6c5dd1cb7..d8636a2e3b1 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -217,6 +217,10 @@ if _OPTIONS["with-tools"] then "ForceCPP", } + flags { + "Symbols", -- always include minimum symbols for executables + } + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end -- cgit v1.2.3-70-g09d2 From dc35f927f786252e9325e1da10dce668c61be29b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 17 Apr 2015 11:24:33 +0200 Subject: made libflac possible to compile under xcode, and simplify for other (nw) --- 3rdparty/libflac/src/libFLAC/include/config.h | 1 + scripts/src/3rdparty.lua | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 3rdparty/libflac/src/libFLAC/include/config.h (limited to 'scripts/src') diff --git a/3rdparty/libflac/src/libFLAC/include/config.h b/3rdparty/libflac/src/libFLAC/include/config.h new file mode 100644 index 00000000000..d9f49ff504b --- /dev/null +++ b/3rdparty/libflac/src/libFLAC/include/config.h @@ -0,0 +1 @@ +#define VERSION "1.2.1" \ No newline at end of file diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index e8c73eb3bae..39bc6b65e74 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -172,15 +172,10 @@ project "flac" "_LARGEFILE_SOURCE", "_FILE_OFFSET_BITS=64", "FLAC__HAS_OGG=0", + "HAVE_CONFIG_H=1", } - configuration { "vs*" } - defines { - "VERSION=\"1.2.1\"" - } - configuration { "gmake" } - defines { - "VERSION=\\\"1.2.1\\\"" - } + + configuration { "gmake"} buildoptions_c { "-Wno-unused-function", "-O0", -- cgit v1.2.3-70-g09d2 From 67d69aa02d91189dad82646ef89e6f789481c475 Mon Sep 17 00:00:00 2001 From: couriersud Date: Mon, 20 Apr 2015 00:55:19 +0200 Subject: Add 9312/DM9312 to netlist. [Couriersud] --- scripts/src/netlist.lua | 2 + src/emu/netlist/devices/net_lib.c | 2 + src/emu/netlist/devices/net_lib.h | 1 + src/emu/netlist/devices/nld_9312.c | 87 ++++++++++++++++++++++++++++++++++++++ src/emu/netlist/devices/nld_9312.h | 58 +++++++++++++++++++++++++ 5 files changed, 150 insertions(+) create mode 100644 src/emu/netlist/devices/nld_9312.c create mode 100644 src/emu/netlist/devices/nld_9312.h (limited to 'scripts/src') diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index be502f5ba5c..2db67d68526 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -83,6 +83,8 @@ files { MAME_DIR .. "src/emu/netlist/devices/nld_74153.h", MAME_DIR .. "src/emu/netlist/devices/nld_74ls629.c", MAME_DIR .. "src/emu/netlist/devices/nld_74ls629.h", + MAME_DIR .. "src/emu/netlist/devices/nld_9312.c", + MAME_DIR .. "src/emu/netlist/devices/nld_9312.h", MAME_DIR .. "src/emu/netlist/devices/nld_9316.c", MAME_DIR .. "src/emu/netlist/devices/nld_9316.h", MAME_DIR .. "src/emu/netlist/devices/nld_ne555.c", diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index 4c8e22d685b..1ef800e524b 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -117,6 +117,7 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74123, TTL_74123, "-") ENTRY(74153, TTL_74153, "+C0,C1,C2,C3,A,B,G") ENTRY(SN74LS629, SN74LS629, "CAP") + ENTRY(9312, TTL_9312, "-") ENTRY(9316, TTL_9316, "+CLK,ENP,ENT,CLRQ,LOADQ,A,B,C,D") ENTRY(NE555, NE555, "-") ENTRY(r2r_dac, R2R_DAC, "+VIN,R,N") @@ -145,6 +146,7 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74123_dip, TTL_74123_DIP, "-") ENTRY(74153_dip, TTL_74153_DIP, "-") ENTRY(9602_dip, TTL_9602_DIP, "-") + ENTRY(9312_dip, TTL_9312_DIP, "-") ENTRY(9316_dip, TTL_9316_DIP, "-") ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2") ENTRY(NE555_dip, NE555_DIP, "-") diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index f3db97584fe..f66da6bb441 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -79,6 +79,7 @@ #include "nld_74123.h" #include "nld_74153.h" #include "nld_74ls629.h" +#include "nld_9312.h" #include "nld_9316.h" #include "nld_ne555.h" diff --git a/src/emu/netlist/devices/nld_9312.c b/src/emu/netlist/devices/nld_9312.c new file mode 100644 index 00000000000..6651848e3a9 --- /dev/null +++ b/src/emu/netlist/devices/nld_9312.c @@ -0,0 +1,87 @@ +/* + * nld_9312.c + * + */ + +/* + * +---+---+---+---++---+---+ + * | C | B | A | G || Y | YQ| + * +===+===+===+===++===+===+ + * | X | X | X | 1 || 0| 1 | + * | 0 | 0 | 0 | 0 || D0|D0Q| + * | 0 | 0 | 1 | 0 || D1|D1Q| + * | 0 | 1 | 0 | 0 || D2|D2Q| + * | 0 | 1 | 1 | 0 || D3|D3Q| + * | 1 | 0 | 0 | 0 || D4|D4Q| + * | 1 | 0 | 1 | 0 || D5|D5Q| + * | 1 | 1 | 0 | 0 || D6|D6Q| + * | 1 | 1 | 1 | 0 || D7|D7Q| + * +---+---+---+---++---+---+ +*/ +#include "nld_9312.h" + +//#if (USE_TRUTHTABLE) +nld_9312::truthtable_t nld_9312::m_ttbl; + +/* FIXME: Data changes are propagating faster than changing selects A,B,C + * Please refer to data sheet. + * This would require a state machine, thus we do not + * do this right now. + */ + +const char *nld_9312::m_desc[] = { + " C, B, A, G,D0,D1,D2,D3,D4,D5,D6,D7| Y,YQ", + " X, X, X, 1, X, X, X, X, X, X, X, X| 0, 1|33,19", + " 0, 0, 0, 0, 0, X, X, X, X, X, X, X| 0, 1|33,28", + " 0, 0, 0, 0, 1, X, X, X, X, X, X, X| 1, 0|33,28", + " 0, 0, 1, 0, X, 0, X, X, X, X, X, X| 0, 1|33,28", + " 0, 0, 1, 0, X, 1, X, X, X, X, X, X| 1, 0|33,28", + " 0, 1, 0, 0, X, X, 0, X, X, X, X, X| 0, 1|33,28", + " 0, 1, 0, 0, X, X, 1, X, X, X, X, X| 1, 0|33,28", + " 0, 1, 1, 0, X, X, X, 0, X, X, X, X| 0, 1|33,28", + " 0, 1, 1, 0, X, X, X, 1, X, X, X, X| 1, 0|33,28", + " 1, 0, 0, 0, X, X, X, X, 0, X, X, X| 0, 1|33,28", + " 1, 0, 0, 0, X, X, X, X, 1, X, X, X| 1, 0|33,28", + " 1, 0, 1, 0, X, X, X, X, X, 0, X, X| 0, 1|33,28", + " 1, 0, 1, 0, X, X, X, X, X, 1, X, X| 1, 0|33,28", + " 1, 1, 0, 0, X, X, X, X, X, X, 0, X| 0, 1|33,28", + " 1, 1, 0, 0, X, X, X, X, X, X, 1, X| 1, 0|33,28", + " 1, 1, 1, 0, X, X, X, X, X, X, X, 0| 0, 1|33,28", + " 1, 1, 1, 0, X, X, X, X, X, X, X, 1| 1, 0|33,28", + "" +}; +//#endif + + +NETLIB_START(9312_dip) +{ + register_sub(m_sub, "1"); + + register_subalias("13", m_sub.m_i[0]); + register_subalias("12", m_sub.m_i[1]); + register_subalias("11", m_sub.m_i[2]); + register_subalias("10", m_sub.m_i[3]); + + register_subalias("1", m_sub.m_i[4]); + register_subalias("2", m_sub.m_i[5]); + register_subalias("3", m_sub.m_i[6]); + register_subalias("4", m_sub.m_i[7]); + register_subalias("5", m_sub.m_i[8]); + register_subalias("6", m_sub.m_i[9]); + register_subalias("7", m_sub.m_i[10]); + register_subalias("9", m_sub.m_i[11]); + + register_subalias("15", m_sub.m_Q[0]); // Y + register_subalias("14", m_sub.m_Q[1]); // YQ +} + +NETLIB_UPDATE(9312_dip) +{ + /* only called during startup */ + m_sub.update_dev(); +} + +NETLIB_RESET(9312_dip) +{ + m_sub.do_reset(); +} diff --git a/src/emu/netlist/devices/nld_9312.h b/src/emu/netlist/devices/nld_9312.h new file mode 100644 index 00000000000..98fd0c7177d --- /dev/null +++ b/src/emu/netlist/devices/nld_9312.h @@ -0,0 +1,58 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_9312.h + * + * DM9312: One of Eight Line Data Selectors/Multiplexers + * + * +--------------+ + * D0 |1 ++ 16| VCC + * D1 |2 15| Y + * D2 |3 14| YQ + * D3 |4 9312 13| C + * D4 |5 12| B + * D5 |6 11| A + * D6 |7 10| G Strobe + * GND |8 9| D7 + * +--------------+ + * __ + * +---+---+---+---++---+---+ + * | C | B | A | G || Y | YQ| + * +===+===+===+===++===+===+ + * | X | X | X | 1 || 0| 1 | + * | 0 | 0 | 0 | 0 || D0|D0Q| + * | 0 | 0 | 1 | 0 || D1|D1Q| + * | 0 | 1 | 0 | 0 || D2|D2Q| + * | 0 | 1 | 1 | 0 || D3|D3Q| + * | 1 | 0 | 0 | 0 || D4|D4Q| + * | 1 | 0 | 1 | 0 || D5|D5Q| + * | 1 | 1 | 0 | 0 || D6|D6Q| + * | 1 | 1 | 1 | 0 || D7|D7Q| + * +---+---+---+---++---+---+ + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_9312_H_ +#define NLD_9312_H_ + +#include "nld_signal.h" + +#define TTL_9312(_name) \ + NET_REGISTER_DEV(9312, _name) \ + +//#if (USE_TRUTHTABLE) +#include "nld_truthtable.h" +NETLIB_TRUTHTABLE(9312, 12, 2, 0); +//#endif + + +#define TTL_9312_DIP(_name) \ + NET_REGISTER_DEV(9312_dip, _name) + +NETLIB_DEVICE(9312_dip, + NETLIB_NAME(9312) m_sub; +); + +#endif /* NLD_9312_H_ */ -- cgit v1.2.3-70-g09d2 From 643d5fafe72493305f12d24db1af38ec37ad9fff Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Mon, 20 Apr 2015 22:34:31 +0300 Subject: (MESS) Added sector image format for the Commodore 8280 8" floppy drive. [Curt Coder] --- scripts/src/lib.lua | 2 ++ src/emu/bus/ieee488/c8280.c | 58 ++++++++++++++++++------------------- src/emu/bus/ieee488/c8280.h | 6 ++-- src/lib/formats/c8280_dsk.c | 69 +++++++++++++++++++++++++++++++++++++++++++++ src/lib/formats/c8280_dsk.h | 30 ++++++++++++++++++++ src/lib/formats/flopimg.h | 1 + 6 files changed, 133 insertions(+), 33 deletions(-) create mode 100644 src/lib/formats/c8280_dsk.c create mode 100644 src/lib/formats/c8280_dsk.h (limited to 'scripts/src') diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index 557e9e7316c..96ab4c3cad2 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -157,6 +157,8 @@ project "formats" MAME_DIR .. "src/lib/formats/bw2_dsk.h", MAME_DIR .. "src/lib/formats/bw12_dsk.c", MAME_DIR .. "src/lib/formats/bw12_dsk.h", + MAME_DIR .. "src/lib/formats/c8280_dsk.c", + MAME_DIR .. "src/lib/formats/c8280_dsk.h", MAME_DIR .. "src/lib/formats/cbm_crt.c", MAME_DIR .. "src/lib/formats/cbm_crt.h", MAME_DIR .. "src/lib/formats/cbm_tap.c", diff --git a/src/emu/bus/ieee488/c8280.c b/src/emu/bus/ieee488/c8280.c index 0bbd0d6c438..8787fb99487 100644 --- a/src/emu/bus/ieee488/c8280.c +++ b/src/emu/bus/ieee488/c8280.c @@ -9,16 +9,6 @@ **********************************************************************/ -/* - - TODO: - - - format - - wd1772: track description 80x4e 12x00 3xf6 fc 50x4e 12x00 3xf5 fe 2x00 2x01 f7 22x4e 12x00 3xf5 fb 256xaa f7 54x4e - -*/ - #include "c8280.h" @@ -159,6 +149,7 @@ WRITE8_MEMBER( c8280_device::dio_w ) m_bus->dio_w(this, data); } + //------------------------------------------------- // riot6532 1 //------------------------------------------------- @@ -291,6 +282,10 @@ static SLOT_INTERFACE_START( c8280_floppies ) SLOT_INTERFACE( "8dsdd", FLOPPY_8_DSDD ) SLOT_INTERFACE_END +FLOPPY_FORMATS_MEMBER( c8280_device::floppy_formats ) + FLOPPY_C8280_FORMAT +FLOPPY_FORMATS_END + //------------------------------------------------- // MACHINE_CONFIG_FRAGMENT( c8280 ) @@ -314,11 +309,11 @@ static MACHINE_CONFIG_FRAGMENT( c8280 ) MCFG_CPU_ADD(M6502_FDC_TAG, M6502, XTAL_12MHz/8) MCFG_CPU_PROGRAM_MAP(c8280_fdc_mem) - MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) // clock? + MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) MCFG_WD_FDC_INTRQ_CALLBACK(INPUTLINE(M6502_FDC_TAG, M6502_IRQ_LINE)) MCFG_WD_FDC_DRQ_CALLBACK(INPUTLINE(M6502_FDC_TAG, M6502_SET_OVERFLOW)) - MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":0", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":1", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG ":0", c8280_floppies, "8dsdd", c8280_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG ":1", c8280_floppies, "8dsdd", c8280_device::floppy_formats) MACHINE_CONFIG_END @@ -390,20 +385,20 @@ inline void c8280_device::update_ieee_signals() // c8280_device - constructor //------------------------------------------------- -c8280_device::c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, C8280, "C8280", tag, owner, clock, "c8280", __FILE__), - device_ieee488_interface(mconfig, *this), - m_maincpu(*this, M6502_DOS_TAG), - m_fdccpu(*this, M6502_FDC_TAG), - m_riot0(*this, M6532_0_TAG), - m_riot1(*this, M6532_1_TAG), - m_fdc(*this, WD1797_TAG), - m_floppy0(*this, WD1797_TAG":0"), - m_floppy1(*this, WD1797_TAG":1"), - m_address(*this, "ADDRESS"), - m_rfdo(1), - m_daco(1), - m_atna(1) +c8280_device::c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, C8280, "C8280", tag, owner, clock, "c8280", __FILE__), + device_ieee488_interface(mconfig, *this), + m_maincpu(*this, M6502_DOS_TAG), + m_fdccpu(*this, M6502_FDC_TAG), + m_riot0(*this, M6532_0_TAG), + m_riot1(*this, M6532_1_TAG), + m_fdc(*this, WD1797_TAG), + m_floppy0(*this, WD1797_TAG ":0"), + m_floppy1(*this, WD1797_TAG ":1"), + m_address(*this, "ADDRESS"), + m_rfdo(1), + m_daco(1), + m_atna(1) { } @@ -418,6 +413,7 @@ void c8280_device::device_start() save_item(NAME(m_rfdo)); save_item(NAME(m_daco)); save_item(NAME(m_atna)); + save_item(NAME(m_ifc)); save_item(NAME(m_fk5)); } @@ -481,12 +477,12 @@ READ8_MEMBER( c8280_device::fk5_r ) bit description - 0 DS1 - 1 DS2 - 2 _DDEN + 0 + 1 + 2 3 DCHG 4 TSID - 5 MOTOR ENABLE + 5 6 0 7 0 diff --git a/src/emu/bus/ieee488/c8280.h b/src/emu/bus/ieee488/c8280.h index 947d382dc7f..917d6bbf1e2 100644 --- a/src/emu/bus/ieee488/c8280.h +++ b/src/emu/bus/ieee488/c8280.h @@ -14,10 +14,10 @@ #ifndef __C8280__ #define __C8280__ - #include "emu.h" #include "ieee488.h" #include "cpu/m6502/m6502.h" +#include "formats/c8280_dsk.h" #include "machine/6532riot.h" #include "machine/wd_fdc.h" @@ -30,7 +30,7 @@ // ======================> c8280_device class c8280_device : public device_t, - public device_ieee488_interface + public device_ieee488_interface { public: // construction/destruction @@ -51,6 +51,8 @@ public: DECLARE_READ8_MEMBER( fk5_r ); DECLARE_WRITE8_MEMBER( fk5_w ); + DECLARE_FLOPPY_FORMATS( floppy_formats ); + protected: // device-level overrides virtual void device_start(); diff --git a/src/lib/formats/c8280_dsk.c b/src/lib/formats/c8280_dsk.c new file mode 100644 index 00000000000..b6a25dcc924 --- /dev/null +++ b/src/lib/formats/c8280_dsk.c @@ -0,0 +1,69 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c8280_dsk.c + + Commodore 8280 disk image format + +*********************************************************************/ + +#include "formats/c8280_dsk.h" + +c8280_format::c8280_format() : wd177x_format(formats) +{ +} + +const char *c8280_format::name() const +{ + return "c8280"; +} + +const char *c8280_format::description() const +{ + return "Commodore 8280 disk image"; +} + +const char *c8280_format::extensions() const +{ + return "dsk"; +} + +const c8280_format::format c8280_format::formats[] = { + // 80x4e 12x00 3xf6 fc + // 50x4e 12x00 3xf5 fe 2x00 01 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 02 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 03 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 04 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 05 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 06 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 07 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 08 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 09 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0a 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0b 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0c 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0d 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0e 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0f 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 10 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 11 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 12 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 13 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 14 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 15 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 16 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 17 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 18 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 19 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 1a 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 653x4e + { + floppy_image::FF_8, floppy_image::DSDD, floppy_image::MFM, + 1200, 26, 77, 2, 256, {}, 1, {}, 50, 22, 54 + }, + + {} +}; + +const floppy_format_type FLOPPY_C8280_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/c8280_dsk.h b/src/lib/formats/c8280_dsk.h new file mode 100644 index 00000000000..eed34f5d846 --- /dev/null +++ b/src/lib/formats/c8280_dsk.h @@ -0,0 +1,30 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c8280_dsk.h + + Commodore 8280 disk image format + +*********************************************************************/ + +#ifndef C8280_DSK_H_ +#define C8280_DSK_H_ + +#include "wd177x_dsk.h" + +class c8280_format : public wd177x_format { +public: + c8280_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_C8280_FORMAT; + +#endif diff --git a/src/lib/formats/flopimg.h b/src/lib/formats/flopimg.h index 23cc0ec5cef..c06788c4e13 100644 --- a/src/lib/formats/flopimg.h +++ b/src/lib/formats/flopimg.h @@ -471,6 +471,7 @@ protected: C1541 tr 18-24 3.50 300 3500 C1541 tr 25-30 3.75 300 3750 C1541 tr 31+ 4.00 300 4000 + 8" DD 1 360 1200 5.25" SD 4 300 4000 5.25" DD 2 300 2000 5.25" HD 1 360 1200 -- cgit v1.2.3-70-g09d2 From e7967e81b9ceb5a730814dafa33f5a02607faaf7 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Tue, 21 Apr 2015 22:25:44 +0300 Subject: (MESS) c4040: Added own sector dump disk format since it's different from what the 1541 uses. [Curt Coder] --- scripts/src/lib.lua | 2 + src/emu/bus/ieee488/c2040.c | 131 ++++++++++++++++++++++++++++++----------- src/emu/bus/ieee488/c2040.h | 3 + src/emu/bus/ieee488/c2040fdc.h | 1 + src/lib/formats/c4040_dsk.c | 91 ++++++++++++++++++++++++++++ src/lib/formats/c4040_dsk.h | 38 ++++++++++++ src/lib/formats/d64_dsk.c | 3 +- src/lib/formats/d64_dsk.h | 1 + 8 files changed, 233 insertions(+), 37 deletions(-) create mode 100644 src/lib/formats/c4040_dsk.c create mode 100644 src/lib/formats/c4040_dsk.h (limited to 'scripts/src') diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index 96ab4c3cad2..e3dc7c6064a 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -157,6 +157,8 @@ project "formats" MAME_DIR .. "src/lib/formats/bw2_dsk.h", MAME_DIR .. "src/lib/formats/bw12_dsk.c", MAME_DIR .. "src/lib/formats/bw12_dsk.h", + MAME_DIR .. "src/lib/formats/c4040_dsk.c", + MAME_DIR .. "src/lib/formats/c4040_dsk.h", MAME_DIR .. "src/lib/formats/c8280_dsk.c", MAME_DIR .. "src/lib/formats/c8280_dsk.h", MAME_DIR .. "src/lib/formats/cbm_crt.c", diff --git a/src/emu/bus/ieee488/c2040.c b/src/emu/bus/ieee488/c2040.c index d12be0795a3..bb012afa92a 100644 --- a/src/emu/bus/ieee488/c2040.c +++ b/src/emu/bus/ieee488/c2040.c @@ -9,6 +9,34 @@ **********************************************************************/ +/* + + 2040/3040 disk initialization + ----------------------------- + You need to initialize each diskette before trying to access it + or you will get a DISK ID MISMATCH error upon disk commands. + On the 4040 this is done automatically by the DOS. + + open 15,8,15:print 15,"i":close 15 + + List directory + -------------- + directory / diR + + Format disk + ----------- + header "label,id",d0,i01 + + Load file + --------- + dload "name" / dL"name + + Save file + --------- + dsave "name" / dS"name + +*/ + /* TODO: @@ -53,19 +81,14 @@ const device_type C4040 = &device_creator; // ROM( c2040 ) //------------------------------------------------- -ROM_START( c2040 ) // schematic 320806 +ROM_START( c2040 ) // schematic 320806, DOS 1.0 ROM_REGION( 0x3000, M6502_TAG, 0 ) ROM_DEFAULT_BIOS("dos12") - ROM_SYSTEM_BIOS( 0, "dos10", "DOS 1.0" ) - ROMX_LOAD( "901468-xx.ul1", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(1) ) - ROMX_LOAD( "901468-xx.uh1", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(1) ) - ROM_SYSTEM_BIOS( 1, "dos12", "DOS 1.2" ) - ROMX_LOAD( "901468-06.ul1", 0x1000, 0x1000, CRC(25b5eed5) SHA1(4d9658f2e6ff3276e5c6e224611a66ce44b16fc7), ROM_BIOS(2) ) - ROMX_LOAD( "901468-07.uh1", 0x2000, 0x1000, CRC(9b09ae83) SHA1(6a51c7954938439ca8342fc295bda050c06e1791), ROM_BIOS(2) ) + ROM_LOAD( "901468-xx.ul1", 0x1000, 0x1000, NO_DUMP ) + ROM_LOAD( "901468-xx.uh1", 0x2000, 0x1000, NO_DUMP ) ROM_REGION( 0x400, M6504_TAG, 0 ) - ROMX_LOAD( "901466-01.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a), ROM_BIOS(1) ) - ROMX_LOAD( "901466-02.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a), ROM_BIOS(2) ) + ROM_LOAD( "901466-01.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a) ) ROM_REGION( 0x800, "gcr", 0) ROM_LOAD( "901467.uk6", 0x000, 0x800, CRC(a23337eb) SHA1(97df576397608455616331f8e837cb3404363fa2) ) @@ -82,6 +105,33 @@ const rom_entry *c2040_device::device_rom_region() const } +//------------------------------------------------- +// ROM( c3040 ) +//------------------------------------------------- + +ROM_START( c3040 ) // schematic 320806, DOS 1.2 + ROM_REGION( 0x3000, M6502_TAG, 0 ) + ROM_LOAD( "901468-06.ul1", 0x1000, 0x1000, CRC(25b5eed5) SHA1(4d9658f2e6ff3276e5c6e224611a66ce44b16fc7) ) + ROM_LOAD( "901468-07.uh1", 0x2000, 0x1000, CRC(9b09ae83) SHA1(6a51c7954938439ca8342fc295bda050c06e1791) ) + + ROM_REGION( 0x400, M6504_TAG, 0 ) + ROM_LOAD( "901466-02.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a) ) + + ROM_REGION( 0x800, "gcr", 0) + ROM_LOAD( "901467.uk6", 0x000, 0x800, CRC(a23337eb) SHA1(97df576397608455616331f8e837cb3404363fa2) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *c3040_device::device_rom_region() const +{ + return ROM_NAME( c3040 ); +} + + //------------------------------------------------- // ROM( c4040 ) //------------------------------------------------- @@ -434,9 +484,18 @@ SLOT_INTERFACE_END //------------------------------------------------- FLOPPY_FORMATS_MEMBER( c2040_device::floppy_formats ) - FLOPPY_D64_FORMAT, - FLOPPY_G64_FORMAT, - FLOPPY_D67_FORMAT + FLOPPY_D67_FORMAT, + FLOPPY_G64_FORMAT +FLOPPY_FORMATS_END + + +//------------------------------------------------- +// FLOPPY_FORMATS( floppy_formats ) +//------------------------------------------------- + +FLOPPY_FORMATS_MEMBER( c4040_device::floppy_formats ) + FLOPPY_C4040_FORMAT, + FLOPPY_G64_FORMAT FLOPPY_FORMATS_END @@ -532,8 +591,8 @@ static MACHINE_CONFIG_FRAGMENT( c4040 ) MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) - MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c2040_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", c2040_floppies, "525ssqd", c2040_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c4040_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", c2040_floppies, "525ssqd", c4040_device::floppy_formats) MACHINE_CONFIG_END @@ -605,24 +664,24 @@ inline void c2040_device::update_ieee_signals() // c2040_device - constructor //------------------------------------------------- -c2040_device::c2040_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) - : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_ieee488_interface(mconfig, *this), - m_maincpu(*this, M6502_TAG), - m_fdccpu(*this, M6504_TAG), - m_riot0(*this, M6532_0_TAG), - m_riot1(*this, M6532_1_TAG), - m_miot(*this, M6530_TAG), - m_via(*this, M6522_TAG), - m_floppy0(*this, FDC_TAG":0:525ssqd"), - m_floppy1(*this, FDC_TAG":1:525ssqd"), - m_fdc(*this, FDC_TAG), - m_gcr(*this, "gcr"), - m_address(*this, "ADDRESS"), - m_rfdo(1), - m_daco(1), - m_atna(1), - m_miot_irq(CLEAR_LINE) +c2040_device::c2040_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_ieee488_interface(mconfig, *this), + m_maincpu(*this, M6502_TAG), + m_fdccpu(*this, M6504_TAG), + m_riot0(*this, M6532_0_TAG), + m_riot1(*this, M6532_1_TAG), + m_miot(*this, M6530_TAG), + m_via(*this, M6522_TAG), + m_floppy0(*this, FDC_TAG":0:525ssqd"), + m_floppy1(*this, FDC_TAG":1:525ssqd"), + m_fdc(*this, FDC_TAG), + m_gcr(*this, "gcr"), + m_address(*this, "ADDRESS"), + m_rfdo(1), + m_daco(1), + m_atna(1), + m_miot_irq(CLEAR_LINE) { } @@ -652,16 +711,16 @@ c2040_device::c2040_device(const machine_config &mconfig, const char *tag, devic // c3040_device - constructor //------------------------------------------------- -c3040_device::c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : c2040_device(mconfig, C3040, "C3040", tag, owner, clock, "c3040", __FILE__) { } +c3040_device::c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + c2040_device(mconfig, C3040, "C3040", tag, owner, clock, "c3040", __FILE__) { } //------------------------------------------------- // c4040_device - constructor //------------------------------------------------- -c4040_device::c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : c2040_device(mconfig, C4040, "C4040", tag, owner, clock, "c4040", __FILE__) { } +c4040_device::c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + c2040_device(mconfig, C4040, "C4040", tag, owner, clock, "c4040", __FILE__) { } //------------------------------------------------- diff --git a/src/emu/bus/ieee488/c2040.h b/src/emu/bus/ieee488/c2040.h index c99731d27d9..020a436a9ac 100644 --- a/src/emu/bus/ieee488/c2040.h +++ b/src/emu/bus/ieee488/c2040.h @@ -107,6 +107,9 @@ class c3040_device : public c2040_device public: // construction/destruction c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual const rom_entry *device_rom_region() const; }; diff --git a/src/emu/bus/ieee488/c2040fdc.h b/src/emu/bus/ieee488/c2040fdc.h index d64d2de7c01..31b3c38affa 100644 --- a/src/emu/bus/ieee488/c2040fdc.h +++ b/src/emu/bus/ieee488/c2040fdc.h @@ -15,6 +15,7 @@ #define __C2040_FLOPPY__ #include "emu.h" +#include "formats/c4040_dsk.h" #include "formats/d64_dsk.h" #include "formats/d67_dsk.h" #include "formats/g64_dsk.h" diff --git a/src/lib/formats/c4040_dsk.c b/src/lib/formats/c4040_dsk.c new file mode 100644 index 00000000000..da3ac905693 --- /dev/null +++ b/src/lib/formats/c4040_dsk.c @@ -0,0 +1,91 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c4040_dsk.c + + Commodore 4040 sector disk image format + +*********************************************************************/ + +#include + +#include "formats/c4040_dsk.h" + +c4040_format::c4040_format() : d64_format(file_formats) +{ +} + +const char *c4040_format::name() const +{ + return "c4040"; +} + +const char *c4040_format::description() const +{ + return "Commodore 4040 disk image"; +} + +const char *c4040_format::extensions() const +{ + return "d64"; +} + +const c4040_format::format c4040_format::file_formats[] = { + { // c4040, dos 2, 35 tracks, head 48 tpi, stepper 96 tpi + floppy_image::FF_525, floppy_image::SSSD, 683, 35, 1, 256, 9, 8 + }, + {} +}; + +const int c4040_format::c4040_gap2[] = +{ + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, // 1-17 + 19, 19, 19, 19, 19, 19, 19, // 18-24 + 15, 15, 15, 15, 15, 15, // 25-30 + 12, 12, 12, 12, 12 // 31-35 +}; + +floppy_image_format_t::desc_e* c4040_format::get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2) +{ + static floppy_image_format_t::desc_e desc[] = { + /* 00 */ { SECTOR_LOOP_START, 0, -1 }, + /* 01 */ { RAWBYTE, 0xff, 5 }, + /* 02 */ { GCR5, 0x08, 1 }, + /* 03 */ { CRC, 1 }, + /* 04 */ { CRC_CBM_START, 1 }, + /* 05 */ { SECTOR_ID_GCR5 }, + /* 06 */ { TRACK_ID_DOS2_GCR5 }, + /* 07 */ { GCR5, id2, 1 }, + /* 08 */ { GCR5, id1, 1 }, + /* 09 */ { CRC_END, 1 }, + /* 10 */ { GCR5, 0x00, f.gap_1 }, + /* 11 */ { RAWBYTE, 0xff, 5 }, + /* 12 */ { GCR5, 0x07, 1 }, + /* 13 */ { CRC_CBM_START, 2 }, + /* 14 */ { SECTOR_DATA_GCR5, -1 }, + /* 15 */ { CRC_END, 2 }, + /* 16 */ { CRC, 2 }, + /* 17 */ { GCR5, 0x00, gap_2 }, + /* 18 */ { SECTOR_LOOP_END }, + /* 19 */ { GCR5, 0x00, 0 }, + /* 20 */ { RAWBITS, 0x14a, 0 }, + /* 21 */ { END } + }; + + desc[17].p2 = gap_2; // TODO why?!? + + current_size = 40 + (1+1+4)*10 + f.gap_1*10 + 40 + (1+f.sector_base_size+1)*10 + gap_2*10; + + current_size *= sector_count; + return desc; +} + +void c4040_format::fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size) +{ + desc[19].p2 = remaining_size / 10; + desc[20].p2 = remaining_size % 10; + desc[20].p1 >>= remaining_size & 0x01; +} + +const floppy_format_type FLOPPY_C4040_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/c4040_dsk.h b/src/lib/formats/c4040_dsk.h new file mode 100644 index 00000000000..231b961c765 --- /dev/null +++ b/src/lib/formats/c4040_dsk.h @@ -0,0 +1,38 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c4040_dsk.h + + Commodore 4040 sector disk image format + +*********************************************************************/ + +#ifndef C4040_DSK_H_ +#define C4040_DSK_H_ + +#include "d64_dsk.h" + +class c4040_format : public d64_format { +public: + c4040_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +protected: + virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); + virtual int get_gap2(const format &f, int head, int track) { return c4040_gap2[track]; } + virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); + + static const format file_formats[]; + + static const int c4040_gap2[]; +}; + +extern const floppy_format_type FLOPPY_C4040_FORMAT; + + + +#endif diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c index e5ffc9d15d9..4de63b34bc8 100644 --- a/src/lib/formats/d64_dsk.c +++ b/src/lib/formats/d64_dsk.c @@ -239,8 +239,9 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) int physical_track = this->get_physical_track(f, head, track); int sector_count = this->get_sectors_per_track(f, track); int track_size = sector_count*f.sector_base_size; + int gap2 = this->get_gap2(f, head, track); - floppy_image_format_t::desc_e *desc = this->get_sector_desc(f, current_size, sector_count, id1, id2, f.gap_2); + floppy_image_format_t::desc_e *desc = this->get_sector_desc(f, current_size, sector_count, id1, id2, gap2); int remaining_size = total_size - current_size; if(remaining_size < 0) diff --git a/src/lib/formats/d64_dsk.h b/src/lib/formats/d64_dsk.h index 9d6add2817e..558d4ebf1c2 100644 --- a/src/lib/formats/d64_dsk.h +++ b/src/lib/formats/d64_dsk.h @@ -66,6 +66,7 @@ protected: void get_disk_id(const format &f, io_generic *io, UINT8 &id1, UINT8 &id2); virtual int get_image_offset(const format &f, int head, int track); int compute_track_size(const format &f, int track); + virtual int get_gap2(const format &f, int head, int track) { return f.gap_2; } virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, UINT32 error_offs, desc_s *sectors, int sector_count) const; virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); -- cgit v1.2.3-70-g09d2 From 67d09b16e9c3bfdbbbd5badebb34ce1dd2aba01a Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Tue, 21 Apr 2015 23:52:22 +0300 Subject: (MESS) c3040: Disk format WIP. (nw) --- scripts/src/lib.lua | 4 +- src/emu/bus/ieee488/c2040.c | 66 ++++++++++++++++++++++++++- src/emu/bus/ieee488/c2040.h | 3 ++ src/emu/bus/ieee488/c2040fdc.h | 2 +- src/lib/formats/c3040_dsk.c | 101 +++++++++++++++++++++++++++++++++++++++++ src/lib/formats/c3040_dsk.h | 40 ++++++++++++++++ src/lib/formats/c4040_dsk.c | 4 +- src/lib/formats/d64_dsk.c | 2 +- src/lib/formats/d67_dsk.c | 56 ----------------------- src/lib/formats/d67_dsk.h | 36 --------------- 10 files changed, 215 insertions(+), 99 deletions(-) create mode 100644 src/lib/formats/c3040_dsk.c create mode 100644 src/lib/formats/c3040_dsk.h delete mode 100644 src/lib/formats/d67_dsk.c delete mode 100644 src/lib/formats/d67_dsk.h (limited to 'scripts/src') diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index e3dc7c6064a..5f809256072 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -157,6 +157,8 @@ project "formats" MAME_DIR .. "src/lib/formats/bw2_dsk.h", MAME_DIR .. "src/lib/formats/bw12_dsk.c", MAME_DIR .. "src/lib/formats/bw12_dsk.h", + MAME_DIR .. "src/lib/formats/c3040_dsk.c", + MAME_DIR .. "src/lib/formats/c3040_dsk.h", MAME_DIR .. "src/lib/formats/c4040_dsk.c", MAME_DIR .. "src/lib/formats/c4040_dsk.h", MAME_DIR .. "src/lib/formats/c8280_dsk.c", @@ -187,8 +189,6 @@ project "formats" MAME_DIR .. "src/lib/formats/csw_cas.h", MAME_DIR .. "src/lib/formats/d64_dsk.c", MAME_DIR .. "src/lib/formats/d64_dsk.h", - MAME_DIR .. "src/lib/formats/d67_dsk.c", - MAME_DIR .. "src/lib/formats/d67_dsk.h", MAME_DIR .. "src/lib/formats/d71_dsk.c", MAME_DIR .. "src/lib/formats/d71_dsk.h", MAME_DIR .. "src/lib/formats/d80_dsk.c", diff --git a/src/emu/bus/ieee488/c2040.c b/src/emu/bus/ieee488/c2040.c index bb012afa92a..4eb7c265660 100644 --- a/src/emu/bus/ieee488/c2040.c +++ b/src/emu/bus/ieee488/c2040.c @@ -484,7 +484,17 @@ SLOT_INTERFACE_END //------------------------------------------------- FLOPPY_FORMATS_MEMBER( c2040_device::floppy_formats ) - FLOPPY_D67_FORMAT, + FLOPPY_C3040_FORMAT, + FLOPPY_G64_FORMAT +FLOPPY_FORMATS_END + + +//------------------------------------------------- +// FLOPPY_FORMATS( floppy_formats ) +//------------------------------------------------- + +FLOPPY_FORMATS_MEMBER( c3040_device::floppy_formats ) + FLOPPY_C3040_FORMAT, FLOPPY_G64_FORMAT FLOPPY_FORMATS_END @@ -553,6 +563,60 @@ machine_config_constructor c2040_device::device_mconfig_additions() const } +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( c3040 ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( c3040 ) + // DOS + MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_16MHz/16) + MCFG_CPU_PROGRAM_MAP(c2040_main_mem) + + MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_16MHz/16) + MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, dio_r)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, dio_w)) + + MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_16MHz/16) + MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) + MCFG_RIOT6532_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) + MCFG_RIOT6532_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) + MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + + // controller + MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_16MHz/16) + MCFG_CPU_PROGRAM_MAP(c2040_fdc_mem) + + MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_16MHz/16) + MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c2040_fdc_t, read)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c2040_device, via_pb_w)) + MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, mode_sel_w)) + MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, rw_sel_w)) + + MCFG_DEVICE_ADD(M6530_TAG, MOS6530, XTAL_16MHz/16) + MCFG_MOS6530_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) + MCFG_MOS6530_IN_PB_CB(READ8(c2040_device, miot_pb_r)) + MCFG_MOS6530_OUT_PB_CB(WRITE8(c2040_device, miot_pb_w)) + + MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) + MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) + MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c3040_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", c2040_floppies, "525ssqd", c3040_device::floppy_formats) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor c3040_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( c3040 ); +} + + //------------------------------------------------- // MACHINE_CONFIG_FRAGMENT( c4040 ) //------------------------------------------------- diff --git a/src/emu/bus/ieee488/c2040.h b/src/emu/bus/ieee488/c2040.h index 020a436a9ac..2664a2ffdd8 100644 --- a/src/emu/bus/ieee488/c2040.h +++ b/src/emu/bus/ieee488/c2040.h @@ -110,6 +110,9 @@ public: // optional information overrides virtual const rom_entry *device_rom_region() const; + virtual machine_config_constructor device_mconfig_additions() const; + + DECLARE_FLOPPY_FORMATS( floppy_formats ); }; diff --git a/src/emu/bus/ieee488/c2040fdc.h b/src/emu/bus/ieee488/c2040fdc.h index 31b3c38affa..382c540d4e4 100644 --- a/src/emu/bus/ieee488/c2040fdc.h +++ b/src/emu/bus/ieee488/c2040fdc.h @@ -15,9 +15,9 @@ #define __C2040_FLOPPY__ #include "emu.h" +#include "formats/c3040_dsk.h" #include "formats/c4040_dsk.h" #include "formats/d64_dsk.h" -#include "formats/d67_dsk.h" #include "formats/g64_dsk.h" #include "imagedev/floppy.h" diff --git a/src/lib/formats/c3040_dsk.c b/src/lib/formats/c3040_dsk.c new file mode 100644 index 00000000000..dd1d3ee5817 --- /dev/null +++ b/src/lib/formats/c3040_dsk.c @@ -0,0 +1,101 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c3040_dsk.c + + Commodore 3040 sector disk image format + +*********************************************************************/ + +#include + +#include "formats/c3040_dsk.h" + +c3040_format::c3040_format() : d64_format(file_formats) +{ +} + +const char *c3040_format::name() const +{ + return "c3040"; +} + +const char *c3040_format::description() const +{ + return "Commodore 3040 disk image"; +} + +const char *c3040_format::extensions() const +{ + return "d67"; +} + +const c3040_format::format c3040_format::file_formats[] = { + { // d67, dos 1, 35 tracks, head 48 tpi, stepper 96 tpi + floppy_image::FF_525, floppy_image::SSSD, 690, 35, 1, 256, 9, 8 + }, + {} +}; + +const int c3040_format::c3040_sectors_per_track[] = +{ + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, // 1-17 + 20, 20, 20, 20, 20, 20, 20, // 18-24 + 18, 18, 18, 18, 18, 18, // 25-30 + 17, 17, 17, 17, 17, // 31-35 + 17, 17, 17, 17, 17, // 36-40 + 17, 17 // 41-42 +}; + +const int c3040_format::c3040_gap2[] = +{ + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, // 1-17 + 8, 8, 8, 8, 8, 8, 8, // 18-24 + 15, 15, 15, 15, 15, 15, // 25-30 + 12, 12, 12, 12, 12 // 31-35 +}; + +floppy_image_format_t::desc_e* c3040_format::get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2) +{ + static floppy_image_format_t::desc_e desc[] = { + /* 00 */ { SECTOR_LOOP_START, 0, -1 }, + /* 01 */ { SYNC_GCR5, 2 }, + /* 02 */ { GCR5, 0x08, 1 }, + /* 03 */ { CRC, 1 }, + /* 04 */ { CRC_CBM_START, 1 }, + /* 05 */ { SECTOR_ID_GCR5 }, + /* 06 */ { TRACK_ID_DOS2_GCR5 }, + /* 07 */ { GCR5, id2, 1 }, + /* 08 */ { GCR5, id1, 1 }, + /* 09 */ { CRC_END, 1 }, + /* 10 */ { GCR5, 0x00, f.gap_1 }, + /* 11 */ { SYNC_GCR5, 2 }, + /* 12 */ { GCR5, 0x07, 1 }, + /* 13 */ { CRC_CBM_START, 2 }, + /* 14 */ { SECTOR_DATA_GCR5, -1 }, + /* 15 */ { CRC_END, 2 }, + /* 16 */ { CRC, 2 }, + /* 17 */ { GCR5, 0x00, gap_2 }, + /* 18 */ { SECTOR_LOOP_END }, + /* 19 */ { GCR5, 0x00, 0 }, + /* 20 */ { RAWBITS, 0x14a, 0 }, + /* 21 */ { END } + }; + + desc[17].p2 = gap_2; // TODO why?!? + + current_size = 20 + (1+1+4)*10 + f.gap_1*10 + 20 + (1+f.sector_base_size+1)*10 + gap_2*10; + + current_size *= sector_count; + return desc; +} + +void c3040_format::fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size) +{ + desc[19].p2 = remaining_size / 10; + desc[20].p2 = remaining_size % 10; + desc[20].p1 >>= remaining_size & 0x01; +} + +const floppy_format_type FLOPPY_C3040_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/c3040_dsk.h b/src/lib/formats/c3040_dsk.h new file mode 100644 index 00000000000..cbf320273a8 --- /dev/null +++ b/src/lib/formats/c3040_dsk.h @@ -0,0 +1,40 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c3040_dsk.h + + Commodore 3040 sector disk image format + +*********************************************************************/ + +#ifndef C3040_DSK_H_ +#define C3040_DSK_H_ + +#include "d64_dsk.h" + +class c3040_format : public d64_format { +public: + c3040_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +protected: + virtual int get_sectors_per_track(const format &f, int track) { return c3040_sectors_per_track[track]; } + virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); + virtual int get_gap2(const format &f, int head, int track) { return c3040_gap2[track]; } + virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); + + static const format file_formats[]; + + static const int c3040_gap2[]; + static const int c3040_sectors_per_track[]; +}; + +extern const floppy_format_type FLOPPY_C3040_FORMAT; + + + +#endif diff --git a/src/lib/formats/c4040_dsk.c b/src/lib/formats/c4040_dsk.c index da3ac905693..4def7e0c581 100644 --- a/src/lib/formats/c4040_dsk.c +++ b/src/lib/formats/c4040_dsk.c @@ -50,7 +50,7 @@ floppy_image_format_t::desc_e* c4040_format::get_sector_desc(const format &f, in { static floppy_image_format_t::desc_e desc[] = { /* 00 */ { SECTOR_LOOP_START, 0, -1 }, - /* 01 */ { RAWBYTE, 0xff, 5 }, + /* 01 */ { SYNC_GCR5, 4 }, /* 02 */ { GCR5, 0x08, 1 }, /* 03 */ { CRC, 1 }, /* 04 */ { CRC_CBM_START, 1 }, @@ -60,7 +60,7 @@ floppy_image_format_t::desc_e* c4040_format::get_sector_desc(const format &f, in /* 08 */ { GCR5, id1, 1 }, /* 09 */ { CRC_END, 1 }, /* 10 */ { GCR5, 0x00, f.gap_1 }, - /* 11 */ { RAWBYTE, 0xff, 5 }, + /* 11 */ { SYNC_GCR5, 4 }, /* 12 */ { GCR5, 0x07, 1 }, /* 13 */ { CRC_CBM_START, 2 }, /* 14 */ { SECTOR_DATA_GCR5, -1 }, diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c index 4de63b34bc8..531ce441b99 100644 --- a/src/lib/formats/d64_dsk.c +++ b/src/lib/formats/d64_dsk.c @@ -272,7 +272,7 @@ bool d64_format::save(io_generic *io, floppy_image *image) for(int track=0; track < f.track_count; track++) { int sector_count = this->get_sectors_per_track(f, track); int track_size = compute_track_size(f, track); - UINT8 sectdata[40*256]; + UINT8 sectdata[40*256] = { 0 }; desc_s sectors[40]; int offset = get_image_offset(f, head, track); diff --git a/src/lib/formats/d67_dsk.c b/src/lib/formats/d67_dsk.c deleted file mode 100644 index b512e55b694..00000000000 --- a/src/lib/formats/d67_dsk.c +++ /dev/null @@ -1,56 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************* - - formats/d67_dsk.c - - Commodore 2040 sector disk image format - -*********************************************************************/ - -#include - -#include "formats/d67_dsk.h" - -d67_format::d67_format() : d64_format(file_formats) -{ -} - -const char *d67_format::name() const -{ - return "d67"; -} - -const char *d67_format::description() const -{ - return "Commodore 2040 disk image"; -} - -const char *d67_format::extensions() const -{ - return "d67"; -} - -const d67_format::format d67_format::file_formats[] = { - { // d67, dos 1, 35 tracks, head 48 tpi, stepper 96 tpi - floppy_image::FF_525, floppy_image::SSSD, 690, 35, 1, 256, 9, 8 - }, - {} -}; - -const int d67_format::d67_sectors_per_track[] = -{ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, // 1-17 - 20, 20, 20, 20, 20, 20, 20, // 18-24 - 18, 18, 18, 18, 18, 18, // 25-30 - 17, 17, 17, 17, 17, // 31-35 - 17, 17, 17, 17, 17, // 36-40 - 17, 17 // 41-42 -}; - -int d67_format::get_sectors_per_track(const format &f, int track) -{ - return d67_sectors_per_track[track]; -} - -const floppy_format_type FLOPPY_D67_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/d67_dsk.h b/src/lib/formats/d67_dsk.h deleted file mode 100644 index c28c1a4d37f..00000000000 --- a/src/lib/formats/d67_dsk.h +++ /dev/null @@ -1,36 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************* - - formats/d67_dsk.h - - Commodore 2040 sector disk image format - -*********************************************************************/ - -#ifndef D67_DSK_H_ -#define D67_DSK_H_ - -#include "d64_dsk.h" - -class d67_format : public d64_format { -public: - d67_format(); - - virtual const char *name() const; - virtual const char *description() const; - virtual const char *extensions() const; - -protected: - virtual int get_sectors_per_track(const format &f, int track); - - static const format file_formats[]; - - static const int d67_sectors_per_track[]; -}; - -extern const floppy_format_type FLOPPY_D67_FORMAT; - - - -#endif -- cgit v1.2.3-70-g09d2 From 7fa10acca6551257163e1afd601059fed9333169 Mon Sep 17 00:00:00 2001 From: couriersud Date: Wed, 22 Apr 2015 00:45:21 +0200 Subject: Added 74192, 9316, 9310 and 74193 devices to netlist. Added breakout (wip) netlist as well, but still have to implement three more devices until work can really start. [Couriersud] --- nl_examples/breakout.c | 16 +- scripts/src/netlist.lua | 6 + scripts/target/mame/mame.lua | 1 + src/emu/netlist/devices/net_lib.c | 7 + src/emu/netlist/devices/net_lib.h | 3 + src/emu/netlist/devices/nld_74192.c | 133 +++ src/emu/netlist/devices/nld_74192.h | 64 ++ src/emu/netlist/devices/nld_74193.c | 133 +++ src/emu/netlist/devices/nld_74193.h | 61 ++ src/emu/netlist/devices/nld_9310.c | 228 +++++ src/emu/netlist/devices/nld_9310.h | 104 +++ src/emu/netlist/devices/nld_9316.c | 12 +- src/emu/netlist/devices/nld_legacy.c | 36 + src/emu/netlist/devices/nld_legacy.h | 15 + src/emu/netlist/nl_dice_compat.h | 47 ++ src/mame/drivers/nl_breakout.c | 1546 ++++++++++++++++++++++++++++++++++ src/mame/drivers/nl_pong.c | 1 + 17 files changed, 2402 insertions(+), 11 deletions(-) create mode 100644 src/emu/netlist/devices/nld_74192.c create mode 100644 src/emu/netlist/devices/nld_74192.h create mode 100644 src/emu/netlist/devices/nld_74193.c create mode 100644 src/emu/netlist/devices/nld_74193.h create mode 100644 src/emu/netlist/devices/nld_9310.c create mode 100644 src/emu/netlist/devices/nld_9310.h create mode 100644 src/mame/drivers/nl_breakout.c (limited to 'scripts/src') diff --git a/nl_examples/breakout.c b/nl_examples/breakout.c index b7b95edd210..2c8d9f3ccae 100644 --- a/nl_examples/breakout.c +++ b/nl_examples/breakout.c @@ -1,3 +1,6 @@ + +#define NETLIST_DEVELOPMENT 1 + #include "netlist/nl_dice_compat.h" #include "netlist/devices/net_lib.h" #include "netlist/analog/nld_twoterm.h" @@ -75,9 +78,9 @@ CIRCUIT_LAYOUT( breakout ) //CHIP("Y1", CLOCK_14_318_MHZ) //Y1 - CHIP("C32", CAPACITOR, &c32_desc) - CHIP("C36", CAPACITOR, &c36_desc) - CHIP("C37", CAPACITOR, &c37_desc) + CHIP_CAPACITOR(C32, &c32_desc) + CHIP_CAPACITOR(C36, &c36_desc) + CHIP_CAPACITOR(C37, &c37_desc) CHIP("PAD_EN_BUF", BUFFER, &pad_en_buf_desc) CHIP("A3", 7474) @@ -87,7 +90,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP_9602_Mono(A7, &a7_desc) CHIP_9602_Mono(A8, &a8_desc) - CHIP("B2", 555_Astable, &b2_555_desc) + CHIP_555_Astable(B2, &b2_555_desc) CHIP("B3", 7402) CHIP("B4", 9316) CHIP("B5", 74193) @@ -203,7 +206,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc) PADDLE_CONNECTION("PAD1", "C9") - CHIP("LATCH", LATCH) + CHIP_LATCH(LATCH) CHIP("COIN1", COIN_INPUT) //CHIP("COIN2", COIN_INPUT) @@ -1454,6 +1457,5 @@ CIRCUIT_LAYOUT( breakout ) CONNECTION("LOG1", 16, "L3", 6)*/ //N #endif - CIRCUIT_LAYOUT_END -}; +CIRCUIT_LAYOUT_END diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 2db67d68526..4aebef1f091 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -81,8 +81,14 @@ files { MAME_DIR .. "src/emu/netlist/devices/nld_74123.h", MAME_DIR .. "src/emu/netlist/devices/nld_74153.c", MAME_DIR .. "src/emu/netlist/devices/nld_74153.h", + MAME_DIR .. "src/emu/netlist/devices/nld_74192.c", + MAME_DIR .. "src/emu/netlist/devices/nld_74192.h", + MAME_DIR .. "src/emu/netlist/devices/nld_74193.c", + MAME_DIR .. "src/emu/netlist/devices/nld_74193.h", MAME_DIR .. "src/emu/netlist/devices/nld_74ls629.c", MAME_DIR .. "src/emu/netlist/devices/nld_74ls629.h", + MAME_DIR .. "src/emu/netlist/devices/nld_9310.c", + MAME_DIR .. "src/emu/netlist/devices/nld_9310.h", MAME_DIR .. "src/emu/netlist/devices/nld_9312.c", MAME_DIR .. "src/emu/netlist/devices/nld_9312.h", MAME_DIR .. "src/emu/netlist/devices/nld_9316.c", diff --git a/scripts/target/mame/mame.lua b/scripts/target/mame/mame.lua index ed4f2eda6f8..8bcd7db4ffe 100644 --- a/scripts/target/mame/mame.lua +++ b/scripts/target/mame/mame.lua @@ -980,6 +980,7 @@ files { MAME_DIR .. "src/mame/drivers/pong.c", MAME_DIR .. "src/mame/drivers/nl_pong.c", MAME_DIR .. "src/mame/drivers/nl_pongd.c", + MAME_DIR .. "src/mame/drivers/nl_breakout.c", MAME_DIR .. "src/mame/drivers/poolshrk.c", MAME_DIR .. "src/mame/audio/poolshrk.c", MAME_DIR .. "src/mame/video/poolshrk.c", diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index 1ef800e524b..1483f2d40cb 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -91,6 +91,7 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(gnd, GND, "-") ENTRY(switch2, SWITCH2, "-") ENTRY(nicRSFF, NETDEV_RSFF, "+S,R") + ENTRY(nicDelay, NETDEV_DELAY, "-") ENTRY(4020, CD_4020, "+IP,RESET,VDD,VSS") //ENTRY(4066, CD_4066, "+A,B") ENTRY(7400, TTL_7400_NAND, "+A,B") @@ -116,7 +117,10 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74107A, TTL_74107A, "+CLK,J,K,CLRQ") ENTRY(74123, TTL_74123, "-") ENTRY(74153, TTL_74153, "+C0,C1,C2,C3,A,B,G") + ENTRY(74192, TTL_74192, "-") + ENTRY(74193, TTL_74193, "-") ENTRY(SN74LS629, SN74LS629, "CAP") + ENTRY(9310, TTL_9310, "-") ENTRY(9312, TTL_9312, "-") ENTRY(9316, TTL_9316, "+CLK,ENP,ENT,CLRQ,LOADQ,A,B,C,D") ENTRY(NE555, NE555, "-") @@ -145,7 +149,10 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74107_dip, TTL_74107_DIP, "-") ENTRY(74123_dip, TTL_74123_DIP, "-") ENTRY(74153_dip, TTL_74153_DIP, "-") + ENTRY(74192_dip, TTL_74192_DIP, "-") + ENTRY(74193_dip, TTL_74193_DIP, "-") ENTRY(9602_dip, TTL_9602_DIP, "-") + ENTRY(9310_dip, TTL_9310_DIP, "-") ENTRY(9312_dip, TTL_9312_DIP, "-") ENTRY(9316_dip, TTL_9316_DIP, "-") ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2") diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index f66da6bb441..bc8db7201a2 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -78,7 +78,10 @@ #include "nld_74107.h" #include "nld_74123.h" #include "nld_74153.h" +#include "nld_74192.h" +#include "nld_74193.h" #include "nld_74ls629.h" +#include "nld_9310.h" #include "nld_9312.h" #include "nld_9316.h" diff --git a/src/emu/netlist/devices/nld_74192.c b/src/emu/netlist/devices/nld_74192.c new file mode 100644 index 00000000000..b1665cf2173 --- /dev/null +++ b/src/emu/netlist/devices/nld_74192.c @@ -0,0 +1,133 @@ +/* + * nld_74192.c + * + */ + +#define MAXCNT 9 + +#include "nld_74192.h" + +NETLIB_START(74192) +{ + register_input("A", m_A); + register_input("B", m_B); + register_input("C", m_C); + register_input("D", m_D); + register_input("CLEAR", m_CLEAR); + register_input("LOADQ", m_LOADQ); + register_input("CU", m_CU); + register_input("CD", m_CD); + + register_output("QA", m_Q[0]); + register_output("QB", m_Q[1]); + register_output("QC", m_Q[2]); + register_output("QD", m_Q[3]); + register_output("BORROWQ", m_BORROWQ); + register_output("CARRYQ", m_CARRYQ); + + save(NLNAME(m_cnt)); + save(NLNAME(m_last_CU)); + save(NLNAME(m_last_CD)); + +} + +NETLIB_RESET(74192) +{ + m_cnt = 0; + m_last_CU = 0; + m_last_CD = 0; +} + +// FIXME: Timing +static const netlist_time delay[4] = +{ + NLTIME_FROM_NS(18), + NLTIME_FROM_NS(36) - NLTIME_FROM_NS(18), + NLTIME_FROM_NS(54) - NLTIME_FROM_NS(18), + NLTIME_FROM_NS(72) - NLTIME_FROM_NS(18)}; + +NETLIB_UPDATE(74192) +{ + int tCarry = 1; + int tBorrow = 1; + if (INPLOGIC(m_CLEAR)) + { + m_cnt = 0; + } + else if (!INPLOGIC(m_LOADQ)) + { + m_cnt = (INPLOGIC(m_D) << 3) | (INPLOGIC(m_C) << 2) + | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_D) << 0); + } + else + { + if (INPLOGIC(m_CD) && !m_last_CU && INPLOGIC(m_CU)) + { + m_cnt++; + if (m_cnt > MAXCNT) + m_cnt = 0; + } + else if (INPLOGIC(m_CD) && m_last_CU && !INPLOGIC(m_CU)) + { + if (m_cnt == MAXCNT) + tCarry = 0; + } + if (INPLOGIC(m_CU) && !m_last_CD && INPLOGIC(m_CD)) + { + if (m_cnt > 0) + m_cnt--; + else + m_cnt = MAXCNT; + } + else if (INPLOGIC(m_CU) && m_last_CD && !INPLOGIC(m_CD)) + { + if (m_cnt == 0) + tBorrow = 0; + } + } + + m_last_CD = INPLOGIC(m_CD); + m_last_CU = INPLOGIC(m_CU); + + for (int i=0; i<4; i++) + OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); + + OUTLOGIC(m_BORROWQ, tBorrow, NLTIME_FROM_NS(20)); //FIXME + OUTLOGIC(m_CARRYQ, tCarry, NLTIME_FROM_NS(20)); //FIXME +} + +NETLIB_FUNC_VOID(74192, update_outputs, (void)) +{ +} + +NETLIB_START(74192_dip) +{ + NETLIB_NAME(74192)::start(); + + register_subalias("1", m_B); + register_subalias("2", m_Q[1]); + register_subalias("3", m_Q[0]); + register_subalias("4", m_CD); + register_subalias("5", m_CU); + register_subalias("6", m_Q[2]); + register_subalias("7", m_Q[3]); + + register_subalias("9", m_D); + register_subalias("10", m_C); + register_subalias("11", m_LOADQ); + register_subalias("12", m_CARRYQ); + register_subalias("13", m_BORROWQ); + register_subalias("14", m_CLEAR); + register_subalias("15", m_A); + +} + +NETLIB_UPDATE(74192_dip) +{ + NETLIB_NAME(74192)::update(); +} + +NETLIB_RESET(74192_dip) +{ + NETLIB_NAME(74192)::reset(); +} diff --git a/src/emu/netlist/devices/nld_74192.h b/src/emu/netlist/devices/nld_74192.h new file mode 100644 index 00000000000..017d51f558b --- /dev/null +++ b/src/emu/netlist/devices/nld_74192.h @@ -0,0 +1,64 @@ +// 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_ + +#include "../nl_base.h" + +#define TTL_74192(_name) \ + NET_REGISTER_DEV(74192, _name) + +#define TTL_74192_DIP(_name) \ + NET_REGISTER_DEV(74192_dip, _name) + +NETLIB_DEVICE(74192, + ATTR_HOT void update_outputs(); + + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; + netlist_ttl_input_t m_CLEAR; + netlist_ttl_input_t m_LOADQ; + netlist_ttl_input_t m_CU; + netlist_ttl_input_t m_CD; + + netlist_state_t m_cnt; + netlist_state_t m_last_CU; + netlist_state_t m_last_CD; + + netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_BORROWQ; + netlist_ttl_output_t m_CARRYQ; +); + +NETLIB_DEVICE_DERIVED(74192_dip, 74192, +); + +#endif /* NLD_74192_H_ */ diff --git a/src/emu/netlist/devices/nld_74193.c b/src/emu/netlist/devices/nld_74193.c new file mode 100644 index 00000000000..abe3238585a --- /dev/null +++ b/src/emu/netlist/devices/nld_74193.c @@ -0,0 +1,133 @@ +/* + * nld_74193.c + * + */ + +#define MAXCNT 15 + +#include "nld_74193.h" + +NETLIB_START(74193) +{ + register_input("A", m_A); + register_input("B", m_B); + register_input("C", m_C); + register_input("D", m_D); + register_input("CLEAR", m_CLEAR); + register_input("LOADQ", m_LOADQ); + register_input("CU", m_CU); + register_input("CD", m_CD); + + register_output("QA", m_Q[0]); + register_output("QB", m_Q[1]); + register_output("QC", m_Q[2]); + register_output("QD", m_Q[3]); + register_output("BORROWQ", m_BORROWQ); + register_output("CARRYQ", m_CARRYQ); + + save(NLNAME(m_cnt)); + save(NLNAME(m_last_CU)); + save(NLNAME(m_last_CD)); + +} + +NETLIB_RESET(74193) +{ + m_cnt = 0; + m_last_CU = 0; + m_last_CD = 0; +} + +// FIXME: Timing +static const netlist_time delay[4] = +{ + NLTIME_FROM_NS(18), + NLTIME_FROM_NS(36) - NLTIME_FROM_NS(18), + NLTIME_FROM_NS(54) - NLTIME_FROM_NS(18), + NLTIME_FROM_NS(72) - NLTIME_FROM_NS(18)}; + +NETLIB_UPDATE(74193) +{ + int tCarry = 1; + int tBorrow = 1; + if (INPLOGIC(m_CLEAR)) + { + m_cnt = 0; + } + else if (!INPLOGIC(m_LOADQ)) + { + m_cnt = (INPLOGIC(m_D) << 3) | (INPLOGIC(m_C) << 2) + | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_D) << 0); + } + else + { + if (INPLOGIC(m_CD) && !m_last_CU && INPLOGIC(m_CU)) + { + m_cnt++; + if (m_cnt > MAXCNT) + m_cnt = 0; + } + else if (INPLOGIC(m_CD) && m_last_CU && !INPLOGIC(m_CU)) + { + if (m_cnt == MAXCNT) + tCarry = 0; + } + if (INPLOGIC(m_CU) && !m_last_CD && INPLOGIC(m_CD)) + { + if (m_cnt > 0) + m_cnt--; + else + m_cnt = MAXCNT; + } + else if (INPLOGIC(m_CU) && m_last_CD && !INPLOGIC(m_CD)) + { + if (m_cnt == 0) + tBorrow = 0; + } + } + + m_last_CD = INPLOGIC(m_CD); + m_last_CU = INPLOGIC(m_CU); + + for (int i=0; i<4; i++) + OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); + + OUTLOGIC(m_BORROWQ, tBorrow, NLTIME_FROM_NS(20)); //FIXME + OUTLOGIC(m_CARRYQ, tCarry, NLTIME_FROM_NS(20)); //FIXME +} + +NETLIB_FUNC_VOID(74193, update_outputs, (void)) +{ +} + +NETLIB_START(74193_dip) +{ + NETLIB_NAME(74193)::start(); + + register_subalias("1", m_B); + register_subalias("2", m_Q[1]); + register_subalias("3", m_Q[0]); + register_subalias("4", m_CD); + register_subalias("5", m_CU); + register_subalias("6", m_Q[2]); + register_subalias("7", m_Q[3]); + + register_subalias("9", m_D); + register_subalias("10", m_C); + register_subalias("11", m_LOADQ); + register_subalias("12", m_CARRYQ); + register_subalias("13", m_BORROWQ); + register_subalias("14", m_CLEAR); + register_subalias("15", m_A); + +} + +NETLIB_UPDATE(74193_dip) +{ + NETLIB_NAME(74193)::update(); +} + +NETLIB_RESET(74193_dip) +{ + NETLIB_NAME(74193)::reset(); +} diff --git a/src/emu/netlist/devices/nld_74193.h b/src/emu/netlist/devices/nld_74193.h new file mode 100644 index 00000000000..92d97c1f6fb --- /dev/null +++ b/src/emu/netlist/devices/nld_74193.h @@ -0,0 +1,61 @@ +// 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_ + +#include "../nl_base.h" + +#define TTL_74193(_name) \ + NET_REGISTER_DEV(74193, _name) + +#define TTL_74193_DIP(_name) \ + NET_REGISTER_DEV(74193_dip, _name) + +NETLIB_DEVICE(74193, + ATTR_HOT void update_outputs(); + + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; + netlist_ttl_input_t m_CLEAR; + netlist_ttl_input_t m_LOADQ; + netlist_ttl_input_t m_CU; + netlist_ttl_input_t m_CD; + + netlist_state_t m_cnt; + netlist_state_t m_last_CU; + netlist_state_t m_last_CD; + + netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_BORROWQ; + netlist_ttl_output_t m_CARRYQ; +); + +NETLIB_DEVICE_DERIVED(74193_dip, 74193, +); + +#endif /* NLD_74193_H_ */ diff --git a/src/emu/netlist/devices/nld_9310.c b/src/emu/netlist/devices/nld_9310.c new file mode 100644 index 00000000000..f6d35ac92e6 --- /dev/null +++ b/src/emu/netlist/devices/nld_9310.c @@ -0,0 +1,228 @@ +/* + * nld_9310.c + * + */ + +#include "nld_9310.h" + +#define MAXCNT 9 + +NETLIB_START(9310) +{ + register_sub(subABCD, "subABCD"); + sub.m_ABCD = &subABCD; + register_sub(sub, "sub"); + + register_subalias("CLK", sub.m_CLK); + + register_input("ENP", m_ENP); + register_input("ENT", m_ENT); + register_input("CLRQ", m_CLRQ); + register_input("LOADQ", m_LOADQ); + + register_subalias("A", subABCD.m_A); + register_subalias("B", subABCD.m_B); + register_subalias("C", subABCD.m_C); + register_subalias("D", subABCD.m_D); + + register_subalias("QA", sub.m_QA); + register_subalias("QB", sub.m_QB); + register_subalias("QC", sub.m_QC); + register_subalias("QD", sub.m_QD); + register_subalias("RC", sub.m_RC); + +} + +NETLIB_RESET(9310) +{ + sub.do_reset(); + subABCD.do_reset(); +} + +NETLIB_START(9310_subABCD) +{ + register_input("A", m_A); + register_input("B", m_B); + register_input("C", m_C); + register_input("D", m_D); + +} + +NETLIB_RESET(9310_subABCD) +{ + m_A.inactivate(); + m_B.inactivate(); + m_C.inactivate(); + m_D.inactivate(); +} + +ATTR_HOT inline UINT8 NETLIB_NAME(9310_subABCD::read_ABCD)() +{ + return (INPLOGIC_PASSIVE(m_D) << 3) | (INPLOGIC_PASSIVE(m_C) << 2) | (INPLOGIC_PASSIVE(m_B) << 1) | (INPLOGIC_PASSIVE(m_A) << 0); +} + +NETLIB_UPDATE(9310_subABCD) +{ +} + +NETLIB_START(9310_sub) +{ + register_input("CLK", m_CLK); + + register_output("QA", m_QA); + register_output("QB", m_QB); + register_output("QC", m_QC); + register_output("QD", m_QD); + register_output("RC", m_RC); + + save(NLNAME(m_cnt.ref())); + save(NLNAME(m_loadq.ref())); + save(NLNAME(m_ent.ref())); +} + +NETLIB_RESET(9310_sub) +{ + m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_cnt = 0; + m_loadq = 1; + m_ent = 1; +} + +NETLIB_UPDATE(9310_sub) +{ + UINT8 cnt = m_cnt; + if (m_loadq) + { + cnt++; + if (cnt > MAXCNT) + cnt = 0; + update_outputs(cnt); + OUTLOGIC(m_RC, m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(20)); +#if 0 + if (cnt == 0x0f) + OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); + else if (cnt == 0) + OUTLOGIC(m_RC, 0, NLTIME_FROM_NS(20)); +#endif + } + else + { + cnt = m_ABCD.get()->read_ABCD(); + update_outputs_all(cnt); + OUTLOGIC(m_RC, m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(20)); + } + m_cnt = cnt; +} + +NETLIB_UPDATE(9310) +{ + sub.m_loadq = INPLOGIC(m_LOADQ); + sub.m_ent = INPLOGIC(m_ENT); + const netlist_sig_t clrq = INPLOGIC(m_CLRQ); + + if ((!sub.m_loadq || (sub.m_ent & INPLOGIC(m_ENP))) && clrq) + { + sub.m_CLK.activate_lh(); + } + else + { + UINT8 cnt = sub.m_cnt; + sub.m_CLK.inactivate(); + if (!clrq && (cnt>0)) + { + cnt = 0; + sub.update_outputs(cnt); + //OUTLOGIC(sub.m_RC, 0, NLTIME_FROM_NS(20)); + sub.m_cnt = cnt; + //return; + } + } + OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == MAXCNT), NLTIME_FROM_NS(20)); +} + +inline NETLIB_FUNC_VOID(9310_sub, update_outputs_all, (const UINT8 cnt)) +{ + const netlist_time out_delay = NLTIME_FROM_NS(20); + OUTLOGIC(m_QA, (cnt >> 0) & 1, out_delay); + OUTLOGIC(m_QB, (cnt >> 1) & 1, out_delay); + OUTLOGIC(m_QC, (cnt >> 2) & 1, out_delay); + OUTLOGIC(m_QD, (cnt >> 3) & 1, out_delay); +} + +inline NETLIB_FUNC_VOID(9310_sub, update_outputs, (const UINT8 cnt)) +{ + const netlist_time out_delay = NLTIME_FROM_NS(20); +#if 1 +// for (int i=0; i<4; i++) +// OUTLOGIC(m_Q[i], (cnt >> i) & 1, delay[i]); + OUTLOGIC(m_QA, (cnt >> 0) & 1, out_delay); + OUTLOGIC(m_QB, (cnt >> 1) & 1, out_delay); + OUTLOGIC(m_QC, (cnt >> 2) & 1, out_delay); + OUTLOGIC(m_QD, (cnt >> 3) & 1, out_delay); +#else + if ((cnt & 1) == 1) + OUTLOGIC(m_QA, 1, out_delay); + else + { + OUTLOGIC(m_QA, 0, out_delay); + switch (cnt) + { + case 0x00: + OUTLOGIC(m_QB, 0, out_delay); + OUTLOGIC(m_QC, 0, out_delay); + OUTLOGIC(m_QD, 0, out_delay); + break; + case 0x02: + case 0x06: + case 0x0A: + case 0x0E: + OUTLOGIC(m_QB, 1, out_delay); + break; + case 0x04: + case 0x0C: + OUTLOGIC(m_QB, 0, out_delay); + OUTLOGIC(m_QC, 1, out_delay); + break; + case 0x08: + OUTLOGIC(m_QB, 0, out_delay); + OUTLOGIC(m_QC, 0, out_delay); + OUTLOGIC(m_QD, 1, out_delay); + break; + } + + } +#endif +} + +NETLIB_START(9310_dip) +{ + NETLIB_NAME(9310)::start(); + + register_subalias("1", m_CLRQ); + register_subalias("2", sub.m_CLK); + register_subalias("3", subABCD.m_A); + register_subalias("4", subABCD.m_B); + register_subalias("5", subABCD.m_C); + register_subalias("6", subABCD.m_D); + register_subalias("7", m_ENP); + // register_subalias("8", ); --> GND + + register_subalias("9", m_LOADQ); + register_subalias("10", m_ENT); + register_subalias("11", sub.m_QD); + register_subalias("12", sub.m_QC); + register_subalias("13", sub.m_QB); + register_subalias("14", sub.m_QA); + register_subalias("15", sub.m_RC); + // register_subalias("16", ); --> VCC +} + +NETLIB_UPDATE(9310_dip) +{ + NETLIB_NAME(9310)::update(); +} + +NETLIB_RESET(9310_dip) +{ + NETLIB_NAME(9310)::reset(); +} diff --git a/src/emu/netlist/devices/nld_9310.h b/src/emu/netlist/devices/nld_9310.h new file mode 100644 index 00000000000..ce83b1e1a69 --- /dev/null +++ b/src/emu/netlist/devices/nld_9310.h @@ -0,0 +1,104 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_9310.h + * + * DM9310: Synchronous 4-Bit Counters + * + * FIXME: This should be merged with the 9316. The only difference is MAXCNT! + * + * +--------------+ + * 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 diagramm) + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_9310_H_ +#define NLD_9310_H_ + +#include "../nl_base.h" + +#define TTL_9310(_name, _CLK, _ENP, _ENT, _CLRQ, _LOADQ, _A, _B, _C, _D) \ + NET_REGISTER_DEV(9310, _name) \ + NET_CONNECT(_name, CLK, _CLK) \ + NET_CONNECT(_name, ENP, _ENP) \ + NET_CONNECT(_name, ENT, _ENT) \ + NET_CONNECT(_name, CLRQ, _CLRQ) \ + NET_CONNECT(_name, LOADQ,_LOADQ) \ + NET_CONNECT(_name, A, _A) \ + NET_CONNECT(_name, B, _B) \ + NET_CONNECT(_name, C, _C) \ + NET_CONNECT(_name, D, _D) + +#define TTL_9310_DIP(_name) \ + NET_REGISTER_DEV(9310_dip, _name) + +NETLIB_SUBDEVICE(9310_subABCD, + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; + + ATTR_HOT inline UINT8 read_ABCD(); +); + +NETLIB_SUBDEVICE(9310_sub, + ATTR_HOT void update_outputs_all(const UINT8 cnt); + ATTR_HOT void update_outputs(const UINT8 cnt); + + netlist_ttl_input_t m_CLK; + + netlist_state_t m_cnt; + netlist_state_t m_ABCD; + netlist_state_t m_loadq; + netlist_state_t m_ent; + + netlist_ttl_output_t m_QA; + netlist_ttl_output_t m_QB; + netlist_ttl_output_t m_QC; + netlist_ttl_output_t m_QD; + netlist_ttl_output_t m_RC; +); + +NETLIB_DEVICE(9310, + NETLIB_NAME(9310_sub) sub; + NETLIB_NAME(9310_subABCD) subABCD; + netlist_ttl_input_t m_ENP; + netlist_ttl_input_t m_ENT; + netlist_ttl_input_t m_CLRQ; + netlist_ttl_input_t m_LOADQ; +); + +NETLIB_DEVICE_DERIVED(9310_dip, 9310, +); + +#endif /* NLD_9310_H_ */ diff --git a/src/emu/netlist/devices/nld_9316.c b/src/emu/netlist/devices/nld_9316.c index 017ee599f26..d339bbc083c 100644 --- a/src/emu/netlist/devices/nld_9316.c +++ b/src/emu/netlist/devices/nld_9316.c @@ -5,6 +5,8 @@ #include "nld_9316.h" +#define MAXCNT 15 + NETLIB_START(9316) { register_sub(subABCD, "subABCD"); @@ -91,9 +93,11 @@ NETLIB_UPDATE(9316_sub) UINT8 cnt = m_cnt; if (m_loadq) { - cnt = ( cnt + 1) & 0x0f; + cnt++; + if (cnt > MAXCNT) + cnt = 0; update_outputs(cnt); - OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20)); + OUTLOGIC(m_RC, m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(20)); #if 0 if (cnt == 0x0f) OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); @@ -105,7 +109,7 @@ NETLIB_UPDATE(9316_sub) { cnt = m_ABCD.get()->read_ABCD(); update_outputs_all(cnt); - OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20)); + OUTLOGIC(m_RC, m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(20)); } m_cnt = cnt; } @@ -133,7 +137,7 @@ NETLIB_UPDATE(9316) //return; } } - OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == 0x0f), NLTIME_FROM_NS(20)); + OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == MAXCNT), NLTIME_FROM_NS(20)); } inline NETLIB_FUNC_VOID(9316_sub, update_outputs_all, (const UINT8 cnt)) diff --git a/src/emu/netlist/devices/nld_legacy.c b/src/emu/netlist/devices/nld_legacy.c index e73aff6530b..6ac685fcda8 100644 --- a/src/emu/netlist/devices/nld_legacy.c +++ b/src/emu/netlist/devices/nld_legacy.c @@ -33,3 +33,39 @@ NETLIB_UPDATE(nicRSFF) OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(20)); } } + +NETLIB_START(nicDelay) +{ + register_input("1", m_I); + register_output("2", m_Q); + + register_param("L_TO_H", m_L_to_H, 10); + register_param("H_TO_L", m_H_to_L, 10); + + save(NLNAME(m_last)); + +} + +NETLIB_RESET(nicDelay) +{ + m_Q.initial(0); +} + +NETLIB_UPDATE_PARAM(nicDelay) +{ + +} + +NETLIB_UPDATE(nicDelay) +{ + if (INPLOGIC(m_I) && !m_last) + { + // L_to_H + OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(m_L_to_H.Value())); + } + else if (!INPLOGIC(m_I) && m_last) + { + OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(m_H_to_L.Value())); + } + m_last = INPLOGIC(m_I); +} diff --git a/src/emu/netlist/devices/nld_legacy.h b/src/emu/netlist/devices/nld_legacy.h index 3ea50f601fd..f9e085bf65f 100644 --- a/src/emu/netlist/devices/nld_legacy.h +++ b/src/emu/netlist/devices/nld_legacy.h @@ -22,6 +22,9 @@ #define NETDEV_RSFF(_name) \ NET_REGISTER_DEV(nicRSFF, _name) +#define NETDEV_DELAY(_name) \ + NET_REGISTER_DEV(nicDelay, _name) + // ---------------------------------------------------------------------------------------- // Devices ... // ---------------------------------------------------------------------------------------- @@ -35,4 +38,16 @@ NETLIB_DEVICE(nicRSFF, ); +NETLIB_DEVICE_WITH_PARAMS(nicDelay, + netlist_ttl_input_t m_I; + + netlist_ttl_output_t m_Q; + + netlist_param_int_t m_L_to_H; + netlist_param_int_t m_H_to_L; + + netlist_state_t m_last; +); + + #endif /* NLD_LEGACY_H_ */ diff --git a/src/emu/netlist/nl_dice_compat.h b/src/emu/netlist/nl_dice_compat.h index 917edad4cbb..9ce20d121ef 100644 --- a/src/emu/netlist/nl_dice_compat.h +++ b/src/emu/netlist/nl_dice_compat.h @@ -35,8 +35,12 @@ #define CIRCUIT_LAYOUT_END NETLIST_END() +#define OHM(x) (x) #define K_OHM(x) ((x) * 1000.0) +#define M_OHM(x) ((x) * 1.0e6) #define U_FARAD(x) ((x) * 1.0e-6) +#define N_FARAD(x) ((x) * 1.0e-9) +#define P_FARAD(x) ((x) * 1.0e-12) struct Mono555Desc { @@ -46,6 +50,14 @@ public: Mono555Desc(nl_double res, nl_double cap) : r(res), c(cap) { } }; +struct Astable555Desc +{ +public: + nl_double r1, r2, c; + + Astable555Desc(nl_double res1, nl_double res2, nl_double cap) : r1(res1), r2(res2), c(cap) { } +}; + struct Mono9602Desc { public: @@ -63,6 +75,12 @@ public: SeriesRCDesc(nl_double res, nl_double cap) : r(res), c(cap) { } }; +struct CapacitorDesc : public SeriesRCDesc +{ +public: + CapacitorDesc(nl_double cap) : SeriesRCDesc(0.0, cap) { } +}; + #define CHIP_555_Mono(_name, _pdesc) \ CHIP(# _name, NE555) \ NET_C(_name.6, _name.7) \ @@ -75,6 +93,21 @@ public: NET_C(_name.8, V5) \ NET_CSTR(# _name ".1", "GND") +#define CHIP_555_Astable(_name, _pdesc) \ + CHIP(# _name, NE555) \ + NET_C(_name.6, _name.2) \ + RES(_name ## _R1, (_pdesc)->r1) \ + RES(_name ## _R2, (_pdesc)->r2) \ + CAP(_name ## _C, (_pdesc)->c) \ + NET_C(_name.7, _name ## _R1.1) \ + NET_C(_name.7, _name ## _R2.1) \ + NET_C(_name.6, _name ## _R2.2) \ + NET_C(_name.6, _name ## _C.1) \ + NET_C(_name ## _R1.2, V5) \ + NET_CSTR(# _name "_C.2", "GND") \ + NET_C(_name.8, V5) \ + NET_CSTR(# _name ".1", "GND") + #define CHIP_9602_Mono(_name, _pdesc) \ CHIP(# _name, 9602) \ NET_C(VCC, _name.16) \ @@ -118,6 +151,20 @@ public: ALIAS(_name.2, _name.S) \ ALIAS(_name.3, _name.QQ) +/* FIXME: Alternative implementation using capacitor. + * This is a transitional implementation + */ + +inline int CAPACITOR_tc(const double c, const double r) +{ + static const double TIME_CONSTANT = -log((3.4 - 2.0) / 3.4); + return (int) (TIME_CONSTANT * (130.0 + r) * c * 1e9); +} + +#define CHIP_CAPACITOR(_name, _pdesc) \ + NETDEV_DELAY(_name) \ + NETDEV_PARAMI(_name, L_TO_H, CAPACITOR_tc((_pdesc)->c, (_pdesc)->r)) \ + NETDEV_PARAMI(_name, H_TO_HL, CAPACITOR_tc((_pdesc)->c, (_pdesc)->r)) \ #endif /* NL_DICE_COMPAT_H_ */ diff --git a/src/mame/drivers/nl_breakout.c b/src/mame/drivers/nl_breakout.c new file mode 100644 index 00000000000..be56fd611f4 --- /dev/null +++ b/src/mame/drivers/nl_breakout.c @@ -0,0 +1,1546 @@ +// license:MAME,GPL-2.0+ +// copyright-holders:DICE Team,couriersud +/* + * Changelog: + * - Added discrete paddle potentiometers (couriersud) + * - Changes made to run in MAME (couriersud) + * - Original version imported from DICE + * + * TODO: + * - implement trimmers + * + * The MAME team has asked for and received written confirmation from the + * author of DICE to use, modify and redistribute code under + * a dual licensing scheme: + * + * * The licensing terms of MAME apply to this piece of code for the MAME + * project and derivative works, as defined by the MAME license. You + * may opt to make modifications, improvements or derivative works under + * that same conditions, and the MAME project may opt to keep + * modifications, improvements or derivatives under their terms exclusively. + * + * - Alternatively you can choose to apply the terms of the "GPL" (see + * below) to this - and only this - piece of code or your derivative works. + * Note that in no case your choice can have any impact on any other + * source code of the MAME project, or binary, or executable, be it closely + * or losely related to this piece of code. + * + * - GPL (GNU General Public License) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * - DICE itself is licensed under version 3 of the GNU General Public License. + * Under no circumstances the exemptions listed above shall apply to any + * other code of DICE not contained in this file. + * + * The following is an extract from the DICE readme. + * + * ---------------------------------------------------------------------------- + * + * DICE is a Discrete Integrated Circuit Emulator. It emulates computer systems + * that lack any type of CPU, consisting only of discrete logic components. + * + * Project Page: http://sourceforge.net/projects/dice/ + * Email: dice.emulator@gmail.com + * + * License + * + * Copyright (C) 2008-2013 DICE Team + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + */ + +// identify unknown devices in IDE + +#if 0 +#define NETLIST_DEVELOPMENT 1 + +#include "netlist/nl_dice_compat.h" +#include "netlist/devices/net_lib.h" +#include "netlist/analog/nld_twoterm.h" + +//2 555 timers +static Astable555Desc b2_555_desc(OHM(560.0), M_OHM(1.8), U_FARAD(0.1)); + +static Mono555Desc c9_555_desc(OHM(47.0), U_FARAD(1.0)); // R33, C21 + +//check these values +//static Paddle1HorizontalDesc pad1_desc(15047.0, 47.0, &c9_555_desc); + +static CapacitorDesc c32_desc(U_FARAD(0.1)); +static CapacitorDesc c36_desc(N_FARAD(1.0)); //0.001uF = 1nF +static CapacitorDesc c37_desc(P_FARAD(330.0)); + +#if 0 +static BufferDesc pad_en_buf_desc(DELAY_NS(15.0), DELAY_NS(15.0)); // Prevents 12ns glitch on PAD_EN_n signal from resetting C9. TODO: is this accurate? +#endif + +#if 0 +static VIDEO_DESC( breakout ) + VIDEO_RESISTANCE(1, K_OHM(0.0)) + VIDEO_RESISTANCE(2, K_OHM(3.9)) + VIDEO_RESISTANCE(3, K_OHM(3.9)) + VIDEO_RESISTANCE(4, K_OHM(3.9)) + VIDEO_RESISTANCE(5, K_OHM(3.9)) + VIDEO_RESISTANCE(6, K_OHM(3.9)) + //VIDEO_RESISTANCE(Video::HBLANK_PIN, K_OHM(0.0)) + VIDEO_ORIENTATION(ROTATE_90) + VIDEO_CONTRAST(4.0) + + // Values guessed based on screenshots. TODO: Make more accurate + // X, Y, W, H, R, G, B + VIDEO_OVERLAY( 15.570e-6, 0.0, 1.911e-6, -1.0, 0.80, 0.15, 0.05 ) // Red Bricks + VIDEO_OVERLAY( 17.481e-6, 0.0, 1.956e-6, -1.0, 0.95, 0.65, 0.05 ) // Amber Bricks + VIDEO_OVERLAY( 19.437e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.25 ) // Green Bricks + VIDEO_OVERLAY( 21.393e-6, 0.0, 1.955e-6, -1.0, 0.95, 0.95, 0.20 ) // Yellow Bricks + VIDEO_OVERLAY( 51.345e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.95 ) // Blue Paddle + + // TODO: Different overlays for cocktail cabinet +VIDEO_DESC_END + +static AUDIO_DESC( breakout ) + AUDIO_RESISTANCE(1, K_OHM(47.0)) + AUDIO_RESISTANCE(2, K_OHM(47.0)) + AUDIO_RESISTANCE(3, K_OHM(47.0)) + AUDIO_RESISTANCE(4, K_OHM(47.0)) + AUDIO_GAIN(3.0) +VIDEO_DESC_END +#endif + +static Mono9602Desc n8_desc(K_OHM(33.0), U_FARAD(100.0), K_OHM(5.6), P_FARAD(0.01)); // No capacitor on 2nd 9602, assume very low internal capacitance +static Mono9602Desc f3_desc(K_OHM(47.0), U_FARAD(1.0), K_OHM(47.0), U_FARAD(1.0)); + +static Mono9602Desc a7_desc(K_OHM(68.0), U_FARAD(1.0), K_OHM(22.0), U_FARAD(10.0)); +static Mono9602Desc a8_desc(K_OHM(27.0), U_FARAD(1.0), K_OHM(27.0), U_FARAD(1.0)); + +#if 0 +static Dipswitch53137Desc dipswitch1_desc("bonus_credit", "Bonus Credit", 3, "None", "100", "200", "300", "400", "500", "600", "700", "800"); +#endif + +//static DipswitchDesc dipswitch2_desc("cabinet_type", "Cabinet Type", 0, "Normal", "Cocktail"); +//static DipswitchDesc dipswitch3_desc("coinage", "Coinage", 0, "1 Coin / 1 Credit", "1 Coin / 2 Credits"); +//static DipswitchDesc dipswitch4_desc("ball_count", "Ball Count", 0, "3", "5"); + +CIRCUIT_LAYOUT( breakout ) +#if 0 + CHIP("S1", 53137, &dipswitch1_desc) + CHIP("S2", DIPSWITCH, &dipswitch2_desc) + CHIP("S3", DIPSWITCH, &dipswitch3_desc) + CHIP("S4", DIPSWITCH, &dipswitch4_desc) +#endif + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-7) // works and is sufficient + //CHIP("CLOCK", CLOCK_14_318_MHZ) + MAINCLOCK(Y1, 14318000.0) + + ANALOG_INPUT(V5, 5) +#define VCC "V5", Q +#define GND "GND", Q + + //CHIP("Y1", CLOCK_14_318_MHZ) //Y1 + + CHIP_CAPACITOR(C32, &c32_desc) + CHIP_CAPACITOR(C36, &c36_desc) + CHIP_CAPACITOR(C37, &c37_desc) +#if 0 + CHIP("PAD_EN_BUF", BUFFER, &pad_en_buf_desc) +#endif + CHIP("A3", 7474) + CHIP("A4", 7408) + CHIP("A5", 7400) + CHIP("A6", 7474) + CHIP_9602_Mono(A7, &a7_desc) + CHIP_9602_Mono(A8, &a8_desc) + + CHIP_555_Astable(B2, &b2_555_desc) + CHIP("B3", 7402) + CHIP("B4", 9316) + CHIP("B5", 74193) + CHIP("B6", 7400) + CHIP("B7", 9316) + CHIP("B8", 9316) + CHIP("B9", 7408) + + CHIP("C2", 7400) + CHIP("C3", 7400) + CHIP("C4", 7486) + CHIP("C5", 7404) + CHIP("C6", 7486) + CHIP("C7", 9316) + CHIP("C8", 9316) + CHIP_555_Mono(C9, &c9_555_desc) + + CHIP("D2", 7432) + CHIP("D3", 7474) + CHIP("D4", 9316) + CHIP("D5", 7474) + CHIP("D6", 7408) + CHIP("D7", 7411) + CHIP("D8", 7400) +// CHIP("D9", 4016) //quad bilateral switch + + CHIP("E1", 7404) + CHIP("E2", 7486) + CHIP("E3", 7402) + CHIP("E4", 7432) + CHIP("E5", 7408) + CHIP("E6", 7474) + CHIP("E7", 7402) + CHIP("E8", 7474) + CHIP("E9", 7404) + + CHIP("F1", 9316) + CHIP("F2", 7411) + CHIP_9602_Mono(F3, &f3_desc) + CHIP("F4", 7474) + CHIP("F5", 7474) + CHIP("F6", 74193) + CHIP("F7", 74279) + CHIP("F8", 7474) + CHIP("F9", 7404) + + CHIP("H1", 7437) + CHIP("H2", 7408) + CHIP("H3", 7427) + CHIP("H4", 7400) + CHIP("H5", 9312) + CHIP("H6", 9310) + CHIP("H7", 7408) //sometimes looks like N7 on schematic + CHIP("H8", 7474) + CHIP("H9", 7474) + + CHIP("J1", 74175) + CHIP("J2", 7404) + CHIP("J3", 7402) + CHIP("J4", 9312) + CHIP("J5", 7448) + CHIP("J6", 9310) + CHIP("J7", 7420) + CHIP("J8", 74279) + CHIP("J9", 7410) + + CHIP("K1", 9316) + CHIP("K2", 7486) + CHIP("K3", 7430) + CHIP("K4", 7408) + CHIP("K5", 9312) + CHIP("K6", 9310) + CHIP("K7", 7486) + CHIP("K8", 7474) //TODO: one more than bom? + CHIP("K9", 74107) + + CHIP("L1", 9316) + CHIP("L2", 7486) + CHIP("L3", 82S16) //RAM + CHIP("L4", 7411) + CHIP("L5", 9312) + CHIP("L6", 9310) + CHIP("L7", 7486) + CHIP("L8", 74193) + CHIP("L9", 7400) //TODO: 1 more chip than on bom? + + CHIP("M1", 9316) + CHIP("M2", 7483) + CHIP("M3", 7486) + CHIP("M4", 7410) + CHIP("M5", 9312) + CHIP("M6", 9310) + CHIP("M8", 7427) + CHIP("M9", 7404) + + CHIP("N1", 9316) + CHIP("N2", 7483) + CHIP("N3", 7486) + CHIP("N4", 7411) + CHIP("N5", 9312) + CHIP("N6", 9310) + CHIP("N7", 7408) //sometimes looks like H7 on schematic + CHIP_9602_Mono(N8, &n8_desc) + CHIP("N9", 74192) + + //LM380 //speaker amplifier + //LM323 //regulator + +// CHIP("CREDIT_LIGHT1", LAMP) +// CHIP("CREDIT_LIGHT2", LAMP) +// CHIP("SERVE_LIGHT", LAMP) + +#if 0 + CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc) + PADDLE_CONNECTION("PAD1", "C9") +#endif + + CHIP_LATCH(LATCH) + //CHIP("COIN1", COIN_INPUT) + CHIP_INPUT_ACTIVE_LOW(COIN1) + + //CHIP("COIN2", COIN_INPUT) + + //CHIP("START", START_INPUT) + CHIP_INPUT_ACTIVE_HIGH(START) + + //CHIP("SERVE", BUTTONS1_INPUT) + CHIP_INPUT_ACTIVE_LOW(SERVE) // Active low? + + + //TODO: coin2 and start 2 +#if 0 + VIDEO(breakout) + AUDIO(breakout) +#endif + +#ifdef DEBUG + CHIP("LOG1", VCD_LOG, &vcd_log_desc) +#endif + + //HSYNC and VSYNC + #define H1_d "L1", 14 + #define H2_d "L1", 13 + #define H4_d "L1", 12 + #define H8_d "L1", 11 + #define H8_n "J2", 2 + #define H16_d "K1", 14 + #define H16_n "J2", 6 + #define H32_d "K1", 13 + #define H32_n "J2", 4 + #define H64_d "K1", 12 + #define H128_d "K1", 11 + + #define V1_d "M1", 14 + #define V2_d "M1", 13 + #define V4_d "M1", 12 + #define V8_d "M1", 11 + #define V16_d "N1", 14 + #define V16_n "J2", 10 + #define V32_d "N1", 13 + #define V64_d "N1", 12 + #define V64I "H7", 11 + #define V64_n "M9", 10 + #define V128_d "N1", 11 + + #define H1 "L2", 8 + #define H2 "L2", 11 + #define H4 "L2", 3 + #define H8 "L2", 6 + #define H16 "K2", 8 + #define H32 "K2", 11 + #define H64 "K2", 3 + #define H128 "K2", 6 + + //#define V1 + #define V2 "M3", 3 + #define V4 "M3", 6 + #define V8 "M3", 11 + #define V16 "N3", 8 + #define V32 "N3", 3 + #define V64 "N3", 6 + #define V128 "N3", 11 + + #define HSYNC "J1", 2 + #define HSYNC_n "J1", 3 + #define VSYNC "J1", 7 + #define VSYNC_n "J1", 6 + #define PSYNC "J1", 11 + #define PSYNC_n "J1", 10 + #define BSYNC "J1", 15 + #define BSYNC_n "J1", 14 + + #define BALL "D7", 6 + #define BALL_DISPLAY "A4", 6 + #define PLAYFIELD "H4", 3 + #define SCORE "D3", 5 + #define VERT_TRIG_n "H1", 8 + + #define DICECLOCK "H1", 11 + #define SCLOCK "K1", 15 + #define CKBH "F1", 13 + + #define PAD_n "K3", 8 + #define PAD_EN_n "C2", 8 + + //#define P VCC + #define P "V5", Q + + #define COIN "L9", 6 + #define COIN1_n "F8", 5 + #define COIN2_n "H9", 5 + #define CREDIT_1_OR_2 "L9", 3 + #define CREDIT_1_OR_2_n "F9", 8 + #define CREDIT2 "F9", 6 + #define CREDIT2_n "M8", 8 + #define CR_START1 "E8", 5 + #define CR_START1_n "E8", 6 //Schematic shows E8.6 as positive CR_START1, but this can't be right? + #define CR_START2 "E8", 9 + #define CR_START2_n "E8", 8 + #define CSW1 "F9", 12 + #define CSW2 "F9", 2 + + #define P2_CONDITIONAL "H1", 3 + #define P2_CONDITIONAL_dash "H7", 8 + #define PLAYER_2 "B4", 14 + #define PLAYER_2_n "M9", 8 + + #define START_GAME "D8", 6 + #define START_GAME1_n "M9", 4 + #define START_GAME_n "M9", 6 + + #define BG1_n "K8", 9 + #define BG1 "K8", 8 + #define BG2_n "K8", 5 + #define BG2 "K8", 6 + + #define FREE_GAME_TONE "N7", 3 + #define BONUS_COIN "L9", 11 + + //#define Q "E9", 6 + #define LAT_Q "E9", 6 + #define Q_n "LATCH", 3 + #define SBD_n "D2", 11 + + #define PLAY_CP "D2", 8 + #define PLGM2_n "F7", 7 + #define VB_HIT_n "A5", 6 + + #define SERVE_n "SERVE", 1 + #define SERVE_WAIT "A3", 9 + #define SERVE_WAIT_n "A3", 8 + + #define BRICK_DISPLAY "E3", 1 + #define BRICK_HIT "E6", 5 + #define BRICK_HIT_n "E6", 6 + + //#define EGL "A4", 3 + #define EGL "C37" , 2 + #define EGL_n "C5", 2 + + #define RAM_PLAYER1 "E7", 4 + #define A1 "H6", 14 + #define B1 "H6", 13 + #define C1 "H6", 12 + #define D1 "H6", 11 + #define E1 "J6", 14 + #define F1 "J6", 13 + #define G1 "J6", 12 + #define H01 "J6", 11 + #define I1 "K6", 14 + #define J1 "K6", 13 + #define K1 "K6", 12 + #define L1 "K6", 11 + #define A2 "N6", 14 + #define B2 "N6", 13 + #define C2 "N6", 12 + #define D2 "N6", 11 + #define E2 "M6", 14 + #define F2 "M6", 13 + #define G2 "M6", 12 + #define H02 "M6", 11 //TODO: better name for these signals + #define I2 "L6", 14 + #define J2 "L6", 13 + #define K2 "L6", 12 + #define L2 "L6", 11 + + #define CX0 "C6", 11 + #define CX1 "C6", 6 + #define X0 "C5", 10 + #define X1 "B6", 3 + #define X2 "C6", 3 + #define Y0 "B6", 11 + #define Y1 "B6", 6 + #define Y2 "A6", 6 + #define DN "C4", 3 + #define PC "D4", 12 + #define PD "D4", 11 + #define SU_n "D5", 8 + #define V_SLOW "C5", 8 + + #define PLNR "E3", 4 + #define SCI_n "H4", 6 + #define SFL_n "E9", 12 //score flash + #define TOP_n "E9", 2 + + #define BP_HIT_n "A5", 8 + #define BTB_HIT_n "C3", 3 + + #define SET_BRICKS "D3", 9 + #define SET_BRICKS_n "D3", 8 + + #define BALL_A "B4", 13 + #define BALL_B "B4", 12 + #define BALL_C "B4", 11 + + #define FPD1 "F3", 10 + #define FPD1_n "F3", 9 + #define FPD2 "F3", 6 + #define FPD2_n "F3", 7 + + #define COUNT "N7", 11 + #define COUNT_1 "N7", 8 + #define COUNT_2 "N7", 6 + + #define ATTRACT "E6", 8 + #define ATTRACT_n "E6", 9 + + #define BRICK_SOUND "B8", 14 + #define P_HIT_SOUND "B7", 12 + #define VB_HIT_SOUND "B7", 11 + + #define LH_SIDE "J3", 13 + #define RH_SIDE "H2", 3 + #define TOP_BOUND "K4", 6 + +// CONNECTION(CREDIT_1_OR_2, "CREDIT_LIGHT1", 1) +// CONNECTION(CREDIT2, "CREDIT_LIGHT2", 1) +// CONNECTION(SERVE_WAIT_n, "SERVE_LIGHT", 1) + + //Audio + CONNECTION("M9", 2, "F6", 5) + CONNECTION("M9", 2, "F7", 15) + CONNECTION("F6", 13, "F7", 14) + CONNECTION(START_GAME_n, "F6", 11) + CONNECTION(P, "F6", 15) + CONNECTION(P, "F6", 1) + CONNECTION(P, "F6", 10) + CONNECTION(P, "F6", 9) + CONNECTION(GND, "F6", 14) + CONNECTION("F7", 13, "J9", 2) + CONNECTION(VSYNC, "J9", 1) + CONNECTION("A7", 9, "J9", 13) + CONNECTION("J9", 12, "F6", 4) + CONNECTION("J9", 12, "A7", 11) + CONNECTION(GND, "A7", 12) + CONNECTION(ATTRACT_n, "A7", 13) + CONNECTION("J9", 12, "A8", 11) + CONNECTION(GND, "A8", 12) + CONNECTION(ATTRACT_n, "A8", 13) + CONNECTION(VB_HIT_n, "A7", 5) + CONNECTION(GND, "A7", 4) + CONNECTION(ATTRACT_n, "A7", 3) + CONNECTION(BP_HIT_n, "A8", 5) + CONNECTION(GND, "A8", 4) + CONNECTION(ATTRACT_n, "A8", 3) + CONNECTION("A8", 6, "B9", 13) + CONNECTION(P_HIT_SOUND, "B9", 12) + CONNECTION("A8", 10, "B9", 10) + CONNECTION(BRICK_SOUND, "B9", 9) + CONNECTION("A7", 6, "B9", 4) + CONNECTION(VB_HIT_SOUND, "B9", 5) + + CONNECTION(GND, "S1", 1) + CONNECTION(P, "S1", 2) + CONNECTION(GND, "S1", 4) + CONNECTION(P, "S1", 3) + CONNECTION(GND, "S1", 12) + CONNECTION(P, "S1", 11) + CONNECTION(GND, "S1", 9) + CONNECTION(P, "S1", 10) + + //Free Game Selector + CONNECTION(I1, "K7", 2) + CONNECTION("S1", 15, "K7", 1) + CONNECTION(J1, "K7", 12) + CONNECTION("S1", 14, "K7", 13) + CONNECTION(K1, "K7", 5) + CONNECTION("S1", 6, "K7", 4) + CONNECTION(L1, "K7", 9) + CONNECTION("S1", 7, "K7", 10) + + CONNECTION(I2, "L7", 2) + CONNECTION("S1", 15, "L7", 1) + CONNECTION(J2, "L7", 12) + CONNECTION("S1", 14, "L7", 13) + CONNECTION(K2, "L7", 5) + CONNECTION("S1", 6, "L7", 4) + CONNECTION(L2, "L7", 9) + CONNECTION("S1", 7, "L7", 10) + + + CONNECTION("K7", 3, "J7", 13) + CONNECTION("K7", 11, "J7", 12) + CONNECTION("K7", 6, "J7", 10) + CONNECTION("K7", 8, "J7", 9) + + CONNECTION("L7", 3, "J7", 1) + CONNECTION("L7", 11, "J7", 2) + CONNECTION("L7", 6, "J7", 4) + CONNECTION("L7", 8, "J7", 5) + + CONNECTION(START_GAME1_n, "J8", 12) + CONNECTION(BG1_n, "J8", 11) + CONNECTION("J7", 8, "J8", 10) + + CONNECTION(START_GAME1_n, "J8", 2) + CONNECTION(BG2_n, "J8", 3) + CONNECTION("J7", 6, "J8", 1) + + CONNECTION("J8", 9, "K8", 12) + CONNECTION(EGL, "K8", 11) + CONNECTION(P, "K8", 13) + CONNECTION(LAT_Q, "K8", 10) + + CONNECTION("J8", 4, "K8", 2) + CONNECTION(EGL, "K8", 3) + CONNECTION(P, "K8", 1) + CONNECTION(LAT_Q, "K8", 4) + + CONNECTION(P, "K9", 8) + CONNECTION("J8", 9, "K9", 9) + CONNECTION(GND, "K9", 11) + CONNECTION(HSYNC_n, "K9", 10) + + CONNECTION(P, "K9", 1) + CONNECTION("J8", 4, "K9", 12) + CONNECTION(GND, "K9", 4) + CONNECTION(HSYNC_n, "K9", 13) + + CONNECTION("K9", 6, "L9", 12) + CONNECTION("K9", 2, "L9", 13) + + CONNECTION(P, "N8", 5) + CONNECTION(BONUS_COIN, "N8", 4) + CONNECTION(ATTRACT_n, "N8", 3) + + CONNECTION(V4_d, "N7", 2) + CONNECTION("N8", 6, "N7", 1) + // + CONNECTION(GND, "M2", 13) + CONNECTION(V1_d, "M2", 10) + CONNECTION(V2_d, "M2", 8) + CONNECTION(V4_d, "M2", 3) + CONNECTION(V8_d, "M2", 1) + CONNECTION(GND, "M2", 11) + CONNECTION(P2_CONDITIONAL, "M2", 7) + CONNECTION(GND, "M2", 4) + CONNECTION(GND, "M2", 16) + + CONNECTION("M2", 14, "N2", 13) + CONNECTION(V16_d, "N2", 10) + CONNECTION(V32_d, "N2", 8) + CONNECTION(V64_d, "N2", 3) + CONNECTION(V128_d, "N2", 1) + CONNECTION(GND, "N2", 11) + CONNECTION(P2_CONDITIONAL, "N2", 7) + CONNECTION(GND, "N2", 4) + CONNECTION(GND, "N2", 16) + + CONNECTION("M2", 6, "M3", 2) + CONNECTION(P2_CONDITIONAL, "M3", 1) + CONNECTION("M2", 2, "M3", 5) + CONNECTION(P2_CONDITIONAL, "M3", 4) + CONNECTION("M2", 15, "M3", 12) + CONNECTION(P2_CONDITIONAL, "M3", 13) + + CONNECTION(P2_CONDITIONAL, "N3", 10) + CONNECTION("N2", 9, "N3", 9) + CONNECTION(P2_CONDITIONAL, "N3", 1) + CONNECTION("N2", 6, "N3", 2) + CONNECTION(P2_CONDITIONAL, "N3", 4) + CONNECTION("N2", 2, "N3", 5) + CONNECTION(P2_CONDITIONAL, "N3", 13) + CONNECTION("N2", 15, "N3", 12) + + CONNECTION(H1_d, "L2", 9) + CONNECTION(P2_CONDITIONAL, "L2", 10) + CONNECTION(H2_d, "L2", 12) + CONNECTION(P2_CONDITIONAL, "L2", 13) + CONNECTION(H4_d, "L2", 2) + CONNECTION(P2_CONDITIONAL, "L2", 1) + CONNECTION(H8_d, "L2", 5) + CONNECTION(P2_CONDITIONAL, "L2", 4) + + CONNECTION(P2_CONDITIONAL, "K2", 10) + CONNECTION(H16_d, "K2", 9) + CONNECTION(P2_CONDITIONAL, "K2", 13) + CONNECTION(H32_d, "K2", 12) + CONNECTION(P2_CONDITIONAL, "K2", 1) + CONNECTION(H64_d, "K2", 2) + CONNECTION(P2_CONDITIONAL, "K2", 4) + CONNECTION(H128_d, "K2", 5) + + + CONNECTION(V64, "M9", 11) + CONNECTION(H16, "J2", 5) + CONNECTION(H32, "J2", 3) + CONNECTION(V16, "J2", 11) + CONNECTION(H8, "J2", 1) + + CONNECTION(DICECLOCK, "J1", 9) + CONNECTION(SCLOCK, "J1", 4) + CONNECTION("N4", 6, "J1", 5) + CONNECTION(PAD_n, "J1", 12) + CONNECTION(BALL_DISPLAY, "J1", 13) + CONNECTION(P, "J1", 1) + + CONNECTION(P, "K1", 1) + CONNECTION(P, "K1", 3) + CONNECTION(P, "K1", 4) + CONNECTION(P, "K1", 5) + CONNECTION(P, "K1", 6) + CONNECTION(P, "K1", 9) + CONNECTION(P, "K1", 10) + CONNECTION(DICECLOCK, "K1", 2) + CONNECTION("L1", 15, "K1", 7) + + CONNECTION(P, "L1", 1) + CONNECTION(P, "L1", 3) + CONNECTION(GND, "L1", 4) + CONNECTION(P, "L1", 5) + CONNECTION(GND, "L1", 6) + CONNECTION(VERT_TRIG_n, "L1", 9) + CONNECTION(P, "L1", 10) + CONNECTION(DICECLOCK, "L1", 2) + CONNECTION(P, "L1", 7) + + CONNECTION(P, "N1", 1) + CONNECTION(P, "N1", 10) + CONNECTION(P, "N1", 3) + CONNECTION(P, "N1", 4) + CONNECTION(P, "N1", 5) + CONNECTION(P, "N1", 6) + CONNECTION(P, "N1", 9) + CONNECTION(DICECLOCK, "N1", 2) + CONNECTION("H2", 6, "N1", 7) + + CONNECTION("M1", 15, "H2", 5) + CONNECTION("L1", 15, "H2", 4) + + CONNECTION(V128_d, "N4", 5) + CONNECTION(V64_d, "N4", 3) + CONNECTION(V32_d, "N4", 4) + CONNECTION("N4", 6, "H1", 10) + CONNECTION(VSYNC_n, "H1", 9) + + CONNECTION(P, "M1", 1) + CONNECTION(GND, "M1", 3) + CONNECTION(GND, "M1", 4) + CONNECTION(P, "M1", 5) + CONNECTION(GND, "M1", 6) + CONNECTION(VERT_TRIG_n, "M1", 9) + CONNECTION(DICECLOCK, "M1", 2) + CONNECTION("L1", 15, "M1", 7) + CONNECTION("K1", 15, "M1", 10) + + + //9312 circuit + CONNECTION(PLAYER_2, "M9", 9) + CONNECTION(BALL_A, "C5", 5) + CONNECTION(BALL_A, "C4", 13) + CONNECTION(BALL_B, "C4", 12) + CONNECTION(BALL_A, "A4", 13) + CONNECTION(BALL_B, "A4", 12) + CONNECTION(BALL_C, "C4", 10) + CONNECTION("A4", 11, "C4", 9) + + CONNECTION(A2, "N5", 1) + CONNECTION(E2, "N5", 2) + CONNECTION(I2, "N5", 3) + CONNECTION("C5", 6, "N5", 4) + CONNECTION(A1, "N5", 5) + CONNECTION(E1, "N5", 6) + CONNECTION(I1, "N5", 7) + CONNECTION(PLAYER_2_n, "N5", 9) + CONNECTION(H32_n, "N5", 10) + CONNECTION(V16, "N5", 11) + CONNECTION(V64, "N5", 12) + CONNECTION(V128, "N5", 13) + + CONNECTION(B2, "M5", 1) + CONNECTION(F2, "M5", 2) + CONNECTION(J2, "M5", 3) + CONNECTION("C4", 11, "M5", 4) + CONNECTION(B1, "M5", 5) + CONNECTION(F1, "M5", 6) + CONNECTION(J1, "M5", 7) + CONNECTION(PLAYER_2, "M5", 9) + CONNECTION(H32_n, "M5", 10) + CONNECTION(V16, "M5", 11) + CONNECTION(V64, "M5", 12) + CONNECTION(V128, "M5", 13) + + CONNECTION(C2, "L5", 1) + CONNECTION(G2, "L5", 2) + CONNECTION(K2, "L5", 3) + CONNECTION("C4", 8, "L5", 4) + CONNECTION(C1, "L5", 5) + CONNECTION(G1, "L5", 6) + CONNECTION(K1, "L5", 7) + CONNECTION(GND, "L5", 9) + CONNECTION(H32_n, "L5", 10) + CONNECTION(V16, "L5", 11) + CONNECTION(V64, "L5", 12) + CONNECTION(V128, "L5", 13) + + CONNECTION(D2, "K5", 1) + CONNECTION(H02, "K5", 2) + CONNECTION(L2, "K5", 3) + CONNECTION(GND, "K5", 4) + CONNECTION(D1, "K5", 5) + CONNECTION(H01, "K5", 6) + CONNECTION(L1, "K5", 7) + CONNECTION(GND, "K5", 9) + CONNECTION(H32_n, "K5", 10) + CONNECTION(V16, "K5", 11) + CONNECTION(V64, "K5", 12) + CONNECTION(V128, "K5", 13) + + CONNECTION(P, "J5", 4) + CONNECTION(P, "J5", 3) + CONNECTION("N5", 15, "J5", 7) + CONNECTION("M5", 15, "J5", 1) + CONNECTION("L5", 15, "J5", 2) + CONNECTION("K5", 15, "J5", 6) + CONNECTION(H32, "J5", 5) + + CONNECTION("J5", 13, "H5", 1) + CONNECTION(GND, "H5", 2) + CONNECTION(GND, "H5", 3) + CONNECTION("J5", 14, "H5", 4) + CONNECTION(GND, "H5", 5) + CONNECTION(GND, "H5", 6) + CONNECTION("J5", 10, "H5", 7) + CONNECTION(GND, "H5", 9) + + CONNECTION(V4, "K4", 12) + CONNECTION(V8, "K4", 13) + + CONNECTION("K4", 11, "H5", 10) + CONNECTION(H2, "H5", 11) + CONNECTION(H4, "H5", 12) + CONNECTION(H8, "H5", 13) + + CONNECTION(H2, "L4", 3) + CONNECTION(H4, "L4", 5) + CONNECTION(H8, "L4", 4) + + CONNECTION("J5", 12 , "J4", 1) + CONNECTION("J5", 11, "J4", 2) + CONNECTION(GND, "J4", 3) + CONNECTION(GND, "J4", 4) + CONNECTION("J5", 15, "J4", 5) + CONNECTION("J5", 9, "J4", 6) + CONNECTION(GND, "J4", 7) + CONNECTION(GND, "J4", 9) + CONNECTION("L4", 6, "J4", 10) + CONNECTION(H8, "J4", 11) + CONNECTION(V4, "J4", 12) + CONNECTION(V8, "J4", 13) + + CONNECTION("H5", 14, "H4", 13) + CONNECTION("J4", 14, "H4", 12) + + //PADDLES + CONNECTION(ATTRACT_n, "B2", 4) + + CONNECTION("B2", 3, "E9", 13) + CONNECTION(PLAYER_2_n, "M3", 9) + CONNECTION(V128, "M3", 10) + CONNECTION(H64, "J3", 8) + CONNECTION(H128, "J3", 9) + CONNECTION(V32, "E3", 5) + CONNECTION(V16_n, "E3", 6) + + CONNECTION(SFL_n, "M8", 1) + CONNECTION("M3", 8, "M8", 2) + CONNECTION(PLNR, "M8", 13) + CONNECTION("J3", 10, "E9", 1) + CONNECTION(V64, "E2", 5) + CONNECTION(V32, "E2", 4) + CONNECTION(PLNR, "E2", 10) + CONNECTION(H16, "E2", 9) + + CONNECTION("M8", 12, "M8", 3) + CONNECTION(TOP_n, "M8", 4) + CONNECTION(TOP_n, "M8", 5) + CONNECTION("H4", 11, "F2", 11) + CONNECTION("E2", 6, "F2", 10) + CONNECTION("E2", 8, "F2", 9) + + CONNECTION("M8", 6, "H4", 5) + CONNECTION("F2", 8, "H4", 4) + + CONNECTION(PAD_EN_n, "PAD_EN_BUF", 1) + + CONNECTION("PAD_EN_BUF", 2, "C9", 4) + CONNECTION("PAD_EN_BUF", 2, "C9", 2) + CONNECTION(BTB_HIT_n, "C5", 3) + CONNECTION(P, "F5", 10) + CONNECTION(P, "F5", 12) + CONNECTION("C5", 4, "F5", 11) + CONNECTION(SERVE_WAIT_n, "F5", 13) + CONNECTION(H64, "E5", 13) + CONNECTION("F5", 9, "E5", 12) + CONNECTION(H128, "E5", 10) + CONNECTION("F5", 8, "E5", 9) + CONNECTION("E5", 11, "E4", 12) + CONNECTION("E5", 8, "E4", 13) + CONNECTION("E4", 11, "D4", 2) + CONNECTION(P, "D4", 3) + CONNECTION(P, "D4", 4) + CONNECTION(P, "D4", 5) + CONNECTION(P, "D4", 6) + CONNECTION(P, "D4", 9) + CONNECTION(P, "D4", 10) + CONNECTION("C3", 11, "D4", 7) + CONNECTION(VSYNC_n, "D4", 1) + + CONNECTION("D4", 15, "E4", 10) + CONNECTION("H7", 6, "E4", 9) + CONNECTION("C9", 3, "H7", 5) + CONNECTION(PAD_EN_n, "H7", 4) + CONNECTION("E4", 8, "C3", 12) + CONNECTION(ATTRACT_n, "C3", 13) + CONNECTION(H8, "J3", 2) + CONNECTION(H32, "J3", 3) + + CONNECTION("C3", 11, "K3", 12) + CONNECTION(H128, "K3", 5) + CONNECTION(H64, "K3", 6) + CONNECTION(H16, "K3", 11) + CONNECTION(H4, "K3", 4) + CONNECTION("J3", 1, "K3", 1) + CONNECTION(P, "K3", 3) + CONNECTION(P, "K3", 2) + + CONNECTION(V16_d, "D7", 1) + CONNECTION(V64_d, "D7", 13) + CONNECTION(V128_d, "D7", 2) + CONNECTION("D7", 12, "H1", 4) + CONNECTION(V8_d, "H1", 5) + CONNECTION("H1", 6, "C2", 4) + CONNECTION("H1", 6, "C2", 5) + CONNECTION(V32_d, "J2", 9) + CONNECTION("J2", 8, "C2", 10) + CONNECTION("C2", 6, "C2", 9) + + + //SCORE + CONNECTION(SCI_n, "D3", 4) + CONNECTION(GND, "D3", 2) + CONNECTION(GND, "D3", 3) + CONNECTION(GND, "D3", 1) + + //PLAYER2_CONDITIONAL + CONNECTION(PLAYER_2, "H7", 10) + CONNECTION(GND, "S2", 1) + CONNECTION(P, "S2", 2) + CONNECTION("S2", 3, "H7", 9) + + //A-L 1 and 2 + CONNECTION(SET_BRICKS_n, "B3", 2) + CONNECTION(H2, "B3", 3) + CONNECTION("B3", 1, "E7", 6) + CONNECTION(PLAYER_2, "E7", 5) + CONNECTION(P, "N6", 9) + CONNECTION(P, "M6", 9) + CONNECTION(P, "L6", 9) + CONNECTION(P, "H6", 9) + CONNECTION(P, "J6", 9) + CONNECTION(P, "K6", 9) + + CONNECTION(P, "N6", 10) + CONNECTION(PLAYER_2, "N6", 7) + CONNECTION(COUNT_2, "N6", 2) + CONNECTION(START_GAME_n, "N6", 1) + + CONNECTION("N6", 15, "M6", 10) + CONNECTION(PLAYER_2, "M6", 7) + CONNECTION(COUNT_2, "M6", 2) + CONNECTION(START_GAME_n, "M6", 1) + + CONNECTION("M6", 15, "L6", 10) + CONNECTION(PLAYER_2, "L6", 7) + CONNECTION(COUNT_2, "L6", 2) + CONNECTION(START_GAME_n, "L6", 1) + + CONNECTION(P, "H6", 10) + CONNECTION(RAM_PLAYER1, "H6", 7) + CONNECTION(COUNT_1, "H6", 2) + CONNECTION(START_GAME_n, "H6", 1) + + CONNECTION("H6", 15, "J6", 10) + CONNECTION(RAM_PLAYER1, "J6", 7) + CONNECTION(COUNT_1, "J6", 2) + CONNECTION(START_GAME_n, "J6", 1) + + CONNECTION("J6", 15, "K6", 10) + CONNECTION(RAM_PLAYER1, "K6", 7) + CONNECTION(COUNT_1, "K6", 2) + CONNECTION(START_GAME_n, "K6", 1) + + + //CX0 and CX1 + CONNECTION(BRICK_HIT, "H2", 9) + CONNECTION(H16_n, "H2", 10) + CONNECTION(P, "D5", 10) + CONNECTION(P, "D5", 12) + CONNECTION("H2", 8, "D5", 11) + CONNECTION(SERVE_WAIT_n, "D5", 13) + CONNECTION(X0, "C6", 13) + CONNECTION("D5", 9, "C6", 12) + CONNECTION("D5", 9, "D6", 12) + CONNECTION(DN, "D6", 13) + CONNECTION("D6", 11, "C6", 4) + CONNECTION(X1, "C6", 5) + + //COUNT1 and COUNT2 + CONNECTION(P, "N8", 11) + CONNECTION(BRICK_HIT, "N8", 12) + CONNECTION(ATTRACT_n, "N8", 13) + CONNECTION("N8", 9, "N9", 11) + CONNECTION(P, "N9", 15) + CONNECTION(P, "N9", 5) + + CONNECTION(COUNT, "N9", 4) + CONNECTION(START_GAME, "N9", 14) + CONNECTION(H8_n, "N9", 1) + CONNECTION(H16_n, "N9", 10) + CONNECTION(GND, "N9", 9) + + CONNECTION("N9", 13, "N7", 13) + CONNECTION(SCLOCK, "N7", 12) + + CONNECTION(PLAYER_2, "N7", 5) + CONNECTION(COUNT, "N7", 4) + + CONNECTION(COUNT, "M9", 1) + CONNECTION(COUNT, "N7", 10) + CONNECTION(RAM_PLAYER1, "N7", 9) + + + //Ball Logic + CONNECTION(P, "C7", 1) + CONNECTION(P, "C7", 10) + CONNECTION(P, "C7", 7) + CONNECTION(CX0, "C7", 3) + CONNECTION(CX1, "C7", 4) + CONNECTION(X2, "C7", 5) + CONNECTION(GND, "C7", 6) + CONNECTION("D8", 8, "C7", 9) + CONNECTION("C7", 15, "C8", 7) + CONNECTION("C7", 11, "C8", 10) + CONNECTION("C7", 12, "D7", 10) + CONNECTION("C7", 13, "D7", 11) + CONNECTION(DICECLOCK, "C7", 2) + + CONNECTION(P, "C8", 1) + CONNECTION(P, "C8", 3) + CONNECTION(P, "C8", 4) + CONNECTION(P, "C8", 5) + CONNECTION(P, "C8", 6) + CONNECTION(P, "C8", 9) + CONNECTION(DICECLOCK, "C8", 2) + CONNECTION("C8", 15, "B7", 7) + CONNECTION("C7", 15, "B7", 10) + + CONNECTION(P, "B7", 1) + CONNECTION(Y0, "B7", 3) + CONNECTION(Y1, "B7", 4) + CONNECTION(Y2, "B7", 5) + CONNECTION(GND, "B7", 6) + CONNECTION("D8", 8, "B7", 9) + CONNECTION(DICECLOCK, "B7", 2) + CONNECTION("B7", 15, "B8", 7) + + CONNECTION(VB_HIT_SOUND, "D7", 9) + + CONNECTION(P, "B8", 1) + CONNECTION(P, "B8", 3) + CONNECTION(P, "B8", 4) + CONNECTION(P, "B8", 5) + CONNECTION(P, "B8", 6) + CONNECTION(P, "B8", 9) + CONNECTION("C8", 15, "B8", 10) + CONNECTION(DICECLOCK, "B8", 2) + + CONNECTION("B8", 15, "D8", 10) + CONNECTION("B7", 15, "D8", 9) + + CONNECTION("D7", 8, "D7", 5) + CONNECTION(P_HIT_SOUND, "D7", 4) + CONNECTION("B8", 15, "D7", 3) + + //Clock Generator + CONNECTION(CKBH, "H1", 12) + CONNECTION("F1", 14, "H1", 13) + CONNECTION("F1", 15, "E1", 5) + + CONNECTION(P, "F1", 1) + CONNECTION(P, "F1", 7) + CONNECTION(P, "F1", 10) + CONNECTION(GND, "F1", 3) + CONNECTION(P, "F1", 4) + CONNECTION(GND, "F1", 5) + CONNECTION(GND, "F1", 6) + CONNECTION("E1", 6, "F1", 9) + CONNECTION("Y1", 1, "F1", 2) + + // RH and LH Sides + CONNECTION(V128, "N4", 1) + CONNECTION(V64, "N4", 2) + CONNECTION(V16, "N4", 13) + CONNECTION("N4", 12, "N4", 11) + CONNECTION(V8, "N4", 10) + CONNECTION(V4, "N4", 9) + CONNECTION("N4", 8, "H2", 2) + CONNECTION(V32, "H2", 1) + CONNECTION("N4", 8, "J2", 13) + CONNECTION("J2", 12, "J3", 11) + CONNECTION(V32, "J3", 12) + + // Top Bound + CONNECTION(H128, "H3", 4) + CONNECTION(H64, "H3", 5) + CONNECTION(H32, "H3", 3) + CONNECTION("H3", 6, "L4", 9) + CONNECTION(H16, "L4", 10) + CONNECTION(H8, "L4", 11) + CONNECTION("L4", 8, "K4", 5) + CONNECTION(VSYNC_n, "K4", 4) + + //Cabinet type + + // Coin Circuit + CONNECTION("COIN1", 1, "F9", 13) + + CONNECTION(CSW1, "F9", 11) + //CONNECTION("F9", 10, "F9", 13) //TODO: causes lots of bouncing, commented out since this trace is not implemented in gotcha + + CONNECTION(V64, "H7", 12) + CONNECTION(V64, "H7", 13) + + CONNECTION(CSW1, "F8", 10) + CONNECTION("F9", 10, "F8", 12) + CONNECTION(V64I, "F8", 11) + CONNECTION(P, "F8", 13) + CONNECTION(P, "F8", 1) + CONNECTION(V64I, "F8", 3) + CONNECTION("F8", 9, "F8", 2) + CONNECTION(CSW1, "F8", 4) + + CONNECTION("F8", 6, "H8", 12) + CONNECTION(P, "H8", 10) + CONNECTION(V16_d, "H8", 11) + CONNECTION(P, "H8", 13) + CONNECTION("H8", 9, "J8", 15) + CONNECTION("H8", 9, "J9", 9) + CONNECTION(V16_d, "J8", 14) + CONNECTION("J8", 13, "J9", 10) + CONNECTION(P, "S3", 1) + CONNECTION(V4_d, "S3", 2) + CONNECTION("S3", 3, "J9", 11) + + CONNECTION("J9", 8, "L9", 5) + CONNECTION("J9", 6, "L9", 4) + + //COIN2 circuit + //CONNECTION("COIN2", 1, "F9", 1) + CONNECTION(GND, "F9", 1) //TODO: coin2 not implemented + + CONNECTION(CSW2, "F9", 3) + CONNECTION(CSW2, "H9", 10) + CONNECTION("F9", 4, "H9", 12) + CONNECTION(V64_n, "H9", 11) + CONNECTION(V64_n, "H9", 3) + CONNECTION(P, "H9", 13) + CONNECTION("H9", 9, "H9", 2) + CONNECTION(CSW2, "H9", 4) + CONNECTION(P, "H9", 1) + + CONNECTION(P, "H8", 4) + CONNECTION("H9", 6, "H8", 2) + CONNECTION(V16_d, "H8", 3) + CONNECTION(P, "H8", 1) + CONNECTION("H8", 5, "J8", 6) + CONNECTION(V16_d, "J8", 5) + CONNECTION(P, "J9", 3) + CONNECTION("H8", 5, "J9", 5) + CONNECTION("J8", 7, "J9", 4) + + CONNECTION(P2_CONDITIONAL_dash, "E9", 9) + CONNECTION("E9", 8, "H1", 1) + CONNECTION("E9", 8, "H1", 2) + + //Start2 Input + CONNECTION("START", 2, "E9", 11) + CONNECTION("E9", 10, "E8", 12) + CONNECTION(P, "E8", 10) + CONNECTION(V64I, "E8", 11) + + CONNECTION(V128_d, "F7", 2) + CONNECTION(V128_d, "F7", 3) + CONNECTION(CREDIT2_n, "F7", 1) + CONNECTION(ATTRACT_n, "E7", 12) + CONNECTION("F7", 4, "E7", 11) + CONNECTION("E7", 13, "E8", 13) + + //Start1 Input + CONNECTION("START", 1, "E9", 3) + CONNECTION("E9", 4, "E8", 2) + CONNECTION(P, "E8", 4) + CONNECTION(V64_d, "E8", 3) + + + CONNECTION(CREDIT_1_OR_2_n, "E7", 2) + CONNECTION(ATTRACT_n, "E7", 3) + CONNECTION("E7", 1, "E8", 1) + + CONNECTION(CR_START1_n, "D8", 4) // Schematic shows CR_START1 ? + CONNECTION(CR_START2_n, "D8", 5) + + + CONNECTION(START_GAME, "M9", 3) + CONNECTION(START_GAME, "M9", 5) + + CONNECTION(V32, "D6", 4) + CONNECTION(ATTRACT, "D6", 5) + CONNECTION(P, "E6", 10) + CONNECTION(START_GAME, "E6", 12) + CONNECTION("D6", 6, "E6", 11) + CONNECTION("D6", 3, "E6", 13) + + //TODO: hows this whole latch stuff work? what about Q_n going to COIN1_n and COIN2_n + CONNECTION(CREDIT_1_OR_2_n, "D8", 13) + CONNECTION(EGL, "D8", 12) + CONNECTION("LATCH", 1, "D8", 11) //set + CONNECTION("LATCH", 2, COIN1_n) //reset + //CONNECTION("LATCH", 3, COIN2_n) //set //TODO: coin2 here + CONNECTION( "LATCH", 3, "E9", 5) //output + + + CONNECTION(LAT_Q, "D6", 1) + CONNECTION(EGL_n, "D6", 2) + + //Serve + CONNECTION(H64, "J3", 6) + CONNECTION(H32, "J3", 5) + CONNECTION("J3", 4, "L4", 13) + CONNECTION(H128, "L4", 2) + CONNECTION(H16, "L4", 1) + + CONNECTION(BALL_DISPLAY, "H2", 13) + CONNECTION(H128, "H2", 12) + CONNECTION("H2", 11, "C3", 9) + CONNECTION(HSYNC, "C3", 10) + CONNECTION("C3", 8, "B3", 5) + CONNECTION(H8_d, "B3", 6) + CONNECTION("B3", 4, "C3", 4) + CONNECTION(H4, "C3", 5) + CONNECTION("C3", 6, "A4", 9) + CONNECTION(START_GAME1_n, "A4", 10) + + CONNECTION(SERVE_WAIT_n, "D2", 13) + + CONNECTION(SERVE_n, "D2", 12) + CONNECTION(SERVE_n, "A3", 4) + CONNECTION(P, "A3", 2) + CONNECTION(ATTRACT, "A3", 3) + CONNECTION(SERVE_WAIT, "A3", 1) + + CONNECTION(BALL, "E1", 13) + CONNECTION("E1", 12, "B3", 8) + CONNECTION("A3", 6, "B3", 9) + CONNECTION("B3", 10, "B3", 11) + CONNECTION(SERVE_WAIT_n, "B3", 12) + CONNECTION("B3", 13, "A3", 12) + CONNECTION("A4", 8, "A3", 10) + CONNECTION("L4", 12, "A3", 11) + CONNECTION(P, "A3", 13) + + //Set Bricks + CONNECTION(P, "D3", 10) + CONNECTION(P, "D3", 12) + CONNECTION(START_GAME, "D3", 11) + CONNECTION(SERVE_n, "D3", 13) + + //Playfield + CONNECTION(LH_SIDE, "H3", 1) + CONNECTION(TOP_BOUND, "H3", 13) + CONNECTION(RH_SIDE, "H3", 2) + CONNECTION("H3", 12, "H4", 2) + CONNECTION("E1", 2, "C36", 1) + CONNECTION("C36", 2, "H4", 1) + + CONNECTION(BALL_DISPLAY, "A5", 10) + CONNECTION(PSYNC, "A5", 9) + CONNECTION(BSYNC, "C3", 2) + CONNECTION(TOP_BOUND, "C3", 1) + + CONNECTION(PC, "C4", 4) + CONNECTION(PD, "C4", 5) + CONNECTION(BP_HIT_n, "C5", 13) + CONNECTION(PD, "A5", 1) + CONNECTION("C5", 12, "A5", 2) + CONNECTION(BSYNC, "A5", 5) + CONNECTION(VSYNC, "A5", 4) + + CONNECTION("C5", 12, "A5", 13) + CONNECTION("A5", 3, "A5", 12) + + CONNECTION(BRICK_HIT, "D5", 3) + CONNECTION("E5", 3, "D5", 1) + CONNECTION("D5", 6, "D5", 2) + CONNECTION(BP_HIT_n, "D5", 4) + + CONNECTION(P, "A6", 10) + CONNECTION("C4", 6, "A6", 12) + CONNECTION(BP_HIT_n, "A6", 11) + CONNECTION(P, "A6", 13) + + CONNECTION("A5", 3, "A6", 4) + CONNECTION(V16_d, "A6", 2) + CONNECTION(VB_HIT_n, "A6", 3) + CONNECTION("A5", 11, "A6", 1) + + CONNECTION(P2_CONDITIONAL, "C6", 1) + CONNECTION("D5", 5, "C6", 2) + CONNECTION("D5", 6, "C4", 2) + CONNECTION(P2_CONDITIONAL, "C4", 1) + + CONNECTION(V_SLOW, "B6", 12) + CONNECTION("A6", 8, "B6", 13) + CONNECTION(V_SLOW, "C6", 10) + CONNECTION("A6", 5, "C6", 9) + + CONNECTION(Y0, "B6", 4) + CONNECTION("C6", 8, "B6", 5) + + CONNECTION(X2, "D6", 10) + CONNECTION("B6", 8, "D6", 9) + CONNECTION("B5", 7, "B6", 9) + CONNECTION("B5", 6, "B6", 10) + CONNECTION(X0, "B6", 1) + CONNECTION(X2, "B6", 2) + + CONNECTION("B5", 6, "C5", 11) + CONNECTION("B5", 7, "C5", 9) + + CONNECTION(SU_n, "B5", 11) + CONNECTION(P, "B5", 15) + CONNECTION(P, "B5", 1) + CONNECTION(P, "B5", 10) + CONNECTION(P, "B5", 9) + CONNECTION(P, "B5", 4) + CONNECTION("D6", 8, "B5", 5) + CONNECTION(SERVE_WAIT, "B5", 14) + + CONNECTION(BTB_HIT_n, "E5", 1) + CONNECTION(SBD_n, "E5", 2) + + CONNECTION(BP_HIT_n, "E5", 4) + CONNECTION(BTB_HIT_n, "E5", 5) + CONNECTION("E5", 6, "F7", 11) + CONNECTION("E5", 6, "F7", 12) + CONNECTION(BRICK_HIT_n, "F7", 10) + CONNECTION("F7", 9, "C2", 2) + CONNECTION(BALL_DISPLAY, "C2", 1) + CONNECTION("L3", 6, "E3", 11) + CONNECTION("C2", 3, "E3", 12) + + CONNECTION(SET_BRICKS_n, "E6", 4) + CONNECTION("E3", 13, "E6", 2) + CONNECTION(CKBH, "E6", 3) + CONNECTION("E3", 13, "D2", 2) + CONNECTION(SET_BRICKS, "D2", 1) + CONNECTION("D2", 3, "E6", 1) + + CONNECTION(BRICK_DISPLAY, "E1", 1) + CONNECTION(H1, "K4", 9) + CONNECTION(H2, "K4", 10) + CONNECTION("K4", 8, "E3", 2) + CONNECTION("L3", 6, "E3", 3) + + CONNECTION(ATTRACT_n, "C2", 13) + CONNECTION(SET_BRICKS_n, "C2", 12) + CONNECTION("C2", 11, "H3", 10) + CONNECTION(FPD1, "H3", 9) + CONNECTION(FPD2, "H3", 11) + CONNECTION("H3", 8, "E1", 3) + CONNECTION("E1", 4, "C32", 1) + CONNECTION("C32", 2, "L3", 13) + CONNECTION(H4, "L3", 2) + CONNECTION(H8, "L3", 1) + CONNECTION(H16, "L3", 15) + CONNECTION(V32, "L3", 14) + CONNECTION(V64, "L3", 7) + CONNECTION(V128, "L3", 9) + CONNECTION(V16, "L3", 10) + CONNECTION(RAM_PLAYER1, "L3", 11) + CONNECTION(H32, "L3", 3) + CONNECTION(H128, "L3", 4) + CONNECTION("H4", 8, "L3", 5) + + CONNECTION(V2, "M4", 5) + CONNECTION(V4, "M4", 4) + CONNECTION(V8, "M4", 3) + CONNECTION("M4", 6, "H4", 9) + CONNECTION(VSYNC_n, "K4", 2) + CONNECTION(H64, "K4", 1) + CONNECTION("K4", 3, "H4", 10) + CONNECTION(FPD1_n, "F2", 13) + CONNECTION(BRICK_HIT_n, "F2", 2) + CONNECTION(FPD2_n, "F2", 1) + + CONNECTION("F2", 12, "L3", 12) + + //FPD circuits + CONNECTION(K2, "M4", 2) + CONNECTION(G2, "M4", 13) + CONNECTION(D2, "M4", 1) + CONNECTION(K1, "M4", 9) + CONNECTION(G1, "M4", 10) + CONNECTION(D1, "M4", 11) + CONNECTION(BP_HIT_n, "E4", 2) + CONNECTION("M4", 12, "E4", 1) + CONNECTION(BP_HIT_n, "E4", 4) + CONNECTION("M4", 8, "E4", 5) + + CONNECTION(P, "F4", 4) + CONNECTION(P, "F4", 2) + CONNECTION("E4", 3, "F4", 3) + CONNECTION(START_GAME1_n, "F4", 1) + + CONNECTION(P, "F4", 10) + CONNECTION(P, "F4", 12) + CONNECTION("E4", 6, "F4", 11) + CONNECTION(START_GAME1_n, "F4", 13) + + CONNECTION("F4", 6, "F3", 5) + CONNECTION(GND, "F3", 4) + CONNECTION("F4", 8, "F3", 11) + CONNECTION(GND, "F3", 12) + + CONNECTION(P, "F3", 3) + CONNECTION(P, "F3", 13) + + + //CREDIT_COUNTER + CONNECTION(BONUS_COIN, "E7", 8) + CONNECTION(COIN, "E7", 9) + CONNECTION(CR_START1_n, "H7", 2) + CONNECTION(V8, "D8", 1) + CONNECTION(CR_START2, "D8", 2) + CONNECTION("D8", 3, "H7", 1) + + CONNECTION("L8", 12, "L8", 11) // not on schematic, on rollover load 16, keeps you from losing all credits + CONNECTION(P, "L8", 15) + CONNECTION(P, "L8", 1) + CONNECTION(P, "L8", 10) + CONNECTION(P, "L8", 9) + CONNECTION("E7", 10, "L8", 5) + CONNECTION("H7", 3, "L8", 4) + + CONNECTION(LAT_Q, "L9", 10) + CONNECTION("L8", 13, "L9", 9) + CONNECTION("L9", 8, "L8", 14) + CONNECTION("L8", 7, "M8", 9) + CONNECTION("L8", 6, "M8", 10) + CONNECTION("L8", 2, "M8", 11) + CONNECTION("L8", 3, "M9", 13) + + CONNECTION(CREDIT2_n, "F9", 5) + CONNECTION(CREDIT2_n, "L9", 2) + CONNECTION("M9", 12, "L9", 1) + CONNECTION(CREDIT_1_OR_2, "F9", 9) + + //PLGM2_n + CONNECTION(CR_START1_n, "F7", 6) + CONNECTION(CR_START2_n, "F7", 5) + + //PLAY_CP + CONNECTION(PLGM2_n, "F2", 5) + CONNECTION(PLAYER_2, "F2", 4) + CONNECTION(H1, "F2", 3) + + CONNECTION(P, "F5", 4) + CONNECTION(P, "F5", 2) + CONNECTION(SERVE_WAIT, "F5", 3) + CONNECTION(H128, "F5", 1) + CONNECTION("F2", 6, "D2", 9) + CONNECTION("F5", 5, "D2", 10) + + //EGL + CONNECTION(P, "B4", 10) + CONNECTION(P, "B4", 7) + CONNECTION(P, "B4", 9) + CONNECTION(PLAY_CP, "B4", 2) + + CONNECTION(EGL, "C5", 1) + + + + CONNECTION(START_GAME1_n, "B4", 1) + CONNECTION(BALL_A, "A4", 2) + CONNECTION(BALL_B, "S4", 1) + CONNECTION(BALL_C, "S4", 2) + CONNECTION("S4", 3, "A4", 1) + CONNECTION("A4", 3, "C37", 1) + + CONNECTION(SERVE_WAIT_n, "A4", 5) + CONNECTION(BALL, "A4", 4) + + // Ball Circuit + + + // Video Summing + CONNECTION(V16_d, "D2", 4) + CONNECTION(V8_d, "D2", 5) + CONNECTION("D2", 6, "E3", 8) + CONNECTION(VSYNC_n, "E3", 9) + CONNECTION(HSYNC_n, "E2", 12) + CONNECTION("E3", 10, "E2", 13) + CONNECTION(PSYNC, "B9", 1) + CONNECTION(VSYNC_n, "B9", 2) + + //CONNECTION("VIDEO", 1, "E2", 11) + CONNECTION("VIDEO", 2, PLAYFIELD) + CONNECTION("VIDEO", 3, BSYNC) + CONNECTION("VIDEO", 4, SCORE) + CONNECTION("VIDEO", 5, "B9", 3) + //CONNECTION("VIDEO", 6, P) + + CONNECTION("VIDEO", Video::HBLANK_PIN, HSYNC) + CONNECTION("VIDEO", Video::VBLANK_PIN, "E3", 10) + + + // Audio Summing + CONNECTION("AUDIO", 1, "B9", 11) + CONNECTION("AUDIO", 2, "B9", 8) + CONNECTION("AUDIO", 3, FREE_GAME_TONE) + CONNECTION("AUDIO", 4, "B9", 6) + + +#ifdef DEBUG + // RAM access + /*CONNECTION("LOG1", 3, H4) //A + CONNECTION("LOG1", 4, H8) //B + CONNECTION("LOG1", 5, H16) //C + CONNECTION("LOG1", 6, V32) //D + CONNECTION("LOG1", 7, V64) //E + CONNECTION("LOG1", 8, V128) //F + CONNECTION("LOG1", 9, V16) //G + CONNECTION("LOG1", 10, RAM_PLAYER1) //H + CONNECTION("LOG1", 11, H32) //I + CONNECTION("LOG1", 12, H128) //J + CONNECTION("LOG1", 13, "H4", 8) //K + CONNECTION("LOG1", 14, "E1", 4) //L + CONNECTION("LOG1", 15, "F2", 12) //M + CONNECTION("LOG1", 16, "L3", 6)*/ //N +#endif + +CIRCUIT_LAYOUT_END + +#endif diff --git a/src/mame/drivers/nl_pong.c b/src/mame/drivers/nl_pong.c index 40975b5026e..ca8bd6ab740 100644 --- a/src/mame/drivers/nl_pong.c +++ b/src/mame/drivers/nl_pong.c @@ -9,6 +9,7 @@ NETLIST_START(pong_fast) SOLVER(Solver, 48000) + PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers PARAM(Solver.ACCURACY, 1e-4) // works and is sufficient PARAM(Solver.LTE, 1e-4) // Default is not enough for paddle control if using LTE -- cgit v1.2.3-70-g09d2 From eb2a14b153ce0f4b73656536a41c3faf3270cf8b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 22 Apr 2015 13:26:18 +0200 Subject: fix --- scripts/src/lib.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'scripts/src') diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index 5f809256072..147099a07df 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -17,8 +17,6 @@ project "utils" files { MAME_DIR .. "src/lib/util/bitstream.h", MAME_DIR .. "src/lib/util/coretmpl.h", - MAME_DIR .. "src/lib/util/astring.c", - MAME_DIR .. "src/lib/util/astring.h", MAME_DIR .. "src/lib/util/avhuff.c", MAME_DIR .. "src/lib/util/avhuff.h", MAME_DIR .. "src/lib/util/aviio.c", -- cgit v1.2.3-70-g09d2 From 57728d624f1bd2103c6aacc606cc5a5171883fd4 Mon Sep 17 00:00:00 2001 From: mahlemiut Date: Sat, 25 Apr 2015 14:39:16 +1200 Subject: pc_vga: split Cirrus video devices to separate files. --- scripts/src/video.lua | 2 + src/emu/bus/isa/svga_cirrus.c | 1 - src/emu/bus/isa/svga_cirrus.h | 2 +- src/emu/bus/isa/trident.c | 15 - src/emu/video/pc_vga.c | 1217 ----------------------------------------- src/emu/video/pc_vga.h | 131 ++--- src/mame/drivers/gambl186.c | 2 +- src/mame/drivers/pcat_nit.c | 2 +- src/mess/drivers/bebox.c | 2 +- 9 files changed, 45 insertions(+), 1329 deletions(-) (limited to 'scripts/src') diff --git a/scripts/src/video.lua b/scripts/src/video.lua index 2b1db0f07bf..08c5539a4a8 100644 --- a/scripts/src/video.lua +++ b/scripts/src/video.lua @@ -493,6 +493,8 @@ if (VIDEOS["PC_VGA"]~=null) then MAME_DIR .. "src/emu/video/pc_vga.h", MAME_DIR .. "src/emu/bus/isa/trident.c", MAME_DIR .. "src/emu/bus/isa/trident.h", + MAME_DIR .. "src/emu/video/clgd542x.c", + MAME_DIR .. "src/emu/video/blgd542x.h", } end diff --git a/src/emu/bus/isa/svga_cirrus.c b/src/emu/bus/isa/svga_cirrus.c index 3744d8ae07b..888b56bdb5c 100644 --- a/src/emu/bus/isa/svga_cirrus.c +++ b/src/emu/bus/isa/svga_cirrus.c @@ -6,7 +6,6 @@ #include "emu.h" #include "svga_cirrus.h" -#include "video/pc_vga.h" ROM_START( dm_clgd5430 ) ROM_REGION(0x8000,"dm_clgd5430", 0) diff --git a/src/emu/bus/isa/svga_cirrus.h b/src/emu/bus/isa/svga_cirrus.h index 32a43df96aa..17b39f1e98e 100644 --- a/src/emu/bus/isa/svga_cirrus.h +++ b/src/emu/bus/isa/svga_cirrus.h @@ -5,7 +5,7 @@ #include "emu.h" #include "isa.h" -#include "video/pc_vga.h" +#include "video/clgd542x.h" //************************************************************************** // TYPE DEFINITIONS diff --git a/src/emu/bus/isa/trident.c b/src/emu/bus/isa/trident.c index 971d627068b..63d70492c5d 100644 --- a/src/emu/bus/isa/trident.c +++ b/src/emu/bus/isa/trident.c @@ -10,21 +10,6 @@ #include "trident.h" #include "debugger.h" -enum -{ - SCREEN_OFF = 0, - TEXT_MODE, - VGA_MODE, - EGA_MODE, - CGA_MODE, - MONO_MODE, - RGB8_MODE, - RGB15_MODE, - RGB16_MODE, - RGB24_MODE, - RGB32_MODE -}; - const device_type TRIDENT_VGA = &device_creator; #define CRTC_PORT_ADDR ((vga.miscellaneous_output&1)?0x3d0:0x3b0) diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c index ba5b3c63152..9f3653438a2 100644 --- a/src/emu/video/pc_vga.c +++ b/src/emu/video/pc_vga.c @@ -122,8 +122,6 @@ const device_type TSENG_VGA = &device_creator; const device_type S3_VGA = &device_creator; const device_type GAMTOR_VGA = &device_creator; const device_type ATI_VGA = &device_creator; -const device_type CIRRUS_GD5428 = &device_creator; -const device_type CIRRUS_GD5430 = &device_creator; const device_type IBM8514A = &device_creator; const device_type MACH8 = &device_creator; @@ -174,21 +172,6 @@ ati_vga_device::ati_vga_device(const machine_config &mconfig, device_type type, { } -cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : svga_device(mconfig, CIRRUS_GD5428, "Cirrus Logic GD5428", tag, owner, clock, "clgd5428", __FILE__) -{ -} - -cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) - : svga_device(mconfig, type, name, tag, owner, clock, shortname, source) -{ -} - -cirrus_gd5430_device::cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : cirrus_gd5428_device(mconfig, CIRRUS_GD5430, "Cirrus Logic GD5430", tag, owner, clock, "clgd5430", __FILE__) -{ -} - ibm8514a_device::ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, IBM8514A, "IBM8514A Video", tag, owner, clock, "ibm8514a", __FILE__) { @@ -272,42 +255,6 @@ void svga_device::device_start() memset(&svga, 0, sizeof(svga)); } -void cirrus_gd5428_device::device_start() -{ - zero(); - - int i; - for (i = 0; i < 0x100; i++) - m_palette->set_pen_color(i, 0, 0, 0); - - // Avoid an infinite loop when displaying. 0 is not possible anyway. - vga.crtc.maximum_scan_line = 1; - - // copy over interfaces - vga.read_dipswitch = read8_delegate(); //read_dipswitch; - vga.svga_intf.seq_regcount = 0x1f; - vga.svga_intf.crtc_regcount = 0x2d; - vga.svga_intf.vram_size = 0x200000; - - vga.memory.resize(vga.svga_intf.vram_size); - memset(&vga.memory[0], 0, vga.svga_intf.vram_size); - save_item(NAME(vga.memory)); - save_pointer(vga.crtc.data,"CRTC Registers",0x100); - save_pointer(vga.sequencer.data,"Sequencer Registers",0x100); - save_pointer(vga.attribute.data,"Attribute Registers", 0x15); - save_item(NAME(m_chip_id)); - - m_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vga_device::vblank_timer_cb),this)); - - m_chip_id = 0x98; // GD5428 - Rev 0 -} - -void cirrus_gd5430_device::device_start() -{ - cirrus_gd5428_device::device_start(); - m_chip_id = 0xa0; // GD5430 - Rev 0 -} - void ati_vga_device::device_start() { svga_device::device_start(); @@ -857,21 +804,6 @@ void svga_device::svga_vh_rgb32(bitmap_rgb32 &bitmap, const rectangle &cliprect) } } -enum -{ - SCREEN_OFF = 0, - TEXT_MODE, - VGA_MODE, - EGA_MODE, - CGA_MODE, - MONO_MODE, - RGB8_MODE, - RGB15_MODE, - RGB16_MODE, - RGB24_MODE, - RGB32_MODE -}; - UINT8 vga_device::pc_vga_choosevideomode() { int i; @@ -1163,111 +1095,9 @@ UINT32 s3_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, return 0; } -UINT32 cirrus_gd5428_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - int x,y,bit; - UINT32 ptr = (vga.svga_intf.vram_size - 0x4000); // cursor patterns are stored in the last 16kB of VRAM - svga_device::screen_update(screen, bitmap, cliprect); - - /*UINT8 cur_mode =*/ pc_vga_choosevideomode(); - if(m_cursor_attr & 0x01) // hardware cursor enabled - { - // draw hardware graphics cursor - if(m_cursor_attr & 0x04) // 64x64 - { - ptr += ((m_cursor_addr & 0x3c) * 256); - for(y=0;y<64;y++) - { - for(x=0;x<64;x+=8) - { - for(bit=0;bit<8;bit++) - { - UINT8 pixel1 = vga.memory[ptr] >> (7-bit); - UINT8 pixel2 = vga.memory[ptr+256] >> (7-bit); - UINT8 output = ((pixel1 & 0x01) << 1) | (pixel2 & 0x01); - switch(output) - { - case 0: // transparent - do nothing - break; - case 1: // background - bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = (m_ext_palette[0].red << 16) | (m_ext_palette[0].green << 8) | (m_ext_palette[0].blue); - break; - case 2: // XOR - bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = ~bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit); - break; - case 3: // foreground - bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = (m_ext_palette[15].red << 16) | (m_ext_palette[15].green << 8) | (m_ext_palette[15].blue); - break; - } - } - } - } - } - else - { - ptr += ((m_cursor_addr & 0x3f) * 256); - for(y=0;y<32;y++) - { - for(x=0;x<32;x+=8) - { - for(bit=0;bit<8;bit++) - { - UINT8 pixel1 = vga.memory[ptr] >> (7-bit); - UINT8 pixel2 = vga.memory[ptr+128] >> (7-bit); - UINT8 output = ((pixel1 & 0x01) << 1) | (pixel2 & 0x01); - switch(output) - { - case 0: // transparent - do nothing - break; - case 1: // background - bitmap.pix32(y,x+bit) = (m_ext_palette[0].red << 16) | (m_ext_palette[0].green << 8) | (m_ext_palette[0].blue); - break; - case 2: // XOR - bitmap.pix32(y,x+bit) = ~bitmap.pix32(y,x+bit); - break; - case 3: // foreground - bitmap.pix32(y,x+bit) = (m_ext_palette[15].red << 16) | (m_ext_palette[15].green << 8) | (m_ext_palette[15].blue); - break; - } - } - ptr++; - } - } - } - } - return 0; -} /***************************************************************************/ -inline UINT8 vga_device::rotate_right(UINT8 val) -{ - return (val >> vga.gc.rotate_count) | (val << (8 - vga.gc.rotate_count)); -} - -inline UINT8 vga_device::vga_logical_op(UINT8 data, UINT8 plane, UINT8 mask) -{ - UINT8 res = 0; - - switch(vga.gc.logical_op & 3) - { - case 0: /* NONE */ - res = (data & mask) | (vga.gc.latch[plane] & ~mask); - break; - case 1: /* AND */ - res = (data | ~mask) & (vga.gc.latch[plane]); - break; - case 2: /* OR */ - res = (data & mask) | (vga.gc.latch[plane]); - break; - case 3: /* XOR */ - res = (data & mask) ^ (vga.gc.latch[plane]); - break; - } - - return res; -} - inline UINT8 vga_device::vga_latch_write(int offs, UINT8 data) { UINT8 res = 0; @@ -2119,26 +1949,6 @@ void s3_vga_device::device_reset() s3.sr11 = 0x41; } -void cirrus_gd5428_device::device_reset() -{ - vga_device::device_reset(); - gc_locked = true; - gc_mode_ext = 0; - gc_bank_0 = gc_bank_1 = 0; - m_lock_reg = 0; - m_blt_status = 0; - m_cursor_attr = 0x00; // disable hardware cursor and extra palette - m_cursor_x = m_cursor_y = 0; - m_cursor_addr = 0; - m_scratchpad1 = m_scratchpad2 = m_scratchpad3 = 0; - m_cr19 = m_cr1a = m_cr1b = 0; - m_vclk_num[0] = 0x4a; - m_vclk_denom[0] = 0x2b; - m_vclk_num[1] = 0x5b; - m_vclk_denom[1] = 0x2f; - memset(m_ext_palette, 0, sizeof(m_ext_palette)); -} - READ8_MEMBER(vga_device::mem_r) { /* TODO: check me */ @@ -2272,24 +2082,6 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_trident_vga ) MCFG_DEVICE_ADD("vga", TRIDENT_VGA, 0) MACHINE_CONFIG_END -MACHINE_CONFIG_FRAGMENT( pcvideo_cirrus_gd5428 ) - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) - MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5428_device, screen_update) - - MCFG_PALETTE_ADD("palette", 0x100) - MCFG_DEVICE_ADD("vga", CIRRUS_GD5428, 0) -MACHINE_CONFIG_END - -MACHINE_CONFIG_FRAGMENT( pcvideo_cirrus_gd5430 ) - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) - MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5430_device, screen_update) - - MCFG_PALETTE_ADD("palette", 0x100) - MCFG_DEVICE_ADD("vga", CIRRUS_GD5430, 0) -MACHINE_CONFIG_END - MACHINE_CONFIG_FRAGMENT( pcvideo_gamtor_vga ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) @@ -5753,1013 +5545,4 @@ READ16_MEMBER(mach8_device::mach8_config2_r) return 0x0002; } -/****************************************** - -Cirrus SVGA card implementation - -******************************************/ - -void cirrus_gd5428_device::cirrus_define_video_mode() -{ - UINT8 divisor = 1; - float clock; - UINT8 clocksel = (vga.miscellaneous_output & 0xc) >> 2; - - svga.rgb8_en = 0; - svga.rgb15_en = 0; - svga.rgb16_en = 0; - svga.rgb24_en = 0; - svga.rgb32_en = 0; - - if(gc_locked || m_vclk_num[clocksel] == 0 || m_vclk_denom[clocksel] == 0) - clock = (vga.miscellaneous_output & 0xc) ? XTAL_28_63636MHz : XTAL_25_1748MHz; - else - { - int numerator = m_vclk_num[clocksel] & 0x7f; - int denominator = (m_vclk_denom[clocksel] & 0x3e) >> 1; - int mul = m_vclk_denom[clocksel] & 0x01 ? 2 : 1; - clock = 14.31818f * ((float)numerator / ((float)denominator * mul)); - clock *= 1000000; - } - - if (!gc_locked && (vga.sequencer.data[0x07] & 0x01)) - { - switch(vga.sequencer.data[0x07] & 0x0E) - { - case 0x00: svga.rgb8_en = 1; break; - case 0x02: svga.rgb16_en = 1; divisor = 2; break; //double VCLK - case 0x04: svga.rgb24_en = 1; divisor = 3; break; - case 0x06: svga.rgb16_en = 1; break; - case 0x08: svga.rgb32_en = 1; break; - } - } - recompute_params_clock(divisor, (int)clock); -} - -UINT16 cirrus_gd5428_device::offset() -{ - UINT16 off = vga_device::offset(); - - if (svga.rgb8_en == 1) // guess - off <<= 2; -// popmessage("Offset: %04x %s %s ** -- actual: %04x",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD",off); - return off; -} - -void cirrus_gd5428_device::start_bitblt() -{ - UINT32 x,y; - - logerror("CL: BitBLT started: Src: %06x Dst: %06x Width: %i Height %i ROP: %02x Mode: %02x\n",m_blt_source,m_blt_dest,m_blt_width,m_blt_height,m_blt_rop,m_blt_mode); - - m_blt_source_current = m_blt_source; - m_blt_dest_current = m_blt_dest; - - for(y=0;y> (abs((int)(m_blt_source_current - m_blt_source)) % 8)) & 0x01 ? 0xff : 0x00; - } - - switch(m_blt_rop) - { - case 0x00: // BLACK - vga.memory[m_blt_dest_current] = 0x00; - break; - case 0x0d: // SRC - vga.memory[m_blt_dest_current] = src; - break; - case 0x0e: // WHITE - vga.memory[m_blt_dest_current] = 0xff; - break; - case 0x59: // SRCINVERT - vga.memory[m_blt_dest_current] = dst ^ src; - break; - default: - popmessage("CL: Unsupported BitBLT ROP mode %02x",m_blt_rop); - } -} - -UINT8 cirrus_gd5428_device::cirrus_seq_reg_read(UINT8 index) -{ - UINT8 res; - - res = 0xff; - - switch(index) - { - case 0x02: - if(gc_mode_ext & 0x08) - res = vga.sequencer.map_mask & 0xff; - else - res = vga.sequencer.map_mask & 0x0f; - break; - case 0x06: - if(gc_locked) - return 0x0f; - else - return m_lock_reg; - break; - case 0x09: - //printf("%02x\n",index); - res = vga.sequencer.data[index]; - break; - case 0x0a: - res = m_scratchpad1; - break; - case 0x0b: - case 0x0c: - case 0x0d: - case 0x0e: - res = m_vclk_num[index-0x0b]; - break; - case 0x0f: - res = vga.sequencer.data[index] & 0xe7; - res |= 0x18; // 32-bit DRAM data bus width (1MB-2MB) - break; - case 0x14: - res = m_scratchpad2; - break; - case 0x15: - res = m_scratchpad3; - break; - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - res = m_vclk_denom[index-0x1b]; - break; - default: - res = vga.sequencer.data[index]; - } - - return res; -} - -void cirrus_gd5428_device::cirrus_seq_reg_write(UINT8 index, UINT8 data) -{ - logerror("CL: SEQ write %02x to SR%02x\n",data,index); - switch(index) - { - case 0x02: - if(gc_mode_ext & 0x08) - vga.sequencer.map_mask = data & 0xff; - else - vga.sequencer.map_mask = data & 0x0f; - break; - case 0x06: - // Note: extensions are always enabled on the GD5429 - if((data & 0x17) == 0x12) // bits 3,5,6,7 ignored - { - gc_locked = false; - logerror("Cirrus register extensions unlocked\n"); - } - else - { - gc_locked = true; - logerror("Cirrus register extensions locked\n"); - } - m_lock_reg = data & 0x17; - break; - case 0x07: - if((data & 0xf0) != 0) - popmessage("1MB framebuffer window enabled at %iMB (%02x)",data >> 4,data); - vga.sequencer.data[vga.sequencer.index] = data; - break; - case 0x09: - //printf("%02x %02x\n",index,data); - vga.sequencer.data[vga.sequencer.index] = data; - break; - case 0x0a: - m_scratchpad1 = data; // GD5402/GD542x BIOS writes VRAM size here. - break; - case 0x0b: - case 0x0c: - case 0x0d: - case 0x0e: - m_vclk_num[index-0x0b] = data; - break; - case 0x10: - case 0x30: - case 0x50: - case 0x70: - case 0x90: - case 0xb0: - case 0xd0: - case 0xf0: // bits 5-7 of the register index are the low bits of the X co-ordinate - m_cursor_x = (data << 3) | ((index & 0xe0) >> 5); - break; - case 0x11: - case 0x31: - case 0x51: - case 0x71: - case 0x91: - case 0xb1: - case 0xd1: - case 0xf1: // bits 5-7 of the register index are the low bits of the Y co-ordinate - m_cursor_y = (data << 3) | ((index & 0xe0) >> 5); - break; - case 0x12: - // bit 0 - enable cursor - // bit 1 - enable extra palette (cursor colours are there) - // bit 2 - 64x64 cursor (32x32 if clear, GD5422+) - // bit 7 - overscan colour protect - if set, use colour 2 in the extra palette for the border (GD5424+) - m_cursor_attr = data; - break; - case 0x13: - m_cursor_addr = data; // bits 0 and 1 are ignored if using 64x64 cursor - break; - case 0x14: - m_scratchpad2 = data; - break; - case 0x15: - m_scratchpad3 = data; // GD543x BIOS writes VRAM size here - break; - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - m_vclk_denom[index-0x1b] = data; - break; - default: - vga.sequencer.data[vga.sequencer.index] = data; - seq_reg_write(vga.sequencer.index,data); - } -} - -UINT8 cirrus_gd5428_device::cirrus_gc_reg_read(UINT8 index) -{ - UINT8 res = 0xff; - switch(index) - { - case 0x00: - if(gc_mode_ext & 0x02) - res = vga.gc.set_reset & 0xff; - else - res = vga.gc.set_reset & 0x0f; - break; - case 0x01: - if(gc_mode_ext & 0x02) - res = vga.gc.enable_set_reset & 0xff; - else - res = vga.gc.enable_set_reset & 0x0f; - break; - case 0x05: - res = (vga.gc.shift256 & 1) << 6; - res |= (vga.gc.shift_reg & 1) << 5;; - res |= (vga.gc.host_oe & 1) << 4; - res |= (vga.gc.read_mode & 1) << 3; - if(gc_mode_ext & 0x02) - res |= (vga.gc.write_mode & 7); - else - res |= (vga.gc.write_mode & 3); - break; - case 0x09: // Offset register 0 - res = gc_bank_0; - break; - case 0x0a: // Offset register 1 - res = gc_bank_1; - break; - case 0x0b: // Graphics controller mode extensions - res = gc_mode_ext; - break; - case 0x0c: // Colour Key - break; - case 0x0d: // Colour Key Mask - break; - case 0x0e: // Miscellaneous Control - break; - case 0x10: // Foreground Colour Byte 1 - break; - case 0x11: // Background Colour Byte 1 - break; - case 0x20: // BLT Width 0 - res = m_blt_width & 0x00ff; - break; - case 0x21: // BLT Width 1 - res = m_blt_width >> 8; - break; - case 0x22: // BLT Height 0 - res = m_blt_height & 0x00ff; - break; - case 0x23: // BLT Height 1 - res = m_blt_height >> 8; - break; - case 0x24: // BLT Destination Pitch 0 - res = m_blt_dest_pitch & 0x00ff; - break; - case 0x25: // BLT Destination Pitch 1 - res = m_blt_dest_pitch >> 8; - break; - case 0x26: // BLT Source Pitch 0 - res = m_blt_source_pitch & 0x00ff; - break; - case 0x27: // BLT Source Pitch 1 - res = m_blt_source_pitch >> 8; - break; - case 0x28: // BLT Destination start 0 - res = m_blt_dest & 0x000000ff; - break; - case 0x29: // BLT Destination start 1 - res = (m_blt_dest & 0x0000ff00) >> 8; - break; - case 0x2a: // BLT Destination start 2 - res = (m_blt_dest & 0x00ff0000) >> 16; - break; - case 0x2c: // BLT source start 0 - res = m_blt_source & 0x000000ff; - break; - case 0x2d: // BLT source start 1 - res = (m_blt_source & 0x0000ff00) >> 8; - break; - case 0x2e: // BLT source start 2 - res = (m_blt_source & 0x00ff0000) >> 16; - break; - case 0x2f: // BLT destination write mask (GD5430/36/40) - // TODO - break; - case 0x30: // BLT Mode - res = m_blt_mode; - break; - case 0x31: // BitBLT Start / Status - res = m_blt_status; - break; - case 0x32: // BitBLT ROP mode - res = m_blt_rop; - break; - default: - res = gc_reg_read(index); - } - - return res; -} - -void cirrus_gd5428_device::cirrus_gc_reg_write(UINT8 index, UINT8 data) -{ - logerror("CL: GC write %02x to GR%02x\n",data,index); - switch(index) - { - case 0x00: // if extended writes are enabled (bit 2 of index 0bh), then index 0 and 1 are extended to 8 bits - if(gc_mode_ext & 0x02) - vga.gc.set_reset = data & 0xff; - else - vga.gc.set_reset = data & 0x0f; - break; - case 0x01: - if(gc_mode_ext & 0x02) - vga.gc.enable_set_reset = data & 0xff; - else - vga.gc.enable_set_reset = data & 0x0f; - break; - case 0x05: - vga.gc.shift256 = (data & 0x40) >> 6; - vga.gc.shift_reg = (data & 0x20) >> 5; - vga.gc.host_oe = (data & 0x10) >> 4; - vga.gc.read_mode = (data & 8) >> 3; - if(gc_mode_ext & 0x02) - vga.gc.write_mode = data & 7; - else - vga.gc.write_mode = data & 3; - break; - case 0x09: // Offset register 0 - gc_bank_0 = data; - logerror("CL: Offset register 0 set to %i\n",data); - break; - case 0x0a: // Offset register 1 - gc_bank_1 = data; - logerror("CL: Offset register 1 set to %i\n",data); - break; - case 0x0b: // Graphics controller mode extensions - gc_mode_ext = data; - if(!(data & 0x02)) - { - vga.gc.set_reset &= 0x0f; - vga.gc.enable_set_reset &= 0x0f; - } - if(!(data & 0x08)) - vga.sequencer.map_mask &= 0x0f; - break; - case 0x0c: // Colour Key - break; - case 0x0d: // Colour Key Mask - break; - case 0x0e: // Miscellaneous Control - break; - case 0x10: // Foreground Colour Byte 1 - break; - case 0x11: // Background Colour Byte 1 - break; - case 0x20: // BLT Width 0 - m_blt_width = (m_blt_width & 0xff00) | data; - break; - case 0x21: // BLT Width 1 - m_blt_width = (m_blt_width & 0x00ff) | (data << 8); - break; - case 0x22: // BLT Height 0 - m_blt_height = (m_blt_height & 0xff00) | data; - break; - case 0x23: // BLT Height 1 - m_blt_height = (m_blt_height & 0x00ff) | (data << 8); - break; - case 0x24: // BLT Destination Pitch 0 - m_blt_dest_pitch = (m_blt_dest_pitch & 0xff00) | data; - break; - case 0x25: // BLT Destination Pitch 1 - m_blt_dest_pitch = (m_blt_dest_pitch & 0x00ff) | (data << 8); - break; - case 0x26: // BLT Source Pitch 0 - m_blt_source_pitch = (m_blt_source_pitch & 0xff00) | data; - break; - case 0x27: // BLT Source Pitch 1 - m_blt_source_pitch = (m_blt_source_pitch & 0x00ff) | (data << 8); - break; - case 0x28: // BLT Destination start 0 - m_blt_dest = (m_blt_dest & 0xffffff00) | data; - break; - case 0x29: // BLT Destination start 1 - m_blt_dest = (m_blt_dest & 0xffff00ff) | (data << 8); - break; - case 0x2a: // BLT Destination start 2 - m_blt_dest = (m_blt_dest & 0xff00ffff) | (data << 16); - break; - case 0x2c: // BLT source start 0 - m_blt_source = (m_blt_source & 0xffffff00) | data; - break; - case 0x2d: // BLT source start 1 - m_blt_source = (m_blt_source & 0xffff00ff) | (data << 8); - break; - case 0x2e: // BLT source start 2 - m_blt_source = (m_blt_source & 0xff00ffff) | (data << 16); - break; - case 0x2f: // BLT destination write mask (GD5430/36/40) - // TODO - break; - case 0x30: // BLT Mode - m_blt_mode = data; - break; - case 0x31: // BitBLT Start / Status - m_blt_status = data & 0xf2; - if(data & 0x02) - start_bitblt(); - break; - case 0x32: // BitBLT ROP mode - m_blt_rop = data; - break; - default: - gc_reg_write(index,data); - } -} - -READ8_MEMBER(cirrus_gd5428_device::port_03c0_r) -{ - UINT8 res = 0xff; - - switch(offset) - { - case 0x05: - res = cirrus_seq_reg_read(vga.sequencer.index); - break; - case 0x09: - if(!(m_cursor_attr & 0x02)) - res = vga_device::port_03c0_r(space,offset,mem_mask); - else - { - if (vga.dac.read) - { - switch (vga.dac.state++) - { - case 0: - res = m_ext_palette[vga.dac.read_index & 0x0f].red; - break; - case 1: - res = m_ext_palette[vga.dac.read_index & 0x0f].green; - break; - case 2: - res = m_ext_palette[vga.dac.read_index & 0x0f].blue; - break; - } - - if (vga.dac.state==3) - { - vga.dac.state = 0; - vga.dac.read_index++; - } - } - } - break; - case 0x0f: - res = cirrus_gc_reg_read(vga.gc.index); - break; - default: - res = vga_device::port_03c0_r(space,offset,mem_mask); - break; - } - - return res; -} - -WRITE8_MEMBER(cirrus_gd5428_device::port_03c0_w) -{ - switch(offset) - { - case 0x05: - cirrus_seq_reg_write(vga.sequencer.index,data); - break; - case 0x09: - if(!(m_cursor_attr & 0x02)) - vga_device::port_03c0_w(space,offset,data,mem_mask); - else - { - if (!vga.dac.read) - { - switch (vga.dac.state++) { - case 0: - m_ext_palette[vga.dac.write_index & 0x0f].red=data; - break; - case 1: - m_ext_palette[vga.dac.write_index & 0x0f].green=data; - break; - case 2: - m_ext_palette[vga.dac.write_index & 0x0f].blue=data; - break; - } - vga.dac.dirty=1; - if (vga.dac.state==3) { - vga.dac.state=0; vga.dac.write_index++; - } - } - } - break; - case 0x0f: - cirrus_gc_reg_write(vga.gc.index,data); - break; - default: - vga_device::port_03c0_w(space,offset,data,mem_mask); - break; - } - cirrus_define_video_mode(); -} - -READ8_MEMBER(cirrus_gd5428_device::port_03b0_r) -{ - UINT8 res = 0xff; - - if (CRTC_PORT_ADDR == 0x3b0) - { - switch(offset) - { - case 5: - res = cirrus_crtc_reg_read(vga.crtc.index); - break; - default: - res = vga_device::port_03b0_r(space,offset,mem_mask); - break; - } - } - - return res; -} - -READ8_MEMBER(cirrus_gd5428_device::port_03d0_r) -{ - UINT8 res = 0xff; - - if (CRTC_PORT_ADDR == 0x3d0) - { - switch(offset) - { - case 5: - res = cirrus_crtc_reg_read(vga.crtc.index); - break; - default: - res = vga_device::port_03d0_r(space,offset,mem_mask); - break; - } - } - - return res; -} - -WRITE8_MEMBER(cirrus_gd5428_device::port_03b0_w) -{ - if (CRTC_PORT_ADDR == 0x3b0) - { - switch(offset) - { - case 5: - vga.crtc.data[vga.crtc.index] = data; - cirrus_crtc_reg_write(vga.crtc.index,data); - break; - default: - vga_device::port_03b0_w(space,offset,data,mem_mask); - break; - } - } - cirrus_define_video_mode(); -} - -WRITE8_MEMBER(cirrus_gd5428_device::port_03d0_w) -{ - if (CRTC_PORT_ADDR == 0x3d0) - { - switch(offset) - { - case 5: - vga.crtc.data[vga.crtc.index] = data; - cirrus_crtc_reg_write(vga.crtc.index,data); - break; - default: - vga_device::port_03d0_w(space,offset,data,mem_mask); - break; - } - } - cirrus_define_video_mode(); -} - -UINT8 cirrus_gd5428_device::cirrus_crtc_reg_read(UINT8 index) -{ - UINT8 res = 0xff; - - if(index <= 0x18) - return crtc_reg_read(index); - - switch(index) - { - case 0x19: - res = m_cr19; - break; - case 0x1a: - res = m_cr1a; - break; - case 0x1b: - res = m_cr1b; - break; - case 0x27: - res = m_chip_id; - break; - default: - logerror("CL: Unhandled extended CRTC register CR%02x read\n",index); - } - - return res; -} - -void cirrus_gd5428_device::cirrus_crtc_reg_write(UINT8 index, UINT8 data) -{ - logerror("CL: CRTC write %02x to CR%02x\n",data,index); - if(index <= 0x18) - { - crtc_reg_write(index,data); - return; - } - switch(index) - { - case 0x19: - m_cr19 = data; - break; - case 0x1a: - m_cr1a = data; - vga.crtc.horz_blank_end = (vga.crtc.horz_blank_end & 0xff3f) | ((data & 0x30) << 2); - vga.crtc.vert_blank_end = (vga.crtc.vert_blank_end & 0xfcff) | ((data & 0xc0) << 2); - break; - case 0x1b: - m_cr1b = data; - vga.crtc.start_addr_latch &= ~0x070000; - vga.crtc.start_addr_latch |= ((data & 0x01) << 16); - vga.crtc.start_addr_latch |= ((data & 0x0c) << 15); - vga.crtc.offset = (vga.crtc.offset & 0x00ff) | ((data & 0x10) << 4); - cirrus_define_video_mode(); - break; - case 0x1d: - //vga.crtc.start_addr_latch = (vga.crtc.start_addr_latch & 0xf7ffff) | ((data & 0x01) << 16); // GD543x - break; - case 0x27: - // Do nothing, read only - break; - default: - logerror("CL: Unhandled extended CRTC register CR%02x write %02x\n",index,data); - } - -} - -inline UINT8 cirrus_gd5428_device::cirrus_vga_latch_write(int offs, UINT8 data) -{ - UINT8 res = 0; - - switch (vga.gc.write_mode & 3) { - case 0: - data = rotate_right(data); - if(vga.gc.enable_set_reset & 1<= 0x10000 || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) - return vga_device::mem_r(space,offset,mem_mask); - - if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) - bank = gc_bank_1; - else - bank = gc_bank_0; - - if(gc_mode_ext & 0x20) // 16kB bank granularity - addr = bank * 0x4000; - else // 4kB bank granularity - addr = bank * 0x1000; - - // Is the display address adjusted automatically when using Chain-4 addressing? The GD542x BIOS doesn't do it, but Virtual Pool expects it. - if(!(vga.sequencer.data[4] & 0x8)) - addr <<= 2; - - if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) - { - UINT8 data = 0; - if(gc_mode_ext & 0x01) - { - if(offset & 0x10000) - return 0; - if(offset < 0x8000) - offset &= 0x7fff; - else - { - offset -= 0x8000; - offset &= 0x7fff; - } - } - else - offset &= 0xffff; - if(vga.sequencer.data[4] & 0x8) - data = vga.memory[(offset+addr) % vga.svga_intf.vram_size]; - else - { - if(vga.gc.write_mode == 4 || vga.gc.write_mode == 5 || (vga.gc.write_mode == 1 && gc_mode_ext & 0x02)) - { - int i; - - for(i=0;i<8;i++) - { - if(vga.sequencer.map_mask & 1 << i) - data |= vga.memory[((offset*8+i)+addr) % vga.svga_intf.vram_size]; - } - } - else - { - int i; - - for(i=0;i<4;i++) - { - if(vga.sequencer.map_mask & 1 << i) - data |= vga.memory[((offset*4+i)+addr) % vga.svga_intf.vram_size]; - } - } - return data; - } - } - - switch(vga.gc.memory_map_sel & 0x03) - { - case 0: break; - case 1: if(gc_mode_ext & 0x01) offset &= 0x7fff; else offset &= 0x0ffff; break; - case 2: offset -= 0x10000; offset &= 0x07fff; break; - case 3: offset -= 0x18000; offset &= 0x07fff; break; - } - - if(vga.sequencer.data[4] & 4) - { - int data; - if (!space.debugger_access()) - { - vga.gc.latch[0]=vga.memory[(offset+addr)]; - vga.gc.latch[1]=vga.memory[(offset+addr)+0x10000]; - vga.gc.latch[2]=vga.memory[(offset+addr)+0x20000]; - vga.gc.latch[3]=vga.memory[(offset+addr)+0x30000]; - } - - if (vga.gc.read_mode) - { - UINT8 byte,layer; - UINT8 fill_latch; - data=0; - - for(byte=0;byte<8;byte++) - { - fill_latch = 0; - for(layer=0;layer<4;layer++) - { - if(vga.gc.latch[layer] & 1 << byte) - fill_latch |= 1 << layer; - } - fill_latch &= vga.gc.color_dont_care; - if(fill_latch == vga.gc.color_compare) - data |= 1 << byte; - } - } - else - data=vga.gc.latch[vga.gc.read_map_sel]; - - return data; - } - else - { - // TODO: Lines up in 16-colour mode, likely different for 256-colour modes (docs say video addresses are shifted right 3 places) - UINT8 i,data; -// UINT8 bits = ((gc_mode_ext & 0x08) && (vga.gc.write_mode == 1)) ? 8 : 4; - - data = 0; - //printf("%08x\n",offset); - - if(gc_mode_ext & 0x02) - { - for(i=0;i<8;i++) - { - if(vga.sequencer.map_mask & 1 << i) - data |= vga.memory[((offset+addr))+i*0x10000]; - } - } - else - { - for(i=0;i<4;i++) - { - if(vga.sequencer.map_mask & 1 << i) - data |= vga.memory[((offset+addr))+i*0x10000]; - } - } - - return data; - } -} - -WRITE8_MEMBER(cirrus_gd5428_device::mem_w) -{ - UINT32 addr; - UINT8 bank; - UINT8 cur_mode = pc_vga_choosevideomode(); - - if(gc_locked || offset >= 0x10000 || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) - { - vga_device::mem_w(space,offset,data,mem_mask); - return; - } - - if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) - bank = gc_bank_1; - else - bank = gc_bank_0; - - if(gc_mode_ext & 0x20) // 16kB bank granularity - addr = bank * 0x4000; - else // 4kB bank granularity - addr = bank * 0x1000; - - // Is the display address adjusted automatically when using Chain-4 addressing? The GD542x BIOS doesn't do it, but Virtual Pool expects it. - if(!(vga.sequencer.data[4] & 0x8)) - addr <<= 2; - - if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) - { - if(offset & 0x10000) - return; - if(gc_mode_ext & 0x01) - { - if(offset < 0x8000) - offset &= 0x7fff; - else - { - offset -= 0x8000; - offset &= 0x7fff; - } - } - else - offset &= 0xffff; - if(vga.sequencer.data[4] & 0x8) - vga.memory[(offset+addr) % vga.svga_intf.vram_size] = data; - else - { - int i; - if(vga.gc.write_mode == 4 || vga.gc.write_mode == 5 || (vga.gc.write_mode == 1 && gc_mode_ext & 0x02)) - { - for(i=0;i<8;i++) - { - if(vga.sequencer.map_mask & 1 << i) - vga.memory[((offset*8+i)+addr) % vga.svga_intf.vram_size] = data; - } - } - else - { - for(i=0;i<4;i++) - { - if(vga.sequencer.map_mask & 1 << i) - vga.memory[((offset*4+i)+addr) % vga.svga_intf.vram_size] = data; - } - } - } - } - else - { - //Inside each case must prevent writes to non-mapped VGA memory regions, not only mask the offset. - switch(vga.gc.memory_map_sel & 0x03) - { - case 0: break; - case 1: - if(offset & 0x10000) - return; - - if(gc_mode_ext & 0x01) - offset &= 0x7fff; - else - offset &= 0xffff; - break; - case 2: - if((offset & 0x18000) != 0x10000) - return; - - offset &= 0x07fff; - break; - case 3: - if((offset & 0x18000) != 0x18000) - return; - - offset &= 0x07fff; - break; - } - - { - // TODO: Lines up in 16-colour mode, likely different for 256-colour modes (docs say video addresses are shifted right 3 places) - UINT8 i; -// UINT8 bits = ((gc_mode_ext & 0x08) && (vga.gc.write_mode == 1)) ? 8 : 4; - - for(i=0;i<4;i++) - { - if(vga.sequencer.map_mask & 1 << i) - { - if(gc_mode_ext & 0x02) - { - vga.memory[((offset+addr) << 1)+i*0x10000] = (vga.sequencer.data[4] & 4) ? cirrus_vga_latch_write(i,data) : data; - vga.memory[((offset+addr) << 1)+i*0x10000+1] = (vga.sequencer.data[4] & 4) ? cirrus_vga_latch_write(i,data) : data; - } - else - vga.memory[((offset+addr))+i*0x10000] = (vga.sequencer.data[4] & 4) ? cirrus_vga_latch_write(i,data) : data; - } - } - return; - } - } -} diff --git a/src/emu/video/pc_vga.h b/src/emu/video/pc_vga.h index a9046e697bb..02ebe6c1b58 100644 --- a/src/emu/video/pc_vga.h +++ b/src/emu/video/pc_vga.h @@ -12,10 +12,23 @@ MACHINE_CONFIG_EXTERN( pcvideo_vga ); MACHINE_CONFIG_EXTERN( pcvideo_trident_vga ); MACHINE_CONFIG_EXTERN( pcvideo_gamtor_vga ); -MACHINE_CONFIG_EXTERN( pcvideo_cirrus_gd5428 ); -MACHINE_CONFIG_EXTERN( pcvideo_cirrus_gd5430 ); MACHINE_CONFIG_EXTERN( pcvideo_s3_vga ); +enum +{ + SCREEN_OFF = 0, + TEXT_MODE, + VGA_MODE, + EGA_MODE, + CGA_MODE, + MONO_MODE, + RGB8_MODE, + RGB15_MODE, + RGB16_MODE, + RGB24_MODE, + RGB32_MODE +}; + // ======================> vga_device class vga_device : public device_t @@ -65,8 +78,30 @@ protected: void gc_reg_write(UINT8 index,UINT8 data); virtual UINT16 offset(); inline UINT8 vga_latch_write(int offs, UINT8 data); - inline UINT8 rotate_right(UINT8 val); - inline UINT8 vga_logical_op(UINT8 data, UINT8 plane, UINT8 mask); + inline UINT8 rotate_right(UINT8 val) { return (val >> vga.gc.rotate_count) | (val << (8 - vga.gc.rotate_count)); } + inline UINT8 vga_logical_op(UINT8 data, UINT8 plane, UINT8 mask) + { + UINT8 res = 0; + + switch(vga.gc.logical_op & 3) + { + case 0: /* NONE */ + res = (data & mask) | (vga.gc.latch[plane] & ~mask); + break; + case 1: /* AND */ + res = (data | ~mask) & (vga.gc.latch[plane]); + break; + case 2: /* OR */ + res = (data & mask) | (vga.gc.latch[plane]); + break; + case 3: /* XOR */ + res = (data & mask) ^ (vga.gc.latch[plane]); + break; + } + + return res; + } + struct { @@ -620,94 +655,6 @@ private: // device type definition extern const device_type GAMTOR_VGA; -// ======================> cirrus_vga_device - -class cirrus_gd5428_device : public svga_device -{ -public: - // construction/destruction - cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); - virtual READ8_MEMBER(port_03c0_r); - virtual WRITE8_MEMBER(port_03c0_w); - virtual READ8_MEMBER(port_03b0_r); - virtual WRITE8_MEMBER(port_03b0_w); - virtual READ8_MEMBER(port_03d0_r); - virtual WRITE8_MEMBER(port_03d0_w); - virtual READ8_MEMBER(mem_r); - virtual WRITE8_MEMBER(mem_w); - - virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - virtual UINT16 offset(); - - UINT8 m_chip_id; - - UINT8 gc_mode_ext; - UINT8 gc_bank_0; - UINT8 gc_bank_1; - bool gc_locked; - UINT8 m_lock_reg; - - UINT8 m_cr19; - UINT8 m_cr1a; - UINT8 m_cr1b; - - // hardware cursor - UINT16 m_cursor_x; - UINT16 m_cursor_y; - UINT16 m_cursor_addr; - UINT8 m_cursor_attr; - struct { UINT8 red, green, blue; } m_ext_palette[16]; // extra palette, colour 0 is cursor background, colour 15 is cursor foreground, colour 2 is overscan border colour - - // BitBLT engine - UINT8 m_blt_status; - UINT8 m_blt_rop; - UINT8 m_blt_mode; - UINT32 m_blt_source; - UINT32 m_blt_dest; - UINT16 m_blt_source_pitch; - UINT16 m_blt_dest_pitch; - UINT16 m_blt_height; - UINT16 m_blt_width; - UINT16 m_blt_source_current; - UINT16 m_blt_dest_current; - - UINT8 m_scratchpad1; - UINT8 m_scratchpad2; - UINT8 m_scratchpad3; - UINT8 m_vclk_num[4]; - UINT8 m_vclk_denom[4]; - - inline UINT8 cirrus_vga_latch_write(int offs, UINT8 data); -private: - void cirrus_define_video_mode(); - UINT8 cirrus_seq_reg_read(UINT8 index); - void cirrus_seq_reg_write(UINT8 index, UINT8 data); - UINT8 cirrus_gc_reg_read(UINT8 index); - void cirrus_gc_reg_write(UINT8 index, UINT8 data); - UINT8 cirrus_crtc_reg_read(UINT8 index); - void cirrus_crtc_reg_write(UINT8 index, UINT8 data); - - void start_bitblt(); - void copy_pixel(); -}; - -class cirrus_gd5430_device : public cirrus_gd5428_device -{ -public: - cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); -protected: - virtual void device_start(); -}; - -// device type definition -extern const device_type CIRRUS_GD5428; -extern const device_type CIRRUS_GD5430; - /* pega notes (paradise) build in amstrad pc1640 diff --git a/src/mame/drivers/gambl186.c b/src/mame/drivers/gambl186.c index 67fba40c84a..684a494a38e 100644 --- a/src/mame/drivers/gambl186.c +++ b/src/mame/drivers/gambl186.c @@ -30,7 +30,7 @@ TODO: #include "emu.h" #include "cpu/i86/i186.h" -#include "video/pc_vga.h" +#include "video/clgd542x.h" class gambl186_state : public driver_device diff --git a/src/mame/drivers/pcat_nit.c b/src/mame/drivers/pcat_nit.c index 3b995e8e8e0..3a459122f1c 100644 --- a/src/mame/drivers/pcat_nit.c +++ b/src/mame/drivers/pcat_nit.c @@ -88,7 +88,7 @@ Smitdogg #include "machine/pcshare.h" #include "machine/ins8250.h" #include "machine/microtch.h" -#include "video/pc_vga.h" +#include "video/clgd542x.h" #include "machine/nvram.h" class pcat_nit_state : public pcat_base_state diff --git a/src/mess/drivers/bebox.c b/src/mess/drivers/bebox.c index 39b0aa99499..85670758480 100644 --- a/src/mess/drivers/bebox.c +++ b/src/mess/drivers/bebox.c @@ -11,7 +11,7 @@ #include "includes/bebox.h" /* Components */ -#include "video/pc_vga.h" +#include "video/clgd542x.h" #include "bus/lpci/cirrus.h" #include "cpu/powerpc/ppc.h" #include "sound/3812intf.h" -- cgit v1.2.3-70-g09d2 From 3a37417a6ba315f237c2db958e337a8493def5eb Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 25 Apr 2015 13:02:38 +0200 Subject: use target suffixes only for main executable (nw) --- scripts/genie.lua | 38 -------------------------------------- scripts/src/main.lua | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 38 deletions(-) (limited to 'scripts/src') diff --git a/scripts/genie.lua b/scripts/genie.lua index ddb651bb4b1..032e66409c7 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -428,44 +428,6 @@ configuration { "gmake" } "SingleOutputDir", } -configuration { "x64", "Release" } - targetsuffix "64" - if _OPTIONS["PROFILE"] then - targetsuffix "64p" - end - -configuration { "x64", "Debug" } - targetsuffix "64d" - if _OPTIONS["PROFILE"] then - targetsuffix "64dp" - end - -configuration { "x32", "Release" } - targetsuffix "" - if _OPTIONS["PROFILE"] then - targetsuffix "p" - end - -configuration { "x32", "Debug" } - targetsuffix "d" - if _OPTIONS["PROFILE"] then - targetsuffix "dp" - end - -configuration { "Native", "Release" } - targetsuffix "" - if _OPTIONS["PROFILE"] then - targetsuffix "p" - end - -configuration { "Native", "Debug" } - targetsuffix "d" - if _OPTIONS["PROFILE"] then - targetsuffix "dp" - end - -configuration { } - dofile ("toolchain.lua") diff --git a/scripts/src/main.lua b/scripts/src/main.lua index a109bea87dd..80e3d1bf09a 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -28,6 +28,42 @@ function mainProject(_target, _subtarget) "Unicode", } + configuration { "x64", "Release" } + targetsuffix "64" + if _OPTIONS["PROFILE"] then + targetsuffix "64p" + end + + configuration { "x64", "Debug" } + targetsuffix "64d" + if _OPTIONS["PROFILE"] then + targetsuffix "64dp" + end + + configuration { "x32", "Release" } + targetsuffix "" + if _OPTIONS["PROFILE"] then + targetsuffix "p" + end + + configuration { "x32", "Debug" } + targetsuffix "d" + if _OPTIONS["PROFILE"] then + targetsuffix "dp" + end + + configuration { "Native", "Release" } + targetsuffix "" + if _OPTIONS["PROFILE"] then + targetsuffix "p" + end + + configuration { "Native", "Debug" } + targetsuffix "d" + if _OPTIONS["PROFILE"] then + targetsuffix "dp" + end + configuration { "mingw*" or "vs*" } targetextension ".exe" -- cgit v1.2.3-70-g09d2 From 66d555e3238019b372c7b0253dc9ae738db32269 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 25 Apr 2015 14:18:41 +0200 Subject: Added 74175 and 82S16 devices to netlist. nl_breakout now compiles. (nw) --- scripts/src/netlist.lua | 6 +++ src/emu/netlist/devices/net_lib.c | 6 +++ src/emu/netlist/devices/net_lib.h | 3 ++ src/emu/netlist/devices/nld_74175.c | 92 ++++++++++++++++++++++++++++++++++++ src/emu/netlist/devices/nld_74175.h | 61 ++++++++++++++++++++++++ src/emu/netlist/devices/nld_74279.c | 75 +++++++++++++++++++++++++++++ src/emu/netlist/devices/nld_74279.h | 55 +++++++++++++++++++++ src/emu/netlist/devices/nld_7474.h | 2 +- src/emu/netlist/devices/nld_82S16.c | 90 +++++++++++++++++++++++++++++++++++ src/emu/netlist/devices/nld_82S16.h | 51 ++++++++++++++++++++ src/emu/netlist/devices/nld_system.h | 1 + src/mame/drivers/nl_breakout.c | 4 +- 12 files changed, 443 insertions(+), 3 deletions(-) create mode 100644 src/emu/netlist/devices/nld_74175.c create mode 100644 src/emu/netlist/devices/nld_74175.h create mode 100644 src/emu/netlist/devices/nld_74279.c create mode 100644 src/emu/netlist/devices/nld_74279.h create mode 100644 src/emu/netlist/devices/nld_82S16.c create mode 100644 src/emu/netlist/devices/nld_82S16.h (limited to 'scripts/src') diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 4aebef1f091..1670ebb9ba6 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -81,12 +81,18 @@ files { MAME_DIR .. "src/emu/netlist/devices/nld_74123.h", MAME_DIR .. "src/emu/netlist/devices/nld_74153.c", MAME_DIR .. "src/emu/netlist/devices/nld_74153.h", + MAME_DIR .. "src/emu/netlist/devices/nld_74175.c", + MAME_DIR .. "src/emu/netlist/devices/nld_74175.h", MAME_DIR .. "src/emu/netlist/devices/nld_74192.c", MAME_DIR .. "src/emu/netlist/devices/nld_74192.h", MAME_DIR .. "src/emu/netlist/devices/nld_74193.c", MAME_DIR .. "src/emu/netlist/devices/nld_74193.h", + MAME_DIR .. "src/emu/netlist/devices/nld_74279.c", + MAME_DIR .. "src/emu/netlist/devices/nld_74279.h", MAME_DIR .. "src/emu/netlist/devices/nld_74ls629.c", MAME_DIR .. "src/emu/netlist/devices/nld_74ls629.h", + MAME_DIR .. "src/emu/netlist/devices/nld_82S16.c", + MAME_DIR .. "src/emu/netlist/devices/nld_82S16.h", MAME_DIR .. "src/emu/netlist/devices/nld_9310.c", MAME_DIR .. "src/emu/netlist/devices/nld_9310.h", MAME_DIR .. "src/emu/netlist/devices/nld_9312.c", diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index 1483f2d40cb..a40be7be574 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -117,9 +117,12 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74107A, TTL_74107A, "+CLK,J,K,CLRQ") ENTRY(74123, TTL_74123, "-") ENTRY(74153, TTL_74153, "+C0,C1,C2,C3,A,B,G") + ENTRY(74175, TTL_74175, "-") ENTRY(74192, TTL_74192, "-") ENTRY(74193, TTL_74193, "-") + //ENTRY(74279, TTL_74279, "-") // only dip available ENTRY(SN74LS629, SN74LS629, "CAP") + ENTRY(82S16, TTL_82S16, "-") ENTRY(9310, TTL_9310, "-") ENTRY(9312, TTL_9312, "-") ENTRY(9316, TTL_9316, "+CLK,ENP,ENT,CLRQ,LOADQ,A,B,C,D") @@ -149,8 +152,11 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74107_dip, TTL_74107_DIP, "-") ENTRY(74123_dip, TTL_74123_DIP, "-") ENTRY(74153_dip, TTL_74153_DIP, "-") + ENTRY(74175_dip, TTL_74175_DIP, "-") ENTRY(74192_dip, TTL_74192_DIP, "-") ENTRY(74193_dip, TTL_74193_DIP, "-") + ENTRY(74279_dip, TTL_74279_DIP, "-") + ENTRY(82S16_dip, TTL_82S16_DIP, "-") ENTRY(9602_dip, TTL_9602_DIP, "-") ENTRY(9310_dip, TTL_9310_DIP, "-") ENTRY(9312_dip, TTL_9312_DIP, "-") diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index bc8db7201a2..42efb0f19dd 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -78,9 +78,12 @@ #include "nld_74107.h" #include "nld_74123.h" #include "nld_74153.h" +#include "nld_74175.h" #include "nld_74192.h" #include "nld_74193.h" +#include "nld_74279.h" #include "nld_74ls629.h" +#include "nld_82S16.h" #include "nld_9310.h" #include "nld_9312.h" #include "nld_9316.h" diff --git a/src/emu/netlist/devices/nld_74175.c b/src/emu/netlist/devices/nld_74175.c new file mode 100644 index 00000000000..e7c8bc9379c --- /dev/null +++ b/src/emu/netlist/devices/nld_74175.c @@ -0,0 +1,92 @@ +/* + * nld_74175.c + * + */ + +#include "nld_74175.h" + +static const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + +NETLIB_UPDATE(74175) +{ + if (!INPLOGIC(m_CLRQ)) + { + for (int i=0; i<4; i++) + { + OUTLOGIC(m_Q[i], 0, delay[0]); + OUTLOGIC(m_QQ[i], 1, delay[1]); + } + } + else if (!m_last && INPLOGIC(m_CLK)) + { + for (int i=0; i<4; i++) + { + UINT8 d = INPLOGIC(m_D[i]); + OUTLOGIC(m_Q[i], d, delay[d]); + OUTLOGIC(m_QQ[i], !d, delay[!d]); + } + } + m_last = INPLOGIC(m_CLK); +} + +NETLIB_START(74175) +{ + register_input("CLK", m_CLK); + register_input("CLRQ", m_CLRQ); + + register_input("D1", m_D[0]); + register_output("Q1", m_Q[0]); + register_output("Q1Q", m_QQ[0]); + + register_input("D2", m_D[1]); + register_output("Q2", m_Q[1]); + register_output("Q2Q", m_QQ[1]); + + register_input("D3", m_D[2]); + register_output("Q3", m_Q[2]); + register_output("Q3Q", m_QQ[2]); + + register_input("D4", m_D[3]); + register_output("Q4", m_Q[3]); + register_output("Q4Q", m_QQ[3]); + + save(NLNAME(m_last.ref())); +} + +NETLIB_RESET(74175) +{ +} + +NETLIB_START(74175_dip) +{ + register_input("9", m_CLK); + register_input("1", m_CLRQ); + + register_input("4", m_D[0]); + register_output("2", m_Q[0]); + register_output("3", m_QQ[0]); + + register_input("5", m_D[1]); + register_output("7", m_Q[1]); + register_output("6", m_QQ[1]); + + register_input("12", m_D[2]); + register_output("10", m_Q[2]); + register_output("11", m_QQ[2]); + + register_input("13", m_D[3]); + register_output("15", m_Q[3]); + register_output("14", m_QQ[3]); + + save(NLNAME(m_last.ref())); +} + +NETLIB_RESET(74175_dip) +{ + NETLIB_NAME(74175)::reset(); +} + +NETLIB_UPDATE(74175_dip) +{ + NETLIB_NAME(74175)::update(); +} diff --git a/src/emu/netlist/devices/nld_74175.h b/src/emu/netlist/devices/nld_74175.h new file mode 100644 index 00000000000..9c138755a50 --- /dev/null +++ b/src/emu/netlist/devices/nld_74175.h @@ -0,0 +1,61 @@ +// 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_ + +#include "nld_signal.h" + +#define TTL_74175(_name) \ + NET_REGISTER_DEV(74175, _name) \ + +#define TTL_74175_DIP(_name) \ + NET_REGISTER_DEV(74175_dip, _name) + +NETLIB_DEVICE(74175, + + netlist_state_t m_last; + netlist_ttl_input_t m_D[4]; + netlist_ttl_input_t m_CLRQ; + netlist_ttl_input_t m_CLK; + netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_QQ[4]; +); + +NETLIB_DEVICE_DERIVED(74175_dip, 74175, + +); + +#endif /* NLD_74175_H_ */ diff --git a/src/emu/netlist/devices/nld_74279.c b/src/emu/netlist/devices/nld_74279.c new file mode 100644 index 00000000000..b920ac0498a --- /dev/null +++ b/src/emu/netlist/devices/nld_74279.c @@ -0,0 +1,75 @@ +/* + * nld_74279.c + * + */ + +#include "nld_74279.h" + +nld_74279A::truthtable_t nld_74279A::m_ttbl; + +const char *nld_74279A::m_desc[] = { + "S,R,PQ,PS,PR|Q", + "0,0,X,X,X|1|22", + "0,1,X,X,X|1|22", + "1,0,X,X,X|0|15", + "1,1,0,X,X|0|15", + "1,1,1,X,X|1|22", + "" +}; + +nld_74279B::truthtable_t nld_74279B::m_ttbl; + +const char *nld_74279B::m_desc[] = { + "S1,S2,R,PQ,PS1,PS2,PR|Q", + "0,X,0,X,X,X,X|1|22", + "X,0,0,X,X,X,X|1|22", + "0,X,1,X,X,X,X|1|22", + "X,0,1,X,X,X,X|1|22", + "1,1,0,X,X,X,X|0|15", + "1,1,1,0,X,X,X|0|15", + "1,1,1,1,X,X,X|1|22", + "" +}; + +NETLIB_START(74279_dip) +{ + register_sub(m_1, "1"); + register_sub(m_2, "2"); + register_sub(m_3, "3"); + register_sub(m_4, "4"); + + register_subalias("1", m_1.m_i[2]); //R + register_subalias("2", m_1.m_i[0]); + register_subalias("3", m_1.m_i[1]); + register_subalias("4", m_1.m_Q[0]); + + register_subalias("5", m_2.m_i[1]); //R + register_subalias("6", m_2.m_i[0]); + register_subalias("7", m_2.m_Q[0]); + + register_subalias("9", m_3.m_Q[0]); + register_subalias("10", m_3.m_i[2]); //R + register_subalias("11", m_3.m_i[0]); + register_subalias("12", m_3.m_i[1]); + + register_subalias("13", m_2.m_Q[0]); + register_subalias("14", m_2.m_i[1]); //R + register_subalias("15", m_2.m_i[0]); +} + +NETLIB_UPDATE(74279_dip) +{ + /* only called during startup */ + m_1.update_dev(); + m_2.update_dev(); + m_3.update_dev(); + m_4.update_dev(); +} + +NETLIB_RESET(74279_dip) +{ + m_1.do_reset(); + m_2.do_reset(); + m_3.do_reset(); + m_4.do_reset(); +} diff --git a/src/emu/netlist/devices/nld_74279.h b/src/emu/netlist/devices/nld_74279.h new file mode 100644 index 00000000000..ae5020394de --- /dev/null +++ b/src/emu/netlist/devices/nld_74279.h @@ -0,0 +1,55 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74279.h + * + * DM74279: Triple 3-Input NAND Gates + * + * +--------------+ + * 1R |1 ++ 16| VCC + * 1S1 |2 15| 4S + * 1S2 |3 14| 4R + * 1Q |4 74279 13| 4Q + * 2R |5 12| 3S2 + * 2S |6 11| 3S1 + * 2Q |7 10| 3R + * GND |8 9| 3Q + * +--------------+ + * ___ + * + * +---+---+---++---+ + * |S1 |S2 | R || Q | + * +===+===+===++===+ + * | 0 | 0 | 0 || 1 | + * | 0 | 1 | 1 || 1 | + * | 1 | 0 | 1 || 1 | + * | 1 | 1 | 0 || 0 | + * | 1 | 1 | 1 ||QP | + * +---+---+---++---+ + * + * QP: Previous Q + * + * Naming conventions follow Fairchild Semiconductor datasheet + * + */ + +#ifndef NLD_74279_H_ +#define NLD_74279_H_ + +#include "nld_truthtable.h" + +NETLIB_TRUTHTABLE(74279A, 2, 1, 1); +NETLIB_TRUTHTABLE(74279B, 3, 1, 1); + +#define TTL_74279_DIP(_name) \ + NET_REGISTER_DEV(74279_dip, _name) + +NETLIB_DEVICE(74279_dip, + + NETLIB_NAME(74279B) m_1; + NETLIB_NAME(74279A) m_2; + NETLIB_NAME(74279B) m_3; + NETLIB_NAME(74279A) m_4; +); + +#endif /* NLD_74279_H_ */ diff --git a/src/emu/netlist/devices/nld_7474.h b/src/emu/netlist/devices/nld_7474.h index 1c209d3a4e0..3452400dd54 100644 --- a/src/emu/netlist/devices/nld_7474.h +++ b/src/emu/netlist/devices/nld_7474.h @@ -4,7 +4,7 @@ * nld_7474.h * * DM7474: Dual Positive-Edge-Triggered D Flip-Flops - * with Preset Clear and Complementary Outputs + * with Preset, Clear and Complementary Outputs * * +--------------+ * CLR1 |1 ++ 14| VCC diff --git a/src/emu/netlist/devices/nld_82S16.c b/src/emu/netlist/devices/nld_82S16.c new file mode 100644 index 00000000000..bb0f4206d93 --- /dev/null +++ b/src/emu/netlist/devices/nld_82S16.c @@ -0,0 +1,90 @@ +/* + * nld_82S16.c + * + */ + +#include "nld_82S16.h" + +static const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + +// FIXME: timing! +// FIXME: optimize device (separate address decoder!) +NETLIB_UPDATE(82S16) +{ + if (INPLOGIC(m_CE1Q) || INPLOGIC(m_CE1Q) || INPLOGIC(m_CE1Q)) + { + // FIXME: Outputs are tristate. This needs to be properly implemented + OUTLOGIC(m_DOUTQ, 1, NLTIME_FROM_NS(40)); + } + else + { + int adr = 0; + for (int i=0; i<8; i++) + adr |= (INPLOGIC(m_A[i]) << i); + + if (!INPLOGIC(m_WEQ)) + m_ram[adr] = INPLOGIC(m_DIN); + OUTLOGIC(m_DOUTQ, m_ram[adr] ^ 1, NLTIME_FROM_NS(40)); + } +} + +NETLIB_START(82S16) +{ + register_input("A0", m_A[0]); + register_input("A1", m_A[1]); + register_input("A2", m_A[2]); + register_input("A3", m_A[3]); + register_input("A4", m_A[4]); + register_input("A5", m_A[5]); + register_input("A6", m_A[6]); + register_input("A7", m_A[7]); + + register_input("CE1Q", m_CE1Q); + register_input("CE2Q", m_CE2Q); + register_input("CE3Q", m_CE3Q); + + register_input("WEQ", m_WEQ); + register_input("DIN", m_DIN); + + register_output("DOUTQ",m_DOUTQ); + + save(NLNAME(m_ram)); +} + +NETLIB_RESET(82S16) +{ + for (int i=0; i<256; i++) + { + m_ram[i] = 0; + } +} + +NETLIB_START(82S16_dip) +{ + register_input("2", m_A[0]); + register_input("1", m_A[1]); + register_input("15", m_A[2]); + register_input("14", m_A[3]); + register_input("7", m_A[4]); + register_input("9", m_A[5]); + register_input("10", m_A[6]); + register_input("11", m_A[7]); + + register_input("3", m_CE1Q); + register_input("4", m_CE2Q); + register_input("5", m_CE3Q); + + register_input("12", m_WEQ); + register_input("13", m_DIN); + + register_output("6", m_DOUTQ);} + +NETLIB_RESET(82S16_dip) +{ + NETLIB_NAME(82S16)::reset(); +} + +NETLIB_UPDATE(82S16_dip) +{ + NETLIB_NAME(82S16)::update(); +} diff --git a/src/emu/netlist/devices/nld_82S16.h b/src/emu/netlist/devices/nld_82S16.h new file mode 100644 index 00000000000..652fbbc13a1 --- /dev/null +++ b/src/emu/netlist/devices/nld_82S16.h @@ -0,0 +1,51 @@ +// 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_ + +#include "../nl_base.h" + +#define TTL_82S16(_name) \ + NET_REGISTER_DEV(82S16, _name) \ + +#define TTL_82S16_DIP(_name) \ + NET_REGISTER_DEV(82S16_dip, _name) + +NETLIB_DEVICE(82S16, + + UINT8 m_ram[256]; + netlist_ttl_input_t m_A[8]; + netlist_ttl_input_t m_CE1Q; + netlist_ttl_input_t m_CE2Q; + netlist_ttl_input_t m_CE3Q; + netlist_ttl_input_t m_WEQ; + netlist_ttl_input_t m_DIN; + netlist_ttl_output_t m_DOUTQ; +); + +NETLIB_DEVICE_DERIVED(82S16_dip, 82S16, + +); + +#endif /* NLD_82S16_H_ */ diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h index 644264eea13..fe14f58ab32 100644 --- a/src/emu/netlist/devices/nld_system.h +++ b/src/emu/netlist/devices/nld_system.h @@ -43,6 +43,7 @@ NET_REGISTER_DEV(frontier, _name) \ NET_C(_IN, _name.I) \ NET_C(_OUT, _name.Q) + // ----------------------------------------------------------------------------- // mainclock // ----------------------------------------------------------------------------- diff --git a/src/mame/drivers/nl_breakout.c b/src/mame/drivers/nl_breakout.c index be56fd611f4..bd4968a0134 100644 --- a/src/mame/drivers/nl_breakout.c +++ b/src/mame/drivers/nl_breakout.c @@ -67,8 +67,8 @@ // identify unknown devices in IDE -#if 0 -#define NETLIST_DEVELOPMENT 1 +#if 1 +#define NETLIST_DEVELOPMENT 0 #include "netlist/nl_dice_compat.h" #include "netlist/devices/net_lib.h" -- cgit v1.2.3-70-g09d2 From 2c1c3e84a046c1f174c0a048fe12fd0c83243444 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 29 Apr 2015 11:15:51 +0200 Subject: build mess tools for ume (nw) --- scripts/src/tools.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/src') diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index 64860177f2a..8c371f3b19a 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -455,7 +455,7 @@ files { dofile("netlist.lua") -if (_OPTIONS["target"]=="mess") then +if (_OPTIONS["target"]~="mame") then -------------------------------------------------- -- castool -------------------------------------------------- -- cgit v1.2.3-70-g09d2