diff options
45 files changed, 1020 insertions, 947 deletions
diff --git a/hash/z88_cart.xml b/hash/z88_cart.xml index a0de3f24267..5d2163608f6 100644 --- a/hash/z88_cart.xml +++ b/hash/z88_cart.xml @@ -403,6 +403,18 @@ </part> </software> + <software name="spellmstr"> + <description>Spell-Master</description> + <year>1988</year> + <publisher>Computer Concepts</publisher> + <part name="cart1" interface="z88_cart"> + <feature name="slot" value="128krom"/> + <dataarea name="rom" size="131072"> + <rom name="spellmaster.epr" size="131072" crc="ad0c407d" sha1="1e9d302989e8e98e963f99ce1ea5a634ed1c466e" offset="0"/> + </dataarea> + </part> + </software> + <software name="ugrom"> <description>Z88 User Group ROM</description> <year>1989</year> diff --git a/plugins/data/data_hiscore.lua b/plugins/data/data_hiscore.lua index 700a9958ca8..9b25652b5ad 100644 --- a/plugins/data/data_hiscore.lua +++ b/plugins/data/data_hiscore.lua @@ -6,6 +6,222 @@ local env = {} local output local curset +function env.open(file, size) + if file == ".hi" then + local path = "hi" + local ini = emu.file(lfs.env_replace(manager:options().entries.inipath:value()), 1) + local ret = ini:open("hiscore.ini") + if not ret then + local inifile = ini:read(ini:size()) + for line in inifile:gmatch("[^\n\r]") do + token, value = string.match(line, '([^ ]+) ([^ ]+)'); + if token == "hi_path" then + path = value + break + end + end + end + file = path .. "/" .. curset .. ".hi" + else + file = lfs.env_replace(manager:options().entries.nvram_directory:value()) .. "/" .. curset .. "/" .. file + end + local f = io.open(file, "rb") + local content = f:read("*all") + f:close() + if #content < size then + content = content .. string.rep("\0", size - #content) + end + return content +end + +function env.endianness(bytes, endian) + local newbytes = {} + if endian == "little_endian" then + for i = 1, #bytes do + newbytes[i] = bytes[#bytes - i + 1] + end + else + newbytes = bytes + end + return newbytes +end + +function env.byte_skip(bytes, skip) + local newbytes = {} + if skip == "odd" then + -- lua lists are 1 based so use even indexes + for i = 2, #bytes, 2 do + newbytes[i/2] = bytes[i] + end + elseif skip == "even" then + for i = 1, #bytes, 2 do + newbytes[(i+1)/2] = bytes[i] + end + elseif skip == "1000" then + for i = 1, #bytes, 4 do + newbytes[(i+3)/4] = bytes[i] + end + elseif skip == "0100" then + for i = 2, #bytes, 4 do + newbytes[(i+2)/4] = bytes[i] + end + elseif skip == "0010" then + for i = 3, #bytes, 4 do + newbytes[(i+1)/4] = bytes[i] + end + elseif skip == "0001" then + for i = 4, #bytes, 4 do + newbytes[i/4] = bytes[i] + end + else + skip = tonumber(skip) + for i = 1, #bytes do + if bytes[i] ~= skip then + newbytes[#newbytes + 1] = bytes[i] + end + end + end + return newbytes +end + +function env.byte_trim(bytes, val) + val = tonumber(val) + for i = 1, #bytes do + if bytes[i] ~= val then + return bytes + end + table.remove(bytes, 1) + end + return bytes +end + +function env.byte_swap(bytes, val) + local newbytes = {} + val = tonumber(val) + for i = 1, #bytes do + local off = i + val - 1 - 2 * ((i - 1) % val) + if off > #bytes then -- ?? + break + end + newbytes[i] = bytes[off] + end + return newbytes +end + +function env.nibble_skip(bytes, skip) + local newbytes = {} + if skip == "odd" then + for i = 1, #bytes, 2 do + val1 = bytes[i]:byte(1) + val2 = bytes[i+1]:byte(1) + newbytes[(i+1)/2] = string.char(((val1 & 0x0f) << 4) | (val2 & 0x0f)) + end + elseif skip == "even" then + for i = 1, #bytes, 2 do + val1 = bytes[i]:byte(1) + val2 = bytes[i+1]:byte(1) + newbytes[(i+1)/2] = string.char((val1 & 0xf0) | ((val2 & 0xf0) >> 4)) + end + end + return newbytes +end + +function env.bit_swap(bytes, swap) + if swap == "yes" then + for i = 1, #bytes do + val = bytes[i]:byte(1) + bytes[i] = string.char(((val & 1) << 7) | ((val & 2) << 5) | ((val & 4) << 3) | ((val & 8) << 1) | ((val & 0x10) >> 1) | ((val & 0x20) >> 3) | ((val & 0x40) >> 5) | ((val & 0x80) >> 7)) + end + end + return bytes +end + +function env.bitmask(bytes, mask) + local newbytes = 0 + bytes = string.unpack(">I" .. #bytes, table.concat(bytes)) + for i = 1, #mask do + newbytes = newbytes | (((bytes >> mask.ishift) & mask.mask) << mask.oshift) + end + bytes = {} + while newbytes ~= 0 do + bytes[#bytes + 1] = newbytes & 0xff + newbytes = newbytes >> 8 + end + newbytes = {} + for i = 1, #bytes do + newbytes[i] = string.char(bytes[#bytes + 1 - i]) + end + return newbytes +end + +function env.frombcd(val) + local result = 0 + local mul = 1 + while val ~= 0 do + result = result + ((val % 16) * mul) + val = val >> 4 + mul = mul * 10 + end + return result +end + +function env.basechar(bytes, base) + if base == "32" then + elseif base == "40" then + end + return bytes +end + +function env.charset_conv(bytes, charset) + if type(charset) == "string" then + local chartype, offset, delta = charset:match("CS_(%w*)%[?(%-?%d?%d?),?(%d?%d?)%]?") + if chartype == "NUMBER" then + + end + return + end + for num, char in ipairs(bytes) do + char = string.byte(char) + if charset[char] then + bytes[num] = charset[char] + elseif charset.default then + bytes[num] = charset.default + end + end + return bytes +end + +function env.ascii_step(bytes, step) + for num, char in ipairs(bytes) do + bytes[num] = string.char(char:byte() / step) + end + return bytes +end + +function env.ascii_offset(bytes, offset) + for num, char in ipairs(bytes) do + bytes[num] = string.char(char:byte() + offset) + end + return bytes +end + +env.tostring = tostring +env.type = type +env.table = { pack = table.pack, concat = table.concat } +env.string = { unpack = string.unpack, format = string.format, rep = string.rep, gsub = string.gsub, lower = string.lower, upper = string.upper } +env.math = { min = math.min, max = math.max, floor = math.floor } + +do + local function readonly(t) + local mt = { __index = t, __newindex = function(t, k, v) return end } + return setmetatable({}, mt) + end + env.table = readonly(env.table) + env.string = readonly(env.string) + env.math = readonly(env.math) + env = readonly(env) +end + function dat.check(set, softlist) if softlist then return nil @@ -66,10 +282,11 @@ function dat.check(set, softlist) local function parse_table(xml) local total_size = 0 - local s = { "data = open('" .. xml.structure[1].file .. "', size)\noffset = 1\narr = {}" } + local s = { "local data = open('" .. xml.structure[1].file .. "', size)\nlocal offset = 1\nlocal arr = {}", + "local elem, bytes, offset, value, lastindex, output"} local fparam = {} if xml.bitmask then - local bitmask = "bitmask = {" + local bitmask = "local bitmask = {" for id, masks in pairs(xml.bitmask) do bitmask = bitmask .. "['" .. id .. "'] = {" for num, mask in ipairs(masks.character) do @@ -94,7 +311,7 @@ function dat.check(set, softlist) s[#s + 1] = bitmask .. "}" end if xml.charset then - local charset = "charset = {" + local charset = "local charset = {" for id, set in pairs(xml.charset) do local default charset = charset .. "['" .. id .. "'] = {" @@ -114,7 +331,7 @@ function dat.check(set, softlist) local function check_format(formstr) local formats = {} - local ret = " function tempform(val)" + local ret = "local function tempform(val)" formstr = formstr:gsub(">", ">") formstr:gsub("([^;]+)", function(s) formats[#formats + 1] = s end) for num, form in ipairs(formats) do @@ -187,7 +404,7 @@ function dat.check(set, softlist) end if xml.format then - local format = { "format = {" } + local format = { "local format = {" } for num, form in ipairs(xml.format) do local param = {} format[#format + 1] = "['" .. form["id"] .. "'] = " @@ -362,7 +579,7 @@ function dat.check(set, softlist) else total_size = total_size + elem["size"] end - s[#s + 1] = "offset = table.remove(bytes)" + s[#s + 1] = "offset = bytes[#bytes]\nbytes[#bytes] = nil" if elem["decoding-profile"] then if elem["decoding-profile"] == "base-40" then elem["src-unit-size"] = 16 @@ -464,7 +681,7 @@ function dat.check(set, softlist) parse_elem(elem) end end - table.insert(s, 1, "size = " .. total_size) + table.insert(s, 1, "local size = " .. total_size) s[#s + 1] = "output = ''" @@ -475,12 +692,12 @@ function dat.check(set, softlist) fld["src"] = fld["id"] end s[#s + 1] = "output = output .. '" .. fld["id"] .. " '" - s[#s + 1] = "val = arr['" .. fld["src"] .. "'][1]" + s[#s + 1] = "value = arr['" .. fld["src"] .. "'][1]" if fld["format"] then s[#s + 1] = check_format(fld["format"]) - s[#s + 1] = "val = tempform(val)" + s[#s + 1] = "value = tempform(value)" end - s[#s + 1] = "output = output .. val .. '\\n'" + s[#s + 1] = "output = output .. value .. '\\n'" elseif fld["tag"] == "table" then local head = {} local dat = {} @@ -499,24 +716,24 @@ function dat.check(set, softlist) end if not loopcnt and col["src"] ~= "index" then table.insert(dat, 1, "for i = 1, #arr['" .. col["src"] .. "'] do") - table.insert(dat, 2, "index = arr['" .. col["src"] .. "'][i].index or i - 1") - table.insert(dat, 3, "line = ''") + table.insert(dat, 2, "local index = arr['" .. col["src"] .. "'][i].index or i - 1") + table.insert(dat, 3, "local line = ''") loopcnt = true end head[#head + 1] = "output = output .. '" .. col["id"] .. "\\t'" if col["src"] == "index" then - dat[#dat + 1] = "val = index" + dat[#dat + 1] = "value = index" else - dat[#dat + 1] = "if arr['" .. col["src"] .. "'] then val = arr['" .. col["src"] .. "'][i].val end" + dat[#dat + 1] = "if arr['" .. col["src"] .. "'] then value = arr['" .. col["src"] .. "'][i].val end" end if col["format"] then dat[#dat + 1] = check_format(col["format"]) - dat[#dat + 1] = "val = tempform(val)" + dat[#dat + 1] = "value = tempform(value)" end if igncol == col["id"] then - dat[#dat + 1] = "checkval = val" + dat[#dat + 1] = "local checkval = value" end - dat[#dat + 1] = "line = line .. val .. '\\t'" + dat[#dat + 1] = "line = line .. value .. '\\t'" end end if igncol then @@ -545,213 +762,6 @@ function dat.check(set, softlist) return script end - if not env.open then - function env.open(file, size) - if file == ".hi" then - local path = "hi" - local ini = emu.file(lfs.env_replace(manager:options().entries.inipath:value()), 1) - local ret = ini:open("hiscore.ini") - if not ret then - local inifile = ini:read(ini:size()) - for line in inifile:gmatch("[^\n\r]") do - token, value = string.match(line, '([^ ]+) ([^ ]+)'); - if token == "hi_path" then - path = value - break - end - end - end - file = path .. "/" .. set .. ".hi" - else - file = lfs.env_replace(manager:options().entries.nvram_directory:value()) .. "/" .. set .. "/" .. file - end - local f = io.open(file, "rb") - local content = f:read("*all") - f:close() - if #content < size then - content = content .. string.rep("\0", size - #content) - end - return content - end - - function env.endianness(bytes, endian) - local newbytes = {} - if endian == "little_endian" then - for i = 1, #bytes do - newbytes[i] = bytes[#bytes - i + 1] - end - else - newbytes = bytes - end - return newbytes - end - - function env.byte_skip(bytes, skip) - local newbytes = {} - if skip == "odd" then - -- lua lists are 1 based so use even indexes - for i = 2, #bytes, 2 do - newbytes[i/2] = bytes[i] - end - elseif skip == "even" then - for i = 1, #bytes, 2 do - newbytes[(i+1)/2] = bytes[i] - end - elseif skip == "1000" then - for i = 1, #bytes, 4 do - newbytes[(i+3)/4] = bytes[i] - end - elseif skip == "0100" then - for i = 2, #bytes, 4 do - newbytes[(i+2)/4] = bytes[i] - end - elseif skip == "0010" then - for i = 3, #bytes, 4 do - newbytes[(i+1)/4] = bytes[i] - end - elseif skip == "0001" then - for i = 4, #bytes, 4 do - newbytes[i/4] = bytes[i] - end - else - skip = tonumber(skip) - for i = 1, #bytes do - if bytes[i] ~= skip then - newbytes[#newbytes + 1] = bytes[i] - end - end - end - return newbytes - end - - function env.byte_trim(bytes, val) - val = tonumber(val) - for i = 1, #bytes do - if bytes[i] ~= val then - return bytes - end - table.remove(bytes, 1) - end - return bytes - end - - function env.byte_swap(bytes, val) - local newbytes = {} - val = tonumber(val) - for i = 1, #bytes do - local off = i + val - 1 - 2 * ((i - 1) % val) - if off > #bytes then -- ?? - break - end - newbytes[i] = bytes[off] - end - return newbytes - end - - function env.nibble_skip(bytes, skip) - local newbytes = {} - if skip == "odd" then - for i = 1, #bytes, 2 do - val1 = bytes[i]:byte(1) - val2 = bytes[i+1]:byte(1) - newbytes[(i+1)/2] = string.char(((val1 & 0x0f) << 4) | (val2 & 0x0f)) - end - elseif skip == "even" then - for i = 1, #bytes, 2 do - val1 = bytes[i]:byte(1) - val2 = bytes[i+1]:byte(1) - newbytes[(i+1)/2] = string.char((val1 & 0xf0) | ((val2 & 0xf0) >> 4)) - end - end - return newbytes - end - - function env.bit_swap(bytes, swap) - if swap == "yes" then - for i = 1, #bytes do - val = bytes[i]:byte(1) - bytes[i] = string.char(((val & 1) << 7) | ((val & 2) << 5) | ((val & 4) << 3) | ((val & 8) << 1) | ((val & 0x10) >> 1) | ((val & 0x20) >> 3) | ((val & 0x40) >> 5) | ((val & 0x80) >> 7)) - end - end - return bytes - end - - function env.bitmask(bytes, mask) - local newbytes = 0 - bytes = string.unpack(">I" .. #bytes, table.concat(bytes)) - for i = 1, #mask do - newbytes = newbytes | (((bytes >> mask.ishift) & mask.mask) << mask.oshift) - end - bytes = {} - while newbytes ~= 0 do - bytes[#bytes + 1] = newbytes & 0xff - newbytes = newbytes >> 8 - end - newbytes = {} - for i = 1, #bytes do - newbytes[i] = string.char(bytes[#bytes + 1 - i]) - end - return newbytes - end - - function env.frombcd(val) - local result = 0 - local mul = 1 - while val ~= 0 do - result = result + ((val % 16) * mul) - val = val >> 4 - mul = mul * 10 - end - return result - end - - function env.basechar(bytes, base) - if base == "32" then - elseif base == "40" then - end - return bytes - end - - function env.charset_conv(bytes, charset) - if type(charset) == "string" then - local chartype, offset, delta = charset:match("CS_(%w*)%[?(%-?%d?%d?),?(%d?%d?)%]?") - if chartype == "NUMBER" then - - end - return - end - for num, char in ipairs(bytes) do - char = string.byte(char) - if charset[char] then - bytes[num] = charset[char] - elseif charset.default then - bytes[num] = charset.default - end - end - return bytes - end - - function env.ascii_step(bytes, step) - for num, char in ipairs(bytes) do - bytes[num] = string.char(char:byte() / step) - end - return bytes - end - - function env.ascii_offset(bytes, offset) - for num, char in ipairs(bytes) do - bytes[num] = string.char(char:byte() + offset) - end - return bytes - end - - env.tostring = tostring - env.type = type - env.table = { pack = table.pack, concat = table.concat, insert = table.insert, remove = table.remove } - env.string = { unpack = string.unpack, format = string.format, rep = string.rep, gsub = string.gsub, lower = string.lower, upper = string.upper } - env.math = { min = math.min, max = math.max, floor = math.floor } - end - if curset == set then if output then return "High Scores" diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 7433ad3d2f4..62981122d80 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -161,8 +161,6 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_74193.h", MAME_DIR .. "src/lib/netlist/devices/nld_74194.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74194.h", - MAME_DIR .. "src/lib/netlist/devices/nld_74279.cpp", - MAME_DIR .. "src/lib/netlist/devices/nld_74279.h", MAME_DIR .. "src/lib/netlist/devices/nld_74365.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_74365.h", MAME_DIR .. "src/lib/netlist/devices/nld_74ls629.cpp", @@ -177,8 +175,6 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_82S126.h", MAME_DIR .. "src/lib/netlist/devices/nld_9310.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_9310.h", - MAME_DIR .. "src/lib/netlist/devices/nld_9312.cpp", - MAME_DIR .. "src/lib/netlist/devices/nld_9312.h", MAME_DIR .. "src/lib/netlist/devices/nld_9316.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_9316.h", MAME_DIR .. "src/lib/netlist/devices/nld_9322.cpp", diff --git a/src/devices/sound/dac.h b/src/devices/sound/dac.h index 07156bdf777..4722fba682f 100644 --- a/src/devices/sound/dac.h +++ b/src/devices/sound/dac.h @@ -285,6 +285,7 @@ DAC_GENERATOR(AD7541, ad7541_device, dac_word_interface, dac_code_binary<12>, da DAC_GENERATOR(AM6012, am6012_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AM6012", "am6012") DAC_GENERATOR(DAC08, dac08_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "DAC08", "dac08") DAC_GENERATOR(DAC0800, dac0800_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "DAC0800", "dac0800") +DAC_GENERATOR(DAC0832, dac0832_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "DAC0832", "dac0832") // should be double-buffered? DAC_GENERATOR(DAC1200, dac1200_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "DAC1200", "dac1200") DAC_GENERATOR(MC1408, mc1408_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "MC1408", "mc1408") DAC_GENERATOR(MC3408, mc3408_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "MC3408", "mc3408") diff --git a/src/lib/formats/abc800_dsk.cpp b/src/lib/formats/abc800_dsk.cpp index 033ff309dcd..e61a0a1d1ff 100644 --- a/src/lib/formats/abc800_dsk.cpp +++ b/src/lib/formats/abc800_dsk.cpp @@ -53,7 +53,7 @@ const abc800_format::format abc800_format::formats[] = { { // 80K 5 1/4 inch single density single sided floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, - 4000, 16, 40, 1, 128, {}, 1, {}, 28, 11, 27 + 4000, 16, 40, 1, 128, {}, -1, { 1,2,11,12,5,6,15,16,9,10,3,4,13,14,7,8 }, 28, 11, 27 }, // track description @@ -77,7 +77,7 @@ const abc800_format::format abc800_format::formats[] = { { // 160K 5 1/4 inch double density single sided floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 16, 40, 1, 256, {}, 1, {}, 55, 22, 54 + 2000, 16, 40, 1, 256, {}, -1, { 1,8,15,6,13,4,11,2,9,16,7,14,5,12,3,10 }, 55, 22, 54 }, // track description @@ -142,3 +142,26 @@ const abc800_format::format abc800_format::formats[] = { }; const floppy_format_type FLOPPY_ABC800_FORMAT = &floppy_image_format_creator<abc800_format>; + +void abc800_format::build_sector_description(const format &f, uint8_t *sectdata, desc_s *sectors, int track, int head) const +{ + if(f.sector_base_id == -1) { + for(int i=0; i<f.sector_count; i++) { + int cur_offset = 0; + for(int j=0; j<f.sector_count; j++) + if(f.per_sector_id[j] < f.per_sector_id[i]) + cur_offset += f.sector_base_size ? f.sector_base_size : f.per_sector_size[j]; + sectors[i].data = sectdata + cur_offset; + sectors[i].size = f.sector_base_size ? f.sector_base_size : f.per_sector_size[i]; + sectors[i].sector_id = i + f.per_sector_id[0]; + } + } else { + int cur_offset = 0; + for(int i=0; i<f.sector_count; i++) { + sectors[i].data = sectdata + cur_offset; + sectors[i].size = f.sector_base_size ? f.sector_base_size : f.per_sector_size[i]; + cur_offset += sectors[i].size; + sectors[i].sector_id = i + f.sector_base_id; + } + } +} diff --git a/src/lib/formats/abc800_dsk.h b/src/lib/formats/abc800_dsk.h index 28d5e5b01ad..a2b5bc3b33b 100644 --- a/src/lib/formats/abc800_dsk.h +++ b/src/lib/formats/abc800_dsk.h @@ -21,6 +21,9 @@ public: virtual const char *description() const override; virtual const char *extensions() const override; +protected: + virtual void build_sector_description(const format &d, uint8_t *sectdata, desc_s *sectors, int track, int head) const override; + private: static const format formats[]; }; diff --git a/src/lib/netlist/analog/nlid_fourterm.h b/src/lib/netlist/analog/nlid_fourterm.h index 52ca2545ae8..641fc72427b 100644 --- a/src/lib/netlist/analog/nlid_fourterm.h +++ b/src/lib/netlist/analog/nlid_fourterm.h @@ -136,7 +136,6 @@ namespace netlist { { public: NETLIB_CONSTRUCTOR_DERIVED(CCCS, VCCS) - , m_gfac(1.0) { m_gfac = NL_FCONST(1.0) / m_RI(); } @@ -145,8 +144,6 @@ namespace netlist { NETLIB_UPDATEI(); NETLIB_RESETI(); NETLIB_UPDATE_PARAMI(); - - nl_double m_gfac; }; diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 6033494f503..843af2838c3 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -100,7 +100,6 @@ NLOBJS := \ $(NLOBJ)/devices/nld_74192.o \ $(NLOBJ)/devices/nld_74193.o \ $(NLOBJ)/devices/nld_74194.o \ - $(NLOBJ)/devices/nld_74279.o \ $(NLOBJ)/devices/nld_74365.o \ $(NLOBJ)/devices/nld_74ls629.o \ $(NLOBJ)/devices/nld_82S16.o \ @@ -108,7 +107,6 @@ NLOBJS := \ $(NLOBJ)/devices/nld_82S123.o \ $(NLOBJ)/devices/nld_82S126.o \ $(NLOBJ)/devices/nld_9310.o \ - $(NLOBJ)/devices/nld_9312.o \ $(NLOBJ)/devices/nld_9316.o \ $(NLOBJ)/devices/nld_9322.o \ $(NLOBJ)/devices/nld_am2847.o \ diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj b/src/lib/netlist/buildVS/netlistlib.vcxproj index 11b9d3dcccd..a021ee46e12 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj @@ -88,6 +88,7 @@ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <AdditionalIncludeDirectories>..\..\</AdditionalIncludeDirectories> </ClCompile> <Link> <TargetMachine>MachineX86</TargetMachine> @@ -127,7 +128,6 @@ <ClCompile Include="..\devices\nld_74192.cpp" /> <ClCompile Include="..\devices\nld_74193.cpp" /> <ClCompile Include="..\devices\nld_74194.cpp" /> - <ClCompile Include="..\devices\nld_74279.cpp" /> <ClCompile Include="..\devices\nld_74365.cpp" /> <ClCompile Include="..\devices\nld_7448.cpp" /> <ClCompile Include="..\devices\nld_7450.cpp" /> @@ -144,7 +144,6 @@ <ClCompile Include="..\devices\nld_82S126.cpp" /> <ClCompile Include="..\devices\nld_82S16.cpp" /> <ClCompile Include="..\devices\nld_9310.cpp" /> - <ClCompile Include="..\devices\nld_9312.cpp" /> <ClCompile Include="..\devices\nld_9316.cpp" /> <ClCompile Include="..\devices\nld_9322.cpp" /> <ClCompile Include="..\devices\nld_am2847.cpp" /> @@ -209,7 +208,6 @@ <ClInclude Include="..\devices\nld_74192.h" /> <ClInclude Include="..\devices\nld_74193.h" /> <ClInclude Include="..\devices\nld_74194.h" /> - <ClInclude Include="..\devices\nld_74279.h" /> <ClInclude Include="..\devices\nld_74365.h" /> <ClInclude Include="..\devices\nld_7448.h" /> <ClInclude Include="..\devices\nld_7450.h" /> @@ -226,7 +224,6 @@ <ClInclude Include="..\devices\nld_82S126.h" /> <ClInclude Include="..\devices\nld_82S16.h" /> <ClInclude Include="..\devices\nld_9310.h" /> - <ClInclude Include="..\devices\nld_9312.h" /> <ClInclude Include="..\devices\nld_9316.h" /> <ClInclude Include="..\devices\nld_9322.h" /> <ClInclude Include="..\devices\nld_am2847.h" /> diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters index 7c3cff5bd3e..ad25be9fbab 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters @@ -186,9 +186,6 @@ <ClCompile Include="..\devices\nld_7473.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\devices\nld_74279.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\devices\nld_4066.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -228,9 +225,6 @@ <ClCompile Include="..\devices\nld_7474.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\devices\nld_9312.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\devices\nld_82S126.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -434,9 +428,6 @@ <ClInclude Include="..\devices\nlid_proxy.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\devices\nld_74279.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\devices\nld_log.h"> <Filter>Header Files</Filter> </ClInclude> @@ -470,9 +461,6 @@ <ClInclude Include="..\devices\nld_7474.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\devices\nld_9312.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\devices\nld_74194.h"> <Filter>Header Files</Filter> </ClInclude> diff --git a/src/lib/netlist/buildVS/nltool.vcxproj b/src/lib/netlist/buildVS/nltool.vcxproj index bf91128ae56..200e701ea33 100755 --- a/src/lib/netlist/buildVS/nltool.vcxproj +++ b/src/lib/netlist/buildVS/nltool.vcxproj @@ -116,6 +116,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\</AdditionalIncludeDirectories> </ClCompile> <Link> <SubSystem>Console</SubSystem> diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 7f7f8d0cd43..661df946512 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -94,7 +94,6 @@ namespace netlist ENTRYX(82S123, PROM_82S123, "+CEQ,+A0,+A1,+A2,+A3,+A4") ENTRYX(82S126, PROM_82S126, "+CE1Q,+CE2Q,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7") ENTRYX(9310, TTL_9310, "") - ENTRYX(9312, TTL_9312, "+A,+B,+C,+D0,+D1,+D2,+D3,+D4,+D5,+D6,+D7,+G") ENTRYX(9316, TTL_9316, "+CLK,+ENP,+ENT,+CLRQ,+LOADQ,+A,+B,+C,+D") ENTRYX(9322, TTL_9322, "+SELECT,+A1,+B1,+A2,+B2,+A3,+B3,+A4,+B4,+STROBE") ENTRYX(9334, TTL_9334, "+CQ,+EQ,+D,+A0,+A1,+A2") @@ -135,7 +134,6 @@ namespace netlist ENTRYX(74192_dip, TTL_74192_DIP, "") ENTRYX(74193_dip, TTL_74193_DIP, "") ENTRYX(74194_dip, TTL_74194_DIP, "") - ENTRYX(74279_dip, TTL_74279_DIP, "") ENTRYX(74365_dip, TTL_74365_DIP, "") ENTRYX(82S16_dip, TTL_82S16_DIP, "") ENTRYX(82S115_dip, PROM_82S115_DIP, "") @@ -143,7 +141,6 @@ namespace netlist ENTRYX(82S126_dip, PROM_82S126_DIP, "") ENTRYX(9602_dip, TTL_9602_DIP, "") ENTRYX(9310_dip, TTL_9310_DIP, "") - ENTRYX(9312_dip, TTL_9312_DIP, "") ENTRYX(9316_dip, TTL_9316_DIP, "") ENTRYX(9322_dip, TTL_9322_DIP, "") ENTRYX(9334_dip, TTL_9334_DIP, "") diff --git a/src/lib/netlist/devices/net_lib.h b/src/lib/netlist/devices/net_lib.h index 58a587ed808..3521bd744ba 100644 --- a/src/lib/netlist/devices/net_lib.h +++ b/src/lib/netlist/devices/net_lib.h @@ -60,7 +60,6 @@ #include "nld_74192.h" #include "nld_74193.h" #include "nld_74194.h" -#include "nld_74279.h" #include "nld_74365.h" #include "nld_74ls629.h" #include "nld_82S16.h" @@ -68,7 +67,6 @@ #include "nld_82S123.h" #include "nld_82S126.h" #include "nld_9310.h" -#include "nld_9312.h" #include "nld_9316.h" #include "nld_9322.h" diff --git a/src/lib/netlist/devices/nld_74279.cpp b/src/lib/netlist/devices/nld_74279.cpp deleted file mode 100644 index 91d46456028..00000000000 --- a/src/lib/netlist/devices/nld_74279.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Couriersud -/* - * nld_74279.c - * - */ - -#include "nlid_truthtable.h" -#include "nld_74279.h" -#include "../nl_base.h" - -namespace netlist -{ - namespace devices - { - NETLIB_TRUTHTABLE(74279A, 3, 1); - NETLIB_TRUTHTABLE(74279B, 4, 1); - - NETLIB_OBJECT(74279_dip) - { - NETLIB_CONSTRUCTOR(74279_dip) - , m_1(*this, "1") - , m_2(*this, "2") - , m_3(*this, "3") - , m_4(*this, "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_4.m_Q[0]); - register_subalias("14", m_4.m_I[1]); //R - register_subalias("15", m_4.m_I[0]); - - } - - //NETLIB_RESETI(); - //NETLIB_UPDATEI(); - - protected: - NETLIB_SUB(74279B) m_1; - NETLIB_SUB(74279A) m_2; - NETLIB_SUB(74279B) m_3; - NETLIB_SUB(74279A) m_4; - }; - - nld_74279A::truthtable_t nld_74279A::m_ttbl; - nld_74279B::truthtable_t nld_74279B::m_ttbl; - - const pstring nld_74279A::m_desc[] = { - "S,R,_Q|Q", - "0,X,X|1|22", - "1,0,X|0|27", - "1,1,0|0|27", //15 - "1,1,1|1|22", - "" - }; - - - const pstring nld_74279B::m_desc[] = { - "S1,S2,R,_Q|Q", - "0,X,X,X|1|22", - "X,0,X,X|1|22", - "1,1,0,X|0|27", - "1,1,1,0|0|27", // 15 - "1,1,1,1|1|22", - "" - }; - - - NETLIB_DEVICE_IMPL(74279_dip) - - } //namespace devices -} // namespace netlist diff --git a/src/lib/netlist/devices/nld_74279.h b/src/lib/netlist/devices/nld_74279.h deleted file mode 100644 index be1b0fcce23..00000000000 --- a/src/lib/netlist/devices/nld_74279.h +++ /dev/null @@ -1,42 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Couriersud -/* - * nld_74279.h - * - * DM74279: Quad S-R Latch - * - * +--------------+ - * 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_ - -#define TTL_74279_DIP(name) \ - NET_REGISTER_DEV(TTL_74279_DIP, name) - -#endif /* NLD_74279_H_ */ diff --git a/src/lib/netlist/devices/nld_7493.cpp b/src/lib/netlist/devices/nld_7493.cpp index a0bf9aaa6ae..5dda5fac57c 100644 --- a/src/lib/netlist/devices/nld_7493.cpp +++ b/src/lib/netlist/devices/nld_7493.cpp @@ -69,7 +69,7 @@ namespace netlist logic_output_t m_QC; logic_output_t m_QD; - state_var_u8 m_reset; + state_var<netlist_sig_t> m_reset; state_var_u8 m_a; state_var_u8 m_bcd; }; diff --git a/src/lib/netlist/devices/nld_9312.cpp b/src/lib/netlist/devices/nld_9312.cpp deleted file mode 100644 index b3fe0545f81..00000000000 --- a/src/lib/netlist/devices/nld_9312.cpp +++ /dev/null @@ -1,202 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Couriersud -/* - * 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 "nlid_truthtable.h" -#include "nld_9312.h" - -namespace netlist -{ - namespace devices - { - #if (USE_TRUTHTABLE) - /* FIXME: The truthtable implementation is a lot faster than - * the carefully crafted code :-( - * Convert this into a macro module. - */ - NETLIB_TRUTHTABLE(9312, 12, 2); - #else - - NETLIB_OBJECT(9312) - { - NETLIB_CONSTRUCTOR(9312) - , m_A(*this, "A") - , m_B(*this, "B") - , m_C(*this, "C") - , m_G(*this, "G") - , m_D(*this, {{"D0","D1","D2","D3","D4","D5","D6","D7"}}) - , m_Y(*this, "Y") - , m_YQ(*this, "YQ") - , m_last_chan(*this, "m_last_chan", 0) - , m_last_G(*this, "m_last_G", 0) - { - } - - NETLIB_UPDATEI(); - NETLIB_RESETI(); - public: - logic_input_t m_A; - logic_input_t m_B; - logic_input_t m_C; - logic_input_t m_G; - object_array_t<logic_input_t, 8> m_D; - logic_output_t m_Y; - logic_output_t m_YQ; - - state_var_u8 m_last_chan; - state_var_u8 m_last_G; - }; - - #endif - - NETLIB_OBJECT(9312_dip) - { - NETLIB_CONSTRUCTOR(9312_dip) - , m_sub(*this, "1") - { - #if (1 && USE_TRUTHTABLE) - - 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 - - #else - - register_subalias("13", m_sub.m_C); - register_subalias("12", m_sub.m_B); - register_subalias("11", m_sub.m_A); - register_subalias("10", m_sub.m_G); - - register_subalias("1", m_sub.m_D[0]); - register_subalias("2", m_sub.m_D[1]); - register_subalias("3", m_sub.m_D[2]); - register_subalias("4", m_sub.m_D[3]); - register_subalias("5", m_sub.m_D[4]); - register_subalias("6", m_sub.m_D[5]); - register_subalias("7", m_sub.m_D[6]); - register_subalias("9", m_sub.m_D[7]); - - register_subalias("15", m_sub.m_Y); // Y - register_subalias("14", m_sub.m_YQ); // YQ - - #endif - - } - - //NETLIB_RESETI(); - //NETLIB_UPDATEI(); - - protected: - NETLIB_SUB(9312) m_sub; - }; - - #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 pstring 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", - "" - }; - #else - - NETLIB_UPDATE(9312) - { - const NLUINT8 G = INPLOGIC(m_G); - if (G) - { - const netlist_time delay[2] = { NLTIME_FROM_NS(33), NLTIME_FROM_NS(19) }; - OUTLOGIC(m_Y, 0, delay[0]); - OUTLOGIC(m_YQ, 1, delay[1]); - - m_A.inactivate(); - m_B.inactivate(); - m_C.inactivate(); - m_last_G = G; - } - else - { - if (m_last_G) - { - m_last_G = G; - m_A.activate(); - m_B.activate(); - m_C.activate(); - } - constexpr netlist_time delay[2] = { NLTIME_FROM_NS(33), NLTIME_FROM_NS(28) }; - const NLUINT8 chan = INPLOGIC(m_A) | (INPLOGIC(m_B)<<1) | (INPLOGIC(m_C)<<2); - if (m_last_chan != chan) - { - m_D[m_last_chan].inactivate(); - m_D[chan].activate(); - } - const auto val = INPLOGIC(m_D[chan]); - OUTLOGIC(m_Y, val, delay[val]); - OUTLOGIC(m_YQ, !val, delay[!val]); - m_last_chan = chan; - } - } - - NETLIB_RESET(9312) - { - } - #endif - - NETLIB_DEVICE_IMPL(9312) - NETLIB_DEVICE_IMPL(9312_dip) - - } //namespace devices -} // namespace netlist diff --git a/src/lib/netlist/devices/nld_9312.h b/src/lib/netlist/devices/nld_9312.h deleted file mode 100644 index e31b1bb50c5..00000000000 --- a/src/lib/netlist/devices/nld_9312.h +++ /dev/null @@ -1,60 +0,0 @@ -// 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 "../nl_setup.h" - -#define TTL_9312(name, cA, cB, cC, cD0, cD1, cD2, cD3, cD4, cD5, cD6, cD7, cSTROBE) \ - NET_REGISTER_DEV(TTL_9312, name) \ - NET_CONNECT(name, A, cA) \ - NET_CONNECT(name, B, cB) \ - NET_CONNECT(name, C, cC) \ - NET_CONNECT(name, D0, cD0) \ - NET_CONNECT(name, D1, cD1) \ - NET_CONNECT(name, D2, cD2) \ - NET_CONNECT(name, D3, cD3) \ - NET_CONNECT(name, D4, cD4) \ - NET_CONNECT(name, D5, cD5) \ - NET_CONNECT(name, D6, cD6) \ - NET_CONNECT(name, D7, cD7) \ - NET_CONNECT(name, G, cSTROBE) - -#define TTL_9312_DIP(name) \ - NET_REGISTER_DEV(TTL_9312_DIP, name) - -#endif /* NLD_9312_H_ */ diff --git a/src/lib/netlist/devices/nlid_proxy.cpp b/src/lib/netlist/devices/nlid_proxy.cpp index 6c25369d0e7..8d1f3c61adb 100644 --- a/src/lib/netlist/devices/nlid_proxy.cpp +++ b/src/lib/netlist/devices/nlid_proxy.cpp @@ -64,12 +64,12 @@ namespace netlist { nl_assert(m_logic_family != nullptr); // FIXME: Variable supply voltage! - double supply_V = logic_family().fixed_V(); + double supply_V = logic_family()->fixed_V(); if (supply_V == 0.0) supply_V = 5.0; - if (m_I.Q_Analog() > logic_family().high_thresh_V(0.0, supply_V)) + if (m_I.Q_Analog() > logic_family()->high_thresh_V(0.0, supply_V)) out().push(1, NLTIME_FROM_NS(1)); - else if (m_I.Q_Analog() < logic_family().low_thresh_V(0.0, supply_V)) + else if (m_I.Q_Analog() < logic_family()->low_thresh_V(0.0, supply_V)) out().push(0, NLTIME_FROM_NS(1)); else { @@ -136,15 +136,15 @@ namespace netlist void nld_d_to_a_proxy::reset() { // FIXME: Variable voltage - double supply_V = logic_family().fixed_V(); + double supply_V = logic_family()->fixed_V(); if (supply_V == 0.0) supply_V = 5.0; //m_Q.initial(0.0); m_last_state = -1; m_RV.do_reset(); m_is_timestep = m_RV.m_P.net().solver()->has_timestep_devices(); - m_RV.set(NL_FCONST(1.0) / logic_family().R_low(), - logic_family().low_V(0.0, supply_V), 0.0); + m_RV.set(NL_FCONST(1.0) / logic_family()->R_low(), + logic_family()->low_V(0.0, supply_V), 0.0); } NETLIB_UPDATE(d_to_a_proxy) @@ -153,11 +153,11 @@ namespace netlist if (state != m_last_state) { // FIXME: Variable voltage - double supply_V = logic_family().fixed_V(); + double supply_V = logic_family()->fixed_V(); if (supply_V == 0.0) supply_V = 5.0; m_last_state = state; - const nl_double R = state ? logic_family().R_high() : logic_family().R_low(); - const nl_double V = state ? logic_family().high_V(0.0, supply_V) : logic_family().low_V(0.0, supply_V); + const nl_double R = state ? logic_family()->R_high() : logic_family()->R_low(); + const nl_double V = state ? logic_family()->high_V(0.0, supply_V) : logic_family()->low_V(0.0, supply_V); // We only need to update the net first if this is a time stepping net if (m_is_timestep) diff --git a/src/lib/netlist/devices/nlid_proxy.h b/src/lib/netlist/devices/nlid_proxy.h index 0188ea7d9d6..aba340ac9a8 100644 --- a/src/lib/netlist/devices/nlid_proxy.h +++ b/src/lib/netlist/devices/nlid_proxy.h @@ -35,12 +35,6 @@ namespace netlist detail::core_terminal_t &proxy_term() const { return *m_proxy_term; } protected: - const logic_family_desc_t *m_logic_family; - - virtual const logic_family_desc_t &logic_family() const - { - return *m_logic_family; - } private: logic_t *m_term_proxied; diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp index 013fa3c0769..55aa79b0457 100644..100755 --- a/src/lib/netlist/devices/nlid_truthtable.cpp +++ b/src/lib/netlist/devices/nlid_truthtable.cpp @@ -14,6 +14,183 @@ namespace netlist { namespace devices { + + // ---------------------------------------------------------------------------------------- + // Truthtable description .... + // ---------------------------------------------------------------------------------------- + + struct packed_int + { + template<typename C> + packed_int(C *data) + : m_data(data) + , m_size(sizeof(C)) + {} + + void set(const size_t pos, const uint_least64_t val) + { + switch (m_size) + { + case 1: static_cast<uint_least8_t *>(m_data)[pos] = static_cast<uint_least8_t>(val); break; + case 2: static_cast<uint_least16_t *>(m_data)[pos] = static_cast<uint_least16_t>(val); break; + case 4: static_cast<uint_least32_t *>(m_data)[pos] = static_cast<uint_least32_t>(val); break; + case 8: static_cast<uint_least64_t *>(m_data)[pos] = static_cast<uint_least64_t>(val); break; + default: { } + } + } + + uint_least64_t operator[] (size_t pos) const + { + switch (m_size) + { + case 1: return static_cast<uint_least8_t *>(m_data)[pos]; + case 2: return static_cast<uint_least16_t *>(m_data)[pos]; + case 4: return static_cast<uint_least32_t *>(m_data)[pos]; + case 8: return static_cast<uint_least64_t *>(m_data)[pos]; + default: + return 0; //should never happen + } + } + + uint_least64_t adjust(uint_least64_t val) const + { + switch (m_size) + { + case 1: return static_cast<uint_least8_t >(val); + case 2: return static_cast<uint_least16_t>(val); + case 4: return static_cast<uint_least32_t>(val); + case 8: return static_cast<uint_least64_t>(val); + default: + return 0; //should never happen + } + } + private: + void *m_data; + size_t m_size; + }; + + static const uint_least64_t one64 = static_cast<uint_least64_t>(1); + + struct truthtable_desc_t + { + truthtable_desc_t(unsigned NO, unsigned NI, bool *initialized, + packed_int outs, uint_least8_t *timing, netlist_time *timing_nt) + : m_NO(NO), m_NI(NI), m_initialized(initialized), + m_outs(outs), m_timing(timing), m_timing_nt(timing_nt), + m_num_bits(m_NI), + m_size(1 << (m_num_bits)) + { + } + + void setup(const std::vector<pstring> &desc, uint_least64_t disabled_ignore); + + private: + void help(unsigned cur, std::vector<pstring> list, + uint_least64_t state, uint_least64_t val, std::vector<uint_least8_t> &timing_index); + static unsigned count_bits(uint_least64_t v); + static uint_least64_t set_bits(uint_least64_t v, uint_least64_t b); + uint_least64_t get_ignored_simple(uint_least64_t i); + uint_least64_t get_ignored_extended(uint_least64_t i); + + unsigned m_NO; + unsigned m_NI; + bool *m_initialized; + packed_int m_outs; + uint_least8_t *m_timing; + netlist_time *m_timing_nt; + + /* additional values */ + + const std::size_t m_num_bits; + const std::size_t m_size; + + }; + + template<unsigned m_NI, unsigned m_NO> + template <class C> + nld_truthtable_t<m_NI, m_NO>::nld_truthtable_t(C &owner, const pstring &name, const logic_family_desc_t *fam, + truthtable_t *ttp, const pstring *desc) + : device_t(owner, name) + , m_fam(*this, fam) + , m_ign(*this, "m_ign", 0) + , m_active(*this, "m_active", 1) + , m_ttp(ttp) + { + while (*desc != "" ) + { + m_desc.push_back(*desc); + desc++; + } + init(); + } + + template<unsigned m_NI, unsigned m_NO> + void NETLIB_NAME(truthtable_t)<m_NI, m_NO>::init() + { + set_hint_deactivate(true); + + pstring header = m_desc[0]; + + std::vector<pstring> io(plib::psplit(header,"|")); + // checks + nl_assert_always(io.size() == 2, "too many '|'"); + std::vector<pstring> inout(plib::psplit(io[0], ",")); + nl_assert_always(inout.size() == m_num_bits, "bitcount wrong"); + std::vector<pstring> out(plib::psplit(io[1], ",")); + nl_assert_always(out.size() == m_NO, "output count wrong"); + + for (std::size_t i=0; i < m_NI; i++) + { + inout[i] = inout[i].trim(); + m_I.emplace(i, *this, inout[i]); + } + for (std::size_t i=0; i < m_NO; i++) + { + out[i] = out[i].trim(); + m_Q.emplace(i, *this, out[i]); + } + // Connect output "Q" to input "_Q" if this exists + // This enables timed state without having explicit state .... + uint_least64_t disabled_ignore = 0; + for (std::size_t i=0; i < m_NO; i++) + { + pstring tmp = "_" + out[i]; + const std::size_t idx = plib::container::indexof(inout, tmp); + if (idx != plib::container::npos) + { + connect(m_Q[i], m_I[idx]); + // disable ignore for this inputs altogether. + // FIXME: This shouldn't be necessary + disabled_ignore |= (one64 << idx); + } + } + + m_ign = 0; + + truthtable_desc_t desc(m_NO, m_NI, &m_ttp->m_initialized, + packed_int(m_ttp->m_outs), + m_ttp->m_timing, m_ttp->m_timing_nt); + + desc.setup(m_desc, disabled_ignore * 0); +#if 0 + printf("%s\n", name().c_str()); + for (int j=0; j < m_size; j++) + printf("%05x %04x %04x %04x\n", j, m_ttp->m_outs[j] & ((1 << m_NO)-1), + m_ttp->m_outs[j] >> m_NO, m_ttp->m_timing[j * m_NO + 0]); + for (int k=0; m_ttp->m_timing_nt[k] != netlist_time::zero(); k++) + printf("%d %f\n", k, m_ttp->m_timing_nt[k].as_double() * 1000000.0); +#endif + } + + // ---------------------------------------------------------------------------------------- + // Truthtable class .... + // ---------------------------------------------------------------------------------------- + + + // ---------------------------------------------------------------------------------------- + // Truthtable factory .... + // ---------------------------------------------------------------------------------------- + template<unsigned m_NI, unsigned m_NO> class netlist_factory_truthtable_t : public netlist_base_factory_truthtable_t { @@ -61,7 +238,7 @@ uint_least64_t truthtable_desc_t::set_bits(uint_least64_t v, uint_least64_t b) uint_least64_t truthtable_desc_t::get_ignored_simple(uint_least64_t i) { uint_least64_t m_enable = 0; - for (size_t j=0; j<m_size; j++) + for (uint_least64_t j=0; j<m_size; j++) { if (m_outs[j] != m_outs[i]) { @@ -75,24 +252,24 @@ uint_least64_t truthtable_desc_t::get_ignored_extended(uint_least64_t state) { // Determine all inputs which may be ignored ... uint_least64_t ignore = 0; - for (unsigned j=0; j<m_NI; j++) + for (std::size_t j=0; j<m_NI; j++) { - if (m_outs[state] == m_outs[state ^ (1 << j)]) - ignore |= (1<<j); + if (m_outs[state] == m_outs[state ^ (one64 << j)]) + ignore |= (one64 << j); } /* Check all permutations of ign * We have to remove those where the ignored inputs * may change the output */ - uint_least64_t bits = (1<<count_bits(ignore)); + uint_least64_t bits = (one64 << count_bits(ignore)); std::vector<bool> t(bits); for (size_t j=1; j<bits; j++) { uint_least64_t tign = set_bits(ignore, j); t[j] = 0; - uint_least64_t bitsk=(1<<count_bits(tign)); - for (size_t k=0; k<bitsk; k++) + uint_least64_t bitsk=(one64 << count_bits(tign)); + for (uint_least64_t k=0; k<bitsk; k++) { uint_least64_t b=set_bits(tign, k); if (m_outs[state] != m_outs[(state & ~tign) | b]) @@ -202,7 +379,7 @@ void truthtable_desc_t::setup(const std::vector<pstring> &truthtable, uint_least { pstring outs = out[j].trim(); if (outs.equals("1")) - val = val | (1 << j); + val = val | (one64 << j); else nl_assert_always(outs.equals("0"), "Unknown value (not 0 or 1"); netlist_time t = netlist_time::from_nsec(static_cast<unsigned long>(times[j].trim().as_long())); @@ -224,7 +401,7 @@ void truthtable_desc_t::setup(const std::vector<pstring> &truthtable, uint_least // determine ignore std::vector<uint_least64_t> ign(m_size, all_set); - for (size_t i=0; i<m_size; i++) + for (uint_least64_t i=0; i<m_size; i++) { if (ign[i] == all_set) { @@ -240,7 +417,7 @@ void truthtable_desc_t::setup(const std::vector<pstring> &truthtable, uint_least ign[i] = tign; /* don't need to recalculate similar ones */ - uint_least64_t bitsk=(1<<count_bits(tign)); + uint_least64_t bitsk=(one64 << count_bits(tign)); for (uint_least64_t k=0; k<bitsk; k++) { uint_least64_t b=set_bits(tign, k); @@ -293,6 +470,8 @@ void tt_factory_create(setup_t &setup, tt_desc &desc, const pstring &sourcefile) ENTRY(8, sourcefile); ENTRY(9, sourcefile); ENTRY(10, sourcefile); + ENTRY(11, sourcefile); + ENTRY(12, sourcefile); default: pstring msg = plib::pfmt("unable to create truthtable<{1},{2}>")(desc.ni)(desc.no); nl_assert_always(false, msg); diff --git a/src/lib/netlist/devices/nlid_truthtable.h b/src/lib/netlist/devices/nlid_truthtable.h index b4c06834e19..040372f1c4a 100644 --- a/src/lib/netlist/devices/nlid_truthtable.h +++ b/src/lib/netlist/devices/nlid_truthtable.h @@ -31,6 +31,7 @@ namespace netlist { namespace devices { + template<unsigned bits> struct need_bytes_for_bits { @@ -38,7 +39,7 @@ namespace netlist bits <= 8 ? 1 : bits <= 16 ? 2 : bits <= 32 ? 4 : - 8 + 8 }; }; @@ -48,91 +49,6 @@ namespace netlist template<> struct uint_for_size<4> { typedef uint_least32_t type; }; template<> struct uint_for_size<8> { typedef uint_least64_t type; }; - struct packed_int - { - template<typename C> - packed_int(C *data) - : m_data(data) - , m_size(sizeof(C)) - {} - - void set(const size_t pos, const uint_least64_t val) - { - switch (m_size) - { - case 1: static_cast<uint_least8_t *>(m_data)[pos] = static_cast<uint_least8_t>(val); break; - case 2: static_cast<uint_least16_t *>(m_data)[pos] = static_cast<uint_least16_t>(val); break; - case 4: static_cast<uint_least32_t *>(m_data)[pos] = static_cast<uint_least32_t>(val); break; - case 8: static_cast<uint_least64_t *>(m_data)[pos] = static_cast<uint_least64_t>(val); break; - default: { } - } - } - - uint_least64_t operator[] (size_t pos) const - { - switch (m_size) - { - case 1: return static_cast<uint_least8_t *>(m_data)[pos]; break; - case 2: return static_cast<uint_least16_t *>(m_data)[pos]; break; - case 4: return static_cast<uint_least32_t *>(m_data)[pos]; break; - case 8: return static_cast<uint_least64_t *>(m_data)[pos]; break; - default: - return 0; //should never happen - } - } - - uint_least64_t adjust(uint_least64_t val) const - { - switch (m_size) - { - case 1: return static_cast<uint_least8_t >(val); break; - case 2: return static_cast<uint_least16_t>(val); break; - case 4: return static_cast<uint_least32_t>(val); break; - case 8: return static_cast<uint_least64_t>(val); break; - default: - return 0; //should never happen - } - } - private: - void *m_data; - size_t m_size; - }; - - struct truthtable_desc_t - { - truthtable_desc_t(unsigned NO, unsigned NI, bool *initialized, - packed_int outs, uint_least8_t *timing, netlist_time *timing_nt) - : m_NO(NO), m_NI(NI), m_initialized(initialized), - m_outs(outs), m_timing(timing), m_timing_nt(timing_nt), - m_num_bits(m_NI), - m_size(1 << (m_num_bits)) - { - } - - void setup(const std::vector<pstring> &desc, uint_least64_t disabled_ignore); - - private: - void help(unsigned cur, std::vector<pstring> list, - uint_least64_t state, uint_least64_t val, std::vector<uint_least8_t> &timing_index); - static unsigned count_bits(uint_least64_t v); - static uint_least64_t set_bits(uint_least64_t v, uint_least64_t b); - uint_least64_t get_ignored_simple(uint_least64_t i); - uint_least64_t get_ignored_extended(uint_least64_t i); - - unsigned m_NO; - unsigned m_NI; - bool *m_initialized; - packed_int m_outs; - uint_least8_t *m_timing; - netlist_time *m_timing_nt; - - /* additional values */ - - const std::size_t m_num_bits; - const std::size_t m_size; - - }; - template<unsigned m_NI, unsigned m_NO> NETLIB_OBJECT(truthtable_t) { @@ -156,20 +72,7 @@ namespace netlist template <class C> nld_truthtable_t(C &owner, const pstring &name, const logic_family_desc_t *fam, - truthtable_t *ttp, const pstring *desc) - : device_t(owner, name) - , m_fam(*this, fam) - , m_ign(*this, "m_ign", 0) - , m_active(*this, "m_active", 1) - , m_ttp(ttp) - { - while (*desc != "" ) - { - m_desc.push_back(*desc); - desc++; - } - init(); - } + truthtable_t *ttp, const pstring *desc); template <class C> nld_truthtable_t(C &owner, const pstring &name, const logic_family_desc_t *fam, @@ -184,62 +87,7 @@ namespace netlist init(); } - void init() - { - set_hint_deactivate(true); - - pstring header = m_desc[0]; - - std::vector<pstring> io(plib::psplit(header,"|")); - // checks - nl_assert_always(io.size() == 2, "too many '|'"); - std::vector<pstring> inout(plib::psplit(io[0], ",")); - nl_assert_always(inout.size() == m_num_bits, "bitcount wrong"); - std::vector<pstring> out(plib::psplit(io[1], ",")); - nl_assert_always(out.size() == m_NO, "output count wrong"); - - for (std::size_t i=0; i < m_NI; i++) - { - inout[i] = inout[i].trim(); - m_I.emplace(i, *this, inout[i]); - } - for (std::size_t i=0; i < m_NO; i++) - { - out[i] = out[i].trim(); - m_Q.emplace(i, *this, out[i]); - } - // Connect output "Q" to input "_Q" if this exists - // This enables timed state without having explicit state .... - uint_least64_t disabled_ignore = 0; - for (std::size_t i=0; i < m_NO; i++) - { - pstring tmp = "_" + out[i]; - const std::size_t idx = plib::container::indexof(inout, tmp); - if (idx != plib::container::npos) - { - connect(m_Q[i], m_I[idx]); - // disable ignore for this inputs altogether. - // FIXME: This shouldn't be necessary - disabled_ignore |= (1<<idx); - } - } - - m_ign = 0; - - truthtable_desc_t desc(m_NO, m_NI, &m_ttp->m_initialized, - packed_int(m_ttp->m_outs), - m_ttp->m_timing, m_ttp->m_timing_nt); - - desc.setup(m_desc, disabled_ignore * 0); - #if 0 - printf("%s\n", name().c_str()); - for (int j=0; j < m_size; j++) - printf("%05x %04x %04x %04x\n", j, m_ttp->m_outs[j] & ((1 << m_NO)-1), - m_ttp->m_outs[j] >> m_NO, m_ttp->m_timing[j * m_NO + 0]); - for (int k=0; m_ttp->m_timing_nt[k] != netlist_time::zero(); k++) - printf("%d %f\n", k, m_ttp->m_timing_nt[k].as_double() * 1000000.0); - #endif - } + void init(); NETLIB_RESETI() { diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 85b5570183b..6af0038daf5 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -577,6 +577,111 @@ static NETLIST_START(TTL_74260_DIP) ) NETLIST_END() +/* + * DM74279: Quad S-R Latch + * + * +---+---+---++---+ + * |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 __PLIB_PREPROCESSOR__ +#define TTL_74279A(name) \ + NET_REGISTER_DEV(TTL_74279A, name) +#define TTL_74279B(name) \ + NET_REGISTER_DEV(TTL_74279B, name) +#endif + +static NETLIST_START(TTL_74279_DIP) + TTL_74279B(s1) + TTL_74279A(s2) + TTL_74279B(s3) + TTL_74279A(s4) + + DUMMY_INPUT(GND) + DUMMY_INPUT(VCC) + + DIPPINS( /* +--------------+ */ + s1.R, /* 1R |1 ++ 16| VCC */ VCC.I, + s1.S1, /* 1S1 |2 15| 4S */ s4.S, + s1.S2, /* 1S2 |3 14| 4R */ s4.R, + s1.Q, /* 1Q |4 74279 13| 4Q */ s4.Q, + s2.R, /* 2R |5 12| 3S2 */ s3.S2, + s2.S, /* 2S |6 11| 3S1 */ s3.S1, + s2.Q, /* 2Q |7 10| 3R */ s3.R, + GND.I, /* GND |8 9| 3Q */ s3.Q + /* +--------------+ */ + ) +NETLIST_END() + +/* + * 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 __PLIB_PREPROCESSOR__ +#define DM9312_TT(name) \ + NET_REGISTER_DEV(DM9312_TT, name) +#endif + +static NETLIST_START(DM9312_DIP) + DM9312_TT(s) + + DUMMY_INPUT(GND) + DUMMY_INPUT(VCC) + +DIPPINS( /* +--------------+ */ + s.D0, /* D0 |1 ++ 16| VCC */ VCC.I, + s.D1, /* D1 |2 15| Y */ s.Y, + s.D2, /* D2 |3 14| YQ */ s.YQ, + s.D3, /* D3 |4 9312 13| C */ s.C, + s.D4, /* D4 |5 12| B */ s.B, + s.D5, /* D5 |6 11| A */ s.A, + s.D6, /* D6 |7 10| G */ s.G, //Strobe + GND.I, /* GND |8 9| D7 */ s.D7 + /* +--------------+ */ + ) +NETLIST_END() + + NETLIST_START(TTL74XX_lib) TRUTHTABLE_START(TTL_7400_GATE, 2, 1, "") @@ -847,6 +952,48 @@ NETLIST_START(TTL74XX_lib) TT_FAMILY("74XX") TRUTHTABLE_END() + // FIXME: We need "private" devices + TRUTHTABLE_START(TTL_74279A, 3, 1, "") + TT_HEAD("S,R,_Q|Q") + TT_LINE("0,X,X|1|22") + TT_LINE("1,0,X|0|27") + TT_LINE("1,1,0|0|27") + TT_LINE("1,1,1|1|22") + TT_FAMILY("74XX") + TRUTHTABLE_END() + + TRUTHTABLE_START(TTL_74279B, 4, 1, "") + TT_HEAD("S1,S2,R,_Q|Q") + TT_LINE("0,X,X,X|1|22") + TT_LINE("X,0,X,X|1|22") + TT_LINE("1,1,0,X|0|27") + TT_LINE("1,1,1,0|0|27") + TT_LINE("1,1,1,1|1|22") + TT_FAMILY("74XX") + TRUTHTABLE_END() + + TRUTHTABLE_START(DM9312_TT, 12, 2, "+A,+B,+C,+G,+D0,+D1,+D2,+D3,+D4,+D5,+D6,+D7") + TT_HEAD(" C, B, A, G,D0,D1,D2,D3,D4,D5,D6,D7| Y,YQ") + TT_LINE(" X, X, X, 1, X, X, X, X, X, X, X, X| 0, 1|33,19") + TT_LINE(" 0, 0, 0, 0, 0, X, X, X, X, X, X, X| 0, 1|33,28") + TT_LINE(" 0, 0, 0, 0, 1, X, X, X, X, X, X, X| 1, 0|33,28") + TT_LINE(" 0, 0, 1, 0, X, 0, X, X, X, X, X, X| 0, 1|33,28") + TT_LINE(" 0, 0, 1, 0, X, 1, X, X, X, X, X, X| 1, 0|33,28") + TT_LINE(" 0, 1, 0, 0, X, X, 0, X, X, X, X, X| 0, 1|33,28") + TT_LINE(" 0, 1, 0, 0, X, X, 1, X, X, X, X, X| 1, 0|33,28") + TT_LINE(" 0, 1, 1, 0, X, X, X, 0, X, X, X, X| 0, 1|33,28") + TT_LINE(" 0, 1, 1, 0, X, X, X, 1, X, X, X, X| 1, 0|33,28") + TT_LINE(" 1, 0, 0, 0, X, X, X, X, 0, X, X, X| 0, 1|33,28") + TT_LINE(" 1, 0, 0, 0, X, X, X, X, 1, X, X, X| 1, 0|33,28") + TT_LINE(" 1, 0, 1, 0, X, X, X, X, X, 0, X, X| 0, 1|33,28") + TT_LINE(" 1, 0, 1, 0, X, X, X, X, X, 1, X, X| 1, 0|33,28") + TT_LINE(" 1, 1, 0, 0, X, X, X, X, X, X, 0, X| 0, 1|33,28") + TT_LINE(" 1, 1, 0, 0, X, X, X, X, X, X, 1, X| 1, 0|33,28") + TT_LINE(" 1, 1, 1, 0, X, X, X, X, X, X, X, 0| 0, 1|33,28") + TT_LINE(" 1, 1, 1, 0, X, X, X, X, X, X, X, 1| 1, 0|33,28") + TT_FAMILY("74XX") + TRUTHTABLE_END() + LOCAL_LIB_ENTRY(TTL_7400_DIP) LOCAL_LIB_ENTRY(TTL_7402_DIP) LOCAL_LIB_ENTRY(TTL_7404_DIP) @@ -862,4 +1009,6 @@ NETLIST_START(TTL74XX_lib) LOCAL_LIB_ENTRY(TTL_7437_DIP) LOCAL_LIB_ENTRY(TTL_7486_DIP) LOCAL_LIB_ENTRY(TTL_74260_DIP) + LOCAL_LIB_ENTRY(TTL_74279_DIP) + LOCAL_LIB_ENTRY(DM9312_DIP) NETLIST_END() diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index 82b6dfef20b..693c885ce66 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -36,7 +36,6 @@ #define TTL_7402_DIP(name) \ NET_REGISTER_DEV(TTL_7402_DIP, name) - #define TTL_7404_GATE(name) \ NET_REGISTER_DEV(TTL_7404_GATE, name) @@ -103,88 +102,88 @@ NET_CONNECT(name, C, cI3) \ NET_CONNECT(name, D, cI4) -#define TTL_7420_DIP(name) \ +#define TTL_7420_DIP(name) \ NET_REGISTER_DEV(TTL_7420_DIP, name) -#define TTL_7425_GATE(name) \ +#define TTL_7425_GATE(name) \ NET_REGISTER_DEV(TTL_7425_GATE, name) -#define TTL_7425_NOR(name, cI1, cI2, cI3, cI4) \ - NET_REGISTER_DEV(TTL_7425_NOR, name) \ - NET_CONNECT(name, A, cI1) \ - NET_CONNECT(name, B, cI2) \ - NET_CONNECT(name, C, cI3) \ +#define TTL_7425_NOR(name, cI1, cI2, cI3, cI4) \ + NET_REGISTER_DEV(TTL_7425_NOR, name) \ + NET_CONNECT(name, A, cI1) \ + NET_CONNECT(name, B, cI2) \ + NET_CONNECT(name, C, cI3) \ NET_CONNECT(name, D, cI4) -#define TTL_7425_DIP(name) \ +#define TTL_7425_DIP(name) \ NET_REGISTER_DEV(TTL_7425_DIP, name) -#define TTL_7427_GATE(name) \ +#define TTL_7427_GATE(name) \ NET_REGISTER_DEV(TTL_7427_GATE, name) -#define TTL_7427_NOR(name, cI1, cI2, cI3) \ - NET_REGISTER_DEV(TTL_7427_NOR, name) \ - NET_CONNECT(name, A, cI1) \ - NET_CONNECT(name, B, cI2) \ +#define TTL_7427_NOR(name, cI1, cI2, cI3) \ + NET_REGISTER_DEV(TTL_7427_NOR, name) \ + NET_CONNECT(name, A, cI1) \ + NET_CONNECT(name, B, cI2) \ NET_CONNECT(name, C, cI3) -#define TTL_7427_DIP(name) \ +#define TTL_7427_DIP(name) \ NET_REGISTER_DEV(TTL_7427_DIP, name) -#define TTL_7430_GATE(name) \ +#define TTL_7430_GATE(name) \ NET_REGISTER_DEV(TTL_7430_GATE, name) -#define TTL_7430_NAND(name, cI1, cI2, cI3, cI4, cI5, cI6, cI7, cI8) \ - NET_REGISTER_DEV(TTL_7430_NAND, name) \ - NET_CONNECT(name, A, cI1) \ - NET_CONNECT(name, B, cI2) \ - NET_CONNECT(name, C, cI3) \ - NET_CONNECT(name, D, cI4) \ - NET_CONNECT(name, E, cI5) \ - NET_CONNECT(name, F, cI6) \ - NET_CONNECT(name, G, cI7) \ +#define TTL_7430_NAND(name, cI1, cI2, cI3, cI4, cI5, cI6, cI7, cI8) \ + NET_REGISTER_DEV(TTL_7430_NAND, name) \ + NET_CONNECT(name, A, cI1) \ + NET_CONNECT(name, B, cI2) \ + NET_CONNECT(name, C, cI3) \ + NET_CONNECT(name, D, cI4) \ + NET_CONNECT(name, E, cI5) \ + NET_CONNECT(name, F, cI6) \ + NET_CONNECT(name, G, cI7) \ NET_CONNECT(name, H, cI8) -#define TTL_7430_DIP(name) \ +#define TTL_7430_DIP(name) \ NET_REGISTER_DEV(TTL_7430_DIP, name) -#define TTL_7432_GATE(name) \ +#define TTL_7432_GATE(name) \ NET_REGISTER_DEV(TTL_7432_OR, name) -#define TTL_7432_OR(name, cI1, cI2) \ - NET_REGISTER_DEV(TTL_7432_OR, name) \ - NET_CONNECT(name, A, cI1) \ +#define TTL_7432_OR(name, cI1, cI2) \ + NET_REGISTER_DEV(TTL_7432_OR, name) \ + NET_CONNECT(name, A, cI1) \ NET_CONNECT(name, B, cI2) -#define TTL_7432_DIP(name) \ +#define TTL_7432_DIP(name) \ NET_REGISTER_DEV(TTL_7432_DIP, name) -#define TTL_7437_GATE(name) \ +#define TTL_7437_GATE(name) \ NET_REGISTER_DEV(TTL_7437_GATE, name) -#define TTL_7437_NAND(name, cA, cB) \ +#define TTL_7437_NAND(name, cA, cB) \ NET_REGISTER_DEV(TTL_7437_NAND, name) \ NET_CONNECT(name, A, cA) \ NET_CONNECT(name, B, cB) -#define TTL_7437_DIP(name) \ +#define TTL_7437_DIP(name) \ NET_REGISTER_DEV(TTL_7437_DIP, name) -#define TTL_7486_GATE(name) \ +#define TTL_7486_GATE(name) \ NET_REGISTER_DEV(TTL_7486_GATE, name) -#define TTL_7486_XOR(name, cA, cB) \ - NET_REGISTER_DEV(TTL_7486_XOR, name) \ - NET_CONNECT(name, A, cA) \ +#define TTL_7486_XOR(name, cA, cB) \ + NET_REGISTER_DEV(TTL_7486_XOR, name) \ + NET_CONNECT(name, A, cA) \ NET_CONNECT(name, B, cB) -#define TTL_7486_DIP(name) \ +#define TTL_7486_DIP(name) \ NET_REGISTER_DEV(TTL_7486_DIP, name) @@ -202,6 +201,27 @@ #define TTL_74260_DIP(name) \ NET_REGISTER_DEV(TTL_74260_DIP, name) +#define TTL_74279_DIP(name) \ + NET_REGISTER_DEV(TTL_74279_DIP, name) + +#define DM9312(name, cA, cB, cC, cSTROBE, cD0, cD1, cD2, cD3, cD4, cD5, cD6, cD7) \ + NET_REGISTER_DEV(DM9312_TT, name) \ + NET_CONNECT(name, A, cA) \ + NET_CONNECT(name, B, cB) \ + NET_CONNECT(name, C, cC) \ + NET_CONNECT(name, G, cSTROBE) \ + NET_CONNECT(name, D0, cD0) \ + NET_CONNECT(name, D1, cD1) \ + NET_CONNECT(name, D2, cD2) \ + NET_CONNECT(name, D3, cD3) \ + NET_CONNECT(name, D4, cD4) \ + NET_CONNECT(name, D5, cD5) \ + NET_CONNECT(name, D6, cD6) \ + NET_CONNECT(name, D7, cD7) + +#define DM9312_DIP(name) \ + NET_REGISTER_DEV(DM9312_DIP, name) + #endif /* ---------------------------------------------------------------------------- diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index e5a98fb5be8..3a2cb00e9e4 100755 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -56,7 +56,7 @@ typedef __int128_t INT128; //============================================================ // This will be autodetected -// #define PPMF_TYPE 0 +//#define PPMF_TYPE 0 #define PPMF_TYPE_PMF 0 #define PPMF_TYPE_GNUC_PMF_CONV 1 @@ -92,6 +92,11 @@ typedef __int128_t INT128; #else #define PPMF_TYPE PPMF_TYPE_PMF #endif +#else + #undef PHAS_PMF_INTERNAL + #define PHAS_PMF_INTERNAL 0 + #undef MEMBER_ABI + #define MEMBER_ABI #endif #endif /* PCONFIG_H_ */ diff --git a/src/lib/netlist/plib/ppmf.h b/src/lib/netlist/plib/ppmf.h index 6109cc916e5..f2761fa8c00 100755 --- a/src/lib/netlist/plib/ppmf.h +++ b/src/lib/netlist/plib/ppmf.h @@ -177,6 +177,7 @@ namespace plib { function_ptr t = *reinterpret_cast<function_ptr *>(&m_func); return (obj->*t)(std::forward<Targs>(args)...); } + bool is_set() { return m_func != nullptr; } private: generic_function m_func; #if 0 && defined(_MSC_VER) diff --git a/src/lib/netlist/plib/pstream.cpp b/src/lib/netlist/plib/pstream.cpp index de687740eec..7fd61a3d944 100644 --- a/src/lib/netlist/plib/pstream.cpp +++ b/src/lib/netlist/plib/pstream.cpp @@ -277,7 +277,7 @@ pimemstream::pos_type pimemstream::vread(void *buf, const pos_type n) if (ret > 0) { - std::copy(m_mem + m_pos, m_mem + m_pos + ret, (char *) buf); + std::copy(m_mem + m_pos, m_mem + m_pos + ret, static_cast<char *>(buf)); m_pos += ret; } @@ -334,7 +334,7 @@ void pomemstream::vwrite(const void *buf, const pos_type n) pfree_array(o); } - std::copy((char *) buf, (char *) buf + n, m_mem + m_pos); + std::copy(static_cast<const char *>(buf), static_cast<const char *>(buf) + n, m_mem + m_pos); m_pos += n; m_size = std::max(m_pos, m_size); } diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index 10b2e9a82a5..a1165b5e924 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -78,7 +78,7 @@ public: bool eof() const { return ((flags() & FLAG_EOF) != 0); } - pos_type read(void *buf, const unsigned n) + pos_type read(void *buf, const pos_type n) { return vread(buf, n); } diff --git a/src/lib/netlist/plib/pstring.cpp b/src/lib/netlist/plib/pstring.cpp index fc97409097f..fc0b06d0a1c 100644 --- a/src/lib/netlist/plib/pstring.cpp +++ b/src/lib/netlist/plib/pstring.cpp @@ -80,7 +80,7 @@ int pstring_t<F>::pcmp(const pstring_t &right) const ri++; si++; } - int ret = (si == this->end() ? 0 : *si - *ri); + int ret = (si == this->end() ? 0 : static_cast<int>(*si) - static_cast<int>(*ri)); if (ret == 0) { if (this->blen() > right.blen()) @@ -97,8 +97,8 @@ void pstring_t<F>::pcopy(const mem_t *from, std::size_t size) { pstr_t *n = salloc(size * sizeof(mem_t)); if (size > 0) - n->copy_from((char *)from, size); - *((mem_t *) n->str() + size) = 0; + n->copy_from(static_cast<const char *>(from), size); + *(static_cast<mem_t *>(n->str()) + size) = 0; sfree(m_ptr); m_ptr = n; } @@ -357,7 +357,7 @@ void pstringbuffer::pcat(const void *m, std::size_t l) { const std::size_t nl = m_len + l + 1; resize(nl); - std::copy((char *) m, (char *) m + l, m_ptr + m_len); + std::copy(static_cast<const char *>(m), static_cast<const char *>(m) + l, m_ptr + m_len); m_len += l; *(m_ptr + m_len) = 0; } diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h index 664b31c8761..ba2e61f6e7c 100644 --- a/src/lib/netlist/plib/pstring.h +++ b/src/lib/netlist/plib/pstring.h @@ -31,7 +31,7 @@ struct pstr_t std::size_t len() const { return m_len; } void inc() { m_ref_count++; } bool dec_and_check() { --m_ref_count; return m_ref_count == 0; } - void copy_from(char *p, std::size_t n) { std::copy(p, p + n, str()); } + void copy_from(const char *p, std::size_t n) { std::copy(p, p + n, str()); } private: int m_ref_count; std::size_t m_len; diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index d53f06d4e4e..b7eb9f5a18f 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -197,7 +197,8 @@ public: { std::size_t sz = s->m_dt.size * s->m_count; if (s->m_dt.is_float || s->m_dt.is_integral) - std::copy((char *)s->m_ptr, (char *) s->m_ptr + sz, p); + std::copy(static_cast<char *>(s->m_ptr), + static_cast<char *>(s->m_ptr) + sz, p); else log().fatal("found unsupported save element {1}\n", s->m_name); p += sz; @@ -220,7 +221,7 @@ public: { std::size_t sz = s->m_dt.size * s->m_count; if (s->m_dt.is_float || s->m_dt.is_integral) - std::copy(p, p + sz, (char *) s->m_ptr); + std::copy(p, p + sz, static_cast<char *>(s->m_ptr)); else log().fatal("found unsupported save element {1}\n", s->m_name); p += sz; diff --git a/src/mame/drivers/capbowl.cpp b/src/mame/drivers/capbowl.cpp index a709375bcea..384b276f3ed 100644 --- a/src/mame/drivers/capbowl.cpp +++ b/src/mame/drivers/capbowl.cpp @@ -355,7 +355,7 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state ) MCFG_SOUND_ROUTE(2, "speaker", 0.07) MCFG_SOUND_ROUTE(3, "speaker", 0.75) - MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC + MCFG_SOUND_ADD("dac", DAC0832, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index b3968521efb..8faf586e896 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -2230,6 +2230,17 @@ static INPUT_PORTS_START( galaxian ) PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END +static INPUT_PORTS_START( galaxianmo ) + PORT_INCLUDE(galaxian) + + PORT_MODIFY("IN2") + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x00, DEF_STR(None) ) + PORT_DIPSETTING( 0x01, "3000" ) + PORT_DIPSETTING( 0x02, "4000" ) + PORT_DIPSETTING( 0x03, "5000" ) +INPUT_PORTS_END + static INPUT_PORTS_START( galaxianbl ) PORT_INCLUDE(galaxian) @@ -11572,7 +11583,7 @@ ROM_END GAME( 1979, galaxian, 0, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco", "Galaxian (Namco set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxiana, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco", "Galaxian (Namco set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxianm, galaxian, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1979, galaxianmo, galaxian, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1979, galaxianmo, galaxian, galaxian, galaxianmo, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxiant, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco (Taito license)", "Galaxian (Taito)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, galaxiani, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "bootleg? (Irem)", "Galaxian (Irem)", MACHINE_SUPPORTS_SAVE ) // more likely bootlegged by Irem, not an official license diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index db326f0230e..704414517e2 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -586,14 +586,13 @@ MACHINE_CONFIG_END LJN I Took a Lickin' From a Chicken * COP421 MCU label ~/005 COP421-NJC/N - * 11 leds, 1-bit sound, motor to a rubber chicken with a pulley in the middle + * 11 leds, 1-bit sound, motor to a chicken on a spring This toy includes 4 games: Tic Tac Toe, Chicken Sez, and Total Recall I/II. known releases: - - USA: I Took a Lickin' From a Chicken (KMart Corporation/LJN?) - - Japan: Professor Chicken's Genius Classroom 「にわとり博士の天才教室」, - distributed by Bandai + - USA: I Took a Lickin' From a Chicken + - Japan: Professor Chicken's Genius Classroom 「にわとり博士の天才教室」, distributed by Bandai ***************************************************************************/ diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index f00ea4eaecb..7b942510906 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -63,6 +63,8 @@ 35 HD44801B 1983, Alpha 8302 protection MCU (see 8201) 42 HD44801B 1984, Alpha 8303 protection MCU (see 8201) + + *89 HD44801C 1985, CXG Advanced Portachess (* denotes not yet emulated by MAME, @ denotes it's in this driver) diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp index 46e7f4ccb0b..dffff4b2cd5 100644 --- a/src/mame/drivers/hh_pic16.cpp +++ b/src/mame/drivers/hh_pic16.cpp @@ -10,16 +10,18 @@ ----------------------------------------------------------- *020 1650 19??, GI Economega IV TV PPL Tuning System Control @024 1655 1979, Toytronic? Football - @033 1655A 1979, Toytronic Football + @033 1655A 1979, Toytronic Football (newer) @036 1655A 1979, Ideal Maniac - *043 1655A 1979, Calfax/Caprice Pro-Action Baseball (have dump) - *051 1655A 1979, U.S. Games Basketball/Tandy Electronic Basketball (have dump) + *043 1655A 1979, Caprice Pro-Action Baseball (have dump) + @051 1655A 1979, Tandy Electronic Basketball @053 1655A 1979, Atari Touch Me + @0?? 1655A 1979, Tiger Half Court Computer Basketball/Sears Electronic Basketball (custom label) @061 1655A 1980, Lakeside Le Boom + *081 1655A 19??, Ramtex Space Invaders/Block Buster @094 1655A 1980, GAF Melody Madness @110 1650A 1979, Tiger/Tandy Rocket Pinball - *133 1650A 1980, U.S. Games Programmable Baseball/Tandy 2-Player Baseball (have dump) - *144 1650A 1980, U.S. Games Football/Tandy 2-Player Football (have dump) + *133 1650A 1981, U.S. Games Programmable Baseball/Tandy 2-Player Baseball (have dump) + *144 1650A 1981, U.S. Games Football/Tandy 2-Player Football (have dump) *192 1650 19??, <unknown> phone dialer (have dump) *255 1655 19??, <unknown> talking clock (have dump) *518 1650A 19??, GI Teleview Control Chip (features differ per program) @@ -28,16 +30,14 @@ *533 1650A 19??, " *536 1650 1982, GI Teleview Autodialer/Terminal Identifier - inconsistent: - - @<none> 1655A 1979, Tiger Half Court Computer Basketball/Sears Electronic Basketball - (* denotes not yet emulated by MAME, @ denotes it's in this driver) TODO: - leboom discrete sound for volume decay (simulated for now) - ttfball/ttfballa: discrete sound part, for volume gating? + - what's the relation between hccbaskb and tbaskb? Is one the bootleg + of the other? Or are they both made by the same subcontractor? ***************************************************************************/ @@ -51,6 +51,7 @@ #include "maniac.lh" // clickable #include "melodym.lh" // clickable #include "rockpin.lh" +#include "tbaskb.lh" #include "touchme.lh" // clickable #include "ttfball.lh" @@ -617,8 +618,9 @@ MACHINE_CONFIG_END * 1 led, 1-bit sound with RC circuit for volume decay This is a tabletop timebomb defusion game. It's shaped like an aerial bomb, - and starts 'ticking' when the player opens the keypad door. To begin, select - the game mode, rows(keypad size), and fuse duration. + colored black on USA version, yellow on dual-language Canadian version. + The game starts 'ticking' when the player opens the keypad door. To begin, + select the game mode, rows(keypad size), and fuse duration. Game modes as described on the box: 1: Eliminate the buttons one by one in the order set out by the computer. Press @@ -768,6 +770,115 @@ MACHINE_CONFIG_END /*************************************************************************** + Tandy Electronic Basketball (model 60-2146) + * PIC1655A-51 + * 2 7seg LEDs + 21 other LEDs, 1-bit sound + + The ROM is nearly identical to hccbaskb, the shell/overlay is the same as + U.S. Games/Tandy Trick Shot Basketball. + +***************************************************************************/ + +class tbaskb_state : public hh_pic16_state +{ +public: + tbaskb_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_pic16_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_READ8_MEMBER(read_a); + DECLARE_WRITE8_MEMBER(write_b); + DECLARE_WRITE8_MEMBER(write_c); +}; + +// handlers + +void tbaskb_state::prepare_display() +{ + // B4,B5 are 7segs + set_display_segmask(0x30, 0x7f); + display_matrix(7, 6, m_c, m_b); +} + +READ8_MEMBER(tbaskb_state::read_a) +{ + // A2: skill switch, A3: multiplexed inputs + return m_inp_matrix[5]->read() | read_inputs(5) | 3; +} + +WRITE8_MEMBER(tbaskb_state::write_b) +{ + // B0: RTCC pin + m_maincpu->set_input_line(PIC16C5x_RTCC, data & 1); + + // B0-B4: input mux + m_inp_mux = ~data & 0x1f; + + // B0-B5: led select + m_b = data; + prepare_display(); +} + +WRITE8_MEMBER(tbaskb_state::write_c) +{ + // C7: speaker out + m_speaker->level_w(data >> 7 & 1); + + // C0-C6: led data + m_c = ~data; + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( tbaskb ) + PORT_START("IN.0") // B0 port A3 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_16WAY + + PORT_START("IN.1") // B1 port A3 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_16WAY + + PORT_START("IN.2") // B2 port A3 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY + + PORT_START("IN.3") // B3 port A3 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_16WAY + + PORT_START("IN.4") // B4 port A3 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) + + PORT_START("IN.5") // port A2 + PORT_CONFNAME( 0x04, 0x04, "Skill Level" ) + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x00, "2" ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( tbaskb, tbaskb_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", PIC1655, 1000000) // approximation - RC osc. R=18K, C=47pF + MCFG_PIC16C5x_READ_A_CB(READ8(tbaskb_state, read_a)) + MCFG_PIC16C5x_WRITE_B_CB(WRITE8(tbaskb_state, write_b)) + MCFG_PIC16C5x_READ_C_CB(CONSTANT(0xff)) + MCFG_PIC16C5x_WRITE_C_CB(WRITE8(tbaskb_state, write_c)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_pic16_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_tbaskb) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Tiger Electronics Rocket Pinball (model 7-460) * PIC1650A-110, 69-11397 * 3 7seg LEDs + 44 other LEDs, 1-bit sound @@ -977,6 +1088,7 @@ static MACHINE_CONFIG_START( hccbaskb, hccbaskb_state ) MCFG_CPU_ADD("maincpu", PIC1655, 1000000) // approximation - RC osc. R=15K, C=47pF MCFG_PIC16C5x_READ_A_CB(READ8(hccbaskb_state, read_a)) MCFG_PIC16C5x_WRITE_B_CB(WRITE8(hccbaskb_state, write_b)) + MCFG_PIC16C5x_READ_C_CB(CONSTANT(0xff)) MCFG_PIC16C5x_WRITE_C_CB(WRITE8(hccbaskb_state, write_c)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_pic16_state, display_decay_tick, attotime::from_msec(1)) @@ -994,9 +1106,13 @@ MACHINE_CONFIG_END /*************************************************************************** - Toytronic Football - * PIC1655-024 or PIC1655A-033 - * 4511 7seg decoder, 7 7seg LEDs + 27 other LEDs, 1-bit sound + Toytronic Football (set 1) + * PIC1655A-033 + * 4511 7seg BCD decoder, 7 7seg LEDs + 27 other LEDs, 1-bit sound + + (no brand) Football (set 2) + * PIC1655-024 + * rest same as above, 1 less button Hello and welcome to another Mattel Football clone, there are so many of these. The PIC1655-024 one came from an unbranded handheld, but comparison suggests @@ -1045,7 +1161,7 @@ WRITE8_MEMBER(ttfball_state::write_b) // B0,B1,B3,B7: input mux low m_inp_mux = (m_inp_mux & 0x10) | (~data & 3) | (~data >> 1 & 4) | (~data >> 4 & 8); - // B0-B7: led select + // B0-B7: led select (see above) m_b = data; prepare_display(); } @@ -1058,7 +1174,7 @@ WRITE8_MEMBER(ttfball_state::write_c) // C7: input mux high m_inp_mux = (m_inp_mux & 0xf) | (data >> 3 & 0x10); - // C0-C7: led data/select, 4511 + // C0-C7: led data/select (see above) m_c = data; prepare_display(); } @@ -1121,7 +1237,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( ttfball, ttfball_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", PIC1655, 1000000) // approximation - RC osc. R=27K or 33K, C=68pF + MCFG_CPU_ADD("maincpu", PIC1655, 1000000) // approximation - RC osc. R=27K(set 1) or 33K(set 2), C=68pF MCFG_PIC16C5x_READ_A_CB(READ8(ttfball_state, read_a)) MCFG_PIC16C5x_WRITE_B_CB(WRITE8(ttfball_state, write_b)) MCFG_PIC16C5x_READ_C_CB(CONSTANT(0xff)) @@ -1170,6 +1286,12 @@ ROM_START( leboom ) ROM_END +ROM_START( tbaskb ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "pic1655a-051", 0x0000, 0x0400, CRC(92534b40) SHA1(7055e32846c913e68f7d35f279cd537f6325f4f2) ) +ROM_END + + ROM_START( rockpin ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "pic1650a-110_69-11397", 0x0000, 0x0400, CRC(d5396e77) SHA1(952feaff70fde53a9eda84c54704520d50749e78) ) @@ -1203,6 +1325,8 @@ CONS( 1979, maniac, 0, 0, maniac, maniac, driver_device, 0, "Ideal CONS( 1980, leboom, 0, 0, leboom, leboom, driver_device, 0, "Lakeside", "Le Boom", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1979, tbaskb, 0, 0, tbaskb, tbaskb, driver_device, 0, "Tandy Radio Shack", "Electronic Basketball (Tandy)", MACHINE_SUPPORTS_SAVE ) + CONS( 1979, rockpin, 0, 0, rockpin, rockpin, driver_device, 0, "Tiger Electronics", "Rocket Pinball", MACHINE_SUPPORTS_SAVE ) CONS( 1979, hccbaskb, 0, 0, hccbaskb, hccbaskb, driver_device, 0, "Tiger Electronics", "Half Court Computer Basketball", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp index c2bead0d7eb..6865af919f3 100644 --- a/src/mame/drivers/merit.cpp +++ b/src/mame/drivers/merit.cpp @@ -1476,8 +1476,22 @@ static MACHINE_CONFIG_DERIVED( couple, pitboss ) MACHINE_CONFIG_END +ROM_START( pitboss ) /* Program roms were all printed as 2214-05 with the "7" hand written over the 5, U5 also had an added hand written "A" */ + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2214-07_u5-0a.u5", 0x0000, 0x2000, CRC(0cd31f5e) SHA1(cd49b91e70a74b35990ca4602d4fa1e88a5438d9) ) /* Internal designation: M4A4REV0 */ + ROM_LOAD( "2214-07_u6-0.u6", 0x2000, 0x2000, CRC(459aa388) SHA1(fdc734660a7e5c1efc1b09990db070d62288be3b) ) /* Games included in this set are: */ + ROM_LOAD( "2214-07_u7-0.u7", 0x4000, 0x2000, CRC(517cc893) SHA1(5d49ab4cddee53cc16d29404e5fb316c81943575) ) /* Joker Poker, Blackjack, Foto Finish & The Dice Game */ + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_LOAD( "chr7_u39.u39", 0x0000, 0x2000, CRC(6662f607) SHA1(6b423f8de011d196700839af0be37effbf87383f) ) /* Shows: */ + ROM_LOAD( "chr7_u38.u38", 0x2000, 0x2000, CRC(a014b44f) SHA1(906d426b1de75f26030c19dcd599b6570909f510) ) /* (c) 1983 Merit industries */ + ROM_LOAD( "chr7_u37.u37", 0x4000, 0x2000, CRC(cb12e139) SHA1(06fe91281faae5d0c0ae4b3cd8ad103bd3995c38) ) -ROM_START( pitboss ) /* Program roms on a CTR-202 daughter card - Internal designation: PBVBREV0 */ + ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_LOAD( "chr7_u40c.u40", 0x0000, 0x2000, CRC(50fbbada) SHA1(6dd35fee5411606cab51ac3093dd1e171df86721) ) +ROM_END + +ROM_START( pitboss04 ) /* Program roms on a CTR-202 daughter card - Internal designation: PBVBREV0 */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "2214-04_u5-0.u5", 0x0000, 0x2000, CRC(10b782e7) SHA1(158819898ad81506c47b76ffe2a949ee7208740f) ) /* Games included in this set are: */ ROM_LOAD( "2214-04_u6-0.u6", 0x2000, 0x2000, CRC(c3fd6510) SHA1(8c89fd2cbcb6f12fa6427883700971f7c39f6ccf) ) /* Joker Poker, Blackjack, Foto Finish & The Dice Game */ @@ -1493,7 +1507,7 @@ ROM_START( pitboss ) /* Program roms on a CTR-202 daughter card - Internal desig ROM_LOAD( "chr7_u40a.u40", 0x0000, 0x2000, CRC(db62c5ec) SHA1(a9967eb51436f342902fa3ce9c43d4d1ec5e0f3c) ) ROM_END -ROM_START( pitbossa ) /* Roms also found labeled simply as "PBHD" U5 through U7 */ +ROM_START( pitboss03 ) /* Roms also found labeled simply as "PBHD" U5 through U7 */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "2214-03_u5-0c.u5", 0x0000, 0x2000, CRC(97f870bd) SHA1(b1b01abff0385e3b0585e49f78b93bcf56e434ef) ) /* Internal designation: M4A4REV0 */ ROM_LOAD( "2214-03_u6-0.u6", 0x2000, 0x2000, CRC(086e699b) SHA1(a1d1eafaac9262f924f175961aa52c6d8e779bf0) ) /* Games included in this set are: */ @@ -1508,7 +1522,7 @@ ROM_START( pitbossa ) /* Roms also found labeled simply as "PBHD" U5 through U7 ROM_LOAD( "chr7_u40.u40", 0x0000, 0x2000, CRC(52298162) SHA1(79aa6c4ab6bec6450d882615e64f61cfef934153) ) ROM_END -ROM_START( pitbossa1 ) /* Specific build for localized region with no Free Hand Bonus */ +ROM_START( pitboss03a ) /* Specific build for localized region with no Free Hand Bonus */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "2214-03_u5-1c.u5", 0x0000, 0x2000, CRC(cf985f96) SHA1(d0e1c3887fe87b92c52410215b5eec600a793c50) ) /* Internal designation: M4A4REV0 */ ROM_LOAD( "2214-03_u6-0.u6", 0x2000, 0x2000, CRC(086e699b) SHA1(a1d1eafaac9262f924f175961aa52c6d8e779bf0) ) /* Games included in this set are: */ @@ -1523,24 +1537,9 @@ ROM_START( pitbossa1 ) /* Specific build for localized region with no Free Hand ROM_LOAD( "chr7_u40.u40", 0x0000, 0x2000, CRC(52298162) SHA1(79aa6c4ab6bec6450d882615e64f61cfef934153) ) ROM_END -ROM_START( pitbossb ) /* Roms also found labeled as U5-0C, U6-0 & U7-0 */ - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "psb1_u5.u5", 0x0000, 0x2000, CRC(d8902656) SHA1(06da829201f6141a6b23afa0e277a3c7a122c26e) ) /* Internal designation: PSB1REV0 */ - ROM_LOAD( "psb1_u6.u6", 0x2000, 0x2000, CRC(bf903b01) SHA1(1f5f69cfd3eb105bd9bad071016931a79defa16b) ) /* Games included in this set are: */ - ROM_LOAD( "psb1_u7.u7", 0x4000, 0x2000, CRC(306351b9) SHA1(32cd243aa65571ee7fc72971b6a16beeb4ed9d85) ) /* Joker Poker, Blackjack, Super Slots & The Dice Game */ - - ROM_REGION( 0x6000, "gfx1", 0 ) - ROM_LOAD( "chr7_u39.u39", 0x0000, 0x2000, CRC(6662f607) SHA1(6b423f8de011d196700839af0be37effbf87383f) ) /* Shows: */ - ROM_LOAD( "chr7_u38.u38", 0x2000, 0x2000, CRC(a014b44f) SHA1(906d426b1de75f26030c19dcd599b6570909f510) ) /* (c) 1983 Merit industries */ - ROM_LOAD( "chr7_u37.u37", 0x4000, 0x2000, CRC(cb12e139) SHA1(06fe91281faae5d0c0ae4b3cd8ad103bd3995c38) ) /* Cheltenham PA. 19012 */ - - ROM_REGION( 0x2000, "gfx2", 0 ) - ROM_LOAD( "chr7_u40.u40", 0x0000, 0x2000, CRC(52298162) SHA1(79aa6c4ab6bec6450d882615e64f61cfef934153) ) -ROM_END - /* Known to exist is Pit Boss version M4A2 (confirmed via manual) and likely a M4A3 as well (not confirmed, but M4A4 is dumped) */ -ROM_START( pitbossc ) +ROM_START( pitbossm4 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "m4a1_u5.u5", 0x0000, 0x2000, CRC(f5284472) SHA1(9170b90d06caa382be29feb2f6e80993bba1e07e) ) /* Internal designation: M4A1REV0 */ ROM_LOAD( "m4a1_u6.u6", 0x2000, 0x2000, CRC(dd8df5fe) SHA1(dab8c1077058263729b2589dd9bf9989ad53be1c) ) /* Games included in this set are: */ @@ -1555,6 +1554,21 @@ ROM_START( pitbossc ) ROM_LOAD( "chr2_u40.u40", 0x0000, 0x2000, CRC(40c94dce) SHA1(86611e3a1048b2a3fffcc0110811656a2d0fc4a5) ) ROM_END +ROM_START( pitbossps ) /* Roms also found labeled as U5-0C, U6-0 & U7-0 */ + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "psb1_u5.u5", 0x0000, 0x2000, CRC(d8902656) SHA1(06da829201f6141a6b23afa0e277a3c7a122c26e) ) /* Internal designation: PSB1REV0 */ + ROM_LOAD( "psb1_u6.u6", 0x2000, 0x2000, CRC(bf903b01) SHA1(1f5f69cfd3eb105bd9bad071016931a79defa16b) ) /* Games included in this set are: */ + ROM_LOAD( "psb1_u7.u7", 0x4000, 0x2000, CRC(306351b9) SHA1(32cd243aa65571ee7fc72971b6a16beeb4ed9d85) ) /* Joker Poker, Blackjack, Super Slots & The Dice Game */ + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_LOAD( "chr7_u39.u39", 0x0000, 0x2000, CRC(6662f607) SHA1(6b423f8de011d196700839af0be37effbf87383f) ) /* Shows: */ + ROM_LOAD( "chr7_u38.u38", 0x2000, 0x2000, CRC(a014b44f) SHA1(906d426b1de75f26030c19dcd599b6570909f510) ) /* (c) 1983 Merit industries */ + ROM_LOAD( "chr7_u37.u37", 0x4000, 0x2000, CRC(cb12e139) SHA1(06fe91281faae5d0c0ae4b3cd8ad103bd3995c38) ) /* Cheltenham PA. 19012 */ + + ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_LOAD( "chr7_u40.u40", 0x0000, 0x2000, CRC(52298162) SHA1(79aa6c4ab6bec6450d882615e64f61cfef934153) ) +ROM_END + ROM_START( mdchoice ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "e4a1_u5.u5", 0x0000, 0x2000, CRC(bd77f8dc) SHA1(c9c85e3180be30e7a1d37abb6d4e7c777acfda81) ) /* Internal designation: E4A1REV0 */ @@ -2435,13 +2449,14 @@ DRIVER_INIT_MEMBER(merit_state,dtrvwz5) /* Gambling type games */ -GAME( 1983, pitboss, 0, casino5, pitboss, driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-04)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1983, pitbossa, pitboss, pitboss, pitbossa, driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-03, U5-0C)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1983, pitbossa1,pitboss, pitboss, pitbossa1,driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-03, U5-1C)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1983, pitbossb, pitboss, pitboss, pitbossa, driver_device, 0, ROT0, "Merit", "The Pit Boss (PSB1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1983, pitbossc, pitboss, pitboss, pitbossb, driver_device, 0, ROT0, "Merit", "The Pit Boss (M4A1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1983, mdchoice, pitboss, pitboss, mdchoice, driver_device, 0, ROT0, "Merit", "Dealer's Choice (E4A1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) /* Copyright year based on other Pit Boss sets */ -GAME( 1983, mpchoice, pitboss, pitboss, mpchoice, driver_device, 0, ROT0, "Merit", "Player's Choice (M4C1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1983, pitboss, 0, pitboss, pitbossa, driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-07, U5-0A)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) /* "7" hand written over a 5 */ +GAME( 1983, pitboss04, pitboss, casino5, pitboss, driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-04)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1983, pitboss03, pitboss, pitboss, pitbossa, driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-03, U5-0C)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1983, pitboss03a, pitboss, pitboss, pitbossa1,driver_device, 0, ROT0, "Merit", "The Pit Boss (2214-03, U5-1C)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1983, pitbossm4, pitboss, pitboss, pitbossb, driver_device, 0, ROT0, "Merit", "The Pit Boss (M4A1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1983, pitbossps, pitboss, pitboss, pitbossa, driver_device, 0, ROT0, "Merit", "The Pit Boss (PSB1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1983, mdchoice, pitboss, pitboss, mdchoice, driver_device, 0, ROT0, "Merit", "Dealer's Choice (E4A1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) /* Copyright year based on other Pit Boss sets */ +GAME( 1983, mpchoice, pitboss, pitboss, mpchoice, driver_device, 0, ROT0, "Merit", "Player's Choice (M4C1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1989, casino5, 0, casino5, casino5, driver_device, 0, ROT0, "Merit", "Casino Five (3315-02, U5-2B)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, casino5a, casino5, casino5, casino5, driver_device, 0, ROT0, "Merit", "Casino Five (3315-02, U5-0)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp index e038e2db0df..bcddb13d8b2 100644 --- a/src/mame/drivers/polepos.cpp +++ b/src/mame/drivers/polepos.cpp @@ -796,9 +796,9 @@ static INPUT_PORTS_START( polepos2bi ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SWB:6") PORT_DIPSETTING( 0x00, "90 secs." ) PORT_DIPSETTING( 0x40, "120 secs." ) - PORT_DIPNAME( 0x80, 0x00, "Always On" ) PORT_DIPLOCATION("SWB:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off )) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Pause ) ) PORT_DIPLOCATION("SWB:8") + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index 943eb55a38f..84a8bb6975a 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -5160,7 +5160,7 @@ GAME( 1996, jdreddb, jdredd, jdredd, jdredd, driver_device, 0, ROT0, /* Tecmo */ GAME( 1997, coh1002m, 0, coh1002m, zn, driver_device, 0, ROT0, "Tecmo", "TPS", MACHINE_IS_BIOS_ROOT ) -GAME( 1997, glpracr2, coh1002m, coh1002m, zn, driver_device, 0, ROT0, "Tecmo", "Gallop Racer 2 (USA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +GAME( 1997, glpracr2, coh1002m, coh1002m, zn, driver_device, 0, ROT0, "Tecmo", "Gallop Racer 2 (Export)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1997, glpracr2j, glpracr2, coh1002m, zn, driver_device, 0, ROT0, "Tecmo", "Gallop Racer 2 (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1997, glpracr2l, glpracr2, coh1002ml, zn, driver_device, 0, ROT0, "Tecmo", "Gallop Racer 2 Link HW (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1998, doapp, coh1002m, coh1002m, zn, driver_device, 0, ROT0, "Tecmo", "Dead Or Alive ++ (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/layout/rockpin.lay b/src/mame/layout/rockpin.lay index ef98c46b901..635d555b223 100644 --- a/src/mame/layout/rockpin.lay +++ b/src/mame/layout/rockpin.lay @@ -49,7 +49,7 @@ <!-- build screen --> <view name="Internal Layout"> - <bounds left="2.01" right="21.99" top="6.01" bottom="49.99" /> + <bounds left="2.01" right="21.99" top="10.25" bottom="49.99" /> <!-- bezel --> diff --git a/src/mame/layout/tbaskb.lay b/src/mame/layout/tbaskb.lay new file mode 100644 index 00000000000..185ce823abd --- /dev/null +++ b/src/mame/layout/tbaskb.lay @@ -0,0 +1,92 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0" green="0" blue="0" /></rect></element> + <element name="disk_black"><disk><color red="0" green="0" blue="0" /></disk></element> + <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element> + <element name="disk_white"><disk><color red="0.8" green="0.8" blue="0.8" /></disk></element> + + <element name="text_l1"><text string="HOME" align="1"><color red="0.9" green="0.9" blue="0.9" /></text></element> + <element name="text_l2"><text string="VISITOR" align="2"><color red="0.9" green="0.9" blue="0.9" /></text></element> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.2" green="0.04" blue="0.05" /></disk> + <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + </element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.2" blue="0.23" /></led7seg> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="3.26" right="21.74" top="-2.75" bottom="23.25" /> + + <!-- bezel --> + + <bezel element="static_white"><bounds x="3.25" y="5" width="18.5" height="23" /></bezel> + <bezel element="static_black"><bounds x="3.5" y="5.5" width="18" height="23" /></bezel> + + <bezel element="static_white"><bounds x="10" y="5.25" width="5" height="7.25" /></bezel> + <bezel element="static_white"><bounds x="9" y="7.5" width="7" height="0.25" /></bezel> + <bezel element="static_white"><bounds x="9" y="8.75" width="7" height="0.25" /></bezel> + <bezel element="static_white"><bounds x="9" y="10" width="7" height="0.25" /></bezel> + <bezel element="static_black"><bounds x="10.25" y="5.5" width="4.5" height="7.25" /></bezel> + + <bezel element="disk_white"><bounds x="10" y="10" width="5" height="5" /></bezel> + <bezel element="disk_black"><bounds x="10.25" y="10.25" width="4.5" height="4.5" /></bezel> + <bezel element="static_black"><bounds x="10.85" y="9.5" width="0.35" height="3" /></bezel> + <bezel element="static_black"><bounds x="12.25" y="9.5" width="0.5" height="3" /></bezel> + <bezel element="static_black"><bounds x="13.8" y="9.5" width="0.35" height="3" /></bezel> + <bezel element="static_white"><bounds x="10.1" y="12.25" width="4.8" height="0.25" /></bezel> + + <bezel element="disk_white"><bounds x="10" y="19.25" width="5" height="5" /></bezel> + <bezel element="disk_black"><bounds x="10.25" y="19.5" width="4.5" height="4.5" /></bezel> + <bezel element="static_white"><bounds x="3.3" y="21.65" width="18.4" height="5" /></bezel> + <bezel element="static_black"><bounds x="0" y="21.9" width="25" height="5" /></bezel> + <bezel element="static_black"><bounds x="0" y="0" width="25" height="5.25" /></bezel> + + <bezel element="static_white"><bounds x="9" y="1" width="7" height="0.25" /></bezel> + <bezel element="disk_white"><bounds x="10.75" y="2" width="3.5" height="2" /></bezel> + <bezel element="disk_black"><bounds x="11" y="2.25" width="3" height="1.5" /></bezel> + + <bezel element="text_l1"><bounds x="4" y="22" width="10" height="1" /></bezel> + <bezel element="text_l2"><bounds x="11" y="22" width="10" height="1" /></bezel> + + <!-- leds --> + + <bezel name="digit5" element="digit"><bounds x="11" y="-2" width="1.5" height="2.25" /></bezel> + <bezel name="digit4" element="digit"><bounds x="12.5" y="-2" width="1.5" height="2.25" /></bezel> + + <bezel name="0.5" element="led"><bounds x="12" y="2.5" width="1" height="1" /></bezel> + + <bezel name="3.0" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> + <bezel name="3.1" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> + <bezel name="3.2" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> + <bezel name="3.3" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> + <bezel name="3.4" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> + + <bezel name="2.0" element="led"><bounds x="4" y="10.75" width="1" height="1" /></bezel> + <bezel name="2.1" element="led"><bounds x="8" y="10.75" width="1" height="1" /></bezel> + <bezel name="2.2" element="led"><bounds x="12" y="10.75" width="1" height="1" /></bezel> + <bezel name="2.3" element="led"><bounds x="16" y="10.75" width="1" height="1" /></bezel> + <bezel name="2.4" element="led"><bounds x="20" y="10.75" width="1" height="1" /></bezel> + + <bezel name="1.0" element="led"><bounds x="4" y="15.5" width="1" height="1" /></bezel> + <bezel name="1.1" element="led"><bounds x="8" y="15.5" width="1" height="1" /></bezel> + <bezel name="1.2" element="led"><bounds x="12" y="15.5" width="1" height="1" /></bezel> + <bezel name="1.3" element="led"><bounds x="16" y="15.5" width="1" height="1" /></bezel> + <bezel name="1.4" element="led"><bounds x="20" y="15.5" width="1" height="1" /></bezel> + + <bezel name="0.0" element="led"><bounds x="4" y="20.25" width="1" height="1" /></bezel> + <bezel name="0.1" element="led"><bounds x="8" y="20.25" width="1" height="1" /></bezel> + <bezel name="0.2" element="led"><bounds x="12" y="20.25" width="1" height="1" /></bezel> + <bezel name="0.3" element="led"><bounds x="16" y="20.25" width="1" height="1" /></bezel> + <bezel name="0.4" element="led"><bounds x="20" y="20.25" width="1" height="1" /></bezel> + + </view> +</mamelayout> diff --git a/src/mame/layout/touchme.lay b/src/mame/layout/touchme.lay index 36eb37760a1..00745eaa252 100644 --- a/src/mame/layout/touchme.lay +++ b/src/mame/layout/touchme.lay @@ -6,7 +6,6 @@ <element name="static_black"><rect><color red="0" green="0" blue="0" /></rect></element> <element name="static_blue"><rect><color red="0.2" green="0.25" blue="0.9" /></rect></element> <element name="static_yellow"><rect><color red="0.9" green="0.9" blue="0.2" /></rect></element> - <element name="static_yellow2"><rect><color red="0.8" green="0.6" blue="0.1" /></rect></element> <element name="static_red"><rect><color red="0.9" green="0.1" blue="0.15" /></rect></element> <element name="static_green"><rect><color red="0.2" green="0.9" blue="0.3" /></rect></element> <element name="static_orange1"><rect><color red="0.9" green="0.4" blue="0.15" /></rect></element> @@ -54,14 +53,13 @@ <!-- build screen --> <view name="Internal Layout"> - <bounds left="1.41" right="10.89" top="4.7" bottom="19.3" /> + <bounds left="1.41" right="10.89" top="5" bottom="19.3" /> - <bezel name="digit0" element="digit"><bounds x="5.15" y="5.3" width="1" height="1.5" /></bezel> - <bezel name="digit1" element="digit"><bounds x="6.15" y="5.3" width="1" height="1.5" /></bezel> + <bezel name="digit0" element="digit"><bounds x="5.15" y="5.6" width="1" height="1.5" /></bezel> + <bezel name="digit1" element="digit"><bounds x="6.15" y="5.6" width="1" height="1.5" /></bezel> <!-- bezel (also allow clicking it) --> - <bezel element="static_yellow2"><bounds x="1.4" y="7.4" width="9.5" height="1" /></bezel> <bezel element="static_gray"><bounds x="1.4" y="7.7" width="9.5" height="12" /></bezel> <bezel element="static_black"><bounds x="1.7" y="9.7" width="8.9" height="8.9" /></bezel> diff --git a/src/mame/machine/nl_breakout.cpp b/src/mame/machine/nl_breakout.cpp index fd9d4a6387e..8fc703e105a 100644 --- a/src/mame/machine/nl_breakout.cpp +++ b/src/mame/machine/nl_breakout.cpp @@ -272,7 +272,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("H2", 7408) CHIP("H3", 7427) CHIP("H4", 7400) - CHIP("H5", 9312) + DM9312_DIP(H5) CHIP("H6", 9310) CHIP("H7", 7408) //sometimes looks like N7 on schematic //PARAM(H7.USE_DEACTIVATE, 0) @@ -282,7 +282,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("J1", 74175) CHIP("J2", 7404) CHIP("J3", 7402) - CHIP("J4", 9312) + DM9312_DIP(J4) CHIP("J5", 7448) #if USE_TRUTHTABLE_7448 PARAM(J5.USE_DEACTIVATE, 0) // only use this if compiled with 7448 as a truthtable @@ -296,7 +296,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("K2", 7486) CHIP("K3", 7430) CHIP("K4", 7408) - CHIP("K5", 9312) + DM9312_DIP(K5) CHIP("K6", 9310) CHIP("K7", 7486) CHIP("K8", 7474) //TODO: one more than bom? @@ -306,7 +306,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("L2", 7486) CHIP("L3", 82S16) //RAM CHIP("L4", 7411) - CHIP("L5", 9312) + DM9312_DIP(L5) CHIP("L6", 9310) CHIP("L7", 7486) CHIP("L8", 74193) @@ -316,7 +316,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("M2", 7483) CHIP("M3", 7486) CHIP("M4", 7410) - CHIP("M5", 9312) + DM9312_DIP(M5) CHIP("M6", 9310) CHIP("M8", 7427) CHIP("M9", 7404) @@ -325,7 +325,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("N2", 7483) CHIP("N3", 7486) CHIP("N4", 7411) - CHIP("N5", 9312) + DM9312_DIP(N5) CHIP("N6", 9310) CHIP("N7", 7408) //sometimes looks like H7 on schematic CHIP_9602_Mono(N8, &n8_desc) diff --git a/src/mame/machine/nl_stuntcyc.cpp b/src/mame/machine/nl_stuntcyc.cpp index 7ec790eafbd..ea69d9181d4 100644 --- a/src/mame/machine/nl_stuntcyc.cpp +++ b/src/mame/machine/nl_stuntcyc.cpp @@ -436,8 +436,8 @@ NETLIST_START(stuntcyc) TTL_9322(C7, 16H, S5, S1, S6, S2, GROUND, S4, GROUND, S3, GROUND) TTL_7448(C6, C7.Y1, C7.Y2, C7.Y4, C7.Y3, P, SCORE_WINDOW, 16H) - TTL_9312(B6, 2H, 4H, 8H, C6.f, GROUND, GROUND, C6.b, C6.e, GROUND, GROUND, C6.c, 8H) - TTL_9312(A6, 2V, 4V, 8V, C6.a, GROUND, GROUND, C6.g, GROUND, GROUND, GROUND, C6.d, 8H) + DM9312(B6, 2H, 4H, 8H, 8H, C6.f, GROUND, GROUND, C6.b, C6.e, GROUND, GROUND, C6.c) + DM9312(A6, 2V, 4V, 8V, 8H, C6.a, GROUND, GROUND, C6.g, GROUND, GROUND, GROUND, C6.d) TTL_7408_AND(B5_4, A6.YQ, B6.YQ) TTL_7474(A5_1, CLOCK, B5_4.Q, P, P) ALIAS(COMP_SCORE_Q, A5_1.Q) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index acd18e3718b..05efe1f0e03 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14322,6 +14322,7 @@ leboom // Lakeside maniac // Ideal melodym // GAF rockpin // Tiger Electronics +tbaskb // Tandy Radio Shack touchme // Atari ttfball // Toytronic ttfballa // Toytronic @@ -20087,10 +20088,11 @@ phrcrazeb // (c) 1986 Merit phrcrazec // (c) 1986 Merit phrcrazev // (c) 1986 Merit pitboss // (c) 1983 Merit -pitbossa // (c) 1983 Merit -pitbossa1 // (c) 1983 Merit -pitbossb // (c) 1983 Merit -pitbossc // (c) 1983 Merit +pitboss04 // (c) 1983 Merit +pitboss03 // (c) 1983 Merit +pitboss03a // (c) 1983 Merit +pitbossm4 // (c) 1983 Merit +pitbossps // (c) 1983 Merit riviera // (c) 1987 Merit rivieraa // (c) 1986 Merit rivierab // (c) 1986 Merit |