diff options
author | 2015-05-28 17:07:47 -0500 | |
---|---|---|
committer | 2015-05-28 17:07:47 -0500 | |
commit | ea2762e799e00a09155cd0d1d4a81162a8a1ab03 (patch) | |
tree | 5ecb3cfb04e49341e161c0a5db67ce5446b9febf | |
parent | 4332164659ec242c69d3d314a523917955fb9d1c (diff) | |
parent | 8f4d8bf37ee85ff47e4628f9a365abd6d83f9436 (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
345 files changed, 1622 insertions, 1639 deletions
diff --git a/docs/config.txt b/docs/config.txt index 1189c773508..68b591c5bdd 100644 --- a/docs/config.txt +++ b/docs/config.txt @@ -350,12 +350,16 @@ Configuration options - <mymame>.ini (i.e. if MAME was renamed mame060.exe, MAME parses mame060.ini here) - debug.ini (if the debugger is enabled) + - <driver>.ini (based on the source filename of the driver) + - vertical.ini (for games with vertical monitor orientation) + - horizont.ini (for games with horizontal monitor orientation) + - arcade.ini (for games in source added with GAME() macro) + - console.ini (for games in source added with CONS() macro) + - computer.ini (for games in source added with COMP() macro) + - othersys.ini (for games in source added with SYST() macro) + - vector.ini (for vector games only) - <parent>.ini (for clones only, may be called recursively) - <gamename>.ini - - vertical.ini (for games with vertical monitor orientation) - - horizont.ini (for games with horizontal monitor orientation) - - vector.ini (for vector games only) - - <driver>.ini (based on the source filename of the driver) The settings in the later ini's override those in the earlier ini's. @@ -376,6 +380,13 @@ Core search path options The default is 'roms' (that is, a directory "roms" in the same directory as the MAME executable). +-hashpath <path> + + Specifies a list of paths within which to find Software List HASH files. + Multiple paths can be specified by separating them with semicolons. + The default is 'hash' (that is, a directory "roms" in the same directory + as the MAME executable). + -samplepath / -sp <path> Specifies a list of paths within which to find sample files. Multiple @@ -449,16 +460,6 @@ Core Output Directory Options "nvram" in the same directory as the MAME executable). If this directory does not exist, it will be automatically created. --memcard_directory <path> - - Specifies a single directory where memory card files are stored. - Memory card files store the contents of removable memory cards for - games which used this type of hardware. This data is read and written - under control of the user via the "Memory Card" menu in the user - interface. The default is 'memcard' (that is, a directory "memcard" - in the same directory as the MAME executable). If this directory does - not exist, it will be automatically created. - -input_directory <path> Specifies a single directory where input recording files are stored. @@ -604,6 +605,12 @@ Core state/playback options <viewname> can also be 'auto', which selects the first view with all screens present. The default value is 'internal'. +-[no]snapbilinear + + Specify if the snapshot or movie should have bilinear filtering + applied. Shutting this off can make a difference in some performance + while recording video to a file. The default is ON (-snapbilinear). + -statename <name> Describes how MAME should store save state files, relative to the @@ -1087,12 +1094,6 @@ Core input automatic enable options Debugging options ----------------- --[no]log - - Creates a file called error.log which contains all of the internal - log messages generated by the MAME core and game drivers. The default - is OFF (-nolog). - -[no]verbose / -[no]v Displays internal diagnostic information. This information is very @@ -1100,12 +1101,16 @@ Debugging options reporting bugs, please run with mame -verbose and include the resulting information. The default is OFF (-noverbose). --[no]update_in_pause +-[no]oslog - Enables updating of the main screen bitmap while the game is paused. - This means that the VIDEO_UPDATE callback will be called repeatedly - during pause, which can be useful for debugging. The default is OFF - (-noupdate_in_pause). + Output error.log data to the system debugger. The default is OFF + (-nooslog). + +-[no]log + + Creates a file called error.log which contains all of the internal + log messages generated by the MAME core and game drivers. The default + is OFF (-nolog). -[no]debug @@ -1118,16 +1123,36 @@ Debugging options Specifies a file that contains a list of debugger commands to execute immediately upon startup. The default is NULL (no commands). --debug_internal +-[no]update_in_pause - A special 'internal' debugger for debugging. Activated when used along - with -debug. The default if OFF (-nodebug_internal). + Enables updating of the main screen bitmap while the game is paused. + This means that the VIDEO_UPDATE callback will be called repeatedly + during pause, which can be useful for debugging. The default is OFF + (-noupdate_in_pause). Core misc options ----------------- +-[no]drc + Enable DRC cpu core if available. The default is ON (-drc). + +-drc_use_c + + Force DRC use the C code backend. The default is OFF + (-nodrc_use_c). + +-drc_log_uml + + Write DRC UML disassembly log. The default is OFF + (-nodrc_log_uml). + +-drc_log_native + + write DRC native disassembly log. The default is OFF + (-nodrc_log_native). + -bios <biosname> Specifies the specific BIOS to use with the current game, for game @@ -358,11 +358,7 @@ endif # specify a default optimization level if none explicitly stated ifndef OPTIMIZE -ifndef SYMBOLS OPTIMIZE = 3 -else -OPTIMIZE = 0 -endif endif # set the symbols level @@ -741,6 +737,9 @@ vs2013_xp: generate vs2013_clang: generate $(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-clang vs2013 +vs2013_winrt: generate + $(SILENT) $(GENIE) $(PARAMS) --vs=winstore81 vs2013 + vs2015: generate $(SILENT) $(GENIE) $(PARAMS) vs2015 diff --git a/nl_examples/todo.c b/nl_examples/todo.c index 9da1a2c66f6..1c9815864ed 100644 --- a/nl_examples/todo.c +++ b/nl_examples/todo.c @@ -3,6 +3,43 @@ * */ +#include "netlist/devices/net_lib.h" + +NETLIST_START(7400_TTL) + NET_REGISTER_DEV(7400, s1) + NET_REGISTER_DEV(7400, s2) + NET_REGISTER_DEV(7400, s3) + NET_REGISTER_DEV(7400, s4) + + ALIAS(1, s1.A); + ALIAS(2, s1.B); + ALIAS(3, s1.Q); + + ALIAS(4, s2.A); + ALIAS(5, s2.B); + ALIAS(6, s2.Q); + + ALIAS(9, s3.A); + ALIAS(10, s3.B) + ALIAS(8, s3.Q); + + ALIAS(12, s4.A); + ALIAS(13, s4.B); + ALIAS(11, s4.Q); + +NETLIST_END() + +NETLIST_START(lib) + TRUTHTABLE_START(7400A, 2, 1, 0, "+A,B") + TT_HEAD(" A , B | Q ") + TT_LINE(" 0 , X | 1 |22") + TT_LINE(" X , 0 | 1 |22") + TT_LINE(" 1 , 1 | 0 |15") + TRUTHTABLE_END() +NETLIST_END() + + + #if 0 RES(R1, 10) RES(R2, 10) @@ -98,4 +135,4 @@ LOG(logY, 4V) #endif -d + diff --git a/scripts/genie.lua b/scripts/genie.lua index 7a0f2128fe5..b6ccf16583b 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1112,6 +1112,21 @@ configuration { "x64", "vs*" } MAME_DIR .. "3rdparty/dxsdk/lib/x64", } +configuration { "winphone8* or winstore8*" } + removelinks { + "DelayImp", + "gdi32", + "psapi" + } + links { + "d3d11", + "dxgi" + } + linkoptions { + "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata + } + + configuration { } diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index e744db9b79b..ebca9fed0ef 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -623,8 +623,18 @@ project "portaudio" "-Wno-maybe-uninitialized", "-Wno-unused-value", "-Wno-unused-function", + "-Wno-unknown-pragmas", + "-Wno-sometimes-uninitialized", } + local version = str_to_version(_OPTIONS["gcc_version"]) + if (_OPTIONS["gcc"]~=nil) and string.find(_OPTIONS["gcc"], "clang") then + buildoptions_c { + "-Wno-unknown-warning-option", + "-Wno-absolute-value", + } + end + configuration { "vs*" } buildoptions { "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer @@ -656,21 +666,16 @@ project "portaudio" "PA_USE_DS=1", "PA_USE_WDMKS=1", "PA_USE_WMME=1", - "PA_USE_WASAPI=1", } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/win", } - configuration { "mingw*" } - includedirs { - MAME_DIR .. "3rdparty/portaudio/src/hostapi/wasapi/mingw-include", - } + configuration { } files { MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_util.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_waveformat.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_hostapis.c", - MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_x86_plain_converters.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_wdmks_utils.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_coinitialize.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/dsound/pa_win_ds.c", @@ -678,7 +683,6 @@ project "portaudio" MAME_DIR .. "3rdparty/portaudio/src/hostapi/wdmks/pa_win_wdmks.c", MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/wmme/pa_win_wmme.c", - MAME_DIR .. "3rdparty/portaudio/src/hostapi/wasapi/pa_win_wasapi.c", } end diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index 54540f0f630..ef809dd5b46 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -391,8 +391,6 @@ project "formats" MAME_DIR .. "src/lib/formats/x1_tap.h", MAME_DIR .. "src/lib/formats/xdf_dsk.c", MAME_DIR .. "src/lib/formats/xdf_dsk.h", - MAME_DIR .. "src/lib/formats/z80ne_dsk.c", - MAME_DIR .. "src/lib/formats/z80ne_dsk.h", MAME_DIR .. "src/lib/formats/zx81_p.c", MAME_DIR .. "src/lib/formats/zx81_p.h", MAME_DIR .. "src/lib/formats/hxcmfm_dsk.c", diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index d1f9c97a74b..9d61b0d4892 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -15,16 +15,17 @@ files { MAME_DIR .. "src/emu/netlist/nl_setup.h", MAME_DIR .. "src/emu/netlist/nl_factory.c", MAME_DIR .. "src/emu/netlist/nl_factory.h", - MAME_DIR .. "src/emu/netlist/pconfig.h", - MAME_DIR .. "src/emu/netlist/palloc.c", - MAME_DIR .. "src/emu/netlist/palloc.h", - MAME_DIR .. "src/emu/netlist/plists.h", - MAME_DIR .. "src/emu/netlist/pparser.c", - MAME_DIR .. "src/emu/netlist/pparser.h", - MAME_DIR .. "src/emu/netlist/pstate.c", - MAME_DIR .. "src/emu/netlist/pstate.h", - MAME_DIR .. "src/emu/netlist/pstring.c", - MAME_DIR .. "src/emu/netlist/pstring.h", + MAME_DIR .. "src/emu/netlist/plib/pconfig.h", + MAME_DIR .. "src/emu/netlist/plib/palloc.c", + MAME_DIR .. "src/emu/netlist/plib/palloc.h", + MAME_DIR .. "src/emu/netlist/plib/plists.h", + MAME_DIR .. "src/emu/netlist/plib/poptions.h", + MAME_DIR .. "src/emu/netlist/plib/pparser.c", + MAME_DIR .. "src/emu/netlist/plib/pparser.h", + MAME_DIR .. "src/emu/netlist/plib/pstate.c", + MAME_DIR .. "src/emu/netlist/plib/pstate.h", + MAME_DIR .. "src/emu/netlist/plib/pstring.c", + MAME_DIR .. "src/emu/netlist/plib/pstring.h", MAME_DIR .. "src/emu/netlist/analog/nld_bjt.c", MAME_DIR .. "src/emu/netlist/analog/nld_bjt.h", MAME_DIR .. "src/emu/netlist/analog/nld_fourterm.c", diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index 0c1cbc3075e..936afb54346 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -448,7 +448,7 @@ links { includedirs { MAME_DIR .. "src/osd", MAME_DIR .. "src/lib/util", - MAME_DIR .. "src/emu", + MAME_DIR .. "src/emu/netlist", } files { diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 86998b83813..91d1f29884e 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -46,6 +46,8 @@ newoption { { "vs2013-xp", "Visual Studio 2013 targeting XP" }, { "winphone8", "Windows Phone 8.0" }, { "winphone81", "Windows Phone 8.1" }, + { "winstore81", "Windows Store 8.1" }, + { "winstore82", "Universal Windows App" } }, } @@ -317,6 +319,20 @@ function toolchain(_buildDir, _subDir) location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winphone81") end + if "winstore81" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v120" + premake.vstudio.storeapp = "8.1" + platforms { "ARM" } + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winstore81") + end + + if "winstore82" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v140" + premake.vstudio.storeapp = "8.2" + platforms { "ARM" } + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winstore82") + end + if "intel-14" == _OPTIONS["vs"] then premake.vstudio.toolset = "Intel C++ Compiler XE 14.0" location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-intel") @@ -407,12 +423,19 @@ function toolchain(_buildDir, _subDir) configuration { "x64", "vs*-clang", "Debug" } targetdir (_buildDir .. _ACTION .. "-clang/bin/x64/Debug") - + configuration { "vs*-clang" } buildoptions { "-Qunused-arguments", } + configuration { "winphone8* or winstore8*" } + removeflags { + "StaticRuntime", + "NoExceptions", + "EnableMinimalRebuild", + } + configuration { "mingw*" } defines { "WIN32" } diff --git a/src/emu/bus/megadrive/svp.c b/src/emu/bus/megadrive/svp.c index 51921dbe5ac..324c5302a33 100644 --- a/src/emu/bus/megadrive/svp.c +++ b/src/emu/bus/megadrive/svp.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Fabio Priuli,Pierpaolo Prazzoli,Grazvydas Ignotas /****************************************** SVP related *****************************************/ diff --git a/src/emu/bus/megadrive/svp.h b/src/emu/bus/megadrive/svp.h index dbacd98b1ba..0f128240a86 100644 --- a/src/emu/bus/megadrive/svp.h +++ b/src/emu/bus/megadrive/svp.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Fabio Priuli,Pierpaolo Prazzoli,Grazvydas Ignotas #ifndef __MD_SVP_H #define __MD_SVP_H diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index 1b196f0fa4d..3b377dfa64f 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -1010,8 +1010,7 @@ inline bool mips3_device::RBYTE(offs_t address, UINT32 *result) { continue; } - UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start; - *result = fastbase[tlbaddress ^ m_byte_xor]; + *result = m_fastram[ramnum].offset_base8[tlbaddress ^ m_byte_xor]; return true; } *result = (*m_memory.read_byte)(*m_program, tlbaddress); @@ -1044,8 +1043,7 @@ inline bool mips3_device::RHALF(offs_t address, UINT32 *result) { continue; } - UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start; - *result = ((UINT16*)fastbase)[(tlbaddress ^ m_word_xor) >> 1]; + *result = m_fastram[ramnum].offset_base16[(tlbaddress ^ m_word_xor) >> 1]; return true; } *result = (*m_memory.read_word)(*m_program, tlbaddress); @@ -1078,8 +1076,7 @@ inline bool mips3_device::RWORD(offs_t address, UINT32 *result) { continue; } - UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start; - *result = ((UINT32*)fastbase)[tlbaddress >> 2]; + *result = m_fastram[ramnum].offset_base32[tlbaddress >> 2]; return true; } *result = (*m_memory.read_dword)(*m_program, tlbaddress); @@ -1181,8 +1178,7 @@ inline void mips3_device::WBYTE(offs_t address, UINT8 data) { continue; } - UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start; - fastbase[tlbaddress ^ m_byte_xor] = data; + m_fastram[ramnum].offset_base8[tlbaddress ^ m_byte_xor] = data; return; } (*m_memory.write_byte)(*m_program, tlbaddress, data); @@ -1216,8 +1212,7 @@ inline void mips3_device::WHALF(offs_t address, UINT16 data) { continue; } - void *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start; - ((UINT16*)fastbase)[(tlbaddress ^ m_word_xor) >> 1] = data; + m_fastram[ramnum].offset_base16[(tlbaddress ^ m_word_xor) >> 1] = data; return; } (*m_memory.write_word)(*m_program, tlbaddress, data); @@ -1251,8 +1246,7 @@ inline void mips3_device::WWORD(offs_t address, UINT32 data) { continue; } - void *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start; - ((UINT32*)fastbase)[tlbaddress >> 2] = data; + m_fastram[ramnum].offset_base32[tlbaddress >> 2] = data; return; } (*m_memory.write_dword)(*m_program, tlbaddress, data); diff --git a/src/emu/cpu/mips/mips3.h b/src/emu/cpu/mips/mips3.h index f0b860619ff..2cbdf93c28f 100644 --- a/src/emu/cpu/mips/mips3.h +++ b/src/emu/cpu/mips/mips3.h @@ -416,6 +416,9 @@ private: offs_t end; /* end of the RAM block */ UINT8 readonly; /* TRUE if read-only */ void * base; /* base in memory where the RAM lives */ + UINT8 * offset_base8; /* base in memory where the RAM lives, 8-bit pointer, with the start offset pre-applied */ + UINT16 * offset_base16; /* base in memory where the RAM lives, 16-bit pointer, with the start offset pre-applied */ + UINT32 * offset_base32; /* base in memory where the RAM lives, 32-bit pointer, with the start offset pre-applied */ } m_fastram[MIPS3_MAX_FASTRAM]; UINT64 m_debugger_temp; diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c index 3e73d96f206..70c31df2220 100644 --- a/src/emu/cpu/mips/mips3drc.c +++ b/src/emu/cpu/mips/mips3drc.c @@ -182,6 +182,9 @@ void mips3_device::add_fastram(offs_t start, offs_t end, UINT8 readonly, void *b m_fastram[m_fastram_select].end = end; m_fastram[m_fastram_select].readonly = readonly; m_fastram[m_fastram_select].base = base; + m_fastram[m_fastram_select].offset_base8 = (UINT8*)base - start; + m_fastram[m_fastram_select].offset_base16 = (UINT16*)((UINT8*)base - start); + m_fastram[m_fastram_select].offset_base32 = (UINT32*)((UINT8*)base - start); m_fastram_select++; } } diff --git a/src/emu/cpu/ssp1601/ssp1601.c b/src/emu/cpu/ssp1601/ssp1601.c index e9a5f39ac1c..94720fd7e73 100644 --- a/src/emu/cpu/ssp1601/ssp1601.c +++ b/src/emu/cpu/ssp1601/ssp1601.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Pierpaolo Prazzoli,Grazvydas Ignotas /* * Samsung SSP1601 DSP emulator diff --git a/src/emu/imagedev/harddriv.c b/src/emu/imagedev/harddriv.c index bc39d53e4b3..3134506e61b 100644 --- a/src/emu/imagedev/harddriv.c +++ b/src/emu/imagedev/harddriv.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, Miodrag Milanovic /********************************************************************* diff --git a/src/emu/imagedev/harddriv.h b/src/emu/imagedev/harddriv.h index f72dc0553f1..c80044478b2 100644 --- a/src/emu/imagedev/harddriv.h +++ b/src/emu/imagedev/harddriv.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, Miodrag Milanovic /********************************************************************* diff --git a/src/emu/machine/at29040a.c b/src/emu/machine/at29040a.c index 3285b265792..31be262b7c1 100644 --- a/src/emu/machine/at29040a.c +++ b/src/emu/machine/at29040a.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, Michael Zapf /* Atmel at29c040a flash EEPROM diff --git a/src/emu/machine/at29040a.h b/src/emu/machine/at29040a.h index 1af258fb719..0dc6473edff 100644 --- a/src/emu/machine/at29040a.h +++ b/src/emu/machine/at29040a.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, Michael Zapf /* ATMEL 29040a diff --git a/src/emu/machine/rtc65271.c b/src/emu/machine/rtc65271.c index 074b8d87f48..0e5b8802754 100644 --- a/src/emu/machine/rtc65271.c +++ b/src/emu/machine/rtc65271.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, R. Belmont /* rtc65271 emulation diff --git a/src/emu/machine/rtc65271.h b/src/emu/machine/rtc65271.h index b81e92755d5..326ccf7d116 100644 --- a/src/emu/machine/rtc65271.h +++ b/src/emu/machine/rtc65271.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, R. Belmont /* rtc65271.h: include file for rtc65271.c diff --git a/src/emu/machine/smc92x4.c b/src/emu/machine/smc92x4.c index 9154648b00d..6a87f8b4bf6 100644 --- a/src/emu/machine/smc92x4.c +++ b/src/emu/machine/smc92x4.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, Michael Zapf /* HDC9224 and HDC9234 Hard and Floppy Disk Controller diff --git a/src/emu/machine/smc92x4.h b/src/emu/machine/smc92x4.h index d8b4720c87a..9cc80b815ea 100644 --- a/src/emu/machine/smc92x4.h +++ b/src/emu/machine/smc92x4.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, Michael Zapf /* Interface */ diff --git a/src/emu/machine/spchrom.c b/src/emu/machine/spchrom.c index a49590e9e00..ae906840f43 100644 --- a/src/emu/machine/spchrom.c +++ b/src/emu/machine/spchrom.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Aaron Giles, Jonathan Gevaryahu, Raphael Nabet, Couriersud, Michael Zapf /* spchroms.c - This is an emulator for "typical" speech ROMs from TI, as used by TI99/4(a). diff --git a/src/emu/machine/spchrom.h b/src/emu/machine/spchrom.h index 520c7fc967b..e45ba8092e5 100644 --- a/src/emu/machine/spchrom.h +++ b/src/emu/machine/spchrom.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Aaron Giles, Jonathan Gevaryahu, Raphael Nabet, Couriersud, Michael Zapf /* * Voice Synthesis Memory diff --git a/src/emu/machine/strata.c b/src/emu/machine/strata.c index 01651eb90bd..26da2fb3f72 100644 --- a/src/emu/machine/strata.c +++ b/src/emu/machine/strata.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, Michael Zapf /* Intel 28F640J5 Flash ROM emulation (could also handle 28F320J5 with minor diff --git a/src/emu/machine/strata.h b/src/emu/machine/strata.h index c037a24396b..f68a30e5fef 100644 --- a/src/emu/machine/strata.h +++ b/src/emu/machine/strata.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Raphael Nabet, Michael Zapf /* strata.h: header file for strata.c diff --git a/src/emu/machine/wd_fdc.c b/src/emu/machine/wd_fdc.c index 73d4a540980..687469e384b 100644 --- a/src/emu/machine/wd_fdc.c +++ b/src/emu/machine/wd_fdc.c @@ -233,7 +233,7 @@ void wd_fdc_t::seek_start(int state) { if (TRACE_COMMAND) logerror("%s: seek %d (track=%d)\n", tag(), data, track); main_state = state; - status = (status & ~(S_CRC|S_RNF|S_SPIN)) | S_BUSY; + status &= ~(S_CRC|S_RNF|S_SPIN); if(head_control) { // TODO get value from HLT callback if(command & 8) @@ -420,7 +420,7 @@ void wd_fdc_t::read_sector_start() } main_state = READ_SECTOR; - status = (status & ~(S_CRC|S_LOST|S_RNF|S_WP|S_DDM)) | S_BUSY; + status &= ~(S_CRC|S_LOST|S_RNF|S_WP|S_DDM); drop_drq(); if(side_control && floppy) floppy->ss_w((command & 0x02) ? 1 : 0); @@ -521,7 +521,7 @@ void wd_fdc_t::read_track_start() } main_state = READ_TRACK; - status = (status & ~(S_LOST|S_RNF)) | S_BUSY; + status &= ~(S_LOST|S_RNF); drop_drq(); if(side_control && floppy) floppy->ss_w((command & 0x02) ? 1 : 0); @@ -599,7 +599,7 @@ void wd_fdc_t::read_id_start() } main_state = READ_ID; - status = (status & ~(S_WP|S_DDM|S_LOST|S_RNF)) | S_BUSY; + status &= ~(S_WP|S_DDM|S_LOST|S_RNF); drop_drq(); if(side_control && floppy) floppy->ss_w((command & 0x02) ? 1 : 0); @@ -675,7 +675,7 @@ void wd_fdc_t::write_track_start() } main_state = WRITE_TRACK; - status = (status & ~(S_WP|S_DDM|S_LOST|S_RNF)) | S_BUSY; + status &= ~(S_WP|S_DDM|S_LOST|S_RNF); drop_drq(); if(side_control && floppy) floppy->ss_w((command & 0x02) ? 1 : 0); @@ -785,7 +785,7 @@ void wd_fdc_t::write_sector_start() } main_state = WRITE_SECTOR; - status = (status & ~(S_CRC|S_LOST|S_RNF|S_WP|S_DDM)) | S_BUSY; + status &= ~(S_CRC|S_LOST|S_RNF|S_WP|S_DDM); drop_drq(); if(side_control && floppy) floppy->ss_w((command & 0x02) ? 1 : 0); @@ -1041,7 +1041,17 @@ void wd_fdc_t::cmd_w(UINT8 val) cmd_buffer = val; - delay_cycles(t_cmd, dden ? delay_command_commit*2 : delay_command_commit); + if ((val & 0xf0) == 0xd0) + { + // force interrupt is executed instantly (?) + delay_cycles(t_cmd, 0); + } + else + { + // set busy, then set a timer to process the command + status |= S_BUSY; + delay_cycles(t_cmd, dden ? delay_command_commit*2 : delay_command_commit); + } } UINT8 wd_fdc_t::status_r() @@ -1649,6 +1659,10 @@ void wd_fdc_t::live_run(attotime limit) cur_live.shift_reg == 0xf56b ? 0x9fc6 : cur_live.shift_reg == 0xf56e ? 0xafa5 : 0xbf84; + + if((cur_live.data_reg & 0xfe) == 0xf8) + status |= S_DDM; + cur_live.data_separator_phase = false; cur_live.bit_counter = 0; cur_live.state = READ_SECTOR_DATA; diff --git a/src/emu/netlist/analog/nld_ms_direct.h b/src/emu/netlist/analog/nld_ms_direct.h index 08894933000..b5021e1c9f6 100644 --- a/src/emu/netlist/analog/nld_ms_direct.h +++ b/src/emu/netlist/analog/nld_ms_direct.h @@ -10,7 +10,7 @@ #include "nld_solver.h" -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> class netlist_matrix_solver_direct_t: public netlist_matrix_solver_t { public: @@ -23,7 +23,7 @@ public: /* ATTR_COLD */ virtual void vsetup(netlist_analog_net_t::list_t &nets); /* ATTR_COLD */ virtual void reset() { netlist_matrix_solver_t::reset(); } - ATTR_HOT inline int N() const { return (m_N == 0 ? m_dim : m_N); } + ATTR_HOT inline unsigned N() const { if (m_N == 0) return m_dim; else return m_N; } ATTR_HOT inline int vsolve_non_dynamic(const bool newton_raphson); @@ -56,7 +56,7 @@ protected: private: - const int m_dim; + const unsigned m_dim; nl_double m_lp_fact; }; @@ -64,10 +64,10 @@ private: // netlist_matrix_solver_direct // ---------------------------------------------------------------------------------------- -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> netlist_matrix_solver_direct_t<m_N, _storage_N>::~netlist_matrix_solver_direct_t() { - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { pfree(m_terms[k]); } @@ -75,7 +75,7 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::~netlist_matrix_solver_direct_t pfree_array(m_rails_temp); } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::compute_next_timestep() { nl_double new_solver_timestep = m_params.m_max_timestep; @@ -86,7 +86,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::compute_next * FIXME: We should extend the logic to use either all nets or * only output nets. */ - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { netlist_analog_net_t *n = m_nets[k]; @@ -114,7 +114,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::compute_next return new_solver_timestep; } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::add_term(int k, netlist_terminal_t *term) { if (term->m_otherterm->net().isRailNet()) @@ -139,13 +139,13 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::add_term(int k, } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_analog_net_t::list_t &nets) { if (m_dim < nets.size()) netlist().error("Dimension %d less than %" SIZETFMT, m_dim, nets.size()); - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { m_terms[k]->clear(); m_rails_temp[k].clear(); @@ -153,10 +153,10 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_a netlist_matrix_solver_t::setup(nets); - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { m_terms[k]->m_railstart = m_terms[k]->count(); - for (int i = 0; i < m_rails_temp[k].count(); i++) + for (unsigned i = 0; i < m_rails_temp[k].count(); i++) this->m_terms[k]->add(m_rails_temp[k].terms()[i], m_rails_temp[k].net_other()[i]); m_rails_temp[k].clear(); // no longer needed @@ -187,8 +187,8 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_a int sort_order = (type() == GAUSS_SEIDEL ? 1 : -1); - for (int k = 0; k < N() / 2; k++) - for (int i = 0; i < N() - 1; i++) + for (unsigned k = 0; k < N() / 2; k++) + for (unsigned i = 0; i < N() - 1; i++) { if ((m_terms[i]->m_railstart - m_terms[i+1]->m_railstart) * sort_order < 0) { @@ -197,10 +197,10 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_a } } - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { int *other = m_terms[k]->net_other(); - for (int i = 0; i < m_terms[k]->count(); i++) + for (unsigned i = 0; i < m_terms[k]->count(); i++) if (other[i] != -1) other[i] = get_net_idx(&m_terms[k]->terms()[i]->m_otherterm->net()); } @@ -209,35 +209,35 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_a } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::build_LE_A() { - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { - for (int i=0; i < N(); i++) + for (unsigned i=0; i < N(); i++) m_A[k][i] = 0.0; nl_double akk = 0.0; - const int terms_count = m_terms[k]->count(); - const int railstart = m_terms[k]->m_railstart; + const unsigned terms_count = m_terms[k]->count(); + const unsigned railstart = m_terms[k]->m_railstart; const nl_double * RESTRICT gt = m_terms[k]->gt(); const nl_double * RESTRICT go = m_terms[k]->go(); const int * RESTRICT net_other = m_terms[k]->net_other(); - for (int i = 0; i < terms_count; i++) + for (unsigned i = 0; i < terms_count; i++) akk = akk + gt[i]; m_A[k][k] += akk; - for (int i = 0; i < railstart; i++) + for (unsigned i = 0; i < railstart; i++) m_A[k][net_other[i]] += -go[i]; } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::build_LE_RHS() { - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { nl_double rhsk_a = 0.0; nl_double rhsk_b = 0.0; @@ -258,7 +258,7 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::build_LE_RHS() } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() { #if 0 @@ -271,15 +271,15 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() printf("\n"); #endif - const int kN = N(); + const unsigned kN = N(); - for (int i = 0; i < kN; i++) { + for (unsigned i = 0; i < kN; i++) { // FIXME: use a parameter to enable pivoting? if (USE_PIVOT_SEARCH) { /* Find the row with the largest first value */ - int maxrow = i; - for (int j = i + 1; j < kN; j++) + unsigned maxrow = i; + for (unsigned j = i + 1; j < kN; j++) { if (nl_math::abs(m_A[j][i]) > nl_math::abs(m_A[maxrow][i])) maxrow = j; @@ -288,7 +288,7 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() if (maxrow != i) { /* Swap the maxrow and ith row */ - for (int k = i; k < kN; k++) { + for (unsigned k = i; k < kN; k++) { std::swap(m_A[i][k], m_A[maxrow][k]); } std::swap(m_RHS[i], m_RHS[maxrow]); @@ -300,12 +300,12 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() /* Eliminate column i from row j */ - for (int j = i + 1; j < kN; j++) + for (unsigned j = i + 1; j < kN; j++) { const nl_double f1 = - m_A[j][i] * f; if (f1 != NL_FCONST(0.0)) { - for (int k = i + 1; k < kN; k++) + for (unsigned k = i + 1; k < kN; k++) m_A[j][k] += m_A[i][k] * f1; m_RHS[j] += m_RHS[i] * f1; } @@ -313,18 +313,18 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_back_subst( nl_double * RESTRICT x) { - const int kN = N(); + const unsigned kN = N(); /* back substitution */ for (int j = kN - 1; j >= 0; j--) { nl_double tmp = 0; - for (int k = j + 1; k < kN; k++) + for (unsigned k = j + 1; k < kN; k++) tmp += m_A[j][k] * x[k]; x[j] = (m_RHS[j] - tmp) / m_A[j][j]; @@ -342,13 +342,13 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_back_subst( } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::delta( const nl_double * RESTRICT V) { nl_double cerr = 0; nl_double cerr2 = 0; - for (int i = 0; i < this->N(); i++) + for (unsigned i = 0; i < this->N(); i++) { const nl_double e = nl_math::abs(V[i] - this->m_nets[i]->m_cur_Analog); const nl_double e2 = nl_math::abs(m_RHS[i] - this->m_last_RHS[i]); @@ -359,24 +359,24 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::delta( return cerr + cerr2*NL_FCONST(100000.0); } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::store( const nl_double * RESTRICT V, const bool store_RHS) { - for (int i = 0; i < this->N(); i++) + for (unsigned i = 0; i < this->N(); i++) { this->m_nets[i]->m_cur_Analog = V[i]; } if (store_RHS) { - for (int i = 0; i < this->N(); i++) + for (unsigned i = 0; i < this->N(); i++) { this->m_last_RHS[i] = m_RHS[i]; } } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve() { solve_base<netlist_matrix_solver_direct_t>(this); @@ -384,7 +384,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve() } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson) { nl_double new_v[_storage_N]; // = { 0.0 }; @@ -406,7 +406,7 @@ ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic( } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT inline int netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson) { this->build_LE_A(); @@ -416,7 +416,7 @@ ATTR_HOT inline int netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_ return this->solve_non_dynamic(newton_raphson); } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t(const netlist_solver_parameters_t ¶ms, const int size) : netlist_matrix_solver_t(GAUSSIAN_ELIMINATION, params) , m_dim(size) @@ -425,7 +425,7 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t( m_terms = palloc_array(terms_t *, N()); m_rails_temp = palloc_array(terms_t, N()); - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { m_terms[k] = palloc(terms_t); m_last_RHS[k] = 0.0; @@ -433,7 +433,7 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t( } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t ¶ms, const int size) : netlist_matrix_solver_t(type, params) , m_dim(size) @@ -442,7 +442,7 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t( m_terms = palloc_array(terms_t *, N()); m_rails_temp = palloc_array(terms_t, N()); - for (int k = 0; k < N(); k++) + for (unsigned k = 0; k < N(); k++) { m_terms[k] = palloc(terms_t); m_last_RHS[k] = 0.0; diff --git a/src/emu/netlist/analog/nld_ms_sor.h b/src/emu/netlist/analog/nld_ms_sor.h index 11ee4273d62..25799dbb1e6 100644 --- a/src/emu/netlist/analog/nld_ms_sor.h +++ b/src/emu/netlist/analog/nld_ms_sor.h @@ -15,7 +15,7 @@ #include "nld_solver.h" #include "nld_ms_direct.h" -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> class netlist_matrix_solver_SOR_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> { public: @@ -46,7 +46,7 @@ private: // netlist_matrix_solver - Gauss - Seidel // ---------------------------------------------------------------------------------------- -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> void netlist_matrix_solver_SOR_t<m_N, _storage_N>::log_stats() { if (this->m_stat_calculations != 0 && this->m_params.m_log_stats) @@ -66,14 +66,14 @@ void netlist_matrix_solver_SOR_t<m_N, _storage_N>::log_stats() } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT nl_double netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve() { this->solve_base(this); return this->compute_next_timestep(); } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT inline int netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson) { const int iN = this->N(); diff --git a/src/emu/netlist/analog/nld_ms_sor_mat.h b/src/emu/netlist/analog/nld_ms_sor_mat.h index 184df6313ff..9c5a29382f1 100644 --- a/src/emu/netlist/analog/nld_ms_sor_mat.h +++ b/src/emu/netlist/analog/nld_ms_sor_mat.h @@ -15,7 +15,7 @@ #include "nld_solver.h" #include "nld_ms_direct.h" -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> class netlist_matrix_solver_SOR_mat_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> { public: @@ -57,7 +57,7 @@ private: // netlist_matrix_solver - Gauss - Seidel // ---------------------------------------------------------------------------------------- -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> void netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::log_stats() { if (this->m_stat_calculations != 0 && m_log_stats) @@ -77,7 +77,7 @@ void netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::log_stats() } } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT nl_double netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve() { /* @@ -85,13 +85,13 @@ ATTR_HOT nl_double netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve() */ if (USE_LINEAR_PREDICTION) - for (int k = 0; k < this->N(); k++) + for (unsigned k = 0; k < this->N(); k++) { this->m_last_V[k] = this->m_nets[k]->m_cur_Analog; this->m_nets[k]->m_cur_Analog = this->m_nets[k]->m_cur_Analog + this->m_Vdelta[k] * this->current_timestep() * m_lp_fact; } else - for (int k = 0; k < this->N(); k++) + for (unsigned k = 0; k < this->N(); k++) { this->m_last_V[k] = this->m_nets[k]->m_cur_Analog; } @@ -103,7 +103,7 @@ ATTR_HOT nl_double netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve() nl_double sq = 0; nl_double sqo = 0; const nl_double rez_cts = 1.0 / this->current_timestep(); - for (int k = 0; k < this->N(); k++) + for (unsigned k = 0; k < this->N(); k++) { const netlist_analog_net_t *n = this->m_nets[k]; const nl_double nv = (n->m_cur_Analog - this->m_last_V[k]) * rez_cts ; @@ -123,7 +123,7 @@ ATTR_HOT nl_double netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve() return this->compute_next_timestep(); } -template <int m_N, int _storage_N> +template <unsigned m_N, unsigned _storage_N> ATTR_HOT inline int netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson) { /* The matrix based code looks a lot nicer but actually is 30% slower than diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c index 703f6f35770..ebabf6e33d7 100644 --- a/src/emu/netlist/analog/nld_solver.c +++ b/src/emu/netlist/analog/nld_solver.c @@ -51,7 +51,7 @@ ATTR_COLD void terms_t::add(netlist_terminal_t *term, int net_other) ATTR_COLD void terms_t::set_pointers() { - for (int i = 0; i < count(); i++) + for (unsigned i = 0; i < count(); i++) { m_term[i]->m_gt1 = &m_gt[i]; m_term[i]->m_go1 = &m_go[i]; @@ -156,7 +156,7 @@ ATTR_COLD void netlist_matrix_solver_t::setup(netlist_analog_net_t::list_t &nets break; } } - NL_VERBOSE_OUT(("added net with %d populated connections\n", net->m_core_terms.size())); + //NL_VERBOSE_OUT(("added net with %" SIZETFMT " populated connections\n", net->m_core_terms.size())); } } diff --git a/src/emu/netlist/analog/nld_solver.h b/src/emu/netlist/analog/nld_solver.h index 874c8dc7e1d..7ab2f4a7733 100644 --- a/src/emu/netlist/analog/nld_solver.h +++ b/src/emu/netlist/analog/nld_solver.h @@ -65,7 +65,7 @@ class terms_t ATTR_COLD void add(netlist_terminal_t *term, int net_other); - ATTR_HOT inline int count() { return m_term.size(); } + ATTR_HOT inline unsigned count() { return m_term.size(); } ATTR_HOT inline netlist_terminal_t **terms() { return m_term.data(); } ATTR_HOT inline int *net_other() { return m_net_other.data(); } @@ -76,7 +76,7 @@ class terms_t ATTR_COLD void set_pointers(); - int m_railstart; + unsigned m_railstart; private: plist_t<netlist_terminal_t *> m_term; diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index f17b638c6e1..f239beb1069 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -41,7 +41,7 @@ NETLIST_END() #define ENTRY1(_nic, _name, _defparam) factory.register_device<_nic>( # _name, xstr(_nic), _defparam ); #define ENTRY(_nic, _name, _defparam) ENTRY1(NETLIB_NAME(_nic), _name, _defparam) -void nl_initialize_factory(netlist_factory_t &factory) +void nl_initialize_factory(netlist_factory_list_t &factory) { ENTRY(R, RES, "R") ENTRY(POT, POT, "R") diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index c6ab75fe522..1ae4336f62e 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -67,6 +67,6 @@ NETLIST_EXTERNAL(diode_models); NETLIST_EXTERNAL(bjt_models); -void nl_initialize_factory(netlist_factory_t &factory); +void nl_initialize_factory(netlist_factory_list_t &factory); #endif diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c index f97a0e14147..b7a5cf6c71e 100644 --- a/src/emu/netlist/devices/nld_system.c +++ b/src/emu/netlist/devices/nld_system.c @@ -76,7 +76,7 @@ NETLIB_START(extclock) connect(m_feedback, m_Q); { netlist_time base = netlist_time::from_hz(m_freq.Value()*2); - nl_util::pstring_list pat = nl_util::split(m_pattern.Value(),","); + pstring_list_t pat(m_pattern.Value(),","); m_off = netlist_time::from_double(m_offset.Value()); int pati[256]; diff --git a/src/emu/netlist/devices/nld_truthtable.c b/src/emu/netlist/devices/nld_truthtable.c index 85fc56ac34b..03acc31d4f4 100644 --- a/src/emu/netlist/devices/nld_truthtable.c +++ b/src/emu/netlist/devices/nld_truthtable.c @@ -6,7 +6,7 @@ */ #include "nld_truthtable.h" -#include "../plists.h" +#include "../plib/plists.h" unsigned truthtable_desc_t::count_bits(UINT32 v) { @@ -97,7 +97,7 @@ UINT32 truthtable_desc_t::get_ignored_extended(UINT32 i) // desc // ---------------------------------------------------------------------------------------- -ATTR_COLD void truthtable_desc_t::help(unsigned cur, nl_util::pstring_list list, +ATTR_COLD void truthtable_desc_t::help(unsigned cur, pstring_list_t list, UINT64 state,UINT16 val, UINT8 *timing_index) { pstring elem = list[cur].trim(); @@ -142,15 +142,17 @@ ATTR_COLD void truthtable_desc_t::help(unsigned cur, nl_util::pstring_list list, } } -ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled_ignore) +ATTR_COLD void truthtable_desc_t::setup(const pstring_list_t &truthtable, UINT32 disabled_ignore) { + unsigned line = 0; + if (*m_initialized) return; - pstring ttline = pstring(truthtable[0]); - truthtable++; - ttline = pstring(truthtable[0]); - truthtable++; + pstring ttline = truthtable[line]; + line++; + ttline = truthtable[line]; + line++; for (unsigned j=0; j < m_size; j++) m_outs[j] = ~0L; @@ -160,14 +162,14 @@ ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled while (!ttline.equals("")) { - nl_util::pstring_list io = nl_util::split(ttline,"|"); + pstring_list_t io(ttline,"|"); // checks nl_assert_always(io.size() == 3, "io.count mismatch"); - nl_util::pstring_list inout = nl_util::split(io[0], ","); + pstring_list_t inout(io[0], ","); nl_assert_always(inout.size() == m_num_bits, "number of bits not matching"); - nl_util::pstring_list out = nl_util::split(io[1], ","); + pstring_list_t out(io[1], ","); nl_assert_always(out.size() == m_NO, "output count not matching"); - nl_util::pstring_list times = nl_util::split(io[2], ","); + pstring_list_t times(io[2], ","); nl_assert_always(times.size() == m_NO, "timing count not matching"); UINT16 val = 0; @@ -189,8 +191,8 @@ ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled } help(0, inout, 0 , val, tindex.data()); - ttline = pstring(truthtable[0]); - truthtable++; + ttline = truthtable[line]; + line++; } // determine ignore @@ -233,3 +235,35 @@ ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled *m_initialized = true; } + +#define ENTRYX(_n,_m,_h) case (_n * 1000 + _m * 10 + _h): \ + { typedef netlist_factory_truthtable_t<_n,_m,_h> xtype; \ + return palloc(xtype,name,classname,def_param); } break + +#define ENTRYY(_n,_m) ENTRYX(_n,_m,0); ENTRYX(_n,_m,1) + +#define ENTRY(_n) ENTRYY(_n, 1); ENTRYY(_n, 2); ENTRYY(_n, 3); ENTRYY(_n, 4); ENTRYY(_n, 5); ENTRYY(_n, 6) + +netlist_base_factory_truthtable_t *nl_tt_factory_create(const unsigned ni, const unsigned no, + const unsigned has_state, + const pstring &name, const pstring &classname, + const pstring &def_param) +{ + switch (ni * 1000 + no * 10 + has_state) + { + ENTRY(1); + ENTRY(2); + ENTRY(3); + ENTRY(4); + ENTRY(5); + ENTRY(6); + ENTRY(7); + ENTRY(8); + ENTRY(9); + ENTRY(10); + default: + pstring msg = pstring::sprintf("unable to create truthtable<%d,%d,%d>", ni, no, has_state); + nl_assert_always(false, msg.cstr()); + } + return NULL; +} diff --git a/src/emu/netlist/devices/nld_truthtable.h b/src/emu/netlist/devices/nld_truthtable.h index d12dd3c578b..3f447d28f2e 100644 --- a/src/emu/netlist/devices/nld_truthtable.h +++ b/src/emu/netlist/devices/nld_truthtable.h @@ -11,6 +11,7 @@ #define NLD_TRUTHTABLE_H_ #include "../nl_base.h" +#include "../nl_factory.h" #define NETLIB_TRUTHTABLE(_name, _nIN, _nOUT, _state) \ class NETLIB_NAME(_name) : public nld_truthtable_t<_nIN, _nOUT, _state> \ @@ -44,10 +45,10 @@ struct truthtable_desc_t { } - ATTR_COLD void setup(const char **truthtable, UINT32 disabled_ignore); + ATTR_COLD void setup(const pstring_list_t &desc, UINT32 disabled_ignore); private: - ATTR_COLD void help(unsigned cur, nl_util::pstring_list list, + ATTR_COLD void help(unsigned cur, pstring_list_t list, UINT64 state,UINT16 val, UINT8 *timing_index); static unsigned count_bits(UINT32 v); static UINT32 set_bits(UINT32 v, UINT32 b); @@ -89,28 +90,40 @@ public: }; nld_truthtable_t(truthtable_t *ttbl, const char *desc[]) - : netlist_device_t(), m_last_state(0), m_ign(0), m_active(1), m_ttp(ttbl), m_desc(desc) + : netlist_device_t(), m_last_state(0), m_ign(0), m_active(1), m_ttp(ttbl) { + while (*desc != NULL && **desc != 0 ) + { + m_desc.add(*desc); + desc++; + } + + } + + nld_truthtable_t(truthtable_t *ttbl, const pstring_list_t &desc) + : netlist_device_t(), m_last_state(0), m_ign(0), m_active(1), m_ttp(ttbl) + { + m_desc = desc; } /* ATTR_COLD */ virtual void start() { - pstring ttline = pstring(m_desc[0]); + pstring header = m_desc[0]; - nl_util::pstring_list io = nl_util::split(ttline,"|"); + pstring_list_t io(header,"|"); // checks nl_assert_always(io.size() == 2, "too many '|'"); - nl_util::pstring_list inout = nl_util::split(io[0], ","); + pstring_list_t inout(io[0], ","); nl_assert_always(inout.size() == m_num_bits, "bitcount wrong"); - nl_util::pstring_list out = nl_util::split(io[1], ","); + pstring_list_t out(io[1], ","); nl_assert_always(out.size() == m_NO, "output count wrong"); - for (int i=0; i < m_NI; i++) + for (unsigned i=0; i < m_NI; i++) { inout[i] = inout[i].trim(); register_input(inout[i], m_i[i]); } - for (int i=0; i < m_NO; i++) + for (unsigned i=0; i < m_NO; i++) { out[i] = out[i].trim(); register_output(out[i], m_Q[i]); @@ -118,7 +131,7 @@ public: // Connect output "Q" to input "_Q" if this exists // This enables timed state without having explicit state .... UINT32 disabled_ignore = 0; - for (int i=0; i < m_NO; i++) + for (unsigned i=0; i < m_NO; i++) { pstring tmp = "_" + out[i]; const int idx = inout.indexof(tmp); @@ -154,7 +167,7 @@ public: ATTR_COLD void reset() { m_active = 0; - for (int i=0; i<m_NO;i++) + for (unsigned i=0; i<m_NO;i++) if (this->m_Q[i].net().num_cons()>0) m_active++; m_last_state = 0; @@ -193,14 +206,14 @@ public: const UINT32 timebase = nstate * m_NO; if (doOUT) { - for (int i = 0; i < m_NO; i++) + for (unsigned i = 0; i < m_NO; i++) OUTLOGIC(m_Q[i], (out >> i) & 1, m_ttp->m_timing_nt[m_ttp->m_timing[timebase + i]]); } else - for (int i = 0; i < m_NO; i++) + for (unsigned i = 0; i < m_NO; i++) m_Q[i].net().set_Q_time((out >> i) & 1, mt + m_ttp->m_timing_nt[m_ttp->m_timing[timebase + i]]); - for (int i = 0; i < m_NI; i++) + for (unsigned i = 0; i < m_NI; i++) if (m_ign & (1 << i)) m_i[i].inactivate(); @@ -227,7 +240,7 @@ public: if (has_state == 0) if (--m_active == 0) { - for (int i = 0; i< m_NI; i++) + for (unsigned i = 0; i< m_NI; i++) m_i[i].inactivate(); } } @@ -242,10 +255,60 @@ private: INT32 m_active; truthtable_t *m_ttp; - const char **m_desc; + pstring_list_t m_desc; +}; + +class netlist_base_factory_truthtable_t : public netlist_base_factory_t +{ + NETLIST_PREVENT_COPYING(netlist_base_factory_truthtable_t) +public: + ATTR_COLD netlist_base_factory_truthtable_t(const pstring &name, const pstring &classname, + const pstring &def_param) + : netlist_base_factory_t(name, classname, def_param) + {} + pstring_list_t m_desc; +}; + + +template<unsigned m_NI, unsigned m_NO, int has_state> +class netlist_factory_truthtable_t : public netlist_base_factory_truthtable_t +{ + NETLIST_PREVENT_COPYING(netlist_factory_truthtable_t) +public: + ATTR_COLD netlist_factory_truthtable_t(const pstring &name, const pstring &classname, + const pstring &def_param) + : netlist_base_factory_truthtable_t(name, classname, def_param) { } + + ATTR_COLD netlist_device_t *Create() + { + typedef nld_truthtable_t<m_NI, m_NO, has_state> tt_type; + netlist_device_t *r = palloc(tt_type, &m_ttbl, m_desc); + //r->init(setup, name); + return r; + } +private: + typename nld_truthtable_t<m_NI, m_NO, has_state>::truthtable_t m_ttbl; }; +netlist_base_factory_truthtable_t *nl_tt_factory_create(const unsigned ni, const unsigned no, + const unsigned has_state, + const pstring &name, const pstring &classname, + const pstring &def_param); + +#define TRUTHTABLE_START(_name, _in, _out, _has_state, _def_params) \ + { \ + netlist_base_factory_truthtable_t *ttd = nl_tt_factory_create(_in, _out, _has_state, \ + # _name, # _name, "+" _def_params); +#define TT_HEAD(_x) \ + ttd->m_desc.add(_x); + +#define TT_LINE(_x) \ + ttd->m_desc.add(_x); + +#define TRUTHTABLE_END() \ + setup.factory().register_device(ttd); \ + } #endif /* NLD_TRUTHTABLE_H_ */ diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c index 0a8da9fda8b..1bc33ed7e37 100644 --- a/src/emu/netlist/nl_base.c +++ b/src/emu/netlist/nl_base.c @@ -7,12 +7,11 @@ #include <cstring> -#include "palloc.h" +#include "plib/palloc.h" #include "nl_base.h" #include "devices/nld_system.h" #include "analog/nld_solver.h" -#include "pstring.h" #include "nl_util.h" const netlist_time netlist_time::zero = netlist_time::from_raw(0); diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h index a293ec95dd4..a20309f7566 100644 --- a/src/emu/netlist/nl_base.h +++ b/src/emu/netlist/nl_base.h @@ -158,8 +158,7 @@ #include "nl_lists.h" #include "nl_time.h" #include "nl_util.h" -#include "pstring.h" -#include "pstate.h" +#include "plib/pstate.h" // ---------------------------------------------------------------------------------------- // Type definitions @@ -1197,7 +1196,7 @@ public: plist_t<_C *> get_device_list() { plist_t<_C *> tmp; - for (int i = 0; i < m_devices.size(); i++) + for (std::size_t i = 0; i < m_devices.size(); i++) { _C *dev = dynamic_cast<_C *>(m_devices[i]); if (dev != NULL) @@ -1209,7 +1208,7 @@ public: template<class _C> _C *get_first_device() { - for (int i = 0; i < m_devices.size(); i++) + for (std::size_t i = 0; i < m_devices.size(); i++) { _C *dev = dynamic_cast<_C *>(m_devices[i]); if (dev != NULL) @@ -1222,7 +1221,7 @@ public: _C *get_single_device(const char *classname) { _C *ret = NULL; - for (int i = 0; i < m_devices.size(); i++) + for (std::size_t i = 0; i < m_devices.size(); i++) { _C *dev = dynamic_cast<_C *>(m_devices[i]); if (dev != NULL) diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h index d01f6154e92..7d14be13c53 100644 --- a/src/emu/netlist/nl_config.h +++ b/src/emu/netlist/nl_config.h @@ -8,7 +8,7 @@ #ifndef NLCONFIG_H_ #define NLCONFIG_H_ -#include "pconfig.h" +#include "plib/pconfig.h" //============================================================ // SETUP @@ -101,7 +101,7 @@ #if (NL_VERBOSE) #define NL_VERBOSE_OUT(x) printf x #else - #define NL_VERBOSE_OUT(x) do { } while (0) + #define NL_VERBOSE_OUT(x) do { if(0) printf x ; } while (0) #endif //============================================================ diff --git a/src/emu/netlist/nl_factory.c b/src/emu/netlist/nl_factory.c index 4c611af4c18..15ccbc62b5e 100644 --- a/src/emu/netlist/nl_factory.c +++ b/src/emu/netlist/nl_factory.c @@ -15,42 +15,42 @@ // net_device_t_base_factory // ---------------------------------------------------------------------------------------- -ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::term_param_list() +ATTR_COLD const pstring_list_t netlist_base_factory_t::term_param_list() { if (m_def_param.startsWith("+")) - return nl_util::split(m_def_param.substr(1), ","); + return pstring_list_t(m_def_param.substr(1), ","); else - return nl_util::pstring_list(); + return pstring_list_t(); } -ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::def_params() +ATTR_COLD const pstring_list_t netlist_base_factory_t::def_params() { if (m_def_param.startsWith("+") || m_def_param.equals("-")) - return nl_util::pstring_list(); + return pstring_list_t(); else - return nl_util::split(m_def_param, ","); + return pstring_list_t(m_def_param, ","); } -netlist_factory_t::netlist_factory_t() +netlist_factory_list_t::netlist_factory_list_t() { } -netlist_factory_t::~netlist_factory_t() +netlist_factory_list_t::~netlist_factory_list_t() { for (std::size_t i=0; i < m_list.size(); i++) { - net_device_t_base_factory *p = m_list[i]; + netlist_base_factory_t *p = m_list[i]; pfree(p); } m_list.clear(); } -netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &classname) const +netlist_device_t *netlist_factory_list_t::new_device_by_classname(const pstring &classname) const { for (std::size_t i=0; i < m_list.size(); i++) { - net_device_t_base_factory *p = m_list[i]; + netlist_base_factory_t *p = m_list[i]; if (p->classname() == classname) { netlist_device_t *ret = p->Create(); @@ -61,17 +61,17 @@ netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &clas return NULL; // appease code analysis } -netlist_device_t *netlist_factory_t::new_device_by_name(const pstring &name, netlist_setup_t &setup) const +netlist_device_t *netlist_factory_list_t::new_device_by_name(const pstring &name, netlist_setup_t &setup) const { - net_device_t_base_factory *f = factory_by_name(name, setup); + netlist_base_factory_t *f = factory_by_name(name, setup); return f->Create(); } -net_device_t_base_factory * netlist_factory_t::factory_by_name(const pstring &name, netlist_setup_t &setup) const +netlist_base_factory_t * netlist_factory_list_t::factory_by_name(const pstring &name, netlist_setup_t &setup) const { for (std::size_t i=0; i < m_list.size(); i++) { - net_device_t_base_factory *p = m_list[i]; + netlist_base_factory_t *p = m_list[i]; if (p->name() == name) { return p; diff --git a/src/emu/netlist/nl_factory.h b/src/emu/netlist/nl_factory.h index 970a5024c5a..ff4c56ceff1 100644 --- a/src/emu/netlist/nl_factory.h +++ b/src/emu/netlist/nl_factory.h @@ -10,33 +10,32 @@ #define NLFACTORY_H_ #include "nl_config.h" -#include "palloc.h" -#include "plists.h" +#include "plib/palloc.h" +#include "plib/plists.h" #include "nl_base.h" -#include "pstring.h" // ----------------------------------------------------------------------------- // net_dev class factory // ----------------------------------------------------------------------------- -class net_device_t_base_factory +class netlist_base_factory_t { - NETLIST_PREVENT_COPYING(net_device_t_base_factory) + NETLIST_PREVENT_COPYING(netlist_base_factory_t) public: - ATTR_COLD net_device_t_base_factory(const pstring &name, const pstring &classname, + ATTR_COLD netlist_base_factory_t(const pstring &name, const pstring &classname, const pstring &def_param) : m_name(name), m_classname(classname), m_def_param(def_param) {} - /* ATTR_COLD */ virtual ~net_device_t_base_factory() {} + /* ATTR_COLD */ virtual ~netlist_base_factory_t() {} - /* ATTR_COLD */ virtual netlist_device_t *Create() const = 0; + /* ATTR_COLD */ virtual netlist_device_t *Create() = 0; ATTR_COLD const pstring &name() const { return m_name; } ATTR_COLD const pstring &classname() const { return m_classname; } ATTR_COLD const pstring ¶m_desc() const { return m_def_param; } - ATTR_COLD const nl_util::pstring_list term_param_list(); - ATTR_COLD const nl_util::pstring_list def_params(); + ATTR_COLD const pstring_list_t term_param_list(); + ATTR_COLD const pstring_list_t def_params(); protected: pstring m_name; /* device name */ @@ -45,15 +44,15 @@ protected: }; template <class C> -class net_device_t_factory : public net_device_t_base_factory +class net_list_factory_t : public netlist_base_factory_t { - NETLIST_PREVENT_COPYING(net_device_t_factory) + NETLIST_PREVENT_COPYING(net_list_factory_t) public: - ATTR_COLD net_device_t_factory(const pstring &name, const pstring &classname, + ATTR_COLD net_list_factory_t(const pstring &name, const pstring &classname, const pstring &def_param) - : net_device_t_base_factory(name, classname, def_param) { } + : netlist_base_factory_t(name, classname, def_param) { } - ATTR_COLD netlist_device_t *Create() const + ATTR_COLD netlist_device_t *Create() { netlist_device_t *r = palloc(C); //r->init(setup, name); @@ -61,24 +60,29 @@ public: } }; -class netlist_factory_t +class netlist_factory_list_t { public: - typedef plist_t<net_device_t_base_factory *> list_t; + typedef plist_t<netlist_base_factory_t *> list_t; - netlist_factory_t(); - ~netlist_factory_t(); + netlist_factory_list_t(); + ~netlist_factory_list_t(); template<class _C> ATTR_COLD void register_device(const pstring &name, const pstring &classname, const pstring &def_param) { - m_list.add(palloc(net_device_t_factory< _C >, name, classname, def_param)); + m_list.add(palloc(net_list_factory_t< _C >, name, classname, def_param)); + } + + ATTR_COLD void register_device(netlist_base_factory_t *factory) + { + m_list.add(factory); } ATTR_COLD netlist_device_t *new_device_by_classname(const pstring &classname) const; ATTR_COLD netlist_device_t *new_device_by_name(const pstring &name, netlist_setup_t &setup) const; - ATTR_COLD net_device_t_base_factory * factory_by_name(const pstring &name, netlist_setup_t &setup) const; + ATTR_COLD netlist_base_factory_t * factory_by_name(const pstring &name, netlist_setup_t &setup) const; const list_t &list() { return m_list; } diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c index 7d7b29733be..c7eb527d15a 100644 --- a/src/emu/netlist/nl_parser.c +++ b/src/emu/netlist/nl_parser.c @@ -7,6 +7,7 @@ #include "nl_parser.h" #include "nl_factory.h" +#include "devices/nld_truthtable.h" //#undef NL_VERBOSE_OUT //#define NL_VERBOSE_OUT(x) printf x @@ -33,7 +34,7 @@ bool netlist_parser::parse(const char *buf, const pstring nlname) reset(m_buf); set_identifier_chars("abcdefghijklmnopqrstuvwvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-"); - set_number_chars("01234567890eE-."); //FIXME: processing of numbers + set_number_chars(".0123456789", "0123456789eE-."); //FIXME: processing of numbers char ws[5]; ws[0] = ' '; ws[1] = 9; @@ -54,6 +55,10 @@ bool netlist_parser::parse(const char *buf, const pstring nlname) m_tok_SUBMODEL = register_token("SUBMODEL"); m_tok_NETLIST_START = register_token("NETLIST_START"); m_tok_NETLIST_END = register_token("NETLIST_END"); + m_tok_TRUTHTABLE_START = register_token("TRUTHTABLE_START"); + m_tok_TRUTHTABLE_END = register_token("TRUTHTABLE_END"); + m_tok_TT_HEAD = register_token("TT_HEAD"); + m_tok_TT_LINE = register_token("TT_LINE"); bool in_nl = false; @@ -119,6 +124,8 @@ void netlist_parser::parse_netlist(ATTR_UNUSED const pstring &nlname) net_submodel(); else if (token.is(m_tok_INCLUDE)) net_include(); + else if (token.is(m_tok_TRUTHTABLE_START)) + net_truthtable_start(); else if (token.is(m_tok_NETLIST_END)) { netdev_netlist_end(); @@ -129,6 +136,49 @@ void netlist_parser::parse_netlist(ATTR_UNUSED const pstring &nlname) } } +void netlist_parser::net_truthtable_start() +{ + pstring name = get_identifier(); + require_token(m_tok_comma); + unsigned ni = get_number_long(); + require_token(m_tok_comma); + unsigned no = get_number_long(); + require_token(m_tok_comma); + unsigned hs = get_number_long(); + require_token(m_tok_comma); + pstring def_param = get_string(); + require_token(m_tok_param_right); + + netlist_base_factory_truthtable_t *ttd = nl_tt_factory_create(ni, no, hs, + name, name, "+" + def_param); + + while (true) + { + token_t token = get_token(); + + if (token.is(m_tok_TT_HEAD)) + { + require_token(m_tok_param_left); + ttd->m_desc.add(get_string()); + require_token(m_tok_param_right); + } + else if (token.is(m_tok_TT_LINE)) + { + require_token(m_tok_param_left); + ttd->m_desc.add(get_string()); + require_token(m_tok_param_right); + } + else + { + require_token(token, m_tok_TRUTHTABLE_END); + require_token(m_tok_param_left); + require_token(m_tok_param_right); + m_setup.factory().register_device(ttd); + return; + } + } +} + void netlist_parser::netdev_netlist_start() { @@ -198,7 +248,7 @@ void netlist_parser::net_c() { pstring t1 = get_identifier(); m_setup.register_link(first , t1); - NL_VERBOSE_OUT(("Parser: Connect: %s %s\n", last.cstr(), t1.cstr())); + NL_VERBOSE_OUT(("Parser: Connect: %s %s\n", first.cstr(), t1.cstr())); token_t n = get_token(); if (n.is(m_tok_param_right)) break; @@ -223,10 +273,10 @@ void netlist_parser::netdev_param() void netlist_parser::device(const pstring &dev_type) { pstring devname; - net_device_t_base_factory *f = m_setup.factory().factory_by_name(dev_type, m_setup); + netlist_base_factory_t *f = m_setup.factory().factory_by_name(dev_type, m_setup); netlist_device_t *dev; - nl_util::pstring_list termlist = f->term_param_list(); - nl_util::pstring_list def_params = f->def_params(); + pstring_list_t termlist = f->term_param_list(); + pstring_list_t def_params = f->def_params(); std::size_t cnt; @@ -293,6 +343,23 @@ nl_double netlist_parser::eval_param(const token_t tok) for (i=1; i<6;i++) if (tok.str().equals(macs[i])) f = i; +#if 1 + if (f>0) + { + require_token(m_tok_param_left); + ret = get_number_double(); + require_token(m_tok_param_right); + } + else + { + val = tok.str(); + ret = val.as_double(&e); + if (e) + error("Error with parameter ...\n"); + } + return ret * facs[f]; + +#else if (f>0) { require_token(m_tok_param_left); @@ -308,4 +375,5 @@ nl_double netlist_parser::eval_param(const token_t tok) if (f>0) require_token(m_tok_param_right); return ret * facs[f]; +#endif } diff --git a/src/emu/netlist/nl_parser.h b/src/emu/netlist/nl_parser.h index 582aad49de7..8a600339981 100644 --- a/src/emu/netlist/nl_parser.h +++ b/src/emu/netlist/nl_parser.h @@ -10,7 +10,7 @@ #include "nl_setup.h" #include "nl_util.h" -#include "pparser.h" +#include "plib/pparser.h" class netlist_parser : public ptokenizer { @@ -31,6 +31,7 @@ public: void net_model(); void net_submodel(); void net_include(); + void net_truthtable_start(); protected: virtual void verror(pstring msg, int line_num, pstring line); @@ -49,6 +50,10 @@ private: token_id_t m_tok_NETLIST_END; token_id_t m_tok_SUBMODEL; token_id_t m_tok_INCLUDE; + token_id_t m_tok_TRUTHTABLE_START; + token_id_t m_tok_TRUTHTABLE_END; + token_id_t m_tok_TT_HEAD; + token_id_t m_tok_TT_LINE; netlist_setup_t &m_setup; diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c index 6b98f14d452..94673f7d3f0 100644 --- a/src/emu/netlist/nl_setup.c +++ b/src/emu/netlist/nl_setup.c @@ -7,7 +7,7 @@ #include <cstdio> -#include "palloc.h" +#include "plib/palloc.h" #include "nl_base.h" #include "nl_setup.h" #include "nl_parser.h" @@ -39,7 +39,7 @@ netlist_setup_t::netlist_setup_t(netlist_base_t &netlist) , m_proxy_cnt(0) { netlist.set_setup(this); - m_factory = palloc(netlist_factory_t); + m_factory = palloc(netlist_factory_list_t); } void netlist_setup_t::init() @@ -286,7 +286,7 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name void netlist_setup_t::register_link_arr(const pstring &terms) { - nl_util::pstring_list list = nl_util::split(terms,", "); + pstring_list_t list(terms,", "); if (list.size() < 2) netlist().error("You must pass at least 2 terminals to NET_C"); for (std::size_t i = 1; i < list.size(); i++) @@ -776,8 +776,8 @@ void netlist_setup_t::start_devices() if (env != "") { NL_VERBOSE_OUT(("Creating dynamic logs ...\n")); - nl_util::pstring_list ll = nl_util::split(env, ":"); - for (std::size_t i=0; i < ll.size(); i++) + pstring_list_t ll(env, ":"); + for (unsigned i=0; i < ll.size(); i++) { NL_VERBOSE_OUT(("%d: <%s>\n",i, ll[i].cstr())); NL_VERBOSE_OUT(("%d: <%s>\n",i, ll[i].cstr())); diff --git a/src/emu/netlist/nl_setup.h b/src/emu/netlist/nl_setup.h index 311ca0bfa63..9219ee6581c 100644 --- a/src/emu/netlist/nl_setup.h +++ b/src/emu/netlist/nl_setup.h @@ -25,6 +25,10 @@ #define NET_REGISTER_DEV(_type, _name) \ setup.register_dev(NETLIB_NAME_STR(_type), # _name); +/* to be used to reference new library truthtable devices */ +#define NET_REGISTER_DEV_X(_type, _name) \ + setup.register_dev(# _type, # _name); + #define NET_REMOVE_DEV(_name) \ setup.remove_dev(# _name); @@ -66,7 +70,7 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &setup) // ---------------------------------------------------------------------------------------- // Forward definition so we keep nl_factory.h out of the public -class netlist_factory_t; +class netlist_factory_list_t; class netlist_setup_t { @@ -143,8 +147,8 @@ public: void namespace_push(const pstring &aname); void namespace_pop(); - netlist_factory_t &factory() { return *m_factory; } - const netlist_factory_t &factory() const { return *m_factory; } + netlist_factory_list_t &factory() { return *m_factory; } + const netlist_factory_list_t &factory() const { return *m_factory; } /* not ideal, but needed for save_state */ tagmap_terminal_t m_terminals; @@ -162,7 +166,7 @@ private: tagmap_link_t m_links; tagmap_nstring_t m_params_temp; - netlist_factory_t *m_factory; + netlist_factory_list_t *m_factory; plist_t<pstring> m_models; diff --git a/src/emu/netlist/nl_time.h b/src/emu/netlist/nl_time.h index 457f7622307..7b56b03628a 100644 --- a/src/emu/netlist/nl_time.h +++ b/src/emu/netlist/nl_time.h @@ -8,7 +8,7 @@ #define NLTIME_H_ #include "nl_config.h" -#include "pstate.h" +#include "plib/pstate.h" //============================================================ // MACROS diff --git a/src/emu/netlist/nl_util.h b/src/emu/netlist/nl_util.h index cf5ee6a3a7b..09a06ce976a 100644 --- a/src/emu/netlist/nl_util.h +++ b/src/emu/netlist/nl_util.h @@ -8,11 +8,12 @@ #ifndef NL_UTIL_H_ #define NL_UTIL_H_ -#include "pstring.h" -#include "plists.h" #include <cmath> #include <cstring> +#include "plib/pstring.h" +#include "plib/plists.h" + class nl_util { // this is purely static @@ -20,68 +21,7 @@ private: nl_util() {}; public: - typedef plist_t<pstring> pstring_list; - - static pstring_list split(const pstring &str, const pstring &onstr, bool ignore_empty = false) - { - pstring_list temp; - - int p = 0; - int pn; - - pn = str.find(onstr, p); - while (pn>=0) - { - pstring t = str.substr(p, pn - p); - if (!ignore_empty || t.len() != 0) - temp.add(t); - p = pn + onstr.len(); - pn = str.find(onstr, p); - } - if (p<str.len()) - { - pstring t = str.substr(p); - if (!ignore_empty || t.len() != 0) - temp.add(t); - } - return temp; - } - static pstring_list splitexpr(const pstring &str, const pstring_list &onstrl) - { - pstring_list temp; - pstring col = ""; - - int i = 0; - while (i<str.len()) - { - int p = -1; - for (std::size_t j=0; j < onstrl.size(); j++) - { - if (std::strncmp(onstrl[j].cstr(), &(str.cstr()[i]), onstrl[j].len())==0) - { - p = j; - break; - } - } - if (p>=0) - { - if (col != "") - temp.add(col); - col = ""; - temp.add(onstrl[p]); - i += onstrl[p].len(); - } - else - { - col += str.cstr()[i]; - i++; - } - } - if (col != "") - temp.add(col); - return temp; - } static const pstring environment(const pstring &var, const pstring &default_val = "") { diff --git a/src/emu/netlist/palloc.c b/src/emu/netlist/plib/palloc.c index 5f9dbc5fee7..5f9dbc5fee7 100644 --- a/src/emu/netlist/palloc.c +++ b/src/emu/netlist/plib/palloc.c diff --git a/src/emu/netlist/palloc.h b/src/emu/netlist/plib/palloc.h index e78bbc6e3ab..e78bbc6e3ab 100644 --- a/src/emu/netlist/palloc.h +++ b/src/emu/netlist/plib/palloc.h diff --git a/src/emu/netlist/pconfig.h b/src/emu/netlist/plib/pconfig.h index b05292b26e4..6c00cdd3411 100644 --- a/src/emu/netlist/pconfig.h +++ b/src/emu/netlist/plib/pconfig.h @@ -77,6 +77,23 @@ typedef int64_t INT64; #define S64(val) val #endif +/* MINGW has adopted the MSVC formatting for 64-bit ints as of gcc 4.4 */ +#if (defined(__MINGW32__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))) || defined(_MSC_VER) +#define I64FMT "I64" +#else +#define I64FMT "ll" +#endif + +#if defined(_MSC_VER) || defined(__MINGW32__) +#ifdef PTR64 +#define SIZETFMT "I64u" +#else +#define SIZETFMT "u" +#endif +#else +#define SIZETFMT "zu" +#endif + #endif #endif /* PCONFIG_H_ */ diff --git a/src/emu/netlist/plists.h b/src/emu/netlist/plib/plists.h index 25ded23fe83..fb121b798b6 100644 --- a/src/emu/netlist/plists.h +++ b/src/emu/netlist/plib/plists.h @@ -10,6 +10,8 @@ #ifndef PLISTS_H_ #define PLISTS_H_ +#include <cstring> + #include "palloc.h" #include "pstring.h" @@ -236,7 +238,7 @@ public: { //nl_assert((pos>=0) && (pos<m_count)); m_count--; - for (int i = pos; i < m_count; i++) + for (std::size_t i = pos; i < m_count; i++) { m_list[i] = m_list[i+1]; } @@ -339,7 +341,7 @@ class pnamedlist_t : public plist_t<_ListClass> public: _ListClass find(const pstring &name) const { - for (int i=0; i < this->size(); i++) + for (std::size_t i=0; i < this->size(); i++) if (get_name((*this)[i]) == name) return (*this)[i]; return _ListClass(NULL); @@ -510,4 +512,74 @@ private: _ListClass *m_head; }; +// ---------------------------------------------------------------------------------------- +// string list +// ---------------------------------------------------------------------------------------- + +class pstring_list_t : public plist_t<pstring> +{ +public: + pstring_list_t() : plist_t<pstring>() { } + + pstring_list_t(const pstring &str, const pstring &onstr, bool ignore_empty = false) + : plist_t<pstring>() + { + + int p = 0; + int pn; + + pn = str.find(onstr, p); + while (pn>=0) + { + pstring t = str.substr(p, pn - p); + if (!ignore_empty || t.len() != 0) + this->add(t); + p = pn + onstr.len(); + pn = str.find(onstr, p); + } + if (p<str.len()) + { + pstring t = str.substr(p); + if (!ignore_empty || t.len() != 0) + this->add(t); + } + } + + static pstring_list_t splitexpr(const pstring &str, const pstring_list_t &onstrl) + { + pstring_list_t temp; + pstring col = ""; + + int i = 0; + while (i<str.len()) + { + int p = -1; + for (std::size_t j=0; j < onstrl.size(); j++) + { + if (std::strncmp(onstrl[j].cstr(), &(str.cstr()[i]), onstrl[j].len())==0) + { + p = j; + break; + } + } + if (p>=0) + { + if (col != "") + temp.add(col); + col = ""; + temp.add(onstrl[p]); + i += onstrl[p].len(); + } + else + { + col += str.cstr()[i]; + i++; + } + } + if (col != "") + temp.add(col); + return temp; + } +}; + #endif /* PLISTS_H_ */ diff --git a/src/emu/netlist/poptions.h b/src/emu/netlist/plib/poptions.h index 7803a315d94..7803a315d94 100644 --- a/src/emu/netlist/poptions.h +++ b/src/emu/netlist/plib/poptions.h diff --git a/src/emu/netlist/pparser.c b/src/emu/netlist/plib/pparser.c index 8e58f0dcae7..95b9260c7cd 100644 --- a/src/emu/netlist/pparser.c +++ b/src/emu/netlist/plib/pparser.c @@ -96,6 +96,34 @@ pstring ptokenizer::get_identifier() return tok.str(); } +double ptokenizer::get_number_double() +{ + token_t tok = get_token(); + if (!tok.is_type(NUMBER)) + { + error("Error: expected a number, got <%s>\n", tok.str().cstr()); + } + bool err = false; + double ret = tok.str().as_double(&err); + if (err) + error("Error: expected a number, got <%s>\n", tok.str().cstr()); + return ret; +} + +long ptokenizer::get_number_long() +{ + token_t tok = get_token(); + if (!tok.is_type(NUMBER)) + { + error("Error: expected a long int, got <%s>\n", tok.str().cstr()); + } + bool err = false; + long ret = tok.str().as_long(&err); + if (err) + error("Error: expected a long int, got <%s>\n", tok.str().cstr()); + return ret; +} + ptokenizer::token_t ptokenizer::get_token() { while (true) @@ -135,7 +163,26 @@ ptokenizer::token_t ptokenizer::get_token_internal() return token_t(ENDOFFILE); } } - if (m_identifier_chars.find(c)>=0) + if (m_number_chars_start.find(c)>=0) + { + /* read number while we receive number or identifier chars + * treat it as an identifier when there are identifier chars in it + * + */ + token_type ret = NUMBER; + pstring tokstr = ""; + while (true) { + if (m_identifier_chars.find(c)>=0 && m_number_chars.find(c)<0) + ret = IDENTIFIER; + else if (m_number_chars.find(c)<0) + break; + tokstr += c; + c = getc(); + } + ungetc(); + return token_t(ret, tokstr); + } + else if (m_identifier_chars.find(c)>=0) { /* read identifier till non identifier char */ pstring tokstr = ""; @@ -218,6 +265,8 @@ ppreprocessor::ppreprocessor() m_expr_sep.add("=="); m_expr_sep.add(" "); m_expr_sep.add("\t"); + + m_defines.add(define_t("__PLIB_PREPROCESSOR__", "1")); } void ppreprocessor::error(const pstring &err) @@ -227,7 +276,7 @@ void ppreprocessor::error(const pstring &err) -double ppreprocessor::expr(const nl_util::pstring_list &sexpr, std::size_t &start, int prio) +double ppreprocessor::expr(const pstring_list_t &sexpr, std::size_t &start, int prio) { double val; pstring tok=sexpr[start]; @@ -300,7 +349,7 @@ ppreprocessor::define_t *ppreprocessor::get_define(const pstring &name) pstring ppreprocessor::replace_macros(const pstring &line) { - nl_util::pstring_list elems = nl_util::splitexpr(line, m_expr_sep); + pstring_list_t elems = pstring_list_t::splitexpr(line, m_expr_sep); pstringbuffer ret = ""; for (std::size_t i=0; i<elems.size(); i++) { @@ -313,7 +362,7 @@ pstring ppreprocessor::replace_macros(const pstring &line) return pstring(ret.cstr()); } -static pstring catremainder(const nl_util::pstring_list &elems, std::size_t start, pstring sep) +static pstring catremainder(const pstring_list_t &elems, std::size_t start, pstring sep) { pstringbuffer ret = ""; for (std::size_t i=start; i<elems.size(); i++) @@ -327,7 +376,7 @@ static pstring catremainder(const nl_util::pstring_list &elems, std::size_t star pstring ppreprocessor::process(const pstring &contents) { pstringbuffer ret = ""; - nl_util::pstring_list lines = nl_util::split(contents,"\n", false); + pstring_list_t lines(contents,"\n", false); UINT32 ifflag = 0; // 31 if levels int level = 0; @@ -336,15 +385,16 @@ pstring ppreprocessor::process(const pstring &contents) { pstring line = lines[i]; pstring lt = line.replace("\t"," ").trim(); - lt = replace_macros(lt); + // FIXME ... revise and extend macro handling if (lt.startsWith("#")) { - nl_util::pstring_list lti = nl_util::split(lt, " ", true); + pstring_list_t lti(lt, " ", true); if (lti[0].equals("#if")) { level++; std::size_t start = 0; - nl_util::pstring_list t = nl_util::splitexpr(lt.substr(3).replace(" ",""), m_expr_sep); + lt = replace_macros(lt); + pstring_list_t t = pstring_list_t::splitexpr(lt.substr(3).replace(" ",""), m_expr_sep); int val = expr(t, start, 0); if (val == 0) ifflag |= (1 << level); @@ -376,7 +426,7 @@ pstring ppreprocessor::process(const pstring &contents) } else if (lti[0].equals("#pragma")) { - if (lti.size() > 3 && lti[1].equals("NETLIST")) + if (ifflag == 0 && lti.size() > 3 && lti[1].equals("NETLIST")) { if (lti[2].equals("warning")) error("NETLIST: " + catremainder(lti, 3, " ")); @@ -384,9 +434,12 @@ pstring ppreprocessor::process(const pstring &contents) } else if (lti[0].equals("#define")) { - if (lti.size() != 3) - error(pstring::sprintf("PREPRO: only simple defines allowed: %s", line.cstr())); - m_defines.add(define_t(lti[1], lti[2])); + if (ifflag == 0) + { + if (lti.size() != 3) + error(pstring::sprintf("PREPRO: only simple defines allowed: %s", line.cstr())); + m_defines.add(define_t(lti[1], lti[2])); + } } else error(pstring::sprintf("unknown directive on line %" SIZETFMT ": %s\n", i, line.cstr())); @@ -395,9 +448,10 @@ pstring ppreprocessor::process(const pstring &contents) { //if (ifflag == 0 && level > 0) // fprintf(stderr, "conditional: %s\n", line.cstr()); + lt = replace_macros(lt); if (ifflag == 0) { - ret.cat(line); + ret.cat(lt); ret.cat("\n"); } } diff --git a/src/emu/netlist/pparser.h b/src/emu/netlist/plib/pparser.h index b44e83f649c..a9f538eeaef 100644 --- a/src/emu/netlist/pparser.h +++ b/src/emu/netlist/plib/pparser.h @@ -9,8 +9,8 @@ #define PPARSER_H_ #include "pconfig.h" -#include "nl_config.h" // FIXME -#include "nl_util.h" +#include "../nl_config.h" // FIXME +#include "../nl_util.h" class ptokenizer { @@ -86,6 +86,8 @@ public: token_t get_token(); pstring get_string(); pstring get_identifier(); + double get_number_double(); + long get_number_long(); void require_token(const token_id_t &token_num); void require_token(const token_t tok, const token_id_t &token_num); @@ -97,7 +99,7 @@ public: } void set_identifier_chars(pstring s) { m_identifier_chars = s; } - void set_number_chars(pstring s) { m_number_chars = s; } + void set_number_chars(pstring st, pstring rem) { m_number_chars_start = st; m_number_chars = rem; } void set_whitespace(pstring s) { m_whitespace = s; } void set_comment(pstring start, pstring end, pstring line) { @@ -129,6 +131,7 @@ private: pstring m_identifier_chars; pstring m_number_chars; + pstring m_number_chars_start; plist_t<pstring> m_tokens; pstring m_whitespace; char m_string; @@ -161,7 +164,7 @@ public: protected: - double expr(const nl_util::pstring_list &sexpr, std::size_t &start, int prio); + double expr(const pstring_list_t &sexpr, std::size_t &start, int prio); define_t *get_define(const pstring &name); @@ -172,7 +175,7 @@ protected: private: plist_t<define_t> m_defines; - nl_util::pstring_list m_expr_sep; + pstring_list_t m_expr_sep; }; #endif /* PPARSER_H_ */ diff --git a/src/emu/netlist/pstate.c b/src/emu/netlist/plib/pstate.c index 07532032405..07532032405 100644 --- a/src/emu/netlist/pstate.c +++ b/src/emu/netlist/plib/pstate.c diff --git a/src/emu/netlist/pstate.h b/src/emu/netlist/plib/pstate.h index 73b83e65a00..73b83e65a00 100644 --- a/src/emu/netlist/pstate.h +++ b/src/emu/netlist/plib/pstate.h diff --git a/src/emu/netlist/pstring.c b/src/emu/netlist/plib/pstring.c index ec930808e7b..ec930808e7b 100644 --- a/src/emu/netlist/pstring.c +++ b/src/emu/netlist/plib/pstring.c diff --git a/src/emu/netlist/pstring.h b/src/emu/netlist/plib/pstring.h index 7cfb936472c..7cfb936472c 100644 --- a/src/emu/netlist/pstring.h +++ b/src/emu/netlist/plib/pstring.h diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c index 225d3e396e1..e788b4fda34 100644 --- a/src/emu/sound/aica.c +++ b/src/emu/sound/aica.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:ElSemi, kingshriek, Deunan Knute, R. Belmont /* Sega/Yamaha AICA emulation diff --git a/src/emu/sound/aica.h b/src/emu/sound/aica.h index 25c6cb54fd1..0c7d5caf4f4 100644 --- a/src/emu/sound/aica.h +++ b/src/emu/sound/aica.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:ElSemi, kingshriek, Deunan Knute, R. Belmont /* diff --git a/src/emu/sound/aicadsp.c b/src/emu/sound/aicadsp.c index 7e8d4914171..4f533125825 100644 --- a/src/emu/sound/aicadsp.c +++ b/src/emu/sound/aicadsp.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:ElSemi, kingshriek, Deunan Knute, R. Belmont #include "emu.h" #include "aicadsp.h" diff --git a/src/emu/sound/aicadsp.h b/src/emu/sound/aicadsp.h index f5672e3dbd3..e28301a6100 100644 --- a/src/emu/sound/aicadsp.h +++ b/src/emu/sound/aicadsp.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:ElSemi, kingshriek, Deunan Knute, R. Belmont #pragma once diff --git a/src/emu/sound/disc_cls.h b/src/emu/sound/disc_cls.h index c03592a9f08..255b0958c15 100644 --- a/src/emu/sound/disc_cls.h +++ b/src/emu/sound/disc_cls.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:K.Wilkins, Derrick Renaud, F.Palazzolo, Couriersud #pragma once diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index d9bf63180db..61f3ea35242 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:K.Wilkins, Derrick Renaud, Frank Palazzolo, Couriersud /************************************************************************ * diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index 921974193ab..a7dff7c7ff7 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:K.Wilkins, Derrick Renaud, Frank Palazzolo, Couriersud #pragma once diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c index c935616e115..d77410ad74b 100644 --- a/src/emu/sound/ics2115.c +++ b/src/emu/sound/ics2115.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Marshall,nimitz,austere //ICS2115 by Raiden II team (c) 2010 //members: austere, nimitz, Alex Marshal diff --git a/src/emu/sound/ics2115.h b/src/emu/sound/ics2115.h index 5b810623df5..16d571fd997 100644 --- a/src/emu/sound/ics2115.h +++ b/src/emu/sound/ics2115.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Marshall,nimitz,austere #pragma once diff --git a/src/emu/sound/pokey.c b/src/emu/sound/pokey.c index 33aec56ae80..e27870108b5 100644 --- a/src/emu/sound/pokey.c +++ b/src/emu/sound/pokey.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Brad Oliver, Eric Smith, Juergen Buchmueller /***************************************************************************** * diff --git a/src/emu/sound/pokey.h b/src/emu/sound/pokey.h index 96c9f672246..c2cf13ba477 100644 --- a/src/emu/sound/pokey.h +++ b/src/emu/sound/pokey.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Brad Oliver, Eric Smith, Juergen Buchmueller /***************************************************************************** * diff --git a/src/emu/sound/qsound.c b/src/emu/sound/qsound.c index a3bbb1210f6..c519da454a5 100644 --- a/src/emu/sound/qsound.c +++ b/src/emu/sound/qsound.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Miguel Angel Horna /*************************************************************************** diff --git a/src/emu/sound/qsound.h b/src/emu/sound/qsound.h index 9d0697f406a..208fdac41e9 100644 --- a/src/emu/sound/qsound.h +++ b/src/emu/sound/qsound.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Miguel Angel Horna /********************************************************* diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index c1595b1caa7..03729598737 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Jarek Burczynski, Aaron Giles, Jonathan Gevaryahu, Couriersud /********************************************************************************************** diff --git a/src/emu/sound/tms5110.h b/src/emu/sound/tms5110.h index 5addc3d967e..6196834a24a 100644 --- a/src/emu/sound/tms5110.h +++ b/src/emu/sound/tms5110.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Jarek Burczynski, Aaron Giles, Jonathan Gevaryahu, Couriersud #pragma once diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c index 972780279f3..388862728ea 100644 --- a/src/emu/sound/tms5220.c +++ b/src/emu/sound/tms5220.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Aaron Giles, Jonathan Gevaryahu, Raphael Nabet, Couriersud, Michael Zapf /********************************************************************************************** diff --git a/src/emu/sound/tms5220.h b/src/emu/sound/tms5220.h index 7150ce5457b..6a9b36b723e 100644 --- a/src/emu/sound/tms5220.h +++ b/src/emu/sound/tms5220.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Aaron Giles, Jonathan Gevaryahu, Raphael Nabet, Couriersud, Michael Zapf #pragma once diff --git a/src/lib/formats/z80ne_dsk.c b/src/lib/formats/z80ne_dsk.c deleted file mode 100644 index 1f82d844c88..00000000000 --- a/src/lib/formats/z80ne_dsk.c +++ /dev/null @@ -1,807 +0,0 @@ -// license:??? -// copyright-holders:Roberto Lavarone -/********************************************************************* - - formats/z80ne_dsk.c - - Nuova Elettronica Z80NE disk images - -*********************************************************************/ - -#include <assert.h> - -#include "z80ne_dsk.h" -#include "basicdsk.h" -#include "imageutl.h" -#include "coretmpl.h" - -/* ----------------------------------------------------------------------- - * DMK file format - * - * David M. Keil's disk image format is aptly called an 'on disk' image - * format. This means that whatever written to the disk is encoded into - * the image file. IDAMS, sector headers, trailing CRCs, and intra-sector - * spacing. * - * - * HEADER DESCRIPTION: - * - * Offset Bytes Field Description - * ------ ----- ------------ ----------- - * 0 1 write_prot 0xff = Write Protected, 0x00 = R/W - * 1 1 tracks Number of tracks - * 2 2 track_length Bytes per track on DMK file (little endian) - * 4 1 disk_options Miscellaneous flags - * bit 0-3: Unused - * bit 4: Sides on DMK file - * 1=single, 0=double - * bit 5: Unused - * bit 6: Single Density DMK file - * 1=single (bytes written once - * on IDAMs) - * 0=double (bytes written - * two times for SD IDAMs) - * 5 7 reserved Reserved for future use - * 12 4 real_disk_code If this is 0x12345678 (little endian) - * then access a real disk drive - * (unsupported) - * - * Each track begins with a track TOC, consisting of 64 little endian 16-bit - * integers. Each integer has the following format: - * bit 0-13: Offset from beginning of track to 'FE' byte of IDAM - * Note these are always sorted from first to last. All empty - * entries are 0x00 - * bit 14: Undefined (reserved) - * bit 15: Sector double density (0=SD 1=DD) - * If not set and SD DMK flag is set then bytes are written - * once. - * ----------------------------------------------------------------------- */ - -struct dmk_tag -{ - int heads; - int tracks; - UINT32 track_size; -}; - -/* DMK file structure - * See WD1711 documentation - */ -/* DMK file header */ -#define DMK_HEADER_LEN 16 /* DMK header */ - /* For every track (40) */ - #define DMK_TOC_LEN 128 /* 64 16-bit relative offsets to IDAMs */ - #define DMK_GAP1_LEN 32 /* GAP1 (26 bytes 0xFF and 6 bytes 0x00) */ - - /* For every sector (10) 301 bytes */ - #define DMK_IDAM_LEN 7 /* IDAM (0xFE, Track, 0x00, Sector, 0x00, CRChi, CRClo) */ - #define DMK_ID_GAP_LEN 17 /* GAP2 (11 bytes 0xFF and 6 bytes 0x00) */ - #define DMK_DAM_LEN 1 /* Data Address Mark (0xFB) */ - #define DMK_DATA_LEN 256 /* Data */ - #define DMK_DATA_CRC_LEN 2 /* Data CRC (CRChi, CRClo) */ - #define DMK_DATA_GAP_LEN 18 /* GAP3 (12 bytes 0xFF and 6 bytes 0x00) (not for last sector) */ - - #define DMK_EXTRA_TRACK_LENGTH (176) /* GAP4 (192 bytes 0xFF) */ -/* End of DMK file structure */ - -#define dmk_idam_type(x) (x)[0] -#define dmk_idam_track(x) (x)[1] -#define dmk_idam_side(x) (x)[2] -#define dmk_idam_sector(x) (x)[3] -#define dmk_idam_sectorlength(x) (x)[4] -#define dmk_idam_crc(x) (((x)[5] << 8) + (x)[6]) -#define dmk_idam_set_crc(x, crc) (x)[5] = ((crc) >> 8); (x)[6] = ((crc) >> 0); - -static const char needle_data[] = "\x00\x00\x00\x00\x00\x00\x00\x00\xFB\xFB"; -static const char needle_deleted_data_fa[] = "\x00\x00\x00\x00\x00\x00\x00\x00\xFA\xFA"; -static const char needle_deleted_data_f8[] = "\x00\x00\x00\x00\x00\x00\x00\x00\xF8\xF8"; - - -static struct dmk_tag *get_dmk_tag(floppy_image_legacy *floppy) -{ - return (dmk_tag *)floppy_tag(floppy); -} - - -static floperr_t z80ne_dmk_get_track_offset(floppy_image_legacy *floppy, int head, int track, UINT64 *offset) -{ - struct dmk_tag *tag = get_dmk_tag(floppy); - - if ((head < 0) || (head >= tag->heads) || (track < 0) || (track >= tag->tracks)) - return FLOPPY_ERROR_SEEKERROR; - - *offset = track; - *offset *= tag->heads; - *offset += head; - *offset *= tag->track_size; - *offset += DMK_HEADER_LEN; - return FLOPPY_ERROR_SUCCESS; -} - - -static UINT32 z80ne_dmk_min_track_size(int sectors, int sector_length) -{ - int sector_physical_length; - sector_physical_length = (DMK_IDAM_LEN + DMK_ID_GAP_LEN + DMK_DAM_LEN + sector_length + DMK_DATA_CRC_LEN + DMK_DATA_GAP_LEN); - return DMK_TOC_LEN + 2 * (DMK_GAP1_LEN + (sectors * sector_physical_length) - DMK_DATA_GAP_LEN + DMK_EXTRA_TRACK_LENGTH); -} - - - -static floperr_t z80ne_dmk_read_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, void *buffer, size_t buflen) -{ - floperr_t err; - UINT64 track_offset; - - err = z80ne_dmk_get_track_offset(floppy, head, track, &track_offset); - if (err) - return err; - - floppy_image_read(floppy, buffer, offset + track_offset, buflen); - return FLOPPY_ERROR_SUCCESS; -} - - - -static floperr_t z80ne_dmk_write_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, const void *buffer, size_t buflen) -{ - floperr_t err; - UINT64 track_offset; - - err = z80ne_dmk_get_track_offset(floppy, head, track, &track_offset); - if (err) - return err; - - floppy_image_write(floppy, buffer, offset + track_offset, buflen); - return FLOPPY_ERROR_SUCCESS; -} - - - -static floperr_t z80ne_dmk_get_track_data_offset(floppy_image_legacy *floppy, int head, int track, UINT64 *offset) -{ - *offset = DMK_TOC_LEN + 1; - return FLOPPY_ERROR_SUCCESS; -} - - -static floperr_t z80ne_dmk_format_track(floppy_image_legacy *floppy, int head, int track, option_resolution *params) -{ - int sectors; - int sector_length; - int interleave; - int first_sector_id; - floperr_t err; - int physical_sector; - int logical_sector; - int track_position; - UINT16 idam_offset; - UINT16 crc; - UINT8 *track_data; - void *track_data_v; - UINT32 max_track_size; - std::vector<int> sector_map; - dynamic_buffer local_sector; - int local_sector_size; - int sector_position; - int i; - - sectors = option_resolution_lookup_int(params, PARAM_SECTORS); - sector_length = option_resolution_lookup_int(params, PARAM_SECTOR_LENGTH); - interleave = option_resolution_lookup_int(params, PARAM_INTERLEAVE); - first_sector_id = option_resolution_lookup_int(params, PARAM_FIRST_SECTOR_ID); - - max_track_size = get_dmk_tag(floppy)->track_size; - - if (sectors > DMK_TOC_LEN/2) - { - err = FLOPPY_ERROR_INTERNAL; - goto done; - } - - if (max_track_size < z80ne_dmk_min_track_size(sectors, sector_length)) - { - err = FLOPPY_ERROR_NOSPACE; - goto done; - } - - err = floppy_load_track(floppy, head, track, TRUE, &track_data_v, NULL); - if (err) - goto done; - track_data = (UINT8 *) track_data_v; - - /* set up sector map */ - sector_map.resize(sectors); - memset(§or_map, 0xff, sectors); - - physical_sector = 0; - for (logical_sector = 0; logical_sector < sectors; logical_sector++) - { - while(sector_map[physical_sector] >= 0) - { - physical_sector++; - physical_sector %= sectors; - } - - sector_map[physical_sector] = logical_sector + first_sector_id; - physical_sector += interleave + 1; - physical_sector %= sectors; - } - - /* set up a local physical sector template */ - local_sector_size = (DMK_IDAM_LEN + - DMK_ID_GAP_LEN + - DMK_DAM_LEN + - sector_length + - DMK_DATA_CRC_LEN + - DMK_DATA_GAP_LEN); - local_sector.resize(local_sector_size); - memset(&local_sector, 0, local_sector_size); - - /* set up track table of contents */ - physical_sector = 0; - - /* write GAP1 (track lead in) */ - memset(&track_data[DMK_TOC_LEN], 0xFF, 52); - memset(&track_data[DMK_TOC_LEN+52], 0x00, 12); - track_position = DMK_TOC_LEN + DMK_GAP1_LEN * 2; - - /* - * prepare template in local sector - */ - - /* IDAM */ - sector_position = 0; - dmk_idam_type( &local_sector[sector_position]) = 0xFE; - dmk_idam_track( &local_sector[sector_position]) = track; - dmk_idam_side( &local_sector[sector_position]) = head; - dmk_idam_sector( &local_sector[sector_position]) = 0; /* replace in sector instances */ - dmk_idam_sectorlength( &local_sector[sector_position]) = compute_log2(sector_length / 128); - dmk_idam_set_crc( &local_sector[sector_position], 0); /* replace in sector instances */ - sector_position += 7; - - /* GAP2 (ID GAP) */ - memset(&local_sector[sector_position], 0xFF, 11); - sector_position += 11; - memset(&local_sector[sector_position], 0x00, 6); - sector_position += 6; - - /* sector body */ - local_sector[sector_position] = 0xFB; - memset(&local_sector[sector_position + 1], floppy_get_filler(floppy), sector_length); - crc = ccitt_crc16(0xffff, &local_sector[sector_position], sector_length + 1); - local_sector[sector_position + sector_length + 1] = (UINT8) (crc >> 8); - local_sector[sector_position + sector_length + 2] = (UINT8) (crc >> 0); - sector_position += sector_length + 3; - - /* GAP3 (Data GAP) */ - memset(&local_sector[sector_position], 0xFF, 12); - sector_position += 12; - memset(&local_sector[sector_position], 0x00, 6); - sector_position += 6; - - /* - * start of track data - */ - while(physical_sector < DMK_TOC_LEN/2) - { - if (physical_sector >= sectors) - { - /* no more sectors */ - idam_offset = 0; - } - else - { - /* this is a sector */ - idam_offset = track_position; - logical_sector = sector_map[physical_sector]; - - /* update IDAM in local sector template */ - dmk_idam_sector( &local_sector[0]) = logical_sector; /* update sector number in sector instance */ - crc = ccitt_crc16(0xffff, &local_sector[0], DMK_IDAM_LEN - 2); /* and recalculate crc */ - dmk_idam_set_crc( &local_sector[0], crc); - - /* write local sector in track doubling every byte (DMK double density mode) */ - for(i=0; i<local_sector_size; i++) - track_data[track_position + i*2] = track_data[track_position + (i*2) + 1] = local_sector[i]; - track_position += (2 * local_sector_size); - if (physical_sector == (sectors-1)) /* on last sector remove GAP3 */ - track_position -= (2 * DMK_DATA_GAP_LEN); - } - - /* write the TOC entry */ - track_data[physical_sector * 2 + 0] = (UINT8) (idam_offset >> 0); - track_data[physical_sector * 2 + 1] = (UINT8) (idam_offset >> 8); - - physical_sector++; - } - - /* write track footer GAP4 */ - assert(max_track_size >= (UINT32)track_position); - memset(&track_data[track_position], 0xFF, max_track_size - track_position); - -done: - return err; -} - - - -static int z80ne_dmk_get_heads_per_disk(floppy_image_legacy *floppy) -{ - return get_dmk_tag(floppy)->heads; -} - - - -static int z80ne_dmk_get_tracks_per_disk(floppy_image_legacy *floppy) -{ - return get_dmk_tag(floppy)->tracks; -} - - - -static UINT32 z80ne_dmk_get_track_size(floppy_image_legacy *floppy, int head, int track) -{ - return get_dmk_tag(floppy)->track_size; -} - -static UINT8 * my_memmem(UINT8 *haystack, size_t haystacklen, - UINT8 *needle, size_t needlelen) -{ - register UINT8 *h = haystack; - register UINT8 *n = needle; - register size_t hl = haystacklen; - register size_t nl = needlelen; - register size_t i; - - if (nl == 0) return haystack; /* The first occurrence of the empty string is deemed to occur at - the beginning of the string. */ - if (hl < nl) - return NULL; - - for( i = 0; (i < hl) && (i + nl <= hl ); i++ ) - if (h[i] == *n) /* first match */ - if ( !memcmp(&h[i]+1, n + 1, nl - 1) ) - return (haystack+i); /* returns a pointer to the substring */ - - return (UINT8 *)NULL; /* not found */ -} - - - -static floperr_t z80ne_dmk_seek_sector_in_track(floppy_image_legacy *floppy, int head, int track, int sector, int sector_is_index, int dirtify, UINT8 **sector_data, UINT32 *sector_length) -{ - struct dmk_tag *tag = get_dmk_tag(floppy); - floperr_t err; - size_t idam_offset = 0; - UINT16 calculated_crc; - size_t i, j; - size_t offs; - /*int state;*/ - UINT8 *track_data; - void *track_data_v; - size_t track_length; - size_t sec_len; - dynamic_buffer local_idam; - int local_idam_size; - UINT8 *sec_data; - - err = floppy_load_track(floppy, head, track, dirtify, &track_data_v, &track_length); - if (err) - goto done; - track_data = (UINT8 *) track_data_v; - - /* set up a local IDAM space */ - local_idam_size = (DMK_IDAM_LEN + - DMK_ID_GAP_LEN + - DMK_DAM_LEN + - DMK_DATA_GAP_LEN); - local_idam.resize(local_idam_size); - memset(&local_idam[0], 0, local_idam_size); - - /* search for matching IDAM */ - for (i = 0; i < DMK_TOC_LEN / 2; i++) - { - idam_offset = track_data[i * 2 + 1]; - idam_offset <<= 8; - idam_offset |= track_data[i * 2 + 0]; - idam_offset &= 0x3FFF; - - if (idam_offset == 0) - { - /* we've reached the end of the road */ - i = DMK_TOC_LEN; - break; - } - - if ((idam_offset + DMK_IDAM_LEN * 2) >= tag->track_size) - continue; - - /* overflowing the track? */ - if ((idam_offset + local_idam_size * 2) >= tag->track_size) - { - err = FLOPPY_ERROR_SEEKERROR; - goto done; - } - - /* create a local copy of sector of IDAM */ - for(j = 0; j < (DMK_IDAM_LEN + DMK_ID_GAP_LEN + DMK_DAM_LEN); j++) - local_idam[j] = track_data[idam_offset + j*2]; - - /* from now on all operations are done in local copy of IDAM */ - calculated_crc = ccitt_crc16(0xffff, &local_idam[0], DMK_IDAM_LEN - 2); - - /* check IDAM integrity and check for matching sector */ - if (calculated_crc == dmk_idam_crc(&local_idam[0])) - { - if (sector_is_index) - { - /* the sector is indexed; decrement the index and go */ - if (sector-- == 0) - break; - } - else - { - /* check for matching sector ID */ - if (sector == dmk_idam_sector(&local_idam[0])) - break; - } - } - } - - if (i >= DMK_TOC_LEN / 2) - { - err = FLOPPY_ERROR_SEEKERROR; - goto done; - } - - /* we found a matching sector ID */ - /*state = 0;*/ - offs = idam_offset + 2 * DMK_IDAM_LEN; - - /* find pattern 0x0000FB; this represents the start of a data sector */ - sec_data = my_memmem(&track_data[offs], 4 * (DMK_ID_GAP_LEN + DMK_DAM_LEN), (UINT8 *)needle_data, 10); - if(!sec_data) - { - /* find pattern 0x0000FA; this represents the start of a deleted data sector (used for system sectors) */ - sec_data = my_memmem(&track_data[offs], 4 * (DMK_ID_GAP_LEN + DMK_DAM_LEN), (UINT8 *)needle_deleted_data_fa, 10); - } - if(!sec_data) - { - /* find pattern 0x0000F8; this represents the start of a deleted data sector (used for system sectors) */ - sec_data = my_memmem(&track_data[offs], 4 * (DMK_ID_GAP_LEN + DMK_DAM_LEN), (UINT8 *)needle_deleted_data_f8, 10); - } - - if(sec_data) - sec_data += 10; - else - { - err = FLOPPY_ERROR_SEEKERROR; - goto done; - } - offs = sec_data - &track_data[offs]; - - sec_len = 128 << dmk_idam_sectorlength(&local_idam[0]); - - if ((offs + 2 * sec_len) > track_length) - { - err = FLOPPY_ERROR_INVALIDIMAGE; - goto done; - } - - if (sector_data) - *sector_data = sec_data; - if (sector_length) - *sector_length = sec_len; -done: - return err; -} - - - -static floperr_t z80ne_dmk_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length) -{ - return z80ne_dmk_seek_sector_in_track(floppy, head, track, sector, FALSE, FALSE, NULL, sector_length); -} - - - -static floperr_t z80ne_dmk_get_indexed_sector_info(floppy_image_legacy *floppy, int head, int track, int sector_index, int *cylinder, int *side, int *sector, UINT32 *sector_length, unsigned long *flags) -{ - floperr_t err; - size_t idam_offset; - UINT8 *track_data; - void *track_data_v; - unsigned long dam; - - if (sector_index * 2 >= DMK_TOC_LEN) - return FLOPPY_ERROR_SEEKERROR; - - err = floppy_load_track(floppy, head, track, FALSE, &track_data_v, NULL); - if (err) - return err; - track_data = (UINT8 *) track_data_v; - - idam_offset = track_data[sector_index * 2 + 1]; - idam_offset <<= 8; - idam_offset |= track_data[sector_index * 2 + 0]; - idam_offset &= 0x3FFF; - - if (idam_offset == 0) - return FLOPPY_ERROR_SEEKERROR; - - /* determine type of data sector */ - /* find pattern 0x0000FB; this represents the start of a data sector */ - if ( my_memmem(&track_data[idam_offset+14], 4 * (DMK_ID_GAP_LEN + DMK_DAM_LEN), (UINT8 *)needle_data, 10) ) - dam = 0; - /* find pattern 0x0000FA; this represents the start of a deleted data sector (used for system sectors) */ - else if ( my_memmem(&track_data[idam_offset+14], 4 * (DMK_ID_GAP_LEN + DMK_DAM_LEN), (UINT8 *)needle_deleted_data_fa, 10) ) - dam = ID_FLAG_DELETED_DATA; - /* find pattern 0x0000F8; this represents the start of a deleted data sector (used for system sectors) */ - else if ( my_memmem(&track_data[idam_offset+14], 4 * (DMK_ID_GAP_LEN + DMK_DAM_LEN), (UINT8 *)needle_deleted_data_f8, 10) ) - dam = ID_FLAG_DELETED_DATA; - else - return FLOPPY_ERROR_SEEKERROR; - - if (cylinder) - *cylinder = (&track_data[idam_offset])[2]; - if (side) - *side = (&track_data[idam_offset])[4]; - if (sector) - *sector = (&track_data[idam_offset])[6]; - if (sector_length) - *sector_length = 128 << (&track_data[idam_offset])[8]; - if (flags) - *flags = dam; - return FLOPPY_ERROR_SUCCESS; -} - - - -static floperr_t internal_z80ne_dmk_read_sector(floppy_image_legacy *floppy, int head, int track, int sector, int sector_is_index, void *buffer, size_t buflen) -{ - floperr_t err; - UINT32 sector_length; - UINT16 crc_on_disk; - UINT16 calculated_crc; - UINT8 *sector_data = NULL; - dynamic_buffer local_sector; - int local_sector_size; - int i; - - /* get sector length and data pointer */ - err = z80ne_dmk_seek_sector_in_track(floppy, head, track, sector, sector_is_index, FALSE, §or_data, §or_length); - if (err) - goto done; - - /* set up a local physical sector space (DAM + data + crc + GAP) */ - local_sector_size = (DMK_DAM_LEN + sector_length + DMK_DATA_CRC_LEN + DMK_DATA_GAP_LEN); - local_sector.resize(local_sector_size); - memset(&local_sector, 0, local_sector_size); - - /* get sector data */ - /* create a local copy of sector data including DAM (for crc calculation) */ - for(i = 0; i < (DMK_DAM_LEN + sector_length + DMK_DATA_CRC_LEN); i++) - local_sector[i] = (sector_data - 2)[i*2]; - - crc_on_disk = local_sector[sector_length + 0 + 1]; - crc_on_disk <<= 8; - crc_on_disk += local_sector[sector_length + 1 + 1]; - - /* crc calculated including DAM */ - calculated_crc = ccitt_crc16(0xffff, &local_sector[0], sector_length+1); - if (calculated_crc != crc_on_disk) - { - err = FLOPPY_ERROR_INVALIDIMAGE; - goto done; - } - - /* copy local sector data excluding DAM */ - memcpy(buffer, &local_sector[1], MIN(sector_length, buflen)); - - done: - return err; -} - - - -static floperr_t internal_z80ne_dmk_write_sector(floppy_image_legacy *floppy, int head, int track, int sector, int sector_is_index, const void *buffer, size_t buflen, int ddam) -{ - floperr_t err; - UINT32 sector_length; - UINT8 *sector_data; - UINT16 crc; - dynamic_buffer local_sector; - int local_sector_size; - int i; - - /* get sector length */ - err = z80ne_dmk_seek_sector_in_track(floppy, head, track, sector, sector_is_index, TRUE, §or_data, §or_length); - if (err) - goto done; - - /* set up a local physical sector space */ - local_sector_size = (DMK_DAM_LEN + sector_length + DMK_DATA_CRC_LEN + DMK_DATA_GAP_LEN); - local_sector.resize(local_sector_size); - memset(&local_sector[0], 0, local_sector_size); - if(!ddam) - local_sector[0] = 0xFB; - else - local_sector[0] = 0xFA; - - if (buflen > sector_length) - { - err = FLOPPY_ERROR_INTERNAL; - goto done; - } - - memcpy(&local_sector[1], buffer, buflen); - - crc = ccitt_crc16(0xffff, &local_sector[0], DMK_DAM_LEN + sector_length); - local_sector[DMK_DAM_LEN + sector_length + 0] = crc >> 8; - local_sector[DMK_DAM_LEN + sector_length + 1] = crc >> 0; - - /* write local sector in track doubling every byte (DMK double density mode) */ - /* write DAM or DDAM too */ - sector_data -= 2; - for(i=0; i < (DMK_DAM_LEN + sector_length + DMK_DATA_CRC_LEN); i++) - sector_data[i*2] = sector_data[(i*2)+1] = local_sector[i]; - - done: - return err; -} - - - -static floperr_t z80ne_dmk_read_sector(floppy_image_legacy *floppy, int head, int track, int sector, void *buffer, size_t buflen) -{ - return internal_z80ne_dmk_read_sector(floppy, head, track, sector, FALSE, buffer, buflen); -} - -static floperr_t z80ne_dmk_write_sector(floppy_image_legacy *floppy, int head, int track, int sector, const void *buffer, size_t buflen, int ddam) -{ - return internal_z80ne_dmk_write_sector(floppy, head, track, sector, FALSE, buffer, buflen, ddam); -} - -static floperr_t z80ne_dmk_read_indexed_sector(floppy_image_legacy *floppy, int head, int track, int sector, void *buffer, size_t buflen) -{ - return internal_z80ne_dmk_read_sector(floppy, head, track, sector, TRUE, buffer, buflen); -} - -static floperr_t z80ne_dmk_write_indexed_sector(floppy_image_legacy *floppy, int head, int track, int sector, const void *buffer, size_t buflen, int ddam) -{ - return internal_z80ne_dmk_write_sector(floppy, head, track, sector, TRUE, buffer, buflen, ddam); -} - - - -static void z80ne_dmk_interpret_header(floppy_image_legacy *floppy, int *heads, int *tracks, int * sectors, int *track_size) -{ - UINT8 header[DMK_HEADER_LEN + DMK_TOC_LEN]; - int i; - int idam_offset; - int sects; - - floppy_image_read(floppy, header, 0, DMK_HEADER_LEN + DMK_TOC_LEN); - - if (tracks) - *tracks = header[1]; - if (heads) - *heads = (header[4] & 0x10) ? 1 : 2; - if (track_size) - *track_size = ((int) header[3]) * 0x100 + header[2]; - if(sectors) - { - /* count sectors on first track */ - sects = 0; - for (i = 0; i < DMK_TOC_LEN / 2; i++) - { - idam_offset = header[DMK_HEADER_LEN + i * 2 + 1]; - idam_offset <<= 8; - idam_offset |= header[DMK_HEADER_LEN + i * 2 + 0]; - idam_offset &= 0x3FFF; - - if (idam_offset == 0) - break; - else - sects++; - } - *sectors = sects; - } - -} - - - -FLOPPY_CONSTRUCT(z80ne_dmk_construct) -{ - struct FloppyCallbacks *callbacks; - struct dmk_tag *tag; - UINT8 header[DMK_HEADER_LEN]; - int heads, tracks, track_size, sectors, sector_length; - - if (params) - { - heads = option_resolution_lookup_int(params, PARAM_HEADS); - tracks = option_resolution_lookup_int(params, PARAM_TRACKS); - sectors = option_resolution_lookup_int(params, PARAM_SECTORS); - sector_length = option_resolution_lookup_int(params, PARAM_SECTOR_LENGTH); - - track_size = z80ne_dmk_min_track_size(sectors, sector_length); - - memset(header, 0, sizeof(header)); - header[1] = tracks; - header[2] = track_size >> 0; - header[3] = track_size >> 8; - header[4] = (heads == 2) ? 0x00 : 0x10; - - floppy_image_write(floppy, header, 0, sizeof(header)); - } - else - { - z80ne_dmk_interpret_header(floppy, &heads, &tracks, §ors, &track_size); - } - - tag = (dmk_tag*)floppy_create_tag(floppy, sizeof(struct dmk_tag)); - if (!tag) - return FLOPPY_ERROR_OUTOFMEMORY; - tag->heads = heads; - tag->track_size = track_size; - tag->tracks = tracks; - - callbacks = floppy_callbacks(floppy); - callbacks->read_track = z80ne_dmk_read_track; - callbacks->write_track = z80ne_dmk_write_track; - callbacks->get_track_data_offset = z80ne_dmk_get_track_data_offset; - callbacks->format_track = z80ne_dmk_format_track; - callbacks->get_heads_per_disk = z80ne_dmk_get_heads_per_disk; - callbacks->get_tracks_per_disk = z80ne_dmk_get_tracks_per_disk; - callbacks->get_track_size = z80ne_dmk_get_track_size; - callbacks->get_sector_length = z80ne_dmk_get_sector_length; - callbacks->get_indexed_sector_info = z80ne_dmk_get_indexed_sector_info; - callbacks->read_sector = z80ne_dmk_read_sector; - callbacks->write_sector = z80ne_dmk_write_sector; - callbacks->read_indexed_sector = z80ne_dmk_read_indexed_sector; - callbacks->write_indexed_sector = z80ne_dmk_write_indexed_sector; - - return FLOPPY_ERROR_SUCCESS; -} - - - -FLOPPY_IDENTIFY(z80ne_dmk_identify) -{ - int heads, tracks, sectors, track_size; - UINT64 size, expected_size; - - size = floppy_image_size(floppy); - z80ne_dmk_interpret_header(floppy, &heads, &tracks, §ors, &track_size); - expected_size = DMK_HEADER_LEN + (heads * tracks * track_size); - *vote = (size == expected_size) ? 90 : 0; - *vote += (sectors == 10) ? 10 : 0; - return FLOPPY_ERROR_SUCCESS; -} - - - -/* ----------------------------------------------------------------------- */ - -LEGACY_FLOPPY_OPTIONS_START( z80ne ) - /* - * Single side - * Single density - * FM, 125 kbit/s, - * 40 tracks, track ID: 0..39 - * 10 sectors/track, sector ID: 0..9 - * 256 bytes/sector - * Interleave 1 (sector ID sequence on track: 0 5 1 6 2 7 3 8 4 9) - * 3125 byte/track unformatted - * Rotation speed 300 rpm (5 rps) - */ - LEGACY_FLOPPY_OPTION( z80ne_dmk, "zmk", "Z80NE DMK disk image", z80ne_dmk_identify, z80ne_dmk_construct, NULL, - HEADS([1]) - TRACKS([40]) - SECTORS([10]) - SECTOR_LENGTH([256]) - INTERLEAVE([1]) - FIRST_SECTOR_ID([0])) -LEGACY_FLOPPY_OPTIONS_END diff --git a/src/lib/formats/z80ne_dsk.h b/src/lib/formats/z80ne_dsk.h deleted file mode 100644 index 8740008e821..00000000000 --- a/src/lib/formats/z80ne_dsk.h +++ /dev/null @@ -1,24 +0,0 @@ -// license:??? -// copyright-holders:Roberto Lavarone -/********************************************************************* - - formats/z80ne_dsk.h - - Nuova Elettronica Z80NE disk images - -*********************************************************************/ - -#ifndef Z80NE_DSK_H -#define Z80NE_DSK_H - -#include "flopimg.h" - - -/**************************************************************************/ - -LEGACY_FLOPPY_OPTIONS_EXTERN(z80ne); - -FLOPPY_IDENTIFY(z80ne_dmk_identify); -FLOPPY_CONSTRUCT(z80ne_dmk_construct); - -#endif /* Z80NE_DSK_H */ diff --git a/src/mame/audio/8080bw.c b/src/mame/audio/8080bw.c index 0902f7d905b..187aeea1afb 100644 --- a/src/mame/audio/8080bw.c +++ b/src/mame/audio/8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts,Nicola Salmoria,Tormod Tjaberg,Mirko Buffoni,Lee Taylor,Valerio Verrando,Marco Cassili,Zsolt Vasvari,Aaron Giles,Jonathan Gevaryahu,hap,Robbbert /* 8080bw.c *******************************************/ diff --git a/src/mame/audio/atarifb.c b/src/mame/audio/atarifb.c index 25a8f27371d..88b61451e80 100644 --- a/src/mame/audio/atarifb.c +++ b/src/mame/audio/atarifb.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mike Balfour, Patrick Lawrence, Brad Oliver /************************************************************************* diff --git a/src/mame/audio/carnival.c b/src/mame/audio/carnival.c index cbe22f9d833..3847299b025 100644 --- a/src/mame/audio/carnival.c +++ b/src/mame/audio/carnival.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mike Coates, Peter J.C.Clare /*****************************************************************************/ /* */ diff --git a/src/mame/audio/flower.c b/src/mame/audio/flower.c index d7ffc45b68a..785051faa64 100644 --- a/src/mame/audio/flower.c +++ b/src/mame/audio/flower.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:hap, insideoutboy /* Clarue Flower sound driver. Initial version was based on the Wiping sound driver, which was based on the old namco.c sound driver. diff --git a/src/mame/audio/galaga.c b/src/mame/audio/galaga.c index de76a62ba13..db39f8ae7af 100644 --- a/src/mame/audio/galaga.c +++ b/src/mame/audio/galaga.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /*************************************************************************** galaga.c diff --git a/src/mame/audio/m79amb.c b/src/mame/audio/m79amb.c index b1e65c7946b..eba68d316dd 100644 --- a/src/mame/audio/m79amb.c +++ b/src/mame/audio/m79amb.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /************************************************************************ * m79amb Sound System Analog emulation diff --git a/src/mame/audio/madalien.c b/src/mame/audio/madalien.c index 56ef93eba2c..6ef4fd2b7cd 100644 --- a/src/mame/audio/madalien.c +++ b/src/mame/audio/madalien.c @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:??? // copyright-holders:Derrick Renaud /************************************************************************ * madalien Sound System Analog emulation diff --git a/src/mame/audio/mw8080bw.c b/src/mame/audio/mw8080bw.c index ed2994d781d..8cebf140197 100644 --- a/src/mame/audio/mw8080bw.c +++ b/src/mame/audio/mw8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni,Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari,Derrick Renaud /*************************************************************************** diff --git a/src/mame/audio/nitedrvr.c b/src/mame/audio/nitedrvr.c index e3a0c5000a7..ad42b648748 100644 --- a/src/mame/audio/nitedrvr.c +++ b/src/mame/audio/nitedrvr.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /************************************************************************* diff --git a/src/mame/audio/norautp.c b/src/mame/audio/norautp.c index 73eaf1fa12b..a285e2e2e64 100644 --- a/src/mame/audio/norautp.c +++ b/src/mame/audio/norautp.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud, Roberto Fresca /************************************************************************ * Noraut/Kimble/Kramer Poker Sound System Analog emulation diff --git a/src/mame/audio/phoenix.c b/src/mame/audio/phoenix.c index b1585109384..02c9cca051a 100644 --- a/src/mame/audio/phoenix.c +++ b/src/mame/audio/phoenix.c @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:??? // copyright-holders:Juergen Buchmueller, Derrick Renaud /**************************************************************************** * diff --git a/src/mame/audio/qix.c b/src/mame/audio/qix.c index 24edcfb8332..8d9f6ecb7ca 100644 --- a/src/mame/audio/qix.c +++ b/src/mame/audio/qix.c @@ -1,8 +1,8 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:John Butler, Ed Mueller, Aaron Giles /************************************************************************* - audio\qix.c + audio/qix.c *************************************************************************/ diff --git a/src/mame/audio/skydiver.c b/src/mame/audio/skydiver.c index 33377f6fe21..706a5f63b74 100644 --- a/src/mame/audio/skydiver.c +++ b/src/mame/audio/skydiver.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /************************************************************************* diff --git a/src/mame/audio/spiders.c b/src/mame/audio/spiders.c index 91f35f3ffea..b632e103c5b 100644 --- a/src/mame/audio/spiders.c +++ b/src/mame/audio/spiders.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /*************************************************************************** diff --git a/src/mame/audio/starwars.c b/src/mame/audio/starwars.c index c5cbb6b9939..5493ecd8a16 100644 --- a/src/mame/audio/starwars.c +++ b/src/mame/audio/starwars.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/audio/subs.c b/src/mame/audio/subs.c index fe794e9f49a..c05ad6608a9 100644 --- a/src/mame/audio/subs.c +++ b/src/mame/audio/subs.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /************************************************************************* diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c index da58dd9186d..3f695ca0aed 100644 --- a/src/mame/audio/taito_en.c +++ b/src/mame/audio/taito_en.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves /*************************************************************************** diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h index 6d1838f550a..b0b71b0acb2 100644 --- a/src/mame/audio/taito_en.h +++ b/src/mame/audio/taito_en.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves /*************************************************************************** diff --git a/src/mame/audio/vicdual.c b/src/mame/audio/vicdual.c index 5707a5de118..4c891894557 100644 --- a/src/mame/audio/vicdual.c +++ b/src/mame/audio/vicdual.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud, Couriersud /************************************************************************* diff --git a/src/mame/audio/videopin.c b/src/mame/audio/videopin.c index 10d3c2c1aae..a2babc8635a 100644 --- a/src/mame/audio/videopin.c +++ b/src/mame/audio/videopin.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Derrick Renaud /************************************************************************* diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c index 7a7a8c65769..c9418fe9ad5 100644 --- a/src/mame/drivers/1942.c +++ b/src/mame/drivers/1942.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Couriersud /*************************************************************************** diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 2ce2af477b8..5505f551a2e 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts,Nicola Salmoria,Tormod Tjaberg,Mirko Buffoni,Lee Taylor,Valerio Verrando,Marco Cassili,Zsolt Vasvari,Aaron Giles,Jonathan Gevaryahu,hap,Robbbert /***************************************************************************** diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c index 9bd425858ec..7617fe36f19 100644 --- a/src/mame/drivers/asuka.c +++ b/src/mame/drivers/asuka.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Brian Troha /*************************************************************************** diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c index 62e68a50bc3..b4ba38bd94d 100644 --- a/src/mame/drivers/atarifb.c +++ b/src/mame/drivers/atarifb.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mike Balfour, Patrick Lawrence, Brad Oliver /*************************************************************************** diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c index 193b0f9c9e6..b2a3fc48507 100644 --- a/src/mame/drivers/bfm_sc2.c +++ b/src/mame/drivers/bfm_sc2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:James Wallace,'Re-Animator' /**************************************************************************************** diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c index dcdee427169..97e37fec29a 100644 --- a/src/mame/drivers/bigevglf.c +++ b/src/mame/drivers/bigevglf.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina /*************************************************************************** Big Event Golf (c) Taito 1986 diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c index ce4f3f85a90..196c217979e 100644 --- a/src/mame/drivers/bionicc.c +++ b/src/mame/drivers/bionicc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /****************************************************************************************** diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c index 6afdf1d9609..afd9040a65a 100644 --- a/src/mame/drivers/bking.c +++ b/src/mame/drivers/bking.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index 065ca46b23f..1683613309b 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Chris Moore, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/carjmbre.c b/src/mame/drivers/carjmbre.c index 3e45d9cd7e1..4fe6ed5d0e6 100644 --- a/src/mame/drivers/carjmbre.c +++ b/src/mame/drivers/carjmbre.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:insideoutboy, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/ccastles.c b/src/mame/drivers/ccastles.c index ff3dfb0f01b..679302610eb 100644 --- a/src/mame/drivers/ccastles.c +++ b/src/mame/drivers/ccastles.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Patrick Lawrence, Aaron Giles /*************************************************************************** diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c index b5717ac6f71..206390febf0 100644 --- a/src/mame/drivers/changela.c +++ b/src/mame/drivers/changela.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Jarek Burczynski, Phil Stroffolino, Tomasz Slanina /************************************************************************** Change Lanes diff --git a/src/mame/drivers/cheekyms.c b/src/mame/drivers/cheekyms.c index 6b155075488..a0aadecb296 100644 --- a/src/mame/drivers/cheekyms.c +++ b/src/mame/drivers/cheekyms.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor, Chris Moore /************************************************************************* Universal Cheeky Mouse Driver diff --git a/src/mame/drivers/chsuper.c b/src/mame/drivers/chsuper.c index 4b859a46c59..09afe80fa29 100644 --- a/src/mame/drivers/chsuper.c +++ b/src/mame/drivers/chsuper.c @@ -1,18 +1,20 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, David Haywood +// copyright-holders:Angelo Salese, David Haywood, Roberto Fresca /******************************************************************************************* -Champion Super (c) 1999 <unknown> + Champion Super (c) 1999 <unknown> -driver by Angelo Salese & David Haywood + Driver by Angelo Salese & David Haywood + Addittional work by Roberto Fresca. -Notes: --To init chsuper3, just soft-reset and keep pressed both service keys (9 & 0) + Notes: + - To init chsuper3, just soft-reset and keep pressed both service keys (9 & 0) -TODO: --sound; --inputs are grossly mapped; --lamps; + TODO: + - sound. + - ticket dispenser. + - Trace the hold3 lamp line on the pcb, + for a properly implementation. *******************************************************************************************/ @@ -22,6 +24,7 @@ TODO: #include "sound/dac.h" #include "machine/nvram.h" #include "video/ramdac.h" +#include "chsuper.lh" class chsuper_state : public driver_device { @@ -33,9 +36,12 @@ public: m_palette(*this, "palette") { } DECLARE_WRITE8_MEMBER(chsuper_vram_w); - DECLARE_READ8_MEMBER(ff_r); + DECLARE_WRITE8_MEMBER(chsuper_outporta_w); + DECLARE_WRITE8_MEMBER(chsuper_outportb_w); int m_tilexor; + UINT8 m_blacklamp = NULL; + UINT8 m_redlamp = NULL; UINT8 *m_vram; required_device<z180_device> m_maincpu; @@ -82,16 +88,106 @@ UINT32 chsuper_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap return 0; } -READ8_MEMBER( chsuper_state::ff_r ) +WRITE8_MEMBER( chsuper_state::chsuper_vram_w ) { - return 0xff; + m_vram[offset] = data; } -WRITE8_MEMBER( chsuper_state::chsuper_vram_w ) + +/* Output Ports... + + Port EEh: + - bits - + 7654 3210 + ---- ---x Coin counter. + ---- --x- Hold 1 / Black (Nero) / Bet Max lamp. + ---- -x-- Payout counter. + ---- x--- Hold 2 / Low (Bassa) lamp. + ---x ---- unknown (unused). + --x- ---- Bet lamp. + -x-- ---- Ticket Out. + x--- ---- unknown (unused). + + Port EFh: + - bits - + 7654 3210 + ---- ---x unknown (used). + ---- --x- unknown (unused). + ---- -x-- Hold 4 / High (Alta) lamp. + ---- x--- unknown (unused). + ---x ---- unknown (unused). + --x- ---- Hold 5 / Red (Rosso) / Gamble (Raddoppio) lamp. + -x-- ---- Start / Gamble (Raddoppio) lamp. + x--- ---- unknown (unused). + + Port EDh seems to be a mirror of EFh, but with bit0 always active. + + After reversed any port, I've not found a proper and dedicated line + for the Hold 3 lamp, so my guess is that is created through TTL'ing + other lines through some kind of circuitry. + + Since holds 1 & 5 lamps *and* holds 2 & 4 lamps are flashing in a + complementary way for the double-up "Black/Red" and "High/Low" + functions, I strongly think that hold 3 lamp is lit when both + of a complementary pair are lite together simultaneously. + + Anyways... Need to be checked against a real PCB. + +*/ + +WRITE8_MEMBER( chsuper_state::chsuper_outporta_w ) // Port EEh { - m_vram[offset] = data; + coin_counter_w(machine(), 0, data & 0x01); // Coin counter + output_set_lamp_value(0, (data >> 1) & 1); // Hold 1 / Black (Nero) lamp. + coin_counter_w(machine(), 1, data & 0x04); // Payout / Ticket Out pulse + output_set_lamp_value(1, (data >> 3) & 1); // Hold 2 / Low (Bassa) lamp. + // D4: unused... + output_set_lamp_value(5, (data >> 5) & 1); // BET lamp + // D6: ticket motor... + // D7: unused... + +/* Workaround to get the HOLD 3 lamp line active, + from the HOLD 1 and HOLD 5 lamps status... +*/ + m_blacklamp = (data >> 1) & 1; // latching the BLACK lamp status... + + if ((m_blacklamp == 1) & (m_redlamp == 1)) // if both are ON... + { + output_set_lamp_value(2, 1); // HOLD 3 ON + } + else + { + output_set_lamp_value(2, 0); // otherwise HOLD 3 OFF + } } +WRITE8_MEMBER( chsuper_state::chsuper_outportb_w ) // Port EFh +{ + // D0: unknown... + // D1: unused... + output_set_lamp_value(3, (data >> 2) & 1); // Hold 4 / High (Alta) lamp. + // D3: unused... + // D4: unused... + output_set_lamp_value(4, (data >> 5) & 1); // Hold 5 / Red (Rosso) / Gamble (Raddoppio) lamp. + output_set_lamp_value(6, (data >> 6) & 1); // Start / Gamble (Raddoppio) lamp. + // D7: unused... + +/* Workaround to get the HOLD 3 lamp line active, + from the HOLD 1 and HOLD 5 lamps status... +*/ + m_redlamp = (data >> 5) & 1; // latching the RED lamp status... + + if ((m_blacklamp == 1) & (m_redlamp == 1)) // if both are ON... + { + output_set_lamp_value(2, 1); // Hold 3 ON + } + else + { + output_set_lamp_value(2, 0); // Hold 3 OFF + } +} + + static ADDRESS_MAP_START( chsuper_prg_map, AS_PROGRAM, 8, chsuper_state ) AM_RANGE(0x00000, 0x0efff) AM_ROM AM_RANGE(0x00000, 0x01fff) AM_WRITE( chsuper_vram_w ) @@ -105,76 +201,74 @@ static ADDRESS_MAP_START( chsuper_portmap, AS_IO, 8, chsuper_state ) AM_RANGE( 0x0000, 0x003f ) AM_RAM // Z180 internal regs AM_RANGE( 0x00e8, 0x00e8 ) AM_READ_PORT("IN0") AM_RANGE( 0x00e9, 0x00e9 ) AM_READ_PORT("IN1") - AM_RANGE( 0x00ea, 0x00ea ) AM_READ_PORT("DSW0") - AM_RANGE( 0x00ed, 0x00ef ) AM_WRITENOP //lamps + AM_RANGE( 0x00ea, 0x00ea ) AM_READ_PORT("DSW") + AM_RANGE( 0x00ed, 0x00ed ) AM_WRITENOP // mirror of EFh, but with bit0 active... + AM_RANGE( 0x00ee, 0x00ee ) AM_WRITE(chsuper_outporta_w) + AM_RANGE( 0x00ef, 0x00ef ) AM_WRITE(chsuper_outportb_w) AM_RANGE( 0x00fc, 0x00fc ) AM_DEVWRITE("ramdac", ramdac_device, index_w) AM_RANGE( 0x00fd, 0x00fd ) AM_DEVWRITE("ramdac", ramdac_device, pal_w) AM_RANGE( 0x00fe, 0x00fe ) AM_DEVWRITE("ramdac", ramdac_device, mask_w) - AM_RANGE( 0x8300, 0x8300 ) AM_READ( ff_r ) //probably data for the dac + AM_RANGE( 0x8300, 0x8300 ) AM_READ_PORT("IN2") // valid input port present in test mode. AM_RANGE( 0xff20, 0xff3f ) AM_DEVWRITE("dac", dac_device, write_unsigned8) // unk writes ADDRESS_MAP_END + static INPUT_PORTS_START( chsuper ) PORT_START("IN0") - PORT_DIPNAME( 0x01, 0x01, "0" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet / Cancel All") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analyzer") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN0-1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Black (Nero) / Bet Max") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet / Cancel All / Take (Ritira)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Double (Radoppio)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Red (Rosso) / Double (Radoppio)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Service 2 - Statistica Parziale") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service 1 - Management") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / High (Alta)") PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Low (Bassa)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Credit clear" ) //hopper? - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSW0") - PORT_DIPNAME( 0x01, 0x01, "2" ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("IN1-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // ticket-in in chmpnum + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN1-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // ticket out / payout in chsuper2 + + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8") + + PORT_START("DSW") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:2") PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x04, 0x04, "Play Graphics" ) PORT_DIPLOCATION("DSW:3") + PORT_DIPSETTING( 0x04, "Play Numbers" ) + PORT_DIPSETTING( 0x00, "Play Cards" ) + PORT_DIPNAME( 0x08, 0x08, "Abilita" ) PORT_DIPLOCATION("DSW:4") + PORT_DIPSETTING( 0x08, "Sensa Abilita" ) + PORT_DIPSETTING( 0x00, "Con Abilita" ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW:5,6") + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:7") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW1") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END @@ -197,10 +291,11 @@ static ADDRESS_MAP_START( ramdac_map, AS_0, 8, chsuper_state ) AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w) ADDRESS_MAP_END + static MACHINE_CONFIG_START( chsuper, chsuper_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 2) /* HD64180RP8, 8 MHz? */ + MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 4) /* HD64180RP8, 8 MHz? */ MCFG_CPU_PROGRAM_MAP(chsuper_prg_map) MCFG_CPU_IO_MAP(chsuper_portmap) MCFG_CPU_VBLANK_INT_DRIVER("screen", chsuper_state, irq0_line_hold) @@ -268,6 +363,7 @@ ROM_START( chmpnum ) ROM_COPY( "maincpu", 0x10000, 0x00000, 0x70000 ) ROM_END + DRIVER_INIT_MEMBER(chsuper_state,chsuper2) { UINT8 *buffer; @@ -339,6 +435,11 @@ DRIVER_INIT_MEMBER(chsuper_state,chmpnum) } -GAME( 1999, chsuper3, 0, chsuper, chsuper, chsuper_state, chsuper3, ROT0, "<unknown>", "Champion Super 3 (V0.35)", GAME_IMPERFECT_SOUND ) //24/02/99 -GAME( 1999, chsuper2, chsuper3, chsuper, chsuper, chsuper_state, chsuper2, ROT0, "<unknown>", "Champion Super 2 (V0.13)", GAME_IMPERFECT_SOUND ) //26/01/99 -GAME( 1999, chmpnum, chsuper3, chsuper, chsuper, chsuper_state, chmpnum, ROT0, "<unknown>", "Champion Number (V0.74)", GAME_IMPERFECT_SOUND ) //10/11/99 +/************************* +* Game Drivers * +*************************/ + +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ +GAMEL( 1999, chsuper3, 0, chsuper, chsuper, chsuper_state, chsuper3, ROT0, "<unknown>", "Champion Super 3 (V0.35)", GAME_IMPERFECT_SOUND, layout_chsuper ) //24/02/99 +GAMEL( 1999, chsuper2, chsuper3, chsuper, chsuper, chsuper_state, chsuper2, ROT0, "<unknown>", "Champion Super 2 (V0.13)", GAME_IMPERFECT_SOUND, layout_chsuper ) //26/01/99 +GAME( 1999, chmpnum, chsuper3, chsuper, chsuper, chsuper_state, chmpnum, ROT0, "<unknown>", "Champion Number (V0.74)", GAME_IMPERFECT_SOUND ) //10/11/99 diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 6f1134dd49b..aba0c3e76e7 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Andreas Naive, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index 87d0230678f..fb01a116fe5 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Philip Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont /*************************************************************************** diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c index 988e014330b..3094ff3450e 100644 --- a/src/mame/drivers/dmndrby.c +++ b/src/mame/drivers/dmndrby.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Angelo Salese, David Haywood, Mike Green /******************************************************************************************* diff --git a/src/mame/drivers/ertictac.c b/src/mame/drivers/ertictac.c index dc3d05d682c..e34d84d6a7c 100644 --- a/src/mame/drivers/ertictac.c +++ b/src/mame/drivers/ertictac.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Angelo Salese, R. Belmont, Tomasz Slanina, Steve Ellenoff, Nicola Salmoria /******************************************************************************************* diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index de5ee5425ae..236a761b9f6 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:smf, Aaron Giles, Chris Hardy, Scott Waye /*************************************************************************** diff --git a/src/mame/drivers/flower.c b/src/mame/drivers/flower.c index 89d7e3e4259..d6612da69a4 100644 --- a/src/mame/drivers/flower.c +++ b/src/mame/drivers/flower.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:insideoutboy, David Haywood, Stephh /* diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c index 457a01a7615..0cbae10e087 100644 --- a/src/mame/drivers/fortecar.c +++ b/src/mame/drivers/fortecar.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Angelo Salese, Roberto Fresca, Rob Ragon /************************************************************************************************* diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c index 086f409a1c8..252b4cb663c 100644 --- a/src/mame/drivers/gcpinbal.c +++ b/src/mame/drivers/gcpinbal.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, R. Belmont /*************************************************************************** diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c index 482c56808c7..875818142ee 100644 --- a/src/mame/drivers/gladiatr.c +++ b/src/mame/drivers/gladiatr.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Victor Trucco,Steve Ellenoff,Phil Stroffolino,Tatsuyuki Satoh,Tomasz Slanina,Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c index a719cdd9223..94466b9c6f6 100644 --- a/src/mame/drivers/groundfx.c +++ b/src/mame/drivers/groundfx.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves /*************************************************************************** diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c index 50ae7998a2c..52f91c44223 100644 --- a/src/mame/drivers/gsword.c +++ b/src/mame/drivers/gsword.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff,Jarek Parchanski /* Great Swordsman (Taito) 1984 diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c index c17c60159fb..6d6b73a806f 100644 --- a/src/mame/drivers/gunbustr.c +++ b/src/mame/drivers/gunbustr.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves /**************************************************************************** diff --git a/src/mame/drivers/legionna.c b/src/mame/drivers/legionna.c index 9b221fcf487..83f37daec27 100644 --- a/src/mame/drivers/legionna.c +++ b/src/mame/drivers/legionna.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:David Graves, Angelo Salese, David Haywood, Tomasz Slanina /*************************************************************************** diff --git a/src/mame/drivers/m58.c b/src/mame/drivers/m58.c index df181069451..f82aef0c0be 100644 --- a/src/mame/drivers/m58.c +++ b/src/mame/drivers/m58.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor, John Clegg /**************************************************************************** diff --git a/src/mame/drivers/mhavoc.c b/src/mame/drivers/mhavoc.c index 1f60a84ed2e..dadecc517de 100644 --- a/src/mame/drivers/mhavoc.c +++ b/src/mame/drivers/mhavoc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Appolo /*************************************************************************** diff --git a/src/mame/drivers/midtunit.c b/src/mame/drivers/midtunit.c index 98a0290b32d..c6fd6b3974f 100644 --- a/src/mame/drivers/midtunit.c +++ b/src/mame/drivers/midtunit.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/drivers/midyunit.c b/src/mame/drivers/midyunit.c index 2eb35057dc0..dcbfe079d4b 100644 --- a/src/mame/drivers/midyunit.c +++ b/src/mame/drivers/midyunit.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/drivers/mole.c b/src/mame/drivers/mole.c index da22065ae40..3710e73e06c 100644 --- a/src/mame/drivers/mole.c +++ b/src/mame/drivers/mole.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Jason Nelson, Phil Stroffolino /***************************************************************************** diff --git a/src/mame/drivers/mw8080bw.c b/src/mame/drivers/mw8080bw.c index af779d2f53d..10502958df5 100644 --- a/src/mame/drivers/mw8080bw.c +++ b/src/mame/drivers/mw8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni,Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/naughtyb.c b/src/mame/drivers/naughtyb.c index adad3aeae95..bcc89e59a34 100644 --- a/src/mame/drivers/naughtyb.c +++ b/src/mame/drivers/naughtyb.c @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:Brad Oliver,Sal,John Bugliarisi,Paul Priest +// license:??? +// copyright-holders:Brad Oliver,Sal and John Bugliarisi,Paul Priest /*************************************************************************** Naughty Boy driver by Sal and John Bugliarisi. diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index 5b29309d4eb..91e9b977477 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/neogeo_noslot.c b/src/mame/drivers/neogeo_noslot.c index 5d503031452..5490326f9e5 100644 --- a/src/mame/drivers/neogeo_noslot.c +++ b/src/mame/drivers/neogeo_noslot.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari // MAME NeoGeo code for single fixed slot 'shortname' configs diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c index ea3dca3cbad..b1c780d6235 100644 --- a/src/mame/drivers/ninjakd2.c +++ b/src/mame/drivers/ninjakd2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Roberto Ventura, Leandro Dardini, Yochizo, Nicola Salmoria /****************************************************************************** diff --git a/src/mame/drivers/nl_pong.c b/src/mame/drivers/nl_pong.c index 187a7eb41d8..c3373cbb91e 100644 --- a/src/mame/drivers/nl_pong.c +++ b/src/mame/drivers/nl_pong.c @@ -11,7 +11,25 @@ #define FAST_CLOCK (1) +#ifndef __PLIB_PREPROCESSOR__ +#define TTL_7400A_NAND(_name, _A, _B) \ + NET_REGISTER_DEV_X(TTL_7400A_NAND, _name) \ + NET_CONNECT(_name, A, _A) \ + NET_CONNECT(_name, B, _B) +#endif + +NETLIST_START(lib) + TRUTHTABLE_START(TTL_7400A_NAND, 2, 1, 0, "A,B") + TT_HEAD(" A , B | Q ") + TT_LINE(" 0 , X | 1 |22") + TT_LINE(" X , 0 | 1 |22") + TT_LINE(" 1 , 1 | 0 |15") + TRUTHTABLE_END() +NETLIST_END() + NETLIST_START(pong_fast) + + INCLUDE(lib) SOLVER(Solver, 48000) PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers PARAM(Solver.ACCURACY, 1e-4) // works and is sufficient @@ -120,7 +138,7 @@ NETLIST_START(pong_fast) /* hit logic */ TTL_7404_INVERT(hitQ, hit) - TTL_7400_NAND(hit, hit1Q, hit2Q) + TTL_7400A_NAND(hit, hit1Q, hit2Q) TTL_7402_NOR(attractQ, StopG, runQ) TTL_7404_INVERT(attract, attractQ) @@ -128,22 +146,22 @@ NETLIST_START(pong_fast) TTL_7420_NAND(ic_h6a, hvidQ, hvidQ, hvidQ, hvidQ) ALIAS(hvid, ic_h6a.Q) - TTL_7400_NAND(ic_e6c, hvid, hblank) + TTL_7400A_NAND(ic_e6c, hvid, hblank) ALIAS(MissQ, ic_e6c.Q) TTL_7404_INVERT(ic_d1e, MissQ) - TTL_7400_NAND(ic_e1a, ic_d1e.Q, attractQ) + TTL_7400A_NAND(ic_e1a, ic_d1e.Q, attractQ) ALIAS(Missed, ic_e1a.Q) - TTL_7400_NAND(rstspeed, SRSTQ, MissQ) - TTL_7400_NAND(StopG, StopG1Q, StopG2Q) + TTL_7400A_NAND(rstspeed, SRSTQ, MissQ) + TTL_7400A_NAND(StopG, StopG1Q, StopG2Q) ALIAS(L, ic_h3b.Q) ALIAS(R, ic_h3b.QQ) - TTL_7400_NAND(hit1Q, pad1, ic_g1b.Q) - TTL_7400_NAND(hit2Q, pad2, ic_g1b.Q) + TTL_7400A_NAND(hit1Q, pad1, ic_g1b.Q) + TTL_7400A_NAND(hit2Q, pad2, ic_g1b.Q) - TTL_7400_NAND(ic_g3c, 128H, ic_h3a.QQ) + TTL_7400A_NAND(ic_g3c, 128H, ic_h3a.QQ) TTL_7427_NOR(ic_g2c, ic_g3c.Q, 256H, vpad1Q) ALIAS(pad1, ic_g2c.Q) TTL_7427_NOR(ic_g2a, ic_g3c.Q, 256HQ, vpad2Q) @@ -193,15 +211,15 @@ NETLIST_START(pong_fast) // hblank flip flop // ---------------------------------------------------------------------------------------- - TTL_7400_NAND(ic_g5b, 16H, 64H) + TTL_7400A_NAND(ic_g5b, 16H, 64H) // the time critical one - TTL_7400_NAND(ic_h5c, ic_h5b.Q, hresetQ) - TTL_7400_NAND(ic_h5b, ic_h5c.Q, ic_g5b.Q) + TTL_7400A_NAND(ic_h5c, ic_h5b.Q, hresetQ) + TTL_7400A_NAND(ic_h5b, ic_h5c.Q, ic_g5b.Q) ALIAS(hblank, ic_h5c.Q) ALIAS(hblankQ, ic_h5b.Q) - TTL_7400_NAND(hsyncQ, hblank, 32H) + TTL_7400A_NAND(hsyncQ, hblank, 32H) // ---------------------------------------------------------------------------------------- // vblank flip flop @@ -212,7 +230,7 @@ NETLIST_START(pong_fast) ALIAS(vblank, ic_f5d.Q) ALIAS(vblankQ, ic_f5c.Q) - TTL_7400_NAND(ic_h5a, 8V, 8V) + TTL_7400A_NAND(ic_h5a, 8V, 8V) TTL_7410_NAND(ic_g5a, vblank, 4V, ic_h5a.Q) ALIAS(vsyncQ, ic_g5a.Q) @@ -220,31 +238,31 @@ NETLIST_START(pong_fast) // move logic // ---------------------------------------------------------------------------------------- - TTL_7400_NAND(ic_e1d, hit_sound, ic_e1c.Q) - TTL_7400_NAND(ic_e1c, ic_f1.QC, ic_f1.QD) + TTL_7400A_NAND(ic_e1d, hit_sound, ic_e1c.Q) + TTL_7400A_NAND(ic_e1c, ic_f1.QC, ic_f1.QD) TTL_7493(ic_f1, ic_e1d.Q, ic_f1.QA, rstspeed, rstspeed) TTL_7402_NOR(ic_g1d, ic_f1.QC, ic_f1.QD) - TTL_7400_NAND(ic_h1a, ic_g1d.Q, ic_g1d.Q) - TTL_7400_NAND(ic_h1d, ic_e1c.Q, ic_h1a.Q) + TTL_7400A_NAND(ic_h1a, ic_g1d.Q, ic_g1d.Q) + TTL_7400A_NAND(ic_h1d, ic_e1c.Q, ic_h1a.Q) - TTL_7400_NAND(ic_h1c, ic_h1d.Q, vreset) - TTL_7400_NAND(ic_h1b, ic_h1a.Q, vreset) + TTL_7400A_NAND(ic_h1c, ic_h1d.Q, vreset) + TTL_7400A_NAND(ic_h1b, ic_h1a.Q, vreset) TTL_7402_NOR(ic_g1c, 256HQ, vreset) TTL_74107(ic_h2a, ic_g1c.Q, ic_h2b.Q, low, ic_h1b.Q) TTL_74107(ic_h2b, ic_g1c.Q, high, move, ic_h1c.Q) - TTL_7400_NAND(ic_h4a, ic_h2b.Q, ic_h2a.Q) + TTL_7400A_NAND(ic_h4a, ic_h2b.Q, ic_h2a.Q) ALIAS(move, ic_h4a.Q) - TTL_7400_NAND(ic_c1d, SC, attract) + TTL_7400A_NAND(ic_c1d, SC, attract) TTL_7404_INVERT(ic_d1a, ic_c1d.Q) TTL_7474(ic_h3b, ic_d1a.Q, ic_h3b.QQ, hit1Q, hit2Q) - TTL_7400_NAND(ic_h4d, ic_h3b.Q, move) - TTL_7400_NAND(ic_h4b, ic_h3b.QQ, move) - TTL_7400_NAND(ic_h4c, ic_h4d.Q, ic_h4b.Q) + TTL_7400A_NAND(ic_h4d, ic_h3b.Q, move) + TTL_7400A_NAND(ic_h4b, ic_h3b.QQ, move) + TTL_7400A_NAND(ic_h4c, ic_h4d.Q, ic_h4b.Q) ALIAS(Aa, ic_h4c.Q) ALIAS(Ba, ic_h4b.Q) @@ -252,7 +270,7 @@ NETLIST_START(pong_fast) // hvid circuit // ---------------------------------------------------------------------------------------- - TTL_7400_NAND(hball_resetQ, Serve, attractQ) + TTL_7400A_NAND(hball_resetQ, Serve, attractQ) TTL_9316(ic_g7, clk, high, hblankQ, hball_resetQ, ic_g5c.Q, Aa, Ba, low, high) TTL_9316(ic_h7, clk, ic_g7.RC, high, hball_resetQ, ic_g5c.Q, low, low, low, high) @@ -267,7 +285,7 @@ NETLIST_START(pong_fast) TTL_9316(ic_b3, hsyncQ, high, vblankQ, high, ic_b2b.Q, a6, b6, c6, d6) TTL_9316(ic_a3, hsyncQ, ic_b3.RC, high, high, ic_b2b.Q, low, low, low, low) - TTL_7400_NAND(ic_b2b, ic_a3.RC, ic_b3.RC) + TTL_7400A_NAND(ic_b2b, ic_a3.RC, ic_b3.RC) TTL_7410_NAND(ic_e2b, ic_a3.RC, ic_b3.QC, ic_b3.QD) ALIAS(vvidQ, ic_e2b.Q) TTL_7404_INVERT(vvid, vvidQ) // D2D @@ -359,12 +377,12 @@ NETLIST_START(pong_fast) NET_C(GND, ic_g4_C.2) ALIAS(hit_sound_en, ic_c2a.QQ) - TTL_7400_NAND(hit_sound, hit_sound_en, vpos16) - TTL_7400_NAND(score_sound, SC, vpos32) - TTL_7400_NAND(topbothitsound, ic_f3_topbot.Q, vpos32) + TTL_7400A_NAND(hit_sound, hit_sound_en, vpos16) + TTL_7400A_NAND(score_sound, SC, vpos32) + TTL_7400A_NAND(topbothitsound, ic_f3_topbot.Q, vpos32) TTL_7410_NAND(ic_c4b, topbothitsound, hit_sound, score_sound) - TTL_7400_NAND(ic_c1b, ic_c4b.Q, attractQ) + TTL_7400A_NAND(ic_c1b, ic_c4b.Q, attractQ) ALIAS(sound, ic_c1b.Q) @@ -382,7 +400,7 @@ NETLIST_START(pong_fast) NET_C(ic_b9_RPRE.2, ic_b9.CONT) RES(ic_b9_R, RES_K(81)) // Adjustment pot - CAP(ic_b9_C, CAP_U(.1)) + CAP(ic_b9_C, CAP_U(0.1)) DIODE(ic_b9_D, "1N914") NE555(ic_b9) @@ -398,9 +416,9 @@ NETLIST_START(pong_fast) NET_C(GND, ic_b9_C.2) TTL_7404_INVERT(ic_c9b, ic_b9.OUT) - TTL_7400_NAND(ic_b7b, ic_a7b.Q, hsyncQ) + TTL_7400A_NAND(ic_b7b, ic_a7b.Q, hsyncQ) TTL_7493(ic_b8, ic_b7b.Q, ic_b8.QA, ic_b9.OUT, ic_b9.OUT) - TTL_7400_NAND(ic_b7a, ic_c9b.Q, ic_a7b.Q) + TTL_7400A_NAND(ic_b7a, ic_c9b.Q, ic_a7b.Q) TTL_7420_NAND(ic_a7b, ic_b8.QA, ic_b8.QB, ic_b8.QC, ic_b8.QD) ALIAS(vpad1Q, ic_b7a.Q) @@ -422,7 +440,7 @@ NETLIST_START(pong_fast) NET_C(ic_a9_RPRE.2, ic_a9.CONT) RES(ic_a9_R, RES_K(81)) // Adjustment pot - CAP(ic_a9_C, CAP_U(.1)) + CAP(ic_a9_C, CAP_U(0.1)) DIODE(ic_a9_D, "1N914") NE555(ic_a9) @@ -438,9 +456,9 @@ NETLIST_START(pong_fast) NET_C(GND, ic_a9_C.2) TTL_7404_INVERT(ic_c9a, ic_a9.OUT) - TTL_7400_NAND(ic_b7c, ic_a7a.Q, hsyncQ) + TTL_7400A_NAND(ic_b7c, ic_a7a.Q, hsyncQ) TTL_7493(ic_a8, ic_b7c.Q, ic_a8.QA, ic_a9.OUT, ic_a9.OUT) - TTL_7400_NAND(ic_b7d, ic_c9a.Q, ic_a7a.Q) + TTL_7400A_NAND(ic_b7d, ic_c9a.Q, ic_a7a.Q) TTL_7420_NAND(ic_a7a, ic_a8.QA, ic_a8.QB, ic_a8.QC, ic_a8.QD) ALIAS(vpad2Q, ic_b7d.Q) @@ -520,8 +538,8 @@ NETLIST_START(pong_fast) TTL_7427_NOR(ic_e5c, ic_e4b.Q, 8H, 4H) ALIAS(scoreFE, ic_e5c.Q) - TTL_7400_NAND(ic_c3d, 8H, 4H) - //TTL_7400_NAND(ic_c3d, 4H, 8H) + TTL_7400A_NAND(ic_c3d, 8H, 4H) + //TTL_7400A_NAND(ic_c3d, 4H, 8H) TTL_7402_NOR(ic_d2b, ic_e4b.Q, ic_c3d.Q) ALIAS(scoreBC, ic_d2b.Q) @@ -547,7 +565,7 @@ NETLIST_START(pong_fast) // net TTL_74107(ic_f3b, clk, 256H, 256HQ, high) - TTL_7400_NAND(ic_g3b, ic_f3b.QQ, 256H) + TTL_7400A_NAND(ic_g3b, ic_f3b.QQ, 256H) TTL_7427_NOR(ic_g2b, ic_g3b.Q, vblank, 4V) ALIAS(net, ic_g2b.Q) diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index a9715e7eb75..b383c600a91 100644 --- a/src/mame/drivers/nmk16.c +++ b/src/mame/drivers/nmk16.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshall,Angelo Salese,Luca Elia /******************************************************************** diff --git a/src/mame/drivers/popeye.c b/src/mame/drivers/popeye.c index 8d3289c060f..a72ac4ad073 100644 --- a/src/mame/drivers/popeye.c +++ b/src/mame/drivers/popeye.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Marc Lafontaine, Couriersud /*************************************************************************** diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c index 5fee425e612..abc901da1fa 100644 --- a/src/mame/drivers/popper.c +++ b/src/mame/drivers/popper.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli /*************************************************************************** diff --git a/src/mame/drivers/portrait.c b/src/mame/drivers/portrait.c index c55df3885fc..7134d0f8942 100644 --- a/src/mame/drivers/portrait.c +++ b/src/mame/drivers/portrait.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff, Pierpaolo Prazzoli /************************************************************************** Portraits diff --git a/src/mame/drivers/pse.c b/src/mame/drivers/pse.c index d24aca5a0d0..40fa2859b3c 100644 --- a/src/mame/drivers/pse.c +++ b/src/mame/drivers/pse.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Fabio Priuli,Dave Widel, gregf /*************************************************************************** diff --git a/src/mame/drivers/qix.c b/src/mame/drivers/qix.c index d5a88f21ec5..8f8ba532c8d 100644 --- a/src/mame/drivers/qix.c +++ b/src/mame/drivers/qix.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:John Butler, Ed Mueller, Aaron Giles /*************************************************************************** diff --git a/src/mame/drivers/quantum.c b/src/mame/drivers/quantum.c index bba283f1cb3..d9ea1c7b4ac 100644 --- a/src/mame/drivers/quantum.c +++ b/src/mame/drivers/quantum.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Forgey, Hedley Rainnie, Aaron Giles, Couriersud /*************************************************************************** diff --git a/src/mame/drivers/raiden.c b/src/mame/drivers/raiden.c index 75aa1860625..2ffeb0a93d6 100644 --- a/src/mame/drivers/raiden.c +++ b/src/mame/drivers/raiden.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Oliver Bergmann, Bryan McPhail, Randy Mongenel /*************************************************************************** diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c index 5a482bac344..b81148e7a19 100644 --- a/src/mame/drivers/renegade.c +++ b/src/mame/drivers/renegade.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Phil Stroffolino, Carlos A. Lozano, Rob Rosenbrock /*************************************************************************** diff --git a/src/mame/drivers/sbowling.c b/src/mame/drivers/sbowling.c index 122dba5848f..1620ba04bcc 100644 --- a/src/mame/drivers/sbowling.c +++ b/src/mame/drivers/sbowling.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina /********************************************************** Strike Bowling (c)1982 Taito diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index 260456b10c7..62986b55dd4 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina /*************************************************************************** diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c index 515c80e284c..742a9493e01 100644 --- a/src/mame/drivers/sidearms.c +++ b/src/mame/drivers/sidearms.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Curt Coder /*************************************************************************** diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c index 41575976d28..f000803d50f 100644 --- a/src/mame/drivers/snk.c +++ b/src/mame/drivers/snk.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Marco Cassili,Ernesto Corvi,Tim Lindquist,Carlos A. Lozano,Bryan McPhail,Jarek Parchanski,Nicola Salmoria,Tomasz Slanina,Phil Stroffolino,Acho A. Tang,Victor Trucco /* diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c index b4b64320e07..a7ce8cf8662 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina /************************************************************************************** diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c index f3fb40cdd0d..b1fe1c166eb 100644 --- a/src/mame/drivers/srmp2.c +++ b/src/mame/drivers/srmp2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Yochizo, Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index de9b30a58e6..89764b59105 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Sebastien Volpe, Tomasz Slanina, David Haywood /* Super Real Mahjong P6 (JPN Ver.) diff --git a/src/mame/drivers/starshp1.c b/src/mame/drivers/starshp1.c index a5a4220b8dc..22fce393d5c 100644 --- a/src/mame/drivers/starshp1.c +++ b/src/mame/drivers/starshp1.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Stefan Jokisch /*************************************************************************** diff --git a/src/mame/drivers/starwars.c b/src/mame/drivers/starwars.c index ee5eeeaca7d..979d714f063 100644 --- a/src/mame/drivers/starwars.c +++ b/src/mame/drivers/starwars.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index f19beb885cd..129dd90d7de 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves /**************************************************************************** diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c index b8df69b5ce5..a23bfd8e7b1 100644 --- a/src/mame/drivers/suprnova.c +++ b/src/mame/drivers/suprnova.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood, Sylvain Glaize, Paul Priest, Olivier Galibert /* Super Kaneko Nova System diff --git a/src/mame/drivers/tagteam.c b/src/mame/drivers/tagteam.c index e0abaacd8af..4a92373602c 100644 --- a/src/mame/drivers/tagteam.c +++ b/src/mame/drivers/tagteam.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff, Brad Oliver /*************************************************************************** diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index 80a69da57db..562f64d8d28 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Bryan McPhail, Brad Oliver, Andrew Prime, Brian Troha, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c index bd6baa17adf..0d3f78accdd 100644 --- a/src/mame/drivers/tecmo16.c +++ b/src/mame/drivers/tecmo16.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Eisuke Watanabe, Nicola Salmoria /****************************************************************************** diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index f704fde1ac2..baaed59f364 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Quench, Yochizo, David Haywood /***************************************************************************** diff --git a/src/mame/drivers/travrusa.c b/src/mame/drivers/travrusa.c index f969805acf7..e0a6d427eef 100644 --- a/src/mame/drivers/travrusa.c +++ b/src/mame/drivers/travrusa.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor,John Clegg,Tomasz Slanina /**************************************************************************** diff --git a/src/mame/drivers/ultratnk.c b/src/mame/drivers/ultratnk.c index 9bba1fab3c1..ccb8e1b4858 100644 --- a/src/mame/drivers/ultratnk.c +++ b/src/mame/drivers/ultratnk.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Phil Stroffolino, Stefan Jokisch /*************************************************************************** diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c index 57e1cb5a7e7..077bb746270 100644 --- a/src/mame/drivers/undrfire.c +++ b/src/mame/drivers/undrfire.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves /*************************************************************************** diff --git a/src/mame/drivers/vball.c b/src/mame/drivers/vball.c index 31f75db4d14..c3effdc0277 100644 --- a/src/mame/drivers/vball.c +++ b/src/mame/drivers/vball.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Paul Hampson /********************************************************************************************************************** Championship VBall diff --git a/src/mame/drivers/williams.c b/src/mame/drivers/williams.c index 5f45a9fabb8..e185e12d46f 100644 --- a/src/mame/drivers/williams.c +++ b/src/mame/drivers/williams.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Soderstrom, Marc LaFontaine, Aaron Giles /*************************************************************************** diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c index 5ea6749506f..a637bc2de7d 100644 --- a/src/mame/drivers/wink.c +++ b/src/mame/drivers/wink.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:HIGHWAYMAN, Nicola Salmoria, Pierpaolo Prazzoli /* Wink - (c) 1985 Midcoin diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c index 0c35ac7954c..6988ae5796e 100644 --- a/src/mame/drivers/xain.c +++ b/src/mame/drivers/xain.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino /*************************************************************************** diff --git a/src/mame/etc/doxy_driver.h b/src/mame/etc/doxy_driver.h new file mode 100644 index 00000000000..906af7379d4 --- /dev/null +++ b/src/mame/etc/doxy_driver.h @@ -0,0 +1,40 @@ +/*! @file doxy_driver.h + @license BSD-3-Clause + @copyright Angelo Salese & the MAME team + + @basehw 4enraya + Main CPU: Z80 + Sound Chip: AY8910 + + @memmap 4enraya,Z80 + 0x0000-0xbfff ROM + 0xc000-0xcfff work RAM + 0xd000-0xdfff VRAM mirrored write, + tilemap offset = address & 0x3ff + tile number = bits 0-7 = data, bits 8,9 = address bits 10,11 + 0xe000-0xefff VRAM mirror + 0xf000-0xffff NOP + + @iomap 4enraya,Z80 + 0x00-0x00 R dip-switches + 0x01-0x01 R inputs + 0x02-0x02 R system inputs + 0x23-0x23 W ay8910 data write + 0x33-0x33 W ay8910 control write + + @irq 4enraya,Z80 + @irqnum 0 @irqname Timer IRQ + */ + + +/** + template for Doxygen commenting style for drivers + All accepted special commands that aren't in Doxygen needs to be hooked up into the ini file. + memmap/iomap/irq -> [%s,%s] -> [name_of_romset,cpu_name] + irqnum -> type of irq, might accept one or two commands (for vectors) + irqname -> A description of the irq used, might use brief and extended description. + + @sa http://www.stack.nl/~dimitri/doxygen/manual/commands.html + @todo needs discussion for accepted standardized syntax + */ + diff --git a/src/mame/includes/1942.h b/src/mame/includes/1942.h index 3df24ada2c1..7f07408261a 100644 --- a/src/mame/includes/1942.h +++ b/src/mame/includes/1942.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Couriersud /*************************************************************************** diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index d089caa38e4..2c8da3f42ea 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts,Nicola Salmoria,Tormod Tjaberg,Mirko Buffoni,Lee Taylor,Valerio Verrando,Marco Cassili,Zsolt Vasvari,Aaron Giles,Jonathan Gevaryahu,hap,Robbbert /*************************************************************************** diff --git a/src/mame/includes/asuka.h b/src/mame/includes/asuka.h index 9c0f1fdb8b7..ec96ca568a4 100644 --- a/src/mame/includes/asuka.h +++ b/src/mame/includes/asuka.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Brian Troha /************************************************************************* diff --git a/src/mame/includes/atarifb.h b/src/mame/includes/atarifb.h index 7ccd0673931..727f5e3bd75 100644 --- a/src/mame/includes/atarifb.h +++ b/src/mame/includes/atarifb.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mike Balfour, Patrick Lawrence, Brad Oliver /************************************************************************* diff --git a/src/mame/includes/bigevglf.h b/src/mame/includes/bigevglf.h index 7c655c948c3..c518c78c80f 100644 --- a/src/mame/includes/bigevglf.h +++ b/src/mame/includes/bigevglf.h @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina #include "sound/msm5232.h" diff --git a/src/mame/includes/bionicc.h b/src/mame/includes/bionicc.h index 15c6ab531f5..1fd57dd5e7c 100644 --- a/src/mame/includes/bionicc.h +++ b/src/mame/includes/bionicc.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /*************************************************************************** diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h index 630a37c0da6..539ceb9a579 100644 --- a/src/mame/includes/bking.h +++ b/src/mame/includes/bking.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari #include "machine/buggychl.h" diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index 61a18a94ca8..aff69a0391d 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Chris Moore, Nicola Salmoria class bublbobl_state : public driver_device diff --git a/src/mame/includes/carjmbre.h b/src/mame/includes/carjmbre.h index 0ba946b2418..c25acf79c39 100644 --- a/src/mame/includes/carjmbre.h +++ b/src/mame/includes/carjmbre.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:insideoutboy, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/includes/ccastles.h b/src/mame/includes/ccastles.h index 0307db6bc56..1c07d109afb 100644 --- a/src/mame/includes/ccastles.h +++ b/src/mame/includes/ccastles.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Patrick Lawrence, Aaron Giles /************************************************************************* diff --git a/src/mame/includes/changela.h b/src/mame/includes/changela.h index a88731d32dc..23c7952bc85 100644 --- a/src/mame/includes/changela.h +++ b/src/mame/includes/changela.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Jarek Burczynski, Phil Stroffolino, Tomasz Slanina diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index 4e6ce443d99..d40d9e4dc77 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor, Chris Moore /************************************************************************* diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 1c5d203856d..f7492e795c7 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Philip Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont /************************************************************************* diff --git a/src/mame/includes/flower.h b/src/mame/includes/flower.h index 07dd67bac94..4039ce61d11 100644 --- a/src/mame/includes/flower.h +++ b/src/mame/includes/flower.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:insideoutboy, David Haywood, Stephh class flower_state : public driver_device { diff --git a/src/mame/includes/gcpinbal.h b/src/mame/includes/gcpinbal.h index 57d0abf0eec..261f63545fe 100644 --- a/src/mame/includes/gcpinbal.h +++ b/src/mame/includes/gcpinbal.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, R. Belmont #include "sound/okim6295.h" diff --git a/src/mame/includes/gladiatr.h b/src/mame/includes/gladiatr.h index 06813718742..93beba148e4 100644 --- a/src/mame/includes/gladiatr.h +++ b/src/mame/includes/gladiatr.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Victor Trucco,Steve Ellenoff,Phil Stroffolino,Tatsuyuki Satoh,Tomasz Slanina,Nicola Salmoria #include "sound/msm5205.h" diff --git a/src/mame/includes/groundfx.h b/src/mame/includes/groundfx.h index c774d6784fc..845c8982b67 100644 --- a/src/mame/includes/groundfx.h +++ b/src/mame/includes/groundfx.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "video/tc0100scn.h" #include "video/tc0480scp.h" diff --git a/src/mame/includes/gsword.h b/src/mame/includes/gsword.h index 513569d5fdc..30bc33d2108 100644 --- a/src/mame/includes/gsword.h +++ b/src/mame/includes/gsword.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff,Jarek Parchanski #include "sound/ay8910.h" #include "sound/msm5205.h" diff --git a/src/mame/includes/gunbustr.h b/src/mame/includes/gunbustr.h index a8e291517e2..8e3f15bfe0c 100644 --- a/src/mame/includes/gunbustr.h +++ b/src/mame/includes/gunbustr.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "machine/eepromser.h" #include "video/tc0480scp.h" diff --git a/src/mame/includes/legionna.h b/src/mame/includes/legionna.h index 37b0953874e..5b6cca2b169 100644 --- a/src/mame/includes/legionna.h +++ b/src/mame/includes/legionna.h @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:David Graves, Angelo Salese, David Haywood, Tomasz Slanina #include "sound/okim6295.h" #include "audio/seibu.h" diff --git a/src/mame/includes/m58.h b/src/mame/includes/m58.h index b1835d103fb..0a4977a0163 100644 --- a/src/mame/includes/m58.h +++ b/src/mame/includes/m58.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor, John Clegg class m58_state : public driver_device { diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h index 5791828dde7..3fd48ca927a 100644 --- a/src/mame/includes/mhavoc.h +++ b/src/mame/includes/mhavoc.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Appolo /************************************************************************* diff --git a/src/mame/includes/midtunit.h b/src/mame/includes/midtunit.h index a1553391387..48973fb6134 100644 --- a/src/mame/includes/midtunit.h +++ b/src/mame/includes/midtunit.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h index cadd7f65ecb..7aeaf18221f 100644 --- a/src/mame/includes/midyunit.h +++ b/src/mame/includes/midyunit.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/includes/mw8080bw.h b/src/mame/includes/mw8080bw.h index a9e91f5cd1c..3544525dff9 100644 --- a/src/mame/includes/mw8080bw.h +++ b/src/mame/includes/mw8080bw.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni,Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/naughtyb.h b/src/mame/includes/naughtyb.h index fab20c21234..42aa42b5f1c 100644 --- a/src/mame/includes/naughtyb.h +++ b/src/mame/includes/naughtyb.h @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:Brad Oliver,Sal,John Bugliarisi,Paul Priest +// license:??? +// copyright-holders:Brad Oliver,Sal and John Bugliarisi,Paul Priest #include "audio/pleiads.h" class naughtyb_state : public driver_device diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h index 399a83e9a05..5c5b19c585c 100644 --- a/src/mame/includes/neogeo.h +++ b/src/mame/includes/neogeo.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h index db9654bf3cf..ed38065f97a 100644 --- a/src/mame/includes/ninjakd2.h +++ b/src/mame/includes/ninjakd2.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Roberto Ventura, Leandro Dardini, Yochizo, Nicola Salmoria /****************************************************************************** diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h index d090f8b8f2e..e0d73a3cbb1 100644 --- a/src/mame/includes/nmk16.h +++ b/src/mame/includes/nmk16.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshall,Angelo Salese,Luca Elia #include "machine/nmk112.h" #include "sound/okim6295.h" diff --git a/src/mame/includes/popeye.h b/src/mame/includes/popeye.h index fc41c1ffccc..b8057e484d9 100644 --- a/src/mame/includes/popeye.h +++ b/src/mame/includes/popeye.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Marc Lafontaine, Couriersud class popeye_state : public driver_device { diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h index 2bd29ed83ec..3721a05fed7 100644 --- a/src/mame/includes/popper.h +++ b/src/mame/includes/popper.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli /*************************************************************************** diff --git a/src/mame/includes/portrait.h b/src/mame/includes/portrait.h index edf4c2a37ce..0948166636a 100644 --- a/src/mame/includes/portrait.h +++ b/src/mame/includes/portrait.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff, Pierpaolo Prazzoli #include "sound/tms5220.h" diff --git a/src/mame/includes/qix.h b/src/mame/includes/qix.h index f022e78e591..1a47ccac58d 100644 --- a/src/mame/includes/qix.h +++ b/src/mame/includes/qix.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:John Butler, Ed Mueller, Aaron Giles /*************************************************************************** diff --git a/src/mame/includes/raiden.h b/src/mame/includes/raiden.h index 442dd95f9c4..5d5292a6819 100644 --- a/src/mame/includes/raiden.h +++ b/src/mame/includes/raiden.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Oliver Bergmann, Bryan McPhail, Randy Mongenel /******************************************************************************* diff --git a/src/mame/includes/renegade.h b/src/mame/includes/renegade.h index eecfc194f5d..ff01fece59f 100644 --- a/src/mame/includes/renegade.h +++ b/src/mame/includes/renegade.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Phil Stroffolino, Carlos A. Lozano, Rob Rosenbrock #include "sound/msm5205.h" diff --git a/src/mame/includes/sidearms.h b/src/mame/includes/sidearms.h index c0fc7e3c22f..55f14863eec 100644 --- a/src/mame/includes/sidearms.h +++ b/src/mame/includes/sidearms.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Curt Coder #include "video/bufsprite.h" diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h index 64d2663e559..2c6ab574b69 100644 --- a/src/mame/includes/snk.h +++ b/src/mame/includes/snk.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Marco Cassili,Ernesto Corvi,Tim Lindquist,Carlos A. Lozano,Bryan McPhail,Jarek Parchanski,Nicola Salmoria,Tomasz Slanina,Phil Stroffolino,Acho A. Tang,Victor Trucco /************************************************************************* diff --git a/src/mame/includes/srmp2.h b/src/mame/includes/srmp2.h index 6162c62b584..e4d48edd5e1 100644 --- a/src/mame/includes/srmp2.h +++ b/src/mame/includes/srmp2.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Yochizo, Takahiro Nogi #include "sound/msm5205.h" #include "video/seta001.h" diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h index 7d108588135..0cf2da3d417 100644 --- a/src/mame/includes/starshp1.h +++ b/src/mame/includes/starshp1.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Stefan Jokisch /* * The schematics don't seem to make a lot of sense when it diff --git a/src/mame/includes/starwars.h b/src/mame/includes/starwars.h index a4e8062873e..921ce07ac30 100644 --- a/src/mame/includes/starwars.h +++ b/src/mame/includes/starwars.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/includes/superchs.h b/src/mame/includes/superchs.h index 45424c596a4..7e6cfaf9b70 100644 --- a/src/mame/includes/superchs.h +++ b/src/mame/includes/superchs.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "machine/eepromser.h" #include "video/tc0480scp.h" diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h index fd3e92a4857..91580061fa4 100644 --- a/src/mame/includes/suprnova.h +++ b/src/mame/includes/suprnova.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood, Sylvain Glaize, Paul Priest, Olivier Galibert #include "cpu/sh2/sh2.h" diff --git a/src/mame/includes/tagteam.h b/src/mame/includes/tagteam.h index aa588c11567..aebbdc78331 100644 --- a/src/mame/includes/tagteam.h +++ b/src/mame/includes/tagteam.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff, Brad Oliver class tagteam_state : public driver_device { diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 98c9f772fbb..84709a891c5 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Bryan McPhail, Brad Oliver, Andrew Prime, Brian Troha, Nicola Salmoria #include "machine/taitoio.h" #include "sound/okim6295.h" diff --git a/src/mame/includes/taitoipt.h b/src/mame/includes/taitoipt.h index d41f6d05322..7e79c8c2725 100644 --- a/src/mame/includes/taitoipt.h +++ b/src/mame/includes/taitoipt.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Bryan McPhail, Brad Oliver, Andrew Prime, Brian Troha, Nicola Salmoria /******************************************************************************* diff --git a/src/mame/includes/tecmo16.h b/src/mame/includes/tecmo16.h index 3a9598f729c..2324b70ac61 100644 --- a/src/mame/includes/tecmo16.h +++ b/src/mame/includes/tecmo16.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Eisuke Watanabe, Nicola Salmoria #include "video/tecmo_spr.h" #include "video/tecmo_mix.h" diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 85e5ccc0a0d..354758b4002 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Quench, Yochizo, David Haywood /**************** Machine stuff ******************/ //#define USE_HD64x180 /* Define if CPU support is available */ diff --git a/src/mame/includes/travrusa.h b/src/mame/includes/travrusa.h index fb3e1223e1e..d0d17f0bfac 100644 --- a/src/mame/includes/travrusa.h +++ b/src/mame/includes/travrusa.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor,John Clegg,Tomasz Slanina class travrusa_state : public driver_device { diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h index cfa01811967..b347ecf7b89 100644 --- a/src/mame/includes/ultratnk.h +++ b/src/mame/includes/ultratnk.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Phil Stroffolino, Stefan Jokisch /************************************************************************* diff --git a/src/mame/includes/undrfire.h b/src/mame/includes/undrfire.h index c17354b3763..982e91f5ae7 100644 --- a/src/mame/includes/undrfire.h +++ b/src/mame/includes/undrfire.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "machine/eepromser.h" #include "video/tc0100scn.h" diff --git a/src/mame/includes/vball.h b/src/mame/includes/vball.h index 775052adafe..e43c3421430 100644 --- a/src/mame/includes/vball.h +++ b/src/mame/includes/vball.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Paul Hampson class vball_state : public driver_device { diff --git a/src/mame/includes/williams.h b/src/mame/includes/williams.h index d2746467578..adcca117690 100644 --- a/src/mame/includes/williams.h +++ b/src/mame/includes/williams.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Soderstrom, Marc LaFontaine, Aaron Giles /************************************************************************* diff --git a/src/mame/includes/xain.h b/src/mame/includes/xain.h index b1a1db6bc33..1f65025d602 100644 --- a/src/mame/includes/xain.h +++ b/src/mame/includes/xain.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino class xain_state : public driver_device { diff --git a/src/mame/layout/chsuper.lay b/src/mame/layout/chsuper.lay new file mode 100644 index 00000000000..c3a385ebb24 --- /dev/null +++ b/src/mame/layout/chsuper.lay @@ -0,0 +1,262 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- + Champion Super realistic control panel + with clickable button.lamps + coin in. + + Written by Roberto Fresca. +--> + +<!-- define button-lamps --> + + <element name="hold1" defstate="0"> + <rect state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.15" green="0.0" blue="0.0" /> + </rect> + <text string="HOLD 1"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.1" width="1" height="0.4" /> + </text> + <text string="BLACK/MAX"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.5" width="1" height="0.4" /> + </text> + </element> + + <element name="hold2" defstate="0"> + <rect state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.15" green="0.0" blue="0.0" /> + </rect> + <text string="HOLD 2"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.1" width="1" height="0.4" /> + </text> + <text string="LOW"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.5" width="1" height="0.4" /> + </text> + </element> + + <element name="hold3" defstate="0"> + <rect state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.15" green="0.0" blue="0.0" /> + </rect> + <text string="HOLD 3"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.3" width="1" height="0.4" /> + </text> + </element> + + <element name="hold4" defstate="0"> + <rect state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.15" green="0.0" blue="0.0" /> + </rect> + <text string="HOLD 4"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.1" width="1" height="0.4" /> + </text> + <text string="HIGH"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.5" width="1" height="0.4" /> + </text> + </element> + + <element name="hold5" defstate="0"> + <rect state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.15" green="0.0" blue="0.0" /> + </rect> + <text string="HOLD 5"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.1" width="1" height="0.4" /> + </text> + <text string="RED/D-UP"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.5" width="1" height="0.4" /> + </text> + </element> + + <element name="bet" defstate="0"> + <rect state="1"> + <color red="1.0" green="0.5" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.12" green="0.06" blue="0.0" /> + </rect> + <text string="BET"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.1" width="1" height="0.4" /> + </text> + <text string="TAKE"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.5" width="1" height="0.4" /> + </text> + </element> + + <element name="start" defstate="0"> + <rect state="1"> + <color red="0.0" green="1.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.0" green="0.12" blue="0.0" /> + </rect> + <text string="START"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.1" width="1" height="0.4" /> + </text> + <text string="D-UP"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.5" width="1" height="0.4" /> + </text> + </element> + + +<!-- define basic elements --> + + <element name="cpanel"> + <rect> + <color red="0.0" green="0.0" blue="0.0" /> + </rect> + </element> + + <element name="cpanel2"> + <rect> + <color red="0.045" green="0.045" blue="0.045" /> + </rect> + </element> + + <element name="coinin_plate"> + <rect> + <color red="0.15" green="0.15" blue="0.15" /> + </rect> + <text string="COIN"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.8" width="1" height="0.2" /> + </text> + </element> + + <element name="coinin_hole"> + <rect> + <color red="0.0" green="0.0" blue="0.0" /> + </rect> + </element> + + <element name="hold_b" defstate="0"> + <rect state="1"> + <color red="0.75" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.12" green="0.0" blue="0.0" /> + </rect> + </element> + + <element name="bet_b" defstate="0"> + <rect state="1"> + <color red="0.8" green="0.4" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.1" green="0.05" blue="0.0" /> + </rect> + </element> + + <element name="start_b" defstate="0"> + <rect state="1"> + <color red="0.0" green="0.8" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.0" green="0.1" blue="0.0" /> + </rect> + </element> + + +<!-- define background --> + + <view name="Button Lamps"> + <screen index="0"> + <bounds left="0" top="0" right="4" bottom="3" /> + </screen> + + <bezel element="cpanel"> + <bounds left="0" right="4" top="3" bottom="3.34" /> + </bezel> + + <bezel element="cpanel2"> + <bounds left="0" right="4" top="3" bottom="3.17" /> + </bezel> + + <bezel element="coinin_plate" inputtag="IN2" inputmask="0x01"> + <bounds x="0.10" y="3.05" width="0.15" height="0.24" /> + </bezel> + + <bezel element="coinin_hole" inputtag="IN2" inputmask="0x01"> + <bounds x="0.16" y="3.08" width="0.03" height="0.14" /> + </bezel> + +<!-- define lamps --> + + <bezel name="lamp0" element="hold_b" inputtag="IN0" inputmask="0x02"> + <bounds x="0.55" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp0" element="hold1" inputtag="IN0" inputmask="0x02"> + <bounds x="0.57" y="3.07" width="0.31" height="0.20" /> + </bezel> + + <bezel name="lamp1" element="hold_b" inputtag="IN1" inputmask="0x01"> + <bounds x="1.00" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp1" element="hold2" inputtag="IN1" inputmask="0x01"> + <bounds x="1.02" y="3.07" width="0.31" height="0.20" /> + </bezel> + + <bezel name="lamp2" element="hold_b" inputtag="IN1" inputmask="0x02"> + <bounds x="1.45" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp2" element="hold3" inputtag="IN1" inputmask="0x02"> + <bounds x="1.47" y="3.07" width="0.31" height="0.20" /> + </bezel> + + <bezel name="lamp3" element="hold_b" inputtag="IN0" inputmask="0x80"> + <bounds x="1.90" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp3" element="hold4" inputtag="IN0" inputmask="0x80"> + <bounds x="1.92" y="3.07" width="0.31" height="0.20" /> + </bezel> + + <bezel name="lamp4" element="hold_b" inputtag="IN0" inputmask="0x10"> + <bounds x="2.35" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp4" element="hold5" inputtag="IN0" inputmask="0x10"> + <bounds x="2.37" y="3.07" width="0.31" height="0.20" /> + </bezel> + + <bezel name="lamp5" element="bet_b" inputtag="IN0" inputmask="0x04"> + <bounds x="3.10" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp5" element="bet" inputtag="IN0" inputmask="0x04"> + <bounds x="3.12" y="3.07" width="0.31" height="0.20" /> + </bezel> + + <bezel name="lamp6" element="start_b" inputtag="IN0" inputmask="0x08"> + <bounds x="3.55" y="3.05" width="0.35" height="0.24" /> + </bezel> + <bezel name="lamp6" element="start" inputtag="IN0" inputmask="0x08"> + <bounds x="3.57" y="3.07" width="0.31" height="0.20" /> + </bezel> + + </view> +</mamelayout> diff --git a/src/mame/machine/atarifb.c b/src/mame/machine/atarifb.c index 449aaf0933a..02cf56c65ba 100644 --- a/src/mame/machine/atarifb.c +++ b/src/mame/machine/atarifb.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mike Balfour, Patrick Lawrence, Brad Oliver /************************************************************************* diff --git a/src/mame/machine/bigevglf.c b/src/mame/machine/bigevglf.c index 15c7b765848..bca48fed8af 100644 --- a/src/mame/machine/bigevglf.c +++ b/src/mame/machine/bigevglf.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina /*************************************************************************** diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c index 84a3a6c125b..5fb2ad4e140 100644 --- a/src/mame/machine/bublbobl.c +++ b/src/mame/machine/bublbobl.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Chris Moore, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/machine/cps2crpt.c b/src/mame/machine/cps2crpt.c index e0af3a75bf6..9af7cf4d248 100644 --- a/src/mame/machine/cps2crpt.c +++ b/src/mame/machine/cps2crpt.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Andreas Naive, Nicola Salmoria,Charles MacDonald /****************************************************************************** diff --git a/src/mame/machine/kaneko_toybox.c b/src/mame/machine/kaneko_toybox.c index 73e8927b7ed..cf0ba52dec1 100644 --- a/src/mame/machine/kaneko_toybox.c +++ b/src/mame/machine/kaneko_toybox.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood, Luca Elia, Sebastien Volpe /* Kaneko 'Toybox' protection diff --git a/src/mame/machine/kaneko_toybox.h b/src/mame/machine/kaneko_toybox.h index cd738b92a2d..351d0872aca 100644 --- a/src/mame/machine/kaneko_toybox.h +++ b/src/mame/machine/kaneko_toybox.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood, Luca Elia, Sebastien Volpe /* Kaneko Toybox */ diff --git a/src/mame/machine/mhavoc.c b/src/mame/machine/mhavoc.c index ccc1f146bc6..4c3a9dc2ab1 100644 --- a/src/mame/machine/mhavoc.c +++ b/src/mame/machine/mhavoc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Appolo /*************************************************************************** diff --git a/src/mame/machine/midtunit.c b/src/mame/machine/midtunit.c index 32e68e0c6b0..dc4e62533e2 100644 --- a/src/mame/machine/midtunit.c +++ b/src/mame/machine/midtunit.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/machine/midyunit.c b/src/mame/machine/midyunit.c index 8bfb5a8afb3..a5d43682d3d 100644 --- a/src/mame/machine/midyunit.c +++ b/src/mame/machine/midyunit.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/machine/mw8080bw.c b/src/mame/machine/mw8080bw.c index c07ba93eb71..ac10d9ad4fd 100644 --- a/src/mame/machine/mw8080bw.c +++ b/src/mame/machine/mw8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni,Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/machine/neocrypt.c b/src/mame/machine/neocrypt.c index c04c3e40e2e..11bc0f2b217 100644 --- a/src/mame/machine/neocrypt.c +++ b/src/mame/machine/neocrypt.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/machine/qix.c b/src/mame/machine/qix.c index 24e92700bcf..8c83f3532c6 100644 --- a/src/mame/machine/qix.c +++ b/src/mame/machine/qix.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:John Butler, Ed Mueller, Aaron Giles /*************************************************************************** diff --git a/src/mame/machine/starwars.c b/src/mame/machine/starwars.c index 4ad0c734b2d..4caa47d9df1 100644 --- a/src/mame/machine/starwars.c +++ b/src/mame/machine/starwars.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/machine/williams.c b/src/mame/machine/williams.c index 4c6f238af25..d0ce9f270de 100644 --- a/src/mame/machine/williams.c +++ b/src/mame/machine/williams.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Soderstrom, Marc LaFontaine, Aaron Giles /*************************************************************************** diff --git a/src/mame/video/1942.c b/src/mame/video/1942.c index 02e588a6d77..bc4b168a6cf 100644 --- a/src/mame/video/1942.c +++ b/src/mame/video/1942.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Couriersud /*************************************************************************** diff --git a/src/mame/video/8080bw.c b/src/mame/video/8080bw.c index 333a160cb67..d5779ed8828 100644 --- a/src/mame/video/8080bw.c +++ b/src/mame/video/8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts,Nicola Salmoria,Tormod Tjaberg,Mirko Buffoni,Lee Taylor,Valerio Verrando,Marco Cassili,Zsolt Vasvari,Aaron Giles,Jonathan Gevaryahu,hap,Robbbert /*************************************************************************** diff --git a/src/mame/video/asuka.c b/src/mame/video/asuka.c index 7ae0cebbbac..60d30f15bd4 100644 --- a/src/mame/video/asuka.c +++ b/src/mame/video/asuka.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Brian Troha #include "emu.h" #include "includes/asuka.h" diff --git a/src/mame/video/atarifb.c b/src/mame/video/atarifb.c index d4986deff06..8f8c3d23ad0 100644 --- a/src/mame/video/atarifb.c +++ b/src/mame/video/atarifb.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mike Balfour, Patrick Lawrence, Brad Oliver /************************************************************************* diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c index 1b5d6b3b37b..66ef84ca034 100644 --- a/src/mame/video/avgdvg.c +++ b/src/mame/video/avgdvg.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Eric Smith, Brad Oliver, Bernd Wiebelt, Aaron Giles, Andrew Caldwell /************************************************************************* diff --git a/src/mame/video/avgdvg.h b/src/mame/video/avgdvg.h index 79f923e7f46..2a455974dc0 100644 --- a/src/mame/video/avgdvg.h +++ b/src/mame/video/avgdvg.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Eric Smith, Brad Oliver, Bernd Wiebelt, Aaron Giles, Andrew Caldwell #ifndef __AVGDVG__ #define __AVGDVG__ diff --git a/src/mame/video/bigevglf.c b/src/mame/video/bigevglf.c index fb7e333e47d..0684433e3ca 100644 --- a/src/mame/video/bigevglf.c +++ b/src/mame/video/bigevglf.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Jarek Burczynski, Tomasz Slanina /*************************************************************************** diff --git a/src/mame/video/bionicc.c b/src/mame/video/bionicc.c index 8379cd0b78c..6f61d0ff32b 100644 --- a/src/mame/video/bionicc.c +++ b/src/mame/video/bionicc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /*************************************************************************** diff --git a/src/mame/video/bking.c b/src/mame/video/bking.c index ad74f046626..87b0795ea05 100644 --- a/src/mame/video/bking.c +++ b/src/mame/video/bking.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/bublbobl.c b/src/mame/video/bublbobl.c index 5efdd4db370..9ec2ca6bb37 100644 --- a/src/mame/video/bublbobl.c +++ b/src/mame/video/bublbobl.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Chris Moore, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/video/carjmbre.c b/src/mame/video/carjmbre.c index 62256f86f72..374dcc0f9b9 100644 --- a/src/mame/video/carjmbre.c +++ b/src/mame/video/carjmbre.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:insideoutboy, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/video/ccastles.c b/src/mame/video/ccastles.c index 5a93887d9f5..9618fcdf9f0 100644 --- a/src/mame/video/ccastles.c +++ b/src/mame/video/ccastles.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Patrick Lawrence, Aaron Giles /*************************************************************************** diff --git a/src/mame/video/changela.c b/src/mame/video/changela.c index 5e5a119997f..11de0e5269a 100644 --- a/src/mame/video/changela.c +++ b/src/mame/video/changela.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Jarek Burczynski, Phil Stroffolino, Tomasz Slanina /************************************************************************** Change Lanes - Video Hardware diff --git a/src/mame/video/cheekyms.c b/src/mame/video/cheekyms.c index 99a98580f82..ec317af70ec 100644 --- a/src/mame/video/cheekyms.c +++ b/src/mame/video/cheekyms.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor, Chris Moore /************************************************************************* Universal Cheeky Mouse Driver diff --git a/src/mame/video/ddragon.c b/src/mame/video/ddragon.c index be0207e80bd..a084b0fab8a 100644 --- a/src/mame/video/ddragon.c +++ b/src/mame/video/ddragon.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Philip Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont /*************************************************************************** diff --git a/src/mame/video/flower.c b/src/mame/video/flower.c index e2b0717f6b1..b7fee29475b 100644 --- a/src/mame/video/flower.c +++ b/src/mame/video/flower.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:insideoutboy, David Haywood, Stephh /* Flower Video Hardware */ diff --git a/src/mame/video/gcpinbal.c b/src/mame/video/gcpinbal.c index 7c95e87381c..a69fafb4c17 100644 --- a/src/mame/video/gcpinbal.c +++ b/src/mame/video/gcpinbal.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, R. Belmont #include "emu.h" #include "includes/gcpinbal.h" diff --git a/src/mame/video/gladiatr.c b/src/mame/video/gladiatr.c index 31a115c792a..d94bd4e7dd3 100644 --- a/src/mame/video/gladiatr.c +++ b/src/mame/video/gladiatr.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Victor Trucco,Steve Ellenoff,Phil Stroffolino,Tatsuyuki Satoh,Tomasz Slanina,Nicola Salmoria /*************************************************************************** diff --git a/src/mame/video/groundfx.c b/src/mame/video/groundfx.c index d910db9aa37..de894dd98b8 100644 --- a/src/mame/video/groundfx.c +++ b/src/mame/video/groundfx.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "emu.h" #include "includes/groundfx.h" diff --git a/src/mame/video/gsword.c b/src/mame/video/gsword.c index 2b3e4de0a50..95e78a571de 100644 --- a/src/mame/video/gsword.c +++ b/src/mame/video/gsword.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff,Jarek Parchanski /*************************************************************************** Great Swordsman diff --git a/src/mame/video/gunbustr.c b/src/mame/video/gunbustr.c index 902cc232480..ad0867d78d3 100644 --- a/src/mame/video/gunbustr.c +++ b/src/mame/video/gunbustr.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "emu.h" #include "includes/gunbustr.h" diff --git a/src/mame/video/legionna.c b/src/mame/video/legionna.c index 85f1869cb78..b37c6d5ef05 100644 --- a/src/mame/video/legionna.c +++ b/src/mame/video/legionna.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:David Graves, Angelo Salese, David Haywood, Tomasz Slanina /*************************************************************************** diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c index e46eae955bf..2a5bd454da9 100644 --- a/src/mame/video/m58.c +++ b/src/mame/video/m58.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor, John Clegg /*************************************************************************** diff --git a/src/mame/video/midtunit.c b/src/mame/video/midtunit.c index 3d574487122..bc8f35d6f91 100644 --- a/src/mame/video/midtunit.c +++ b/src/mame/video/midtunit.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/video/midyunit.c b/src/mame/video/midyunit.c index 753c51cb138..cb66b1b3092 100644 --- a/src/mame/video/midyunit.c +++ b/src/mame/video/midyunit.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Alex Pasadyn, Zsolt Vasvari, Kurt Mahan, Ernesto Corvi, Aaron Giles /************************************************************************* diff --git a/src/mame/video/mw8080bw.c b/src/mame/video/mw8080bw.c index f3ab3271a50..7129ce947fe 100644 --- a/src/mame/video/mw8080bw.c +++ b/src/mame/video/mw8080bw.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Strutts, Nicola Salmoria, Tormod Tjaberg, Mirko Buffoni,Lee Taylor, Valerio Verrando, Marco Cassili, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/n64.h b/src/mame/video/n64.h index 1968a495e49..b17445e00d8 100644 --- a/src/mame/video/n64.h +++ b/src/mame/video/n64.h @@ -372,6 +372,8 @@ struct rdp_span_aux INT32 m_dzpix_enc; UINT8* m_tmem; /* pointer to texture cache for this polygon */ bool m_start_span; + INT32 m_clamp_s_diff[8]; + INT32 m_clamp_t_diff[8]; }; struct rectangle_t diff --git a/src/mame/video/naughtyb.c b/src/mame/video/naughtyb.c index 18d8f448e3e..7a9da39b827 100644 --- a/src/mame/video/naughtyb.c +++ b/src/mame/video/naughtyb.c @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:Brad Oliver,Sal,John Bugliarisi,Paul Priest +// license:??? +// copyright-holders:Brad Oliver,Sal and John Bugliarisi,Paul Priest /*************************************************************************** video.c diff --git a/src/mame/video/neogeo.c b/src/mame/video/neogeo.c index 401ce8a1a4f..013c53eae06 100644 --- a/src/mame/video/neogeo.c +++ b/src/mame/video/neogeo.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/neogeo_spr.c b/src/mame/video/neogeo_spr.c index 495c1d6716c..b0c0db6fbd8 100644 --- a/src/mame/video/neogeo_spr.c +++ b/src/mame/video/neogeo_spr.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /* NeoGeo sprites (and fixed text layer) */ diff --git a/src/mame/video/neogeo_spr.h b/src/mame/video/neogeo_spr.h index b4bbf8f39e7..b3e6f41a728 100644 --- a/src/mame/video/neogeo_spr.h +++ b/src/mame/video/neogeo_spr.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari #define VERBOSE (0) diff --git a/src/mame/video/ninjakd2.c b/src/mame/video/ninjakd2.c index 9ff710e57e4..8d168e67a1b 100644 --- a/src/mame/video/ninjakd2.c +++ b/src/mame/video/ninjakd2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Roberto Ventura, Leandro Dardini, Yochizo, Nicola Salmoria /****************************************************************************** diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c index f142a334f56..f412b1f3abe 100644 --- a/src/mame/video/nmk16.c +++ b/src/mame/video/nmk16.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshall,Angelo Salese,Luca Elia /* notes... diff --git a/src/mame/video/popeye.c b/src/mame/video/popeye.c index 19beb801ae2..920a1f1b20b 100644 --- a/src/mame/video/popeye.c +++ b/src/mame/video/popeye.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Marc Lafontaine, Couriersud /*************************************************************************** diff --git a/src/mame/video/popper.c b/src/mame/video/popper.c index 660969c7550..ccabc1263f5 100644 --- a/src/mame/video/popper.c +++ b/src/mame/video/popper.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli /*************************************************************************** diff --git a/src/mame/video/portrait.c b/src/mame/video/portrait.c index e3dc2b46796..f9ba1b75d1b 100644 --- a/src/mame/video/portrait.c +++ b/src/mame/video/portrait.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff, Pierpaolo Prazzoli /*************************************************************************** diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c index be014f9aa77..53cacf4a472 100644 --- a/src/mame/video/qix.c +++ b/src/mame/video/qix.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:John Butler, Ed Mueller, Aaron Giles /*************************************************************************** diff --git a/src/mame/video/raiden.c b/src/mame/video/raiden.c index 5199d851732..728e0e3df48 100644 --- a/src/mame/video/raiden.c +++ b/src/mame/video/raiden.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Oliver Bergmann, Bryan McPhail, Randy Mongenel /******************************************************************************* diff --git a/src/mame/video/rdpspn16.c b/src/mame/video/rdpspn16.c index bc6fe817530..d36e14f7733 100644 --- a/src/mame/video/rdpspn16.c +++ b/src/mame/video/rdpspn16.c @@ -340,7 +340,7 @@ void n64_rdp::span_draw_1cycle(INT32 scanline, const extent_t &extent, const rdp #endif rdp_span_aux* userdata = (rdp_span_aux*)extent.userdata; - m_tex_pipe.calculate_clamp_diffs(tilenum, object); + m_tex_pipe.calculate_clamp_diffs(tilenum, userdata, object); const bool partialreject = (userdata->m_color_inputs.blender2b_a[0] == &userdata->m_inv_pixel_color.i.a && userdata->m_color_inputs.blender1b_a[0] == &userdata->m_pixel_color.i.a); const INT32 sel0 = (userdata->m_color_inputs.blender2b_a[0] == &userdata->m_memory_color.i.a) ? 1 : 0; @@ -529,7 +529,7 @@ void n64_rdp::span_draw_2cycle(INT32 scanline, const extent_t &extent, const rdp #endif rdp_span_aux* userdata = (rdp_span_aux*)extent.userdata; - m_tex_pipe.calculate_clamp_diffs(tile1, object); + m_tex_pipe.calculate_clamp_diffs(tile1, userdata, object); bool partialreject = (userdata->m_color_inputs.blender2b_a[1] == &userdata->m_inv_pixel_color.i.a && userdata->m_color_inputs.blender1b_a[1] == &userdata->m_pixel_color.i.a); INT32 sel0 = (userdata->m_color_inputs.blender2b_a[0] == &userdata->m_memory_color.i.a) ? 1 : 0; diff --git a/src/mame/video/rdptpipe.c b/src/mame/video/rdptpipe.c index 42b811330bf..e4b04bb6a42 100644 --- a/src/mame/video/rdptpipe.c +++ b/src/mame/video/rdptpipe.c @@ -163,7 +163,7 @@ void n64_texture_pipe_t::shift_copy(INT32* S, INT32* T, const n64_tile_t& tile) *T = (INT32)(INT16)sst; } -void n64_texture_pipe_t::clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile) +void n64_texture_pipe_t::clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile, rdp_span_aux* userdata) { if (tile.clamp_s) { @@ -174,7 +174,7 @@ void n64_texture_pipe_t::clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TF } else if (maxs) { - *S = m_clamp_s_diff[tilenum]; + *S = userdata->m_clamp_s_diff[tilenum]; *SFRAC = 0; } else @@ -196,7 +196,7 @@ void n64_texture_pipe_t::clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TF } else if (maxt) { - *T = m_clamp_t_diff[tilenum]; + *T = userdata->m_clamp_t_diff[tilenum]; *TFRAC = 0; } else @@ -210,7 +210,7 @@ void n64_texture_pipe_t::clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TF } } -void n64_texture_pipe_t::clamp_cycle_light(INT32* S, INT32* T, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile) +void n64_texture_pipe_t::clamp_cycle_light(INT32* S, INT32* T, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile, rdp_span_aux* userdata) { if (tile.clamp_s) { @@ -220,7 +220,7 @@ void n64_texture_pipe_t::clamp_cycle_light(INT32* S, INT32* T, const bool maxs, } else if (maxs) { - *S = m_clamp_s_diff[tilenum]; + *S = userdata->m_clamp_s_diff[tilenum]; } else { @@ -240,7 +240,7 @@ void n64_texture_pipe_t::clamp_cycle_light(INT32* S, INT32* T, const bool maxs, } else if (maxt) { - *T = m_clamp_t_diff[tilenum]; + *T = userdata->m_clamp_t_diff[tilenum]; } else { @@ -267,7 +267,7 @@ void n64_texture_pipe_t::cycle_nearest(color_t* TEX, color_t* prev, INT32 SSS, I INT32 sss1 = SSS, sst1 = SST; bool maxs, maxt; shift_cycle(&sss1, &sst1, &maxs, &maxt, tile); - clamp_cycle_light(&sss1, &sst1, maxs, maxt, tilenum, tile); + clamp_cycle_light(&sss1, &sst1, maxs, maxt, tilenum, tile, userdata); mask(&sss1, &sst1, tile); UINT32 tbase = tile.tmem + ((tile.line * sst1) & 0x1ff); @@ -313,7 +313,7 @@ void n64_texture_pipe_t::cycle_nearest_lerp(color_t* TEX, color_t* prev, INT32 S INT32 sss1 = SSS, sst1 = SST; bool maxs, maxt; shift_cycle(&sss1, &sst1, &maxs, &maxt, tile); - clamp_cycle_light(&sss1, &sst1, maxs, maxt, tilenum, tile); + clamp_cycle_light(&sss1, &sst1, maxs, maxt, tilenum, tile, userdata); mask(&sss1, &sst1, tile); UINT32 tbase = tile.tmem + ((tile.line * sst1) & 0x1ff); @@ -336,7 +336,7 @@ void n64_texture_pipe_t::cycle_linear(color_t* TEX, color_t* prev, INT32 SSS, IN INT32 sfrac = sss1 & 0x1f; INT32 tfrac = sst1 & 0x1f; - clamp_cycle(&sss1, &sst1, &sfrac, &tfrac, maxs, maxt, tilenum, tile); + clamp_cycle(&sss1, &sst1, &sfrac, &tfrac, maxs, maxt, tilenum, tile, userdata); INT32 sss2 = sss1 + 1; INT32 sst2 = sst1 + 1; @@ -401,7 +401,7 @@ void n64_texture_pipe_t::cycle_linear_lerp(color_t* TEX, color_t* prev, INT32 SS INT32 sfrac = sss1 & 0x1f; INT32 tfrac = sst1 & 0x1f; - clamp_cycle(&sss1, &sst1, &sfrac, &tfrac, maxs, maxt, tilenum, tile); + clamp_cycle(&sss1, &sst1, &sfrac, &tfrac, maxs, maxt, tilenum, tile, userdata); INT32 sss2 = sss1 + 1; INT32 sst2 = sst1 + 1; @@ -742,7 +742,7 @@ void n64_texture_pipe_t::lod_2cycle_limited(INT32* sss, INT32* sst, const INT32 } } -void n64_texture_pipe_t::calculate_clamp_diffs(UINT32 prim_tile, const rdp_poly_state& object) +void n64_texture_pipe_t::calculate_clamp_diffs(UINT32 prim_tile, rdp_span_aux* userdata, const rdp_poly_state& object) { const n64_tile_t* tiles = object.m_tiles; if (object.m_other_modes.cycle_type == CYCLE_TYPE_2) @@ -751,24 +751,24 @@ void n64_texture_pipe_t::calculate_clamp_diffs(UINT32 prim_tile, const rdp_poly_ { for (INT32 start = 0; start <= 7; start++) { - m_clamp_s_diff[start] = (tiles[start].sh >> 2) - (tiles[start].sl >> 2); - m_clamp_t_diff[start] = (tiles[start].th >> 2) - (tiles[start].tl >> 2); + userdata->m_clamp_s_diff[start] = (tiles[start].sh >> 2) - (tiles[start].sl >> 2); + userdata->m_clamp_t_diff[start] = (tiles[start].th >> 2) - (tiles[start].tl >> 2); } } else { const INT32 start = prim_tile; const INT32 end = (prim_tile + 1) & 7; - m_clamp_s_diff[start] = (tiles[start].sh >> 2) - (tiles[start].sl >> 2); - m_clamp_t_diff[start] = (tiles[start].th >> 2) - (tiles[start].tl >> 2); - m_clamp_s_diff[end] = (tiles[end].sh >> 2) - (tiles[end].sl >> 2); - m_clamp_t_diff[end] = (tiles[end].th >> 2) - (tiles[end].tl >> 2); + userdata->m_clamp_s_diff[start] = (tiles[start].sh >> 2) - (tiles[start].sl >> 2); + userdata->m_clamp_t_diff[start] = (tiles[start].th >> 2) - (tiles[start].tl >> 2); + userdata->m_clamp_s_diff[end] = (tiles[end].sh >> 2) - (tiles[end].sl >> 2); + userdata->m_clamp_t_diff[end] = (tiles[end].th >> 2) - (tiles[end].tl >> 2); } } else//1-cycle or copy { - m_clamp_s_diff[prim_tile] = (tiles[prim_tile].sh >> 2) - (tiles[prim_tile].sl >> 2); - m_clamp_t_diff[prim_tile] = (tiles[prim_tile].th >> 2) - (tiles[prim_tile].tl >> 2); + userdata->m_clamp_s_diff[prim_tile] = (tiles[prim_tile].sh >> 2) - (tiles[prim_tile].sl >> 2); + userdata->m_clamp_t_diff[prim_tile] = (tiles[prim_tile].th >> 2) - (tiles[prim_tile].tl >> 2); } } diff --git a/src/mame/video/rdptpipe.h b/src/mame/video/rdptpipe.h index 7397f33d131..3142d511b01 100644 --- a/src/mame/video/rdptpipe.h +++ b/src/mame/video/rdptpipe.h @@ -104,7 +104,7 @@ class n64_texture_pipe_t texel_cycler_t m_cycle[4]; void copy(color_t* TEX, INT32 SSS, INT32 SST, UINT32 tilenum, const rdp_poly_state& object, rdp_span_aux* userdata); - void calculate_clamp_diffs(UINT32 prim_tile, const rdp_poly_state& object); + void calculate_clamp_diffs(UINT32 prim_tile, rdp_span_aux* userdata, const rdp_poly_state& object); void lod_1cycle(INT32* sss, INT32* sst, const INT32 s, const INT32 t, const INT32 w, const INT32 dsinc, const INT32 dtinc, const INT32 dwinc, rdp_span_aux* userdata, const rdp_poly_state& object); void lod_2cycle(INT32* sss, INT32* sst, const INT32 s, const INT32 t, const INT32 w, const INT32 dsinc, const INT32 dtinc, const INT32 dwinc, const INT32 prim_tile, INT32* t1, INT32* t2, rdp_span_aux* userdata, const rdp_poly_state& object); void lod_2cycle_limited(INT32* sss, INT32* sst, const INT32 s, const INT32 t, INT32 w, const INT32 dsinc, const INT32 dtinc, const INT32 dwinc, const INT32 prim_tile, INT32* t1, const rdp_poly_state& object); @@ -120,8 +120,8 @@ class n64_texture_pipe_t void shift_cycle(INT32* S, INT32* T, bool* maxs, bool* maxt, const n64_tile_t& tile); void shift_copy(INT32* S, INT32* T, const n64_tile_t& tile); - void clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile); - void clamp_cycle_light(INT32* S, INT32* T, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile); + void clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile, rdp_span_aux* userdata); + void clamp_cycle_light(INT32* S, INT32* T, const bool maxs, const bool maxt, const INT32 tilenum, const n64_tile_t& tile, rdp_span_aux* userdata); UINT32 fetch_nop(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); @@ -165,8 +165,6 @@ class n64_texture_pipe_t INT32 m_maskbits_table[16]; UINT32 m_expand_16to32_table[0x10000]; UINT16 m_lod_lookup[0x80000]; - INT32 m_clamp_s_diff[8]; - INT32 m_clamp_t_diff[8]; }; #endif // _VIDEO_RDPTEXPIPE_H_ diff --git a/src/mame/video/renegade.c b/src/mame/video/renegade.c index 0fba8eb3c1f..963fa433cc5 100644 --- a/src/mame/video/renegade.c +++ b/src/mame/video/renegade.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Phil Stroffolino, Carlos A. Lozano, Rob Rosenbrock /*************************************************************************** diff --git a/src/mame/video/sidearms.c b/src/mame/video/sidearms.c index 240a0121c88..ece733b23f2 100644 --- a/src/mame/video/sidearms.c +++ b/src/mame/video/sidearms.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Leaman, Curt Coder /*************************************************************************** diff --git a/src/mame/video/snk.c b/src/mame/video/snk.c index f45888df93e..ad85d5ac4ee 100644 --- a/src/mame/video/snk.c +++ b/src/mame/video/snk.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Marco Cassili,Ernesto Corvi,Tim Lindquist,Carlos A. Lozano,Bryan McPhail,Jarek Parchanski,Nicola Salmoria,Tomasz Slanina,Phil Stroffolino,Acho A. Tang,Victor Trucco #include "emu.h" #include "includes/snk.h" diff --git a/src/mame/video/srmp2.c b/src/mame/video/srmp2.c index 8970d15dd3c..0b1d8252fb4 100644 --- a/src/mame/video/srmp2.c +++ b/src/mame/video/srmp2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Yochizo, Takahiro Nogi /*************************************************************************** diff --git a/src/mame/video/starshp1.c b/src/mame/video/starshp1.c index 7a8337a0657..62065fcb200 100644 --- a/src/mame/video/starshp1.c +++ b/src/mame/video/starshp1.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Frank Palazzolo, Stefan Jokisch /*************************************************************************** diff --git a/src/mame/video/superchs.c b/src/mame/video/superchs.c index 5783ef9c587..171ebd697e4 100644 --- a/src/mame/video/superchs.c +++ b/src/mame/video/superchs.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "emu.h" #include "includes/superchs.h" diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c index ecacd5b26be..1ac55bf383a 100644 --- a/src/mame/video/suprnova.c +++ b/src/mame/video/suprnova.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Haywood, Sylvain Glaize, Paul Priest, Olivier Galibert /* Super Kaneko Nova System video */ diff --git a/src/mame/video/tagteam.c b/src/mame/video/tagteam.c index 6a6f7358d9a..923abc5856f 100644 --- a/src/mame/video/tagteam.c +++ b/src/mame/video/tagteam.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Steve Ellenoff, Brad Oliver /*************************************************************************** diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c index 9c073b6891d..0fc366488ac 100644 --- a/src/mame/video/taito_f2.c +++ b/src/mame/video/taito_f2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:David Graves, Bryan McPhail, Brad Oliver, Andrew Prime, Brian Troha, Nicola Salmoria #include "emu.h" #include "includes/taito_f2.h" diff --git a/src/mame/video/tecmo16.c b/src/mame/video/tecmo16.c index e70706ba5a1..32a50cb23a2 100644 --- a/src/mame/video/tecmo16.c +++ b/src/mame/video/tecmo16.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Eisuke Watanabe, Nicola Salmoria /****************************************************************************** diff --git a/src/mame/video/tia.c b/src/mame/video/tia.c index da95bd4ae8c..d6d08ecfb6d 100644 --- a/src/mame/video/tia.c +++ b/src/mame/video/tia.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Wilbert Pol,Stefan Jokisch /*************************************************************************** diff --git a/src/mame/video/tia.h b/src/mame/video/tia.h index 141db4f36c4..fd58a3fb905 100644 --- a/src/mame/video/tia.h +++ b/src/mame/video/tia.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Wilbert Pol,Stefan Jokisch #ifndef _VIDEO_TIA_H_ #define _VIDEO_TIA_H_ diff --git a/src/mame/video/toaplan2.c b/src/mame/video/toaplan2.c index b47d98d2015..4a0b2f72a3e 100644 --- a/src/mame/video/toaplan2.c +++ b/src/mame/video/toaplan2.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Quench, Yochizo, David Haywood /*************************************************************************** diff --git a/src/mame/video/travrusa.c b/src/mame/video/travrusa.c index 16de2a477f2..4297eb90a86 100644 --- a/src/mame/video/travrusa.c +++ b/src/mame/video/travrusa.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Lee Taylor,John Clegg,Tomasz Slanina /*************************************************************************** diff --git a/src/mame/video/ultratnk.c b/src/mame/video/ultratnk.c index bf552ecce03..5efbf1a4677 100644 --- a/src/mame/video/ultratnk.c +++ b/src/mame/video/ultratnk.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Phil Stroffolino, Stefan Jokisch /*************************************************************************** diff --git a/src/mame/video/undrfire.c b/src/mame/video/undrfire.c index bc476538eb4..f5e6e3606f8 100644 --- a/src/mame/video/undrfire.c +++ b/src/mame/video/undrfire.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail, David Graves #include "emu.h" #include "includes/undrfire.h" diff --git a/src/mame/video/vball.c b/src/mame/video/vball.c index 57ef5f8bbf3..8a7e8f9a26f 100644 --- a/src/mame/video/vball.c +++ b/src/mame/video/vball.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Paul Hampson /*************************************************************************** diff --git a/src/mame/video/williams.c b/src/mame/video/williams.c index 8af5f890b9d..a63f22c35c8 100644 --- a/src/mame/video/williams.c +++ b/src/mame/video/williams.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Michael Soderstrom, Marc LaFontaine, Aaron Giles /*************************************************************************** diff --git a/src/mame/video/xain.c b/src/mame/video/xain.c index 21da90085f2..c50a729011a 100644 --- a/src/mame/video/xain.c +++ b/src/mame/video/xain.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino /*************************************************************************** diff --git a/src/mess/audio/gb.c b/src/mess/audio/gb.c index 2ca82aa5657..71925f030bf 100644 --- a/src/mess/audio/gb.c +++ b/src/mess/audio/gb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Anthony Kruize /************************************************************************************** * Game Boy sound emulation (c) Anthony Kruize (trandor@labyrinth.net.au) diff --git a/src/mess/audio/gb.h b/src/mess/audio/gb.h index d8eb9d6109b..c86cad02b76 100644 --- a/src/mess/audio/gb.h +++ b/src/mess/audio/gb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Anthony Kruize #ifndef __GBSOUND_H__ #define __GBSOUND_H__ diff --git a/src/mess/audio/mac.c b/src/mess/audio/mac.c index 7a0b7a93a62..b93b4d86e0d 100644 --- a/src/mess/audio/mac.c +++ b/src/mess/audio/mac.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /*************************************************************************** diff --git a/src/mess/drivers/apple1.c b/src/mess/drivers/apple1.c index 34ff9ab0b31..3f6afe2be77 100644 --- a/src/mess/drivers/apple1.c +++ b/src/mess/drivers/apple1.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Daniels, Colin Howell, R. Belmont /********************************************************************** diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c index ca639730143..aa1ae726ac3 100644 --- a/src/mess/drivers/bbc.c +++ b/src/mess/drivers/bbc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Gordon Jefferyes, Nigel Barnes /****************************************************************************** BBC Model A,B diff --git a/src/mess/drivers/gb.c b/src/mess/drivers/gb.c index ffd2a304c30..97620173d3b 100644 --- a/src/mess/drivers/gb.c +++ b/src/mess/drivers/gb.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Anthony Kruize,Wilbert Pol /*************************************************************************** gb.c diff --git a/src/mess/drivers/glasgow.c b/src/mess/drivers/glasgow.c index fd9f671d6ee..47ac4b8b2e7 100644 --- a/src/mess/drivers/glasgow.c +++ b/src/mess/drivers/glasgow.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Dirk Verwiebe, Robbbert, Ralf Schaefer, Cowering /*************************************************************************** Mephisto Glasgow 3 S chess computer diff --git a/src/mess/drivers/junior.c b/src/mess/drivers/junior.c index b6432b9538a..52e63a7c215 100644 --- a/src/mess/drivers/junior.c +++ b/src/mess/drivers/junior.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Robbbert, Manfred Schneider /*************************************************************************** diff --git a/src/mess/drivers/mac.c b/src/mess/drivers/mac.c index bc670603bdc..65cdb2711ca 100644 --- a/src/mess/drivers/mac.c +++ b/src/mess/drivers/mac.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /**************************************************************************** diff --git a/src/mess/drivers/mmodular.c b/src/mess/drivers/mmodular.c index 4944c14aa5d..b80aa7ab643 100644 --- a/src/mess/drivers/mmodular.c +++ b/src/mess/drivers/mmodular.c @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:??? // copyright-holders:Dirk Verwiebe, Ralf Schaefer, Cowering /****************************************************************************** Mephisto Chess Computers using plugin modules diff --git a/src/mess/drivers/mtx.c b/src/mess/drivers/mtx.c index ddc61773f8c..df1a4ee859f 100644 --- a/src/mess/drivers/mtx.c +++ b/src/mess/drivers/mtx.c @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:(Original Author?), Dirk Best, Curt Coder +// license:??? +// copyright-holders:Lee Ward, Dirk Best, Curt Coder /************************************************************************* Memotech MTX 500, MTX 512 and RS 128 diff --git a/src/mess/drivers/ng_aes.c b/src/mess/drivers/ng_aes.c index 308d6a9d56b..6cc3293a464 100644 --- a/src/mess/drivers/ng_aes.c +++ b/src/mess/drivers/ng_aes.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /*************************************************************************** diff --git a/src/mess/drivers/scorpion.c b/src/mess/drivers/scorpion.c index de840193ade..80385da7774 100644 --- a/src/mess/drivers/scorpion.c +++ b/src/mess/drivers/scorpion.c @@ -322,6 +322,8 @@ ROM_START(scorpio) ROMX_LOAD("scorp2.rom", 0x018000, 0x4000, CRC(fd0d3ce1) SHA1(07783ee295274d8ff15d935bfd787c8ac1d54900), ROM_BIOS(7)) ROMX_LOAD("scorp3.rom", 0x01c000, 0x4000, CRC(1fe1d003) SHA1(33703e97cc93b7edfcc0334b64233cf81b7930db), ROM_BIOS(7)) + ROM_FILL( 0x1fe47, 1, 0x3e) // patch TR-DOS bug + ROM_REGION(0x01000, "keyboard", 0) ROM_LOAD( "scrpkey.rom", 0x0000, 0x1000, CRC(e938a510) SHA1(2753993c97ff0fc6cff26ed792929abc1288dc6f)) diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c index bd7c6f37c8d..1a4d225a94a 100644 --- a/src/mess/drivers/sms.c +++ b/src/mess/drivers/sms.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Wilbert Pol, Charles MacDonald,Mathis Rosenhauer,Brad Oliver,Michael Luong,Fabio Priuli,Enik Land /****************************************************************************** Contributors: diff --git a/src/mess/drivers/supercon.c b/src/mess/drivers/supercon.c index 7dfc8d01319..9c39262fa6f 100644 --- a/src/mess/drivers/supercon.c +++ b/src/mess/drivers/supercon.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Ralf Schaefer, Robbbert /****************************************************************************** Novag SuperConstellation Chess Computer diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c index 6b518168c46..7db4cc0d366 100644 --- a/src/mess/drivers/svi318.c +++ b/src/mess/drivers/svi318.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Sean Young,Tomas Karlsson /* ** svi318.c : driver for Spectravideo SVI-318 and SVI-328 diff --git a/src/mess/drivers/vc4000.c b/src/mess/drivers/vc4000.c index 74e69469d01..7eaf5302d6f 100644 --- a/src/mess/drivers/vc4000.c +++ b/src/mess/drivers/vc4000.c @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:??? // copyright-holders:Peter Trauner, Manfred Schneider, Robbbert /****************************************************************************** Peter Trauner May 2001 diff --git a/src/mess/drivers/wswan.c b/src/mess/drivers/wswan.c index 4e2c87c4f20..8a566a77858 100644 --- a/src/mess/drivers/wswan.c +++ b/src/mess/drivers/wswan.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Anthony Kruize,Wilbert Pol /*************************************************************************** wswan.c diff --git a/src/mess/drivers/z80ne.c b/src/mess/drivers/z80ne.c index a8031bf9397..c7e52a248f3 100644 --- a/src/mess/drivers/z80ne.c +++ b/src/mess/drivers/z80ne.c @@ -95,7 +95,7 @@ #include "cpu/z80/z80.h" #include "includes/z80ne.h" #include "imagedev/flopdrv.h" -#include "formats/z80ne_dsk.h" +#include "formats/dmk_dsk.h" #include "machine/ram.h" /* Layout */ @@ -400,12 +400,13 @@ static const UINT32 lx388palette[] = rgb_t(0xff, 0xc4, 0x18) /* ALPHANUMERIC BRIGHT ORANGE */ }; -static const floppy_interface z80netf_floppy_interface = -{ - FLOPPY_STANDARD_5_25_DSHD, - LEGACY_FLOPPY_OPTIONS_NAME(z80ne), - NULL -}; +FLOPPY_FORMATS_MEMBER( z80ne_state::floppy_formats ) + FLOPPY_DMK_FORMAT +FLOPPY_FORMATS_END + +static SLOT_INTERFACE_START( z80ne_floppies ) + SLOT_INTERFACE("sssd", FLOPPY_525_SSSD) +SLOT_INTERFACE_END static MACHINE_CONFIG_START( z80ne, z80ne_state ) /* basic machine hardware */ @@ -526,10 +527,11 @@ static MACHINE_CONFIG_START( z80netf, z80ne_state ) // AG = GND, GM2 = GND, GM1 = GND, GM0 = GND, CSS = GND // other lines not connected - MCFG_DEVICE_ADD("wd1771", FD1771, 0) - MCFG_WD17XX_DEFAULT_DRIVE4_TAGS - - MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(z80netf_floppy_interface) + MCFG_FD1771x_ADD("wd1771", XTAL_2MHz / 2) + MCFG_FLOPPY_DRIVE_ADD("wd1771:0", z80ne_floppies, "sssd", z80ne_state::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("wd1771:1", z80ne_floppies, "sssd", z80ne_state::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("wd1771:2", z80ne_floppies, NULL, z80ne_state::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("wd1771:3", z80ne_floppies, NULL, z80ne_state::floppy_formats) MCFG_DEFAULT_LAYOUT(layout_z80netf) diff --git a/src/mess/includes/apple1.h b/src/mess/includes/apple1.h index ad60c23ddf5..220200ade56 100644 --- a/src/mess/includes/apple1.h +++ b/src/mess/includes/apple1.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Daniels, Colin Howell, R. Belmont /***************************************************************************** * diff --git a/src/mess/includes/bbc.h b/src/mess/includes/bbc.h index 98e1c9b5a6c..d86172860b9 100644 --- a/src/mess/includes/bbc.h +++ b/src/mess/includes/bbc.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Gordon Jefferyes, Nigel Barnes /***************************************************************************** * diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h index 6b0092501fd..36b9bf6e5f9 100644 --- a/src/mess/includes/mac.h +++ b/src/mess/includes/mac.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /***************************************************************************** * diff --git a/src/mess/includes/mboard.h b/src/mess/includes/mboard.h index c06a1db95d2..9cf94c502f3 100644 --- a/src/mess/includes/mboard.h +++ b/src/mess/includes/mboard.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Ralf Schaefer, Cowering /********************************************************************** diff --git a/src/mess/includes/mtx.h b/src/mess/includes/mtx.h index 15d7d2a5ffa..9e852ed6e2d 100644 --- a/src/mess/includes/mtx.h +++ b/src/mess/includes/mtx.h @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:(Original Author?), Dirk Best, Curt Coder +// license:??? +// copyright-holders:Lee Ward, Dirk Best, Curt Coder /************************************************************************* Memotech MTX 500, MTX 512 and RS 128 diff --git a/src/mess/includes/sms.h b/src/mess/includes/sms.h index 4f2efcdbbd3..556b663d41a 100644 --- a/src/mess/includes/sms.h +++ b/src/mess/includes/sms.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Wilbert Pol, Charles MacDonald,Mathis Rosenhauer,Brad Oliver,Michael Luong,Fabio Priuli,Enik Land /***************************************************************************** * diff --git a/src/mess/includes/svi318.h b/src/mess/includes/svi318.h index e55d91109e4..411f2f3a8a4 100644 --- a/src/mess/includes/svi318.h +++ b/src/mess/includes/svi318.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Sean Young,Tomas Karlsson /***************************************************************************** * diff --git a/src/mess/includes/vc4000.h b/src/mess/includes/vc4000.h index 0a83489f291..529e1828404 100644 --- a/src/mess/includes/vc4000.h +++ b/src/mess/includes/vc4000.h @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:??? // copyright-holders:Peter Trauner, Manfred Schneider, Robbbert /***************************************************************************** * diff --git a/src/mess/includes/z80ne.h b/src/mess/includes/z80ne.h index 734dc6a57e6..6ba7c12831e 100644 --- a/src/mess/includes/z80ne.h +++ b/src/mess/includes/z80ne.h @@ -17,7 +17,7 @@ #include "imagedev/cassette.h" #include "machine/ay31015.h" #include "machine/kr2376.h" -#include "machine/wd17xx.h" +#include "machine/wd_fdc.h" /*************************************************************************** CONSTANTS @@ -74,6 +74,10 @@ public: m_ay31015(*this, "ay_3_1015"), m_lx388_kr2376(*this, "lx388_kr2376"), m_maincpu(*this, "z80ne"), + m_floppy0(*this, "wd1771:0"), + m_floppy1(*this, "wd1771:1"), + m_floppy2(*this, "wd1771:2"), + m_floppy3(*this, "wd1771:3"), m_cassette1(*this, "cassette"), m_cassette2(*this, "cassette2"), m_wd1771(*this, "wd1771"), @@ -99,6 +103,8 @@ public: m_io_modifiers(*this, "MODIFIERS"), m_io_config(*this, "CONFIG") { } + DECLARE_FLOPPY_FORMATS(floppy_formats) + optional_device<mc6847_base_device> m_vdg; optional_shared_ptr<UINT8> m_videoram; required_device<ay31015_device> m_ay31015; @@ -148,9 +154,13 @@ public: protected: required_device<cpu_device> m_maincpu; + optional_device<floppy_connector> m_floppy0; + optional_device<floppy_connector> m_floppy1; + optional_device<floppy_connector> m_floppy2; + optional_device<floppy_connector> m_floppy3; required_device<cassette_image_device> m_cassette1; required_device<cassette_image_device> m_cassette2; - optional_device<fd1771_device> m_wd1771; + optional_device<fd1771_t> m_wd1771; required_memory_region m_region_z80ne; optional_memory_bank m_bank1; optional_memory_bank m_bank2; diff --git a/src/mess/machine/apple1.c b/src/mess/machine/apple1.c index f17c98d2e02..59b360aea7e 100644 --- a/src/mess/machine/apple1.c +++ b/src/mess/machine/apple1.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Daniels, Colin Howell, R. Belmont /*************************************************************************** diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c index efc9da1102e..cbfef40e40b 100644 --- a/src/mess/machine/bbc.c +++ b/src/mess/machine/bbc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Gordon Jefferyes, Nigel Barnes /****************************************************************************** BBC Model B diff --git a/src/mess/machine/beta.c b/src/mess/machine/beta.c index add547aef97..ff7187ba3e3 100644 --- a/src/mess/machine/beta.c +++ b/src/mess/machine/beta.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder +// copyright-holders:Curt Coder, MetalliC /********************************************************************* beta.h @@ -11,8 +11,7 @@ *********************************************************************/ /* BUGS: -- random commands can be sent to FDC, so better keep .trd images write protected for now -goto TR-DOS, CAT -> files will be shown, CAT again -> NO DISK mesage as result of trash commands +- due to original firmware bug random commands can be sent to FDC instead of SEEK, current WD FDC emulation cant handle this correctly, use patch fix for now */ #include "emu.h" @@ -269,6 +268,11 @@ ROM_START( beta_disk ) //Default for now ROM_LOAD( "trd503.rom", 0x00000, 0x4000, CRC(10751aba) SHA1(21695e3f2a8f796386ce66eea8a246b0ac44810c)) + + // TR-DOS rom have a bug - semi-random commands sent to FDC instead of SEEK command sometimes + // however it works OK on real hardware but does not using our WD FDC emulation, both legacy and modern + // this patch fixes original bug + ROM_FILL( 0x3e47, 1, 0x3e) ROM_END diff --git a/src/mess/machine/beta.h b/src/mess/machine/beta.h index e1a69d9a337..c082819149e 100644 --- a/src/mess/machine/beta.h +++ b/src/mess/machine/beta.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic +// copyright-holders:Miodrag Milanovic, MetalliC /********************************************************************* beta.h diff --git a/src/mess/machine/mac.c b/src/mess/machine/mac.c index 7ce5a0ab2c4..74bbaae1a00 100644 --- a/src/mess/machine/mac.c +++ b/src/mess/machine/mac.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /**************************************************************************** diff --git a/src/mess/machine/mboard.c b/src/mess/machine/mboard.c index 02771271924..01aa1a988d5 100644 --- a/src/mess/machine/mboard.c +++ b/src/mess/machine/mboard.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Ralf Schaefer, Cowering /********************************************************************** diff --git a/src/mess/machine/mtx.c b/src/mess/machine/mtx.c index fb2671bbade..46f3ec32e3f 100644 --- a/src/mess/machine/mtx.c +++ b/src/mess/machine/mtx.c @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:(Original Author?), Dirk Best, Curt Coder +// license:??? +// copyright-holders:Lee Ward, Dirk Best, Curt Coder /************************************************************************* Memotech MTX 500, MTX 512 and RS 128 diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c index 89e478c9ba2..5c4d15f2155 100644 --- a/src/mess/machine/sms.c +++ b/src/mess/machine/sms.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Wilbert Pol, Charles MacDonald,Mathis Rosenhauer,Brad Oliver,Michael Luong,Fabio Priuli,Enik Land #include "emu.h" #include "crsshair.h" diff --git a/src/mess/machine/sonydriv.c b/src/mess/machine/sonydriv.c index 31c88e4f988..da47caaf37a 100644 --- a/src/mess/machine/sonydriv.c +++ b/src/mess/machine/sonydriv.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /********************************************************************* diff --git a/src/mess/machine/sonydriv.h b/src/mess/machine/sonydriv.h index 52ecca6697a..3ebd46cb601 100644 --- a/src/mess/machine/sonydriv.h +++ b/src/mess/machine/sonydriv.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /********************************************************************* diff --git a/src/mess/machine/svi318.c b/src/mess/machine/svi318.c index 2e22cd034d8..aa2525d365b 100644 --- a/src/mess/machine/svi318.c +++ b/src/mess/machine/svi318.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Sean Young,Tomas Karlsson /* ** Spectravideo SVI-318 and SVI-328 diff --git a/src/mess/machine/wswan.c b/src/mess/machine/wswan.c index add6d7a525d..508f93e8544 100644 --- a/src/mess/machine/wswan.c +++ b/src/mess/machine/wswan.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Anthony Kruize,Wilbert Pol /*************************************************************************** wswan.c diff --git a/src/mess/machine/z80ne.c b/src/mess/machine/z80ne.c index 6e476fbe57d..7ae31e9afac 100644 --- a/src/mess/machine/z80ne.c +++ b/src/mess/machine/z80ne.c @@ -652,37 +652,30 @@ WRITE8_MEMBER(z80ne_state::lx390_motor_w) d1 1=select drive 1 d0 1=select drive 0 */ - UINT8 drive = 255; + floppy_image_device *floppy = NULL; - if (data & 1) - drive = 0; - else - if (data & 2) - drive = 1; - else - if (data & 4) - drive = 2; - else - if (data & 8) - drive = 3; + if (BIT(data, 0)) floppy = m_floppy0->get_device(); + if (BIT(data, 1)) floppy = m_floppy1->get_device(); + if (BIT(data, 2)) floppy = m_floppy2->get_device(); + if (BIT(data, 3)) floppy = m_floppy3->get_device(); - m_wd17xx_state.head = (data & 32) ? 1 : 0; - m_wd17xx_state.drive = data & 0x0F; + m_wd1771->set_floppy(floppy); - /* no drive selected, turn off all leds */ - if (!m_wd17xx_state.drive) - { - output_set_value("drv0", 0); - output_set_value("drv1", 0); - } + if (floppy) + { + floppy->ss_w(BIT(data, 5)); + floppy->mon_w(0); + } - if (drive < 4) - { - LOG(("lx390_motor_w, set drive %1d\n", drive)); - m_wd1771->set_drive(drive); - LOG(("lx390_motor_w, set side %1d\n", m_wd17xx_state.head)); - m_wd1771->set_side(m_wd17xx_state.head); - } + m_wd17xx_state.head = (data & 32) ? 1 : 0; + m_wd17xx_state.drive = data & 0x0F; + + /* no drive selected, turn off all leds */ + if (!m_wd17xx_state.drive) + { + output_set_value("drv0", 0); + output_set_value("drv1", 0); + } } READ8_MEMBER(z80ne_state::lx390_reset_bank) @@ -748,7 +741,7 @@ WRITE8_MEMBER(z80ne_state::lx390_fdc_w) { case 0: LOG(("lx390_fdc_w, WD17xx command: %02x\n", d)); - m_wd1771->command_w(space, offset, d ^ 0xff); + m_wd1771->cmd_w(space, offset, d ^ 0xff); if (m_wd17xx_state.drive & 1) output_set_value("drv0", 2); else if (m_wd17xx_state.drive & 2) diff --git a/src/mess/tools/imgtool/imghd.c b/src/mess/tools/imgtool/imghd.c index 8ac129751f9..d48e8a0f0b2 100644 --- a/src/mess/tools/imgtool/imghd.c +++ b/src/mess/tools/imgtool/imghd.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet /* Code to interface the MESS image code with MAME's harddisk core. diff --git a/src/mess/video/apple1.c b/src/mess/video/apple1.c index 3d2df2e657a..f6485dc7ee5 100644 --- a/src/mess/video/apple1.c +++ b/src/mess/video/apple1.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Paul Daniels, Colin Howell, R. Belmont /*************************************************************************** diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c index 8297f4cacaf..06400a45ed8 100644 --- a/src/mess/video/bbc.c +++ b/src/mess/video/bbc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Gordon Jefferyes, Nigel Barnes /****************************************************************************** BBC Model B diff --git a/src/mess/video/mac.c b/src/mess/video/mac.c index baffedf186d..1856aa4427e 100644 --- a/src/mess/video/mac.c +++ b/src/mess/video/mac.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:??? // copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont /*************************************************************************** diff --git a/src/mess/video/vc4000.c b/src/mess/video/vc4000.c index f8d4d0dd490..315ac46934f 100644 --- a/src/mess/video/vc4000.c +++ b/src/mess/video/vc4000.c @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:??? // copyright-holders:Peter Trauner, Manfred Schneider, Robbbert #include "includes/vc4000.h" diff --git a/src/osd/modules/render/drawbgfx.c b/src/osd/modules/render/drawbgfx.c index 84dbb716b18..14dc7a33db0 100644 --- a/src/osd/modules/render/drawbgfx.c +++ b/src/osd/modules/render/drawbgfx.c @@ -13,6 +13,13 @@ // standard windows headers #define WIN32_LEAN_AND_MEAN #include <windows.h> +#if defined(SDLMAME_WIN32) +#if (SDLMAME_SDL2) +#include <SDL2/SDL_syswm.h> +#else +#include <SDL/SDL_syswm.h> +#endif +#endif #else #include "sdlinc.h" #endif diff --git a/src/tools/nltool.c b/src/tools/nltool.c index 555131defce..2f9349d8e97 100644 --- a/src/tools/nltool.c +++ b/src/tools/nltool.c @@ -11,23 +11,24 @@ #include <cstdio> #ifdef PSTANDALONE -#if (PSTANDALONE) + #if (PSTANDALONE) #define PSTANDALONE_PROVIDED + #endif #endif -#endif - -#ifdef PSTANDALONE_PROVIDED -#include <ctime> - -#include "poptions.h" -#include "pstring.h" -#include "plists.h" +#include "plib/poptions.h" +#include "plib/pstring.h" +#include "plib/plists.h" #include "nl_setup.h" #include "nl_factory.h" #include "nl_parser.h" #include "devices/net_lib.h" + +#ifdef PSTANDALONE_PROVIDED + +#include <ctime> + #define osd_ticks_t clock_t inline osd_ticks_t osd_ticks_per_second() { return CLOCKS_PER_SEC; } @@ -35,14 +36,8 @@ inline osd_ticks_t osd_ticks_per_second() { return CLOCKS_PER_SEC; } osd_ticks_t osd_ticks(void) { return clock(); } #else -#include "netlist/poptions.h" -#include "netlist/pstring.h" -#include "netlist/plists.h" -#include "netlist/nl_setup.h" -#include "netlist/nl_factory.h" -#include "netlist/nl_parser.h" -#include "netlist/devices/net_lib.h" #endif + /*************************************************************************** * MAME COMPATIBILITY ... * @@ -102,7 +97,8 @@ class tool_options_t : public poptions public: tool_options_t() : poptions(), - opt_ttr ("t", "time_to_run", 1.0, "time to run the emulation (seconds)", this), + opt_ttr ("t", "time_to_run", 1.0, "time to run the emulation (seconds)", this), + opt_name("n", "name", "", "netlist in file to run; default is first one", this), opt_logs("l", "logs", "", "colon separated list of terminals to log", this), opt_file("f", "file", "-", "file to process (default is stdin)", this), opt_cmd ("c", "cmd", "run", "run|convert|listdevices", this), @@ -111,6 +107,7 @@ public: {} poption_double opt_ttr; + poption_str opt_name; poption_str opt_logs; poption_str opt_file; poption_str opt_cmd; @@ -188,14 +185,14 @@ public: m_setup->init(); } - void read_netlist(const char *buffer) + void read_netlist(const char *buffer, pstring name) { // read the netlist ... netlist_sources_t sources; sources.add(netlist_source_t(buffer)); - sources.parse(*m_setup,""); + sources.parse(*m_setup, name); //m_setup->parse(buffer); log_setup(); @@ -209,7 +206,7 @@ public: void log_setup() { NL_VERBOSE_OUT(("Creating dynamic logs ...\n")); - nl_util::pstring_list ll = nl_util::split(m_logs, ":"); + pstring_list_t ll(m_logs, ":"); for (int i=0; i < ll.size(); i++) { pstring name = "log_" + ll[i]; @@ -271,7 +268,7 @@ static void run(tool_options_t &opts) nt.init(); nt.m_logs = opts.opt_logs(); nt.m_verbose = opts.opt_verb(); - nt.read_netlist(filetobuf(opts.opt_file())); + nt.read_netlist(filetobuf(opts.opt_file()), opts.opt_name()); double ttr = opts.opt_ttr(); printf("startup time ==> %5.3f\n", (double) (osd_ticks() - t) / (double) osd_ticks_per_second() ); @@ -293,7 +290,7 @@ static void listdevices() { netlist_tool_t nt; nt.init(); - const netlist_factory_t::list_t &list = nt.setup().factory().list(); + const netlist_factory_list_t::list_t &list = nt.setup().factory().list(); netlist_sources_t sources; @@ -309,7 +306,7 @@ static void listdevices() list[i]->name().cstr() ); pstring terms(""); - net_device_t_base_factory *f = list[i]; + netlist_base_factory_t *f = list[i]; netlist_device_t *d = f->Create(); d->init(nt, pstring::sprintf("dummy%d", i)); d->start_dev(); @@ -360,7 +357,7 @@ public: void convert(const pstring &contents) { - nl_util::pstring_list spnl = nl_util::split(contents, "\n"); + pstring_list_t spnl(contents, "\n"); // Add gnd net @@ -369,7 +366,7 @@ public: pstring line = ""; - for (int i=0; i < spnl.size(); i++) + for (std::size_t i=0; i < spnl.size(); i++) { // Basic preprocessing pstring inl = spnl[i].trim().ucase(); @@ -393,14 +390,14 @@ protected: : m_name(aname), m_no_export(false) {} const pstring &name() { return m_name;} - nl_util::pstring_list &terminals() { return m_terminals; } + pstring_list_t &terminals() { return m_terminals; } void set_no_export() { m_no_export = true; } bool is_no_export() { return m_no_export; } private: pstring m_name; bool m_no_export; - nl_util::pstring_list m_terminals; + pstring_list_t m_terminals; }; struct sp_dev_t @@ -538,7 +535,7 @@ protected: { if (line != "") { - nl_util::pstring_list tt = nl_util::split(line, " ", true); + pstring_list_t tt(line, " ", true); double val = 0.0; switch (tt[0].cstr()[0]) { @@ -646,7 +643,7 @@ convert_t::sp_unit convert_t::m_sp_units[] = { {"", "%g", 1.0e0 }, {"M", "CAP_M(%g)", 1.0e-3 }, {"U", "CAP_U(%g)", 1.0e-6 }, - {"??", "CAP_U(%g)", 1.0e-6 }, + {"ยต", "CAP_U(%g)", 1.0e-6 }, {"N", "CAP_N(%g)", 1.0e-9 }, {"P", "CAP_P(%g)", 1.0e-12}, {"F", "%ge-15", 1.0e-15}, |