diff options
author | 2015-05-22 18:39:34 +0200 | |
---|---|---|
committer | 2015-05-22 18:39:34 +0200 | |
commit | 578f8b5bbe73e8381781ee56fd5982bbf3afda0e (patch) | |
tree | 98b89a26ce02a62e2132c42f060191f527cd2f80 | |
parent | a7e221a4a7c1b20ea5bc43bfbbfdd0b2518ec9df (diff) | |
parent | 04f90c492063cfaac78f84d8c2beedb51b3a514f (diff) |
Merge pull request #3 from mamedev/master
Sync to base master
2399 files changed, 15492 insertions, 9831 deletions
diff --git a/README.md b/README.md index 6be626044b7..1fc7ca7a9b4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [](https://gitter.im/mamedev/mame?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + What is MAME? ============= @@ -10,6 +11,7 @@ MAME stands for Multiple Arcade Machine Emulator. MAME's purpose is to preserve decades of video-game history. As gaming technology continues to rush forward, MAME prevents these important "vintage" games from being lost and forgotten. This is achieved by documenting the hardware and how it functions. The source code to MAME serves as this documentation. The fact that the games are playable serves primarily to validate the accuracy of the documentation (how else can you prove that you have recreated the hardware faithfully?). + What is MESS? ============= @@ -17,6 +19,7 @@ MESS (Multi Emulator Super System) is the sister project of MAME. MESS documents The MESS and MAME projects live in the same source repository and share much of the same code, but are different build targets. + How to compile? ============= @@ -26,19 +29,38 @@ If you're on a *nix system, it could be as easy as typing make ``` -for a MAME build, or +for a MAME build, + +``` +make SUBTARGET=arcade +``` + +for an arcade-only build, or ``` -make TARGET=mess +make SUBTARGET=mess ``` for a MESS build (provided you have all the [prerequisites](http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=35138)). For Windows users, we provide a ready-made [build environment](http://mamedev.org/tools/) based on MinGW-w64. [Visual Studio builds](http://wiki.mamedev.org/index.php?title=Building_MAME_using_Microsoft_Visual_Studio_compilers) are also possible. + + + Where can I find out more? ============= * [Official MAME Development Team Site](http://mamedev.org/) (includes binary downloads for MAME and MESS, wiki, forums, and more) * [Official MESS Wiki](http://www.mess.org/) * [MAME Testers](http://mametesters.org/) (official bug tracker for MAME and MESS) + + +Contributing +============= + +## Coding standard + +MAME source code should be viewed and edited with your editor set to use four spaces per tab. Tabs are used for initial indentation of lines, with one tab used per indentation level. Spaces are used for other alignment within a line. + +Some parts of the code follow [GNU style](http://www.gnu.org/prep/standards/html_node/Formatting.html); some parts of the code follow [K&R style](https://en.wikipedia.org/wiki/Indent_style#K.26R_style) -- mostly depending on who wrote the original version. **Above all else, be consistent with what you modify, and keep whitespace changes to a minimum when modifying existing source.** For new code, the majority tends to prefer GNU style, so if you don't care much, use that. diff --git a/hash/c64_cart.xml b/hash/c64_cart.xml index f0193ecf999..1aa4b84ccb2 100644 --- a/hash/c64_cart.xml +++ b/hash/c64_cart.xml @@ -4149,7 +4149,7 @@ </software> <software name="aspargp"> - <description>Aspar GTP Master</description> + <description>Aspar GP Master</description> <year>1989</year> <publisher>Dinamic Software</publisher> <part name="cart" interface="c64_cart"> diff --git a/hash/c65_flop.xml b/hash/c65_flop.xml new file mode 100644 index 00000000000..1f5029bf910 --- /dev/null +++ b/hash/c65_flop.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> +<softwarelist name="c65_flop" description="Commodore 65 diskettes"> + + <software name="demo"> + <description>C65 Demo</description> + <year>2002</year> + <publisher>K2</publisher> + + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="819200"> + <rom name="demo.d81" size="819200" crc="dabb3256" sha1="61a5d638f6166e09d3bbbb12b653f6bf3fb2393f" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/gbcolor.xml b/hash/gbcolor.xml index f9656ba9299..83480c6d054 100644 --- a/hash/gbcolor.xml +++ b/hash/gbcolor.xml @@ -23524,6 +23524,18 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design </part> </software> + <software name="4in1_01c"> + <description>4 in 1 (4B-001)</description> + <year>20??</year> + <publisher>Sachen</publisher> + <part name="cart" interface="gameboy_cart"> + <feature name="slot" value="rom_sachen1" /> + <dataarea name="rom" size="524288"> + <rom name="4b-001.gbc" size="524288" crc="42a2fdf8" sha1="79a4faddfd1aca397e56d7895e45b1bc12900dab" offset="000000" /> + </dataarea> + </part> + </software> + <software name="mc_8in1"> <description>8 in 1 (Tw)</description> <year>19??</year> diff --git a/hash/nascom_flop.xml b/hash/nascom_flop.xml new file mode 100644 index 00000000000..b9fa359c9c8 --- /dev/null +++ b/hash/nascom_flop.xml @@ -0,0 +1,113 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<softwarelist name="nascom_flop" description="Nascom disk images"> + + <software name="asteroid"> + <description>Asteroids</description> + <year>1985</year> + <publisher>Richard C. Espley</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="asteroid.dsk" size="655360" crc="96d6b7b6" sha1="ecf667413ec6fdec7a421ececcf572a00354ff10" offset="0" /> + </dataarea> + </part> + </software> + + <software name="avc-demo"> + <description>AVC Demo Disk</description> + <year>1982</year> + <publisher>Lucas Logic</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="avc-demo.dsk" size="655360" crc="81877f78" sha1="11fadb5ea69a949fdeadac3938683b14728b18df" offset="0" /> + </dataarea> + </part> + </software> + + <software name="divtools"> + <description>Tools & Toolkits</description> + <year>198?</year> + <publisher><unknown></publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="divtools.dsk" size="655360" crc="58751dc6" sha1="7078e928c2ef17fccd53e1d1eb2fd9bfe9371c2c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dosadv"> + <description>Nascom Disk Adventure</description> + <year>1983</year> + <publisher>Richard C. Espley</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="dosadv.dsk" size="655360" crc="bd37aa35" sha1="b9483567951830955c6fe944c934c5b3ddf2007c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="nas-sem"> + <description>NAS-Sembler 1.5</description> + <year>1982</year> + <publisher>Lucas Logic</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="nas-sem.dsk" size="655360" crc="997e014a" sha1="ce86f41ebbb57322ff026b693dd49603e104f55c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="utd1066"> + <description>NAS-DOS Utility Disk</description> + <year>1982</year> + <publisher>M F Hessey</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="utd1066.dsk" size="655360" crc="ad1bf5b1" sha1="99c15344cdf4bdfe628a237f6e1759dc5b023e32" offset="0" /> + </dataarea> + </part> + </software> + + <!-- The CP/M system disks are not original disks supplied by Lucas Logic, --> + <!-- but custom disks that have been created to use all available memory. --> + <!-- Note that single sided disks can't be read on double sided drives and --> + <!-- vice versa. Lucas Logic supplied an utility called SINGLE.COM to --> + <!-- allow reading of single sided disks on double sided drives. --> + + <software name="cpmv22s"> + <description>CP/M 2.2 rev 2.1 System Disk (Single Sided)</description> + <year>1982</year> + <publisher>Lucas Logic</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="394240"> + <rom name="cpmv22s.dsk" size="394240" crc="dee5c9d2" sha1="00f187d9828d87fba14d8267cd020bd13d8cbdb9" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmv22d"> + <description>CP/M 2.2 rev 2.1 System Disk (Double Sided)</description> + <year>1982</year> + <publisher>Lucas Logic</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="788480"> + <rom name="cpmv22d.dsk" size="788480" crc="16724ed8" sha1="3db077c46c2cb52794443fa853621538323c352f" offset="0" /> + </dataarea> + </part> + </software> + + <!-- The manual for CP/M 2.2 rev 3.2 is available, but no hardware/software. --> + + <software name="cpmgames"> + <description>CP/M Games for the AVC</description> + <year>19??</year> + <publisher><unknown></publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="394240"> + <rom name="cpmgames.dsk" size="394240" crc="626c680a" sha1="9bd57fa8edce2017ad94a45d9721c86a37657d3b" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/nascom_socket.xml b/hash/nascom_socket.xml new file mode 100644 index 00000000000..a2df3fb11e1 --- /dev/null +++ b/hash/nascom_socket.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- Nascom internal sockets for ROM/RAM --> + +<softwarelist name="nascom_socket" description="Nascom internal sockets"> + + <software name="nasdos"> + <description>NAS-DOS</description> + <year>1982</year> + <publisher>Lucas Control Systems</publisher> + <info name="usage" value="Enter ED000 to start" /> + <part name="socket" interface="nascom_socket"> + <dataarea name="d000" size="0x1000"> + <!-- Normally supplied as 4 1k ROMs --> + <rom name="nasdos.rom" size="0x1000" crc="54a36f6d" sha1="1d063d04be5024f128bd589e6edc066e9a63fc1b" offset="0" /> + </dataarea> + </part> + </software> + + <software name="odebdis"> + <description>Super-Debug 3.1 & Nas-Dis</description> + <year>198?</year> + <publisher><unknown></publisher> + <info name="usage" value="Enter EC000 to start Super-Debug or EC400 to start Nas-Dis" /> + <part name="socket" interface="nascom_socket"> + <dataarea name="c000" size="0x1000"> + <rom name="odebdis.rom" size="0x1000" crc="b0dce113" sha1="545466ab12bcf2ab613d6aff90946efa319bd943" offset="0" /> + </dataarea> + </part> + </software> + + <software name="zeap"> + <description>ZEAP Z80 Editor-Assembler 2.1</description> + <year>1980?</year> + <publisher>Sigma Accouting & Management Services</publisher> + <info name="usage" value="Enter ED000 to start" /> + <part name="socket" interface="nascom_socket"> + <dataarea name="d000" size="0x1000"> + <rom name="zeap.rom" size="0x1000" crc="87ce8f68" sha1="e6dff4c30eecc9a5557395088d1d83776b9b4514" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/scripts/genie.lua b/scripts/genie.lua index aeb901b0f2e..79702a38c78 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -369,6 +369,8 @@ flags { configuration { "vs*" } flags { "ExtraWarnings", + "NoEditAndContinue", + "EnableMinimalRebuild", } if not _OPTIONS["NOWERROR"] then flags{ @@ -664,6 +666,13 @@ if _OPTIONS["VERBOSE"] then } end +-- only show shadow warnings when enabled +if (_OPTIONS["SHADOW_CHECK"]=="1") then + buildoptions { + "-Wshadow" + } +end + -- only show deprecation warnings when enabled if _OPTIONS["DEPRECATED"]~="1" then buildoptions { @@ -811,7 +820,6 @@ end "-Wno-cast-align", "-Wno-tautological-compare", "-Wno-dynamic-class-memaccess", - "-Wno-self-assign-field", } if (version >= 30200) then buildoptions { @@ -820,7 +828,6 @@ end end if (version >= 30400) then buildoptions { - "-Wno-inline-new-delete", "-Wno-constant-logical-operand", } end @@ -832,11 +839,6 @@ end } end else - if (_OPTIONS["SHADOW_CHECK"]=="1") then - buildoptions { - "-Wshadow" - } - end if (version == 40201) then buildoptions { "-Wno-cast-align" diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index a401853f88b..aac32bfad74 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -272,6 +272,15 @@ project "lua" uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9" kind "StaticLib" + -- uncomment the options below to + -- compile using c++. Do the same + -- in lsqlite3. + -- In addition comment out the "extern "C"" + -- in lua.hpp and do the same in luaengine.c line 47 + --options { + -- "ForceCPP", + --} + configuration { } defines { "LUA_COMPAT_ALL", @@ -342,6 +351,10 @@ project "lsqlite3" uuid "1d84edab-94cf-48fb-83ee-b75bc697660e" kind "StaticLib" + -- options { + -- "ForceCPP", + -- } + configuration { } defines { "LUA_COMPAT_ALL", @@ -446,7 +459,7 @@ project "sqllite3" -------------------------------------------------- -- portmidi library objects -------------------------------------------------- -if _OPTIONS["NO_USE_MIDI"]=="0" then +if _OPTIONS["NO_USE_MIDI"]~="1" then project "portmidi" uuid "587f2da6-3274-4a65-86a2-f13ea315bb98" kind "StaticLib" diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index fb325a6376b..d499aabbef4 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -2414,3 +2414,37 @@ if (BUSES["PSX_CONTROLLER"]~=null) then MAME_DIR .. "src/emu/bus/psx/memcard.h", } end + +--------------------------------------------------- +-- +--@src/emu/bus/nasbus/nasbus.h,BUSES += NASBUS +--------------------------------------------------- + +if (BUSES["NASBUS"]~=null) then + files { + MAME_DIR .. "src/emu/bus/nasbus/nasbus.c", + MAME_DIR .. "src/emu/bus/nasbus/nasbus.h", + MAME_DIR .. "src/emu/bus/nasbus/cards.c", + MAME_DIR .. "src/emu/bus/nasbus/cards.h", + MAME_DIR .. "src/emu/bus/nasbus/avc.c", + MAME_DIR .. "src/emu/bus/nasbus/avc.h", + MAME_DIR .. "src/emu/bus/nasbus/floppy.c", + MAME_DIR .. "src/emu/bus/nasbus/floppy.h", + } +end + +--------------------------------------------------- +-- +--@src/emu/bus/cgenie/expansion.h,BUSES += CGENIE_EXPANSION +--------------------------------------------------- + +if (BUSES["CGENIE_EXPANSION"]~=null) then + files { + MAME_DIR .. "src/emu/bus/cgenie/expansion.c", + MAME_DIR .. "src/emu/bus/cgenie/expansion.h", + MAME_DIR .. "src/emu/bus/cgenie/carts.c", + MAME_DIR .. "src/emu/bus/cgenie/carts.h", + MAME_DIR .. "src/emu/bus/cgenie/floppy.c", + MAME_DIR .. "src/emu/bus/cgenie/floppy.h", + } +end diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 88c12563126..68d93da6ec5 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -1052,6 +1052,24 @@ if (CPUS["PSX"]~=null or _OPTIONS["with-tools"]) then end -------------------------------------------------- +-- Mitsubishi MELPS 4 series +---@src/emu/cpu/melps4/melps4.h,CPUS += MELPS4 +-------------------------------------------------- + +if (CPUS["MELPS4"]~=null) then + files { + MAME_DIR .. "src/emu/cpu/melps4/melps4.c", + MAME_DIR .. "src/emu/cpu/melps4/melps4.h", + MAME_DIR .. "src/emu/cpu/melps4/m58846.c", + MAME_DIR .. "src/emu/cpu/melps4/m58846.h", + } +end + +if (CPUS["MELPS4"]~=null or _OPTIONS["with-tools"]) then + table.insert(disasm_files , MAME_DIR .. "src/emu/cpu/melps4/melps4d.c") +end + +-------------------------------------------------- -- Mitsubishi M37702 and M37710 (based on 65C816) ---@src/emu/cpu/m37710/m37710.h,CPUS += M37710 -------------------------------------------------- diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index ba72f3cc140..d4738644375 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -176,6 +176,8 @@ project "formats" MAME_DIR .. "src/lib/formats/ccvf_dsk.h", MAME_DIR .. "src/lib/formats/cgen_cas.c", MAME_DIR .. "src/lib/formats/cgen_cas.h", + MAME_DIR .. "src/lib/formats/cgenie_dsk.c", + MAME_DIR .. "src/lib/formats/cgenie_dsk.h", MAME_DIR .. "src/lib/formats/coco_cas.c", MAME_DIR .. "src/lib/formats/coco_cas.h", MAME_DIR .. "src/lib/formats/coco_dsk.c", @@ -279,6 +281,8 @@ project "formats" MAME_DIR .. "src/lib/formats/mz_cas.h", MAME_DIR .. "src/lib/formats/nanos_dsk.c", MAME_DIR .. "src/lib/formats/nanos_dsk.h", + MAME_DIR .. "src/lib/formats/nascom_dsk.c", + MAME_DIR .. "src/lib/formats/nascom_dsk.h", MAME_DIR .. "src/lib/formats/naslite_dsk.c", MAME_DIR .. "src/lib/formats/naslite_dsk.h", MAME_DIR .. "src/lib/formats/nes_dsk.c", diff --git a/scripts/src/main.lua b/scripts/src/main.lua index 3cf80d968d0..80ac9c8b9c6 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -104,7 +104,7 @@ function mainProject(_target, _subtarget) "jsoncpp", "mongoose", } - if _OPTIONS["NO_USE_MIDI"]=="0" then + if _OPTIONS["NO_USE_MIDI"]~="1" then links { "portmidi", } @@ -120,7 +120,7 @@ function mainProject(_target, _subtarget) override_resources = false; - maintargetosdoptions(_target) + maintargetosdoptions(_target,_subtarget) includedirs { MAME_DIR .. "src/osd", @@ -146,25 +146,27 @@ function mainProject(_target, _subtarget) } end + local rctarget = _subtarget if _OPTIONS["targetos"]=="windows" and (not override_resources) then - local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/".._OPTIONS["osd"].."/" .. _subtarget .. "/" .. _subtarget ..".rc" + local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/".._OPTIONS["osd"].."/" .. _subtarget .. "/" .. rctarget ..".rc" if not os.isfile(rcfile) then - rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _subtarget .. "/" .. _subtarget ..".rc" + rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _subtarget .. "/" .. rctarget ..".rc" end if os.isfile(rcfile) then files { rcfile, } dependency { - { "$(OBJDIR)/".._subtarget ..".res" , GEN_DIR .. "/resource/" .. _subtarget .. "vers.rc", true }, + { "$(OBJDIR)/".._subtarget ..".res" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", true }, } else + rctarget = "mame" files { MAME_DIR .. "src/mame/osd/windows/mame/mame.rc", } dependency { - { "$(OBJDIR)/mame.res" , GEN_DIR .. "/resource/" .. _subtarget .. "vers.rc", true }, + { "$(OBJDIR)/mame.res" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", true }, } end end @@ -185,14 +187,14 @@ function mainProject(_target, _subtarget) configuration { "mingw*" } custombuildtask { - { MAME_DIR .. "src/version.c" , GEN_DIR .. "/resource/" .. _subtarget .. "vers.rc", { MAME_DIR .. "src/build/verinfo.py" }, {"@echo Emitting " .. _subtarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. _subtarget .. " $(<) > $(@)" }}, + { MAME_DIR .. "src/version.c" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "src/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }}, } configuration { "vs*" } prebuildcommands { "mkdir " .. path.translate(GEN_DIR .. "/resource/","\\") .. " 2>NUL", - "@echo Emitting ".. _subtarget .. "vers.rc...", - PYTHON .. " " .. path.translate(MAME_DIR .. "src/build/verinfo.py","\\") .. " -r -b " .. _subtarget .. " " .. path.translate(MAME_DIR .. "src/version.c","\\") .. " > " .. path.translate(GEN_DIR .. "/resource/" .. _subtarget .. "vers.rc", "\\") , + "@echo Emitting ".. rctarget .. "vers.rc...", + PYTHON .. " " .. path.translate(MAME_DIR .. "src/build/verinfo.py","\\") .. " -r -b " .. rctarget .. " " .. path.translate(MAME_DIR .. "src/version.c","\\") .. " > " .. path.translate(GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", "\\") , } diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 3c0ded1383e..6c79eb1b463 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -116,5 +116,6 @@ files { MAME_DIR .. "src/emu/netlist/devices/nld_system.h", MAME_DIR .. "src/emu/netlist/devices/nld_cmos.h", MAME_DIR .. "src/emu/netlist/devices/nld_signal.h", + MAME_DIR .. "src/emu/netlist/devices/nld_truthtable.c", MAME_DIR .. "src/emu/netlist/devices/nld_truthtable.h", } diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua index 52b02c5f32c..a1b19f9cb2a 100644 --- a/scripts/src/osd/osdmini.lua +++ b/scripts/src/osd/osdmini.lua @@ -1,7 +1,7 @@ -- license:BSD-3-Clause -- copyright-holders:MAMEdev Team -function maintargetosdoptions(_target) +function maintargetosdoptions(_target,_subtarget) end diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 120a07cb0ec..2c8e2ed51c5 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -4,7 +4,7 @@ dofile("modules.lua") -function maintargetosdoptions(_target) +function maintargetosdoptions(_target,_subtarget) osdmodulestargetconf() if _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index fadfdd8da22..33176ff43fc 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -4,7 +4,7 @@ dofile("modules.lua") -function maintargetosdoptions(_target) +function maintargetosdoptions(_target,_subtarget) osdmodulestargetconf() configuration { "mingw*-gcc" } diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 258dbe97ea4..0dfec94644a 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -127,6 +127,7 @@ CPUS["ARCOMPACT"] = true --CPUS["UCOM4"] = true CPUS["HMCS40"] = true --CPUS["E0C6200"] = true +--CPUS["MELPS4"] = true -------------------------------------------------- -- specify available sound cores @@ -602,7 +603,7 @@ BUSES["ISA"] = true --BUSES["KC"] = true --BUSES["LPCI"] = true --BUSES["MACPDS"] = true ---BUSES["MIDI"] = true +BUSES["MIDI"] = true --BUSES["MEGADRIVE"] = true --BUSES["MSX_SLOT"] = true BUSES["NEOGEO"] = true @@ -611,7 +612,7 @@ BUSES["NEOGEO"] = true --BUSES["O2"] = true --BUSES["ORICEXT"] = true --BUSES["PCE"] = true ---BUSES["PC_JOY"] = true +BUSES["PC_JOY"] = true --BUSES["PC_KBD"] = true --BUSES["PET"] = true --BUSES["PLUS4"] = true @@ -2140,9 +2141,7 @@ files { MAME_DIR .. "src/mame/video/neogeo.c", MAME_DIR .. "src/mame/drivers/neogeo_noslot.c", MAME_DIR .. "src/mame/video/neogeo_spr.c", - MAME_DIR .. "src/mame/machine/neoboot.c", MAME_DIR .. "src/mame/machine/neocrypt.c", - MAME_DIR .. "src/mame/machine/neoprot.c", MAME_DIR .. "src/mame/machine/ng_memcard.c", } diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index cd7291135dc..867fb0fcdb1 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -127,6 +127,7 @@ CPUS["AMIS2000"] = true CPUS["UCOM4"] = true CPUS["HMCS40"] = true CPUS["E0C6200"] = true +CPUS["MELPS4"] = true -------------------------------------------------- -- specify available sound cores; some of these are @@ -578,6 +579,7 @@ BUSES["C64"] = true BUSES["CBM2"] = true BUSES["CBMIEC"] = true BUSES["CENTRONICS"] = true +BUSES["CGENIE_EXPANSION"] = true BUSES["CHANNELF"] = true BUSES["COCO"] = true BUSES["COLECO"] = true @@ -606,6 +608,7 @@ BUSES["MACPDS"] = true BUSES["MIDI"] = true BUSES["MEGADRIVE"] = true BUSES["MSX_SLOT"] = true +BUSES["NASBUS"] = true BUSES["NEOGEO"] = true BUSES["NES"] = true BUSES["NES_CTRL"] = true @@ -948,9 +951,7 @@ files { MAME_DIR .. "src/mame/machine/315-5881_crypt.c", MAME_DIR .. "src/mame/video/powervr2.c", MAME_DIR .. "src/mame/drivers/neogeo.c", - MAME_DIR .. "src/mame/machine/neoboot.c", MAME_DIR .. "src/mame/machine/neocrypt.c", - MAME_DIR .. "src/mame/machine/neoprot.c", MAME_DIR .. "src/mame/machine/ng_memcard.c", MAME_DIR .. "src/mame/video/neogeo.c", MAME_DIR .. "src/mame/video/neogeo_spr.c", @@ -1754,6 +1755,7 @@ files { createMESSProjects(_target, _subtarget, "mitsubishi") files { + MAME_DIR .. "src/mess/drivers/hh_melps4.c", MAME_DIR .. "src/mess/drivers/multi8.c", MAME_DIR .. "src/mess/drivers/multi16.c", } @@ -1790,8 +1792,6 @@ files { createMESSProjects(_target, _subtarget, "nascom") files { MAME_DIR .. "src/mess/drivers/nascom1.c", - MAME_DIR .. "src/mess/machine/nascom1.c", - MAME_DIR .. "src/mess/video/nascom1.c", } createMESSProjects(_target, _subtarget, "ne") diff --git a/scripts/target/mame/tiny.lua b/scripts/target/mame/tiny.lua index 6f2f6fdc988..350dfd5847c 100644 --- a/scripts/target/mame/tiny.lua +++ b/scripts/target/mame/tiny.lua @@ -13,7 +13,7 @@ -------------------------------------------------- -- Specify all the CPU cores necessary for the --- drivers referenced in tiny.c. +-- drivers referenced in tiny.lst. -------------------------------------------------- CPUS["Z80"] = true @@ -28,7 +28,7 @@ CPUS["COP400"] = true -------------------------------------------------- -- Specify all the sound cores necessary for the --- drivers referenced in tiny.c. +-- drivers referenced in tiny.lst. -------------------------------------------------- SOUNDS["SAMPLES"] = true @@ -72,7 +72,7 @@ BUSES["CENTRONICS"] = true -------------------------------------------------- -- This is the list of files that are necessary -- for building all of the drivers referenced --- in tiny.c +-- in tiny.lst -------------------------------------------------- function createProjects_mame_tiny(_target, _subtarget) @@ -142,4 +142,4 @@ function linkProjects_mame_tiny(_target, _subtarget) links { "mame_tiny", } -end
\ No newline at end of file +end diff --git a/src/emu/bus/a7800/a78_carts.h b/src/emu/bus/a7800/a78_carts.h index 73739dddcf8..ebf66de8218 100644 --- a/src/emu/bus/a7800/a78_carts.h +++ b/src/emu/bus/a7800/a78_carts.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A78_CARTS_H #define __A78_CARTS_H diff --git a/src/emu/bus/a7800/a78_slot.c b/src/emu/bus/a7800/a78_slot.c index 64114d5de8f..e7f6da4f6cb 100644 --- a/src/emu/bus/a7800/a78_slot.c +++ b/src/emu/bus/a7800/a78_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/a7800/a78_slot.h b/src/emu/bus/a7800/a78_slot.h index a42954677ce..ff41ae8a608 100644 --- a/src/emu/bus/a7800/a78_slot.h +++ b/src/emu/bus/a7800/a78_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A78_SLOT_H #define __A78_SLOT_H diff --git a/src/emu/bus/a7800/cpuwiz.c b/src/emu/bus/a7800/cpuwiz.c index f25580a1c08..9185e49ac7c 100644 --- a/src/emu/bus/a7800/cpuwiz.c +++ b/src/emu/bus/a7800/cpuwiz.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A7800 CPUWIZ's homebrew boards (MegaCart+ and VersaBoard) diff --git a/src/emu/bus/a7800/cpuwiz.h b/src/emu/bus/a7800/cpuwiz.h index 193ba336b96..75f980fbffd 100644 --- a/src/emu/bus/a7800/cpuwiz.h +++ b/src/emu/bus/a7800/cpuwiz.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A78_CPUWIZ_H #define __A78_CPUWIZ_H diff --git a/src/emu/bus/a7800/hiscore.c b/src/emu/bus/a7800/hiscore.c index c51d1c26b74..cbdab10f02d 100644 --- a/src/emu/bus/a7800/hiscore.c +++ b/src/emu/bus/a7800/hiscore.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A7800 HighScore passthrough cart emulation diff --git a/src/emu/bus/a7800/hiscore.h b/src/emu/bus/a7800/hiscore.h index d1750c77486..9677e72cdb0 100644 --- a/src/emu/bus/a7800/hiscore.h +++ b/src/emu/bus/a7800/hiscore.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A78_HISCORE_H #define __A78_HISCORE_H diff --git a/src/emu/bus/a7800/rom.c b/src/emu/bus/a7800/rom.c index d2bfc5d78a4..fa44813dba4 100644 --- a/src/emu/bus/a7800/rom.c +++ b/src/emu/bus/a7800/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A7800 ROM cart emulation diff --git a/src/emu/bus/a7800/rom.h b/src/emu/bus/a7800/rom.h index 16f31360a74..0de17b2a952 100644 --- a/src/emu/bus/a7800/rom.h +++ b/src/emu/bus/a7800/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A78_ROM_H #define __A78_ROM_H diff --git a/src/emu/bus/a7800/xboard.c b/src/emu/bus/a7800/xboard.c index 4a7d3742f1b..3c5eb3d0f24 100644 --- a/src/emu/bus/a7800/xboard.c +++ b/src/emu/bus/a7800/xboard.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A7800 XBoarD & XM expansions emulation diff --git a/src/emu/bus/a7800/xboard.h b/src/emu/bus/a7800/xboard.h index 0e5e7f26cf0..44173e70390 100644 --- a/src/emu/bus/a7800/xboard.h +++ b/src/emu/bus/a7800/xboard.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A78_XBOARD_H #define __A78_XBOARD_H diff --git a/src/emu/bus/a800/a800_carts.h b/src/emu/bus/a800/a800_carts.h index eb28c9c3b2c..720b5e7f4f8 100644 --- a/src/emu/bus/a800/a800_carts.h +++ b/src/emu/bus/a800/a800_carts.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A800_CARTS_H #define __A800_CARTS_H diff --git a/src/emu/bus/a800/a800_slot.c b/src/emu/bus/a800/a800_slot.c index 028fa02b2a0..c378d869811 100644 --- a/src/emu/bus/a800/a800_slot.c +++ b/src/emu/bus/a800/a800_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/a800/a800_slot.h b/src/emu/bus/a800/a800_slot.h index 9995083437d..8359b9c7178 100644 --- a/src/emu/bus/a800/a800_slot.h +++ b/src/emu/bus/a800/a800_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A800_SLOT_H #define __A800_SLOT_H diff --git a/src/emu/bus/a800/oss.c b/src/emu/bus/a800/oss.c index 3df4f2b0ed4..8f7ae76735f 100644 --- a/src/emu/bus/a800/oss.c +++ b/src/emu/bus/a800/oss.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A800 ROM cart emulation diff --git a/src/emu/bus/a800/oss.h b/src/emu/bus/a800/oss.h index ad772689277..f781c8f5182 100644 --- a/src/emu/bus/a800/oss.h +++ b/src/emu/bus/a800/oss.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A800_OSS_H #define __A800_OSS_H diff --git a/src/emu/bus/a800/rom.c b/src/emu/bus/a800/rom.c index ed11faa7d7b..f52a489bcf0 100644 --- a/src/emu/bus/a800/rom.c +++ b/src/emu/bus/a800/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A800/A5200/XEGS ROM cart emulation diff --git a/src/emu/bus/a800/rom.h b/src/emu/bus/a800/rom.h index 4c4ea9b30c2..a1e6cde0925 100644 --- a/src/emu/bus/a800/rom.h +++ b/src/emu/bus/a800/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A800_ROM_H #define __A800_ROM_H diff --git a/src/emu/bus/a800/sparta.c b/src/emu/bus/a800/sparta.c index a742be866c3..8e6a439d669 100644 --- a/src/emu/bus/a800/sparta.c +++ b/src/emu/bus/a800/sparta.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A800 SpartaDOS cart emulation diff --git a/src/emu/bus/a800/sparta.h b/src/emu/bus/a800/sparta.h index 983c5ba9200..6b6cf9eb932 100644 --- a/src/emu/bus/a800/sparta.h +++ b/src/emu/bus/a800/sparta.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __A800_SPARTA_H #define __A800_SPARTA_H diff --git a/src/emu/bus/abckb/abc77.c b/src/emu/bus/abckb/abc77.c index f0efaba23e4..c64caaafb63 100644 --- a/src/emu/bus/abckb/abc77.c +++ b/src/emu/bus/abckb/abc77.c @@ -421,58 +421,58 @@ inline void abc77_device::key_down(int state) // abc77_device - constructor //------------------------------------------------- -abc77_device::abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, ABC77, "Luxor ABC 77", tag, owner, clock, "abc77", __FILE__), - abc_keyboard_interface(mconfig, *this), - m_maincpu(*this, I8035_TAG), - m_discrete(*this, DISCRETE_TAG), - m_x0(*this, "X0"), - m_x1(*this, "X1"), - m_x2(*this, "X2"), - m_x3(*this, "X3"), - m_x4(*this, "X4"), - m_x5(*this, "X5"), - m_x6(*this, "X6"), - m_x7(*this, "X7"), - m_x8(*this, "X8"), - m_x9(*this, "X9"), - m_x10(*this, "X10"), - m_x11(*this, "X11"), - m_dsw(*this, "DSW"), - m_txd(1), - m_keydown(1), - m_clock(0), - m_stb(1) +abc77_device::abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, ABC77, "Luxor ABC 77", tag, owner, clock, "abc77", __FILE__), + abc_keyboard_interface(mconfig, *this), + m_maincpu(*this, I8035_TAG), + m_discrete(*this, DISCRETE_TAG), + m_x0(*this, "X0"), + m_x1(*this, "X1"), + m_x2(*this, "X2"), + m_x3(*this, "X3"), + m_x4(*this, "X4"), + m_x5(*this, "X5"), + m_x6(*this, "X6"), + m_x7(*this, "X7"), + m_x8(*this, "X8"), + m_x9(*this, "X9"), + m_x10(*this, "X10"), + m_x11(*this, "X11"), + m_dsw(*this, "DSW"), + m_txd(1), + m_keydown(1), + m_clock(0), + m_stb(1) { } -abc77_device::abc77_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) - : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - abc_keyboard_interface(mconfig, *this), - m_maincpu(*this, I8035_TAG), - m_discrete(*this, DISCRETE_TAG), - m_x0(*this, "X0"), - m_x1(*this, "X1"), - m_x2(*this, "X2"), - m_x3(*this, "X3"), - m_x4(*this, "X4"), - m_x5(*this, "X5"), - m_x6(*this, "X6"), - m_x7(*this, "X7"), - m_x8(*this, "X8"), - m_x9(*this, "X9"), - m_x10(*this, "X10"), - m_x11(*this, "X11"), - m_dsw(*this, "DSW"), - m_txd(1), - m_keydown(1), - m_clock(0), - m_stb(1) +abc77_device::abc77_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + abc_keyboard_interface(mconfig, *this), + m_maincpu(*this, I8035_TAG), + m_discrete(*this, DISCRETE_TAG), + m_x0(*this, "X0"), + m_x1(*this, "X1"), + m_x2(*this, "X2"), + m_x3(*this, "X3"), + m_x4(*this, "X4"), + m_x5(*this, "X5"), + m_x6(*this, "X6"), + m_x7(*this, "X7"), + m_x8(*this, "X8"), + m_x9(*this, "X9"), + m_x10(*this, "X10"), + m_x11(*this, "X11"), + m_dsw(*this, "DSW"), + m_txd(1), + m_keydown(1), + m_clock(0), + m_stb(1) { } -abc55_device::abc55_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : abc77_device(mconfig, ABC55, "Luxor ABC 55", tag, owner, clock, "abc55", __FILE__) { } +abc55_device::abc55_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + abc77_device(mconfig, ABC55, "Luxor ABC 55", tag, owner, clock, "abc55", __FILE__) { } //------------------------------------------------- @@ -503,6 +503,8 @@ void abc77_device::device_reset() m_reset_timer->adjust(attotime::from_msec(t)); m_maincpu->set_input_line(MCS48_INPUT_EA, ea ? CLEAR_LINE : ASSERT_LINE); + + m_slot->write_rx(1); } diff --git a/src/emu/bus/abckb/abc99.c b/src/emu/bus/abckb/abc99.c index a16f763abb7..63a3f0154f0 100644 --- a/src/emu/bus/abckb/abc99.c +++ b/src/emu/bus/abckb/abc99.c @@ -542,6 +542,8 @@ void abc99_device::device_reset() // set EA lines m_maincpu->set_input_line(MCS48_INPUT_EA, ASSERT_LINE); m_mousecpu->set_input_line(MCS48_INPUT_EA, ASSERT_LINE); + + m_slot->write_rx(1); } diff --git a/src/emu/bus/apf/rom.c b/src/emu/bus/apf/rom.c index c2ed5e9dd07..9eb83e4f12c 100644 --- a/src/emu/bus/apf/rom.c +++ b/src/emu/bus/apf/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/apf/rom.h b/src/emu/bus/apf/rom.h index 0db205afda5..7c377a0cc77 100644 --- a/src/emu/bus/apf/rom.h +++ b/src/emu/bus/apf/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __APF_ROM_H #define __APF_ROM_H diff --git a/src/emu/bus/apf/slot.c b/src/emu/bus/apf/slot.c index 7d4df6a9a08..832e0cead45 100644 --- a/src/emu/bus/apf/slot.c +++ b/src/emu/bus/apf/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** APF Imagination / M-1000 cart emulation diff --git a/src/emu/bus/apf/slot.h b/src/emu/bus/apf/slot.h index 53ea98be030..73853dd6bdd 100644 --- a/src/emu/bus/apf/slot.h +++ b/src/emu/bus/apf/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __APF_SLOT_H #define __APF_SLOT_H diff --git a/src/emu/bus/arcadia/rom.c b/src/emu/bus/arcadia/rom.c index 8ecab5d43eb..5a6186aa8de 100644 --- a/src/emu/bus/arcadia/rom.c +++ b/src/emu/bus/arcadia/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/arcadia/rom.h b/src/emu/bus/arcadia/rom.h index 77b82c4cf6f..f070ac3aecd 100644 --- a/src/emu/bus/arcadia/rom.h +++ b/src/emu/bus/arcadia/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __ARCADIA_ROM_H #define __ARCADIA_ROM_H diff --git a/src/emu/bus/arcadia/slot.c b/src/emu/bus/arcadia/slot.c index 4d3d5e26012..b93e7fd211c 100644 --- a/src/emu/bus/arcadia/slot.c +++ b/src/emu/bus/arcadia/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Emerson Arcadia 2001 (and clones) cart emulation diff --git a/src/emu/bus/arcadia/slot.h b/src/emu/bus/arcadia/slot.h index 52fa63ac8a6..f1f3ca97f07 100644 --- a/src/emu/bus/arcadia/slot.h +++ b/src/emu/bus/arcadia/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __ARCADIA_SLOT_H #define __ARCADIA_SLOT_H diff --git a/src/emu/bus/astrocde/exp.c b/src/emu/bus/astrocde/exp.c index 53ff66213d7..28017230f0d 100644 --- a/src/emu/bus/astrocde/exp.c +++ b/src/emu/bus/astrocde/exp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Bally Astrocade Expansion port diff --git a/src/emu/bus/astrocde/exp.h b/src/emu/bus/astrocde/exp.h index 3acbe2590d0..e691a5b946a 100644 --- a/src/emu/bus/astrocde/exp.h +++ b/src/emu/bus/astrocde/exp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __ASTROCADE_EXP_H #define __ASTROCADE_EXP_H diff --git a/src/emu/bus/astrocde/ram.c b/src/emu/bus/astrocde/ram.c index a116be14d77..95ebb6816aa 100644 --- a/src/emu/bus/astrocde/ram.c +++ b/src/emu/bus/astrocde/ram.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/astrocde/ram.h b/src/emu/bus/astrocde/ram.h index c99fec58aa2..9df04bdad0e 100644 --- a/src/emu/bus/astrocde/ram.h +++ b/src/emu/bus/astrocde/ram.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __ASTROCADE_RAM_H #define __ASTROCADE_RAM_H diff --git a/src/emu/bus/astrocde/rom.c b/src/emu/bus/astrocde/rom.c index 25ef8123666..d8067daa062 100644 --- a/src/emu/bus/astrocde/rom.c +++ b/src/emu/bus/astrocde/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/astrocde/rom.h b/src/emu/bus/astrocde/rom.h index 64fd9f3d7ac..e0b5647742a 100644 --- a/src/emu/bus/astrocde/rom.h +++ b/src/emu/bus/astrocde/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __ASTROCADE_ROM_H #define __ASTROCADE_ROM_H diff --git a/src/emu/bus/astrocde/slot.c b/src/emu/bus/astrocde/slot.c index 222c0605e9e..5345d90b7fb 100644 --- a/src/emu/bus/astrocde/slot.c +++ b/src/emu/bus/astrocde/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Bally Astrocade cart emulation diff --git a/src/emu/bus/astrocde/slot.h b/src/emu/bus/astrocde/slot.h index 9ba2e194d19..738c32a6faa 100644 --- a/src/emu/bus/astrocde/slot.h +++ b/src/emu/bus/astrocde/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __ASTROCADE_SLOT_H #define __ASTROCADE_SLOT_H diff --git a/src/emu/bus/centronics/epson_lx810l.c b/src/emu/bus/centronics/epson_lx810l.c index f91c0704484..eed6401875f 100644 --- a/src/emu/bus/centronics/epson_lx810l.c +++ b/src/emu/bus/centronics/epson_lx810l.c @@ -3,8 +3,6 @@ /* * Epson LX-810L dot matrix printer emulation - * License: BSD-3-Clause - * * IC list: * uPD7810HG (cpu) * E05A30 (gate array) diff --git a/src/emu/bus/cgenie/carts.c b/src/emu/bus/cgenie/carts.c new file mode 100644 index 00000000000..f4b23a5cf9d --- /dev/null +++ b/src/emu/bus/cgenie/carts.c @@ -0,0 +1,13 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Expansion Carts + +***************************************************************************/ + +#include "carts.h" + +SLOT_INTERFACE_START( expansion_slot_carts ) + SLOT_INTERFACE("floppy", CGENIE_FDC) +SLOT_INTERFACE_END diff --git a/src/emu/bus/cgenie/carts.h b/src/emu/bus/cgenie/carts.h new file mode 100644 index 00000000000..5dd3b67e172 --- /dev/null +++ b/src/emu/bus/cgenie/carts.h @@ -0,0 +1,20 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Expansion Carts + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_CARTS_H__ +#define __CGENIE_CARTS_H__ + +#include "emu.h" + +#include "floppy.h" + +SLOT_INTERFACE_EXTERN( expansion_slot_carts ); + +#endif // __CGENIE_CARTS_H__ diff --git a/src/emu/bus/cgenie/expansion.c b/src/emu/bus/cgenie/expansion.c new file mode 100644 index 00000000000..88a89a32cce --- /dev/null +++ b/src/emu/bus/cgenie/expansion.c @@ -0,0 +1,108 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Expansion Slot + + 50-pin slot + +***************************************************************************/ + +#include "expansion.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type EXPANSION_SLOT = &device_creator<expansion_slot_device>; + + +//************************************************************************** +// SLOT DEVICE +//************************************************************************** + +//------------------------------------------------- +// expansion_slot_device - constructor +//------------------------------------------------- + +expansion_slot_device::expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, EXPANSION_SLOT, "Expansion Slot", tag, owner, clock, "expansion_slot", __FILE__), + device_slot_interface(mconfig, *this), + m_program(NULL), + m_io(NULL), + m_cart(NULL), + m_int_handler(*this), + m_nmi_handler(*this), + m_reset_handler(*this) +{ +} + +//------------------------------------------------- +// expansion_slot_device - destructor +//------------------------------------------------- + +expansion_slot_device::~expansion_slot_device() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void expansion_slot_device::device_start() +{ + // resolve callbacks + m_int_handler.resolve_safe(); + m_nmi_handler.resolve_safe(); + m_reset_handler.resolve_safe(); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void expansion_slot_device::device_reset() +{ +} + +//------------------------------------------------- +// set_program_space - set address space we are attached to +//------------------------------------------------- + +void expansion_slot_device::set_program_space(address_space *program) +{ + m_program = program; +} + +//------------------------------------------------- +// set_io_space - set address space we are attached to +//------------------------------------------------- + +void expansion_slot_device::set_io_space(address_space *io) +{ + m_io = io; +} + + +//************************************************************************** +// CARTRIDGE INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_expansion_interface - constructor +//------------------------------------------------- + +device_expansion_interface::device_expansion_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device) +{ + m_slot = dynamic_cast<expansion_slot_device *>(device.owner()); +} + +//------------------------------------------------- +// ~device_expansion_interface - destructor +//------------------------------------------------- + +device_expansion_interface::~device_expansion_interface() +{ +} diff --git a/src/emu/bus/cgenie/expansion.h b/src/emu/bus/cgenie/expansion.h new file mode 100644 index 00000000000..79cbc1430b5 --- /dev/null +++ b/src/emu/bus/cgenie/expansion.h @@ -0,0 +1,128 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Expansion Slot + + 50-pin slot + + 1 GND 26 /MREQ + 2 A8 27 /WR + 3 A7 28 /C4 + 4 A6 29 (not used) + 5 A9 30 /C1 + 6 A5 31 BD3 + 7 A4 32 /C3 + 8 A3 33 (not used) + 9 A10 34 /C2 + 10 A2 35 DB6 + 11 A11 36 /RD + 12 A1 37 BD4 + 13 A0 38 (not used) + 14 A12 39 BD7 + 15 A14 40 (not used) + 16 A13 41 BD5 + 17 /RFSH 42 (not useD) + 18 A15 43 BD0 + 19 /INT 44 (not used) + 20 /BUSRQ 45 BD2 + 21 /NMI 46 /RESET + 22 /WAIT 47 /M1 + 23 /HALT 48 /IORQ + 24 /BUSAK 49 BD1 + 25 /ROMDIS 50 +5V + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_EXPANSION_H__ +#define __CGENIE_EXPANSION_H__ + +#include "emu.h" + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_EXPANSION_SLOT_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, EXPANSION_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(expansion_slot_carts, NULL, false) + +#define MCFG_EXPANSION_SLOT_INT_HANDLER(_devcb) \ + devcb = &expansion_slot_device::set_int_handler(*device, DEVCB_##_devcb); + +#define MCFG_EXPANSION_SLOT_NMI_HANDLER(_devcb) \ + devcb = &expansion_slot_device::set_nmi_handler(*device, DEVCB_##_devcb); + +#define MCFG_EXPANSION_SLOT_RESET_HANDLER(_devcb) \ + devcb = &expansion_slot_device::set_reset_handler(*device, DEVCB_##_devcb); + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class device_expansion_interface; + +class expansion_slot_device : public device_t, public device_slot_interface +{ +public: + // construction/destruction + expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~expansion_slot_device(); + + void set_program_space(address_space *program); + void set_io_space(address_space *io); + + // callbacks + template<class _Object> static devcb_base &set_int_handler(device_t &device, _Object object) + { return downcast<expansion_slot_device &>(device).m_int_handler.set_callback(object); } + + template<class _Object> static devcb_base &set_nmi_handler(device_t &device, _Object object) + { return downcast<expansion_slot_device &>(device).m_nmi_handler.set_callback(object); } + + template<class _Object> static devcb_base &set_reset_handler(device_t &device, _Object object) + { return downcast<expansion_slot_device &>(device).m_reset_handler.set_callback(object); } + + // called from cart device + DECLARE_WRITE_LINE_MEMBER( int_w ) { m_int_handler(state); } + DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_handler(state); } + DECLARE_WRITE_LINE_MEMBER( reset_w ) { m_reset_handler(state); } + + address_space *m_program; + address_space *m_io; + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + device_expansion_interface *m_cart; + +private: + devcb_write_line m_int_handler; + devcb_write_line m_nmi_handler; + devcb_write_line m_reset_handler; +}; + +// class representing interface-specific live expansion device +class device_expansion_interface : public device_slot_card_interface +{ +public: + // construction/destruction + device_expansion_interface(const machine_config &mconfig, device_t &device); + virtual ~device_expansion_interface(); + +protected: + expansion_slot_device *m_slot; +}; + +// device type definition +extern const device_type EXPANSION_SLOT; + +// include here so drivers don't need to +#include "carts.h" + +#endif // __CGENIE_EXPANSION_H__ diff --git a/src/emu/bus/cgenie/floppy.c b/src/emu/bus/cgenie/floppy.c new file mode 100644 index 00000000000..efb53807774 --- /dev/null +++ b/src/emu/bus/cgenie/floppy.c @@ -0,0 +1,193 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Floppy Disc Controller + + TODO: + - What's the exact FD1793 model? + - How does it turn off the motor? + - How does it switch between FM/MFM? + +***************************************************************************/ + +#include "floppy.h" +#include "formats/cgenie_dsk.h" +#include "bus/generic/carts.h" + + +//************************************************************************** +// CONSTANTS/MACROS +//************************************************************************** + +#define VERBOSE 0 + +// set to 1 to test fm disk formats +#define FM_MODE 0 + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type CGENIE_FDC = &device_creator<cgenie_fdc_device>; + +FLOPPY_FORMATS_MEMBER( cgenie_fdc_device::floppy_formats ) + FLOPPY_CGENIE_FORMAT +FLOPPY_FORMATS_END + +static SLOT_INTERFACE_START( cgenie_floppies ) + SLOT_INTERFACE("sssd", FLOPPY_525_SSSD) + SLOT_INTERFACE("sd", FLOPPY_525_SD) + SLOT_INTERFACE("ssdd", FLOPPY_525_SSDD) + SLOT_INTERFACE("dd", FLOPPY_525_DD) + SLOT_INTERFACE("ssqd", FLOPPY_525_SSQD) + SLOT_INTERFACE("qd", FLOPPY_525_QD) +SLOT_INTERFACE_END + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +ROM_START( cgenie_fdc ) + ROM_REGION(0x3000, "software", 0) + ROM_LOAD("cgdos.rom", 0x0000, 0x2000, CRC(2a96cf74) SHA1(6dcac110f87897e1ee7521aefbb3d77a14815893)) +ROM_END + +const rom_entry *cgenie_fdc_device::device_rom_region() const +{ + return ROM_NAME( cgenie_fdc ); +} + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( cgenie_fdc ) + MCFG_FD1793x_ADD("fd1793", XTAL_16MHz / 4 / 4) + MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(cgenie_fdc_device, intrq_w)) + + MCFG_FLOPPY_DRIVE_ADD("fd1793:0", cgenie_floppies, "ssdd", cgenie_fdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1793:1", cgenie_floppies, "ssdd", cgenie_fdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1793:2", cgenie_floppies, NULL, cgenie_fdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1793:3", cgenie_floppies, NULL, cgenie_fdc_device::floppy_formats) + +// MCFG_SOFTWARE_LIST_ADD("floppy_list", "cgenie_flop") + + MCFG_GENERIC_SOCKET_ADD("socket", generic_plain_slot, "cgenie_socket") + MCFG_GENERIC_EXTENSIONS("bin,rom") + MCFG_GENERIC_LOAD(cgenie_fdc_device, socket_load) + + MCFG_SOFTWARE_LIST_ADD("cart_list", "cgenie_cart") +MACHINE_CONFIG_END + +machine_config_constructor cgenie_fdc_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( cgenie_fdc ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// cgenie_fdc_device - constructor +//------------------------------------------------- + +cgenie_fdc_device::cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, CGENIE_FDC, "Colour Genie Floppy Disc Controller", tag, owner, clock, "cgenie_fdc", __FILE__), + device_expansion_interface(mconfig, *this), + m_fdc(*this, "fd1793"), + m_floppy0(*this, "fd1793:0"), + m_floppy1(*this, "fd1793:1"), + m_floppy2(*this, "fd1793:2"), + m_floppy3(*this, "fd1793:3"), + m_socket(*this, "socket"), + m_floppy(NULL) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void cgenie_fdc_device::device_start() +{ +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void cgenie_fdc_device::device_reset() +{ + // dos rom + m_slot->m_program->install_rom(0xc000, 0xdfff, memregion("software")->base()); + + // memory mapped i/o + m_slot->m_program->install_write_handler(0xffe0, 0xffe3, 0, 0x10, write8_delegate(FUNC(cgenie_fdc_device::select_w), this)); + m_slot->m_program->install_read_handler( 0xffec, 0xffef, 0, 0x10, read8_delegate(FUNC(fd1793_t::read), m_fdc.target())); + m_slot->m_program->install_write_handler(0xffec, 0xffef, 0, 0x10, write8_delegate(FUNC(fd1793_t::write), m_fdc.target())); + + // map extra socket + if (m_socket->exists()) + { + m_slot->m_program->install_read_handler(0xe000, 0xefff, read8_delegate(FUNC(generic_slot_device::read_rom), (generic_slot_device *) m_socket)); + } +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +DEVICE_IMAGE_LOAD_MEMBER( cgenie_fdc_device, socket_load ) +{ + UINT32 size = m_socket->common_get_size("rom"); + + if (size > 0x1000) + { + image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported ROM size"); + return IMAGE_INIT_FAIL; + } + + m_socket->rom_alloc(0x1000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); + m_socket->common_load_rom(m_socket->get_rom_base(), size, "rom"); + + return IMAGE_INIT_PASS; +} + +WRITE_LINE_MEMBER( cgenie_fdc_device::intrq_w ) +{ + if (VERBOSE) + logerror("cgenie_fdc_device::intrq_w: %d\n", state); + + // forward to host + m_slot->int_w(state); +} + +WRITE8_MEMBER( cgenie_fdc_device::select_w ) +{ + if (VERBOSE) + logerror("cgenie_fdc_device::motor_w: 0x%02x\n", data); + + if (FM_MODE) + m_fdc->dden_w(1); + + m_floppy = NULL; + + if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); + if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); + if (BIT(data, 2)) m_floppy = m_floppy2->get_device(); + if (BIT(data, 3)) m_floppy = m_floppy3->get_device(); + + m_fdc->set_floppy(m_floppy); + + if (m_floppy) + { + m_floppy->ss_w(BIT(data, 4)); + m_floppy->mon_w(0); + } +} diff --git a/src/emu/bus/cgenie/floppy.h b/src/emu/bus/cgenie/floppy.h new file mode 100644 index 00000000000..6911358763d --- /dev/null +++ b/src/emu/bus/cgenie/floppy.h @@ -0,0 +1,59 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Floppy Controller Cartridge + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_EXPANSION_FLOPPY_H__ +#define __CGENIE_EXPANSION_FLOPPY_H__ + +#include "emu.h" +#include "expansion.h" +#include "machine/wd_fdc.h" +#include "bus/generic/slot.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> floppy_controller_device + +class cgenie_fdc_device : public device_t, public device_expansion_interface +{ +public: + // construction/destruction + cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_WRITE_LINE_MEMBER(intrq_w); + DECLARE_WRITE8_MEMBER(select_w); + + DECLARE_FLOPPY_FORMATS(floppy_formats); + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket_load); + +protected: + virtual const rom_entry *device_rom_region() const; + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + +private: + required_device<fd1793_t> m_fdc; + required_device<floppy_connector> m_floppy0; + required_device<floppy_connector> m_floppy1; + required_device<floppy_connector> m_floppy2; + required_device<floppy_connector> m_floppy3; + required_device<generic_slot_device> m_socket; + + floppy_image_device *m_floppy; +}; + +// device type definition +extern const device_type CGENIE_FDC; + +#endif // __CGENIE_EXPANSION_FLOPPY_H__ diff --git a/src/emu/bus/chanf/rom.c b/src/emu/bus/chanf/rom.c index cfd60eaedab..12beebafa4b 100644 --- a/src/emu/bus/chanf/rom.c +++ b/src/emu/bus/chanf/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/chanf/rom.h b/src/emu/bus/chanf/rom.h index e2afa9da580..5a13e38b2df 100644 --- a/src/emu/bus/chanf/rom.h +++ b/src/emu/bus/chanf/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __CHANF_ROM_H #define __CHANF_ROM_H diff --git a/src/emu/bus/chanf/slot.c b/src/emu/bus/chanf/slot.c index e53b05c9eac..3bb58417a9c 100644 --- a/src/emu/bus/chanf/slot.c +++ b/src/emu/bus/chanf/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Fairchild Channel F cart emulation diff --git a/src/emu/bus/chanf/slot.h b/src/emu/bus/chanf/slot.h index 283b41f371c..98276b81b9f 100644 --- a/src/emu/bus/chanf/slot.h +++ b/src/emu/bus/chanf/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __CHANF_SLOT_H #define __CHANF_SLOT_H diff --git a/src/emu/bus/crvision/rom.c b/src/emu/bus/crvision/rom.c index f67a27a054e..875a2b40fbc 100644 --- a/src/emu/bus/crvision/rom.c +++ b/src/emu/bus/crvision/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/crvision/rom.h b/src/emu/bus/crvision/rom.h index eb44fee4ef9..2d8330f0d1e 100644 --- a/src/emu/bus/crvision/rom.h +++ b/src/emu/bus/crvision/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __CRVISION_ROM_H #define __CRVISION_ROM_H diff --git a/src/emu/bus/crvision/slot.c b/src/emu/bus/crvision/slot.c index 56f4b569b64..af3bce0a016 100644 --- a/src/emu/bus/crvision/slot.c +++ b/src/emu/bus/crvision/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** V-Tech CreatiVision cart emulation diff --git a/src/emu/bus/crvision/slot.h b/src/emu/bus/crvision/slot.h index 6d81d885a91..006f1522d40 100644 --- a/src/emu/bus/crvision/slot.h +++ b/src/emu/bus/crvision/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __CRVISION_SLOT_H #define __CRVISION_SLOT_H diff --git a/src/emu/bus/gameboy/gb_slot.c b/src/emu/bus/gameboy/gb_slot.c index 15f141c3342..60c98447591 100644 --- a/src/emu/bus/gameboy/gb_slot.c +++ b/src/emu/bus/gameboy/gb_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta, Wilbert Pol +// copyright-holders:Fabio Priuli, Wilbert Pol /*********************************************************************************************************** diff --git a/src/emu/bus/gameboy/gb_slot.h b/src/emu/bus/gameboy/gb_slot.h index b8e8af30100..711037a0da8 100644 --- a/src/emu/bus/gameboy/gb_slot.h +++ b/src/emu/bus/gameboy/gb_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta, Wilbert Pol +// copyright-holders:Fabio Priuli, Wilbert Pol #ifndef __GB_SLOT_H #define __GB_SLOT_H diff --git a/src/emu/bus/gameboy/mbc.c b/src/emu/bus/gameboy/mbc.c index ff58bff170e..33ed902cfed 100644 --- a/src/emu/bus/gameboy/mbc.c +++ b/src/emu/bus/gameboy/mbc.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta, Wilbert Pol +// copyright-holders:Fabio Priuli, Wilbert Pol /*********************************************************************************************************** Game Boy carts with MBC (Memory Bank Controller) @@ -26,8 +26,8 @@ const device_type GB_ROM_MBC6 = &device_creator<gb_rom_mbc6_device>; const device_type GB_ROM_MBC7 = &device_creator<gb_rom_mbc7_device>; const device_type GB_ROM_M161_M12 = &device_creator<gb_rom_m161_device>; const device_type GB_ROM_MMM01 = &device_creator<gb_rom_mmm01_device>; -const device_type GB_ROM_SACHEN1 = &device_creator<gb_rom_sachen1_device>; -const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen1_device>; // Just a placeholder for the moment... +const device_type GB_ROM_SACHEN1 = &device_creator<gb_rom_sachen_mmc1_device>; +const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen_mmc2_device>; const device_type GB_ROM_188IN1 = &device_creator<gb_rom_188in1_device>; const device_type GB_ROM_SINTAX = &device_creator<gb_rom_sintax_device>; const device_type GB_ROM_CHONGWU = &device_creator<gb_rom_chongwu_device>; @@ -97,8 +97,18 @@ gb_rom_mmm01_device::gb_rom_mmm01_device(const machine_config &mconfig, const ch { } -gb_rom_sachen1_device::gb_rom_sachen1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : gb_rom_mbc1_device(mconfig, GB_ROM_SACHEN1, "GB Sachen MMC1 Carts", tag, owner, clock, "gb_rom_sachen1", __FILE__) +gb_rom_sachen_mmc1_device::gb_rom_sachen_mmc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : gb_rom_mbc_device(mconfig, GB_ROM_SACHEN1, "GB Sachen MMC1 Carts", tag, owner, clock, "gb_rom_sachen1", __FILE__) +{ +} + +gb_rom_sachen_mmc1_device::gb_rom_sachen_mmc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : gb_rom_mbc_device(mconfig, type, name, tag, owner, clock, shortname, source) +{ +} + +gb_rom_sachen_mmc2_device::gb_rom_sachen_mmc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : gb_rom_sachen_mmc1_device(mconfig, GB_ROM_SACHEN2, "GB Sachen MMC2 Carts", tag, owner, clock, "gb_rom_sachen2", __FILE__) { } @@ -233,18 +243,40 @@ void gb_rom_mmm01_device::device_reset() m_reg = 0; } -void gb_rom_sachen1_device::device_start() +void gb_rom_sachen_mmc1_device::device_start() { shared_start(); save_item(NAME(m_base_bank)); save_item(NAME(m_mask)); + save_item(NAME(m_mode)); + save_item(NAME(m_unlock_cnt)); } -void gb_rom_sachen1_device::device_reset() +void gb_rom_sachen_mmc1_device::device_reset() { shared_reset(); - m_base_bank = 0; - m_mask = 0; + m_base_bank = 0x00; + m_mask = 0x00; + m_mode = MODE_LOCKED; + m_unlock_cnt = 0x00; +} + +void gb_rom_sachen_mmc2_device::device_start() +{ + shared_start(); + save_item(NAME(m_base_bank)); + save_item(NAME(m_mask)); + save_item(NAME(m_mode)); + save_item(NAME(m_unlock_cnt)); +} + +void gb_rom_sachen_mmc2_device::device_reset() +{ + shared_reset(); + m_base_bank = 0x00; + m_mask = 0x00; + m_mode = MODE_LOCKED_DMG; + m_unlock_cnt = 0x00; } void gb_rom_sintax_device::device_start() @@ -310,18 +342,18 @@ WRITE8_MEMBER(gb_rom_mbc_device::write_ram) READ8_MEMBER(gb_rom_mbc1_device::read_rom) { - if (offset < 0x4000) - { + if (offset & 0x4000) /* RB1 */ + return m_rom[rom_bank_map[(m_ram_bank << (5 + m_shift)) | m_latch_bank2] * 0x4000 + (offset & 0x3fff)]; + else + { /* RB0 */ int bank = (m_mode == MODE_4M_256k) ? (m_ram_bank << (5 + m_shift)) : 0; return m_rom[rom_bank_map[bank] * 0x4000 + (offset & 0x3fff)]; } - else - return m_rom[rom_bank_map[(m_ram_bank << (5 + m_shift)) | m_latch_bank2] * 0x4000 + (offset & 0x3fff)]; } WRITE8_MEMBER(gb_rom_mbc1_device::write_bank) { - // the mapper only uses inputs A13-A15 + // the mapper only uses inputs A15..A13 switch (offset & 0xe000) { case 0x0000: // RAM Enable Register @@ -395,7 +427,7 @@ WRITE8_MEMBER(gb_rom_mbc2_device::write_bank) READ8_MEMBER(gb_rom_mbc2_device::read_ram) { if (!m_ram.empty() && m_ram_enable) - return m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x1fff)]; + return m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x01ff)] | 0xF0; else return 0xff; } @@ -403,7 +435,7 @@ READ8_MEMBER(gb_rom_mbc2_device::read_ram) WRITE8_MEMBER(gb_rom_mbc2_device::write_ram) { if (!m_ram.empty() && m_ram_enable) - m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x1fff)] = data; + m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x01ff)] = data & 0x0F; } @@ -661,6 +693,14 @@ WRITE8_MEMBER(gb_rom_m161_device::write_bank) // MMM01 // This mmm01 implementation is mostly guess work, no clue how correct it all is +/* TODO: This implementation is wrong. Tauwasser + * + * Register 0: Map Latch, AA Mask, RAM Enable + * Register 1: EA1..EA0, RA18..RA14 + * Register 2: ??, AA18..AA15, AA14..AA13 + * Register 3: AA Multiplex, RA Mask, ???, MBC1 Mode + * + */ READ8_MEMBER(gb_rom_mmm01_device::read_rom) { @@ -704,37 +744,140 @@ WRITE8_MEMBER(gb_rom_mmm01_device::write_bank) } } - // Sachen MMC1 -READ8_MEMBER(gb_rom_sachen1_device::read_rom) +READ8_MEMBER(gb_rom_sachen_mmc1_device::read_rom) { - if (offset < 0x4000) - return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank & ~m_mask)] * 0x4000 + (offset & 0x3fff)]; + + UINT16 off_edit = offset; + + /* Wait for 0x31 transitions of A15 (hi -> lo), i.e. ROM accesses; A15 = HI while in bootstrap */ + /* This is 0x31 transitions, because we increment counter _after_ checking it */ + if (m_unlock_cnt == 0x30) + m_mode = MODE_UNLOCKED; else + m_unlock_cnt++; + + /* Logo Switch */ + if (m_mode == MODE_LOCKED) + off_edit |= 0x80; + + /* Header Un-Scramble */ + if ((off_edit & 0xFF00) == 0x0100) { + off_edit &= 0xFFAC; + off_edit |= ((offset >> 6) & 0x01) << 0; + off_edit |= ((offset >> 4) & 0x01) << 1; + off_edit |= ((offset >> 1) & 0x01) << 4; + off_edit |= ((offset >> 0) & 0x01) << 6; + } + //logerror("read from %04X (%04X)\n", offset, off_edit); + + if (offset & 0x4000) /* RB1 */ return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)] * 0x4000 + (offset & 0x3fff)]; + else /* RB0 */ + return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank & ~m_mask)] * 0x4000 + (off_edit & 0x3fff)]; } -WRITE8_MEMBER(gb_rom_sachen1_device::write_bank) +WRITE8_MEMBER(gb_rom_sachen_mmc1_device::write_bank) { - if (offset < 0x2000) // Base ROM Bank register + + /* Only A15..A6, A4, A1..A0 are connected */ + /* We only decode upper three bits */ + switch ((offset & 0xFFD3) & 0xE000) { - if ((m_latch_bank2 & 0x30) == 0x30 && data) - m_base_bank = data & 0x0f; - //logerror("write to base bank %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); + case 0x0000: /* Base ROM Bank Register */ + + if ((m_latch_bank2 & 0x30) == 0x30) + m_base_bank = data; + //logerror("write to base bank %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); + break; + + case 0x2000: /* ROM Bank Register */ + + m_latch_bank2 = data ? data : 0x01; + //logerror("write to latch %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); + break; + + case 0x4000: /* ROM Bank Mask Register */ + + if ((m_latch_bank2 & 0x30) == 0x30) + m_mask = data; + //logerror("write to mask %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); + break; + + case 0x6000: + + /* nothing happens when writing to 0x6000-0x7fff, as verified by Tauwasser */ + break; + + default: + + //logerror("write to unknown/unmapped area %04X <= %02X\n", offset, data); + /* did not extensively test other unlikely ranges */ + break; } - else if (offset < 0x4000) // ROM Bank Register - { - m_latch_bank2 = data ? data : 1; - //logerror("write to latch %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); +} + +// Sachen MMC2 + +READ8_MEMBER(gb_rom_sachen_mmc2_device::read_rom) +{ + + UINT16 off_edit = offset; + + /* Wait for 0x30 transitions of A15 (lo -> hi), i.e. ROM accesses; A15 = HI while in bootstrap */ + /* This is 0x30 transitions, because we increment counter _after_ checking it, but A15 lo -> hi*/ + /* transition means first read (hi -> lo transition) must not count */ + + if (m_unlock_cnt == 0x30 && m_mode == MODE_LOCKED_DMG) { + m_mode = MODE_LOCKED_CGB; + m_unlock_cnt = 0x00; + } else if (m_unlock_cnt == 0x30 && m_mode == MODE_LOCKED_CGB) { + m_mode = MODE_UNLOCKED; } - else if (offset < 0x6000) // ROM bank mask register - { - if ((m_latch_bank2 & 0x30) == 0x30) - m_mask = data; - //logerror("write to mask %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); + + if (m_unlock_cnt != 0x30) + m_unlock_cnt++; + + /* Logo Switch */ + if (m_mode == MODE_LOCKED_CGB) + off_edit |= 0x80; + + /* Header Un-Scramble */ + if ((off_edit & 0xFF00) == 0x0100) { + off_edit &= 0xFFAC; + off_edit |= ((offset >> 6) & 0x01) << 0; + off_edit |= ((offset >> 4) & 0x01) << 1; + off_edit |= ((offset >> 1) & 0x01) << 4; + off_edit |= ((offset >> 0) & 0x01) << 6; + } + //logerror("read from %04X (%04X) cnt: %02X\n", offset, off_edit, m_unlock_cnt); + + if (offset & 0x4000) /* RB1 */ + return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)] * 0x4000 + (offset & 0x3fff)]; + else /* RB0 */ + return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank & ~m_mask)] * 0x4000 + (off_edit & 0x3fff)]; +} + +READ8_MEMBER(gb_rom_sachen_mmc2_device::read_ram) +{ + + if (m_mode == MODE_LOCKED_DMG) { + m_unlock_cnt = 0x00; + m_mode = MODE_LOCKED_CGB; } - // nothing happens when writing to 0x6000-0x7fff, as verified by Tauwasser + return 0xFF; + +} + +WRITE8_MEMBER(gb_rom_sachen_mmc2_device::write_ram) +{ + + if (m_mode == MODE_LOCKED_DMG) { + m_unlock_cnt = 0x00; + m_mode = MODE_LOCKED_CGB; + } + } diff --git a/src/emu/bus/gameboy/mbc.h b/src/emu/bus/gameboy/mbc.h index d311bd1188f..f1596cbd0a6 100644 --- a/src/emu/bus/gameboy/mbc.h +++ b/src/emu/bus/gameboy/mbc.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta, Wilbert Pol +// copyright-holders:Fabio Priuli, Wilbert Pol #ifndef __GB_MBC_H #define __GB_MBC_H @@ -191,14 +191,20 @@ public: UINT8 m_bank_mask, m_bank, m_reg; }; -// ======================> gb_rom_sachen1_device +// ======================> gb_rom_sachen_mmc1_device -class gb_rom_sachen1_device : public gb_rom_mbc1_device +class gb_rom_sachen_mmc1_device : public gb_rom_mbc_device { public: + enum { + MODE_LOCKED, + MODE_UNLOCKED + }; + // construction/destruction - gb_rom_sachen1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + gb_rom_sachen_mmc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + gb_rom_sachen_mmc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); // device-level overrides virtual void device_start(); @@ -209,7 +215,32 @@ public: virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_ram) { } - UINT8 m_base_bank, m_mask; + UINT8 m_base_bank, m_mask, m_mode, m_unlock_cnt; +}; + +// ======================> gb_rom_sachen_mmc2_device + +class gb_rom_sachen_mmc2_device : public gb_rom_sachen_mmc1_device +{ +public: + + enum { + MODE_LOCKED_DMG, + MODE_LOCKED_CGB, + MODE_UNLOCKED + }; + + // construction/destruction + gb_rom_sachen_mmc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_rom); + virtual DECLARE_READ8_MEMBER(read_ram); + virtual DECLARE_WRITE8_MEMBER(write_ram); + }; // ======================> gb_rom_188in1_device diff --git a/src/emu/bus/gameboy/rom.c b/src/emu/bus/gameboy/rom.c index c8e0cf872b4..2be759adf1b 100644 --- a/src/emu/bus/gameboy/rom.c +++ b/src/emu/bus/gameboy/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta, Wilbert Pol +// copyright-holders:Fabio Priuli, Wilbert Pol /*********************************************************************************************************** Game Boy cart emulation diff --git a/src/emu/bus/gameboy/rom.h b/src/emu/bus/gameboy/rom.h index 3d2ced9d8f2..3bd27a362c8 100644 --- a/src/emu/bus/gameboy/rom.h +++ b/src/emu/bus/gameboy/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta, Wilbert Pol +// copyright-holders:Fabio Priuli, Wilbert Pol #ifndef __GB_ROM_H #define __GB_ROM_H diff --git a/src/emu/bus/gamegear/ggext.c b/src/emu/bus/gamegear/ggext.c index 82c5f3f9554..7419ec1d45a 100644 --- a/src/emu/bus/gamegear/ggext.c +++ b/src/emu/bus/gamegear/ggext.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Game Gear EXT port emulation diff --git a/src/emu/bus/gamegear/ggext.h b/src/emu/bus/gamegear/ggext.h index ee90a15a559..a3110dea711 100644 --- a/src/emu/bus/gamegear/ggext.h +++ b/src/emu/bus/gamegear/ggext.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Game Gear EXT port emulation diff --git a/src/emu/bus/gamegear/smsctrladp.c b/src/emu/bus/gamegear/smsctrladp.c index 98ed00387d9..54b9139b433 100644 --- a/src/emu/bus/gamegear/smsctrladp.c +++ b/src/emu/bus/gamegear/smsctrladp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Game Gear "SMS Controller Adaptor" emulation diff --git a/src/emu/bus/gamegear/smsctrladp.h b/src/emu/bus/gamegear/smsctrladp.h index 87442c35e0f..76c629f4dd8 100644 --- a/src/emu/bus/gamegear/smsctrladp.h +++ b/src/emu/bus/gamegear/smsctrladp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Game Gear "SMS Controller Adaptor" emulation diff --git a/src/emu/bus/gba/gba_slot.c b/src/emu/bus/gba/gba_slot.c index 8f92e274820..8844acbccb5 100644 --- a/src/emu/bus/gba/gba_slot.c +++ b/src/emu/bus/gba/gba_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont,Ryan Holtz,etabeta +// copyright-holders:R. Belmont,Ryan Holtz,Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/gba/gba_slot.h b/src/emu/bus/gba/gba_slot.h index 9ca6af44db7..05181d29d4c 100644 --- a/src/emu/bus/gba/gba_slot.h +++ b/src/emu/bus/gba/gba_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont,Ryan Holtz,etabeta +// copyright-holders:R. Belmont,Ryan Holtz,Fabio Priuli #ifndef __GBA_SLOT_H #define __GBA_SLOT_H diff --git a/src/emu/bus/gba/rom.c b/src/emu/bus/gba/rom.c index f90707a3626..3b7f775e7cf 100644 --- a/src/emu/bus/gba/rom.c +++ b/src/emu/bus/gba/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont,Ryan Holtz,etabeta +// copyright-holders:R. Belmont,Ryan Holtz,Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/gba/rom.h b/src/emu/bus/gba/rom.h index 659ad15c480..e008c318b7c 100644 --- a/src/emu/bus/gba/rom.h +++ b/src/emu/bus/gba/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont,Ryan Holtz,etabeta +// copyright-holders:R. Belmont,Ryan Holtz,Fabio Priuli #ifndef __GBA_ROM_H #define __GBA_ROM_H diff --git a/src/emu/bus/generic/carts.c b/src/emu/bus/generic/carts.c index 91f53077054..23a079289c9 100644 --- a/src/emu/bus/generic/carts.c +++ b/src/emu/bus/generic/carts.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Generic ROM / RAM socket slots diff --git a/src/emu/bus/generic/carts.h b/src/emu/bus/generic/carts.h index 9d25525e9f8..fdd354314ed 100644 --- a/src/emu/bus/generic/carts.h +++ b/src/emu/bus/generic/carts.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Generic ROM/RAM socket slots diff --git a/src/emu/bus/generic/ram.c b/src/emu/bus/generic/ram.c index 16289689cbf..3767ddae724 100644 --- a/src/emu/bus/generic/ram.c +++ b/src/emu/bus/generic/ram.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/generic/ram.h b/src/emu/bus/generic/ram.h index 7d5637286f3..ac3cfdbb113 100644 --- a/src/emu/bus/generic/ram.h +++ b/src/emu/bus/generic/ram.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __GENERIC_RAM_H #define __GENERIC_RAM_H diff --git a/src/emu/bus/generic/rom.c b/src/emu/bus/generic/rom.c index 5520e7c6d5f..a816040e229 100644 --- a/src/emu/bus/generic/rom.c +++ b/src/emu/bus/generic/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/generic/rom.h b/src/emu/bus/generic/rom.h index 1a9b0bd1883..f6c9da14341 100644 --- a/src/emu/bus/generic/rom.h +++ b/src/emu/bus/generic/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __GENERIC_ROM_H #define __GENERIC_ROM_H diff --git a/src/emu/bus/generic/slot.c b/src/emu/bus/generic/slot.c index cb65e9ba97b..f88740cc048 100644 --- a/src/emu/bus/generic/slot.c +++ b/src/emu/bus/generic/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Generic ROM / RAM Socket and Cartslot device diff --git a/src/emu/bus/generic/slot.h b/src/emu/bus/generic/slot.h index 3517974d119..7c8725e89a7 100644 --- a/src/emu/bus/generic/slot.h +++ b/src/emu/bus/generic/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __GENERIC_SLOT_H #define __GENERIC_SLOT_H diff --git a/src/emu/bus/ieee488/c2040.c b/src/emu/bus/ieee488/c2040.c index 7350af4a377..0a46c238c00 100644 --- a/src/emu/bus/ieee488/c2040.c +++ b/src/emu/bus/ieee488/c2040.c @@ -170,10 +170,10 @@ const rom_entry *c4040_device::device_rom_region() const static ADDRESS_MAP_START( c2040_main_mem, AS_PROGRAM, 8, c2040_device ) ADDRESS_MAP_GLOBAL_MASK(0x7fff) - AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_RAM // 6532 #1 - AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_RAM // 6532 #2 - AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_0_TAG, riot6532_device, read, write) - AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_1_TAG, riot6532_device, read, write) + AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_DEVICE(M6532_0_TAG, mos6532_t, ram_map) + AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_DEVICE(M6532_1_TAG, mos6532_t, ram_map) + AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_0_TAG, mos6532_t, io_map) + AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_1_TAG, mos6532_t, io_map) AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share1") AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share2") AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share3") @@ -188,9 +188,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( c2040_fdc_mem, AS_PROGRAM, 8, c2040_device ) ADDRESS_MAP_GLOBAL_MASK(0x1fff) - AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_RAM // 6530 - AM_RANGE(0x0040, 0x004f) AM_MIRROR(0x0330) AM_DEVREADWRITE(M6522_TAG, via6522_device, read, write) - AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVREADWRITE(M6530_TAG, mos6530_device, read, write) + AM_RANGE(0x0000, 0x003f) AM_MIRROR(0x0300) AM_DEVICE(M6530_TAG, mos6530_t, ram_map) + AM_RANGE(0x0040, 0x004f) AM_MIRROR(0x0330) AM_DEVICE(M6522_TAG, via6522_device, map) + AM_RANGE(0x0080, 0x008f) AM_MIRROR(0x0330) AM_DEVICE(M6530_TAG, mos6530_t, io_map) AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("share1") AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("share2") AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_SHARE("share3") @@ -405,69 +405,6 @@ WRITE8_MEMBER( c2040_device::via_pb_w ) //------------------------------------------------- -// mos6530 uk3 -//------------------------------------------------- - -READ8_MEMBER( c2040_device::miot_pb_r ) -{ - /* - - bit description - - PB0 - PB1 - PB2 - PB3 WPS - PB4 - PB5 - PB6 SYNC - PB7 - - */ - - UINT8 data = 0; - - // write protect sense - data |= m_fdc->wps_r() << 3; - - // SYNC detected - data |= m_fdc->sync_r() << 6; - - return data; -} - -WRITE8_MEMBER( c2040_device::miot_pb_w ) -{ - /* - - bit description - - PB0 DRV SEL - PB1 DS0 - PB2 DS1 - PB3 - PB4 - PB5 - PB6 - PB7 M6504 IRQ - - */ - - // drive select - m_fdc->drv_sel_w(BIT(data, 0)); - - // density select - m_fdc->ds_w((data >> 1) & 0x03); - - // interrupt - if (m_miot_irq != BIT(data, 7)) - { - m_fdccpu->set_input_line(M6502_IRQ_LINE, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE); - m_miot_irq = BIT(data, 7); - } -} - -//------------------------------------------------- // SLOT_INTERFACE( c2040_floppies ) //------------------------------------------------- @@ -515,16 +452,16 @@ static MACHINE_CONFIG_FRAGMENT( c2040 ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_16MHz/16) MCFG_CPU_PROGRAM_MAP(c2040_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_16MHz/16) - MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_16MHz/16) + MCFG_MOS6530n_IN_PA_CB(READ8(c2040_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c2040_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_16MHz/16) - MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_16MHz/16) + MCFG_MOS6530n_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_16MHz/16) @@ -536,12 +473,16 @@ static MACHINE_CONFIG_FRAGMENT( c2040 ) MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, mode_sel_w)) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, rw_sel_w)) - MCFG_DEVICE_ADD(M6530_TAG, MOS6530, XTAL_16MHz/16) - MCFG_MOS6530_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) - MCFG_MOS6530_IN_PB_CB(READ8(c2040_device, miot_pb_r)) - MCFG_MOS6530_OUT_PB_CB(WRITE8(c2040_device, miot_pb_w)) + MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_16MHz/16) + MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) + MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, drv_sel_w)) + MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, ds0_w)) + MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, ds1_w)) + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) + MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c2040_fdc_t, wps_r)) MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) + MCFG_C2040_SYNC_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb6_w)) MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c2040_device::floppy_formats) @@ -569,16 +510,16 @@ static MACHINE_CONFIG_FRAGMENT( c3040 ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_16MHz/16) MCFG_CPU_PROGRAM_MAP(c2040_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_16MHz/16) - MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_16MHz/16) + MCFG_MOS6530n_IN_PA_CB(READ8(c2040_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c2040_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_16MHz/16) - MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_16MHz/16) + MCFG_MOS6530n_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_16MHz/16) @@ -590,12 +531,16 @@ static MACHINE_CONFIG_FRAGMENT( c3040 ) MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, mode_sel_w)) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, rw_sel_w)) - MCFG_DEVICE_ADD(M6530_TAG, MOS6530, XTAL_16MHz/16) - MCFG_MOS6530_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) - MCFG_MOS6530_IN_PB_CB(READ8(c2040_device, miot_pb_r)) - MCFG_MOS6530_OUT_PB_CB(WRITE8(c2040_device, miot_pb_w)) + MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_16MHz/16) + MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) + MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, drv_sel_w)) + MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, ds0_w)) + MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, ds1_w)) + MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c2040_fdc_t, wps_r)) + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) + MCFG_C2040_SYNC_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb6_w)) MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c3040_device::floppy_formats) @@ -623,16 +568,16 @@ static MACHINE_CONFIG_FRAGMENT( c4040 ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_16MHz/16) MCFG_CPU_PROGRAM_MAP(c2040_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_16MHz/16) - MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_16MHz/16) + MCFG_MOS6530n_IN_PA_CB(READ8(c2040_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c2040_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_16MHz/16) - MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_16MHz/16) + MCFG_MOS6530n_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_16MHz/16) @@ -644,12 +589,16 @@ static MACHINE_CONFIG_FRAGMENT( c4040 ) MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, mode_sel_w)) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, rw_sel_w)) - MCFG_DEVICE_ADD(M6530_TAG, MOS6530, XTAL_16MHz/16) - MCFG_MOS6530_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) - MCFG_MOS6530_IN_PB_CB(READ8(c2040_device, miot_pb_r)) - MCFG_MOS6530_OUT_PB_CB(WRITE8(c2040_device, miot_pb_w)) + MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_16MHz/16) + MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) + MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, drv_sel_w)) + MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, ds0_w)) + MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c2040_fdc_t, ds1_w)) + MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c2040_fdc_t, wps_r)) + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) + MCFG_C2040_SYNC_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb6_w)) MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c4040_device::floppy_formats) @@ -741,8 +690,7 @@ c2040_device::c2040_device(const machine_config &mconfig, device_type type, cons m_address(*this, "ADDRESS"), m_rfdo(1), m_daco(1), - m_atna(1), - m_miot_irq(CLEAR_LINE) + m_atna(1) { } @@ -762,8 +710,7 @@ c2040_device::c2040_device(const machine_config &mconfig, const char *tag, devic m_address(*this, "ADDRESS"), m_rfdo(1), m_daco(1), - m_atna(1), - m_miot_irq(CLEAR_LINE) + m_atna(1) { } @@ -797,7 +744,7 @@ void c2040_device::device_start() save_item(NAME(m_rfdo)); save_item(NAME(m_daco)); save_item(NAME(m_atna)); - save_item(NAME(m_miot_irq)); + save_item(NAME(m_ifc)); } @@ -820,6 +767,8 @@ void c2040_device::device_reset() m_miot->reset(); m_via->reset(); + m_riot1->pa7_w(0); + // turn off spindle motors m_fdc->mtr0_w(1); m_fdc->mtr1_w(1); @@ -834,8 +783,7 @@ void c2040_device::ieee488_atn(int state) { update_ieee_signals(); - // set RIOT PA7 - m_riot1->porta_in_set(!state << 7, 0x80); + m_riot1->pa7_w(!state); } diff --git a/src/emu/bus/ieee488/c2040.h b/src/emu/bus/ieee488/c2040.h index 45f0d6d443c..7b82857764e 100644 --- a/src/emu/bus/ieee488/c2040.h +++ b/src/emu/bus/ieee488/c2040.h @@ -17,8 +17,7 @@ #include "cpu/m6502/m6502.h" #include "cpu/m6502/m6504.h" #include "machine/6522via.h" -#include "machine/6532riot.h" -#include "machine/mos6530.h" +#include "machine/mos6530n.h" @@ -29,7 +28,7 @@ // ======================> c2040_device class c2040_device : public device_t, - public device_ieee488_interface + public device_ieee488_interface { public: // construction/destruction @@ -50,8 +49,6 @@ public: DECLARE_WRITE8_MEMBER( via_pb_w ); DECLARE_WRITE_LINE_MEMBER( mode_sel_w ); DECLARE_WRITE_LINE_MEMBER( rw_sel_w ); - DECLARE_READ8_MEMBER( miot_pb_r ); - DECLARE_WRITE8_MEMBER( miot_pb_w ); DECLARE_FLOPPY_FORMATS( floppy_formats ); @@ -76,9 +73,9 @@ protected: required_device<m6502_device> m_maincpu; required_device<m6504_device> m_fdccpu; - required_device<riot6532_device> m_riot0; - required_device<riot6532_device> m_riot1; - required_device<mos6530_device> m_miot; + required_device<mos6532_t> m_riot0; + required_device<mos6532_t> m_riot1; + required_device<mos6530_t> m_miot; required_device<via6522_device> m_via; required_device<floppy_image_device> m_floppy0; optional_device<floppy_image_device> m_floppy1; @@ -91,9 +88,6 @@ protected: int m_daco; // not data accepted output int m_atna; // attention acknowledge int m_ifc; - - // signals - int m_miot_irq; // MIOT interrupt }; diff --git a/src/emu/bus/ieee488/c2040fdc.c b/src/emu/bus/ieee488/c2040fdc.c index 44baae86260..4dfccbde366 100644 --- a/src/emu/bus/ieee488/c2040fdc.c +++ b/src/emu/bus/ieee488/c2040fdc.c @@ -82,6 +82,8 @@ c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, const char *tag, device_ m_stp0(0), m_stp1(0), m_ds(0), + m_ds0(0), + m_ds1(0), m_drv_sel(0), m_mode_sel(0), m_rw_sel(0), @@ -116,6 +118,8 @@ void c2040_fdc_t::device_start() save_item(NAME(m_stp0)); save_item(NAME(m_stp1)); save_item(NAME(m_ds)); + save_item(NAME(m_ds0)); + save_item(NAME(m_ds1)); save_item(NAME(m_drv_sel)); save_item(NAME(m_mode_sel)); save_item(NAME(m_rw_sel)); @@ -451,6 +455,18 @@ WRITE8_MEMBER( c2040_fdc_t::write ) } } +WRITE_LINE_MEMBER( c2040_fdc_t::ds0_w ) +{ + m_ds0 = state; +} + +WRITE_LINE_MEMBER( c2040_fdc_t::ds1_w ) +{ + m_ds1 = state; + + ds_w(m_ds1 << 1 | m_ds0); +} + WRITE_LINE_MEMBER( c2040_fdc_t::drv_sel_w ) { if (m_drv_sel != state) diff --git a/src/emu/bus/ieee488/c2040fdc.h b/src/emu/bus/ieee488/c2040fdc.h index 5e09f9843e7..178e81240a2 100644 --- a/src/emu/bus/ieee488/c2040fdc.h +++ b/src/emu/bus/ieee488/c2040fdc.h @@ -54,6 +54,8 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); + DECLARE_WRITE_LINE_MEMBER( ds0_w ); + DECLARE_WRITE_LINE_MEMBER( ds1_w ); DECLARE_WRITE_LINE_MEMBER( drv_sel_w ); DECLARE_WRITE_LINE_MEMBER( mode_sel_w ); DECLARE_WRITE_LINE_MEMBER( rw_sel_w ); @@ -127,6 +129,8 @@ protected: int m_stp0; int m_stp1; int m_ds; + int m_ds0; + int m_ds1; int m_drv_sel; int m_mode_sel; int m_rw_sel; diff --git a/src/emu/bus/ieee488/c8050.c b/src/emu/bus/ieee488/c8050.c index 7211a834bdc..20026009c43 100644 --- a/src/emu/bus/ieee488/c8050.c +++ b/src/emu/bus/ieee488/c8050.c @@ -184,10 +184,10 @@ const rom_entry *sfd1001_device::device_rom_region() const //------------------------------------------------- static ADDRESS_MAP_START( c8050_main_mem, AS_PROGRAM, 8, c8050_device ) - AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_RAM // 6532 #1 - AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_RAM // 6532 #2 - AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_0_TAG, riot6532_device, read, write) - AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_1_TAG, riot6532_device, read, write) + AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_DEVICE(M6532_0_TAG, mos6532_t, ram_map) + AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_DEVICE(M6532_1_TAG, mos6532_t, ram_map) + AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_0_TAG, mos6532_t, io_map) + AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVICE(M6532_1_TAG, mos6532_t, io_map) AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share1") AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share2") AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share3") @@ -528,16 +528,16 @@ static MACHINE_CONFIG_FRAGMENT( c8050 ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12) MCFG_CPU_PROGRAM_MAP(c8050_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_12MHz/12) @@ -550,12 +550,13 @@ static MACHINE_CONFIG_FRAGMENT( c8050 ) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w)) MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12) - MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write)) MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w)) MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w)) MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w)) MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r)) + MCFG_MOS6530n_IN_PB6_CB(VCC) // SINGLE SIDED + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL_12MHz/2) MCFG_C8050_SYNC_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_pb7)) @@ -587,16 +588,16 @@ static MACHINE_CONFIG_FRAGMENT( c8250 ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12) MCFG_CPU_PROGRAM_MAP(c8050_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_12MHz/12) @@ -609,7 +610,6 @@ static MACHINE_CONFIG_FRAGMENT( c8250 ) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w)) MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12) - MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write)) MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w)) MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w)) @@ -617,6 +617,7 @@ static MACHINE_CONFIG_FRAGMENT( c8250 ) MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r)) MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w)) MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL_12MHz/2) MCFG_C8050_SYNC_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_pb7)) @@ -648,16 +649,16 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12) MCFG_CPU_PROGRAM_MAP(c8050_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_12MHz/12) @@ -670,7 +671,6 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp ) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w)) MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12) - MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write)) MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w)) MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w)) @@ -678,6 +678,7 @@ static MACHINE_CONFIG_FRAGMENT( c8250lp ) MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r)) MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w)) MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL_12MHz/2) MCFG_C8050_SYNC_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_pb7)) @@ -709,16 +710,16 @@ static MACHINE_CONFIG_FRAGMENT( sfd1001 ) MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_12MHz/12) MCFG_CPU_PROGRAM_MAP(c8050_main_mem) - MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, dio_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, dio_w)) + MCFG_DEVICE_ADD(M6532_0_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, dio_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, dio_w)) - MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_12MHz/12) - MCFG_RIOT6532_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) - MCFG_RIOT6532_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) - MCFG_RIOT6532_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) - MCFG_RIOT6532_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) - MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + MCFG_DEVICE_ADD(M6532_1_TAG, MOS6532n, XTAL_12MHz/12) + MCFG_MOS6530n_IN_PA_CB(READ8(c8050_device, riot1_pa_r)) + MCFG_MOS6530n_OUT_PA_CB(WRITE8(c8050_device, riot1_pa_w)) + MCFG_MOS6530n_IN_PB_CB(READ8(c8050_device, riot1_pb_r)) + MCFG_MOS6530n_OUT_PB_CB(WRITE8(c8050_device, riot1_pb_w)) + MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) // controller MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_12MHz/12) @@ -731,13 +732,13 @@ static MACHINE_CONFIG_FRAGMENT( sfd1001 ) MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c8050_fdc_t, rw_sel_w)) MCFG_DEVICE_ADD(M6530_TAG, MOS6530n, XTAL_12MHz/12) - MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_MOS6530n_OUT_PA_CB(DEVWRITE8(FDC_TAG, c8050_fdc_t, write)) MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w)) MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w)) MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r)) MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w)) MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED + MCFG_MOS6530n_OUT_PB7_CB(INPUTLINE(M6504_TAG, M6502_IRQ_LINE)) MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL_12MHz/2) MCFG_C8050_SYNC_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_pb7)) @@ -914,6 +915,8 @@ void c8050_device::device_reset() m_miot->reset(); m_via->reset(); + m_riot1->pa7_w(1); + // turn off spindle motors m_fdc->mtr0_w(1); m_fdc->mtr1_w(1); @@ -928,8 +931,7 @@ void c8050_device::ieee488_atn(int state) { update_ieee_signals(); - // set RIOT PA7 - m_riot1->porta_in_set(!state << 7, 0x80); + m_riot1->pa7_w(state); } diff --git a/src/emu/bus/ieee488/c8050.h b/src/emu/bus/ieee488/c8050.h index 594c577b831..1ca90511025 100644 --- a/src/emu/bus/ieee488/c8050.h +++ b/src/emu/bus/ieee488/c8050.h @@ -17,7 +17,6 @@ #include "cpu/m6502/m6502.h" #include "cpu/m6502/m6504.h" #include "machine/6522via.h" -#include "machine/6532riot.h" #include "machine/mos6530n.h" @@ -66,8 +65,8 @@ protected: required_device<m6502_device> m_maincpu; required_device<m6504_device> m_fdccpu; - required_device<riot6532_device> m_riot0; - required_device<riot6532_device> m_riot1; + required_device<mos6532_t> m_riot0; + required_device<mos6532_t> m_riot1; required_device<mos6530_t> m_miot; required_device<via6522_device> m_via; required_device<floppy_connector> m_floppy0; diff --git a/src/emu/bus/ieee488/c8050fdc.c b/src/emu/bus/ieee488/c8050fdc.c index 8b0a853c6d0..02bceb80328 100644 --- a/src/emu/bus/ieee488/c8050fdc.c +++ b/src/emu/bus/ieee488/c8050fdc.c @@ -85,6 +85,8 @@ c8050_fdc_t::c8050_fdc_t(const machine_config &mconfig, const char *tag, device_ m_stp0(0), m_stp1(0), m_ds(0), + m_ds0(0), + m_ds1(0), m_drv_sel(0), m_mode_sel(0), m_rw_sel(1) @@ -117,6 +119,8 @@ void c8050_fdc_t::device_start() save_item(NAME(m_stp0)); save_item(NAME(m_stp1)); save_item(NAME(m_ds)); + save_item(NAME(m_ds0)); + save_item(NAME(m_ds1)); save_item(NAME(m_drv_sel)); save_item(NAME(m_mode_sel)); save_item(NAME(m_rw_sel)); diff --git a/src/emu/bus/intv/ecs.c b/src/emu/bus/intv/ecs.c index eb3ad0defa0..f9d140bb62d 100644 --- a/src/emu/bus/intv/ecs.c +++ b/src/emu/bus/intv/ecs.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/intv/ecs.h b/src/emu/bus/intv/ecs.h index 5ddc99d8b18..8148459fc22 100644 --- a/src/emu/bus/intv/ecs.h +++ b/src/emu/bus/intv/ecs.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __INTV_ECS_H #define __INTV_ECS_H diff --git a/src/emu/bus/intv/rom.c b/src/emu/bus/intv/rom.c index 27a100e6de1..74b5664a6fc 100644 --- a/src/emu/bus/intv/rom.c +++ b/src/emu/bus/intv/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/intv/rom.h b/src/emu/bus/intv/rom.h index bcc2d885585..15a66e10817 100644 --- a/src/emu/bus/intv/rom.h +++ b/src/emu/bus/intv/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __INTV_ROM_H #define __INTV_ROM_H diff --git a/src/emu/bus/intv/slot.c b/src/emu/bus/intv/slot.c index fda241fcdee..6b48f976e7f 100644 --- a/src/emu/bus/intv/slot.c +++ b/src/emu/bus/intv/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Mattel Intellivision cart emulation diff --git a/src/emu/bus/intv/slot.h b/src/emu/bus/intv/slot.h index 48d1ad99985..2b5269edb8b 100644 --- a/src/emu/bus/intv/slot.h +++ b/src/emu/bus/intv/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __INTV_SLOT_H #define __INTV_SLOT_H diff --git a/src/emu/bus/intv/voice.c b/src/emu/bus/intv/voice.c index ba5e57b38ca..2ec50862d0d 100644 --- a/src/emu/bus/intv/voice.c +++ b/src/emu/bus/intv/voice.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/intv/voice.h b/src/emu/bus/intv/voice.h index d4046fa2a2e..412d3de7760 100644 --- a/src/emu/bus/intv/voice.h +++ b/src/emu/bus/intv/voice.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __INTV_VOICE_H #define __INTV_VOICE_H diff --git a/src/emu/bus/isa/ibm_mfc.c b/src/emu/bus/isa/ibm_mfc.c index c26962d33e3..bfe265f9e10 100644 --- a/src/emu/bus/isa/ibm_mfc.c +++ b/src/emu/bus/isa/ibm_mfc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/bus/isa/ibm_mfc.h b/src/emu/bus/isa/ibm_mfc.h index bf76662f82f..51bcace8bd8 100644 --- a/src/emu/bus/isa/ibm_mfc.h +++ b/src/emu/bus/isa/ibm_mfc.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/bus/isa/mpu401.c b/src/emu/bus/isa/mpu401.c index 82084c994da..420a753b750 100644 --- a/src/emu/bus/isa/mpu401.c +++ b/src/emu/bus/isa/mpu401.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont,Kevin Horton +// copyright-holders:R. Belmont,Kevin Horton /*************************************************************************** MPU-401 MIDI device interface diff --git a/src/emu/bus/isa/mpu401.h b/src/emu/bus/isa/mpu401.h index 055148b38d0..b31bb3a2308 100644 --- a/src/emu/bus/isa/mpu401.h +++ b/src/emu/bus/isa/mpu401.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont,Kevin Horton +// copyright-holders:R. Belmont,Kevin Horton #pragma once #ifndef __ISA_MPU401_H__ diff --git a/src/emu/bus/isa/s3virge.c b/src/emu/bus/isa/s3virge.c index 7322783a021..f5065e8559e 100644 --- a/src/emu/bus/isa/s3virge.c +++ b/src/emu/bus/isa/s3virge.c @@ -269,7 +269,7 @@ void s3virge_vga_device::s3_define_video_mode() { // Dot clock is set via SR12 and SR13 // DCLK calculation - freq = ((double)(s3.clk_pll_m+2) / (double)((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318f; // clock between XIN and XOUT + freq = ((double)(s3.clk_pll_m+2) / (double)((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318; // clock between XIN and XOUT xtal = freq * 1000000; //printf("DCLK set to %dHz M=%i N=%i R=%i\n",xtal,s3.clk_pll_m,s3.clk_pll_n,s3.clk_pll_r); } diff --git a/src/emu/bus/isa/sblaster.c b/src/emu/bus/isa/sblaster.c index 34124f7dd74..b37067a2923 100644 --- a/src/emu/bus/isa/sblaster.c +++ b/src/emu/bus/isa/sblaster.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont, Miodrag Milanovic +// copyright-holders:R. Belmont, Miodrag Milanovic /*************************************************************************** ISA 8/16 bit Creative Labs Sound Blaster Sound Card @@ -834,12 +834,12 @@ void sb16_device::mixer_set() ymf262_device *ymf = subdevice<ymf262_device>("ymf262"); float lmain = m_mixer.main_vol[0]/248.0; float rmain = m_mixer.main_vol[1]/248.0; - m_dacl->set_output_gain(ALL_OUTPUTS, lmain*(m_mixer.dac_vol[0]/248.0)); - m_dacr->set_output_gain(ALL_OUTPUTS, rmain*(m_mixer.dac_vol[1]/248.0)); - ymf->set_output_gain(0, lmain*(m_mixer.fm_vol[0]/248.0)); - ymf->set_output_gain(1, rmain*(m_mixer.fm_vol[1]/248.0)); - ymf->set_output_gain(2, lmain*(m_mixer.fm_vol[0]/248.0)); - ymf->set_output_gain(3, rmain*(m_mixer.fm_vol[1]/248.0)); + m_dacl->set_output_gain(ALL_OUTPUTS, lmain*(m_mixer.dac_vol[0]/248.0f)); + m_dacr->set_output_gain(ALL_OUTPUTS, rmain*(m_mixer.dac_vol[1]/248.0f)); + ymf->set_output_gain(0, lmain*(m_mixer.fm_vol[0]/248.0f)); + ymf->set_output_gain(1, rmain*(m_mixer.fm_vol[1]/248.0f)); + ymf->set_output_gain(2, lmain*(m_mixer.fm_vol[0]/248.0f)); + ymf->set_output_gain(3, rmain*(m_mixer.fm_vol[1]/248.0f)); } void sb16_device::mixer_reset() diff --git a/src/emu/bus/isa/sblaster.h b/src/emu/bus/isa/sblaster.h index 26a3bd3e953..fc8be653fd1 100644 --- a/src/emu/bus/isa/sblaster.h +++ b/src/emu/bus/isa/sblaster.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont, Miodrag Milanovic +// copyright-holders:R. Belmont, Miodrag Milanovic #pragma once #ifndef __ISA_SOUND_BLASTER_H__ diff --git a/src/emu/bus/isa/trident.c b/src/emu/bus/isa/trident.c index 2b122d5587a..03f646139be 100644 --- a/src/emu/bus/isa/trident.c +++ b/src/emu/bus/isa/trident.c @@ -315,7 +315,7 @@ int trident_vga_device::calculate_clock() m = tri.vid_clock & 0x007f; n = (tri.vid_clock & 0x0f80) >> 7; k = (tri.vid_clock & 0x1000) >> 12; - freq = ((double)(m+8) / (double)((n+2)*(pow(2.0,k)))) * 14.31818f; // there is a 14.31818MHz clock on the board + freq = ((double)(m+8) / (double)((n+2)*(pow(2.0,k)))) * 14.31818; // there is a 14.31818MHz clock on the board return freq * 1000000; } diff --git a/src/emu/bus/isa/xtide.c b/src/emu/bus/isa/xtide.c index 95a296e347c..bde729cc012 100644 --- a/src/emu/bus/isa/xtide.c +++ b/src/emu/bus/isa/xtide.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith /*************************************************************************** diff --git a/src/emu/bus/isa/xtide.h b/src/emu/bus/isa/xtide.h index 5779722d20d..762be607ea3 100644 --- a/src/emu/bus/isa/xtide.h +++ b/src/emu/bus/isa/xtide.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith #pragma once diff --git a/src/emu/bus/megadrive/eeprom.c b/src/emu/bus/megadrive/eeprom.c index 829cffcd62c..e0a72f3a939 100644 --- a/src/emu/bus/megadrive/eeprom.c +++ b/src/emu/bus/megadrive/eeprom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/megadrive/eeprom.h b/src/emu/bus/megadrive/eeprom.h index 8d0bba24552..a7916e628bf 100644 --- a/src/emu/bus/megadrive/eeprom.h +++ b/src/emu/bus/megadrive/eeprom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_EEPROM_H #define __MD_EEPROM_H diff --git a/src/emu/bus/megadrive/ggenie.c b/src/emu/bus/megadrive/ggenie.c index 2d17d7d09b7..1c75febc54b 100644 --- a/src/emu/bus/megadrive/ggenie.c +++ b/src/emu/bus/megadrive/ggenie.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/megadrive/ggenie.h b/src/emu/bus/megadrive/ggenie.h index 1f147796fd3..010ace73441 100644 --- a/src/emu/bus/megadrive/ggenie.h +++ b/src/emu/bus/megadrive/ggenie.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_GGENIE_H #define __MD_GGENIE_H diff --git a/src/emu/bus/megadrive/jcart.c b/src/emu/bus/megadrive/jcart.c index cb44597e842..513fa19f3d5 100644 --- a/src/emu/bus/megadrive/jcart.c +++ b/src/emu/bus/megadrive/jcart.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/megadrive/jcart.h b/src/emu/bus/megadrive/jcart.h index 67b56c373a7..c59f3af7572 100644 --- a/src/emu/bus/megadrive/jcart.h +++ b/src/emu/bus/megadrive/jcart.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_JCART_H #define __MD_JCART_H diff --git a/src/emu/bus/megadrive/md_carts.c b/src/emu/bus/megadrive/md_carts.c index abf21ee7cac..a1ff06e8e72 100644 --- a/src/emu/bus/megadrive/md_carts.c +++ b/src/emu/bus/megadrive/md_carts.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Megadrive carts diff --git a/src/emu/bus/megadrive/md_carts.h b/src/emu/bus/megadrive/md_carts.h index 6b17c450155..b9ab25d146b 100644 --- a/src/emu/bus/megadrive/md_carts.h +++ b/src/emu/bus/megadrive/md_carts.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Megadrive carts diff --git a/src/emu/bus/megadrive/md_slot.c b/src/emu/bus/megadrive/md_slot.c index 8434be36757..ff703b6e618 100644 --- a/src/emu/bus/megadrive/md_slot.c +++ b/src/emu/bus/megadrive/md_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/megadrive/md_slot.h b/src/emu/bus/megadrive/md_slot.h index ba27ba2fde2..e7cf7e43c3b 100644 --- a/src/emu/bus/megadrive/md_slot.h +++ b/src/emu/bus/megadrive/md_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_SLOT_H #define __MD_SLOT_H diff --git a/src/emu/bus/megadrive/rom.c b/src/emu/bus/megadrive/rom.c index 6cf6c884bc6..5abb0349a99 100644 --- a/src/emu/bus/megadrive/rom.c +++ b/src/emu/bus/megadrive/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/megadrive/rom.h b/src/emu/bus/megadrive/rom.h index 33a8cbaccd4..1ecc693606e 100644 --- a/src/emu/bus/megadrive/rom.h +++ b/src/emu/bus/megadrive/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_ROM_H #define __MD_ROM_H diff --git a/src/emu/bus/megadrive/sk.c b/src/emu/bus/megadrive/sk.c index 4453517d091..8c10826f685 100644 --- a/src/emu/bus/megadrive/sk.c +++ b/src/emu/bus/megadrive/sk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/megadrive/sk.h b/src/emu/bus/megadrive/sk.h index 39d15494bf3..4ad52056066 100644 --- a/src/emu/bus/megadrive/sk.h +++ b/src/emu/bus/megadrive/sk.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_SK_H #define __MD_SK_H diff --git a/src/emu/bus/megadrive/stm95.c b/src/emu/bus/megadrive/stm95.c index 58361f02193..53770509a6c 100644 --- a/src/emu/bus/megadrive/stm95.c +++ b/src/emu/bus/megadrive/stm95.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*************************************************************************** diff --git a/src/emu/bus/megadrive/stm95.h b/src/emu/bus/megadrive/stm95.h index c42b6d69dbc..3c596ea31c4 100644 --- a/src/emu/bus/megadrive/stm95.h +++ b/src/emu/bus/megadrive/stm95.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_STM95_H #define __MD_STM95_H diff --git a/src/emu/bus/megadrive/svp.c b/src/emu/bus/megadrive/svp.c index a043af22ec5..89b23880d44 100644 --- a/src/emu/bus/megadrive/svp.c +++ b/src/emu/bus/megadrive/svp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /****************************************** SVP related *****************************************/ /* diff --git a/src/emu/bus/megadrive/svp.h b/src/emu/bus/megadrive/svp.h index a998025be2b..6e07925ba55 100644 --- a/src/emu/bus/megadrive/svp.h +++ b/src/emu/bus/megadrive/svp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __MD_SVP_H #define __MD_SVP_H diff --git a/src/emu/bus/nasbus/avc.c b/src/emu/bus/nasbus/avc.c new file mode 100644 index 00000000000..35b86e09420 --- /dev/null +++ b/src/emu/bus/nasbus/avc.c @@ -0,0 +1,173 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom Advanced Video Card + +***************************************************************************/ + +#include "avc.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type NASCOM_AVC = &device_creator<nascom_avc_device>; + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( nascom_avc ) + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_RAW_PARAMS(16250000, 1024, 0, 768, 320, 0, 256) + MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update) + + MCFG_MC6845_ADD("mc6845", MC6845, "screen", XTAL_16MHz / 8) + MCFG_MC6845_SHOW_BORDER_AREA(false) + MCFG_MC6845_CHAR_WIDTH(6) + MCFG_MC6845_UPDATE_ROW_CB(nascom_avc_device, crtc_update_row) +MACHINE_CONFIG_END + +machine_config_constructor nascom_avc_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( nascom_avc ); +} + +const rgb_t nascom_avc_device::m_palette[] = +{ + rgb_t::black, + rgb_t(0xff, 0x00, 0x00), + rgb_t(0x00, 0xff, 0x00), + rgb_t(0xff, 0xff, 0x00), + rgb_t(0x00, 0x00, 0xff), + rgb_t(0xff, 0x00, 0xff), + rgb_t(0x00, 0xff, 0xff), + rgb_t::white, +}; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// nascom_avc_device - constructor +//------------------------------------------------- + +nascom_avc_device::nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, NASCOM_AVC, "Nascom Advanced Video Card", tag, owner, clock, "nascom_avc", __FILE__), + device_nasbus_card_interface(mconfig, *this), + m_crtc(*this, "mc6845"), + m_control(0x80) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void nascom_avc_device::device_start() +{ + // allocate memory + m_r_ram.resize(0x4000); + m_g_ram.resize(0x4000); + m_b_ram.resize(0x4000); + + save_item(NAME(m_r_ram)); + save_item(NAME(m_g_ram)); + save_item(NAME(m_b_ram)); + save_item(NAME(m_control)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void nascom_avc_device::device_reset() +{ + m_nasbus->m_io->install_write_handler(0xb0, 0xb0, write8_delegate(FUNC(mc6845_device::address_w), m_crtc.target())); + m_nasbus->m_io->install_readwrite_handler(0xb1, 0xb1, read8_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::register_w), m_crtc.target())); + m_nasbus->m_io->install_write_handler(0xb2, 0xb2, write8_delegate(FUNC(nascom_avc_device::control_w), this)); +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +MC6845_UPDATE_ROW( nascom_avc_device::crtc_update_row ) +{ + offs_t base_addr = (ma << 1 | ra << 6) + 2; // y * 64 + 2 + + for (int x = 0; x < x_count * 6; x++) + { + // addr of source byte + offs_t addr = base_addr + (x / 16); + + // msb first + int bl = 7 - ((x / 2) & 7); + int bh = 7 - ((x / 1) & 7); + + int r, g, b; + + // double density) + if (BIT(m_control, 3)) + { + // red disabled, blue low density, red/green combined to green + r = 0; + b = BIT(m_b_ram[addr], bl); + g = (x & 8) ? BIT(m_r_ram[addr], bh) : BIT(m_g_ram[addr], bh); + } + else + { + // rgb color + r = BIT(m_r_ram[addr], bl); + g = BIT(m_g_ram[addr], bl); + b = BIT(m_b_ram[addr], bl); + } + + // plot the pixel + bitmap.pix32(y, x) = m_palette[(b << 2) | (g << 1) | (r << 0)]; + } +} + +WRITE8_MEMBER( nascom_avc_device::control_w ) +{ + logerror("nascom_avc_device::control_w: 0x%02x\n", data); + + // page video ram in? + if (((m_control & 0x07) == 0) && (data & 0x07)) + { + m_nasbus->ram_disable_w(0); + m_nasbus->m_program->install_readwrite_handler(0x8000, 0xbfff, read8_delegate(FUNC(nascom_avc_device::vram_r), this), write8_delegate(FUNC(nascom_avc_device::vram_w), this)); + } + else if ((data & 0x07) == 0) + { + m_nasbus->m_program->unmap_readwrite(0x8000, 0xbfff); + m_nasbus->ram_disable_w(1); + } + + m_control = data; +} + +READ8_MEMBER( nascom_avc_device::vram_r ) +{ + // manual says only one plane can be read, i assume this is the order + if (BIT(m_control, 0)) return m_r_ram[offset]; + if (BIT(m_control, 1)) return m_g_ram[offset]; + if (BIT(m_control, 2)) return m_b_ram[offset]; + + // should never happen + return 0xff; +} + +WRITE8_MEMBER( nascom_avc_device::vram_w ) +{ + // all planes can be written at the same time + if (BIT(m_control, 0)) m_r_ram[offset] = data; + if (BIT(m_control, 1)) m_g_ram[offset] = data; + if (BIT(m_control, 2)) m_b_ram[offset] = data; +} diff --git a/src/emu/bus/nasbus/avc.h b/src/emu/bus/nasbus/avc.h new file mode 100644 index 00000000000..bcd22b09050 --- /dev/null +++ b/src/emu/bus/nasbus/avc.h @@ -0,0 +1,57 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom Advanced Video Card + +***************************************************************************/ + +#pragma once + +#ifndef __NASBUS_AVC_H__ +#define __NASBUS_AVC_H__ + +#include "emu.h" +#include "nasbus.h" +#include "video/mc6845.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> nascom_avc_device + +class nascom_avc_device : public device_t, public device_nasbus_card_interface +{ +public: + // construction/destruction + nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + MC6845_UPDATE_ROW(crtc_update_row); + DECLARE_WRITE8_MEMBER(control_w); + + READ8_MEMBER(vram_r); + WRITE8_MEMBER(vram_w); + +protected: + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + +private: + required_device<mc6845_device> m_crtc; + + std::vector<UINT8> m_r_ram; + std::vector<UINT8> m_g_ram; + std::vector<UINT8> m_b_ram; + + UINT8 m_control; + + static const rgb_t m_palette[]; +}; + +// device type definition +extern const device_type NASCOM_AVC; + +#endif // __NASBUS_AVC_H__ diff --git a/src/emu/bus/nasbus/cards.c b/src/emu/bus/nasbus/cards.c new file mode 100644 index 00000000000..913c17d8759 --- /dev/null +++ b/src/emu/bus/nasbus/cards.c @@ -0,0 +1,14 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom NASBUS Slot Devices + +***************************************************************************/ + +#include "cards.h" + +SLOT_INTERFACE_START( nasbus_slot_cards ) + SLOT_INTERFACE("avc", NASCOM_AVC) + SLOT_INTERFACE("floppy", NASCOM_FDC) +SLOT_INTERFACE_END diff --git a/src/emu/bus/nasbus/cards.h b/src/emu/bus/nasbus/cards.h new file mode 100644 index 00000000000..f0e5fac912b --- /dev/null +++ b/src/emu/bus/nasbus/cards.h @@ -0,0 +1,21 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom NASBUS Slot Devices + +***************************************************************************/ + +#pragma once + +#ifndef __NASBUS_CARDS_H__ +#define __NASBUS_CARDS_H__ + +#include "emu.h" + +#include "avc.h" +#include "floppy.h" + +SLOT_INTERFACE_EXTERN( nasbus_slot_cards ); + +#endif // __NASBUS_CARDS_H__ diff --git a/src/emu/bus/nasbus/floppy.c b/src/emu/bus/nasbus/floppy.c new file mode 100644 index 00000000000..e47e67224c5 --- /dev/null +++ b/src/emu/bus/nasbus/floppy.c @@ -0,0 +1,209 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom NASBUS Floppy Disc Controller + +***************************************************************************/ + +#include "floppy.h" +#include "formats/nascom_dsk.h" + + +//************************************************************************** +// CONSTANTS/MACROS +//************************************************************************** + +#define VERBOSE 1 +#define VERBOSE_STATUS 0 + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type NASCOM_FDC = &device_creator<nascom_fdc_device>; + +FLOPPY_FORMATS_MEMBER( nascom_fdc_device::floppy_formats ) + FLOPPY_NASCOM_FORMAT +FLOPPY_FORMATS_END + +static SLOT_INTERFACE_START( nascom_floppies ) + SLOT_INTERFACE("55e", TEAC_FD_55E) + SLOT_INTERFACE("55f", TEAC_FD_55F) +SLOT_INTERFACE_END + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( nascom_fdc ) + MCFG_FD1793x_ADD("fd1793", XTAL_16MHz / 4 / 4) + + MCFG_FLOPPY_DRIVE_ADD("fd1793:0", nascom_floppies, "55f", nascom_fdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1793:1", nascom_floppies, "55f", nascom_fdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1793:2", nascom_floppies, NULL, nascom_fdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1793:3", nascom_floppies, NULL, nascom_fdc_device::floppy_formats) + + MCFG_SOFTWARE_LIST_ADD("floppy_list", "nascom_flop") +MACHINE_CONFIG_END + +machine_config_constructor nascom_fdc_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( nascom_fdc ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// wordpro_device - constructor +//------------------------------------------------- + +nascom_fdc_device::nascom_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, NASCOM_FDC, "Nascom Floppy Disc Controller", tag, owner, clock, "nascom_fdc", __FILE__), + device_nasbus_card_interface(mconfig, *this), + m_fdc(*this, "fd1793"), + m_floppy0(*this, "fd1793:0"), + m_floppy1(*this, "fd1793:1"), + m_floppy2(*this, "fd1793:2"), + m_floppy3(*this, "fd1793:3"), + m_floppy(NULL), + m_motor(NULL), + m_select(0) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void nascom_fdc_device::device_start() +{ + // timer to turn off the drive motor line + m_motor = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nascom_fdc_device::motor_off), this)); + + save_item(NAME(m_select)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void nascom_fdc_device::device_reset() +{ + m_nasbus->m_io->install_readwrite_handler(0xe0, 0xe3, read8_delegate(FUNC(fd1793_t::read), m_fdc.target()), write8_delegate(FUNC(fd1793_t::write), m_fdc.target())); + m_nasbus->m_io->install_readwrite_handler(0xe4, 0xe4, read8_delegate(FUNC(nascom_fdc_device::select_r), this), write8_delegate(FUNC(nascom_fdc_device::select_w), this)); + m_nasbus->m_io->install_read_handler(0xe5, 0xe5, read8_delegate(FUNC(nascom_fdc_device::status_r), this)); +} + +//------------------------------------------------- +// device_reset_after_children - device-specific reset after children +//------------------------------------------------- + +void nascom_fdc_device::device_reset_after_children() +{ + // sanity check + if (m_floppy0->get_device() && m_floppy1->get_device()) + if (m_floppy0->get_device()->get_sides() != m_floppy1->get_device()->get_sides()) + fatalerror("Floppy drive 0 and 1 need to be of the same type.\n"); + + if (m_floppy2->get_device() && m_floppy3->get_device()) + if (m_floppy2->get_device()->get_sides() != m_floppy3->get_device()->get_sides()) + fatalerror("Floppy drive 2 and 3 need to be of the same type.\n"); +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +TIMER_CALLBACK_MEMBER( nascom_fdc_device::motor_off ) +{ + if (m_floppy0->get_device()) + m_floppy0->get_device()->mon_w(1); + + if (m_floppy1->get_device()) + m_floppy1->get_device()->mon_w(1); + + if (m_floppy2->get_device()) + m_floppy2->get_device()->mon_w(1); + + if (m_floppy3->get_device()) + m_floppy3->get_device()->mon_w(1); +} + +READ8_MEMBER( nascom_fdc_device::select_r ) +{ + m_select |= (0x80 | 0x20); + + // double sided drive for drive 0/1? + if (m_floppy0->get_device() && (m_floppy0->get_device()->get_sides() == 2)) + m_select &= ~0x20; + + if (m_floppy1->get_device() && (m_floppy1->get_device()->get_sides() == 2)) + m_select &= ~0x20; + + // double sided drive for drive 2/3? + if (m_floppy2->get_device() && (m_floppy2->get_device()->get_sides() == 2)) + m_select &= ~0x80; + + if (m_floppy3->get_device() && (m_floppy3->get_device()->get_sides() == 2)) + m_select &= ~0x80; + + if (VERBOSE) + logerror("nascom_fdc_device::select_r: 0x%02x\n", m_select); + + return m_select; +} + +WRITE8_MEMBER( nascom_fdc_device::select_w ) +{ + if (VERBOSE) + logerror("nascom_fdc_device::select_w: 0x%02x\n", data); + + m_floppy = NULL; + + if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); + if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); + if (BIT(data, 2)) m_floppy = m_floppy2->get_device(); + if (BIT(data, 3)) m_floppy = m_floppy3->get_device(); + + m_fdc->set_floppy(m_floppy); + + if (m_floppy) + { + m_floppy->ss_w(BIT(data, 4)); + m_floppy->mon_w(!BIT(data, 5)); + + // motor gets turned off again after 10 seconds + m_motor->adjust(attotime::from_seconds(10), 0); + } + + m_fdc->dden_w(BIT(data, 6)); + + m_select = data; +} + +READ8_MEMBER( nascom_fdc_device::status_r ) +{ + UINT8 data = 0; + + data |= m_fdc->intrq_r() << 0; + + // if a floppy is selected, get its ready state, otherwise just set non-ready + if (m_floppy) + data |= m_floppy->ready_r() << 1; + else + data |= 1 << 1; + + data |= m_fdc->drq_r() << 7; + + if (VERBOSE_STATUS) + logerror("nascom_fdc_device::status_r: 0x%02x\n", data); + + return data; +} diff --git a/src/emu/bus/nasbus/floppy.h b/src/emu/bus/nasbus/floppy.h new file mode 100644 index 00000000000..9315bb92df1 --- /dev/null +++ b/src/emu/bus/nasbus/floppy.h @@ -0,0 +1,61 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom NASBUS Floppy Disc Controller + +***************************************************************************/ + +#pragma once + +#ifndef __NASBUS_FLOPPY_H__ +#define __NASBUS_FLOPPY_H__ + +#include "emu.h" +#include "nasbus.h" +#include "machine/wd_fdc.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> nascom_fdc_device + +class nascom_fdc_device : public device_t, public device_nasbus_card_interface +{ +public: + // construction/destruction + nascom_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_READ8_MEMBER(select_r); + DECLARE_WRITE8_MEMBER(select_w); + DECLARE_READ8_MEMBER(status_r); + + DECLARE_FLOPPY_FORMATS(floppy_formats); + +protected: + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_reset_after_children(); + +private: + TIMER_CALLBACK_MEMBER(motor_off); + + required_device<fd1793_t> m_fdc; + required_device<floppy_connector> m_floppy0; + required_device<floppy_connector> m_floppy1; + required_device<floppy_connector> m_floppy2; + required_device<floppy_connector> m_floppy3; + + floppy_image_device *m_floppy; + emu_timer *m_motor; + + UINT8 m_select; +}; + +// device type definition +extern const device_type NASCOM_FDC; + +#endif // __NASBUS_FLOPPY_H__ diff --git a/src/emu/bus/nasbus/nasbus.c b/src/emu/bus/nasbus/nasbus.c new file mode 100644 index 00000000000..739ef9decdf --- /dev/null +++ b/src/emu/bus/nasbus/nasbus.c @@ -0,0 +1,165 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom NASBUS + + 77-pin slot + +***************************************************************************/ + +#include "nasbus.h" + + +//************************************************************************** +// NASBUS SLOT DEVICE +//************************************************************************** + +const device_type NASBUS_SLOT = &device_creator<nasbus_slot_device>; + +//------------------------------------------------- +// nasbus_slot_device - constructor +//------------------------------------------------- + +nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, NASBUS_SLOT, "NASBUS Slot", tag, owner, clock, "nasbus_slot", __FILE__), + device_slot_interface(mconfig, *this), + m_nasbus_tag(NULL) +{ +} + +nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, device_type type, const char *name, + const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_slot_interface(mconfig, *this), + m_nasbus_tag(NULL) +{ +} + +void nasbus_slot_device::set_nasbus_slot(device_t &device, device_t *owner, const char *nasbus_tag) +{ + nasbus_slot_device &nasbus_card = dynamic_cast<nasbus_slot_device &>(device); + nasbus_card.m_owner = owner; + nasbus_card.m_nasbus_tag = nasbus_tag; +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void nasbus_slot_device::device_start() +{ + device_nasbus_card_interface *dev = dynamic_cast<device_nasbus_card_interface *>(get_card_device()); + + if (dev) + { + nasbus_device *m_nasbus = downcast<nasbus_device *>(m_owner->subdevice(m_nasbus_tag)); + m_nasbus->add_card(dev); + } +} + + +//************************************************************************** +// NASBUS DEVICE +//************************************************************************** + +const device_type NASBUS = &device_creator<nasbus_device>; + +//------------------------------------------------- +// nasbus_device - constructor +//------------------------------------------------- + +nasbus_device::nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, NASBUS_SLOT, "NASBUS Backplane", tag, owner, clock, "nasbus", __FILE__), + m_program(NULL), + m_io(NULL), + m_ram_disable_handler(*this) +{ +} + +//------------------------------------------------- +// nasbus_device - destructor +//------------------------------------------------- + +nasbus_device::~nasbus_device() +{ + m_dev.detach_all(); +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void nasbus_device::device_start() +{ + // resolve callbacks + m_ram_disable_handler.resolve_safe(); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void nasbus_device::device_reset() +{ +} + +//------------------------------------------------- +// add_card - add new card to our bus +//------------------------------------------------- + +void nasbus_device::add_card(device_nasbus_card_interface *card) +{ + card->set_nasbus_device(this); + m_dev.append(*card); +} + +//------------------------------------------------- +// set_program_space - set address space we are attached to +//------------------------------------------------- + +void nasbus_device::set_program_space(address_space *program) +{ + m_program = program; +} + +//------------------------------------------------- +// set_io_space - set address space we are attached to +//------------------------------------------------- + +void nasbus_device::set_io_space(address_space *io) +{ + m_io = io; +} + +// callbacks from slot device to the host +WRITE_LINE_MEMBER( nasbus_device::ram_disable_w ) { m_ram_disable_handler(state); } + + +//************************************************************************** +// CARTRIDGE INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_nasbus_card_interface - constructor +//------------------------------------------------- + +device_nasbus_card_interface::device_nasbus_card_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device), + m_next(NULL), + m_nasbus(NULL) +{ +} + +//------------------------------------------------- +// ~device_nasbus_card_interface - destructor +//------------------------------------------------- + +device_nasbus_card_interface::~device_nasbus_card_interface() +{ +} + +void device_nasbus_card_interface::set_nasbus_device(nasbus_device *nasbus) +{ + m_nasbus = nasbus; +} diff --git a/src/emu/bus/nasbus/nasbus.h b/src/emu/bus/nasbus/nasbus.h new file mode 100644 index 00000000000..8c33f9f07c6 --- /dev/null +++ b/src/emu/bus/nasbus/nasbus.h @@ -0,0 +1,210 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom NASBUS + + 77-pin slot + + 1 0V + 2 0V + 3 0V + 4 0V + 5 Clock + 6 (spare) + 7 (spare) + 8 (spare) + 9 /RAM DISABLE + 10 /RESET SWITCH + 11 /NASCOM MEM + 12 /NASCOM IO + 13 /DBDR + 14 /RESET + 15 /HALT + 16 /BAI + 17 /BAO + 18 /BUSRQ + 19 IEI + 20 IEO + 21 (reserved for /NMI) + 22 /INT + 23 /WAIT + 24 /RFSH + 25 /MI + 26 /IORQ + 27 /MREQ + 28 /WR + 29 /RD + 30 A0 + 31 A1 + 32 A2 + 33 A3 + 34 A4 + 35 A5 + 36 A6 + 37 A7 + 38 A8 + 39 A9 + 40 A10 + 41 A11 + 42 A12 + 43 A13 + 44 A14 + 45 A15 + 46 (reserved) + 47 (reserved) + 48 (reserved) + 49 (reserved) + 50 D0 + 51 D1 + 52 D2 + 53 D3 + 54 D4 + 55 D5 + 56 D6 + 57 D7 + 58 (reserved) + 59 (reserved) + 60 (reserved) + 61 (reserved) + 62 (reserved) + 63 (reserved) + 64 (reserved) + 65 (reserved) + 66 (unused) + 67 (unused) + 68 -5V + 69 -5V + 70 -12V + 71 -12V + 72 Keyway + 73 +12V + 74 +12V + 75 +5V + 76 +5V + 77 +5V + 78 +5V + +***************************************************************************/ + +#pragma once + +#ifndef __NASBUS_H__ +#define __NASBUS_H__ + +#include "emu.h" + + +//************************************************************************** +// CONSTANTS / MACROS +//************************************************************************** + +#define NASBUS_TAG "nasbus" + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_NASBUS_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, NASBUS, 0) + +#define MCFG_NASBUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, NASBUS_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \ + nasbus_slot_device::set_nasbus_slot(*device, owner, NASBUS_TAG); + +#define MCFG_NASBUS_RAM_DISABLE_HANDLER(_devcb) \ + devcb = &nasbus_device::set_ram_disable_handler(*device, DEVCB_##_devcb); + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// forward declaration +class device_nasbus_card_interface; + +// ======================> nasbus_slot_device + +class nasbus_slot_device : public device_t, public device_slot_interface +{ +public: + // construction/destruction + nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + nasbus_slot_device(const machine_config &mconfig, device_type type, const char *name, + const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + + // device-level overrides + virtual void device_start(); + + // inline configuration + static void set_nasbus_slot(device_t &device, device_t *owner, const char *nasbus_tag); + +protected: + // configuration + const char *m_nasbus_tag; +}; + +// device type definition +extern const device_type NASBUS_SLOT; + +// ======================> nasbus_device + +class nasbus_device : public device_t +{ +public: + // construction/destruction + nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~nasbus_device(); + + template<class _Object> static devcb_base &set_ram_disable_handler(device_t &device, _Object object) + { return downcast<nasbus_device &>(device).m_ram_disable_handler.set_callback(object); } + + void add_card(device_nasbus_card_interface *card); + + void set_program_space(address_space *program); + void set_io_space(address_space *io); + + // from cards + DECLARE_WRITE_LINE_MEMBER( ram_disable_w ); + + address_space *m_program; + address_space *m_io; + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + +private: + simple_list<device_nasbus_card_interface> m_dev; + + devcb_write_line m_ram_disable_handler; +}; + +// device type definition +extern const device_type NASBUS; + +// ======================> device_nasbus_interface + +class device_nasbus_card_interface : public device_slot_card_interface +{ +public: + // construction/destruction + device_nasbus_card_interface(const machine_config &mconfig, device_t &device); + virtual ~device_nasbus_card_interface(); + + void set_nasbus_device(nasbus_device *nasbus); + + device_nasbus_card_interface *next() const { return m_next; } + device_nasbus_card_interface *m_next; + +protected: + nasbus_device *m_nasbus; +}; + +// include here so drivers don't need to +#include "cards.h" + +#endif // __NASBUS_H__ diff --git a/src/emu/bus/nes/2a03pur.c b/src/emu/bus/nes/2a03pur.c index 2b5715776e5..d7c807b63f2 100644 --- a/src/emu/bus/nes/2a03pur.c +++ b/src/emu/bus/nes/2a03pur.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/2a03pur.h b/src/emu/bus/nes/2a03pur.h index 9d0bf194301..c0d80f67bd1 100644 --- a/src/emu/bus/nes/2a03pur.h +++ b/src/emu/bus/nes/2a03pur.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_2A03PUR_H #define __NES_2A03PUR_H diff --git a/src/emu/bus/nes/act53.c b/src/emu/bus/nes/act53.c index 63742589e35..a09244b3a85 100644 --- a/src/emu/bus/nes/act53.c +++ b/src/emu/bus/nes/act53.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/act53.h b/src/emu/bus/nes/act53.h index 3c2721e113d..c870d600102 100644 --- a/src/emu/bus/nes/act53.h +++ b/src/emu/bus/nes/act53.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_ACTION53_H #define __NES_ACTION53_H diff --git a/src/emu/bus/nes/aladdin.c b/src/emu/bus/nes/aladdin.c index b091f40e46a..67749cbe12d 100644 --- a/src/emu/bus/nes/aladdin.c +++ b/src/emu/bus/nes/aladdin.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/aladdin.h b/src/emu/bus/nes/aladdin.h index 5a737089504..18bcf988a1b 100644 --- a/src/emu/bus/nes/aladdin.h +++ b/src/emu/bus/nes/aladdin.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_ALADDIN_H #define __NES_ALADDIN_H diff --git a/src/emu/bus/nes/ave.c b/src/emu/bus/nes/ave.c index 9bf639d884c..bc24f1294a5 100644 --- a/src/emu/bus/nes/ave.c +++ b/src/emu/bus/nes/ave.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/ave.h b/src/emu/bus/nes/ave.h index 8263002f2cc..9d35c3eb623 100644 --- a/src/emu/bus/nes/ave.h +++ b/src/emu/bus/nes/ave.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_AVE_H #define __NES_AVE_H diff --git a/src/emu/bus/nes/bandai.c b/src/emu/bus/nes/bandai.c index 66cf6021f23..4aa54055969 100644 --- a/src/emu/bus/nes/bandai.c +++ b/src/emu/bus/nes/bandai.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/bandai.h b/src/emu/bus/nes/bandai.h index 76279d91ef3..ae19589be37 100644 --- a/src/emu/bus/nes/bandai.h +++ b/src/emu/bus/nes/bandai.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_BANDAI_H #define __NES_BANDAI_H diff --git a/src/emu/bus/nes/benshieng.c b/src/emu/bus/nes/benshieng.c index 97ff5e78bf2..b96c75e6297 100644 --- a/src/emu/bus/nes/benshieng.c +++ b/src/emu/bus/nes/benshieng.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/benshieng.h b/src/emu/bus/nes/benshieng.h index 04403c55361..2a042a432e4 100644 --- a/src/emu/bus/nes/benshieng.h +++ b/src/emu/bus/nes/benshieng.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_BENSHIENG_H #define __NES_BENSHIENG_H diff --git a/src/emu/bus/nes/bootleg.c b/src/emu/bus/nes/bootleg.c index dcc6bcf6ee9..23b13b51711 100644 --- a/src/emu/bus/nes/bootleg.c +++ b/src/emu/bus/nes/bootleg.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/bootleg.h b/src/emu/bus/nes/bootleg.h index b4612ecb5a3..d261ba23c31 100644 --- a/src/emu/bus/nes/bootleg.h +++ b/src/emu/bus/nes/bootleg.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_BTL_H #define __NES_BTL_H diff --git a/src/emu/bus/nes/camerica.c b/src/emu/bus/nes/camerica.c index 3b4f74a735b..61c41dd7867 100644 --- a/src/emu/bus/nes/camerica.c +++ b/src/emu/bus/nes/camerica.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/camerica.h b/src/emu/bus/nes/camerica.h index f89bcf0637a..7c91bda1f91 100644 --- a/src/emu/bus/nes/camerica.h +++ b/src/emu/bus/nes/camerica.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_CAMERICA_H #define __NES_CAMERICA_H diff --git a/src/emu/bus/nes/cne.c b/src/emu/bus/nes/cne.c index ff9806e326e..76dc0a999f2 100644 --- a/src/emu/bus/nes/cne.c +++ b/src/emu/bus/nes/cne.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/cne.h b/src/emu/bus/nes/cne.h index 23e18f16a78..d00ef06f5cc 100644 --- a/src/emu/bus/nes/cne.h +++ b/src/emu/bus/nes/cne.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_CNE_H #define __NES_CNE_H diff --git a/src/emu/bus/nes/cony.c b/src/emu/bus/nes/cony.c index e502219dfed..a64063ebc8a 100644 --- a/src/emu/bus/nes/cony.c +++ b/src/emu/bus/nes/cony.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/cony.h b/src/emu/bus/nes/cony.h index 4c85a267425..e97cfdee81d 100644 --- a/src/emu/bus/nes/cony.h +++ b/src/emu/bus/nes/cony.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_CONY_H #define __NES_CONY_H diff --git a/src/emu/bus/nes/datach.c b/src/emu/bus/nes/datach.c index 28303923a1c..1bf562976ed 100644 --- a/src/emu/bus/nes/datach.c +++ b/src/emu/bus/nes/datach.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/datach.h b/src/emu/bus/nes/datach.h index 2ebb1a9116d..b804c079a6f 100644 --- a/src/emu/bus/nes/datach.h +++ b/src/emu/bus/nes/datach.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_DATACH_H #define __NES_DATACH_H diff --git a/src/emu/bus/nes/discrete.c b/src/emu/bus/nes/discrete.c index cd8d2240476..e0109a84d94 100644 --- a/src/emu/bus/nes/discrete.c +++ b/src/emu/bus/nes/discrete.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/discrete.h b/src/emu/bus/nes/discrete.h index 7e9943c6aa7..1fb615c38f2 100644 --- a/src/emu/bus/nes/discrete.h +++ b/src/emu/bus/nes/discrete.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_DISCRETE_H #define __NES_DISCRETE_H diff --git a/src/emu/bus/nes/disksys.c b/src/emu/bus/nes/disksys.c index f8676611d36..45cb275e9de 100644 --- a/src/emu/bus/nes/disksys.c +++ b/src/emu/bus/nes/disksys.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/disksys.h b/src/emu/bus/nes/disksys.h index f8d3308aca8..dcb2bd75c0c 100644 --- a/src/emu/bus/nes/disksys.h +++ b/src/emu/bus/nes/disksys.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_DISKSYS_H #define __NES_DISKSYS_H diff --git a/src/emu/bus/nes/event.c b/src/emu/bus/nes/event.c index e5a0efb7e32..4059b107a24 100644 --- a/src/emu/bus/nes/event.c +++ b/src/emu/bus/nes/event.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/event.h b/src/emu/bus/nes/event.h index cd3daff2968..31076cec074 100644 --- a/src/emu/bus/nes/event.h +++ b/src/emu/bus/nes/event.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_EVENT_H #define __NES_EVENT_H diff --git a/src/emu/bus/nes/ggenie.c b/src/emu/bus/nes/ggenie.c index 49a79eebc7f..f9320a5fbee 100644 --- a/src/emu/bus/nes/ggenie.c +++ b/src/emu/bus/nes/ggenie.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/ggenie.h b/src/emu/bus/nes/ggenie.h index 47e635d6087..e4620e59e09 100644 --- a/src/emu/bus/nes/ggenie.h +++ b/src/emu/bus/nes/ggenie.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_GGENIE_H #define __NES_GGENIE_H diff --git a/src/emu/bus/nes/henggedianzi.c b/src/emu/bus/nes/henggedianzi.c index 94e8e792906..5cda60e6938 100644 --- a/src/emu/bus/nes/henggedianzi.c +++ b/src/emu/bus/nes/henggedianzi.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/henggedianzi.h b/src/emu/bus/nes/henggedianzi.h index e492760bd2d..a229ddbda4a 100644 --- a/src/emu/bus/nes/henggedianzi.h +++ b/src/emu/bus/nes/henggedianzi.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_HENGGEDIANZI_H #define __NES_HENGGEDIANZI_H diff --git a/src/emu/bus/nes/hes.c b/src/emu/bus/nes/hes.c index b8e11fe329f..ddfda0590d8 100644 --- a/src/emu/bus/nes/hes.c +++ b/src/emu/bus/nes/hes.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/hes.h b/src/emu/bus/nes/hes.h index fed261faf02..6a895a8ec1e 100644 --- a/src/emu/bus/nes/hes.h +++ b/src/emu/bus/nes/hes.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_HES_H #define __NES_HES_H diff --git a/src/emu/bus/nes/hosenkan.c b/src/emu/bus/nes/hosenkan.c index 37b67bb5d44..fae439ac903 100644 --- a/src/emu/bus/nes/hosenkan.c +++ b/src/emu/bus/nes/hosenkan.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/hosenkan.h b/src/emu/bus/nes/hosenkan.h index 3371562cf51..f775a513adb 100644 --- a/src/emu/bus/nes/hosenkan.h +++ b/src/emu/bus/nes/hosenkan.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_HOSENKAN_H #define __NES_HOSENKAN_H diff --git a/src/emu/bus/nes/irem.c b/src/emu/bus/nes/irem.c index e9431ef5b11..43f5bab1d7d 100644 --- a/src/emu/bus/nes/irem.c +++ b/src/emu/bus/nes/irem.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/irem.h b/src/emu/bus/nes/irem.h index 968bb450ef7..5c7924b4e7d 100644 --- a/src/emu/bus/nes/irem.h +++ b/src/emu/bus/nes/irem.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_IREM_H #define __NES_IREM_H diff --git a/src/emu/bus/nes/jaleco.c b/src/emu/bus/nes/jaleco.c index 38a7f82cdf2..28df5250118 100644 --- a/src/emu/bus/nes/jaleco.c +++ b/src/emu/bus/nes/jaleco.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/jaleco.h b/src/emu/bus/nes/jaleco.h index 70bbb9769c3..facea12b75f 100644 --- a/src/emu/bus/nes/jaleco.h +++ b/src/emu/bus/nes/jaleco.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_JALECO_H #define __NES_JALECO_H diff --git a/src/emu/bus/nes/jy.c b/src/emu/bus/nes/jy.c index 8e4f3a8bacc..31358e2ab16 100644 --- a/src/emu/bus/nes/jy.c +++ b/src/emu/bus/nes/jy.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/jy.h b/src/emu/bus/nes/jy.h index bb2311db4e4..f2441654d57 100644 --- a/src/emu/bus/nes/jy.h +++ b/src/emu/bus/nes/jy.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_JY_H #define __NES_JY_H diff --git a/src/emu/bus/nes/kaiser.c b/src/emu/bus/nes/kaiser.c index 354bfda23b5..1c7d7bced0a 100644 --- a/src/emu/bus/nes/kaiser.c +++ b/src/emu/bus/nes/kaiser.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/kaiser.h b/src/emu/bus/nes/kaiser.h index 2566f051faa..b00f410ba05 100644 --- a/src/emu/bus/nes/kaiser.h +++ b/src/emu/bus/nes/kaiser.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_KAISER_H #define __NES_KAISER_H diff --git a/src/emu/bus/nes/karastudio.c b/src/emu/bus/nes/karastudio.c index c3ca4a2a1be..002bdf6eea3 100644 --- a/src/emu/bus/nes/karastudio.c +++ b/src/emu/bus/nes/karastudio.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/karastudio.h b/src/emu/bus/nes/karastudio.h index f471a50ad4b..b0b671e0034 100644 --- a/src/emu/bus/nes/karastudio.h +++ b/src/emu/bus/nes/karastudio.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_KARASTUDIO_H #define __NES_KARASTUDIO_H diff --git a/src/emu/bus/nes/konami.c b/src/emu/bus/nes/konami.c index 3e21ee5d23b..4cd4f1fd872 100644 --- a/src/emu/bus/nes/konami.c +++ b/src/emu/bus/nes/konami.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/konami.h b/src/emu/bus/nes/konami.h index 3deb081e80a..0ecece270fd 100644 --- a/src/emu/bus/nes/konami.h +++ b/src/emu/bus/nes/konami.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_KONAMI_H #define __NES_KONAMI_H diff --git a/src/emu/bus/nes/legacy.c b/src/emu/bus/nes/legacy.c index 58e9bf500a7..3a452fd2f39 100644 --- a/src/emu/bus/nes/legacy.c +++ b/src/emu/bus/nes/legacy.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/legacy.h b/src/emu/bus/nes/legacy.h index 0e85c2a7b3e..4b4667ab61b 100644 --- a/src/emu/bus/nes/legacy.h +++ b/src/emu/bus/nes/legacy.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_LEGACY_H #define __NES_LEGACY_H diff --git a/src/emu/bus/nes/mmc1.c b/src/emu/bus/nes/mmc1.c index a7aa970038a..ff31250ee19 100644 --- a/src/emu/bus/nes/mmc1.c +++ b/src/emu/bus/nes/mmc1.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/mmc1.h b/src/emu/bus/nes/mmc1.h index 70964c98e45..05e25c46818 100644 --- a/src/emu/bus/nes/mmc1.h +++ b/src/emu/bus/nes/mmc1.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MMC1_H #define __NES_MMC1_H diff --git a/src/emu/bus/nes/mmc2.c b/src/emu/bus/nes/mmc2.c index efa1f68d027..b9ef5402a00 100644 --- a/src/emu/bus/nes/mmc2.c +++ b/src/emu/bus/nes/mmc2.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/mmc2.h b/src/emu/bus/nes/mmc2.h index dd5ac6cb90a..205fcf7a1d4 100644 --- a/src/emu/bus/nes/mmc2.h +++ b/src/emu/bus/nes/mmc2.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MMC2_H #define __NES_MMC2_H diff --git a/src/emu/bus/nes/mmc3.c b/src/emu/bus/nes/mmc3.c index f66aff90c89..8e81fac286f 100644 --- a/src/emu/bus/nes/mmc3.c +++ b/src/emu/bus/nes/mmc3.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/mmc3.h b/src/emu/bus/nes/mmc3.h index eb9ac4bfab6..ace03588bb4 100644 --- a/src/emu/bus/nes/mmc3.h +++ b/src/emu/bus/nes/mmc3.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MMC3_H #define __NES_MMC3_H diff --git a/src/emu/bus/nes/mmc3_clones.c b/src/emu/bus/nes/mmc3_clones.c index 4b645316b6a..4a806d0fde2 100644 --- a/src/emu/bus/nes/mmc3_clones.c +++ b/src/emu/bus/nes/mmc3_clones.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/mmc3_clones.h b/src/emu/bus/nes/mmc3_clones.h index dd8b5fda9b6..9445395889d 100644 --- a/src/emu/bus/nes/mmc3_clones.h +++ b/src/emu/bus/nes/mmc3_clones.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MMC3_CLONES_H #define __NES_MMC3_CLONES_H diff --git a/src/emu/bus/nes/mmc5.c b/src/emu/bus/nes/mmc5.c index 32c0e533318..26149c48e50 100644 --- a/src/emu/bus/nes/mmc5.c +++ b/src/emu/bus/nes/mmc5.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/mmc5.h b/src/emu/bus/nes/mmc5.h index 60e74539adc..46fe19af7a8 100644 --- a/src/emu/bus/nes/mmc5.h +++ b/src/emu/bus/nes/mmc5.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MMC5_H #define __NES_MMC5_H diff --git a/src/emu/bus/nes/multigame.c b/src/emu/bus/nes/multigame.c index 75b4447c3cf..ba65c3d0e7c 100644 --- a/src/emu/bus/nes/multigame.c +++ b/src/emu/bus/nes/multigame.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/multigame.h b/src/emu/bus/nes/multigame.h index fa3f47d647d..dbc824dfd54 100644 --- a/src/emu/bus/nes/multigame.h +++ b/src/emu/bus/nes/multigame.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MULTIGAME_H #define __NES_MULTIGAME_H diff --git a/src/emu/bus/nes/namcot.c b/src/emu/bus/nes/namcot.c index 847a17972ad..236effc4a24 100644 --- a/src/emu/bus/nes/namcot.c +++ b/src/emu/bus/nes/namcot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/namcot.h b/src/emu/bus/nes/namcot.h index 835beddab1d..268347068b9 100644 --- a/src/emu/bus/nes/namcot.h +++ b/src/emu/bus/nes/namcot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_NAMCOT_H #define __NES_NAMCOT_H diff --git a/src/emu/bus/nes/nanjing.c b/src/emu/bus/nes/nanjing.c index 6effc6c7550..4d0fc022520 100644 --- a/src/emu/bus/nes/nanjing.c +++ b/src/emu/bus/nes/nanjing.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/nanjing.h b/src/emu/bus/nes/nanjing.h index 93c9f287918..40fb8c2e714 100644 --- a/src/emu/bus/nes/nanjing.h +++ b/src/emu/bus/nes/nanjing.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_NANJING_H #define __NES_NANJING_H diff --git a/src/emu/bus/nes/nes_carts.c b/src/emu/bus/nes/nes_carts.c index 9ba6e3a7fc5..6acac2fc6e7 100644 --- a/src/emu/bus/nes/nes_carts.c +++ b/src/emu/bus/nes/nes_carts.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** NES carts diff --git a/src/emu/bus/nes/nes_carts.h b/src/emu/bus/nes/nes_carts.h index 6f66f15a31b..144d7aa0a8e 100644 --- a/src/emu/bus/nes/nes_carts.h +++ b/src/emu/bus/nes/nes_carts.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** NES carts diff --git a/src/emu/bus/nes/nes_ines.inc b/src/emu/bus/nes/nes_ines.inc index fe1da89a1d3..ceb9581b82f 100644 --- a/src/emu/bus/nes/nes_ines.inc +++ b/src/emu/bus/nes/nes_ines.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /***************************************************************************************** NES MMC Emulation diff --git a/src/emu/bus/nes/nes_pcb.inc b/src/emu/bus/nes/nes_pcb.inc index 710a18c4d3f..57cdf3d498c 100644 --- a/src/emu/bus/nes/nes_pcb.inc +++ b/src/emu/bus/nes/nes_pcb.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /***************************************************************************************** NES Cart PCBs Emulation diff --git a/src/emu/bus/nes/nes_slot.c b/src/emu/bus/nes/nes_slot.c index 1638d2e2af5..ec1b1f5f4af 100644 --- a/src/emu/bus/nes/nes_slot.c +++ b/src/emu/bus/nes/nes_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/nes_slot.h b/src/emu/bus/nes/nes_slot.h index 8c0ff719b06..f959465af33 100644 --- a/src/emu/bus/nes/nes_slot.h +++ b/src/emu/bus/nes/nes_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_SLOT_H__ #define __NES_SLOT_H__ diff --git a/src/emu/bus/nes/nes_unif.inc b/src/emu/bus/nes/nes_unif.inc index 431c7a91d31..b501c590159 100644 --- a/src/emu/bus/nes/nes_unif.inc +++ b/src/emu/bus/nes/nes_unif.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /***************************************************************************************** NES MMC Emulation - UNIF boards diff --git a/src/emu/bus/nes/ntdec.c b/src/emu/bus/nes/ntdec.c index 7847bf0f6f6..4dd7e56a842 100644 --- a/src/emu/bus/nes/ntdec.c +++ b/src/emu/bus/nes/ntdec.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/ntdec.h b/src/emu/bus/nes/ntdec.h index 28e0de1f481..00712eecf1c 100644 --- a/src/emu/bus/nes/ntdec.h +++ b/src/emu/bus/nes/ntdec.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_NTDEC_H #define __NES_NTDEC_H diff --git a/src/emu/bus/nes/nxrom.c b/src/emu/bus/nes/nxrom.c index 41cb6d30066..431d384e7f1 100644 --- a/src/emu/bus/nes/nxrom.c +++ b/src/emu/bus/nes/nxrom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/nxrom.h b/src/emu/bus/nes/nxrom.h index 809ad68c0d2..fe105be0189 100644 --- a/src/emu/bus/nes/nxrom.h +++ b/src/emu/bus/nes/nxrom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_MMCX_H #define __NES_MMCX_H diff --git a/src/emu/bus/nes/pirate.c b/src/emu/bus/nes/pirate.c index efe66b38c45..557831ed144 100644 --- a/src/emu/bus/nes/pirate.c +++ b/src/emu/bus/nes/pirate.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/pirate.h b/src/emu/bus/nes/pirate.h index 059396d2ec0..f11c53ced0d 100644 --- a/src/emu/bus/nes/pirate.h +++ b/src/emu/bus/nes/pirate.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_PIR_H #define __NES_PIR_H diff --git a/src/emu/bus/nes/pt554.c b/src/emu/bus/nes/pt554.c index da526f9e188..4f6e843d8d1 100644 --- a/src/emu/bus/nes/pt554.c +++ b/src/emu/bus/nes/pt554.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/pt554.h b/src/emu/bus/nes/pt554.h index 6c181a4af72..0d0bd7b60f4 100644 --- a/src/emu/bus/nes/pt554.h +++ b/src/emu/bus/nes/pt554.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_PT554_H #define __NES_PT554_H diff --git a/src/emu/bus/nes/racermate.c b/src/emu/bus/nes/racermate.c index da2071ccac8..6989c2254cb 100644 --- a/src/emu/bus/nes/racermate.c +++ b/src/emu/bus/nes/racermate.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/racermate.h b/src/emu/bus/nes/racermate.h index 3846bc56e97..209c2f56601 100644 --- a/src/emu/bus/nes/racermate.h +++ b/src/emu/bus/nes/racermate.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_RACERMATE_H #define __NES_RACERMATE_H diff --git a/src/emu/bus/nes/rcm.c b/src/emu/bus/nes/rcm.c index 351cb2240d8..28ec6e8277e 100644 --- a/src/emu/bus/nes/rcm.c +++ b/src/emu/bus/nes/rcm.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/rcm.h b/src/emu/bus/nes/rcm.h index 9c03396ce6d..4a5c05b6aa9 100644 --- a/src/emu/bus/nes/rcm.h +++ b/src/emu/bus/nes/rcm.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_RCM_H #define __NES_RCM_H diff --git a/src/emu/bus/nes/rexsoft.c b/src/emu/bus/nes/rexsoft.c index 3f1e81b87e9..c0e261dc5fa 100644 --- a/src/emu/bus/nes/rexsoft.c +++ b/src/emu/bus/nes/rexsoft.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/rexsoft.h b/src/emu/bus/nes/rexsoft.h index 25a08d1c836..81527759574 100644 --- a/src/emu/bus/nes/rexsoft.h +++ b/src/emu/bus/nes/rexsoft.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_REXSOFT_H #define __NES_REXSOFT_H diff --git a/src/emu/bus/nes/sachen.c b/src/emu/bus/nes/sachen.c index f04bc36522e..87edbc6a700 100644 --- a/src/emu/bus/nes/sachen.c +++ b/src/emu/bus/nes/sachen.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/sachen.h b/src/emu/bus/nes/sachen.h index 57e522d32ed..d6604578d3a 100644 --- a/src/emu/bus/nes/sachen.h +++ b/src/emu/bus/nes/sachen.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_SACHEN_H #define __NES_SACHEN_H diff --git a/src/emu/bus/nes/somari.c b/src/emu/bus/nes/somari.c index bd20e519b74..634aad58b68 100644 --- a/src/emu/bus/nes/somari.c +++ b/src/emu/bus/nes/somari.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/somari.h b/src/emu/bus/nes/somari.h index 4b66ab71e43..726df0a4926 100644 --- a/src/emu/bus/nes/somari.h +++ b/src/emu/bus/nes/somari.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_SOMARI_H #define __NES_SOMARI_H diff --git a/src/emu/bus/nes/sunsoft.c b/src/emu/bus/nes/sunsoft.c index 46f3152af3c..48d95c05727 100644 --- a/src/emu/bus/nes/sunsoft.c +++ b/src/emu/bus/nes/sunsoft.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/sunsoft.h b/src/emu/bus/nes/sunsoft.h index b02589fbd48..53ea24adeae 100644 --- a/src/emu/bus/nes/sunsoft.h +++ b/src/emu/bus/nes/sunsoft.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_SUNSOFT_H #define __NES_SUNSOFT_H diff --git a/src/emu/bus/nes/sunsoft_dcs.c b/src/emu/bus/nes/sunsoft_dcs.c index 03206198f77..c7de9fd3040 100644 --- a/src/emu/bus/nes/sunsoft_dcs.c +++ b/src/emu/bus/nes/sunsoft_dcs.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/sunsoft_dcs.h b/src/emu/bus/nes/sunsoft_dcs.h index 898e01dc701..67fcaf83b1e 100644 --- a/src/emu/bus/nes/sunsoft_dcs.h +++ b/src/emu/bus/nes/sunsoft_dcs.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_SUNSOFT_DCS_H #define __NES_SUNSOFT_DCS_H diff --git a/src/emu/bus/nes/taito.c b/src/emu/bus/nes/taito.c index 0274b4eeefc..2338d91ee25 100644 --- a/src/emu/bus/nes/taito.c +++ b/src/emu/bus/nes/taito.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/taito.h b/src/emu/bus/nes/taito.h index 64ec351ddc9..9f2b57ca512 100644 --- a/src/emu/bus/nes/taito.h +++ b/src/emu/bus/nes/taito.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_TAITO_H #define __NES_TAITO_H diff --git a/src/emu/bus/nes/tengen.c b/src/emu/bus/nes/tengen.c index 9f7192bd922..555b0da3f35 100644 --- a/src/emu/bus/nes/tengen.c +++ b/src/emu/bus/nes/tengen.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/tengen.h b/src/emu/bus/nes/tengen.h index 858d663c2cd..8732e6e1321 100644 --- a/src/emu/bus/nes/tengen.h +++ b/src/emu/bus/nes/tengen.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_TENGEN_H #define __NES_TENGEN_H diff --git a/src/emu/bus/nes/txc.c b/src/emu/bus/nes/txc.c index a99bb0aaf53..ae36ece75ee 100644 --- a/src/emu/bus/nes/txc.c +++ b/src/emu/bus/nes/txc.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/txc.h b/src/emu/bus/nes/txc.h index a93f0163e4f..e71e6fde249 100644 --- a/src/emu/bus/nes/txc.h +++ b/src/emu/bus/nes/txc.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_TXC_H #define __NES_TXC_H diff --git a/src/emu/bus/nes/waixing.c b/src/emu/bus/nes/waixing.c index 59886ff2706..8a223a8e295 100644 --- a/src/emu/bus/nes/waixing.c +++ b/src/emu/bus/nes/waixing.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/nes/waixing.h b/src/emu/bus/nes/waixing.h index 1a611b4bf6e..42220c5523d 100644 --- a/src/emu/bus/nes/waixing.h +++ b/src/emu/bus/nes/waixing.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __NES_WAIXING_H #define __NES_WAIXING_H diff --git a/src/emu/bus/nes_ctrl/4score.c b/src/emu/bus/nes_ctrl/4score.c index 2a679722518..867af2669b1 100644 --- a/src/emu/bus/nes_ctrl/4score.c +++ b/src/emu/bus/nes_ctrl/4score.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Entertainment System Four Score Adapter diff --git a/src/emu/bus/nes_ctrl/4score.h b/src/emu/bus/nes_ctrl/4score.h index b65f3991a3f..f4f17174957 100644 --- a/src/emu/bus/nes_ctrl/4score.h +++ b/src/emu/bus/nes_ctrl/4score.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Entertainment System Four Score Adapter diff --git a/src/emu/bus/nes_ctrl/arkpaddle.c b/src/emu/bus/nes_ctrl/arkpaddle.c index e21b8a49b75..897c35da000 100644 --- a/src/emu/bus/nes_ctrl/arkpaddle.c +++ b/src/emu/bus/nes_ctrl/arkpaddle.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System - diff --git a/src/emu/bus/nes_ctrl/arkpaddle.h b/src/emu/bus/nes_ctrl/arkpaddle.h index b8597a48fb6..84fe327b7d4 100644 --- a/src/emu/bus/nes_ctrl/arkpaddle.h +++ b/src/emu/bus/nes_ctrl/arkpaddle.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System - diff --git a/src/emu/bus/nes_ctrl/bcbattle.c b/src/emu/bus/nes_ctrl/bcbattle.c index a262e82f2bc..96b0a5bda86 100644 --- a/src/emu/bus/nes_ctrl/bcbattle.c +++ b/src/emu/bus/nes_ctrl/bcbattle.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer - Epoch Barcode Battler diff --git a/src/emu/bus/nes_ctrl/bcbattle.h b/src/emu/bus/nes_ctrl/bcbattle.h index dcb49833b23..c68d0bc669b 100644 --- a/src/emu/bus/nes_ctrl/bcbattle.h +++ b/src/emu/bus/nes_ctrl/bcbattle.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer - Epoch Barcode Battler diff --git a/src/emu/bus/nes_ctrl/ctrl.c b/src/emu/bus/nes_ctrl/ctrl.c index 1ac1aa2048d..d128b1cfb5e 100644 --- a/src/emu/bus/nes_ctrl/ctrl.c +++ b/src/emu/bus/nes_ctrl/ctrl.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System controller ports diff --git a/src/emu/bus/nes_ctrl/ctrl.h b/src/emu/bus/nes_ctrl/ctrl.h index 13982cea13b..1c682c0491b 100644 --- a/src/emu/bus/nes_ctrl/ctrl.h +++ b/src/emu/bus/nes_ctrl/ctrl.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System controller port diff --git a/src/emu/bus/nes_ctrl/fckeybrd.c b/src/emu/bus/nes_ctrl/fckeybrd.c index 105b49a4bfe..946fb072e53 100644 --- a/src/emu/bus/nes_ctrl/fckeybrd.c +++ b/src/emu/bus/nes_ctrl/fckeybrd.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Keyboard Component diff --git a/src/emu/bus/nes_ctrl/fckeybrd.h b/src/emu/bus/nes_ctrl/fckeybrd.h index 451e1bd6d77..594c3bcae8e 100644 --- a/src/emu/bus/nes_ctrl/fckeybrd.h +++ b/src/emu/bus/nes_ctrl/fckeybrd.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Keyboard Component diff --git a/src/emu/bus/nes_ctrl/ftrainer.c b/src/emu/bus/nes_ctrl/ftrainer.c index 540aba063de..491cc59539e 100644 --- a/src/emu/bus/nes_ctrl/ftrainer.c +++ b/src/emu/bus/nes_ctrl/ftrainer.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer - Bandai Family Trainer Mat diff --git a/src/emu/bus/nes_ctrl/ftrainer.h b/src/emu/bus/nes_ctrl/ftrainer.h index 9fa94aa541c..bc546295c8f 100644 --- a/src/emu/bus/nes_ctrl/ftrainer.h +++ b/src/emu/bus/nes_ctrl/ftrainer.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer - Bandai Family Trainer Mat diff --git a/src/emu/bus/nes_ctrl/hori.c b/src/emu/bus/nes_ctrl/hori.c index 5348ec70b02..cecf1f05dbc 100644 --- a/src/emu/bus/nes_ctrl/hori.c +++ b/src/emu/bus/nes_ctrl/hori.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Hori Twin (and 4P?) adapters diff --git a/src/emu/bus/nes_ctrl/hori.h b/src/emu/bus/nes_ctrl/hori.h index c383266f1a3..8df4fd892ee 100644 --- a/src/emu/bus/nes_ctrl/hori.h +++ b/src/emu/bus/nes_ctrl/hori.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Hori Twin (and 4P?) adapters diff --git a/src/emu/bus/nes_ctrl/joypad.c b/src/emu/bus/nes_ctrl/joypad.c index c6642c8f8e5..efe17fb8a62 100644 --- a/src/emu/bus/nes_ctrl/joypad.c +++ b/src/emu/bus/nes_ctrl/joypad.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System Joypads diff --git a/src/emu/bus/nes_ctrl/joypad.h b/src/emu/bus/nes_ctrl/joypad.h index 258488e47f5..87966386e8d 100644 --- a/src/emu/bus/nes_ctrl/joypad.h +++ b/src/emu/bus/nes_ctrl/joypad.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System Joypads diff --git a/src/emu/bus/nes_ctrl/konamihs.c b/src/emu/bus/nes_ctrl/konamihs.c index befb7d20c3e..33be8576788 100644 --- a/src/emu/bus/nes_ctrl/konamihs.c +++ b/src/emu/bus/nes_ctrl/konamihs.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Konami Hyper Shot Controllers diff --git a/src/emu/bus/nes_ctrl/konamihs.h b/src/emu/bus/nes_ctrl/konamihs.h index 6bf67aa1849..d2ec5b92b2a 100644 --- a/src/emu/bus/nes_ctrl/konamihs.h +++ b/src/emu/bus/nes_ctrl/konamihs.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Konami Hyper Shot Controllers diff --git a/src/emu/bus/nes_ctrl/miracle.c b/src/emu/bus/nes_ctrl/miracle.c index 1b497e5c58a..bcfc6fbadac 100644 --- a/src/emu/bus/nes_ctrl/miracle.c +++ b/src/emu/bus/nes_ctrl/miracle.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Entertainment System - Miracle Piano Keyboard diff --git a/src/emu/bus/nes_ctrl/miracle.h b/src/emu/bus/nes_ctrl/miracle.h index 6e090d50ea1..ee68cf7f357 100644 --- a/src/emu/bus/nes_ctrl/miracle.h +++ b/src/emu/bus/nes_ctrl/miracle.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Entertainment System - Miracle Piano Keyboard diff --git a/src/emu/bus/nes_ctrl/mjpanel.c b/src/emu/bus/nes_ctrl/mjpanel.c index 88c57e7656b..cb37aeb1c2a 100644 --- a/src/emu/bus/nes_ctrl/mjpanel.c +++ b/src/emu/bus/nes_ctrl/mjpanel.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Mahjong Panel diff --git a/src/emu/bus/nes_ctrl/mjpanel.h b/src/emu/bus/nes_ctrl/mjpanel.h index 2383358af2f..e48ee792a80 100644 --- a/src/emu/bus/nes_ctrl/mjpanel.h +++ b/src/emu/bus/nes_ctrl/mjpanel.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Mahjong Panel diff --git a/src/emu/bus/nes_ctrl/pachinko.c b/src/emu/bus/nes_ctrl/pachinko.c index 7d94a8ee65b..8c61cf00c14 100644 --- a/src/emu/bus/nes_ctrl/pachinko.c +++ b/src/emu/bus/nes_ctrl/pachinko.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Pachinko Controller diff --git a/src/emu/bus/nes_ctrl/pachinko.h b/src/emu/bus/nes_ctrl/pachinko.h index 91ab5771cb4..8d01ce6983d 100644 --- a/src/emu/bus/nes_ctrl/pachinko.h +++ b/src/emu/bus/nes_ctrl/pachinko.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Pachinko Controller diff --git a/src/emu/bus/nes_ctrl/partytap.c b/src/emu/bus/nes_ctrl/partytap.c index aaeccfa27a8..3338a443423 100644 --- a/src/emu/bus/nes_ctrl/partytap.c +++ b/src/emu/bus/nes_ctrl/partytap.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Yonezawa / PartyRoom 21 Party Tap Controller diff --git a/src/emu/bus/nes_ctrl/partytap.h b/src/emu/bus/nes_ctrl/partytap.h index e7437d997c2..3fc29c19445 100644 --- a/src/emu/bus/nes_ctrl/partytap.h +++ b/src/emu/bus/nes_ctrl/partytap.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Yonezawa / PartyRoom 21 Party Tap Controller diff --git a/src/emu/bus/nes_ctrl/powerpad.c b/src/emu/bus/nes_ctrl/powerpad.c index 3818d6916a5..569695d97ca 100644 --- a/src/emu/bus/nes_ctrl/powerpad.c +++ b/src/emu/bus/nes_ctrl/powerpad.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Entertainment System - Bandai Power Pad diff --git a/src/emu/bus/nes_ctrl/powerpad.h b/src/emu/bus/nes_ctrl/powerpad.h index 8a1aff28c0d..47463a9055c 100644 --- a/src/emu/bus/nes_ctrl/powerpad.h +++ b/src/emu/bus/nes_ctrl/powerpad.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Entertainment System - Bandai Power Pad diff --git a/src/emu/bus/nes_ctrl/suborkey.c b/src/emu/bus/nes_ctrl/suborkey.c index dac90bf83bc..8c6e6be7b3c 100644 --- a/src/emu/bus/nes_ctrl/suborkey.c +++ b/src/emu/bus/nes_ctrl/suborkey.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Subor Keyboard (used by some Famiclones) diff --git a/src/emu/bus/nes_ctrl/suborkey.h b/src/emu/bus/nes_ctrl/suborkey.h index 4ee111efb87..21f804da6f0 100644 --- a/src/emu/bus/nes_ctrl/suborkey.h +++ b/src/emu/bus/nes_ctrl/suborkey.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer Subor Keyboard (used by some Famiclones) diff --git a/src/emu/bus/nes_ctrl/zapper.c b/src/emu/bus/nes_ctrl/zapper.c index 4684995ea69..422b9664f5e 100644 --- a/src/emu/bus/nes_ctrl/zapper.c +++ b/src/emu/bus/nes_ctrl/zapper.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System Zapper Lightgun diff --git a/src/emu/bus/nes_ctrl/zapper.h b/src/emu/bus/nes_ctrl/zapper.h index d1809ada78f..ca4b1eb40fd 100644 --- a/src/emu/bus/nes_ctrl/zapper.h +++ b/src/emu/bus/nes_ctrl/zapper.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Family Computer & Entertainment System Zapper Lightgun diff --git a/src/emu/bus/odyssey2/chess.c b/src/emu/bus/odyssey2/chess.c index 3cddee48906..8885733923c 100644 --- a/src/emu/bus/odyssey2/chess.c +++ b/src/emu/bus/odyssey2/chess.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/odyssey2/chess.h b/src/emu/bus/odyssey2/chess.h index 66015c033cb..8604c317924 100644 --- a/src/emu/bus/odyssey2/chess.h +++ b/src/emu/bus/odyssey2/chess.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __O2_CHESS_H #define __O2_CHESS_H diff --git a/src/emu/bus/odyssey2/rom.c b/src/emu/bus/odyssey2/rom.c index d741dcdd802..2e364e59b9c 100644 --- a/src/emu/bus/odyssey2/rom.c +++ b/src/emu/bus/odyssey2/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/odyssey2/rom.h b/src/emu/bus/odyssey2/rom.h index 7a4af0a32b5..18bfa63c4b4 100644 --- a/src/emu/bus/odyssey2/rom.h +++ b/src/emu/bus/odyssey2/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __O2_ROM_H #define __O2_ROM_H diff --git a/src/emu/bus/odyssey2/slot.c b/src/emu/bus/odyssey2/slot.c index 83194391232..72262afe7ac 100644 --- a/src/emu/bus/odyssey2/slot.c +++ b/src/emu/bus/odyssey2/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Magnavox Odyssey 2 cart emulation diff --git a/src/emu/bus/odyssey2/slot.h b/src/emu/bus/odyssey2/slot.h index 1e79b648041..a5cebb9ed0d 100644 --- a/src/emu/bus/odyssey2/slot.h +++ b/src/emu/bus/odyssey2/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __O2_SLOT_H #define __O2_SLOT_H diff --git a/src/emu/bus/odyssey2/voice.c b/src/emu/bus/odyssey2/voice.c index c3f5fce565e..e94b3bd1432 100644 --- a/src/emu/bus/odyssey2/voice.c +++ b/src/emu/bus/odyssey2/voice.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/odyssey2/voice.h b/src/emu/bus/odyssey2/voice.h index 83b8c532e1f..71fb77b067c 100644 --- a/src/emu/bus/odyssey2/voice.h +++ b/src/emu/bus/odyssey2/voice.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __O2_VOICE_H #define __O2_VOICE_H diff --git a/src/emu/bus/pce/pce_rom.c b/src/emu/bus/pce/pce_rom.c index 9afdac60593..8829e7823d0 100644 --- a/src/emu/bus/pce/pce_rom.c +++ b/src/emu/bus/pce/pce_rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/pce/pce_rom.h b/src/emu/bus/pce/pce_rom.h index 3c4d76da7d4..3f6b9efcd47 100644 --- a/src/emu/bus/pce/pce_rom.h +++ b/src/emu/bus/pce/pce_rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __PCE_ROM_H #define __PCE_ROM_H diff --git a/src/emu/bus/pce/pce_slot.c b/src/emu/bus/pce/pce_slot.c index b9ffd3a08d0..bc124852c0c 100644 --- a/src/emu/bus/pce/pce_slot.c +++ b/src/emu/bus/pce/pce_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/pce/pce_slot.h b/src/emu/bus/pce/pce_slot.h index 87231caabf1..e6968518b49 100644 --- a/src/emu/bus/pce/pce_slot.h +++ b/src/emu/bus/pce/pce_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __PCE_SLOT_H #define __PCE_SLOT_H diff --git a/src/emu/bus/saturn/bram.c b/src/emu/bus/saturn/bram.c index c52368b12b8..28d0aba2945 100644 --- a/src/emu/bus/saturn/bram.c +++ b/src/emu/bus/saturn/bram.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Saturn Battery RAM cart emulation diff --git a/src/emu/bus/saturn/bram.h b/src/emu/bus/saturn/bram.h index 2102e265ca9..c4402431caf 100644 --- a/src/emu/bus/saturn/bram.h +++ b/src/emu/bus/saturn/bram.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SAT_BRAM_H #define __SAT_BRAM_H diff --git a/src/emu/bus/saturn/dram.c b/src/emu/bus/saturn/dram.c index f732bb5d7f5..d1078fcc722 100644 --- a/src/emu/bus/saturn/dram.c +++ b/src/emu/bus/saturn/dram.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Saturn cart emulation diff --git a/src/emu/bus/saturn/dram.h b/src/emu/bus/saturn/dram.h index a63e02b7749..53bf97d8468 100644 --- a/src/emu/bus/saturn/dram.h +++ b/src/emu/bus/saturn/dram.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SAT_DRAM_H #define __SAT_DRAM_H diff --git a/src/emu/bus/saturn/rom.c b/src/emu/bus/saturn/rom.c index b48c2fee253..7b8068735a1 100644 --- a/src/emu/bus/saturn/rom.c +++ b/src/emu/bus/saturn/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Saturn ROM cart emulation diff --git a/src/emu/bus/saturn/rom.h b/src/emu/bus/saturn/rom.h index 8090b3b8b1d..021526bcce4 100644 --- a/src/emu/bus/saturn/rom.h +++ b/src/emu/bus/saturn/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SAT_ROM_H #define __SAT_ROM_H diff --git a/src/emu/bus/saturn/sat_slot.c b/src/emu/bus/saturn/sat_slot.c index 61248d27984..aa3a563f68d 100644 --- a/src/emu/bus/saturn/sat_slot.c +++ b/src/emu/bus/saturn/sat_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/saturn/sat_slot.h b/src/emu/bus/saturn/sat_slot.h index aac3167fffd..13b46c23374 100644 --- a/src/emu/bus/saturn/sat_slot.h +++ b/src/emu/bus/saturn/sat_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SAT_SLOT_H #define __SAT_SLOT_H diff --git a/src/emu/bus/scv/rom.c b/src/emu/bus/scv/rom.c index 3095c1a5214..ce71249d453 100644 --- a/src/emu/bus/scv/rom.c +++ b/src/emu/bus/scv/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/scv/rom.h b/src/emu/bus/scv/rom.h index 6d8ccff4d49..412f72acfef 100644 --- a/src/emu/bus/scv/rom.h +++ b/src/emu/bus/scv/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SCV_ROM_H #define __SCV_ROM_H diff --git a/src/emu/bus/scv/slot.c b/src/emu/bus/scv/slot.c index bd43192f9e4..12ecf7c4db9 100644 --- a/src/emu/bus/scv/slot.c +++ b/src/emu/bus/scv/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Epoch Super Cassette Vision cart emulation diff --git a/src/emu/bus/scv/slot.h b/src/emu/bus/scv/slot.h index 070418d6b8a..dea4af488fb 100644 --- a/src/emu/bus/scv/slot.h +++ b/src/emu/bus/scv/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SCV_SLOT_H #define __SCV_SLOT_H diff --git a/src/emu/bus/sega8/ccatch.c b/src/emu/bus/sega8/ccatch.c index bc0ca097186..ec42d1304b4 100644 --- a/src/emu/bus/sega8/ccatch.c +++ b/src/emu/bus/sega8/ccatch.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** SG-1000 Card Catcher emulation diff --git a/src/emu/bus/sega8/ccatch.h b/src/emu/bus/sega8/ccatch.h index 0a91ad86961..ece120c0a57 100644 --- a/src/emu/bus/sega8/ccatch.h +++ b/src/emu/bus/sega8/ccatch.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SEGA8_CCATCH_H #define __SEGA8_CCATCH_H diff --git a/src/emu/bus/sega8/mgear.c b/src/emu/bus/sega8/mgear.c index da7a084948a..250eb58e13a 100644 --- a/src/emu/bus/sega8/mgear.c +++ b/src/emu/bus/sega8/mgear.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Master Gear Adapter emulation diff --git a/src/emu/bus/sega8/mgear.h b/src/emu/bus/sega8/mgear.h index 0117bdf2cfc..ea8a9bce362 100644 --- a/src/emu/bus/sega8/mgear.h +++ b/src/emu/bus/sega8/mgear.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SEGA8_MGEAR_H #define __SEGA8_MGEAR_H diff --git a/src/emu/bus/sega8/rom.c b/src/emu/bus/sega8/rom.c index ecad30b78db..3770560806d 100644 --- a/src/emu/bus/sega8/rom.c +++ b/src/emu/bus/sega8/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Sega 8-bit cart emulation (for Master System, GameGear and SG-1000) diff --git a/src/emu/bus/sega8/rom.h b/src/emu/bus/sega8/rom.h index fe88f3bc8bc..c04a149fdc9 100644 --- a/src/emu/bus/sega8/rom.h +++ b/src/emu/bus/sega8/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SEGA8_ROM_H #define __SEGA8_ROM_H diff --git a/src/emu/bus/sega8/sega8_slot.c b/src/emu/bus/sega8/sega8_slot.c index 388bb0f3031..997b622aa14 100644 --- a/src/emu/bus/sega8/sega8_slot.c +++ b/src/emu/bus/sega8/sega8_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/sega8/sega8_slot.h b/src/emu/bus/sega8/sega8_slot.h index 27867db8676..095dc6261f6 100644 --- a/src/emu/bus/sega8/sega8_slot.h +++ b/src/emu/bus/sega8/sega8_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SEGA8_SLOT_H #define __SEGA8_SLOT_H diff --git a/src/emu/bus/sms_ctrl/graphic.c b/src/emu/bus/sms_ctrl/graphic.c index 17318140708..31d211e30a8 100644 --- a/src/emu/bus/sms_ctrl/graphic.c +++ b/src/emu/bus/sms_ctrl/graphic.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Graphic Board" emulation diff --git a/src/emu/bus/sms_ctrl/graphic.h b/src/emu/bus/sms_ctrl/graphic.h index 766483e597e..852a6f7a71b 100644 --- a/src/emu/bus/sms_ctrl/graphic.h +++ b/src/emu/bus/sms_ctrl/graphic.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Graphic Board" emulation diff --git a/src/emu/bus/sms_ctrl/joypad.c b/src/emu/bus/sms_ctrl/joypad.c index b2a244f25be..b2537453c6a 100644 --- a/src/emu/bus/sms_ctrl/joypad.c +++ b/src/emu/bus/sms_ctrl/joypad.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Control Pad"/generic joystick emulation diff --git a/src/emu/bus/sms_ctrl/joypad.h b/src/emu/bus/sms_ctrl/joypad.h index adf8af0a9d7..ed7b1141b03 100644 --- a/src/emu/bus/sms_ctrl/joypad.h +++ b/src/emu/bus/sms_ctrl/joypad.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Control Pad"/generic joystick emulation diff --git a/src/emu/bus/sms_ctrl/lphaser.c b/src/emu/bus/sms_ctrl/lphaser.c index 7d3b1a140d6..32998115887 100644 --- a/src/emu/bus/sms_ctrl/lphaser.c +++ b/src/emu/bus/sms_ctrl/lphaser.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Light Phaser" (light gun) emulation diff --git a/src/emu/bus/sms_ctrl/lphaser.h b/src/emu/bus/sms_ctrl/lphaser.h index 1468f83308a..ed0687a9f6e 100644 --- a/src/emu/bus/sms_ctrl/lphaser.h +++ b/src/emu/bus/sms_ctrl/lphaser.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Light Phaser" (light gun) emulation diff --git a/src/emu/bus/sms_ctrl/multitap.c b/src/emu/bus/sms_ctrl/multitap.c index f1e26e1c082..fd098b82c18 100644 --- a/src/emu/bus/sms_ctrl/multitap.c +++ b/src/emu/bus/sms_ctrl/multitap.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Furrtek's homemade multitap emulation diff --git a/src/emu/bus/sms_ctrl/multitap.h b/src/emu/bus/sms_ctrl/multitap.h index bd7af04ce49..9fc8de8b745 100644 --- a/src/emu/bus/sms_ctrl/multitap.h +++ b/src/emu/bus/sms_ctrl/multitap.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Furrtek's homemade multitap emulation diff --git a/src/emu/bus/sms_ctrl/paddle.c b/src/emu/bus/sms_ctrl/paddle.c index f1de28b6ff9..e2418f38345 100644 --- a/src/emu/bus/sms_ctrl/paddle.c +++ b/src/emu/bus/sms_ctrl/paddle.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Paddle Control" emulation diff --git a/src/emu/bus/sms_ctrl/paddle.h b/src/emu/bus/sms_ctrl/paddle.h index 55f0cdb28f6..984b5a87082 100644 --- a/src/emu/bus/sms_ctrl/paddle.h +++ b/src/emu/bus/sms_ctrl/paddle.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Paddle Control" emulation diff --git a/src/emu/bus/sms_ctrl/rfu.c b/src/emu/bus/sms_ctrl/rfu.c index 5ebf0a823b8..3da326aa378 100644 --- a/src/emu/bus/sms_ctrl/rfu.c +++ b/src/emu/bus/sms_ctrl/rfu.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Rapid Fire Unit" emulation diff --git a/src/emu/bus/sms_ctrl/rfu.h b/src/emu/bus/sms_ctrl/rfu.h index 664a385d40f..a27ef0aca02 100644 --- a/src/emu/bus/sms_ctrl/rfu.h +++ b/src/emu/bus/sms_ctrl/rfu.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Rapid Fire Unit" emulation diff --git a/src/emu/bus/sms_ctrl/smsctrl.c b/src/emu/bus/sms_ctrl/smsctrl.c index 3eb17a627b6..59536ef0f38 100644 --- a/src/emu/bus/sms_ctrl/smsctrl.c +++ b/src/emu/bus/sms_ctrl/smsctrl.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System controller port emulation diff --git a/src/emu/bus/sms_ctrl/smsctrl.h b/src/emu/bus/sms_ctrl/smsctrl.h index e23664e91ee..950e620c99b 100644 --- a/src/emu/bus/sms_ctrl/smsctrl.h +++ b/src/emu/bus/sms_ctrl/smsctrl.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System controller port emulation diff --git a/src/emu/bus/sms_ctrl/sports.c b/src/emu/bus/sms_ctrl/sports.c index a9a62afce6a..f5bc15e170b 100644 --- a/src/emu/bus/sms_ctrl/sports.c +++ b/src/emu/bus/sms_ctrl/sports.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Sports Pad" (US model) emulation diff --git a/src/emu/bus/sms_ctrl/sports.h b/src/emu/bus/sms_ctrl/sports.h index db7f1a475be..b0efde2abe8 100644 --- a/src/emu/bus/sms_ctrl/sports.h +++ b/src/emu/bus/sms_ctrl/sports.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Sports Pad" (US model) emulation diff --git a/src/emu/bus/sms_ctrl/sportsjp.c b/src/emu/bus/sms_ctrl/sportsjp.c index 5ed678402ab..d431f0a6816 100644 --- a/src/emu/bus/sms_ctrl/sportsjp.c +++ b/src/emu/bus/sms_ctrl/sportsjp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Sports Pad" (Japanese model) emulation diff --git a/src/emu/bus/sms_ctrl/sportsjp.h b/src/emu/bus/sms_ctrl/sportsjp.h index 5488376bd92..082546221e6 100644 --- a/src/emu/bus/sms_ctrl/sportsjp.h +++ b/src/emu/bus/sms_ctrl/sportsjp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Sports Pad" (Japanese model) emulation diff --git a/src/emu/bus/sms_exp/gender.c b/src/emu/bus/sms_exp/gender.c index 7a202d956e4..4ef55b1ffe5 100644 --- a/src/emu/bus/sms_exp/gender.c +++ b/src/emu/bus/sms_exp/gender.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Gender Adapter" emulation diff --git a/src/emu/bus/sms_exp/gender.h b/src/emu/bus/sms_exp/gender.h index c17b71ab9da..2b8503da968 100644 --- a/src/emu/bus/sms_exp/gender.h +++ b/src/emu/bus/sms_exp/gender.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System "Gender Adapter" emulation diff --git a/src/emu/bus/sms_exp/smsexp.c b/src/emu/bus/sms_exp/smsexp.c index eb961291f88..9b26999a94b 100644 --- a/src/emu/bus/sms_exp/smsexp.c +++ b/src/emu/bus/sms_exp/smsexp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System expansion slot emulation diff --git a/src/emu/bus/sms_exp/smsexp.h b/src/emu/bus/sms_exp/smsexp.h index f9515b2ebd6..58d1a33228d 100644 --- a/src/emu/bus/sms_exp/smsexp.h +++ b/src/emu/bus/sms_exp/smsexp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Sega Master System expansion slot emulation diff --git a/src/emu/bus/snes/bsx.c b/src/emu/bus/snes/bsx.c index f8ae6024503..08fa68dc082 100644 --- a/src/emu/bus/snes/bsx.c +++ b/src/emu/bus/snes/bsx.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** BS-X Satellaview cartridge emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/bsx.h b/src/emu/bus/snes/bsx.h index 31967365967..a91e713560d 100644 --- a/src/emu/bus/snes/bsx.h +++ b/src/emu/bus/snes/bsx.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_BSX_H #define __SNS_BSX_H diff --git a/src/emu/bus/snes/event.c b/src/emu/bus/snes/event.c index bddd726f8f9..ebd203adaad 100644 --- a/src/emu/bus/snes/event.c +++ b/src/emu/bus/snes/event.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Super NES/Famicom Event cartridges emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/event.h b/src/emu/bus/snes/event.h index 04ae96babdc..1bd3e0c97e0 100644 --- a/src/emu/bus/snes/event.h +++ b/src/emu/bus/snes/event.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_EVENT_H #define __SNS_EVENT_H diff --git a/src/emu/bus/snes/rom.h b/src/emu/bus/snes/rom.h index d6f6ad8e91d..bdcbd8ed92c 100644 --- a/src/emu/bus/snes/rom.h +++ b/src/emu/bus/snes/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_ROM_H #define __SNS_ROM_H diff --git a/src/emu/bus/snes/rom21.h b/src/emu/bus/snes/rom21.h index ed2cc7dd17d..a70d9fdc6c8 100644 --- a/src/emu/bus/snes/rom21.h +++ b/src/emu/bus/snes/rom21.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_ROM21_H #define __SNS_ROM21_H diff --git a/src/emu/bus/snes/sa1.c b/src/emu/bus/snes/sa1.c index 3b28da5f0fe..ca5ce2326bf 100644 --- a/src/emu/bus/snes/sa1.c +++ b/src/emu/bus/snes/sa1.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** SA-1 add-on chip emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/sa1.h b/src/emu/bus/snes/sa1.h index 7386fef10b7..a0125507c31 100644 --- a/src/emu/bus/snes/sa1.h +++ b/src/emu/bus/snes/sa1.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_SA1_H #define __SNS_SA1_H diff --git a/src/emu/bus/snes/sdd1.h b/src/emu/bus/snes/sdd1.h index 3fb352a8da5..cef80512694 100644 --- a/src/emu/bus/snes/sdd1.h +++ b/src/emu/bus/snes/sdd1.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_SDD1_H #define __SNS_SDD1_H diff --git a/src/emu/bus/snes/sfx.c b/src/emu/bus/snes/sfx.c index 0899a5bfc37..9fce31d00db 100644 --- a/src/emu/bus/snes/sfx.c +++ b/src/emu/bus/snes/sfx.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** SuperFX add-on chip emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/sfx.h b/src/emu/bus/snes/sfx.h index 4c23464d951..04a2313fd92 100644 --- a/src/emu/bus/snes/sfx.h +++ b/src/emu/bus/snes/sfx.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_SFX_H #define __SNS_SFX_H diff --git a/src/emu/bus/snes/sgb.c b/src/emu/bus/snes/sgb.c index 5542a0e6e52..93edb4aeb50 100644 --- a/src/emu/bus/snes/sgb.c +++ b/src/emu/bus/snes/sgb.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Super Game Boy emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/sgb.h b/src/emu/bus/snes/sgb.h index 72b652ceb38..01bfd6ea887 100644 --- a/src/emu/bus/snes/sgb.h +++ b/src/emu/bus/snes/sgb.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_SGB_H #define __SNS_SGB_H diff --git a/src/emu/bus/snes/snes_carts.c b/src/emu/bus/snes/snes_carts.c index 60bf28b41d7..478dd6af83c 100644 --- a/src/emu/bus/snes/snes_carts.c +++ b/src/emu/bus/snes/snes_carts.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** SNES carts diff --git a/src/emu/bus/snes/snes_carts.h b/src/emu/bus/snes/snes_carts.h index cbae258235b..11eab07a315 100644 --- a/src/emu/bus/snes/snes_carts.h +++ b/src/emu/bus/snes/snes_carts.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** SNES carts diff --git a/src/emu/bus/snes/snes_slot.c b/src/emu/bus/snes/snes_slot.c index adf91d3f9bf..848decd708d 100644 --- a/src/emu/bus/snes/snes_slot.c +++ b/src/emu/bus/snes/snes_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/snes/snes_slot.h b/src/emu/bus/snes/snes_slot.h index e2a92d5b922..a6fa076810f 100644 --- a/src/emu/bus/snes/snes_slot.h +++ b/src/emu/bus/snes/snes_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_SLOT_H #define __SNS_SLOT_H diff --git a/src/emu/bus/snes/sufami.c b/src/emu/bus/snes/sufami.c index d66a206621d..2cf4de90d6c 100644 --- a/src/emu/bus/snes/sufami.c +++ b/src/emu/bus/snes/sufami.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Bandai Sufami Turbo cartridge emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/sufami.h b/src/emu/bus/snes/sufami.h index ade53735876..c56f566777f 100644 --- a/src/emu/bus/snes/sufami.h +++ b/src/emu/bus/snes/sufami.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_SUFAMI_H #define __SNS_SUFAMI_H diff --git a/src/emu/bus/snes/upd.c b/src/emu/bus/snes/upd.c index df301c46397..056f462e2fa 100644 --- a/src/emu/bus/snes/upd.c +++ b/src/emu/bus/snes/upd.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** UPD7725 / UPD96050 add-on chip emulation (for SNES/SFC) diff --git a/src/emu/bus/snes/upd.h b/src/emu/bus/snes/upd.h index 0b772925173..28fdf077f11 100644 --- a/src/emu/bus/snes/upd.h +++ b/src/emu/bus/snes/upd.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SNS_UPD_H #define __SNS_UPD_H diff --git a/src/emu/bus/snes_ctrl/bcbattle.c b/src/emu/bus/snes_ctrl/bcbattle.c index 7ca1fef75e7..5d332c4885e 100644 --- a/src/emu/bus/snes_ctrl/bcbattle.c +++ b/src/emu/bus/snes_ctrl/bcbattle.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom - Epoch Barcode Battler diff --git a/src/emu/bus/snes_ctrl/bcbattle.h b/src/emu/bus/snes_ctrl/bcbattle.h index 9139674ec5c..120c289c894 100644 --- a/src/emu/bus/snes_ctrl/bcbattle.h +++ b/src/emu/bus/snes_ctrl/bcbattle.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom - Epoch Barcode Battler diff --git a/src/emu/bus/snes_ctrl/ctrl.c b/src/emu/bus/snes_ctrl/ctrl.c index cfbe081855b..ccd05ec8cf9 100644 --- a/src/emu/bus/snes_ctrl/ctrl.c +++ b/src/emu/bus/snes_ctrl/ctrl.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES controller port emulation diff --git a/src/emu/bus/snes_ctrl/ctrl.h b/src/emu/bus/snes_ctrl/ctrl.h index 52ce25dde75..d2ef092e4e7 100644 --- a/src/emu/bus/snes_ctrl/ctrl.h +++ b/src/emu/bus/snes_ctrl/ctrl.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES controller port emulation diff --git a/src/emu/bus/snes_ctrl/joypad.c b/src/emu/bus/snes_ctrl/joypad.c index b463e45b2ba..6c638a321b8 100644 --- a/src/emu/bus/snes_ctrl/joypad.c +++ b/src/emu/bus/snes_ctrl/joypad.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES Joypad diff --git a/src/emu/bus/snes_ctrl/joypad.h b/src/emu/bus/snes_ctrl/joypad.h index b1f24e0c13a..2133f396d0f 100644 --- a/src/emu/bus/snes_ctrl/joypad.h +++ b/src/emu/bus/snes_ctrl/joypad.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES Joypad diff --git a/src/emu/bus/snes_ctrl/miracle.c b/src/emu/bus/snes_ctrl/miracle.c index fc220c43a73..d0dfddb71ff 100644 --- a/src/emu/bus/snes_ctrl/miracle.c +++ b/src/emu/bus/snes_ctrl/miracle.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Super Nintendo Entertainment System - Miracle Piano Keyboard diff --git a/src/emu/bus/snes_ctrl/miracle.h b/src/emu/bus/snes_ctrl/miracle.h index c3198cb2425..2a814050593 100644 --- a/src/emu/bus/snes_ctrl/miracle.h +++ b/src/emu/bus/snes_ctrl/miracle.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Super Nintendo Entertainment System - Miracle Piano Keyboard diff --git a/src/emu/bus/snes_ctrl/mouse.c b/src/emu/bus/snes_ctrl/mouse.c index fcb5afc612d..535b68d02bb 100644 --- a/src/emu/bus/snes_ctrl/mouse.c +++ b/src/emu/bus/snes_ctrl/mouse.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES Mouse diff --git a/src/emu/bus/snes_ctrl/mouse.h b/src/emu/bus/snes_ctrl/mouse.h index 098ee432387..56608e40992 100644 --- a/src/emu/bus/snes_ctrl/mouse.h +++ b/src/emu/bus/snes_ctrl/mouse.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES Mouse diff --git a/src/emu/bus/snes_ctrl/multitap.c b/src/emu/bus/snes_ctrl/multitap.c index 22e8b083502..a5c344a1147 100644 --- a/src/emu/bus/snes_ctrl/multitap.c +++ b/src/emu/bus/snes_ctrl/multitap.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES Multitap Adapter diff --git a/src/emu/bus/snes_ctrl/multitap.h b/src/emu/bus/snes_ctrl/multitap.h index 7197d6374a3..1720fe6280e 100644 --- a/src/emu/bus/snes_ctrl/multitap.h +++ b/src/emu/bus/snes_ctrl/multitap.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES Multitap Adapter diff --git a/src/emu/bus/snes_ctrl/pachinko.c b/src/emu/bus/snes_ctrl/pachinko.c index 95ec5811930..724c4bccbd9 100644 --- a/src/emu/bus/snes_ctrl/pachinko.c +++ b/src/emu/bus/snes_ctrl/pachinko.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom - Sunsoft Pachinko Controller diff --git a/src/emu/bus/snes_ctrl/pachinko.h b/src/emu/bus/snes_ctrl/pachinko.h index 6093bf0437a..ae47adc40b4 100644 --- a/src/emu/bus/snes_ctrl/pachinko.h +++ b/src/emu/bus/snes_ctrl/pachinko.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom - Sunsoft Pachinko Controller diff --git a/src/emu/bus/snes_ctrl/sscope.c b/src/emu/bus/snes_ctrl/sscope.c index 31a01e2be25..72c81e84328 100644 --- a/src/emu/bus/snes_ctrl/sscope.c +++ b/src/emu/bus/snes_ctrl/sscope.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES SuperScope diff --git a/src/emu/bus/snes_ctrl/sscope.h b/src/emu/bus/snes_ctrl/sscope.h index 1e47971323c..a207a29d9a6 100644 --- a/src/emu/bus/snes_ctrl/sscope.h +++ b/src/emu/bus/snes_ctrl/sscope.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom & SNES SuperScope diff --git a/src/emu/bus/snes_ctrl/twintap.c b/src/emu/bus/snes_ctrl/twintap.c index 62613a4de2b..0755e14ef74 100644 --- a/src/emu/bus/snes_ctrl/twintap.c +++ b/src/emu/bus/snes_ctrl/twintap.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom - Yonezawa / PartyRoom 21 Twin Tap Controller diff --git a/src/emu/bus/snes_ctrl/twintap.h b/src/emu/bus/snes_ctrl/twintap.h index f1cd75ad1a9..4474ec1e6da 100644 --- a/src/emu/bus/snes_ctrl/twintap.h +++ b/src/emu/bus/snes_ctrl/twintap.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************** Nintendo Super Famicom - Yonezawa / PartyRoom 21 Twin Tap Controller diff --git a/src/emu/bus/spc1000/exp.c b/src/emu/bus/spc1000/exp.c index 7200fdaf0d0..7a63161096e 100644 --- a/src/emu/bus/spc1000/exp.c +++ b/src/emu/bus/spc1000/exp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Samsung SPC-1000 Expansion port diff --git a/src/emu/bus/spc1000/exp.h b/src/emu/bus/spc1000/exp.h index 8d566994ffd..3607f021a0e 100644 --- a/src/emu/bus/spc1000/exp.h +++ b/src/emu/bus/spc1000/exp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SCP1000_SLOT_H #define __SCP1000_SLOT_H diff --git a/src/emu/bus/spc1000/fdd.c b/src/emu/bus/spc1000/fdd.c index f0d67c4310b..9089dae5829 100644 --- a/src/emu/bus/spc1000/fdd.c +++ b/src/emu/bus/spc1000/fdd.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*************************************************************************** SPC-1000 FDD unit diff --git a/src/emu/bus/spc1000/fdd.h b/src/emu/bus/spc1000/fdd.h index 33cba0c54ee..4d384e2ee44 100644 --- a/src/emu/bus/spc1000/fdd.h +++ b/src/emu/bus/spc1000/fdd.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SPC1000_FDD_H__ #define __SPC1000_FDD_H__ diff --git a/src/emu/bus/spc1000/vdp.c b/src/emu/bus/spc1000/vdp.c index bb86bca0b58..7824e9fccb4 100644 --- a/src/emu/bus/spc1000/vdp.c +++ b/src/emu/bus/spc1000/vdp.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*************************************************************************** SPC-1000 VDP expansion unit diff --git a/src/emu/bus/spc1000/vdp.h b/src/emu/bus/spc1000/vdp.h index 45ca8e41f13..d7311f8c104 100644 --- a/src/emu/bus/spc1000/vdp.h +++ b/src/emu/bus/spc1000/vdp.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __SPC1000_VDP_H__ #define __SPC1000_VDP_H__ diff --git a/src/emu/bus/vboy/rom.c b/src/emu/bus/vboy/rom.c index ca7068a2f1a..587be158610 100644 --- a/src/emu/bus/vboy/rom.c +++ b/src/emu/bus/vboy/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/vboy/rom.h b/src/emu/bus/vboy/rom.h index 0101c303790..0f26468892b 100644 --- a/src/emu/bus/vboy/rom.h +++ b/src/emu/bus/vboy/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VBOY_ROM_H #define __VBOY_ROM_H diff --git a/src/emu/bus/vboy/slot.c b/src/emu/bus/vboy/slot.c index 2e3d4c86970..0cbbb618419 100644 --- a/src/emu/bus/vboy/slot.c +++ b/src/emu/bus/vboy/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Nintendo Virtual Boy cart emulation diff --git a/src/emu/bus/vboy/slot.h b/src/emu/bus/vboy/slot.h index 084c1ac5abd..e865eece213 100644 --- a/src/emu/bus/vboy/slot.h +++ b/src/emu/bus/vboy/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VBOY_SLOT_H #define __VBOY_SLOT_H diff --git a/src/emu/bus/vc4000/rom.c b/src/emu/bus/vc4000/rom.c index cb0cc577fe7..5c8ebf5c7bb 100644 --- a/src/emu/bus/vc4000/rom.c +++ b/src/emu/bus/vc4000/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/vc4000/rom.h b/src/emu/bus/vc4000/rom.h index 55264d33da6..ae4502f57a2 100644 --- a/src/emu/bus/vc4000/rom.h +++ b/src/emu/bus/vc4000/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VC4000_ROM_H #define __VC4000_ROM_H diff --git a/src/emu/bus/vc4000/slot.c b/src/emu/bus/vc4000/slot.c index d512f02edf5..2c353ef90b6 100644 --- a/src/emu/bus/vc4000/slot.c +++ b/src/emu/bus/vc4000/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** Interton Electronic VC 4000 cart emulation diff --git a/src/emu/bus/vc4000/slot.h b/src/emu/bus/vc4000/slot.h index c09821097b6..62cf4655f89 100644 --- a/src/emu/bus/vc4000/slot.h +++ b/src/emu/bus/vc4000/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VC4000_SLOT_H #define __VC4000_SLOT_H diff --git a/src/emu/bus/vcs/compumat.c b/src/emu/bus/vcs/compumat.c index c3430ac0f14..4fc7d9cba5b 100644 --- a/src/emu/bus/vcs/compumat.c +++ b/src/emu/bus/vcs/compumat.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*************************************************************************** Atari 2600 cart Spectravideo Compumate (Cart + keyboard!) diff --git a/src/emu/bus/vcs/compumat.h b/src/emu/bus/vcs/compumat.h index d21fa8d2f8f..80f1df069fd 100644 --- a/src/emu/bus/vcs/compumat.h +++ b/src/emu/bus/vcs/compumat.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VCS_COMPUMAT_H #define __VCS_COMPUMAT_H diff --git a/src/emu/bus/vcs/dpc.c b/src/emu/bus/vcs/dpc.c index a6f8c817df7..f0787b6bcb4 100644 --- a/src/emu/bus/vcs/dpc.c +++ b/src/emu/bus/vcs/dpc.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*************************************************************************** diff --git a/src/emu/bus/vcs/dpc.h b/src/emu/bus/vcs/dpc.h index 72cc4222e8a..9e04ddb2e67 100644 --- a/src/emu/bus/vcs/dpc.h +++ b/src/emu/bus/vcs/dpc.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VCS_DCP_H #define __VCS_DCP_H diff --git a/src/emu/bus/vcs/rom.c b/src/emu/bus/vcs/rom.c index 607d99cb27d..b689db7094e 100755 --- a/src/emu/bus/vcs/rom.c +++ b/src/emu/bus/vcs/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** A2600 VCS ROM cart emulation diff --git a/src/emu/bus/vcs/rom.h b/src/emu/bus/vcs/rom.h index 76089783e8c..2d7b73586be 100755 --- a/src/emu/bus/vcs/rom.h +++ b/src/emu/bus/vcs/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VCS_ROM_H #define __VCS_ROM_H diff --git a/src/emu/bus/vcs/scharger.c b/src/emu/bus/vcs/scharger.c index eaea3c50e1c..a3d90391ce9 100644 --- a/src/emu/bus/vcs/scharger.c +++ b/src/emu/bus/vcs/scharger.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*************************************************************************** Atari 2600 cart Starpath Supercharger (Cart + Tape drive!) diff --git a/src/emu/bus/vcs/scharger.h b/src/emu/bus/vcs/scharger.h index e62be4b6dc9..d2f669b0bbd 100644 --- a/src/emu/bus/vcs/scharger.h +++ b/src/emu/bus/vcs/scharger.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VCS_SCHARGER_H #define __VCS_SCHARGER_H diff --git a/src/emu/bus/vcs/vcs_slot.c b/src/emu/bus/vcs/vcs_slot.c index 8c290e3934f..c2db7d684f8 100755 --- a/src/emu/bus/vcs/vcs_slot.c +++ b/src/emu/bus/vcs/vcs_slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/vcs/vcs_slot.h b/src/emu/bus/vcs/vcs_slot.h index 2ec398b1817..9b087988d80 100755 --- a/src/emu/bus/vcs/vcs_slot.h +++ b/src/emu/bus/vcs/vcs_slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VCS_SLOT_H #define __VCS_SLOT_H diff --git a/src/emu/bus/vectrex/rom.c b/src/emu/bus/vectrex/rom.c index 1d8359bb6ed..866fd741f9a 100644 --- a/src/emu/bus/vectrex/rom.c +++ b/src/emu/bus/vectrex/rom.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** diff --git a/src/emu/bus/vectrex/rom.h b/src/emu/bus/vectrex/rom.h index 6515b0227fb..eac8ef812f3 100644 --- a/src/emu/bus/vectrex/rom.h +++ b/src/emu/bus/vectrex/rom.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VECTREX_ROM_H #define __VECTREX_ROM_H diff --git a/src/emu/bus/vectrex/slot.c b/src/emu/bus/vectrex/slot.c index 2d82172c7c7..932248c22ce 100644 --- a/src/emu/bus/vectrex/slot.c +++ b/src/emu/bus/vectrex/slot.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /*********************************************************************************************************** GCE Vectrex cart emulation diff --git a/src/emu/bus/vectrex/slot.h b/src/emu/bus/vectrex/slot.h index d6b55516c6b..e2f5d3cdbe5 100644 --- a/src/emu/bus/vectrex/slot.h +++ b/src/emu/bus/vectrex/slot.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli #ifndef __VECTREX_SLOT_H #define __VECTREX_SLOT_H diff --git a/src/emu/cpu/am29000/am29000.c b/src/emu/cpu/am29000/am29000.c index c95912edf27..ee0dd825a60 100644 --- a/src/emu/cpu/am29000/am29000.c +++ b/src/emu/cpu/am29000/am29000.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/am29000/am29000.h b/src/emu/cpu/am29000/am29000.h index 83f421f83c5..ff83dacddea 100644 --- a/src/emu/cpu/am29000/am29000.h +++ b/src/emu/cpu/am29000/am29000.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/am29000/am29dasm.c b/src/emu/cpu/am29000/am29dasm.c index 28ce48bad9e..bd8c6712fd2 100644 --- a/src/emu/cpu/am29000/am29dasm.c +++ b/src/emu/cpu/am29000/am29dasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/am29000/am29ops.h b/src/emu/cpu/am29000/am29ops.h index 873be7eaa7d..bd3602391e6 100644 --- a/src/emu/cpu/am29000/am29ops.h +++ b/src/emu/cpu/am29000/am29ops.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/avr8/avr8.c b/src/emu/cpu/avr8/avr8.c index 97d055d2a61..a0aacacc3d5 100644 --- a/src/emu/cpu/avr8/avr8.c +++ b/src/emu/cpu/avr8/avr8.c @@ -1158,7 +1158,7 @@ void avr8_device::timer_tick(int cycles) //TODO UINT8 int0[2] = { AVR8_INTIDX_OCF0A, AVR8_INTIDX_OCF0B }; #define LOG_TIMER_0 0 -#define LOG_TIMER_5 1 +#define LOG_TIMER_5 0 // Timer 0 Handling void avr8_device::timer0_tick() { @@ -1905,8 +1905,10 @@ void avr8_device::timer5_tick() case WGM5_CTC_ICR: case WGM5_FAST_PWM_ICR: case WGM5_FAST_PWM_OCR: - printf("Unimplemented timer#5 waveform generation mode: WGMM5=0x%02X\n", AVR8_WGM5); - break; +#if LOG_TIMER_5 + printf("Unimplemented timer#5 waveform generation mode: AVR8_WGM5 = 0x%02X\n", AVR8_WGM5); +#endif + break; case WGM5_CTC_OCR: //TODO: verify this! Can be very wrong!!! diff --git a/src/emu/cpu/avr8/avr8.h b/src/emu/cpu/avr8/avr8.h index dd85eff150a..2384c585804 100644 --- a/src/emu/cpu/avr8/avr8.h +++ b/src/emu/cpu/avr8/avr8.h @@ -708,11 +708,11 @@ enum //0x11D: Reserved //0x11E: Reserved //0x11F: Reserved - AVR8_REGIDX_TCCR5A, + AVR8_REGIDX_TCCR5A = 0x120, AVR8_REGIDX_TCCR5B, AVR8_REGIDX_TCCR5C, //0x123: Reserved - AVR8_REGIDX_TCNT5L, + AVR8_REGIDX_TCNT5L = 0x124, AVR8_REGIDX_TCNT5H, AVR8_REGIDX_ICR5L, AVR8_REGIDX_ICR5H, @@ -724,11 +724,11 @@ enum AVR8_REGIDX_OCR5CH, //0x12E: Reserved //0x12F: Reserved - AVR8_REGIDX_UCSR3A, + AVR8_REGIDX_UCSR3A = 0x130, AVR8_REGIDX_UCSR3B, AVR8_REGIDX_UCSR3C, //0x133: Reserved - AVR8_REGIDX_UBRR3L, + AVR8_REGIDX_UBRR3L = 0x134, AVR8_REGIDX_UBRR3H, AVR8_REGIDX_UDR3, //0x137: Reserved diff --git a/src/emu/cpu/cp1610/1610dasm.c b/src/emu/cpu/cp1610/1610dasm.c index 06f73664e8c..0035e9b78a5 100644 --- a/src/emu/cpu/cp1610/1610dasm.c +++ b/src/emu/cpu/cp1610/1610dasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo #include "emu.h" #include "debugger.h" diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c index b5c14fe32aa..1dc911adf5e 100644 --- a/src/emu/cpu/cp1610/cp1610.c +++ b/src/emu/cpu/cp1610/cp1610.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /***************************************************************************** * diff --git a/src/emu/cpu/cp1610/cp1610.h b/src/emu/cpu/cp1610/cp1610.h index 5b0924e2020..1b2e8657892 100644 --- a/src/emu/cpu/cp1610/cp1610.h +++ b/src/emu/cpu/cp1610/cp1610.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /***************************************************************************** * diff --git a/src/emu/cpu/cubeqcpu/cubedasm.c b/src/emu/cpu/cubeqcpu/cubedasm.c index d62b6424ee3..81d7d95c088 100644 --- a/src/emu/cpu/cubeqcpu/cubedasm.c +++ b/src/emu/cpu/cubeqcpu/cubedasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.c b/src/emu/cpu/cubeqcpu/cubeqcpu.c index cf4d78aee96..7b79940c998 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.c +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.h b/src/emu/cpu/cubeqcpu/cubeqcpu.h index 49fbea25548..4a6926e3cee 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.h +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Philip Bennett /*************************************************************************** diff --git a/src/emu/cpu/drcbec.c b/src/emu/cpu/drcbec.c index 79329fb39bd..93e2d655ecf 100644 --- a/src/emu/cpu/drcbec.c +++ b/src/emu/cpu/drcbec.c @@ -1929,7 +1929,7 @@ int drcbe_c::execute(code_handle &entry) break; case MAKE_OPCODE_SHORT(OP_FRSQRT, 4, 0): // FSRSQRT dst,src1 - FSPARAM0 = 1.0f / sqrt(FSPARAM1); + FSPARAM0 = 1.0f / sqrtf(FSPARAM1); break; diff --git a/src/emu/cpu/dsp56k/inst.h b/src/emu/cpu/dsp56k/inst.h index bbf9c0a7f1f..b83508a7df2 100644 --- a/src/emu/cpu/dsp56k/inst.h +++ b/src/emu/cpu/dsp56k/inst.h @@ -44,7 +44,7 @@ public: const UINT16 word1, bool shifted=false); - const bool valid() const { return m_valid; } + bool valid() const { return m_valid; } const reg_id& source() const { return m_source; } const reg_id& destination() const { return m_destination; } diff --git a/src/emu/cpu/dsp56k/opcode.c b/src/emu/cpu/dsp56k/opcode.c index 938014ca1fd..dd71d852650 100644 --- a/src/emu/cpu/dsp56k/opcode.c +++ b/src/emu/cpu/dsp56k/opcode.c @@ -68,7 +68,7 @@ size_t Opcode::evalSize() const const reg_id& Opcode::instSource() const { return m_instruction->source(); } const reg_id& Opcode::instDestination() const { return m_instruction->destination(); } -const size_t Opcode::instAccumulatorBitsModified() const { return m_instruction->accumulatorBitsModified(); } +size_t Opcode::instAccumulatorBitsModified() const { return m_instruction->accumulatorBitsModified(); } std::string Opcode::dcString() const { diff --git a/src/emu/cpu/dsp56k/opcode.h b/src/emu/cpu/dsp56k/opcode.h index 20698ed88b3..66423716ffb 100644 --- a/src/emu/cpu/dsp56k/opcode.h +++ b/src/emu/cpu/dsp56k/opcode.h @@ -31,7 +31,7 @@ public: // Peek through to the instruction const reg_id& instSource() const; const reg_id& instDestination() const; - const size_t instAccumulatorBitsModified() const; + size_t instAccumulatorBitsModified() const; private: auto_pointer<Instruction> m_instruction; diff --git a/src/emu/cpu/dsp56k/pmove.c b/src/emu/cpu/dsp56k/pmove.c index eb1881a4040..dce702d094b 100644 --- a/src/emu/cpu/dsp56k/pmove.c +++ b/src/emu/cpu/dsp56k/pmove.c @@ -6,7 +6,7 @@ namespace DSP56K { const reg_id& ParallelMove::opSource() const { return m_oco->instSource(); } const reg_id& ParallelMove::opDestination() const { return m_oco->instDestination(); } -const size_t ParallelMove::opAccumulatorBitsModified() const { return m_oco->instAccumulatorBitsModified(); } +size_t ParallelMove::opAccumulatorBitsModified() const { return m_oco->instAccumulatorBitsModified(); } ParallelMove* ParallelMove::decodeParallelMove(const Opcode* opc, const UINT16 word0, const UINT16 word1) diff --git a/src/emu/cpu/dsp56k/pmove.h b/src/emu/cpu/dsp56k/pmove.h index 1f81f94884b..8e30a534073 100644 --- a/src/emu/cpu/dsp56k/pmove.h +++ b/src/emu/cpu/dsp56k/pmove.h @@ -26,12 +26,12 @@ public: static ParallelMove* decodeParallelMove(const Opcode* opc, const UINT16 word0, const UINT16 word1); - const bool valid() const { return m_valid; } + bool valid() const { return m_valid; } // Peek through the opcode to see the instruction const reg_id& opSource() const; const reg_id& opDestination() const; - const size_t opAccumulatorBitsModified() const; + size_t opAccumulatorBitsModified() const; protected: bool m_valid; diff --git a/src/emu/cpu/e0c6200/e0c6s46.c b/src/emu/cpu/e0c6200/e0c6s46.c index 39eba846733..55a0127db7b 100644 --- a/src/emu/cpu/e0c6200/e0c6s46.c +++ b/src/emu/cpu/e0c6200/e0c6s46.c @@ -6,9 +6,11 @@ QFP5-128pin, see manual for pinout TODO: + - OSC3 - K input interrupts - finish i/o ports - serial interface + - buzzer envelope addition - add mask options to MCFG (eg. buzzer on output port R4x is optional) */ @@ -80,10 +82,8 @@ void e0c6s46_device::device_start() m_write_p3.resolve_safe(); // create timers - m_clktimer_handle = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(e0c6s46_device::clktimer_cb), this)); - m_clktimer_handle->adjust(attotime::from_ticks(128, unscaled_clock())); - m_stopwatch_handle = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(e0c6s46_device::stopwatch_cb), this)); - m_stopwatch_handle->adjust(attotime::from_ticks(64, unscaled_clock())); + m_core_256_handle = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(e0c6s46_device::core_256_cb), this)); + m_core_256_handle->adjust(attotime::from_ticks(64, unscaled_clock())); m_prgtimer_handle = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(e0c6s46_device::prgtimer_cb), this)); m_prgtimer_handle->adjust(attotime::never); m_buzzer_handle = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(e0c6s46_device::buzzer_cb), this)); @@ -105,11 +105,11 @@ void e0c6s46_device::device_start() m_lcd_control = 0; m_lcd_contrast = 0; + m_256_src_pulse = 0; m_watchdog_count = 0; m_clktimer_count = 0; m_stopwatch_on = 0; - m_swl_src_pulse = 0; m_swl_cur_pulse = 0; m_swl_slice = 0; m_swl_count = 0; @@ -121,6 +121,15 @@ void e0c6s46_device::device_start() m_prgtimer_cur_pulse = 0; m_prgtimer_count = 0; m_prgtimer_reload = 0; + + m_bz_43_on = 0; + m_bz_freq = 0; + m_bz_envelope = 0; + m_bz_duty_ratio = 0; + m_bz_1shot_on = 0; + m_bz_1shot_running = false; + m_bz_1shot_count = 0; + m_bz_pulse = 0; // register for savestates save_item(NAME(m_port_r)); @@ -138,11 +147,11 @@ void e0c6s46_device::device_start() save_item(NAME(m_lcd_control)); save_item(NAME(m_lcd_contrast)); + save_item(NAME(m_256_src_pulse)); save_item(NAME(m_watchdog_count)); save_item(NAME(m_clktimer_count)); save_item(NAME(m_stopwatch_on)); - save_item(NAME(m_swl_src_pulse)); save_item(NAME(m_swl_cur_pulse)); save_item(NAME(m_swl_slice)); save_item(NAME(m_swl_count)); @@ -154,6 +163,15 @@ void e0c6s46_device::device_start() save_item(NAME(m_prgtimer_cur_pulse)); save_item(NAME(m_prgtimer_count)); save_item(NAME(m_prgtimer_reload)); + + save_item(NAME(m_bz_43_on)); + save_item(NAME(m_bz_freq)); + save_item(NAME(m_bz_envelope)); + save_item(NAME(m_bz_duty_ratio)); + save_item(NAME(m_bz_1shot_on)); + save_item(NAME(m_bz_1shot_running)); + save_item(NAME(m_bz_1shot_count)); + save_item(NAME(m_bz_pulse)); } @@ -277,9 +295,6 @@ void e0c6s46_device::write_r(UINT8 port, UINT8 data) data &= 0xf; m_port_r[port] = data; - if (port == 4) - write_r4(); - // ports R0x-R3x can be high-impedance UINT8 out = data; if (port < 4 && !(m_r_dir >> port & 1)) @@ -291,17 +306,27 @@ void e0c6s46_device::write_r(UINT8 port, UINT8 data) case 1: m_write_r1(port, out, 0xff); break; case 2: m_write_r2(port, out, 0xff); break; case 3: m_write_r3(port, out, 0xff); break; // TODO: R33 PTCLK/_SRDY + + // R4x: special output + case 4: + // d3: buzzer on: direct output or 1-shot output + if ((data & 8) != m_bz_43_on) + { + m_bz_43_on = data & 8; + reset_buzzer(); + } + write_r4_out(); + break; } } -void e0c6s46_device::write_r4() +void e0c6s46_device::write_r4_out() { // R40: _FOUT(clock inverted output) // R42: FOUT or _BZ - // R43: BZ(buzzer) on - UINT8 data = m_port_r[4] & 2; - - m_write_r4(4, data, 0xff); + // R43: BZ(buzzer) + UINT8 out = (m_port_r[4] & 2) | (m_bz_pulse << 3) | (m_bz_pulse << 2 ^ 4); + m_write_r4(4, out, 0xff); } @@ -348,7 +373,30 @@ UINT8 e0c6s46_device::read_p(UINT8 port) // timers //------------------------------------------------- -// clock timer +TIMER_CALLBACK_MEMBER(e0c6s46_device::core_256_cb) +{ + // clock-timer, stopwatch timer, and some features of the buzzer all run + // from the same internal 256hz timer (64 ticks high+low at default clock of 32768hz) + m_256_src_pulse ^= 1; + m_core_256_handle->adjust(attotime::from_ticks(64, unscaled_clock())); + + // clock stopwatch on falling edge of pulse+on + m_swl_cur_pulse = m_256_src_pulse | (m_stopwatch_on ^ 1); + if (m_swl_cur_pulse == 0) + clock_stopwatch(); + + // clock 1-shot buzzer on rising edge if it's on + if (m_bz_1shot_on != 0 && m_256_src_pulse == 1) + clock_bz_1shot(); + + // clock-timer is always running, advance it on falling edge + // (handle clock_clktimer last in case of watchdog reset) + if (m_256_src_pulse == 0) + clock_clktimer(); +} + + +// clock-timer void e0c6s46_device::clock_watchdog() { @@ -361,7 +409,7 @@ void e0c6s46_device::clock_watchdog() } } -TIMER_CALLBACK_MEMBER(e0c6s46_device::clktimer_cb) +void e0c6s46_device::clock_clktimer() { m_clktimer_count++; @@ -380,9 +428,6 @@ TIMER_CALLBACK_MEMBER(e0c6s46_device::clktimer_cb) if (m_irqflag[IRQREG_CLKTIMER] & m_irqmask[IRQREG_CLKTIMER]) m_possible_irq = true; - // schedule next timeout (256hz at default clock of 32768hz) - m_clktimer_handle->adjust(attotime::from_ticks(128, unscaled_clock())); - // 1hz falling edge also clocks the watchdog timer if (m_clktimer_count == 0) clock_watchdog(); @@ -421,19 +466,6 @@ void e0c6s46_device::clock_stopwatch() } } -TIMER_CALLBACK_MEMBER(e0c6s46_device::stopwatch_cb) -{ - m_swl_src_pulse ^= 1; - m_swl_cur_pulse = m_swl_src_pulse | (m_stopwatch_on ^ 1); - - // clock stopwatch on falling edge of pulse+on - if (m_swl_cur_pulse == 0) - clock_stopwatch(); - - // schedule next timeout (256hz high+low at default clock of 32768hz) - m_stopwatch_handle->adjust(attotime::from_ticks(64, unscaled_clock())); -} - // programmable timer @@ -478,8 +510,58 @@ TIMER_CALLBACK_MEMBER(e0c6s46_device::prgtimer_cb) // buzzer +void e0c6s46_device::schedule_buzzer() +{ + // only schedule next buzzer timeout if it's on + if (m_bz_43_on != 0 && !m_bz_1shot_running) + return; + + // pulse width differs per frequency selection + int mul = (m_bz_freq & 4) ? 1 : 2; + int high = (m_bz_freq & 2) ? 12 : 8; + int low = 16 + (m_bz_freq << 2 & 0xc); + + // pulse width envelope if it's on + if (m_bz_envelope & 1) + high -= m_bz_duty_ratio; + low -= high; + + m_buzzer_handle->adjust(attotime::from_ticks(m_bz_pulse ? high : low, mul * unscaled_clock())); +} + TIMER_CALLBACK_MEMBER(e0c6s46_device::buzzer_cb) { + // invert pulse wave and write to output + m_bz_pulse ^= 1; + write_r4_out(); + + schedule_buzzer(); +} + +void e0c6s46_device::reset_buzzer() +{ + // don't reset if the timer is running + if (m_buzzer_handle->remaining() == attotime::never) + schedule_buzzer(); +} + +void e0c6s46_device::clock_bz_1shot() +{ + m_bz_1shot_running = true; + + // reload counter the 1st time + if (m_bz_1shot_count == 0) + { + reset_buzzer(); + m_bz_1shot_count = (m_bz_freq & 8) ? 16 : 8; + } + + // stop ringing when counter reaches 0 + else if (--m_bz_1shot_count == 0) + { + m_bz_1shot_on = 0; + m_bz_1shot_running = false; + } } @@ -570,7 +652,7 @@ READ8_MEMBER(e0c6s46_device::io_r) case 0x7e: return m_p_pullup; - // clock timer (lo, hi) + // clock-timer (lo, hi) case 0x20: case 0x21: return m_clktimer_count >> (4 * (offset & 1)) & 0xf; @@ -592,6 +674,13 @@ READ8_MEMBER(e0c6s46_device::io_r) case 0x79: return m_prgtimer_select; + // buzzer + case 0x74: + return m_bz_freq; + case 0x75: + // d3: 1-shot buzzer is on + return m_bz_1shot_on | m_bz_envelope; + // OSC circuit case 0x70: return m_osc; @@ -645,7 +734,7 @@ WRITE8_MEMBER(e0c6s46_device::io_w) write_r(offset & 7, data); break; case 0x7b: - // d0-d3: Rx* direction 0: high impedance, 1: output + // d0-d3: Rx* direction 0: high-impedance, 1: output if (data != m_r_dir) { m_r_dir = data; @@ -705,10 +794,10 @@ WRITE8_MEMBER(e0c6s46_device::io_w) m_svd = data & 7; break; - // clock timer + // clock-timer case 0x76: // d0: reset watchdog - // d1: reset clock timer (hw glitch note, not emulated: this also "sometimes"(when??) + // d1: reset clktimer (hw glitch note, not emulated: this also "sometimes"(when??) // sets the clktimer interrupt and clocks the watchdog) if (data & 1) m_watchdog_count = 0; @@ -727,7 +816,7 @@ WRITE8_MEMBER(e0c6s46_device::io_w) m_swl_count = 0; m_swl_slice = 0; } - if (m_stopwatch_on && m_swl_cur_pulse && !m_swl_src_pulse) + if (m_stopwatch_on && m_swl_cur_pulse && !m_256_src_pulse) { // clock stopwatch on falling edge of pulse+on m_swl_cur_pulse = 0; @@ -772,6 +861,23 @@ WRITE8_MEMBER(e0c6s46_device::io_w) } m_prgtimer_select = data; break; + + // buzzer + case 0x74: + // d0-d2: frequency (8 steps, 4096hz to ~1170hz) + // d3: 1-shot buzzer duration 31.25ms or 62.5ms + m_bz_freq = data; + break; + case 0x75: + // d0: envelope on/off + // d1: envelope cycle selection + // d2: reset envelope + // d3: trigger one-shot buzzer + if (data & 1) + logerror("%s io_w enabled envelope, PC=$%04X\n", tag(), m_prev_pc); + m_bz_envelope = data & 3; + m_bz_1shot_on |= data & 8; + break; // read-only registers case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: diff --git a/src/emu/cpu/e0c6200/e0c6s46.h b/src/emu/cpu/e0c6200/e0c6s46.h index 9a77d4bf11e..acf5b62b41c 100644 --- a/src/emu/cpu/e0c6200/e0c6s46.h +++ b/src/emu/cpu/e0c6200/e0c6s46.h @@ -120,7 +120,7 @@ private: devcb_read8 m_read_p0, m_read_p1, m_read_p2, m_read_p3; devcb_write8 m_write_p0, m_write_p1, m_write_p2, m_write_p3; void write_r(UINT8 port, UINT8 data); - void write_r4(); + void write_r4_out(); void write_p(UINT8 port, UINT8 data); UINT8 read_p(UINT8 port); @@ -133,21 +133,20 @@ private: UINT8 m_dfk0; // timers + int m_256_src_pulse; + emu_timer *m_core_256_handle; + TIMER_CALLBACK_MEMBER(core_256_cb); + int m_watchdog_count; void clock_watchdog(); - UINT8 m_clktimer_count; - emu_timer *m_clktimer_handle; - TIMER_CALLBACK_MEMBER(clktimer_cb); + void clock_clktimer(); UINT8 m_stopwatch_on; - int m_swl_src_pulse; int m_swl_cur_pulse; int m_swl_slice; int m_swl_count; int m_swh_count; - emu_timer *m_stopwatch_handle; - TIMER_CALLBACK_MEMBER(stopwatch_cb); void clock_stopwatch(); UINT8 m_prgtimer_select; @@ -161,8 +160,19 @@ private: bool prgtimer_reset_prescaler(); void clock_prgtimer(); + UINT8 m_bz_43_on; + UINT8 m_bz_freq; + UINT8 m_bz_envelope; + UINT8 m_bz_duty_ratio; + UINT8 m_bz_1shot_on; + bool m_bz_1shot_running; + UINT8 m_bz_1shot_count; + int m_bz_pulse; emu_timer *m_buzzer_handle; TIMER_CALLBACK_MEMBER(buzzer_cb); + void schedule_buzzer(); + void reset_buzzer(); + void clock_bz_1shot(); }; diff --git a/src/emu/cpu/es5510/es5510.c b/src/emu/cpu/es5510/es5510.c index b535acba7bc..ae1a4f37c6c 100644 --- a/src/emu/cpu/es5510/es5510.c +++ b/src/emu/cpu/es5510/es5510.c @@ -180,7 +180,7 @@ typedef es5510_device::alu_op_t alu_op_t; typedef es5510_device::op_select_t op_select_t; typedef es5510_device::op_src_dst_t op_src_dst_t; -static inline const char * const REGNAME(UINT8 r) { +static inline const char * REGNAME(UINT8 r) { static char rn[8]; if (r < 234) { sprintf(rn, "GPR_%02x", r); return rn; } switch(r) { diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c index 68fe310d33b..22570346fc8 100644 --- a/src/emu/cpu/esrip/esrip.c +++ b/src/emu/cpu/esrip/esrip.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** esrip.c diff --git a/src/emu/cpu/esrip/esrip.h b/src/emu/cpu/esrip/esrip.h index 240ecef773f..f0f93d1a598 100644 --- a/src/emu/cpu/esrip/esrip.h +++ b/src/emu/cpu/esrip/esrip.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** esrip.h diff --git a/src/emu/cpu/esrip/esripdsm.c b/src/emu/cpu/esrip/esripdsm.c index c91e5398669..8e5a01ae792 100644 --- a/src/emu/cpu/esrip/esripdsm.c +++ b/src/emu/cpu/esrip/esripdsm.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** esripdsm.c diff --git a/src/emu/cpu/hmcs40/hmcs40d.c b/src/emu/cpu/hmcs40/hmcs40d.c index d01382e0b8d..4ab55866d5d 100644 --- a/src/emu/cpu/hmcs40/hmcs40d.c +++ b/src/emu/cpu/hmcs40/hmcs40d.c @@ -15,6 +15,7 @@ enum e_mnemonics { + mILL, mLAB, mLBA, mLAY, mLASPX, mLASPY, mXAMR, mLXA, mLYA, mLXI, mLYI, mIY, mDY, mAYY, mSYY, mXSP, mLAM, mLBM, mXMA, mXMB, mLMAIY, mLMADY, @@ -25,11 +26,12 @@ enum e_mnemonics mBR, mCAL, mLPU, mTBR, mRTN, mSEIE, mSEIF0, mSEIF1, mSETF, mSECF, mREIE, mREIF0, mREIF1, mRETF, mRECF, mTI0, mTI1, mTIF0, mTIF1, mTTF, mLTI, mLTA, mLAT, mRTNI, mSED, mRED, mTD, mSEDD, mREDD, mLAR, mLBR, mLRA, mLRB, mP, - mNOP, mILL + mNOP }; static const char *const s_mnemonics[] = { + "?", "LAB", "LBA", "LAY", "LASPX", "LASPY", "XAMR", "LXA", "LYA", "LXI", "LYI", "IY", "DY", "AYY", "SYY", "XSP", "LAM", "LBM", "XMA", "XMB", "LMAIY", "LMADY", @@ -40,12 +42,13 @@ static const char *const s_mnemonics[] = "BR", "CAL", "LPU", "TBR", "RTN", "SEIE", "SEIF0", "SEIF1", "SETF", "SECF", "REIE", "REIF0", "REIF1", "RETF", "RECF", "TI0", "TI1", "TIF0", "TIF1", "TTF", "LTI", "LTA", "LAT", "RTNI", "SED", "RED", "TD", "SEDD", "REDD", "LAR", "LBR", "LRA", "LRB", "P", - "NOP", "?" + "NOP" }; // number of bits per opcode parameter, 99 means (XY) parameter, negative means reversed bit-order static const INT8 s_bits[] = { + 0, 0, 0, 0, 0, 0, 4, 0, 0, -4, -4, 0, 0, 0, 0, 99, 99, 99, 99, 99, 99, 99, @@ -56,7 +59,7 @@ static const INT8 s_bits[] = 6, 6, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 4, 4, 3, 3, 3, 3, 3, - 0, 0 + 0 }; #define _OVER DASMFLAG_STEP_OVER @@ -64,6 +67,7 @@ static const INT8 s_bits[] = static const UINT32 s_flags[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -74,7 +78,7 @@ static const UINT32 s_flags[] = 0, _OVER, 0, 0, _OUT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OUT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0 + 0 }; // next program counter in sequence (relative) @@ -87,47 +91,46 @@ static const INT16 s_next_pc[0x40] = }; -#define m mILL static const UINT8 hmcs40_mnemonic[0x400] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x000 */ - mNOP, mXSP, mXSP, mXSP, mSEM, mSEM, mSEM, mSEM, mLAM, mLAM, mLAM, mLAM, m, m, m, m, + mNOP, mXSP, mXSP, mXSP, mSEM, mSEM, mSEM, mSEM, mLAM, mLAM, mLAM, mLAM, 0, 0, 0, 0, mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY, - mLBM, mLBM, mLBM, mLBM, mBLEM, m, m, m, m, m, m, m, m, m, m, m, - mAMC, m, m, m, mAM, m, m, m, m, m, m, m, mLTA, m, m, m, + mLBM, mLBM, mLBM, mLBM, mBLEM, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mAMC, 0, 0, 0, mAM, 0, 0, 0, 0, 0, 0, 0, mLTA, 0, 0, 0, /* 0x040 */ - mLXA, m, m, m, m, mDAS, mDAA, m, m, m, m, m, mREC, m, m, mSEC, - mLYA, m, m, m, mIY, m, m, m, mAYY, m, m, m, m, m, m, m, - mLBA, m, m, m, mIB, m, m, m, m, m, m, m, m, m, m, m, + mLXA, 0, 0, 0, 0, mDAS, mDAA, 0, 0, 0, 0, 0, mREC, 0, 0, mSEC, + mLYA, 0, 0, 0, mIY, 0, 0, 0, mAYY, 0, 0, 0, 0, 0, 0, 0, + mLBA, 0, 0, 0, mIB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, /* 0x080 */ mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, - mSED, m, m, m, mTD, m, m, m, m, m, m, m, m, m, m, m, - mSEIF1,mSECF, mSEIF0,m, mSEIE, mSETF, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mSED, 0, 0, 0, mTD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mSEIF1,mSECF, mSEIF0,0, mSEIE, mSETF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0c0 */ - mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, m, m, m, m, m, m, m, m, + mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, 0, 0, 0, 0, 0, 0, 0, 0, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, - mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, m, m, m, m, m, m, m, m, + mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, 0, 0, 0, 0, 0, 0, 0, 0, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x100 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mLMAIY,mLMAIY,m, m, mLMADY,mLMADY,m, m, mLAY, m, m, m, m, m, m, m, - mOR, m, m, m, mANEM, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mLMAIY,mLMAIY,0, 0, mLMADY,mLMADY,0, 0, mLAY, 0, 0, 0, 0, 0, 0, 0, + mOR, 0, 0, 0, mANEM, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x140 */ mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, /* 0x180 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mTIF1, mTI1, mTIF0, mTI0, m, mTTF, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mTIF1, mTI1, mTIF0, mTI0, 0, mTTF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1c0 */ mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, @@ -136,49 +139,48 @@ static const UINT8 hmcs40_mnemonic[0x400] = /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x200 */ - mTM, mTM, mTM, mTM, mREM, mREM, mREM, mREM, mXMA, mXMA, mXMA, mXMA, m, m, m, m, + mTM, mTM, mTM, mTM, mREM, mREM, mREM, mREM, mXMA, mXMA, mXMA, mXMA, 0, 0, 0, 0, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, - mXMB, mXMB, mXMB, mXMB, mROTR, mROTL, m, m, m, m, m, m, m, m, m, m, - mSMC, m, m, m, mALEM, m, m, m, m, m, m, m, mLAT, m, m, m, + mXMB, mXMB, mXMB, mXMB, mROTR, mROTL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mSMC, 0, 0, 0, mALEM, 0, 0, 0, 0, 0, 0, 0, mLAT, 0, 0, 0, /* 0x240 */ - mLASPX,m, m, m, mNEGA, m, m, m, m, m, m, m, m, m, m, mTC, - mLASPY,m, m, m, mDY, m, m, m, mSYY, m, m, m, m, m, m, m, - mLAB, m, m, m, m, m, m, mDB, m, m, m, m, m, m, m, m, + mLASPX,0, 0, 0, mNEGA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, mTC, + mLASPY,0, 0, 0, mDY, 0, 0, 0, mSYY, 0, 0, 0, 0, 0, 0, 0, + mLAB, 0, 0, 0, 0, 0, 0, mDB, 0, 0, 0, 0, 0, 0, 0, 0, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, /* 0x280 */ mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, - mRED, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mREIF1,mRECF, mREIF0,m, mREIE, mRETF, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mRED, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mREIF1,mRECF, mREIF0,0, mREIE, mRETF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x2c0 */ - mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, m, m, m, m, m, m, m, m, + mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, 0, 0, 0, 0, 0, 0, 0, 0, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, - mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x300 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mCOMB, m, m, m, mBNEM, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + mCOMB, 0, 0, 0, mBNEM, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x340 */ mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mTBR, mTBR, mTBR, mTBR, mTBR, mTBR, mTBR, mTBR, mP, mP, mP, mP, mP, mP, mP, mP, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x380 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, mRTNI, m, m, mRTN, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, mRTNI, 0, 0, mRTN, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x3c0 */ mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL }; -#undef m diff --git a/src/emu/cpu/i386/cycles.h b/src/emu/cpu/i386/cycles.h index e705b62b24c..a04e54da8e0 100644 --- a/src/emu/cpu/i386/cycles.h +++ b/src/emu/cpu/i386/cycles.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett #pragma once diff --git a/src/emu/cpu/i386/i386.c b/src/emu/cpu/i386/i386.c index 589941d29d2..9f6b218ed9e 100644 --- a/src/emu/cpu/i386/i386.c +++ b/src/emu/cpu/i386/i386.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett /* Intel 386 emulator diff --git a/src/emu/cpu/i386/i386.h b/src/emu/cpu/i386/i386.h index 5b2ed036b2a..237001be9ac 100644 --- a/src/emu/cpu/i386/i386.h +++ b/src/emu/cpu/i386/i386.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett #pragma once #ifndef __I386INTF_H__ diff --git a/src/emu/cpu/i386/i386dasm.c b/src/emu/cpu/i386/i386dasm.c index 281f58937a2..66ef63ed62f 100644 --- a/src/emu/cpu/i386/i386dasm.c +++ b/src/emu/cpu/i386/i386dasm.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde +// copyright-holders:Ville Linde, Peter Ferrie /* i386 Disassembler diff --git a/src/emu/cpu/i386/i386op16.inc b/src/emu/cpu/i386/i386op16.inc index 17853a83ed8..9456f8931b2 100644 --- a/src/emu/cpu/i386/i386op16.inc +++ b/src/emu/cpu/i386/i386op16.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett UINT16 i386_device::i386_shift_rotate16(UINT8 modrm, UINT32 value, UINT8 shift) { UINT32 src = value & 0xffff; diff --git a/src/emu/cpu/i386/i386op32.inc b/src/emu/cpu/i386/i386op32.inc index 18b4ab46f20..96b3baddb1c 100644 --- a/src/emu/cpu/i386/i386op32.inc +++ b/src/emu/cpu/i386/i386op32.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett UINT32 i386_device::i386_shift_rotate32(UINT8 modrm, UINT32 value, UINT8 shift) { UINT32 dst, src; diff --git a/src/emu/cpu/i386/i386ops.h b/src/emu/cpu/i386/i386ops.h index 31f6b349721..2760b9cf410 100644 --- a/src/emu/cpu/i386/i386ops.h +++ b/src/emu/cpu/i386/i386ops.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett #define OP_I386 0x1 #define OP_FPU 0x2 #define OP_I486 0x4 diff --git a/src/emu/cpu/i386/i386ops.inc b/src/emu/cpu/i386/i386ops.inc index e4c2e4634d0..291c493233b 100644 --- a/src/emu/cpu/i386/i386ops.inc +++ b/src/emu/cpu/i386/i386ops.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett UINT8 i386_device::i386_shift_rotate8(UINT8 modrm, UINT32 value, UINT8 shift) { UINT32 src = value & 0xff; diff --git a/src/emu/cpu/i386/i386priv.h b/src/emu/cpu/i386/i386priv.h index d027117d211..c7bb5d6ffb5 100644 --- a/src/emu/cpu/i386/i386priv.h +++ b/src/emu/cpu/i386/i386priv.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett #pragma once #ifndef __I386_H__ diff --git a/src/emu/cpu/i386/i486ops.inc b/src/emu/cpu/i386/i486ops.inc index 41806ff39d5..d22f6c079c3 100644 --- a/src/emu/cpu/i386/i486ops.inc +++ b/src/emu/cpu/i386/i486ops.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett // Intel 486+ specific opcodes void i386_device::i486_cpuid() // Opcode 0x0F A2 diff --git a/src/emu/cpu/i386/pentops.inc b/src/emu/cpu/i386/pentops.inc index 44269335d11..34dad95afda 100644 --- a/src/emu/cpu/i386/pentops.inc +++ b/src/emu/cpu/i386/pentops.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, Barry Rodewald, Carl, Phil Bennett +// copyright-holders:Ville Linde, Barry Rodewald, Carl, Philip Bennett, Samuele Zannoli // Pentium+ specific opcodes extern flag float32_is_nan( float32 a ); // since its not defined in softfloat.h @@ -3634,18 +3634,18 @@ void i386_device::sse_rcpps_r128_rm128() // Opcode 0f 53 { UINT8 modrm = FETCH(); if( modrm >= 0xc0 ) { - XMM((modrm >> 3) & 0x7).f[0] = 1.0 / XMM(modrm & 0x7).f[0]; - XMM((modrm >> 3) & 0x7).f[1] = 1.0 / XMM(modrm & 0x7).f[1]; - XMM((modrm >> 3) & 0x7).f[2] = 1.0 / XMM(modrm & 0x7).f[2]; - XMM((modrm >> 3) & 0x7).f[3] = 1.0 / XMM(modrm & 0x7).f[3]; + XMM((modrm >> 3) & 0x7).f[0] = 1.0f / XMM(modrm & 0x7).f[0]; + XMM((modrm >> 3) & 0x7).f[1] = 1.0f / XMM(modrm & 0x7).f[1]; + XMM((modrm >> 3) & 0x7).f[2] = 1.0f / XMM(modrm & 0x7).f[2]; + XMM((modrm >> 3) & 0x7).f[3] = 1.0f / XMM(modrm & 0x7).f[3]; } else { XMM_REG src; UINT32 ea = GetEA(modrm, 0); READXMM(ea, src); - XMM((modrm >> 3) & 0x7).f[0] = 1.0 / src.f[0]; - XMM((modrm >> 3) & 0x7).f[1] = 1.0 / src.f[1]; - XMM((modrm >> 3) & 0x7).f[2] = 1.0 / src.f[2]; - XMM((modrm >> 3) & 0x7).f[3] = 1.0 / src.f[3]; + XMM((modrm >> 3) & 0x7).f[0] = 1.0f / src.f[0]; + XMM((modrm >> 3) & 0x7).f[1] = 1.0f / src.f[1]; + XMM((modrm >> 3) & 0x7).f[2] = 1.0f / src.f[2]; + XMM((modrm >> 3) & 0x7).f[3] = 1.0f / src.f[3]; } CYCLES(1); // TODO: correct cycle count } @@ -3972,12 +3972,12 @@ void i386_device::sse_rcpss_r128_r128m32() // Opcode f3 0f 53 { UINT8 modrm = FETCH(); if( modrm >= 0xc0 ) { - XMM((modrm >> 3) & 0x7).f[0] = 1.0 / XMM(modrm & 0x7).f[0]; + XMM((modrm >> 3) & 0x7).f[0] = 1.0f / XMM(modrm & 0x7).f[0]; } else { XMM_REG s; UINT32 ea = GetEA(modrm, 0); s.d[0]=READ32(ea); - XMM((modrm >> 3) & 0x7).f[0] = 1.0 / s.f[0]; + XMM((modrm >> 3) & 0x7).f[0] = 1.0f / s.f[0]; } CYCLES(1); // TODO: correct cycle count } diff --git a/src/emu/cpu/i386/x87ops.inc b/src/emu/cpu/i386/x87ops.inc index c057138cb44..9306a7a5727 100644 --- a/src/emu/cpu/i386/x87ops.inc +++ b/src/emu/cpu/i386/x87ops.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Phil Bennett +// copyright-holders:Philip Bennett /*************************************************************************** x87 FPU emulation diff --git a/src/emu/cpu/i8089/i8089.c b/src/emu/cpu/i8089/i8089.c index dd1726a6ebe..23b25d891a0 100644 --- a/src/emu/cpu/i8089/i8089.c +++ b/src/emu/cpu/i8089/i8089.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Dirk Best +// copyright-holders:Dirk Best,Carl /*************************************************************************** Intel 8089 I/O Processor diff --git a/src/emu/cpu/i8089/i8089.h b/src/emu/cpu/i8089/i8089.h index e97bc5f18ad..f40607bdc7c 100644 --- a/src/emu/cpu/i8089/i8089.h +++ b/src/emu/cpu/i8089/i8089.h @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Dirk Best +// copyright-holders:Dirk Best,Carl /*************************************************************************** Intel 8089 I/O Processor diff --git a/src/emu/cpu/i8089/i8089_channel.c b/src/emu/cpu/i8089/i8089_channel.c index 3d7deb5faff..171a7ce0d24 100644 --- a/src/emu/cpu/i8089/i8089_channel.c +++ b/src/emu/cpu/i8089/i8089_channel.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Dirk Best +// copyright-holders:Dirk Best,Carl /*************************************************************************** Intel 8089 I/O Processor diff --git a/src/emu/cpu/i8089/i8089_channel.h b/src/emu/cpu/i8089/i8089_channel.h index be11553378b..9b4034603e5 100644 --- a/src/emu/cpu/i8089/i8089_channel.h +++ b/src/emu/cpu/i8089/i8089_channel.h @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Dirk Best +// copyright-holders:Dirk Best,Carl /*************************************************************************** Intel 8089 I/O Processor diff --git a/src/emu/cpu/i8089/i8089_ops.c b/src/emu/cpu/i8089/i8089_ops.c index 040e6120594..09c8f5cd037 100644 --- a/src/emu/cpu/i8089/i8089_ops.c +++ b/src/emu/cpu/i8089/i8089_ops.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Dirk Best +// copyright-holders:Dirk Best,Carl /*************************************************************************** Intel 8089 I/O Processor diff --git a/src/emu/cpu/i860/i860.c b/src/emu/cpu/i860/i860.c index 961d68b1fc1..5023fa65c60 100644 --- a/src/emu/cpu/i860/i860.c +++ b/src/emu/cpu/i860/i860.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jason Eckhardt /*************************************************************************** @@ -7,11 +7,6 @@ Interface file for the Intel i860 emulator. Copyright (C) 1995-present Jason Eckhardt (jle@rice.edu) - Released for general non-commercial use under the MAME license - with the additional requirement that you are free to use and - redistribute this code in modified or unmodified form, provided - you list me in the credits. - Visit http://mamedev.org for licensing and usage restrictions. ***************************************************************************/ diff --git a/src/emu/cpu/i860/i860.h b/src/emu/cpu/i860/i860.h index 146b38ff9a3..f44901406ee 100644 --- a/src/emu/cpu/i860/i860.h +++ b/src/emu/cpu/i860/i860.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jason Eckhardt /*************************************************************************** @@ -7,11 +7,6 @@ Interface file for the Intel i860 emulator. Copyright (C) 1995-present Jason Eckhardt (jle@rice.edu) - Released for general non-commercial use under the MAME license - with the additional requirement that you are free to use and - redistribute this code in modified or unmodified form, provided - you list me in the credits. - Visit http://mamedev.org for licensing and usage restrictions. ***************************************************************************/ diff --git a/src/emu/cpu/i860/i860dasm.c b/src/emu/cpu/i860/i860dasm.c index 0add148192d..60c83a5fec0 100644 --- a/src/emu/cpu/i860/i860dasm.c +++ b/src/emu/cpu/i860/i860dasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jason Eckhardt #include "i860.h" diff --git a/src/emu/cpu/i860/i860dec.inc b/src/emu/cpu/i860/i860dec.inc index 9a3af87b783..d0943c9e5a6 100644 --- a/src/emu/cpu/i860/i860dec.inc +++ b/src/emu/cpu/i860/i860dec.inc @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jason Eckhardt /*************************************************************************** @@ -7,11 +7,6 @@ Execution engine for the Intel i860 emulator. Copyright (C) 1995-present Jason Eckhardt (jle@rice.edu) - Released for general non-commercial use under the MAME license - with the additional requirement that you are free to use and - redistribute this code in modified or unmodified form, provided - you list me in the credits. - Visit http://mamedev.org for licensing and usage restrictions. ***************************************************************************/ @@ -3365,7 +3360,7 @@ void i860_cpu_device::insn_frcp (UINT32 insn) { float v = get_fregval_s (fsrc2); float res; - if (v == 0.0) + if (v == 0.0f) { /* Generate source-exception trap if fsrc2 is 0. */ if (0 /* GET_FSR_FTE () */) @@ -3448,7 +3443,7 @@ void i860_cpu_device::insn_frsqr (UINT32 insn) { float v = get_fregval_s (fsrc2); float res; - if (v == 0.0 || v < 0.0) + if (v == 0.0f || v < 0.0f) { /* Generate source-exception trap if fsrc2 is 0 or negative. */ if (0 /* GET_FSR_FTE () */) @@ -3463,7 +3458,8 @@ void i860_cpu_device::insn_frsqr (UINT32 insn) { SET_FSR_SE (0); *((UINT32 *)&v) &= 0xffff8000; - res = (float)1.0/sqrt (v); + // FIXME: shouldn't this be 1.0f / sqrtf(v) ? + res = (float) (1.0/sqrt (v)); *((UINT32 *)&res) &= 0xffff8000; if (res_prec) set_fregval_d (fdest, (double)res); diff --git a/src/emu/cpu/i860/i860dis.c b/src/emu/cpu/i860/i860dis.c index d24f58bb875..1c72a9f474d 100644 --- a/src/emu/cpu/i860/i860dis.c +++ b/src/emu/cpu/i860/i860dis.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jason Eckhardt /*************************************************************************** @@ -7,11 +7,6 @@ Disassembler for the Intel i860 emulator. Copyright (C) 1995-present Jason Eckhardt (jle@rice.edu) - Released for general non-commercial use under the MAME license - with the additional requirement that you are free to use and - redistribute this code in modified or unmodified form, provided - you list me in the credits. - Visit http://mamedev.org for licensing and usage restrictions. ***************************************************************************/ diff --git a/src/emu/cpu/m6502/m3745x.c b/src/emu/cpu/m6502/m3745x.c index 1dae4faf99e..f405a445c60 100644 --- a/src/emu/cpu/m6502/m3745x.c +++ b/src/emu/cpu/m6502/m3745x.c @@ -476,7 +476,7 @@ WRITE8_MEMBER(m3745x_device::adc_w) // starting a conversion? this takes 50 cycles. if (!(m_adctrl & ADCTRL_COMPLETE)) { - double hz = (double)clock() / 50.0f; + double hz = (double)clock() / 50.0; m_timers[TIMER_ADC]->adjust(attotime::from_hz(hz)); } break; diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index 425e3f41c5e..3cb68924929 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*** m6800: Portable 6800 class emulator ************************************* m68xx.c diff --git a/src/emu/cpu/m6800/m6800.h b/src/emu/cpu/m6800/m6800.h index 6695ef944fa..1f7d668861b 100644 --- a/src/emu/cpu/m6800/m6800.h +++ b/src/emu/cpu/m6800/m6800.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*** m6800: Portable 6800 class emulator *************************************/ #pragma once diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index 6b5b7bc0ed9..8df8c9416ac 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*** m6805: Portable 6805 emulator ****************************************** m6805.c (Also supports hd68705 and hd63705 variants) diff --git a/src/emu/cpu/m6805/m6805.h b/src/emu/cpu/m6805/m6805.h index d8301e203df..26bccefbd15 100644 --- a/src/emu/cpu/m6805/m6805.h +++ b/src/emu/cpu/m6805/m6805.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*** m6805: Portable 6805 emulator ******************************************/ #pragma once diff --git a/src/emu/cpu/melps4/m58846.c b/src/emu/cpu/melps4/m58846.c new file mode 100644 index 00000000000..5d6829c971f --- /dev/null +++ b/src/emu/cpu/melps4/m58846.c @@ -0,0 +1,166 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Mitsubishi M58846 MCU + + TODO: + - o hai + +*/ + +#include "m58846.h" +#include "debugger.h" + + + +const device_type M58846 = &device_creator<m58846_device>; + + +// internal memory maps +static ADDRESS_MAP_START(program_2kx9, AS_PROGRAM, 16, m58846_device) + AM_RANGE(0x0000, 0x07ff) AM_ROM +ADDRESS_MAP_END + + +static ADDRESS_MAP_START(data_128x4, AS_DATA, 8, m58846_device) + AM_RANGE(0x00, 0x7f) AM_RAM +ADDRESS_MAP_END + + +// device definitions +m58846_device::m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : melps4_cpu_device(mconfig, M58846, "M58846", tag, owner, clock, 11, ADDRESS_MAP_NAME(program_2kx9), 7, ADDRESS_MAP_NAME(data_128x4), "m58846", __FILE__) +{ } + + +// disasm +offs_t m58846_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +{ + extern CPU_DISASSEMBLE(m58846); + return CPU_DISASSEMBLE_NAME(m58846)(this, buffer, pc, oprom, opram, options); +} + + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void m58846_device::device_start() +{ + melps4_cpu_device::device_start(); + + // set fixed state + m_bm_page = 2; + m_int_page = 1; +} + + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void m58846_device::device_reset() +{ + melps4_cpu_device::device_reset(); +} + + + +//------------------------------------------------- +// execute +//------------------------------------------------- + +void m58846_device::execute_one() +{ + // handle one opcode + switch (m_op & 0xf0) + { + case 0x30: op_sey(); break; + case 0x70: op_sp(); break; + case 0xa0: op_a(); break; + case 0xb0: op_la(); break; + + case 0xc0: case 0xd0: case 0xe0: case 0xf0: op_lxy(); break; + + default: + switch (m_op & 0xfc) + { + case 0x20: op_szb(); break; + case 0x4c: op_sb(); break; + case 0x58: op_szk(); break; + case 0x5c: op_rb(); break; + case 0x60: op_xam(); break; + case 0x64: op_tam(); break; + case 0x68: op_xamd(); break; + case 0x6c: op_xami(); break; + + default: + switch (m_op) + { + case 0x06: case 0x07: op_su(); break; + case 0x40: case 0x41: op_lcps(); break; + case 0x4a: case 0x4b: op_lz(); break; + case 0x54: case 0x55: op_ias(); break; + + case 0x00: op_nop(); break; + case 0x01: op_ba(); break; + case 0x02: op_iny(); break; + case 0x03: op_dey(); break; + case 0x04: op_di(); break; + case 0x05: op_ei(); break; + case 0x0a: op_am(); break; + case 0x0b: op_ose(); break; + case 0x0c: op_tya(); break; + case 0x0f: op_cma(); break; + + case 0x10: op_cls(); break; + case 0x11: op_clds(); break; + case 0x13: op_cld(); break; + case 0x14: op_rd(); break; + case 0x15: op_sd(); break; + case 0x16: op_tepa(); break; + case 0x17: op_ospa(); break; + case 0x1a: op_teab(); break; + case 0x1b: op_osab(); break; + case 0x1c: op_tba(); break; + case 0x1d: op_tay(); break; + case 0x1e: op_tab(); break; + + case 0x26: op_seam(); break; + case 0x2b: op_szd(); break; + case 0x2f: op_szc(); break; + + case 0x43: op_amc(); break; + case 0x44: op_rt(); break; + case 0x45: op_rts(); break; + case 0x46: op_rti(); break; + case 0x48: op_rc(); break; + case 0x49: op_sc(); break; + + case 0x53: op_amcs(); break; + case 0x57: op_iak(); break; + + case 0x81: op_ofa(); break; + case 0x82: op_snz1(); break; + case 0x83: op_snz2(); break; + case 0x84: op_oga(); break; + case 0x85: op_t2ab(); break; + case 0x86: op_tva(); break; + case 0x8a: op_tab2(); break; + case 0x8c: op_iaf(); break; + + default: + melps4_cpu_device::execute_one(); + break; + + } + break; // 0xff + + } + break; // 0xfc + + } // big switch +} diff --git a/src/emu/cpu/melps4/m58846.h b/src/emu/cpu/melps4/m58846.h new file mode 100644 index 00000000000..cf37aeb5e8c --- /dev/null +++ b/src/emu/cpu/melps4/m58846.h @@ -0,0 +1,37 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Mitsubishi M58846 MCU + +*/ + +#ifndef _M58846_H_ +#define _M58846_H_ + +#include "melps4.h" + + +class m58846_device : public melps4_cpu_device +{ +public: + m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // device_execute_interface overrides + virtual void execute_one(); + + // device_disasm_interface overrides + virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); +}; + + + +extern const device_type M58846; + + +#endif /* _M58846_H_ */ diff --git a/src/emu/cpu/melps4/melps4.c b/src/emu/cpu/melps4/melps4.c new file mode 100644 index 00000000000..cdb7ec2da89 --- /dev/null +++ b/src/emu/cpu/melps4/melps4.c @@ -0,0 +1,200 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Mitsubishi MELPS 4 MCU family cores + + Known types and their features: + (* means not emulated yet) + + *M58840: 42-pin DIL, 2Kx9 ROM, 128x4 RAM, A/D converter + *M58841: almost same as M58840 + *M58842: 64-pin DIL, external ROM(11-bit PC), rest is same as M58840 + *M58843: 28-pin DIL, 1Kx9 ROM, 64x4 RAM, A/D converter + *M58844: almost same as M58843 + *M58845: 42-pin DIL, 2Kx9 ROM, 128x4 RAM, A/D converter, 2 timers + M58846: 42-pin DIL, 2Kx9 ROM, 128x4 RAM, 2 timers(not same as M58845), extra I/O ports + *M58847: 40-pin DIL, 2Kx9 ROM, 128x4 RAM, extra I/O ports(not same as M58846) + + MELPS 41/42 subfamily: + + *M58494: 72-pin QFP CMOS, 4Kx10 ROM, 32x4 internal + 4Kx4 external RAM, 2 timers + *M58496: 72-pin QFP CMOS, 2Kx10 ROM, 128x4 internal + 256x4 external RAM, 1 timer, low-power + *M58497: almost same as M58496 + + + References: + - 1982 Mitsubishi LSI Data Book + +*/ + +#include "melps4.h" +#include "debugger.h" + +#include "melps4op.inc" + + +// disasm +void melps4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) +{ + switch (entry.index()) + { + // obviously not from a single flags register, letters are made up + case STATE_GENFLAGS: + strprintf(str, "%c%c%c%c", + m_intp ? 'P':'p', + m_inte ? 'I':'i', + m_cps ? 'D':'d', + m_cy ? 'C':'c' + ); + break; + + default: break; + } +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +enum +{ + MELPS4_PC=1, MELPS4_A, MELPS4_B, MELPS4_E, + MELPS4_Y, MELPS4_X, MELPS4_Z, + MELPS4_H, MELPS4_L, MELPS4_C, MELPS4_V, MELPS4_W +}; + +void melps4_cpu_device::device_start() +{ + m_program = &space(AS_PROGRAM); + m_data = &space(AS_DATA); + m_prgmask = (1 << m_prgwidth) - 1; + m_datamask = (1 << m_datawidth) - 1; + + // zerofill + m_pc = 0; + m_prev_pc = 0; + memset(m_stack, 0, sizeof(m_stack)); + m_op = 0; + m_prev_op = 0; + + m_cps = 0; + m_skip = false; + m_inte = 0; + m_intp = 1; + + m_a = 0; + m_b = 0; + m_e = 0; + m_y = m_y2 = 0; + m_x = m_x2 = 0; + m_z = m_z2 = 0; + m_cy = m_cy2 = 0; + + m_h = 0; + m_l = 0; + m_c = 7; + m_v = 0; + m_w = 0; + + // register for savestates + save_item(NAME(m_pc)); + save_item(NAME(m_prev_pc)); + save_item(NAME(m_stack)); + save_item(NAME(m_op)); + save_item(NAME(m_prev_op)); + + save_item(NAME(m_cps)); + save_item(NAME(m_skip)); + save_item(NAME(m_inte)); + save_item(NAME(m_intp)); + + save_item(NAME(m_a)); + save_item(NAME(m_b)); + save_item(NAME(m_e)); + save_item(NAME(m_y)); save_item(NAME(m_y2)); + save_item(NAME(m_x)); save_item(NAME(m_x2)); + save_item(NAME(m_z)); save_item(NAME(m_z2)); + save_item(NAME(m_cy)); save_item(NAME(m_cy2)); + + save_item(NAME(m_h)); + save_item(NAME(m_l)); + save_item(NAME(m_c)); + save_item(NAME(m_v)); + save_item(NAME(m_w)); + + // register state for debugger + state_add(STATE_GENPC, "curpc", m_pc).formatstr("%04X").noshow(); + state_add(STATE_GENFLAGS, "GENFLAGS", m_cy).formatstr("%4s").noshow(); + + state_add(MELPS4_PC, "PC", m_pc).formatstr("%04X"); + state_add(MELPS4_A, "A", m_a).formatstr("%2d"); // show in decimal + state_add(MELPS4_B, "B", m_b).formatstr("%2d"); // " + state_add(MELPS4_E, "E", m_e).formatstr("%02X"); + state_add(MELPS4_Y, "Y", m_y).formatstr("%1X"); + state_add(MELPS4_X, "X", m_x).formatstr("%1d"); + state_add(MELPS4_Z, "Z", m_z).formatstr("%1d"); + + state_add(MELPS4_H, "H", m_h).formatstr("%1X"); + state_add(MELPS4_L, "L", m_l).formatstr("%1X"); + state_add(MELPS4_C, "C", m_c).formatstr("%1X"); + state_add(MELPS4_V, "V", m_v).formatstr("%1X"); + state_add(MELPS4_W, "W", m_w).formatstr("%1X"); + + m_icountptr = &m_icount; +} + + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void melps4_cpu_device::device_reset() +{ + m_op = m_prev_op = 0; + m_pc = m_prev_pc = 0; + m_inte = 0; + m_intp = 1; + op_lcps(); // CPS=0 + + m_v = 0; + m_w = 0; +} + + + +//------------------------------------------------- +// execute +//------------------------------------------------- + +void melps4_cpu_device::execute_one() +{ + // B is at $18x and BM is at $10x for all MCU types + if (m_op >= 0x180) + op_b(); + else if (m_op >= 0x100) + op_bm(); + else + op_illegal(); +} + +void melps4_cpu_device::execute_run() +{ + while (m_icount > 0) + { + // remember previous state + m_prev_op = m_op; + m_prev_pc = m_pc; + + // fetch next opcode + debugger_instruction_hook(this, m_pc); + m_icount--; + m_op = m_program->read_word(m_pc << 1) & 0x1ff; + m_pc = (m_pc & ~0x7f) | ((m_pc + 1) & 0x7f); // stays in the same page + + // handle opcode if it's not skipped + execute_one(); + } +} diff --git a/src/emu/cpu/melps4/melps4.h b/src/emu/cpu/melps4/melps4.h new file mode 100644 index 00000000000..acb861e206d --- /dev/null +++ b/src/emu/cpu/melps4/melps4.h @@ -0,0 +1,205 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Mitsubishi MELPS 4 MCU family cores + +*/ + +#ifndef _MELPS4_H_ +#define _MELPS4_H_ + +#include "emu.h" + + +class melps4_cpu_device : public cpu_device +{ +public: + // construction/destruction + melps4_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source) + : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) + , m_program_config("program", ENDIANNESS_LITTLE, 16, prgwidth, -1, program) + , m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data) + , m_prgwidth(prgwidth) + , m_datawidth(datawidth) + , m_stack_levels(3) + , m_bm_page(14) + , m_int_page(12) + , m_xami_mask(0) + { } + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // device_execute_interface overrides + virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 6 - 1) / 6; } // 6 t-states per machine cycle + virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 6); } // " + virtual UINT32 execute_min_cycles() const { return 1; } + virtual UINT32 execute_max_cycles() const { return 1; } + virtual UINT32 execute_input_lines() const { return 3; } // up to 3 (some internal) + virtual void execute_run(); + virtual void execute_one(); + + // device_memory_interface overrides + virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); } + + // device_disasm_interface overrides + virtual UINT32 disasm_min_opcode_bytes() const { return 2; } + virtual UINT32 disasm_max_opcode_bytes() const { return 2; } + virtual void state_string_export(const device_state_entry &entry, std::string &str); + + address_space_config m_program_config; + address_space_config m_data_config; + address_space *m_program; + address_space *m_data; + + int m_icount; + + // fixed settings or mask options + int m_prgwidth; // number of bits and bitmask for ROM/RAM size + int m_datawidth; // " + int m_prgmask; // " + int m_datamask; // " + + UINT8 m_stack_levels; // 3 levels on MELPS 4, 12 levels on MELPS 41/42 + UINT8 m_bm_page; // short BM default page: 14 on '40 to '44, 2 on '45,'46, 0 on '47 + UINT8 m_int_page; // interrupt routine page: 12 on '40 to '44, 1 on '45,'46, 2 on '47 + UINT8 m_xami_mask; // mask option for XAMI opcode on '40,'41,'45 (0 for others) + + // internal state, misc regs + UINT16 m_pc; // program counter (11 or 10-bit) + UINT16 m_prev_pc; + UINT16 m_stack[12]; // callstack + UINT16 m_op; + UINT16 m_prev_op; + + UINT8 m_cps; // DP,CY or DP',CY' selected + bool m_skip; // skip next opcode + UINT8 m_inte; // interrupt enable flag + UINT8 m_intp; // external interrupt polarity ('40 to '44) + + // work registers (unless specified, each is 4-bit) + UINT8 m_a; // accumulator + UINT8 m_b; // generic + UINT8 m_e; // 8-bit register, hold data for S output + UINT8 m_y, m_y2; // RAM index Y, Y' (Z.XX.YYYY is DP aka Data Pointer) + UINT8 m_x, m_x2; // RAM index X, X', 2-bit + UINT8 m_z, m_z2; // RAM index Z, Z', 1-bit, optional + UINT8 m_cy, m_cy2; // carry flag(s) + + UINT8 m_h; // A/D converter H or generic + UINT8 m_l; // A/D converter L or generic + UINT8 m_c; // A/D converter counter + UINT8 m_v; // timer control V + UINT8 m_w; // timer control W + + // misc internal helpers + UINT8 ram_r(); + void ram_w(UINT8 data); + void pop_pc(); + void push_pc(); + + // opcode handlers + void op_tab(); + void op_tba(); + void op_tay(); + void op_tya(); + void op_teab(); + void op_tepa(); + void op_txa(); + void op_tax(); + + void op_lxy(); + void op_lz(); + void op_iny(); + void op_dey(); + void op_lcps(); + void op_sadr(); + + void op_tam(); + void op_xam(); + void op_xamd(); + void op_xami(); + + void op_la(); + void op_am(); + void op_amc(); + void op_amcs(); + void op_a(); + void op_sc(); + void op_rc(); + void op_szc(); + void op_cma(); + + void op_sb(); + void op_rb(); + void op_szb(); + + void op_seam(); + void op_sey(); + + void op_tla(); + void op_tha(); + void op_taj(); + void op_xal(); + void op_xah(); + void op_lc7(); + void op_dec(); + void op_shl(); + void op_rhl(); + void op_cpa(); + void op_cpas(); + void op_cpae(); + void op_szj(); + + void op_t1ab(); + void op_trab(); + void op_t2ab(); + void op_tab1(); + void op_tabr(); + void op_tab2(); + void op_tva(); + void op_twa(); + void op_snz1(); + void op_snz2(); + + void op_ba(); + void op_sp(); + void op_b(); + void op_bm(); + + void op_rt(); + void op_rts(); + void op_rti(); + + void op_cld(); + void op_cls(); + void op_clds(); + void op_sd(); + void op_rd(); + void op_szd(); + void op_osab(); + void op_ospa(); + void op_ose(); + void op_ias(); + void op_ofa(); + void op_iaf(); + void op_oga(); + void op_iak(); + void op_szk(); + void op_su(); + + void op_ei(); + void op_di(); + void op_inth(); + void op_intl(); + + void op_nop(); + void op_illegal(); +}; + + + +#endif /* _MELPS4_H_ */ diff --git a/src/emu/cpu/melps4/melps4d.c b/src/emu/cpu/melps4/melps4d.c new file mode 100644 index 00000000000..c38b4b54004 --- /dev/null +++ b/src/emu/cpu/melps4/melps4d.c @@ -0,0 +1,141 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Mitsubishi MELPS 4 MCU family disassembler + + Not counting the extra opcodes for peripherals (eg. timers, A/D), + each MCU in the series has small differences in the opcode map. + +*/ + +#include "emu.h" +#include "debugger.h" +#include "melps4.h" + + +// opcode mnemonics +enum e_mnemonics +{ + em_ILL, + em_TAB, em_TBA, em_TAY, em_TYA, em_TEAB, em_TEPA, em_TXA, em_TAX, + em_LXY, em_LZ, em_INY, em_DEY, em_LCPS, em_SADR, + em_TAM, em_XAM, em_XAMD, em_XAMI, + em_LA, em_AM, em_AMC, em_AMCS, em_A, em_SC, em_RC, em_SZC, em_CMA, + em_SB, em_RB, em_SZB, em_SEAM, em_SEY, + em_TLA, em_THA, em_TAJ, em_XAL, em_XAH, em_LC7, em_DEC, em_SHL, em_RHL, em_CPA, em_CPAS, em_CPAE, em_SZJ, + em_T1AB, em_TRAB, em_T2AB, em_TAB1, em_TABR, em_TAB2, em_TVA, em_TWA, em_SNZ1, em_SNZ2, + em_BA, em_SP, em_B, em_BM, em_RT, em_RTS, em_RTI, + em_CLD, em_CLS, em_CLDS, em_SD, em_RD, em_SZD, em_OSAB, em_OSPA, em_OSE, em_IAS, em_OFA, em_IAF, em_OGA, em_IAK, em_SZK, em_SU, em_RU, + em_EI, em_DI, em_INTH, em_INTL, em_NOP +}; + +static const char *const em_name[] = +{ + "?", + "TAB", "TBA", "TAY", "TYA", "TEAB", "TEPA", "TXA", "TAX", + "LXY", "LZ", "INY", "DEY", "LCPS", "SADR", + "TAM", "XAM", "XAMD", "XAMI", + "LA", "AM", "AMC", "AMCS", "A", "SC", "RC", "SZC", "CMA", + "SB", "RB", "SZB", "SEAM", "SEY", + "TLA", "THA", "TAJ", "XAL", "XAH", "LC7", "DEC", "SHL", "RHL", "CPA", "CPAS", "CPAE", "SZJ", + "T1AB", "TRAB", "T2AB", "TAB1", "TABR", "TAB2", "TVA", "TWA", "SNZ1", "SNZ2", + "BA", "SP", "B", "BM", "RT", "RTS", "RTI", + "CLD", "CLS", "CLDS", "SD", "RD", "SZD", "OSAB", "OSPA", "OSE", "IAS", "OFA", "IAF", "OGA", "IAK", "SZK", "SU", "RU", + "EI", "DI", "INTH", "INTL", "NOP" +}; + +// number of bits per opcode parameter +static const UINT8 em_bits[] = +{ + 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 6, 1, 0, 0, 1, 2, + 2, 2, 2, 2, + 4, 0, 0, 0, 4, 0, 0, 0, 0, + 2, 2, 2, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 7, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0 +}; + +#define _OVER DASMFLAG_STEP_OVER +#define _OUT DASMFLAG_STEP_OUT + +static const UINT32 em_flags[] = +{ + 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, _OVER, _OUT, _OUT, _OUT, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0 +}; + + + +// M58846 disasm + +static const UINT8 m58846_opmap[0xc0] = +{ +// 0 1 2 3 4 5 6 7 8 9 A B C D E F + em_NOP, em_BA, em_INY, em_DEY, em_DI, em_EI, em_RU, em_SU, 0, 0, em_AM, em_OSE, em_TYA, 0, 0, em_CMA, // 0x + em_CLS, em_CLDS, 0, em_CLD, em_RD, em_SD, em_TEPA, em_OSPA, 0, 0, em_TEAB, em_OSAB, em_TBA, em_TAY, em_TAB, 0, // 1x + em_SZB, em_SZB, em_SZB, em_SZB, 0, 0, em_SEAM, 0, 0, 0, 0, em_SZD, 0, 0, 0, em_SZC, // 2x + em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, em_SEY, // 3x + em_LCPS, em_LCPS, 0, em_AMC, em_RT, em_RTS, em_RTI, 0, em_RC, em_SC, em_LZ, em_LZ, em_SB, em_SB, em_SB, em_SB, // 4x + 0, 0, 0, em_AMCS, em_IAS, em_IAS, 0, em_IAK, em_SZK, em_SZK, em_SZK, em_SZK, em_RB, em_RB, em_RB, em_RB, // 5x + em_XAM, em_XAM, em_XAM, em_XAM, em_TAM, em_TAM, em_TAM, em_TAM, em_XAMD, em_XAMD, em_XAMD, em_XAMD, em_XAMI, em_XAMI, em_XAMI, em_XAMI, // 6x + em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, em_SP, // 7x + 0, em_OFA, em_SNZ1, em_SNZ2, em_OGA, em_T2AB, em_TVA, 0, 0, 0, em_TAB2, 0, em_IAF, 0, 0, 0, // 8x + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x + em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, em_A, // Ax + em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA, em_LA // Bx +}; + +CPU_DISASSEMBLE(m58846) +{ + UINT16 op = (oprom[0] | oprom[1] << 8) & 0x1ff; + char *dst = buffer; + + // get opcode + UINT8 instr; + if (op >= 0x180) + instr = em_B; + else if (op >= 0x100) + instr = em_BM; + else if (op >= 0xc0) + instr = em_LXY; + else + instr = m58846_opmap[op]; + + dst += sprintf(dst, "%-6s", em_name[instr]); + + // get immediate param + UINT8 bits = em_bits[instr]; + + // special case for LXY x,y + if (instr == em_LXY) + { + UINT8 x = op >> 4 & 3; + UINT8 y = op & 0xf; + dst += sprintf(dst, " %d,%d", x, y); + } + else if (bits > 0) + { + UINT8 param = op & ((1 << bits) - 1); + if (bits > 4) + dst += sprintf(dst, " $%02X", param); + else + dst += sprintf(dst, " %d", param); + } + + return 1 | em_flags[instr] | DASMFLAG_SUPPORTED; +} diff --git a/src/emu/cpu/melps4/melps4op.inc b/src/emu/cpu/melps4/melps4op.inc new file mode 100644 index 00000000000..21c783e546c --- /dev/null +++ b/src/emu/cpu/melps4/melps4op.inc @@ -0,0 +1,624 @@ +// license:BSD-3-Clause +// copyright-holders:hap + +// MELPS 4 opcode handlers + +// internal helpers + +inline UINT8 melps4_cpu_device::ram_r() +{ + UINT8 address = (m_z << 6 | m_x << 4 | m_y) & m_datamask; + return m_data->read_byte(address) & 0xf; +} + +inline void melps4_cpu_device::ram_w(UINT8 data) +{ + UINT8 address = (m_z << 6 | m_x << 4 | m_y) & m_datamask; + m_data->write_byte(address, data & 0xf); +} + +void melps4_cpu_device::pop_pc() +{ +} + +void melps4_cpu_device::push_pc() +{ +} + + +// Register-to-register transfers + +void melps4_cpu_device::op_tab() +{ + // TAB: transfer B to A + m_a = m_b; +} + +void melps4_cpu_device::op_tba() +{ + // TBA: transfer A to B + m_b = m_a; +} + +void melps4_cpu_device::op_tay() +{ + // TAY: transfer Y to A + m_a = m_y; +} + +void melps4_cpu_device::op_tya() +{ + // TYA: transfer A to Y + m_y = m_a; +} + +void melps4_cpu_device::op_teab() +{ + // TEAB: transfer A and B to E + m_e = m_b << 4 | m_a; +} + +void melps4_cpu_device::op_tepa() +{ + // TEPA: decode A by PLA and transfer to E + op_illegal(); +} + +void melps4_cpu_device::op_txa() +{ + // TXA: transfer bits 0,1 of A to X, inverted bit 2 to Z, inverted bit 3 to carry + op_illegal(); +} + +void melps4_cpu_device::op_tax() +{ + // TAX: transfer X to bits 0,1 of A, inverted Z to bit 2, inverted carry to bit 3 + op_illegal(); +} + + +// RAM addresses + +void melps4_cpu_device::op_lxy() +{ + // LXY x,y: load immediate into X,Y, skip any next LXY + if ((m_op & ~0x3f) != (m_prev_op & ~0x3f)) + { + m_x = m_op >> 4 & 3; + m_y = m_op & 0xf; + } +} + +void melps4_cpu_device::op_lz() +{ + // LZ z: load immediate into Z + m_z = m_op & 1; +} + +void melps4_cpu_device::op_iny() +{ + // INY: increment Y, skip next on overflow + m_y = (m_y + 1) & 0xf; + m_skip = (m_y == 0); +} + +void melps4_cpu_device::op_dey() +{ + // DEY: decrement Y, skip next on overflow + m_y = (m_y - 1) & 0xf; + m_skip = (m_y == 0xf); +} + +void melps4_cpu_device::op_lcps() +{ + // LCPS i: choose active DP,CY or DP',CY' + if ((m_op & 1) != m_cps) + { + m_cps = m_op & 1; + + // swap registers + UINT8 x, y, z, cy; + x = m_x; + y = m_y; + z = m_z; + cy = m_cy; + + m_x = m_x2; + m_y = m_y2; + m_z = m_z2; + m_cy = m_cy2; + + m_x2 = x; + m_y2 = y; + m_z2 = z; + m_cy2 = cy; + } +} + +void melps4_cpu_device::op_sadr() +{ + // SADR j: .. + op_illegal(); +} + + +// RAM-accumulator transfers + +void melps4_cpu_device::op_tam() +{ + // TAM j: transfer RAM to A, xor X with j + m_a = ram_r(); + m_x ^= m_op & 3; +} + +void melps4_cpu_device::op_xam() +{ + // XAM j: exchange RAM with A, xor X with j + UINT8 a = m_a; + m_a = ram_r(); + ram_w(a); + m_x ^= m_op & 3; +} + +void melps4_cpu_device::op_xamd() +{ + // XAMD j: XAM J, DEY + op_xam(); + op_dey(); +} + +void melps4_cpu_device::op_xami() +{ + // XAMI j: XAM J, INY, skip next on Y=mask(default 0) + op_xam(); + op_iny(); + m_skip = (m_y == m_xami_mask); +} + + +// Arithmetic Operations + +void melps4_cpu_device::op_la() +{ + // LA n: load immediate into A, skip any next LA + if ((m_op & ~0xf) != (m_prev_op & ~0xf)) + m_a = m_op & 0xf; +} + +void melps4_cpu_device::op_am() +{ + // AM: add RAM to A + m_a = (m_a + ram_r()) & 0xf; +} + +void melps4_cpu_device::op_amc() +{ + // AMC: add RAM+CY to A and CY + m_a += ram_r() + m_cy; + m_cy = m_a >> 4 & 1; + m_a &= 0xf; +} + +void melps4_cpu_device::op_amcs() +{ + // AMCS: AMC, skip next on carry + op_amc(); + m_skip = (m_cy != 0); +} + +void melps4_cpu_device::op_a() +{ + // A n: add immediate to A, skip next on no carry (except when n=6) + UINT8 n = m_op & 0xf; + m_a += n; + m_skip = !(m_a & 0x10 || n == 6); + m_a &= 0xf; +} + +void melps4_cpu_device::op_sc() +{ + // SC: set carry + m_cy = 1; +} + +void melps4_cpu_device::op_rc() +{ + // RC: reset carry + m_cy = 0; +} + +void melps4_cpu_device::op_szc() +{ + // SZC: skip next on no carry + m_skip = !m_cy; +} + +void melps4_cpu_device::op_cma() +{ + // CMA: complement A + m_a ^= 0xf; +} + + +// Bit operations + +void melps4_cpu_device::op_sb() +{ + // SB j: set RAM bit + UINT8 mask = 1 << (m_op & 3); + ram_w(ram_r() | mask); +} + +void melps4_cpu_device::op_rb() +{ + // RB j: reset RAM bit + UINT8 mask = 1 << (m_op & 3); + ram_w(ram_r() & ~mask); +} + +void melps4_cpu_device::op_szb() +{ + // SZB j: skip next if RAM bit is 0 + UINT8 mask = 1 << (m_op & 3); + m_skip = !(ram_r() & mask); +} + + +// Compares + +void melps4_cpu_device::op_seam() +{ + // SEAM: skip next if A equals RAM + m_skip = (m_a == ram_r()); +} + +void melps4_cpu_device::op_sey() +{ + // SEY y: skip next if Y equals immediate + m_skip = (m_y == (m_op & 0xf)); +} + + +// A/D converter operations + +void melps4_cpu_device::op_tla() +{ + // TLA: transfer A to L + m_l = m_a; +} + +void melps4_cpu_device::op_tha() +{ + // THA: transfer A to H + m_h = m_a; +} + +void melps4_cpu_device::op_taj() +{ + // TAJ: transfer J(hi/lo) to A designated by Y + op_illegal(); +} + +void melps4_cpu_device::op_xal() +{ + // XAL: exchange A with L + UINT8 a = m_a; + m_a = m_l; + m_l = a; +} + +void melps4_cpu_device::op_xah() +{ + // XAH: exchange A with H + UINT8 a = m_a; + m_a = m_h; + m_h = a; +} + +void melps4_cpu_device::op_lc7() +{ + // LC7: load 7 into C + m_c = 7; +} + +void melps4_cpu_device::op_dec() +{ + // DEC: decrement C, skip next on overflow + m_c = (m_c - 1) & 7; + m_skip = (m_c == 7); +} + +void melps4_cpu_device::op_shl() +{ + // SHL: set bit in L or H designated by C + UINT8 mask = 1 << (m_c & 3); + if (m_c & 4) + m_h |= mask; + else + m_l |= mask; +} + +void melps4_cpu_device::op_rhl() +{ + // RHL: reset bit in L or H designated by C + UINT8 mask = 1 << (m_c & 3); + if (m_c & 4) + m_h &= ~mask; + else + m_l &= ~mask; +} + +void melps4_cpu_device::op_cpa() +{ + // CPA: .. + op_illegal(); +} + +void melps4_cpu_device::op_cpas() +{ + // CPAS: .. + op_illegal(); +} + +void melps4_cpu_device::op_cpae() +{ + // CPAE: .. + op_illegal(); +} + +void melps4_cpu_device::op_szj() +{ + // SZJ: skip next if J bit designated by Y is 0 + op_illegal(); +} + + +// Timer instruction + +void melps4_cpu_device::op_t1ab() +{ + // T1AB: transfer A and B to timer 1 + op_illegal(); +} + +void melps4_cpu_device::op_trab() +{ + // TRAB: transfer A and B to timer 2 reload + op_illegal(); +} + +void melps4_cpu_device::op_t2ab() +{ + // T2AB: transfer A and B to timer 2 and timer 2 reload + op_illegal(); +} + +void melps4_cpu_device::op_tab1() +{ + // TAB1: transfer timer 1 to A and B + op_illegal(); +} + +void melps4_cpu_device::op_tabr() +{ + // TABR: transfer timer 2 reload to A and B + op_illegal(); +} + +void melps4_cpu_device::op_tab2() +{ + // TAB2: transfer timer 2 to A and B + op_illegal(); +} + +void melps4_cpu_device::op_tva() +{ + // TVA: transfer A to timer control V + op_illegal(); +} + +void melps4_cpu_device::op_twa() +{ + // TWA: transfer A to timer control W + op_illegal(); +} + +void melps4_cpu_device::op_snz1() +{ + // SNZ1: skip next on flag 1F + op_illegal(); +} + +void melps4_cpu_device::op_snz2() +{ + // SNZ2: skip next on flag 2F + op_illegal(); +} + + +// Jumps + +void melps4_cpu_device::op_ba() +{ + // BA: x + op_illegal(); +} + +void melps4_cpu_device::op_sp() +{ + // SP: set page + op_illegal(); +} + +void melps4_cpu_device::op_b() +{ + // B xy: branch in current page + op_illegal(); +} + +void melps4_cpu_device::op_bm() +{ + // BM xy call subroutine on page 14 + op_illegal(); +} + + +// Program returns + +void melps4_cpu_device::op_rt() +{ + // RT: return from subroutine + op_illegal(); +} + +void melps4_cpu_device::op_rts() +{ + // RTS: RT, skip next + op_rt(); + m_skip = true; +} + +void melps4_cpu_device::op_rti() +{ + // RTI: return from interrupt routine + op_illegal(); +} + + +// Input/Output + +void melps4_cpu_device::op_cld() +{ + // CLD: clear port D + op_illegal(); +} + +void melps4_cpu_device::op_cls() +{ + // CLS: clear port S + op_illegal(); +} + +void melps4_cpu_device::op_clds() +{ + // CLDS: CLD, CLS + op_illegal(); +} + +void melps4_cpu_device::op_sd() +{ + // SD: set port D bit designated by Y + op_illegal(); +} + +void melps4_cpu_device::op_rd() +{ + // RD: reset port D bit designated by Y + op_illegal(); +} + +void melps4_cpu_device::op_szd() +{ + // SZD: skip next if port D bit designated by Y is 0 + op_illegal(); +} + +void melps4_cpu_device::op_osab() +{ + // OSAB: output A and B to port S + op_illegal(); +} + +void melps4_cpu_device::op_ospa() +{ + // OSPA: decode A by PLA and output to port S + op_illegal(); +} + +void melps4_cpu_device::op_ose() +{ + // OSE: output E to port S + op_illegal(); +} + +void melps4_cpu_device::op_ias() +{ + // IAS i: transfer port S(hi/lo) to A + op_illegal(); +} + +void melps4_cpu_device::op_ofa() +{ + // OFA: output A to port F + op_illegal(); +} + +void melps4_cpu_device::op_iaf() +{ + // IAF: input port F to A + op_illegal(); +} + +void melps4_cpu_device::op_oga() +{ + // OGA: output A to port G + op_illegal(); +} + +void melps4_cpu_device::op_iak() +{ + // IAK: input port K to A + op_illegal(); +} + +void melps4_cpu_device::op_szk() +{ + // SZK j: skip next if port K bit is reset + op_illegal(); +} + +void melps4_cpu_device::op_su() +{ + // SU/RU: set/reset port U + op_illegal(); +} + + +// Interrupts + +void melps4_cpu_device::op_ei() +{ + // EI: enable interrupt flag + m_inte = 1; +} + +void melps4_cpu_device::op_di() +{ + // DI: disable interrupt flag + m_inte = 0; +} + +void melps4_cpu_device::op_inth() +{ + // INTH: set external interrupt polarity high (rising edge) + m_intp = 1; +} + +void melps4_cpu_device::op_intl() +{ + // INTL: set external interrupt polarity low (falling edge) + m_intp = 0; +} + + +// Misc + +void melps4_cpu_device::op_nop() +{ + // NOP: no operation +} + +void melps4_cpu_device::op_illegal() +{ + logerror("%s unknown opcode $%03X at $%04X\n", tag(), m_op, m_prev_pc); +} diff --git a/src/emu/cpu/nec/v25.c b/src/emu/cpu/nec/v25.c index 1fc7d965856..bf4ee0ab6ed 100644 --- a/src/emu/cpu/nec/v25.c +++ b/src/emu/cpu/nec/v25.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Bryan McPhail, Alex W. Jackson /**************************************************************************** NEC V25/V35 emulator diff --git a/src/emu/cpu/nec/v25.h b/src/emu/cpu/nec/v25.h index c1113633897..41d55cc4fb8 100644 --- a/src/emu/cpu/nec/v25.h +++ b/src/emu/cpu/nec/v25.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Bryan McPhail, Alex W. Jackson /* ASG 971222 -- rewrote this interface */ #ifndef __NEC_V25_H_ #define __NEC_V25_H_ diff --git a/src/emu/cpu/nec/v25instr.h b/src/emu/cpu/nec/v25instr.h index 33b5aac3e12..5d878f24f2b 100644 --- a/src/emu/cpu/nec/v25instr.h +++ b/src/emu/cpu/nec/v25instr.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Bryan McPhail, Alex W. Jackson const v25_common_device::nec_ophandler v25_common_device::s_nec_instruction[256] = { &v25_common_device::i_add_br8, /* 0x00 */ diff --git a/src/emu/cpu/nec/v25instr.inc b/src/emu/cpu/nec/v25instr.inc index 8b88f163429..bd11b0626a8 100644 --- a/src/emu/cpu/nec/v25instr.inc +++ b/src/emu/cpu/nec/v25instr.inc @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Bryan McPhail, Alex W. Jackson #define GetRB \ ModRM = FETCH(); \ if (ModRM >= 0xc0) \ diff --git a/src/emu/cpu/nec/v25priv.h b/src/emu/cpu/nec/v25priv.h index a351d95b90d..19e8fcb7171 100644 --- a/src/emu/cpu/nec/v25priv.h +++ b/src/emu/cpu/nec/v25priv.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Bryan McPhail, Alex W. Jackson /* Cpu types, steps of 8 to help the cycle count calculation */ #define V33_TYPE 0 #define V30_TYPE 8 diff --git a/src/emu/cpu/nec/v25sfr.c b/src/emu/cpu/nec/v25sfr.c index 4a4592cf9f3..7e8afc8b39c 100644 --- a/src/emu/cpu/nec/v25sfr.c +++ b/src/emu/cpu/nec/v25sfr.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Bryan McPhail, Alex W. Jackson /**************************************************************************** NEC V25/V35 special function registers and internal ram access diff --git a/src/emu/cpu/pic16c5x/16c5xdsm.c b/src/emu/cpu/pic16c5x/16c5xdsm.c index badf9d022ac..45ff3154ec1 100644 --- a/src/emu/cpu/pic16c5x/16c5xdsm.c +++ b/src/emu/cpu/pic16c5x/16c5xdsm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C5x Emulator * diff --git a/src/emu/cpu/pic16c5x/dis16c5x.c b/src/emu/cpu/pic16c5x/dis16c5x.c index bbbb6b37756..5b108310b5f 100644 --- a/src/emu/cpu/pic16c5x/dis16c5x.c +++ b/src/emu/cpu/pic16c5x/dis16c5x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C5x Emulator * diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index 3dbaa5ccb62..0c78f34eebd 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C5x Emulator * diff --git a/src/emu/cpu/pic16c5x/pic16c5x.h b/src/emu/cpu/pic16c5x/pic16c5x.h index 6e39bf41a2b..5f45ca3bf33 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.h +++ b/src/emu/cpu/pic16c5x/pic16c5x.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C5x Emulator * diff --git a/src/emu/cpu/pic16c62x/16c62xdsm.c b/src/emu/cpu/pic16c62x/16c62xdsm.c index b79e24ad0b4..5bdd824dc16 100644 --- a/src/emu/cpu/pic16c62x/16c62xdsm.c +++ b/src/emu/cpu/pic16c62x/16c62xdsm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C62X Emulator * diff --git a/src/emu/cpu/pic16c62x/dis16c62x.c b/src/emu/cpu/pic16c62x/dis16c62x.c index 8c674fa0235..c87acd87018 100644 --- a/src/emu/cpu/pic16c62x/dis16c62x.c +++ b/src/emu/cpu/pic16c62x/dis16c62x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C62X Emulator * diff --git a/src/emu/cpu/pic16c62x/pic16c62x.c b/src/emu/cpu/pic16c62x/pic16c62x.c index 8d73d6e337b..42e92b0addf 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.c +++ b/src/emu/cpu/pic16c62x/pic16c62x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C62X Emulator * diff --git a/src/emu/cpu/pic16c62x/pic16c62x.h b/src/emu/cpu/pic16c62x/pic16c62x.h index 5178855923c..55e78a9a081 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.h +++ b/src/emu/cpu/pic16c62x/pic16c62x.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Microchip PIC16C62X Emulator * diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c index 3e2c1858ee6..cb85522177d 100644 --- a/src/emu/cpu/powerpc/ppc.c +++ b/src/emu/cpu/powerpc/ppc.c @@ -5,6 +5,9 @@ #include <setjmp.h> #include "emu.h" #include "debugger.h" + +/* avoid including setjmp.h and defining jump buffer if not included from here */ +#define PPC_H_INCLUDED_FROM_PPC_C #include "ppc.h" // PLL Configuration based on the table in MPC603EUM page 7-31 diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h index 9fe6bcb6fe1..3b0129627c7 100644 --- a/src/emu/cpu/powerpc/ppc.h +++ b/src/emu/cpu/powerpc/ppc.h @@ -14,7 +14,9 @@ #ifndef __PPC_H__ #define __PPC_H__ +#ifdef PPC_H_INCLUDED_FROM_PPC_C #include <setjmp.h> +#endif #include "cpu/vtlb.h" #include "cpu/drcfe.h" #include "cpu/drcuml.h" @@ -512,7 +514,9 @@ protected: write32_delegate m_ext_dma_write_cb[4]; /* PowerPC function pointers for memory accesses/exceptions */ +#ifdef PPC_H_INCLUDED_FROM_PPC_C jmp_buf m_exception_jmpbuf; +#endif UINT8 (*m_ppcread8)(address_space &space, offs_t address); UINT16 (*m_ppcread16)(address_space &space, offs_t address); UINT32 (*m_ppcread32)(address_space &space, offs_t address); diff --git a/src/emu/cpu/sh4/sh3comn.c b/src/emu/cpu/sh4/sh3comn.c index 25254ebf96b..1fcacaa9165 100644 --- a/src/emu/cpu/sh4/sh3comn.c +++ b/src/emu/cpu/sh4/sh3comn.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /* Handlers for SH3 internals */ #include "emu.h" diff --git a/src/emu/cpu/sh4/sh3comn.h b/src/emu/cpu/sh4/sh3comn.h index 73cad125d98..8aa68c27b26 100644 --- a/src/emu/cpu/sh4/sh3comn.h +++ b/src/emu/cpu/sh4/sh3comn.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont #pragma once #ifndef __SH3COMN_H__ diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c index b7ae47f8f8b..889fe12eb5c 100644 --- a/src/emu/cpu/sh4/sh4.c +++ b/src/emu/cpu/sh4/sh4.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /***************************************************************************** * * sh4.c @@ -2966,7 +2966,7 @@ inline void sh34_base_device::FSRRA(const UINT16 opcode) if (FP_RFS(n) < 0) return; - FP_RFS(n) = 1.0 / sqrtf(FP_RFS(n)); + FP_RFS(n) = 1.0f / sqrtf(FP_RFS(n)); } /* FSSCA FPUL,FRn PR=0 1111nnn011111101 */ @@ -2974,9 +2974,9 @@ void sh34_base_device::FSSCA(const UINT16 opcode) { UINT32 n = Rn; -float angle; + float angle; - angle = (((float)(m_fpul & 0xFFFF)) / 65536.0) * 2.0 * M_PI; + angle = (((float)(m_fpul & 0xFFFF)) / 65536.0f) * 2.0f * (float) M_PI; FP_RFS(n) = sinf(angle); FP_RFS(n+1) = cosf(angle); } diff --git a/src/emu/cpu/sh4/sh4.h b/src/emu/cpu/sh4/sh4.h index a2f008de886..2078d1e6435 100644 --- a/src/emu/cpu/sh4/sh4.h +++ b/src/emu/cpu/sh4/sh4.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /***************************************************************************** * * sh4->h diff --git a/src/emu/cpu/sh4/sh4comn.c b/src/emu/cpu/sh4/sh4comn.c index 7a4f6945d92..5052622e2d4 100644 --- a/src/emu/cpu/sh4/sh4comn.c +++ b/src/emu/cpu/sh4/sh4comn.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /***************************************************************************** * * sh4comn.c diff --git a/src/emu/cpu/sh4/sh4comn.h b/src/emu/cpu/sh4/sh4comn.h index ffb5a1b5bad..3aaec85692f 100644 --- a/src/emu/cpu/sh4/sh4comn.h +++ b/src/emu/cpu/sh4/sh4comn.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /***************************************************************************** * * sh4comn.h diff --git a/src/emu/cpu/sh4/sh4dasm.c b/src/emu/cpu/sh4/sh4dasm.c index 138c50fe3b1..cba1bea7bd5 100644 --- a/src/emu/cpu/sh4/sh4dasm.c +++ b/src/emu/cpu/sh4/sh4dasm.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont #include "emu.h" #include "debugger.h" #include "sh4.h" diff --git a/src/emu/cpu/sh4/sh4dmac.c b/src/emu/cpu/sh4/sh4dmac.c index 2f2ff993923..6d3fef194ba 100644 --- a/src/emu/cpu/sh4/sh4dmac.c +++ b/src/emu/cpu/sh4/sh4dmac.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /* SHA3/4 DMA Controller */ #include "emu.h" diff --git a/src/emu/cpu/sh4/sh4dmac.h b/src/emu/cpu/sh4/sh4dmac.h index 3c9e4b9e6f7..60148653c2b 100644 --- a/src/emu/cpu/sh4/sh4dmac.h +++ b/src/emu/cpu/sh4/sh4dmac.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /* SHA3/4 DMA Controller */ /* bit definitions */ diff --git a/src/emu/cpu/sh4/sh4regs.h b/src/emu/cpu/sh4/sh4regs.h index e6c5691b0f6..384f062858e 100644 --- a/src/emu/cpu/sh4/sh4regs.h +++ b/src/emu/cpu/sh4/sh4regs.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont #pragma once #ifndef __SH4REGS_H__ diff --git a/src/emu/cpu/sh4/sh4tmu.c b/src/emu/cpu/sh4/sh4tmu.c index e96e7d6e297..89b59ac42ee 100644 --- a/src/emu/cpu/sh4/sh4tmu.c +++ b/src/emu/cpu/sh4/sh4tmu.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /* SH3/4 Timer Unit */ #include "emu.h" diff --git a/src/emu/cpu/sh4/sh4tmu.h b/src/emu/cpu/sh4/sh4tmu.h index 1928a5db820..7bbad37a0c1 100644 --- a/src/emu/cpu/sh4/sh4tmu.h +++ b/src/emu/cpu/sh4/sh4tmu.h @@ -1,3 +1,3 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /* SH3/4 Timer Unit */ diff --git a/src/emu/cpu/sharc/compute.inc b/src/emu/cpu/sharc/compute.inc index ac198c9bc15..880b368ad1f 100644 --- a/src/emu/cpu/sharc/compute.inc +++ b/src/emu/cpu/sharc/compute.inc @@ -741,7 +741,7 @@ void adsp21062_device::compute_fclip(int rn, int rx, int ry) { SHARC_REG r_alu; - if (FREG(rx) < fabs(FREG(ry))) + if (FREG(rx) < fabsf(FREG(ry))) { r_alu.f = FREG(rx); } @@ -749,11 +749,11 @@ void adsp21062_device::compute_fclip(int rn, int rx, int ry) { if (FREG(rx) >= 0.0f) { - r_alu.f = fabs(FREG(ry)); + r_alu.f = fabsf(FREG(ry)); } else { - r_alu.f = -fabs(FREG(ry)); + r_alu.f = -fabsf(FREG(ry)); } } diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c index 2bf4ca22023..3ec7ab5bfaa 100644 --- a/src/emu/cpu/tlcs90/tlcs90.c +++ b/src/emu/cpu/tlcs90/tlcs90.c @@ -6,6 +6,10 @@ emulation by Luca Elia, based on the Z80 core by Juergen Buchmueller + ChangeLog: + + 20150517 Fixed TRUN bit masking (timers start/stop handling) [Rainer Keuchel] + *************************************************************************************************************/ #include "emu.h" @@ -2021,9 +2025,10 @@ void tlcs90_device::device_reset() P0/D0-D7 P1/A0-A7 P2/A8-A15 P6 P7 = INPUT P35/~RD P36/~WR CLK = 1 (ALWAYS OUTPUTS) P4/A16-A19 P83 = 0 - dedicated input ports and registers remain unchanged, + dedicated input ports and CPU registers remain unchanged, but PC IFF BX BY = 0, A undefined */ + memset(m_internal_registers, 0, sizeof(m_internal_registers)); } void tlcs90_device::execute_burn(INT32 cycles) @@ -2414,7 +2419,8 @@ TIMER_CALLBACK_MEMBER( tlcs90_device::t90_timer_callback ) int mode, timer_fired; int i = param; - if ( (m_internal_registers[ T90_TRUN - T90_IOBASE ] & (1 << i)) == 0 ) + int mask = 0x20 | (1 << i); + if ( (m_internal_registers[ T90_TRUN - T90_IOBASE ] & mask) != mask ) return; timer_fired = 0; @@ -2507,21 +2513,23 @@ WRITE8_MEMBER( tlcs90_device::t90_internal_registers_w ) case T90_TRUN: { int i; + UINT8 mask; // Timers 0-3 for (i = 0; i < 4; i++) { - if ( (old ^ data) & (0x20 | (1 << i)) ) // if timer bit or prescaler bit changed + mask = 0x20 | (1 << i); + if ( (old ^ data) & mask ) // if timer bit or prescaler bit changed { - if ( (data & (1 << i)) && (data & 0x20) ) t90_start_timer(i); - else t90_stop_timer(i); + if ( (data & mask) == mask ) t90_start_timer(i); + else t90_stop_timer(i); } } - // Timer 4 - if ( (old ^ data) & (0x20 | 0x10) ) + mask = 0x20 | 0x10; + if ( (old ^ data) & mask ) { - if ( data == (0x20 | 0x10) ) t90_start_timer4(); + if ( (data & mask) == mask ) t90_start_timer4(); else t90_stop_timer4(); } break; @@ -2726,11 +2734,6 @@ void tlcs90_device::device_start() m_timer_period = attotime::from_hz(unscaled_clock()) * 8; - // Reset registers to their initial values - -// IX = IY = 0xffff; -// F = ZF; - // Timers for (i = 0; i < 4; i++) diff --git a/src/emu/cpu/tms32010/32010dsm.c b/src/emu/cpu/tms32010/32010dsm.c index 4c005e065df..a4c0fd5294c 100644 --- a/src/emu/cpu/tms32010/32010dsm.c +++ b/src/emu/cpu/tms32010/32010dsm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Texas Instruments TMS32010 DSP Disassembler * diff --git a/src/emu/cpu/tms32010/dis32010.c b/src/emu/cpu/tms32010/dis32010.c index 544a72a21cb..adc18d7c34d 100644 --- a/src/emu/cpu/tms32010/dis32010.c +++ b/src/emu/cpu/tms32010/dis32010.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Texas Instruments TMS32010 DSP Disassembler * diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c index 26a65679efb..a90a697f58b 100644 --- a/src/emu/cpu/tms32010/tms32010.c +++ b/src/emu/cpu/tms32010/tms32010.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Texas Instruments TMS32010 DSP Emulator * diff --git a/src/emu/cpu/tms32010/tms32010.h b/src/emu/cpu/tms32010/tms32010.h index 05ff3e3fe73..6059d1efa57 100644 --- a/src/emu/cpu/tms32010/tms32010.h +++ b/src/emu/cpu/tms32010/tms32010.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta /**************************************************************************\ * Texas Instruments TMS32010 DSP Emulator * diff --git a/src/emu/cpu/tms32025/32025dsm.c b/src/emu/cpu/tms32025/32025dsm.c index 416f0aeb5ab..d266c468d65 100644 --- a/src/emu/cpu/tms32025/32025dsm.c +++ b/src/emu/cpu/tms32025/32025dsm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta, hap /**************************************************************************\ * Texas Instruments TMS320x25 DSP Disassembler * diff --git a/src/emu/cpu/tms32025/dis32025.c b/src/emu/cpu/tms32025/dis32025.c index 8a4280b3bf7..212c5339627 100644 --- a/src/emu/cpu/tms32025/dis32025.c +++ b/src/emu/cpu/tms32025/dis32025.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta, hap /**************************************************************************\ * Texas Instruments TMS320x25 DSP Disassembler * diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c index 718ced81e39..91fa0423e1c 100644 --- a/src/emu/cpu/tms32025/tms32025.c +++ b/src/emu/cpu/tms32025/tms32025.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta, hap /**************************************************************************\ * Texas Instruments TMS320x25 DSP Emulator * diff --git a/src/emu/cpu/tms32025/tms32025.h b/src/emu/cpu/tms32025/tms32025.h index 82139bf2ef3..5992012d08e 100644 --- a/src/emu/cpu/tms32025/tms32025.h +++ b/src/emu/cpu/tms32025/tms32025.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tony La Porta, hap /**************************************************************************\ * Texas Instruments TMS320x25 DSP Emulator * diff --git a/src/emu/cpu/tms32031/dis32031.c b/src/emu/cpu/tms32031/dis32031.c index 56e3533e474..bc2bd737318 100644 --- a/src/emu/cpu/tms32031/dis32031.c +++ b/src/emu/cpu/tms32031/dis32031.c @@ -192,7 +192,7 @@ static void append_immediate(UINT16 data, int is_float, int is_unsigned, char *b else expanded_data += ((-data & 0x0fff) << 12); float_val = *(float *)&expanded_data; - sprintf(dst, "%8f", float_val); + sprintf(dst, "%8f", (double) float_val); } else if (!is_unsigned && (INT16)data < 0) sprintf(dst, "-$%04X", -data & 0xffff); diff --git a/src/emu/cpu/tms32082/mp_ops.c b/src/emu/cpu/tms32082/mp_ops.c index 48e60d827e8..eb59ca228f1 100644 --- a/src/emu/cpu/tms32082/mp_ops.c +++ b/src/emu/cpu/tms32082/mp_ops.c @@ -1428,7 +1428,7 @@ void tms32082_mp_device::execute_reg_long_imm() { float s1 = u2f(has_imm ? imm32 : m_reg[src1]); double s2 = u2d(m_fpair[rs >> 1]); - UINT64 res = d2u((double)(s1 + s2)); + UINT64 res = d2u((double) s1 + s2); m_fpair[rd >> 1] = res; break; } @@ -1436,7 +1436,7 @@ void tms32082_mp_device::execute_reg_long_imm() { double s1 = u2d(m_fpair[src1 >> 1]); float s2 = u2f(m_reg[rs]); - UINT64 res = d2u((double)(s1 + s2)); + UINT64 res = d2u(s1 + (double) s2); m_fpair[rd >> 1] = res; break; } @@ -1486,7 +1486,7 @@ void tms32082_mp_device::execute_reg_long_imm() { float s1 = u2f(has_imm ? imm32 : m_reg[src1]); double s2 = u2d(m_fpair[rs >> 1]); - UINT64 res = d2u((double)(s1 - s2)); + UINT64 res = d2u((double) s1 - s2); m_fpair[rd >> 1] = res; break; } @@ -1494,7 +1494,7 @@ void tms32082_mp_device::execute_reg_long_imm() { double s1 = u2d(m_fpair[src1 >> 1]); float s2 = u2f(m_reg[rs]); - UINT64 res = d2u((double)(s1 - s2)); + UINT64 res = d2u(s1 - (double) s2); m_fpair[rd >> 1] = res; break; } @@ -1544,7 +1544,7 @@ void tms32082_mp_device::execute_reg_long_imm() { float s1 = u2f(has_imm ? imm32 : m_reg[src1]); double s2 = u2d(m_fpair[rs >> 1]); - UINT64 res = d2u((double)(s1 * s2)); + UINT64 res = d2u((double)s1 * s2); m_fpair[rd >> 1] = res; break; } @@ -1552,7 +1552,7 @@ void tms32082_mp_device::execute_reg_long_imm() { double s1 = u2d(m_fpair[src1 >> 1]); float s2 = u2f(m_reg[rs]); - UINT64 res = d2u((double)(s1 * s2)); + UINT64 res = d2u(s1 * (double) s2); m_fpair[rd >> 1] = res; break; } @@ -1560,7 +1560,7 @@ void tms32082_mp_device::execute_reg_long_imm() { double s1 = u2d(m_fpair[src1 >> 1]); double s2 = u2d(m_fpair[rs >> 1]); - UINT64 res = d2u((double)(s1 * s2)); + UINT64 res = d2u(s1 * s2); m_fpair[rd >> 1] = res; break; } diff --git a/src/emu/cpu/tms34010/34010fld.c b/src/emu/cpu/tms34010/34010fld.c index b507f7b966f..ca05039dac0 100644 --- a/src/emu/cpu/tms34010/34010fld.c +++ b/src/emu/cpu/tms34010/34010fld.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** TMS34010: Portable Texas Instruments TMS34010 emulator diff --git a/src/emu/cpu/tms34010/34010gfx.c b/src/emu/cpu/tms34010/34010gfx.c index 66234c24f42..6b2108af953 100644 --- a/src/emu/cpu/tms34010/34010gfx.c +++ b/src/emu/cpu/tms34010/34010gfx.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** TMS34010: Portable Texas Instruments TMS34010 emulator diff --git a/src/emu/cpu/tms34010/34010ops.c b/src/emu/cpu/tms34010/34010ops.c index f33dc6a2461..1e0866478fc 100644 --- a/src/emu/cpu/tms34010/34010ops.c +++ b/src/emu/cpu/tms34010/34010ops.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** TMS34010: Portable Texas Instruments TMS34010 emulator diff --git a/src/emu/cpu/tms34010/34010ops.h b/src/emu/cpu/tms34010/34010ops.h index 3feefd7fa7e..6dad233c034 100644 --- a/src/emu/cpu/tms34010/34010ops.h +++ b/src/emu/cpu/tms34010/34010ops.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** TMS34010: Portable Texas Instruments TMS34010 emulator diff --git a/src/emu/cpu/tms34010/34010tbl.c b/src/emu/cpu/tms34010/34010tbl.c index 34e0f97b018..2cef83dcb9c 100644 --- a/src/emu/cpu/tms34010/34010tbl.c +++ b/src/emu/cpu/tms34010/34010tbl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*** TMS34010: Portable TMS34010 emulator *********************************** Copyright Alex Pasadyn/Zsolt Vasvari diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c index 815d3d53c22..d1c520b473b 100644 --- a/src/emu/cpu/tms34010/tms34010.c +++ b/src/emu/cpu/tms34010/tms34010.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** TMS34010: Portable Texas Instruments TMS34010 emulator diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h index 74c163f6dd4..70d453cda6e 100644 --- a/src/emu/cpu/tms34010/tms34010.h +++ b/src/emu/cpu/tms34010/tms34010.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** TMS34010: Portable Texas Instruments TMS34010 emulator diff --git a/src/emu/cpu/tms57002/tmsmake.py b/src/emu/cpu/tms57002/tmsmake.py index ec6972273cf..c822599e7d2 100755 --- a/src/emu/cpu/tms57002/tmsmake.py +++ b/src/emu/cpu/tms57002/tmsmake.py @@ -271,7 +271,10 @@ class Instruction: vals.append("%s=%d" % (v, flags_fixed[v])) out = ["case %d: // %s %s" % (no, self._name, " ".join(vals))] for line in self.PreprocessRunString(): - out.append(self.ExpandCintrp(line, flags_fixed)) + exp = self.ExpandCintrp(line, flags_fixed) + # ensure we're not outputing a = a; + if not CheckSelfAssign(exp): + out.append(exp) out.append(" break;") out.append("") EmitWithPrefix(f, out, prefix) @@ -411,6 +414,13 @@ def EmitCintrp(f, ins_list): print >>f, "#endif" +def CheckSelfAssign(line): + ls = line.split('=') + if len(ls) != 2: + return False + lhs = ls[0].strip() + rhs = ls[1].strip().rstrip(';') + return lhs == rhs ins_list = LoadLst(sys.argv[1]) try: diff --git a/src/emu/cpu/tms7000/7000dasm.c b/src/emu/cpu/tms7000/7000dasm.c index a48127a4f2a..23560a29829 100644 --- a/src/emu/cpu/tms7000/7000dasm.c +++ b/src/emu/cpu/tms7000/7000dasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Lindner /* diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c index e66fc0a41ff..acc81731c1b 100644 --- a/src/emu/cpu/tms7000/tms7000.c +++ b/src/emu/cpu/tms7000/tms7000.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:hap +// copyright-holders:hap, Tim Lindner /***************************************************************************** Texas Instruments TMS7000 diff --git a/src/emu/cpu/tms7000/tms7000.h b/src/emu/cpu/tms7000/tms7000.h index 87c45ff0867..4b5f14ebe89 100644 --- a/src/emu/cpu/tms7000/tms7000.h +++ b/src/emu/cpu/tms7000/tms7000.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:hap +// copyright-holders:hap, Tim Lindner /* Texas Instruments TMS7000 diff --git a/src/emu/cpu/tms7000/tms70op.inc b/src/emu/cpu/tms7000/tms70op.inc index 7bd68961373..f1aeef7be3c 100644 --- a/src/emu/cpu/tms7000/tms70op.inc +++ b/src/emu/cpu/tms7000/tms70op.inc @@ -1,3 +1,6 @@ +// license:BSD-3-Clause +// copyright-holders:hap, Tim Lindner + // TMS7000 opcode handlers // addressing modes (not all opcodes have a write cycle) diff --git a/src/emu/cpu/uml.c b/src/emu/cpu/uml.c index eef08cc7d47..f7b0584431f 100644 --- a/src/emu/cpu/uml.c +++ b/src/emu/cpu/uml.c @@ -37,7 +37,6 @@ #include "emu.h" #include "drcuml.h" #include "drcumlsh.h" -#include <setjmp.h> using namespace uml; diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c index 23d087d0b4c..c665053af7a 100644 --- a/src/emu/cpu/v810/v810.c +++ b/src/emu/cpu/v810/v810.c @@ -924,8 +924,8 @@ void v810_device::opADDF(UINT32 op) float val2=u2f(GETREG(GET2)); SET_OV(0); val2+=val1; - SET_Z((val2==0.0)?1:0); - SET_S((val2<0.0)?1:0); + SET_Z((val2==0.0f)?1:0); + SET_S((val2<0.0f)?1:0); SETREG(GET2,f2u(val2)); } @@ -936,8 +936,8 @@ void v810_device::opSUBF(UINT32 op) SET_OV(0); SET_CY((val2<val1)?1:0); val2-=val1; - SET_Z((val2==0.0)?1:0); - SET_S((val2<0.0)?1:0); + SET_Z((val2==0.0f)?1:0); + SET_S((val2<0.0f)?1:0); SETREG(GET2,f2u(val2)); } @@ -948,8 +948,8 @@ void v810_device::opMULF(UINT32 op) float val2=u2f(GETREG(GET2)); SET_OV(0); val2*=val1; - SET_Z((val2==0.0)?1:0); - SET_S((val2<0.0)?1:0); + SET_Z((val2==0.0f)?1:0); + SET_S((val2<0.0f)?1:0); SETREG(GET2,f2u(val2)); } @@ -963,8 +963,8 @@ void v810_device::opDIVF(UINT32 op) val2/=val1; else printf("DIVF divide by zero?\n"); - SET_Z((val2==0.0)?1:0); - SET_S((val2<0.0)?1:0); + SET_Z((val2==0.0f)?1:0); + SET_S((val2<0.0f)?1:0); SETREG(GET2,f2u(val2)); } @@ -972,8 +972,8 @@ void v810_device::opTRNC(UINT32 op) { float val1=u2f(GETREG(GET1)); SET_OV(0); - SET_Z((val1==0.0)?1:0); - SET_S((val1<0.0)?1:0); + SET_Z((val1==0.0f)?1:0); + SET_S((val1<0.0f)?1:0); SETREG(GET2,(INT32)val1); } @@ -984,16 +984,16 @@ void v810_device::opCMPF(UINT32 op) SET_OV(0); SET_CY((val2<val1)?1:0); val2-=val1; - SET_Z((val2==0.0)?1:0); - SET_S((val2<0.0)?1:0); + SET_Z((val2==0.0f)?1:0); + SET_S((val2<0.0f)?1:0); } void v810_device::opCVTS(UINT32 op) { float val1=u2f(GETREG(GET1)); SET_OV(0); - SET_Z((val1==0.0)?1:0); - SET_S((val1<0.0)?1:0); + SET_Z((val1==0.0f)?1:0); + SET_S((val1<0.0f)?1:0); SETREG(GET2,(INT32)val1); } @@ -1002,8 +1002,8 @@ void v810_device::opCVTW(UINT32 op) //TODO: CY float val1=(INT32)GETREG(GET1); SET_OV(0); - SET_Z((val1==0.0)?1:0); - SET_S((val1<0.0)?1:0); + SET_Z((val1==0.0f)?1:0); + SET_S((val1<0.0f)?1:0); SETREG(GET2,f2u(val1)); } @@ -1013,8 +1013,8 @@ void v810_device::opMPYHW(UINT32 op) int val2=(GETREG(GET2) & 0xffff); SET_OV(0); val2*=val1; - SET_Z((val2==0.0)?1:0); - SET_S((val2<0.0)?1:0); + SET_Z((val2==0.0f)?1:0); + SET_S((val2<0.0f)?1:0); SETREG(GET2,val2); } @@ -1023,8 +1023,8 @@ void v810_device::opXB(UINT32 op) int val=GETREG(GET2); SET_OV(0); val = (val & 0xffff0000) | ((val & 0xff) << 8) | ((val & 0xff00) >> 8); - SET_Z((val==0.0)?1:0); - SET_S((val<0.0)?1:0); + SET_Z((val==0.0f)?1:0); + SET_S((val<0.0f)?1:0); SETREG(GET2,val); } @@ -1034,8 +1034,8 @@ void v810_device::opXH(UINT32 op) int val=GETREG(GET2); SET_OV(0); val = ((val & 0xffff0000)>>16) | ((val & 0xffff)<<16); - SET_Z((val==0.0)?1:0); - SET_S((val<0.0)?1:0); + SET_Z((val==0.0f)?1:0); + SET_S((val<0.0f)?1:0); SETREG(GET2,val); } diff --git a/src/emu/cpu/z80/tmpz84c015.c b/src/emu/cpu/z80/tmpz84c015.c index ebe4e3bf33c..1677358e059 100644 --- a/src/emu/cpu/z80/tmpz84c015.c +++ b/src/emu/cpu/z80/tmpz84c015.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood,hap +// copyright-holders:hap /*************************************************************************** Toshiba TMPZ84C015, MPUZ80/TLCS-Z80 ASSP Family diff --git a/src/emu/cpu/z80/tmpz84c015.h b/src/emu/cpu/z80/tmpz84c015.h index 7401cd2d85c..225a658edc3 100644 --- a/src/emu/cpu/z80/tmpz84c015.h +++ b/src/emu/cpu/z80/tmpz84c015.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood,hap +// copyright-holders:hap /*************************************************************************** Toshiba TMPZ84C015, MPUZ80/TLCS-Z80 ASSP Family diff --git a/src/emu/devfind.h b/src/emu/devfind.h index 2493a66782f..e268bc9784a 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -267,8 +267,10 @@ public: // construction/destruction ioport_array_finder(device_t &base, const char *basetag) { - for (int index = 0; index < _Count; index++) { - m_array[index].reset(global_alloc(ioport_finder_type(base, strformat(m_tag[index], "%s.%d", basetag, index).c_str()))); + for (int index = 0; index < _Count; index++) + { + strformat(m_tag[index], "%s.%d", basetag, index); + m_array[index].reset(global_alloc(ioport_finder_type(base, m_tag[index].c_str()))); } } @@ -437,7 +439,10 @@ public: shared_ptr_array_finder(device_t &base, const char *basetag, UINT8 width = sizeof(_PointerType) * 8) { for (int index = 0; index < _Count; index++) - m_array[index].reset(global_alloc(shared_ptr_type(base, strformat(m_tag[index],"%s.%d", basetag, index).c_str(), width))); + { + strformat(m_tag[index],"%s.%d", basetag, index); + m_array[index].reset(global_alloc(shared_ptr_type(base, m_tag[index].c_str(), width))); + } } // array accessors diff --git a/src/emu/device.c b/src/emu/device.c index 5eeee60c9a3..5991bcfb30c 100644 --- a/src/emu/device.c +++ b/src/emu/device.c @@ -122,6 +122,9 @@ device_t::~device_t() // info for a given region //------------------------------------------------- +// NOTE: this being NULL in a C++ member function can lead to undefined behavior. +// However, it is relied on throughout MAME, so will remain for now. + memory_region *device_t::memregion(const char *_tag) const { // safety first diff --git a/src/emu/dinetwork.c b/src/emu/dinetwork.c index b8264872a85..9aa1cf828c7 100644 --- a/src/emu/dinetwork.c +++ b/src/emu/dinetwork.c @@ -40,7 +40,7 @@ void device_network_interface::set_mac(const char *mac) void device_network_interface::set_interface(int id) { - m_dev.reset(open_netdev(id, this, (int)(m_bandwidth*1000000/8.0/1500))); + m_dev.reset(open_netdev(id, this, (int)(m_bandwidth*1000000/8.0f/1500))); if(!m_dev) { logerror("Network interface %d not found\n", id); id = -1; diff --git a/src/emu/dislot.h b/src/emu/dislot.h index 77c7eb91bf0..a13d0e37e2d 100644 --- a/src/emu/dislot.h +++ b/src/emu/dislot.h @@ -75,7 +75,7 @@ public: device_slot_option *next() const { return m_next; } const char *name() const { return m_name; } const device_type &devtype() const { return m_devtype; } - const bool selectable() const { return m_selectable; } + bool selectable() const { return m_selectable; } const char *default_bios() const { return m_default_bios; } machine_config_constructor machine_config() const { return m_machine_config; } const input_device_default *input_device_defaults() const { return m_input_device_defaults; } @@ -112,7 +112,7 @@ public: static void static_set_option_machine_config(device_t &device, const char *option, const machine_config_constructor machine_config) { static_option(device, option)->m_machine_config = machine_config; } static void static_set_option_device_input_defaults(device_t &device, const char *option, const input_device_default *default_input) { static_option(device, option)->m_input_device_defaults = default_input; } static void static_set_option_clock(device_t &device, const char *option, UINT32 default_clock) { static_option(device, option)->m_clock = default_clock; } - const bool fixed() const { return m_fixed; } + bool fixed() const { return m_fixed; } const char *default_option() const { return m_default_option; } device_slot_option *first_option() const { return m_options.first(); } device_slot_option *option(const char *name) const { if (name) return m_options.find(name); return NULL; } diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h index 1500a042d9b..77f06f1d9bf 100644 --- a/src/emu/drivers/xtal.h +++ b/src/emu/drivers/xtal.h @@ -238,6 +238,7 @@ enum XTAL_430kHz = 430000, XTAL_455kHz = 455000, /* OKI MSM5205 on Gladiator h/w */ XTAL_512kHz = 512000, /* Toshiba TC8830F */ + XTAL_600kHz = 600000, XTAL_640kHz = 640000, /* NEC UPD7759, Texas Instruments Speech Chips @ 8khz */ XTAL_1_056MHz = 1056000 /* OKI M6295 on Trio The Punch h/w */ }; diff --git a/src/emu/imagedev/flopdrv.c b/src/emu/imagedev/flopdrv.c index 4fbb2ba3c1e..8fafd466dae 100644 --- a/src/emu/imagedev/flopdrv.c +++ b/src/emu/imagedev/flopdrv.c @@ -145,7 +145,7 @@ void legacy_floppy_image_device::floppy_drive_init() /* index pulses at rpm/60 Hz, and stays high 1/20th of time */ void legacy_floppy_image_device::floppy_drive_index_func() { - double ms = 1000.0 / (m_rpm / 60.0); + double ms = 1000.0 / ((double) m_rpm / 60.0); if (m_idx) { diff --git a/src/emu/imagedev/floppy.c b/src/emu/imagedev/floppy.c index 3cf4b816649..3f704959d9f 100644 --- a/src/emu/imagedev/floppy.c +++ b/src/emu/imagedev/floppy.c @@ -99,8 +99,8 @@ const device_type SONY_OA_D32V = &device_creator<sony_oa_d32v>; #if 0 const device_type TEAC_FD_55A = &device_creator<teac_fd_55a>; const device_type TEAC_FD_55B = &device_creator<teac_fd_55b>; -const device_type TEAC_FD_55E = &device_creator<teac_fd_55e>; #endif +const device_type TEAC_FD_55E = &device_creator<teac_fd_55e>; const device_type TEAC_FD_55F = &device_creator<teac_fd_55f>; const device_type TEAC_FD_55G = &device_creator<teac_fd_55g>; @@ -250,7 +250,7 @@ void floppy_image_device::set_rpm(float _rpm) rpm = _rpm; rev_time = attotime::from_double(60/rpm); - floppy_ratio_1 = int(1000*rpm/300+0.5); + floppy_ratio_1 = int(1000.0f*rpm/300.0f+0.5f); } void floppy_image_device::setup_write(floppy_image_format_t *_output_format) @@ -269,6 +269,11 @@ void floppy_image_device::commit_image() io.file = (device_image_interface *)this; io.procs = &image_ioprocs; io.filler = 0xff; + + file_error err = core_truncate(image_core_file(), 0); + if (err != 0) + popmessage("Error, unable to truncate image: %d", err); + output_format->save(&io, image); } @@ -432,6 +437,28 @@ bool floppy_image_device::call_create(int format_type, option_resolution *format { image = global_alloc(floppy_image(tracks, sides, form_factor)); output_format = 0; + + // search for a suitable format based on the extension + for(floppy_image_format_t *i = fif_list; i; i = i->next) + { + // only consider formats that actually support saving + if(!i->supports_save()) + continue; + + if (i->extension_matches(basename())) + { + output_format = i; + break; + } + } + + // did we find a suitable format? + if (output_format == 0) + { + seterror(IMAGE_ERROR_INVALIDIMAGE, "Unable to identify the image format"); + return IMAGE_INIT_FAIL; + } + return IMAGE_INIT_PASS; } @@ -1775,6 +1802,41 @@ void sony_oa_d32v::handled_variants(UINT32 *variants, int &var_count) const } //------------------------------------------------- +// TEAC FD-55E +// +// track to track: 3 ms +// average: 94 ms +// setting time: 15 ms +// motor start time: 400 ms +// +//------------------------------------------------- + +teac_fd_55e::teac_fd_55e(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + floppy_image_device(mconfig, TEAC_FD_55F, "TEAC FD-55E FDD", tag, owner, clock, "teac_fd_55e", __FILE__) +{ +} + +teac_fd_55e::~teac_fd_55e() +{ +} + +void teac_fd_55e::setup_characteristics() +{ + form_factor = floppy_image::FF_525; + tracks = 80; + sides = 1; + set_rpm(300); +} + +void teac_fd_55e::handled_variants(UINT32 *variants, int &var_count) const +{ + var_count = 0; + variants[var_count++] = floppy_image::SSSD; + variants[var_count++] = floppy_image::SSDD; + variants[var_count++] = floppy_image::SSQD; +} + +//------------------------------------------------- // TEAC FD-55F // // track to track: 3 ms diff --git a/src/emu/imagedev/floppy.h b/src/emu/imagedev/floppy.h index 69a67c0c260..98834facc65 100644 --- a/src/emu/imagedev/floppy.h +++ b/src/emu/imagedev/floppy.h @@ -121,6 +121,7 @@ public: attotime get_next_transition(const attotime &from_when); void write_flux(const attotime &start, const attotime &end, int transition_count, const attotime *transitions); void set_write_splice(const attotime &when); + int get_sides() { return sides; } UINT32 get_form_factor() const; UINT32 get_variant() const; @@ -242,6 +243,7 @@ DECLARE_FLOPPY_IMAGE_DEVICE(epson_sd_321, "floppy_5_25") DECLARE_FLOPPY_IMAGE_DEVICE(sony_oa_d31v, "floppy_3_5") DECLARE_FLOPPY_IMAGE_DEVICE(sony_oa_d32w, "floppy_3_5") DECLARE_FLOPPY_IMAGE_DEVICE(sony_oa_d32v, "floppy_3_5") +DECLARE_FLOPPY_IMAGE_DEVICE(teac_fd_55e, "floppy_5_25") DECLARE_FLOPPY_IMAGE_DEVICE(teac_fd_55f, "floppy_5_25") DECLARE_FLOPPY_IMAGE_DEVICE(teac_fd_55g, "floppy_5_25") DECLARE_FLOPPY_IMAGE_DEVICE(alps_3255190x, "floppy_5_25") @@ -293,6 +295,7 @@ extern const device_type EPSON_SD_321; extern const device_type SONY_OA_D31V; extern const device_type SONY_OA_D32W; extern const device_type SONY_OA_D32V; +extern const device_type TEAC_FD_55E; extern const device_type TEAC_FD_55F; extern const device_type TEAC_FD_55G; extern const device_type ALPS_3255190x; diff --git a/src/emu/ioport.c b/src/emu/ioport.c index 30f85ccb4fd..e13d4e0d2e4 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -1995,7 +1995,7 @@ void ioport_field::frame_update(ioport_value &result, bool mouse_down) void ioport_field::crosshair_position(float &x, float &y, bool &gotx, bool &goty) { - float value = m_live->analog->crosshair_read(); + double value = m_live->analog->crosshair_read(); // apply the scale and offset if (m_crosshair_scale < 0) diff --git a/src/emu/layout/dualhovu.lay b/src/emu/layout/dualhovu.lay index 9da0a308f83..d4be6a75e8e 100644 --- a/src/emu/layout/dualhovu.lay +++ b/src/emu/layout/dualhovu.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Screen 0 Standard (4:3)"> <screen index="0"> diff --git a/src/emu/layout/dualhsxs.lay b/src/emu/layout/dualhsxs.lay index 1c6eea2f689..37b4f7b9499 100644 --- a/src/emu/layout/dualhsxs.lay +++ b/src/emu/layout/dualhsxs.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Screen 0 Standard (4:3)"> <screen index="0"> diff --git a/src/emu/layout/dualhuov.lay b/src/emu/layout/dualhuov.lay index ad6f75b1b67..1eced2b16ff 100644 --- a/src/emu/layout/dualhuov.lay +++ b/src/emu/layout/dualhuov.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Screen 0 Standard (4:3)"> <screen index="0"> diff --git a/src/emu/layout/ex800.lay b/src/emu/layout/ex800.lay index 2186760b3a0..90eaed17147 100644 --- a/src/emu/layout/ex800.lay +++ b/src/emu/layout/ex800.lay @@ -1,6 +1,5 @@ <?xml version="1.0"?> -<!-- license:GPL-2.0+ --> -<!-- copyright-holders:Dirk Best --> +<!-- Initial version. [Dirk Best] --> <mamelayout version="2"> <element name="background"> <rect> diff --git a/src/emu/layout/horizont.lay b/src/emu/layout/horizont.lay index 34e014748cb..908804832af 100644 --- a/src/emu/layout/horizont.lay +++ b/src/emu/layout/horizont.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Standard (4:3)"> <screen index="0"> diff --git a/src/emu/layout/lcd.lay b/src/emu/layout/lcd.lay index fc4608cf45a..8de4141324a 100644 --- a/src/emu/layout/lcd.lay +++ b/src/emu/layout/lcd.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="LCD with square pixels"> <screen index="0"> diff --git a/src/emu/layout/lcd_rot.lay b/src/emu/layout/lcd_rot.lay index 75da44e2376..95176d24a06 100644 --- a/src/emu/layout/lcd_rot.lay +++ b/src/emu/layout/lcd_rot.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="LCD with square pixels"> <screen index="0"> diff --git a/src/emu/layout/lx800.lay b/src/emu/layout/lx800.lay index 4f77d87179e..1ff533d1b6e 100644 --- a/src/emu/layout/lx800.lay +++ b/src/emu/layout/lx800.lay @@ -1,6 +1,5 @@ <?xml version="1.0"?> -<!-- license:GPL-2.0+ --> -<!-- copyright-holders:Dirk Best --> +<!-- Initial version. [Dirk Best] --> <mamelayout version="2"> <element name="background"> <rect> diff --git a/src/emu/layout/noscreens.lay b/src/emu/layout/noscreens.lay index e533f1eb362..fe0587f1f60 100644 --- a/src/emu/layout/noscreens.lay +++ b/src/emu/layout/noscreens.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <element name="background"> <rect> diff --git a/src/emu/layout/quadhsxs.lay b/src/emu/layout/quadhsxs.lay index 98e43ae886c..b07a04e7b11 100644 --- a/src/emu/layout/quadhsxs.lay +++ b/src/emu/layout/quadhsxs.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Screen 0 Standard (4:3)"> <screen index="0"> diff --git a/src/emu/layout/snap.lay b/src/emu/layout/snap.lay index d78d98c87fe..76dfb93d60c 100644 --- a/src/emu/layout/snap.lay +++ b/src/emu/layout/snap.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="s0"> <screen index="0"> diff --git a/src/emu/layout/triphsxs.lay b/src/emu/layout/triphsxs.lay index 7cbcc56417f..fe0c9237273 100644 --- a/src/emu/layout/triphsxs.lay +++ b/src/emu/layout/triphsxs.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Screen 0 Standard (4:3)"> <screen index="0"> diff --git a/src/emu/layout/vertical.lay b/src/emu/layout/vertical.lay index 794967398f3..2d66df317f8 100644 --- a/src/emu/layout/vertical.lay +++ b/src/emu/layout/vertical.lay @@ -1,6 +1,4 @@ <?xml version="1.0"?> -<!-- license:BSD-3-Clause --> -<!-- copyright-holders:Aaron Giles --> <mamelayout version="2"> <view name="Standard (3:4)"> <screen index="0"> diff --git a/src/emu/luaengine.c b/src/emu/luaengine.c index 25d3b25d7e7..588c8334eff 100644 --- a/src/emu/luaengine.c +++ b/src/emu/luaengine.c @@ -642,10 +642,10 @@ int lua_engine::lua_screen::l_draw_box(lua_State *L) int sc_width = sc->visible_area().width(); int sc_height = sc->visible_area().height(); float x1, y1, x2, y2; - x1 = MIN(MAX(0, lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); - y1 = MIN(MAX(0, lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); - x2 = MIN(MAX(0, lua_tonumber(L, 4)), sc_width-1) / static_cast<float>(sc_width); - y2 = MIN(MAX(0, lua_tonumber(L, 5)), sc_height-1) / static_cast<float>(sc_height); + x1 = MIN(MAX(0, (float) lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); + y1 = MIN(MAX(0, (float) lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); + x2 = MIN(MAX(0, (float) lua_tonumber(L, 4)), sc_width-1) / static_cast<float>(sc_width); + y2 = MIN(MAX(0, (float) lua_tonumber(L, 5)), sc_height-1) / static_cast<float>(sc_height); UINT32 bgcolor = lua_tounsigned(L, 6); UINT32 fgcolor = lua_tounsigned(L, 7); @@ -680,10 +680,10 @@ int lua_engine::lua_screen::l_draw_line(lua_State *L) int sc_width = sc->visible_area().width(); int sc_height = sc->visible_area().height(); float x1, y1, x2, y2; - x1 = MIN(MAX(0, lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); - y1 = MIN(MAX(0, lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); - x2 = MIN(MAX(0, lua_tonumber(L, 4)), sc_width-1) / static_cast<float>(sc_width); - y2 = MIN(MAX(0, lua_tonumber(L, 5)), sc_height-1) / static_cast<float>(sc_height); + x1 = MIN(MAX(0, (float) lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); + y1 = MIN(MAX(0, (float) lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); + x2 = MIN(MAX(0, (float) lua_tonumber(L, 4)), sc_width-1) / static_cast<float>(sc_width); + y2 = MIN(MAX(0, (float) lua_tonumber(L, 5)), sc_height-1) / static_cast<float>(sc_height); UINT32 color = lua_tounsigned(L, 6); // draw the line @@ -712,8 +712,8 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L) // retrieve all parameters int sc_width = sc->visible_area().width(); int sc_height = sc->visible_area().height(); - float x = MIN(MAX(0, lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); - float y = MIN(MAX(0, lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); + float x = MIN(MAX(0, (float) lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); + float y = MIN(MAX(0, (float) lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); const char *msg = luaL_checkstring(L,4); rgb_t textcolor = UI_TEXT_COLOR; if (!lua_isnone(L, 5)) { diff --git a/src/emu/machine/53c7xx.c b/src/emu/machine/53c7xx.c index cac1d629410..f2aad1ad75b 100644 --- a/src/emu/machine/53c7xx.c +++ b/src/emu/machine/53c7xx.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /********************************************************************* 53c7xx.c diff --git a/src/emu/machine/53c7xx.h b/src/emu/machine/53c7xx.h index b9dfcbdbd21..877a0d5293c 100644 --- a/src/emu/machine/53c7xx.h +++ b/src/emu/machine/53c7xx.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /********************************************************************* 53c7xx.h diff --git a/src/emu/machine/at45dbxx.c b/src/emu/machine/at45dbxx.c index 2f5429b8114..2890f8784d4 100644 --- a/src/emu/machine/at45dbxx.c +++ b/src/emu/machine/at45dbxx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/emu/machine/at45dbxx.h b/src/emu/machine/at45dbxx.h index 4a977c38722..a1e41e88657 100644 --- a/src/emu/machine/at45dbxx.h +++ b/src/emu/machine/at45dbxx.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/emu/machine/ds1315.c b/src/emu/machine/ds1315.c index 913c5413f5f..9036c18ba90 100644 --- a/src/emu/machine/ds1315.c +++ b/src/emu/machine/ds1315.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Lindner /***************************************************************************************** diff --git a/src/emu/machine/ds1315.h b/src/emu/machine/ds1315.h index 66923754649..0d5a7abc802 100644 --- a/src/emu/machine/ds1315.h +++ b/src/emu/machine/ds1315.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Lindner /********************************************************************* diff --git a/src/emu/machine/i8257.c b/src/emu/machine/i8257.c index 404e3066b15..db9bfe9bad5 100644 --- a/src/emu/machine/i8257.c +++ b/src/emu/machine/i8257.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder +// copyright-holders:Curt Coder,Carl /*************************************************************************** Intel 8257 DMA Controller emulation diff --git a/src/emu/machine/i8271.c b/src/emu/machine/i8271.c index 1136a2b2202..08e5944f4fc 100644 --- a/src/emu/machine/i8271.c +++ b/src/emu/machine/i8271.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Kevin Thacker /* Intel 8271 Floppy Disc Controller */ /* used in BBC Micro B,Acorn Atom */ diff --git a/src/emu/machine/i8271.h b/src/emu/machine/i8271.h index 44ee8c26149..c73fb4b680c 100644 --- a/src/emu/machine/i8271.h +++ b/src/emu/machine/i8271.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Kevin Thacker /***************************************************************************** * diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c index 480f641b46c..a94380456f5 100644 --- a/src/emu/machine/mb87078.c +++ b/src/emu/machine/mb87078.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Fabio Priuli,Phil Bennett +// copyright-holders:Fabio Priuli,Philip Bennett /***************************************************************************** Fujitsu MB87078 6-bit, 4-channel electronic volume controller emulator diff --git a/src/emu/machine/mb87078.h b/src/emu/machine/mb87078.h index e934653f7c8..15e68b83b22 100644 --- a/src/emu/machine/mb87078.h +++ b/src/emu/machine/mb87078.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Fabio Priuli,Phil Bennett +// copyright-holders:Fabio Priuli,Philip Bennett /***************************************************************************** MB87078 6-bit,4-channel electronic volume controller emulator diff --git a/src/emu/machine/mos6530n.c b/src/emu/machine/mos6530n.c index 0999eaa4856..667399ebba5 100644 --- a/src/emu/machine/mos6530n.c +++ b/src/emu/machine/mos6530n.c @@ -3,6 +3,7 @@ /********************************************************************** MOS Technology 6530 Memory, I/O, Timer Array emulation + MOS Technology 6532 RAM, I/O, Timer Array emulation **********************************************************************/ @@ -24,6 +25,7 @@ //************************************************************************** const device_type MOS6530n = &device_creator<mos6530_t>; +const device_type MOS6532n = &device_creator<mos6532_t>; DEVICE_ADDRESS_MAP_START( rom_map, 8, mos6530_t ) @@ -43,17 +45,31 @@ DEVICE_ADDRESS_MAP_START( io_map, 8, mos6530_t ) AM_RANGE(0x04, 0x0f) AM_WRITE(timer_w) ADDRESS_MAP_END +DEVICE_ADDRESS_MAP_START( ram_map, 8, mos6532_t ) + AM_RANGE(0x00, 0x7f) AM_READWRITE(ram_r, ram_w) +ADDRESS_MAP_END + +DEVICE_ADDRESS_MAP_START( io_map, 8, mos6532_t ) + AM_RANGE(0x00, 0x00) AM_READWRITE(pa_data_r, pa_data_w) + AM_RANGE(0x01, 0x01) AM_READWRITE(pa_ddr_r, pa_ddr_w) + AM_RANGE(0x02, 0x02) AM_READWRITE(pb_data_r, pb_data_w) + AM_RANGE(0x03, 0x03) AM_READWRITE(pb_ddr_r, pb_ddr_w) + AM_RANGE(0x04, 0x0f) AM_READ(timer_r) + AM_RANGE(0x04, 0x07) AM_WRITE(edge_w) + AM_RANGE(0x14, 0x1f) AM_WRITE(timer_w) +ADDRESS_MAP_END + //************************************************************************** // LIVE DEVICE //************************************************************************** //------------------------------------------------- -// mos6530_t - constructor +// mos6530_base_t - constructor //------------------------------------------------- -mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, MOS6530n, "MOS6530n", tag, owner, clock, "mos6530n", __FILE__), +mos6530_base_t::mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_ram(*this), m_irq_cb(*this), m_in_pa_cb(*this), @@ -92,8 +108,17 @@ mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *o m_out_pb5_cb(*this), m_out_pb6_cb(*this), m_out_pb7_cb(*this), - m_pa_in(0), - m_pb_in(0) + m_pa_in(0xff), + m_pa_out(0), + m_pa_ddr(0), + m_pb_in(0xff), + m_pb_out(0), + m_pb_ddr(0), + m_ie_timer(false), + m_irq_timer(true), + m_ie_edge(false), + m_irq_edge(false), + m_positive(false) { cur_live.tm = attotime::never; cur_live.state = IDLE; @@ -102,10 +127,26 @@ mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *o //------------------------------------------------- +// mos6530_t - constructor +//------------------------------------------------- + +mos6530_t::mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : mos6530_base_t(mconfig, MOS6530n, "MOS6530n", tag, owner, clock, "mos6530n", __FILE__) { } + + +//------------------------------------------------- +// mos6532_t - constructor +//------------------------------------------------- + +mos6532_t::mos6532_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : mos6530_base_t(mconfig, MOS6532n, "MOS6532n", tag, owner, clock, "mos6532n", __FILE__) { } + + +//------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -void mos6530_t::device_start() +void mos6530_base_t::device_start() { // resolve callbacks m_irq_cb.resolve_safe(); @@ -113,14 +154,14 @@ void mos6530_t::device_start() m_out_pa_cb.resolve(); m_in_pb_cb.resolve(); m_out_pb_cb.resolve(); - m_in_pa0_cb.resolve_safe(1); - m_in_pa1_cb.resolve_safe(1); - m_in_pa2_cb.resolve_safe(1); - m_in_pa3_cb.resolve_safe(1); - m_in_pa4_cb.resolve_safe(1); - m_in_pa5_cb.resolve_safe(1); - m_in_pa6_cb.resolve_safe(1); - m_in_pa7_cb.resolve_safe(1); + m_in_pa0_cb.resolve(); + m_in_pa1_cb.resolve(); + m_in_pa2_cb.resolve(); + m_in_pa3_cb.resolve(); + m_in_pa4_cb.resolve(); + m_in_pa5_cb.resolve(); + m_in_pa6_cb.resolve(); + m_in_pa7_cb.resolve(); m_out_pa0_cb.resolve_safe(); m_out_pa1_cb.resolve_safe(); m_out_pa2_cb.resolve_safe(); @@ -129,14 +170,14 @@ void mos6530_t::device_start() m_out_pa5_cb.resolve_safe(); m_out_pa6_cb.resolve_safe(); m_out_pa7_cb.resolve_safe(); - m_in_pb0_cb.resolve_safe(1); - m_in_pb1_cb.resolve_safe(1); - m_in_pb2_cb.resolve_safe(1); - m_in_pb3_cb.resolve_safe(1); - m_in_pb4_cb.resolve_safe(1); - m_in_pb5_cb.resolve_safe(1); - m_in_pb6_cb.resolve_safe(1); - m_in_pb7_cb.resolve_safe(1); + m_in_pb0_cb.resolve(); + m_in_pb1_cb.resolve(); + m_in_pb2_cb.resolve(); + m_in_pb3_cb.resolve(); + m_in_pb4_cb.resolve(); + m_in_pb5_cb.resolve(); + m_in_pb6_cb.resolve(); + m_in_pb7_cb.resolve(); m_out_pb0_cb.resolve_safe(); m_out_pb1_cb.resolve_safe(); m_out_pb2_cb.resolve_safe(); @@ -149,25 +190,56 @@ void mos6530_t::device_start() // allocate timer t_gen = timer_alloc(0); + // state saving + save_item(NAME(m_pa_in)); + save_item(NAME(m_pa_out)); + save_item(NAME(m_pa_ddr)); + save_item(NAME(m_pb_in)); + save_item(NAME(m_pb_out)); + save_item(NAME(m_pb_ddr)); + save_item(NAME(m_ie_timer)); + save_item(NAME(m_irq_timer)); + save_item(NAME(m_ie_edge)); + save_item(NAME(m_irq_edge)); + save_item(NAME(m_positive)); + save_item(NAME(m_shift)); + save_item(NAME(m_timer)); +} + +void mos6530_t::device_start() +{ + mos6530_base_t::device_start(); + // allocate RAM m_ram.allocate(0x40); } +void mos6532_t::device_start() +{ + mos6530_base_t::device_start(); + + // allocate RAM + m_ram.allocate(0x80); +} + //------------------------------------------------- // device_reset - device-specific reset //------------------------------------------------- -void mos6530_t::device_reset() +void mos6530_base_t::device_reset() { - m_ie = false; - m_irq = true; - m_pa_out = 0; m_pa_ddr = 0; m_pb_out = 0; m_pb_ddr = 0; + m_ie_timer = false; + m_irq_timer = true; + m_ie_edge = false; + m_irq_edge = false; + m_positive = false; + update_pa(); update_pb(); @@ -179,7 +251,7 @@ void mos6530_t::device_reset() // device_timer - handler timer events //------------------------------------------------- -void mos6530_t::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +void mos6530_base_t::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { live_sync(); live_run(); @@ -190,7 +262,7 @@ void mos6530_t::device_timer(emu_timer &timer, device_timer_id id, int param, vo // update_pa - //------------------------------------------------- -void mos6530_t::update_pa() +void mos6530_base_t::update_pa() { UINT8 out = m_pa_out; UINT8 ddr = m_pa_ddr; @@ -218,17 +290,42 @@ void mos6530_t::update_pa() // update_pb - //------------------------------------------------- +void mos6530_base_t::update_pb() +{ + UINT8 out = m_pb_out; + UINT8 ddr = m_pb_ddr; + UINT8 data = (out & ddr) | (ddr ^ 0xff); + + if (m_out_pb_cb.isnull()) + { + m_out_pb0_cb(BIT(data, 0)); + m_out_pb1_cb(BIT(data, 1)); + m_out_pb2_cb(BIT(data, 2)); + m_out_pb3_cb(BIT(data, 3)); + m_out_pb4_cb(BIT(data, 4)); + m_out_pb5_cb(BIT(data, 5)); + m_out_pb6_cb(BIT(data, 6)); + m_out_pb7_cb(BIT(data, 7)); + } + else + { + m_out_pb_cb(data); + } +} + void mos6530_t::update_pb() { UINT8 out = m_pb_out; UINT8 ddr = m_pb_ddr; UINT8 data = (out & ddr) | (ddr ^ 0xff); - if (m_ie) + if (m_ie_timer) { - data &= ~IRQ_TIMER; - data |= m_irq ? 0x00 : IRQ_TIMER; - m_irq_cb(m_irq ? ASSERT_LINE : CLEAR_LINE); + if (m_irq_timer) { + data |= IRQ_TIMER; + } else { + data &= ~IRQ_TIMER; + } } if (m_out_pb_cb.isnull()) @@ -250,11 +347,77 @@ void mos6530_t::update_pb() //------------------------------------------------- +// update_irq - +//------------------------------------------------- + +void mos6530_base_t::update_irq() +{ + int state = CLEAR_LINE; + + if (m_ie_timer && m_irq_timer) state = ASSERT_LINE; + if (m_ie_edge && m_irq_edge) state = ASSERT_LINE; + + m_irq_cb(state); +} + +void mos6530_t::update_irq() +{ + update_pb(); +} + + +//------------------------------------------------- +// get_irq_flags - +//------------------------------------------------- + +UINT8 mos6530_base_t::get_irq_flags() +{ + UINT8 data = 0; + + if (m_irq_timer) data |= IRQ_TIMER; + if (m_irq_edge) data |= IRQ_EDGE; + + return data; +} + +UINT8 mos6530_t::get_irq_flags() +{ + UINT8 data = 0; + + if (m_irq_timer) data |= IRQ_TIMER; + + return data; +} + + +//------------------------------------------------- +// edge_detect - +//------------------------------------------------- + +void mos6530_base_t::edge_detect(int old, int state) +{ + if (!m_irq_edge) + { + if (m_positive && !old && state) m_irq_edge = true; + if (!m_positive && old && !state) m_irq_edge = true; + + if (m_irq_edge) { + if (LOG) logerror("%s %s '%s' edge-detect IRQ\n", machine().time().as_string(), name(), tag()); + + update_irq(); + } + } +} + + +//------------------------------------------------- // pa_w - //------------------------------------------------- -void mos6530_t::pa_w(int bit, int state) +void mos6530_base_t::pa_w(int bit, int state) { + if (LOG) logerror("%s %s %s '%s' Port A Data Bit %u State %u\n", machine().time().as_string(), machine().describe_context(), name(), tag(), bit, state); + m_pa_in &= ~(1 << bit); m_pa_in |= (state << bit); } @@ -264,8 +427,10 @@ void mos6530_t::pa_w(int bit, int state) // pb_w - //------------------------------------------------- -void mos6530_t::pb_w(int bit, int state) +void mos6530_base_t::pb_w(int bit, int state) { + if (LOG) logerror("%s %s %s '%s' Port B Data Bit %u State %u\n", machine().time().as_string(), machine().describe_context(), name(), tag(), bit, state); + m_pb_in &= ~(1 << bit); m_pb_in |= (state << bit); } @@ -275,7 +440,7 @@ void mos6530_t::pb_w(int bit, int state) // pa_data_r - //------------------------------------------------- -READ8_MEMBER( mos6530_t::pa_data_r ) +READ8_MEMBER( mos6530_base_t::pa_data_r ) { UINT8 in = 0; @@ -300,7 +465,7 @@ READ8_MEMBER( mos6530_t::pa_data_r ) UINT8 ddr_in = m_pa_ddr ^ 0xff; UINT8 data = (out & ddr_out) | (in & ddr_in); - if (LOG) logerror("%s %s MOS6530 '%s' Port A Data In %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data); + if (LOG) logerror("%s %s %s '%s' Port A Data In %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); return data; } @@ -310,25 +475,32 @@ READ8_MEMBER( mos6530_t::pa_data_r ) // pa_data_w - //------------------------------------------------- -WRITE8_MEMBER( mos6530_t::pa_data_w ) +WRITE8_MEMBER( mos6530_base_t::pa_data_w ) { m_pa_out = data; - if (LOG) logerror("%s %s MOS6530 '%s' Port A Data Out %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data); + if (LOG) logerror("%s %s %s '%s' Port A Data Out %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); update_pa(); } +WRITE8_MEMBER( mos6532_t::pa_data_w ) +{ + edge_detect(BIT(m_pa_out, 7), BIT(data, 7)); + + mos6530_base_t::pa_data_w(space, offset, data); +} + //------------------------------------------------- // pa_ddr_w - //------------------------------------------------- -WRITE8_MEMBER( mos6530_t::pa_ddr_w ) +WRITE8_MEMBER( mos6530_base_t::pa_ddr_w ) { m_pa_ddr = data; - if (LOG) logerror("%s %s MOS6530 '%s' Port A DDR %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data); + if (LOG) logerror("%s %s %s '%s' Port A DDR %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); update_pa(); } @@ -338,7 +510,7 @@ WRITE8_MEMBER( mos6530_t::pa_ddr_w ) // pb_data_r - //------------------------------------------------- -READ8_MEMBER( mos6530_t::pb_data_r ) +READ8_MEMBER( mos6530_base_t::pb_data_r ) { UINT8 in = 0; @@ -363,7 +535,7 @@ READ8_MEMBER( mos6530_t::pb_data_r ) UINT8 ddr_in = m_pb_ddr ^ 0xff; UINT8 data = (out & ddr_out) | (in & ddr_in); - if (LOG) logerror("%s %s MOS6530 '%s' Port B Data In %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data); + if (LOG) logerror("%s %s %s '%s' Port B Data In %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); return data; } @@ -373,11 +545,11 @@ READ8_MEMBER( mos6530_t::pb_data_r ) // pb_data_w - //------------------------------------------------- -WRITE8_MEMBER( mos6530_t::pb_data_w ) +WRITE8_MEMBER( mos6530_base_t::pb_data_w ) { m_pb_out = data; - if (LOG) logerror("%s %s MOS6530 '%s' Port B Data Out %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data); + if (LOG) logerror("%s %s %s '%s' Port B Data Out %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); update_pb(); } @@ -387,11 +559,11 @@ WRITE8_MEMBER( mos6530_t::pb_data_w ) // pb_ddr_w - //------------------------------------------------- -WRITE8_MEMBER( mos6530_t::pb_ddr_w ) +WRITE8_MEMBER( mos6530_base_t::pb_ddr_w ) { m_pb_ddr = data; - if (LOG) logerror("%s %s MOS6530 '%s' Port B DDR %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data); + if (LOG) logerror("%s %s %s '%s' Port B DDR %02x\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data); update_pb(); } @@ -401,7 +573,7 @@ WRITE8_MEMBER( mos6530_t::pb_ddr_w ) // timer_r - //------------------------------------------------- -READ8_MEMBER( mos6530_t::timer_r ) +READ8_MEMBER( mos6530_base_t::timer_r ) { UINT8 data = 0; @@ -410,7 +582,7 @@ READ8_MEMBER( mos6530_t::timer_r ) if (offset & 0x01) { - data = m_irq ? 0x80 : 0x00; + data |= get_irq_flags(); } else { @@ -421,12 +593,23 @@ READ8_MEMBER( mos6530_t::timer_r ) checkpoint(); live_run(); - m_ie = BIT(offset, 3) ? true : false; + m_ie_timer = BIT(offset, 3) ? true : false; + } + + bool irq_dirty = false; + + if (m_irq_timer) { + m_irq_timer = false; + irq_dirty = true; + } + + if (m_irq_edge) { + m_irq_edge = false; + irq_dirty = true; } - if (m_irq) { - m_irq = false; - update_pb(); + if (irq_dirty) { + update_irq(); } return data; @@ -437,7 +620,7 @@ READ8_MEMBER( mos6530_t::timer_r ) // timer_w - //------------------------------------------------- -WRITE8_MEMBER( mos6530_t::timer_w ) +WRITE8_MEMBER( mos6530_base_t::timer_w ) { live_sync(); @@ -450,13 +633,13 @@ WRITE8_MEMBER( mos6530_t::timer_w ) case 3: m_shift = 1024; break; } - m_ie = BIT(offset, 3) ? true : false; + m_ie_timer = BIT(offset, 3) ? true : false; - if (LOG_TIMER) logerror("%s %s MOS6530 '%s' Timer value %02x shift %u IE %u\n", machine().time().as_string(), machine().describe_context(), tag(), data, m_shift, m_ie ? 1 : 0); + if (LOG_TIMER) logerror("%s %s %s '%s' Timer value %02x shift %u IE %u\n", machine().time().as_string(), machine().describe_context(), name(), tag(), data, m_shift, m_ie_timer ? 1 : 0); - if (m_irq) { - m_irq = false; - update_pb(); + if (m_irq_timer) { + m_irq_timer = false; + update_irq(); } checkpoint(); @@ -471,10 +654,35 @@ WRITE8_MEMBER( mos6530_t::timer_w ) //------------------------------------------------- +// edge_w - +//------------------------------------------------- + +WRITE8_MEMBER( mos6530_base_t::edge_w ) +{ + m_positive = BIT(data, 0) ? true : false; + m_ie_edge = BIT(data, 1) ? false : true; + + if (LOG) logerror("%s %s %s '%s' %s edge-detect, %s interrupt\n", machine().time().as_string(), machine().describe_context(), name(), tag(), m_positive ? "positive" : "negative", m_ie_edge ? "enable" : "disable"); +} + + +//------------------------------------------------- +// pa7_w - +//------------------------------------------------- + +WRITE_LINE_MEMBER( mos6532_t::pa7_w ) +{ + edge_detect(BIT(m_pa_in, 7), state); + + mos6530_base_t::pa7_w(state); +} + + +//------------------------------------------------- // live_start - //------------------------------------------------- -void mos6530_t::live_start() +void mos6530_base_t::live_start() { cur_live.period = attotime::from_hz(clock() / m_shift); cur_live.tm = machine().time() + cur_live.period; @@ -489,17 +697,17 @@ void mos6530_t::live_start() live_run(); } -void mos6530_t::checkpoint() +void mos6530_base_t::checkpoint() { checkpoint_live = cur_live; } -void mos6530_t::rollback() +void mos6530_base_t::rollback() { cur_live = checkpoint_live; } -void mos6530_t::live_delay(int state) +void mos6530_base_t::live_delay(int state) { cur_live.next_state = state; if(cur_live.tm != machine().time()) @@ -508,7 +716,7 @@ void mos6530_t::live_delay(int state) live_sync(); } -void mos6530_t::live_sync() +void mos6530_base_t::live_sync() { if(!cur_live.tm.is_never()) { if(cur_live.tm > machine().time()) { @@ -528,7 +736,7 @@ void mos6530_t::live_sync() } } -void mos6530_t::live_abort() +void mos6530_base_t::live_abort() { if(!cur_live.tm.is_never() && cur_live.tm > machine().time()) { rollback(); @@ -542,7 +750,7 @@ void mos6530_t::live_abort() cur_live.irq = false; } -void mos6530_t::live_run(const attotime &limit) +void mos6530_base_t::live_run(const attotime &limit) { if(cur_live.state == IDLE || cur_live.next_state != -1) return; @@ -555,7 +763,7 @@ void mos6530_t::live_run(const attotime &limit) cur_live.value--; - if (LOG_TIMER) logerror("%s MOS6530 '%s' timer %02x IRQ 1\n", cur_live.tm.as_string(), tag(), cur_live.value); + if (LOG_TIMER) logerror("%s %s '%s' timer %02x IRQ 1\n", cur_live.tm.as_string(), name(), tag(), cur_live.value); if (!cur_live.value) { cur_live.period = attotime::from_hz(clock()); @@ -573,7 +781,7 @@ void mos6530_t::live_run(const attotime &limit) cur_live.value--; cur_live.irq = true; - if (LOG_TIMER) logerror("%s MOS6530 '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), tag(), cur_live.value); + if (LOG_TIMER) logerror("%s %s '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), name(), tag(), cur_live.value); live_delay(RUNNING_SYNCPOINT); @@ -582,10 +790,10 @@ void mos6530_t::live_run(const attotime &limit) } case RUNNING_SYNCPOINT: { - if (LOG_TIMER) logerror("%s MOS6530 '%s' IRQ\n", machine().time().as_string(), tag()); + if (LOG_TIMER) logerror("%s %s '%s' timer IRQ\n", machine().time().as_string(), name(), tag()); - m_irq = true; - update_pb(); + m_irq_timer = true; + update_irq(); cur_live.state = RUNNING_AFTER_INTERRUPT; checkpoint(); @@ -598,7 +806,7 @@ void mos6530_t::live_run(const attotime &limit) cur_live.value--; - if (LOG_TIMER) logerror("%s MOS6530 '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), tag(), cur_live.value); + if (LOG_TIMER) logerror("%s %s '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), name(), tag(), cur_live.value); if (!cur_live.value) { live_abort(); diff --git a/src/emu/machine/mos6530n.h b/src/emu/machine/mos6530n.h index 24a88af2c96..51fbe3988c4 100644 --- a/src/emu/machine/mos6530n.h +++ b/src/emu/machine/mos6530n.h @@ -3,6 +3,7 @@ /********************************************************************** MOS Technology 6530 Memory, I/O, Timer Array emulation + MOS Technology 6532 RAM, I/O, Timer Array emulation ********************************************************************** _____ _____ @@ -27,6 +28,28 @@ CS2/PB5 19 | | 22 PB3 Vcc 20 |_____________| 21 PB4 + _____ _____ + Vss 1 |* \_/ | 40 A6 + A5 2 | | 39 phi2 + A4 3 | | 38 CS1 + A3 4 | | 37 _CS2 + A2 5 | | 36 _RS + A1 6 | | 35 R/W + A0 7 | | 34 _RES + PA0 8 | | 33 D0 + PA1 9 | | 32 D1 + PA2 10 | MCS6532 | 31 D2 + PA3 11 | | 30 D3 + PA4 12 | | 29 D4 + PA5 13 | | 28 D5 + PA6 14 | | 27 D6 + PA7 15 | | 26 D7 + PB7 16 | | 25 _IRQ + PB6 17 | | 24 PB0 + PB5 18 | | 23 PB1 + PB4 19 | | 22 PB2 + Vcc 20 |_____________| 21 PB3 + **********************************************************************/ #pragma once @@ -43,115 +66,115 @@ //************************************************************************** #define MCFG_MOS6530n_IRQ_CB(_write) \ - devcb = &mos6530_t::set_irq_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_irq_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_IN_PA_CB(_read) \ - devcb = &mos6530_t::set_pa_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_OUT_PA_CB(_write) \ - devcb = &mos6530_t::set_pa_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_IN_PB_CB(_read) \ - devcb = &mos6530_t::set_pb_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_OUT_PB_CB(_write) \ - devcb = &mos6530_t::set_pb_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_IN_PA0_CB(_read) \ - devcb = &mos6530_t::set_pa0_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa0_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA1_CB(_read) \ - devcb = &mos6530_t::set_pa1_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa1_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA2_CB(_read) \ - devcb = &mos6530_t::set_pa2_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa2_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA3_CB(_read) \ - devcb = &mos6530_t::set_pa3_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa3_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA4_CB(_read) \ - devcb = &mos6530_t::set_pa4_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa4_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA5_CB(_read) \ - devcb = &mos6530_t::set_pa5_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa5_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA6_CB(_read) \ - devcb = &mos6530_t::set_pa6_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa6_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PA7_CB(_read) \ - devcb = &mos6530_t::set_pa7_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pa7_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_OUT_PA0_CB(_write) \ - devcb = &mos6530_t::set_pa0_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa0_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA1_CB(_write) \ - devcb = &mos6530_t::set_pa1_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa1_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA2_CB(_write) \ - devcb = &mos6530_t::set_pa2_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa2_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA3_CB(_write) \ - devcb = &mos6530_t::set_pa3_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa3_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA4_CB(_write) \ - devcb = &mos6530_t::set_pa4_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa4_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA5_CB(_write) \ - devcb = &mos6530_t::set_pa5_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa5_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA6_CB(_write) \ - devcb = &mos6530_t::set_pa6_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa6_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PA7_CB(_write) \ - devcb = &mos6530_t::set_pa7_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pa7_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_IN_PB0_CB(_read) \ - devcb = &mos6530_t::set_pb0_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb0_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB1_CB(_read) \ - devcb = &mos6530_t::set_pb1_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb1_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB2_CB(_read) \ - devcb = &mos6530_t::set_pb2_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb2_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB3_CB(_read) \ - devcb = &mos6530_t::set_pb3_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb3_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB4_CB(_read) \ - devcb = &mos6530_t::set_pb4_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb4_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB5_CB(_read) \ - devcb = &mos6530_t::set_pb5_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb5_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB6_CB(_read) \ - devcb = &mos6530_t::set_pb6_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb6_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_IN_PB7_CB(_read) \ - devcb = &mos6530_t::set_pb7_rd_callback(*device, DEVCB_##_read); + devcb = &mos6530_base_t::set_pb7_rd_callback(*device, DEVCB_##_read); #define MCFG_MOS6530n_OUT_PB0_CB(_write) \ - devcb = &mos6530_t::set_pb0_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb0_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB1_CB(_write) \ - devcb = &mos6530_t::set_pb1_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb1_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB2_CB(_write) \ - devcb = &mos6530_t::set_pb2_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb2_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB3_CB(_write) \ - devcb = &mos6530_t::set_pb3_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb3_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB4_CB(_write) \ - devcb = &mos6530_t::set_pb4_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb4_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB5_CB(_write) \ - devcb = &mos6530_t::set_pb5_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb5_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB6_CB(_write) \ - devcb = &mos6530_t::set_pb6_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb6_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_OUT_PB7_CB(_write) \ - devcb = &mos6530_t::set_pb7_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_base_t::set_pb7_wr_callback(*device, DEVCB_##_write); @@ -159,55 +182,51 @@ // TYPE DEFINITIONS //************************************************************************** -// ======================> mos6530_t +// ======================> mos6530_base_t -class mos6530_t : public device_t +class mos6530_base_t : public device_t { public: // construction/destruction - mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_irq_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa0_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa0_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa1_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa1_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa2_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa2_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa3_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa3_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa4_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa4_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa5_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa5_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa6_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa6_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa7_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pa7_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa0_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa0_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa1_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa1_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa2_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa2_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa3_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa3_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa4_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa4_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa5_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa5_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa6_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa6_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pa7_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pa7_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb0_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb0_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb1_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb1_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb2_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb2_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb3_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb3_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb4_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb4_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb5_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb5_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb6_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb6_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb7_rd_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_in_pb7_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb0_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb0_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb1_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb1_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb2_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb2_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb3_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb3_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb4_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb4_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb5_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb5_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb6_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb6_cb.set_callback(object); } - template<class _Object> static devcb_base &set_pb7_wr_callback(device_t &device, _Object object) { return downcast<mos6530_t &>(device).m_out_pb7_cb.set_callback(object); } - - virtual DECLARE_ADDRESS_MAP(rom_map, 8); - virtual DECLARE_ADDRESS_MAP(ram_map, 8); - virtual DECLARE_ADDRESS_MAP(io_map, 8); + mos6530_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + + template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_irq_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa0_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa0_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa1_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa1_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa2_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa2_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa3_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa3_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa4_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa4_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa5_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa5_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa6_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa6_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa7_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pa7_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa0_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa0_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa1_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa1_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa2_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa2_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa3_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa3_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa4_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa4_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa5_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa5_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa6_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa6_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pa7_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pa7_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb0_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb0_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb1_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb1_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb2_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb2_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb3_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb3_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb4_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb4_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb5_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb5_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb6_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb6_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb7_rd_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_in_pb7_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb0_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb0_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb1_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb1_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb2_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb2_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb3_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb3_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb4_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb4_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb5_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb5_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb6_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb6_cb.set_callback(object); } + template<class _Object> static devcb_base &set_pb7_wr_callback(device_t &device, _Object object) { return downcast<mos6530_base_t &>(device).m_out_pb7_cb.set_callback(object); } DECLARE_WRITE_LINE_MEMBER( pa0_w ) { pa_w(0, state); } DECLARE_WRITE_LINE_MEMBER( pa1_w ) { pa_w(1, state); } @@ -235,11 +254,15 @@ protected: enum { + IRQ_EDGE = 0x40, IRQ_TIMER = 0x80 }; void update_pa(); - void update_pb(); + virtual void update_pb(); + virtual void update_irq(); + virtual UINT8 get_irq_flags(); + void edge_detect(int old, int state); void pa_w(int bit, int state); void pb_w(int bit, int state); @@ -254,9 +277,9 @@ protected: DECLARE_WRITE8_MEMBER( pa_ddr_w ); DECLARE_READ8_MEMBER( pb_ddr_r ) { return m_pb_ddr; } DECLARE_WRITE8_MEMBER( pb_ddr_w ); - DECLARE_READ8_MEMBER( irq_r ) { return m_irq ? 0x80 : 0x00; } DECLARE_READ8_MEMBER( timer_r ); DECLARE_WRITE8_MEMBER( timer_w ); + DECLARE_WRITE8_MEMBER( edge_w ); optional_shared_ptr<UINT8> m_ram; @@ -306,8 +329,12 @@ protected: UINT8 m_pb_out; UINT8 m_pb_ddr; - bool m_ie; - bool m_irq; + bool m_ie_timer; + bool m_irq_timer; + + bool m_ie_edge; + bool m_irq_edge; + bool m_positive; int m_shift; UINT8 m_timer; @@ -341,8 +368,48 @@ protected: }; +class mos6530_t : public mos6530_base_t +{ +public: + // construction/destruction + mos6530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual DECLARE_ADDRESS_MAP(rom_map, 8); + virtual DECLARE_ADDRESS_MAP(ram_map, 8); + virtual DECLARE_ADDRESS_MAP(io_map, 8); + +protected: + // device-level overrides + virtual void device_start(); + + void update_pb(); + void update_irq(); + UINT8 get_irq_flags(); +}; + + +class mos6532_t : public mos6530_base_t +{ +public: + // construction/destruction + mos6532_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual DECLARE_ADDRESS_MAP(ram_map, 8); + virtual DECLARE_ADDRESS_MAP(io_map, 8); + + DECLARE_WRITE8_MEMBER( pa_data_w ); + + DECLARE_WRITE_LINE_MEMBER( pa7_w ); + +protected: + // device-level overrides + virtual void device_start(); +}; + + // device type definition extern const device_type MOS6530n; +extern const device_type MOS6532n; diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c index 832bbc90439..2e8ac83461c 100644 --- a/src/emu/machine/netlist.c +++ b/src/emu/machine/netlist.c @@ -353,6 +353,8 @@ void netlist_mame_device_t::device_stop() LOG_DEV_CALLS(("device_stop\n")); m_setup->print_stats(); + m_netlist->stop(); + global_free(m_setup); m_setup = NULL; global_free(m_netlist); @@ -556,7 +558,7 @@ void netlist_mame_sound_device_t::device_start() // Configure outputs - plinearlist_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>(); + plist_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>(); if (outdevs.count() == 0) fatalerror("No output devices"); @@ -582,7 +584,7 @@ void netlist_mame_sound_device_t::device_start() m_num_inputs = 0; m_in = NULL; - plinearlist_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>(); + plist_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>(); if (indevs.count() > 1) fatalerror("A maximum of one input device is allowed!"); if (indevs.count() == 1) diff --git a/src/emu/machine/netlist.h b/src/emu/machine/netlist.h index b8c608359c4..c6e8e2ce396 100644 --- a/src/emu/machine/netlist.h +++ b/src/emu/machine/netlist.h @@ -66,27 +66,6 @@ #define NETDEV_ANALOG_CALLBACK_MEMBER(_name) \ void _name(const double data, const attotime &time) - -#if 0 -#define NETDEV_ANALOG_CALLBACK(_name, _IN, _class, _member, _tag) \ - { \ - NETLIB_NAME(analog_callback) *dev = downcast<NETLIB_NAME(analog_callback) *>(netlist.register_dev(NET_NEW(analog_callback), # _name)); \ - netlist_analog_output_delegate d = netlist_analog_output_delegate(& _class :: _member, # _class "::" # _member, _tag, (_class *) 0); \ - dev->register_callback(d); \ - } \ - NET_CONNECT(_name, IN, _IN) -#endif - -#if 0 -#define NETDEV_SOUND_OUT(_name, _v, _m) \ - NET_REGISTER_DEV(sound_out, _name) \ - PARAM(_name.CHAN, _v) \ - PARAM(_name.MULT, _m) - -#define NETDEV_SOUND_IN(_name) \ - NET_REGISTER_DEV(sound_in, _name) -#endif - class netlist_mame_device_t; class netlist_mame_t : public netlist_base_t @@ -518,7 +497,7 @@ class NETLIB_NAME(analog_callback) : public netlist_device_t { public: NETLIB_NAME(analog_callback)() - : netlist_device_t(), m_cpu_device(NULL) { } + : netlist_device_t(), m_cpu_device(NULL), m_last(0) { } ATTR_COLD void start() { @@ -601,7 +580,7 @@ public: ATTR_HOT void update() { - double val = INPANALOG(m_in); + nl_double val = INPANALOG(m_in); sound_update(netlist().time()); m_cur = (stream_sample_t) (val * m_mult.Value() + m_offset.Value()); } @@ -685,7 +664,7 @@ public: { if (m_buffer[i] == NULL) break; // stop, called outside of stream_update - double v = m_buffer[i][m_pos]; + nl_double v = m_buffer[i][m_pos]; m_param[i]->setTo(v * m_param_mult[i].Value() + m_param_offset[i].Value()); } m_pos++; diff --git a/src/emu/machine/pcf8593.c b/src/emu/machine/pcf8593.c index 72804642466..48e002fdf2d 100644 --- a/src/emu/machine/pcf8593.c +++ b/src/emu/machine/pcf8593.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /********************************************************************* diff --git a/src/emu/machine/pcf8593.h b/src/emu/machine/pcf8593.h index 3cf9f3c3957..2475f0a2dfe 100644 --- a/src/emu/machine/pcf8593.h +++ b/src/emu/machine/pcf8593.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /********************************************************************* diff --git a/src/emu/machine/rp5h01.c b/src/emu/machine/rp5h01.c index 91d133712da..53691cf160f 100644 --- a/src/emu/machine/rp5h01.c +++ b/src/emu/machine/rp5h01.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** RP5H01 - Ricoh 64x1bit(+8bit) PROM with 6/7-bit counter diff --git a/src/emu/machine/rp5h01.h b/src/emu/machine/rp5h01.h index 2979d1b0a57..016f05884ae 100644 --- a/src/emu/machine/rp5h01.h +++ b/src/emu/machine/rp5h01.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** RP5H01 - Ricoh 64x1bit(+8bit) PROM with 6/7-bit counter diff --git a/src/emu/machine/s2636.c b/src/emu/machine/s2636.c index 2a33bfe6857..706c4195f7c 100644 --- a/src/emu/machine/s2636.c +++ b/src/emu/machine/s2636.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mariusz Wojcieszek, Peter Trauner /********************************************************************** Signetics 2636 video chip diff --git a/src/emu/machine/s2636.h b/src/emu/machine/s2636.h index 53aae846abb..4e8859f65b9 100644 --- a/src/emu/machine/s2636.h +++ b/src/emu/machine/s2636.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mariusz Wojcieszek, Peter Trauner /********************************************************************** Signetics 2636 video chip diff --git a/src/emu/machine/s3c2400.c b/src/emu/machine/s3c2400.c index 86a2d4582b5..d47e81b08ce 100644 --- a/src/emu/machine/s3c2400.c +++ b/src/emu/machine/s3c2400.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h index e88af70f208..f274e5ad36d 100644 --- a/src/emu/machine/s3c2400.h +++ b/src/emu/machine/s3c2400.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c2410.c b/src/emu/machine/s3c2410.c index c3b90ad1646..ac5bec78180 100644 --- a/src/emu/machine/s3c2410.c +++ b/src/emu/machine/s3c2410.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h index 9f811e6a8b9..6ad02c90d1e 100644 --- a/src/emu/machine/s3c2410.h +++ b/src/emu/machine/s3c2410.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c2440.c b/src/emu/machine/s3c2440.c index 3612fb07d68..eaa0301d157 100644 --- a/src/emu/machine/s3c2440.c +++ b/src/emu/machine/s3c2440.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h index 7382c6e9366..b76148eca09 100644 --- a/src/emu/machine/s3c2440.h +++ b/src/emu/machine/s3c2440.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c44b0.c b/src/emu/machine/s3c44b0.c index 2719a157c99..fb9d3f15036 100644 --- a/src/emu/machine/s3c44b0.c +++ b/src/emu/machine/s3c44b0.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/s3c44b0.h b/src/emu/machine/s3c44b0.h index 5a4ee95f61f..462bda280d2 100644 --- a/src/emu/machine/s3c44b0.h +++ b/src/emu/machine/s3c44b0.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c index 7cd1dc3daea..26a4d2fea70 100644 --- a/src/emu/machine/tmp68301.c +++ b/src/emu/machine/tmp68301.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia /*************************************************************************** TMP68301 basic emulation + Interrupt Handling diff --git a/src/emu/machine/tmp68301.h b/src/emu/machine/tmp68301.h index 627e80e8326..d7a49a434b7 100644 --- a/src/emu/machine/tmp68301.h +++ b/src/emu/machine/tmp68301.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia #ifndef TMP68301_H #define TMP68301_H diff --git a/src/emu/machine/upd1990a.c b/src/emu/machine/upd1990a.c index 9069deb96a2..f40bb30af48 100644 --- a/src/emu/machine/upd1990a.c +++ b/src/emu/machine/upd1990a.c @@ -309,7 +309,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) m_shift_reg[i] = m_time_counter[i]; // data out pulse: uPD4990A: 1Hz, uPD1990A: 512Hz in testmode, 0.5Hz in normal mode - float div; + double div; if (m_variant == TYPE_4990A) div = 32768.0; else if (m_testmode) @@ -331,7 +331,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) case MODE_TP_4096HZ: { // set timer pulse - const float div[4] = { 512.0, 128.0, 16.0, 8.0 }; + const double div[4] = { 512.0, 128.0, 16.0, 8.0 }; m_timer_tp->adjust(attotime::zero, 0, attotime::from_hz((clock() / div[m_c - MODE_TP_64HZ]) * 2.0)); break; @@ -344,7 +344,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) { // set timer pulse attotime one_second = attotime::from_hz(clock() / 32768.0); - const float mul[4] = { 1.0, 10.0, 30.0, 60.0 }; + const double mul[4] = { 1.0, 10.0, 30.0, 60.0 }; m_timer_tp->adjust(attotime::zero, 0, one_second * mul[m_c - MODE_TP_1S_INT] / 2.0); break; diff --git a/src/emu/machine/upd7002.c b/src/emu/machine/upd7002.c index c47b54b8ace..b74d1bbf1d0 100644 --- a/src/emu/machine/upd7002.c +++ b/src/emu/machine/upd7002.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Gordon Jefferyes /****************************************************************************** uPD7002 Analogue to Digital Converter diff --git a/src/emu/machine/upd7002.h b/src/emu/machine/upd7002.h index 2a488dbb87d..aba6bb8b36f 100644 --- a/src/emu/machine/upd7002.h +++ b/src/emu/machine/upd7002.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Gordon Jefferyes /***************************************************************************** * diff --git a/src/emu/machine/vrc4373.c b/src/emu/machine/vrc4373.c index cd635d6b02c..d1a5672c097 100644 --- a/src/emu/machine/vrc4373.c +++ b/src/emu/machine/vrc4373.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green #include "vrc4373.h" diff --git a/src/emu/machine/vrc4373.h b/src/emu/machine/vrc4373.h index 652f9bf125b..6b94dc5b29c 100644 --- a/src/emu/machine/vrc4373.h +++ b/src/emu/machine/vrc4373.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green // NEC VRC 4373 System Controller diff --git a/src/emu/machine/wd_fdc.c b/src/emu/machine/wd_fdc.c index 79e766da362..b0dd5e2376d 100644 --- a/src/emu/machine/wd_fdc.c +++ b/src/emu/machine/wd_fdc.c @@ -1052,7 +1052,7 @@ UINT8 wd_fdc_t::status_r() intrq_cb(intrq); } - if((main_state == IDLE && !drq) || status_type_1) { + if(status_type_1) { if(floppy && floppy->idx_r()) status |= S_IP; else diff --git a/src/emu/memory.h b/src/emu/memory.h index 7503301453e..da91f4c0baf 100644 --- a/src/emu/memory.h +++ b/src/emu/memory.h @@ -653,6 +653,8 @@ public: // getters memory_share *next() const { return m_next; } + // NOTE: this being NULL in a C++ member function can lead to undefined behavior. + // However, it is relied on throughout MAME, so will remain for now. void *ptr() const { if (this == NULL) return NULL; return m_ptr; } size_t bytes() const { return m_bytes; } endianness_t endianness() const { return m_endianness; } diff --git a/src/emu/netlist/analog/nld_bjt.c b/src/emu/netlist/analog/nld_bjt.c index cd7c6107ade..73ffc37bd2c 100644 --- a/src/emu/netlist/analog/nld_bjt.c +++ b/src/emu/netlist/analog/nld_bjt.c @@ -144,22 +144,11 @@ NETLIB_UPDATE_TERMINALS(QBJT_switch) const int new_state = (m_RB.deltaV() * m > m_V ) ? 1 : 0; if (m_state_on ^ new_state) { -#if 0 - nl_double gb = m_gB; - nl_double gc = m_gC; - nl_double v = m_V * m; - if (!new_state ) - { - // not conducting - gb = netlist().gmin(); - v = 0; - gc = netlist().gmin(); - } -#else + const nl_double gb = new_state ? m_gB : netlist().gmin(); const nl_double gc = new_state ? m_gC : netlist().gmin(); const nl_double v = new_state ? m_V * m : 0; -#endif + m_RB.set(gb, v, 0.0); m_RC.set(gc, 0.0, 0.0); //m_RB.update_dev(); diff --git a/src/emu/netlist/analog/nld_fourterm.c b/src/emu/netlist/analog/nld_fourterm.c index 9b69e0dd594..e2457d8ee11 100644 --- a/src/emu/netlist/analog/nld_fourterm.c +++ b/src/emu/netlist/analog/nld_fourterm.c @@ -15,8 +15,8 @@ NETLIB_START(VCCS) { - start_internal(1.0 / netlist().gmin()); - m_gfac = 1.0; + start_internal(NL_FCONST(1.0) / netlist().gmin()); + m_gfac = NL_FCONST(1.0); } void NETLIB_NAME(VCCS)::start_internal(const nl_double def_RI) @@ -48,16 +48,16 @@ void NETLIB_NAME(VCCS)::start_internal(const nl_double def_RI) NETLIB_RESET(VCCS) { const nl_double m_mult = m_G.Value() * m_gfac; // 1.0 ==> 1V ==> 1A - const nl_double GI = 1.0 / m_RI.Value(); + const nl_double GI = NL_FCONST(1.0) / m_RI.Value(); m_IP.set(GI); m_IN.set(GI); - m_OP.set(m_mult, 0.0); - m_OP1.set(-m_mult, 0.0); + m_OP.set(m_mult, NL_FCONST(0.0)); + m_OP1.set(-m_mult, NL_FCONST(0.0)); - m_ON.set(-m_mult, 0.0); - m_ON1.set(m_mult, 0.0); + m_ON.set(-m_mult, NL_FCONST(0.0)); + m_ON1.set(m_mult, NL_FCONST(0.0)); } NETLIB_UPDATE_PARAM(VCCS) @@ -85,7 +85,7 @@ NETLIB_UPDATE(VCCS) NETLIB_START(CCCS) { start_internal(1.0); - m_gfac = 1.0 / m_RI.Value(); + m_gfac = NL_FCONST(1.0) / m_RI.Value(); } NETLIB_RESET(CCCS) @@ -125,11 +125,11 @@ NETLIB_START(VCVS) NETLIB_RESET(VCVS) { - m_gfac = 1.0 / m_RO.Value(); + m_gfac = NL_FCONST(1.0) / m_RO.Value(); NETLIB_NAME(VCCS)::reset(); - m_OP2.set(1.0 / m_RO.Value()); - m_ON2.set(1.0 / m_RO.Value()); + m_OP2.set(NL_FCONST(1.0) / m_RO.Value()); + m_ON2.set(NL_FCONST(1.0) / m_RO.Value()); } NETLIB_UPDATE_PARAM(VCVS) diff --git a/src/emu/netlist/analog/nld_ms_direct.h b/src/emu/netlist/analog/nld_ms_direct.h index 13bd9c5b22d..a57dcfc0869 100644 --- a/src/emu/netlist/analog/nld_ms_direct.h +++ b/src/emu/netlist/analog/nld_ms_direct.h @@ -23,16 +23,16 @@ 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 const int N() const { return (m_N == 0 ? m_dim : m_N); } + ATTR_HOT inline int N() const { return (m_N == 0 ? m_dim : m_N); } - ATTR_HOT inline int vsolve_non_dynamic(); + ATTR_HOT inline int vsolve_non_dynamic(const bool newton_raphson); protected: ATTR_COLD virtual void add_term(int net_idx, netlist_terminal_t *term); ATTR_HOT virtual nl_double vsolve(); - ATTR_HOT int solve_non_dynamic(); + ATTR_HOT int solve_non_dynamic(const bool newton_raphson); ATTR_HOT void build_LE_A(); ATTR_HOT void build_LE_RHS(); ATTR_HOT void LE_solve(); @@ -106,8 +106,8 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::compute_next n->m_h_n_m_1 = hn; n->m_DD_n_m_1 = DD_n; - if (nl_math::abs(DD2) > 1e-50) // avoid div-by-zero - new_net_timestep = nl_math::sqrt(m_params.m_lte / nl_math::abs(0.5*DD2)); + if (nl_math::abs(DD2) > NL_FCONST(1e-30)) // avoid div-by-zero + new_net_timestep = nl_math::sqrt(m_params.m_lte / nl_math::abs(NL_FCONST(0.5)*DD2)); else new_net_timestep = m_params.m_max_timestep; @@ -312,7 +312,7 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() for (int j = i + 1; j < kN; j++) { const nl_double f1 = - m_A[j][i] * f; - if (f1 != 0.0) + if (f1 != NL_FCONST(0.0)) { for (int k = i + 1; k < kN; k++) m_A[j][k] += m_A[i][k] * f1; @@ -365,7 +365,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::delta( cerr2 = (e2 > cerr2 ? e2 : cerr2); } // FIXME: Review - return cerr + cerr2*100000.0; + return cerr + cerr2*NL_FCONST(100000.0); } template <int m_N, int _storage_N> @@ -394,7 +394,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve() template <int m_N, int _storage_N> -ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic() +ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(const bool newton_raphson) { nl_double new_v[_storage_N]; // = { 0.0 }; @@ -416,13 +416,13 @@ ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic( } template <int m_N, int _storage_N> -ATTR_HOT inline int netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_dynamic() +ATTR_HOT inline int netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson) { this->build_LE_A(); this->build_LE_RHS(); this->LE_solve(); - return this->solve_non_dynamic(); + return this->solve_non_dynamic(newton_raphson); } template <int m_N, int _storage_N> diff --git a/src/emu/netlist/analog/nld_ms_direct1.h b/src/emu/netlist/analog/nld_ms_direct1.h index f2b265fea32..c62eec033f2 100644 --- a/src/emu/netlist/analog/nld_ms_direct1.h +++ b/src/emu/netlist/analog/nld_ms_direct1.h @@ -18,7 +18,7 @@ public: netlist_matrix_solver_direct1_t(const netlist_solver_parameters_t ¶ms) : netlist_matrix_solver_direct_t<1, 1>(params, 1) {} - ATTR_HOT inline int vsolve_non_dynamic(); + ATTR_HOT inline int vsolve_non_dynamic(const bool newton_raphson); protected: ATTR_HOT virtual nl_double vsolve(); private: @@ -34,7 +34,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct1_t::vsolve() return this->compute_next_timestep(); } -ATTR_HOT inline int netlist_matrix_solver_direct1_t::vsolve_non_dynamic() +ATTR_HOT inline int netlist_matrix_solver_direct1_t::vsolve_non_dynamic(const bool newton_raphson) { netlist_analog_net_t *net = m_nets[0]; this->build_LE_A(); diff --git a/src/emu/netlist/analog/nld_ms_direct2.h b/src/emu/netlist/analog/nld_ms_direct2.h index 13b673bd9e3..273821f3482 100644 --- a/src/emu/netlist/analog/nld_ms_direct2.h +++ b/src/emu/netlist/analog/nld_ms_direct2.h @@ -20,7 +20,7 @@ public: netlist_matrix_solver_direct2_t(const netlist_solver_parameters_t ¶ms) : netlist_matrix_solver_direct_t<2, 2>(params, 2) {} - ATTR_HOT inline int vsolve_non_dynamic(); + ATTR_HOT inline int vsolve_non_dynamic(const bool newton_raphson); protected: ATTR_HOT virtual nl_double vsolve(); private: @@ -36,7 +36,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct2_t::vsolve() return this->compute_next_timestep(); } -ATTR_HOT inline int netlist_matrix_solver_direct2_t::vsolve_non_dynamic() +ATTR_HOT inline int netlist_matrix_solver_direct2_t::vsolve_non_dynamic(const bool newton_raphson) { build_LE_A(); build_LE_RHS(); diff --git a/src/emu/netlist/analog/nld_ms_jakobi.h b/src/emu/netlist/analog/nld_ms_jakobi.h index 39143d64fe0..e64e28f6f41 100644 --- a/src/emu/netlist/analog/nld_ms_jakobi.h +++ b/src/emu/netlist/analog/nld_ms_jakobi.h @@ -24,7 +24,7 @@ public: , m_gs_fail(0) , m_gs_total(0) { - const char *p = osd_getenv("NETLIST_STATS"); + const char *p = osd_getenv("NL_STATS"); if (p != NULL) m_log_stats = (bool) atoi(p); else diff --git a/src/emu/netlist/analog/nld_ms_sor.h b/src/emu/netlist/analog/nld_ms_sor.h index 72762ce7dc3..fe9ee0366a6 100644 --- a/src/emu/netlist/analog/nld_ms_sor.h +++ b/src/emu/netlist/analog/nld_ms_sor.h @@ -28,18 +28,13 @@ public: , m_gs_fail(0) , m_gs_total(0) { - const char *p = osd_getenv("NETLIST_STATS"); - if (p != NULL) - m_log_stats = (bool) atoi(p); - else - m_log_stats = false; } virtual ~netlist_matrix_solver_SOR_t() {} ATTR_COLD virtual void log_stats(); - ATTR_HOT virtual int vsolve_non_dynamic(); + ATTR_HOT virtual int vsolve_non_dynamic(const bool newton_raphson); protected: ATTR_HOT virtual nl_double vsolve(); @@ -47,8 +42,6 @@ private: nl_double m_lp_fact; int m_gs_fail; int m_gs_total; - bool m_log_stats; - }; // ---------------------------------------------------------------------------------------- @@ -58,15 +51,15 @@ private: template <int m_N, int _storage_N> void netlist_matrix_solver_SOR_t<m_N, _storage_N>::log_stats() { - if (this->m_stat_calculations != 0 && m_log_stats) + if (this->m_stat_calculations != 0 && this->m_params.m_log_stats) { - printf("==============================================\n"); - printf("Solver %s\n", this->name().cstr()); - printf(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr()); - printf(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic"); - printf(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep"); - printf(" %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls); - printf(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average\n", + this->netlist().log("=============================================="); + this->netlist().log("Solver %s", this->name().cstr()); + this->netlist().log(" ==> %d nets", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr()); + this->netlist().log(" has %s elements", this->is_dynamic() ? "dynamic" : "no dynamic"); + this->netlist().log(" has %s elements", this->is_timestep() ? "timestep" : "no timestep"); + this->netlist().log(" %6.3f average newton raphson loops", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls); + this->netlist().log(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average", this->m_stat_calculations, this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0), this->m_gs_fail, @@ -83,7 +76,7 @@ ATTR_HOT nl_double netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve() } template <int m_N, int _storage_N> -ATTR_HOT inline int netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve_non_dynamic() +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(); bool resched = false; @@ -138,22 +131,22 @@ ATTR_HOT inline int netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve_non_dyn if (USE_GABS) { - gabs_t *= 0.95; // avoid rounding issues + gabs_t *= NL_FCONST(0.95); // avoid rounding issues if (gabs_t <= gtot_t) { w[k] = ws / gtot_t; - one_m_w[k] = 1.0 - ws; + one_m_w[k] = NL_FCONST(1.0) - ws; } else { - w[k] = 1.0 / (gtot_t + gabs_t); - one_m_w[k] = 1.0 - 1.0 * gtot_t / (gtot_t + gabs_t); + w[k] = NL_FCONST(1.0) / (gtot_t + gabs_t); + one_m_w[k] = NL_FCONST(1.0) - NL_FCONST(1.0) * gtot_t / (gtot_t + gabs_t); } } else { w[k] = ws / gtot_t; - one_m_w[k] = 1.0 - ws; + one_m_w[k] = NL_FCONST(1.0) - ws; } } @@ -181,8 +174,17 @@ ATTR_HOT inline int netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve_non_dyn resched_cnt++; } while (resched && (resched_cnt < this->m_params.m_gs_loops)); - for (int k = 0; k < iN; k++) - this->m_nets[k]->m_cur_Analog = new_V[k]; + if (newton_raphson) + { + //printf("here %s\n", this->name().cstr()); + for (int k = 0; k < iN; k++) + this->m_nets[k]->m_cur_Analog += 1.0 * (new_V[k] - this->m_nets[k]->m_cur_Analog); + } + else + { + for (int k = 0; k < iN; k++) + this->m_nets[k]->m_cur_Analog = new_V[k]; + } this->m_gs_total += resched_cnt; this->m_stat_calculations++; @@ -191,7 +193,7 @@ ATTR_HOT inline int netlist_matrix_solver_SOR_t<m_N, _storage_N>::vsolve_non_dyn { // Fallback to direct solver ... this->m_gs_fail++; - return netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_dynamic(); + return netlist_matrix_solver_direct_t<m_N, _storage_N>::vsolve_non_dynamic(newton_raphson); } else { return resched_cnt; diff --git a/src/emu/netlist/analog/nld_ms_sor_mat.h b/src/emu/netlist/analog/nld_ms_sor_mat.h index 349b4ed3cc4..52bbe8e5743 100644 --- a/src/emu/netlist/analog/nld_ms_sor_mat.h +++ b/src/emu/netlist/analog/nld_ms_sor_mat.h @@ -29,9 +29,9 @@ public: , m_gs_fail(0) , m_gs_total(0) { - const char *p = osd_getenv("NETLIST_STATS"); - if (p != NULL) - m_log_stats = (bool) atoi(p); + pstring p = nl_util::environment("NETLIST_STATS"); + if (p != "") + m_log_stats = (bool) p.as_long(); else m_log_stats = false; } @@ -40,7 +40,7 @@ public: ATTR_COLD virtual void log_stats(); - ATTR_HOT inline int vsolve_non_dynamic(); + ATTR_HOT inline int vsolve_non_dynamic(const bool newton_raphson); protected: ATTR_HOT virtual nl_double vsolve(); @@ -113,10 +113,12 @@ ATTR_HOT nl_double netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve() sqo += this->m_Vdelta[k] * this->m_Vdelta[k]; this->m_Vdelta[k] = nv; } - if (sqo > 1e-90) + + // FIXME: used to be 1e90, but this would not be compatible with float + if (sqo > NL_FCONST(1e-20)) m_lp_fact = std::min(nl_math::sqrt(sq/sqo), (nl_double) 2.0); else - m_lp_fact = 0.0; + m_lp_fact = NL_FCONST(0.0); } @@ -124,7 +126,7 @@ ATTR_HOT nl_double netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve() } template <int m_N, int _storage_N> -ATTR_HOT inline int netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve_non_dynamic() +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 * the optimized code which works directly on the data structures. @@ -291,7 +293,7 @@ ATTR_HOT inline int netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::vsolve_non this->LE_solve(); this->m_stat_calculations++; - return netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(); + return netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(newton_raphson); } else { this->m_stat_calculations++; diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c index 5c3277e00f9..4b734f30fa8 100644 --- a/src/emu/netlist/analog/nld_solver.c +++ b/src/emu/netlist/analog/nld_solver.c @@ -173,7 +173,6 @@ ATTR_HOT void netlist_matrix_solver_t::update_inputs() } - ATTR_HOT void netlist_matrix_solver_t::update_dynamic() { /* update all non-linear devices */ @@ -236,7 +235,7 @@ void netlist_matrix_solver_t::solve_base(C *p) { update_dynamic(); // Gauss-Seidel will revert to Gaussian elemination if steps exceeded. - this_resched = p->vsolve_non_dynamic(); + this_resched = p->vsolve_non_dynamic(true); newton_loops++; } while (this_resched > 1 && newton_loops < m_params.m_nr_loops); @@ -250,7 +249,7 @@ void netlist_matrix_solver_t::solve_base(C *p) } else { - p->vsolve_non_dynamic(); + p->vsolve_non_dynamic(false); } } @@ -320,6 +319,8 @@ NETLIB_START(solver) register_param("LTE", m_lte, 5e-5); // diff/timestep register_param("MIN_TIMESTEP", m_min_timestep, 1e-6); // nl_double timestep resolution + register_param("LOG_STATS", m_log_stats, 1); // nl_double timestep resolution + // internal staff register_input("FB_step", m_fb_step); @@ -339,11 +340,14 @@ NETLIB_UPDATE_PARAM(solver) //m_inc = netlist_time::from_hz(m_freq.Value()); } -NETLIB_NAME(solver)::~NETLIB_NAME(solver)() +NETLIB_STOP(solver) { for (int i = 0; i < m_mat_solvers.count(); i++) m_mat_solvers[i]->log_stats(); +} +NETLIB_NAME(solver)::~NETLIB_NAME(solver)() +{ netlist_matrix_solver_t * const *e = m_mat_solvers.first(); while (e != NULL) { @@ -452,13 +456,20 @@ ATTR_COLD void NETLIB_NAME(solver)::post_start() if (m_params.m_dynamic) { - m_params.m_max_timestep *= 1000.0; + m_params.m_max_timestep *= NL_FCONST(1000.0); } else { m_params.m_min_timestep = m_params.m_max_timestep; } + // Override log statistics + pstring p = nl_util::environment("NL_STATS"); + if (p != "") + m_params.m_log_stats = (bool) p.as_long(); + else + m_params.m_log_stats = (bool) m_log_stats.Value(); + netlist().log("Scanning net groups ..."); // determine net groups for (netlist_net_t * const *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn)) diff --git a/src/emu/netlist/analog/nld_solver.h b/src/emu/netlist/analog/nld_solver.h index f1fab7a6168..79f3c4af9d4 100644 --- a/src/emu/netlist/analog/nld_solver.h +++ b/src/emu/netlist/analog/nld_solver.h @@ -41,6 +41,7 @@ struct netlist_solver_parameters_t int m_gs_loops; int m_nr_loops; netlist_time m_nt_sync_delay; + bool m_log_stats; }; @@ -75,18 +76,18 @@ class ATTR_ALIGNED(64) terms_t int m_railstart; private: - plinearlist_t<netlist_terminal_t *> m_term; - plinearlist_t<int> m_net_other; - plinearlist_t<nl_double> m_go; - plinearlist_t<nl_double> m_gt; - plinearlist_t<nl_double> m_Idr; - plinearlist_t<nl_double *> m_other_curanalog; + plist_t<netlist_terminal_t *> m_term; + plist_t<int> m_net_other; + plist_t<nl_double> m_go; + plist_t<nl_double> m_gt; + plist_t<nl_double> m_Idr; + plist_t<nl_double *> m_other_curanalog; }; class netlist_matrix_solver_t : public netlist_device_t { public: - typedef plinearlist_t<netlist_matrix_solver_t *> list_t; + typedef plist_t<netlist_matrix_solver_t *> list_t; typedef netlist_core_device_t::list_t dev_list_t; enum eSolverType @@ -122,7 +123,7 @@ public: ATTR_COLD int get_net_idx(netlist_net_t *net); ATTR_COLD virtual void log_stats() {}; - inline const eSolverType type() const { return m_type; } + inline eSolverType type() const { return m_type; } protected: @@ -134,8 +135,8 @@ protected: ATTR_COLD virtual void add_term(int net_idx, netlist_terminal_t *term) = 0; - plinearlist_t<netlist_analog_net_t *> m_nets; - plinearlist_t<netlist_analog_output_t *> m_inps; + plist_t<netlist_analog_net_t *> m_nets; + plist_t<netlist_analog_output_t *> m_inps; int m_stat_calculations; int m_stat_newton_raphson; @@ -143,7 +144,7 @@ protected: const netlist_solver_parameters_t &m_params; - ATTR_HOT inline const nl_double current_timestep() { return m_cur_ts; } + ATTR_HOT inline nl_double current_timestep() { return m_cur_ts; } private: netlist_time m_last_step; @@ -172,6 +173,7 @@ public: ATTR_COLD virtual ~NETLIB_NAME(solver)(); ATTR_COLD void post_start(); + ATTR_COLD void stop(); ATTR_HOT inline nl_double gmin() { return m_gmin.Value(); } @@ -198,6 +200,8 @@ protected: netlist_param_int_t m_gs_threshold; netlist_param_int_t m_parallel; + netlist_param_logic_t m_log_stats; + netlist_matrix_solver_t::list_t m_mat_solvers; private: diff --git a/src/emu/netlist/analog/nld_twoterm.h b/src/emu/netlist/analog/nld_twoterm.h index 9d0a1a0aed7..de112bfee18 100644 --- a/src/emu/netlist/analog/nld_twoterm.h +++ b/src/emu/netlist/analog/nld_twoterm.h @@ -140,7 +140,7 @@ public: inline void set_R(const nl_double R) { - set(1.0 / R, 0.0, 0.0); + set(NL_FCONST(1.0) / R, 0.0, 0.0); } protected: @@ -216,7 +216,7 @@ public: { //FIXME: Optimize cutoff case - if (nVd < -5.0 * m_Vt) + if (nVd < NL_FCONST(-5.0) * m_Vt) { m_Vd = nVd; m_G = m_gmin; @@ -227,17 +227,17 @@ public: m_Vd = nVd; const nl_double eVDVt = nl_math::exp(m_Vd * m_VtInv); - m_Id = m_Is * (eVDVt - 1.0); + m_Id = m_Is * (eVDVt - NL_FCONST(1.0)); m_G = m_Is * m_VtInv * eVDVt + m_gmin; } else { nl_double a = (nVd - m_Vd) * m_VtInv; - if (a<1e-12 - 1.0) a = 1e-12 - 1.0; + if (a < NL_FCONST(1e-12) - NL_FCONST(1.0)) a = NL_FCONST(1e-12) - NL_FCONST(1.0); m_Vd = m_Vd + nl_math::e_log1p(a) * m_Vt; const nl_double eVDVt = nl_math::exp(m_Vd * m_VtInv); - m_Id = m_Is * (eVDVt - 1.0); + m_Id = m_Is * (eVDVt - NL_FCONST(1.0)); m_G = m_Is * m_VtInv * eVDVt + m_gmin; } diff --git a/src/emu/netlist/devices/nld_4020.c b/src/emu/netlist/devices/nld_4020.c index 01c253694ca..f0e160de8d3 100644 --- a/src/emu/netlist/devices/nld_4020.c +++ b/src/emu/netlist/devices/nld_4020.c @@ -58,7 +58,7 @@ NETLIB_START(4020_sub) NETLIB_RESET(4020_sub) { - m_IP.set_state(netlist_input_t::STATE_INP_HL); + m_IP.set_state(netlist_logic_t::STATE_INP_HL); m_cnt = 0; } diff --git a/src/emu/netlist/devices/nld_4066.c b/src/emu/netlist/devices/nld_4066.c index 7380c1588ee..8225447d555 100644 --- a/src/emu/netlist/devices/nld_4066.c +++ b/src/emu/netlist/devices/nld_4066.c @@ -23,21 +23,21 @@ NETLIB_RESET(4066) NETLIB_UPDATE(4066) { nl_double sup = (m_supply->vdd() - m_supply->vss()); - nl_double low = 0.45 * sup; - nl_double high = 0.55 * sup; + nl_double low = NL_FCONST(0.45) * sup; + nl_double high = NL_FCONST(0.55) * sup; nl_double in = INPANALOG(m_control) - m_supply->vss(); - nl_double rON = m_base_r * 5.0 / sup; + nl_double rON = m_base_r * NL_FCONST(5.0) / sup; nl_double R = -1.0; if (in < low) { - R = 1.0 / netlist().gmin(); + R = NL_FCONST(1.0) / netlist().gmin(); } else if (in > high) { R = rON; } - if (R > 0.0) + if (R > NL_FCONST(0.0)) { // We only need to update the net first if this is a time stepping net if (1) // m_R.m_P.net().as_analog().solver()->is_timestep()) diff --git a/src/emu/netlist/devices/nld_74107.c b/src/emu/netlist/devices/nld_74107.c index ec46b642eb1..cd0238de829 100644 --- a/src/emu/netlist/devices/nld_74107.c +++ b/src/emu/netlist/devices/nld_74107.c @@ -20,7 +20,7 @@ NETLIB_START(74107Asub) NETLIB_RESET(74107Asub) { - m_clk.set_state(netlist_input_t::STATE_INP_HL); + m_clk.set_state(netlist_logic_t::STATE_INP_HL); m_Q.initial(0); m_QQ.initial(1); diff --git a/src/emu/netlist/devices/nld_74175.c b/src/emu/netlist/devices/nld_74175.c index f66818883c2..a10268bdfda 100644 --- a/src/emu/netlist/devices/nld_74175.c +++ b/src/emu/netlist/devices/nld_74175.c @@ -29,7 +29,7 @@ NETLIB_START(74175_sub) NETLIB_RESET(74175_sub) { - m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_CLK.set_state(netlist_logic_t::STATE_INP_LH); m_clrq = 0; m_data = 0xFF; } diff --git a/src/emu/netlist/devices/nld_74279.c b/src/emu/netlist/devices/nld_74279.c index 2db7ab1d435..17fbc2e8b22 100644 --- a/src/emu/netlist/devices/nld_74279.c +++ b/src/emu/netlist/devices/nld_74279.c @@ -34,6 +34,7 @@ const char *nld_74279B::m_desc[] = { "" }; #else +#if 1 const char *nld_74279A::m_desc[] = { "S,R,_Q|Q", "0,X,X|1|22", @@ -53,7 +54,67 @@ const char *nld_74279B::m_desc[] = { "1,1,1,1|1|22", "" }; +#else +const char *nld_74279A::m_desc[] = { + " S, R,_Q,_QR|Q,QR", + " 0, 0, 0, 0 |1, 1|20,22", + " 1, 0, 0, 0 |1, 1|20,22", + " 0, 1, 0, 0 |1, 1|20,22", + " 1, 1, 0, 0 |1, 1|20,22", + " 0, 0, 1, 0 |1, 1|20,22", + " 1, 0, 1, 0 |1, 1|20,22", + " 0, 1, 1, 0 |1, 0|22,15", + " 1, 1, 1, 0 |1, 0|22,15", + " 0, 0, 0, 1 |1, 1|20,22", + " 1, 0, 0, 1 |0, 1|15,22", + " 0, 1, 0, 1 |1, 1|20,22", + " 1, 1, 0, 1 |0, 1|15,22", + " 0, 0, 1, 1 |1, 1|20,22", + " 1, 0, 1, 1 |0, 1|15,22", + " 0, 1, 1, 1 |1, 0|22,15", + " 1, 1, 1, 1 |0, 0|13,15", + "" +}; + +const char *nld_74279B::m_desc[] = { + "S1,S2,R,_Q,_QR|Q,QR", + "0,0,0,0,0|1,1|20,22", + "1,0,0,0,0|1,1|20,22", + "0,1,0,0,0|1,1|20,22", + "1,1,0,0,0|1,1|20,22", + "0,0,1,0,0|1,1|20,22", + "1,0,1,0,0|1,1|20,22", + "0,1,1,0,0|1,1|20,22", + "1,1,1,0,0|1,1|20,22", + "0,0,0,1,0|1,1|20,22", + "1,0,0,1,0|1,1|20,22", + "0,1,0,1,0|1,1|20,22", + "1,1,0,1,0|1,1|20,22", + "0,0,1,1,0|1,0|22,15", + "1,0,1,1,0|1,0|22,15", + "0,1,1,1,0|1,0|22,15", + "1,1,1,1,0|1,0|22,15", + "0,0,0,0,1|1,1|20,22", + "1,0,0,0,1|1,1|20,22", + "0,1,0,0,1|1,1|20,22", + "1,1,0,0,1|0,1|15,22", + "0,0,1,0,1|1,1|20,22", + "1,0,1,0,1|1,1|20,22", + "0,1,1,0,1|1,1|20,22", + "1,1,1,0,1|0,1|15,22", + "0,0,0,1,1|1,1|20,22", + "1,0,0,1,1|1,1|20,22", + "0,1,0,1,1|1,1|20,22", + "1,1,0,1,1|0,1|15,22", + "0,0,1,1,1|1,0|22,15", + "1,0,1,1,1|1,0|22,15", + "0,1,1,1,1|1,0|22,15", + "1,1,1,1,1|0,0|13,15", + "" +}; + +#endif #endif diff --git a/src/emu/netlist/devices/nld_74279.h b/src/emu/netlist/devices/nld_74279.h index 156b59b2b31..cee47fb7452 100644 --- a/src/emu/netlist/devices/nld_74279.h +++ b/src/emu/netlist/devices/nld_74279.h @@ -44,6 +44,8 @@ NETLIB_TRUTHTABLE(74279B, 3, 1, 1); #else NETLIB_TRUTHTABLE(74279A, 3, 1, 0); NETLIB_TRUTHTABLE(74279B, 4, 1, 0); +//NETLIB_TRUTHTABLE(74279A, 4, 2, 0); +//NETLIB_TRUTHTABLE(74279B, 5, 2, 0); #endif #define TTL_74279_DIP(_name) \ NET_REGISTER_DEV(74279_dip, _name) diff --git a/src/emu/netlist/devices/nld_7437.c b/src/emu/netlist/devices/nld_7437.c index bcbbb5cf575..ba078f81d11 100644 --- a/src/emu/netlist/devices/nld_7437.c +++ b/src/emu/netlist/devices/nld_7437.c @@ -7,6 +7,18 @@ #include "nld_7437.h" +#if (USE_TRUTHTABLE) +nld_7437::truthtable_t nld_7437::m_ttbl; +const char *nld_7437::m_desc[] = { + "A , B | Q ", + "0,X|1|22", + "X,0|1|22", + "1,1|0|15", + "" +}; + +#endif + NETLIB_START(7437_dip) { register_sub("1", m_1); diff --git a/src/emu/netlist/devices/nld_7437.h b/src/emu/netlist/devices/nld_7437.h index e83e8c2a737..03145ee8a8c 100644 --- a/src/emu/netlist/devices/nld_7437.h +++ b/src/emu/netlist/devices/nld_7437.h @@ -42,7 +42,12 @@ NET_CONNECT(_name, A, _A) \ NET_CONNECT(_name, B, _B) +#if (USE_TRUTHTABLE) +#include "nld_truthtable.h" +NETLIB_TRUTHTABLE(7437, 2, 1, 0); +#else NETLIB_SIGNAL(7437, 2, 0, 0); +#endif #define TTL_7437_DIP(_name) \ NET_REGISTER_DEV(7437_dip, _name) diff --git a/src/emu/netlist/devices/nld_7448.c b/src/emu/netlist/devices/nld_7448.c index aea9b2f7620..7533449e8c5 100644 --- a/src/emu/netlist/devices/nld_7448.c +++ b/src/emu/netlist/devices/nld_7448.c @@ -7,8 +7,60 @@ #include "nld_7448.h" +#if (0 && USE_TRUTHTABLE) +nld_7448::truthtable_t nld_7448::m_ttbl; +const char *nld_7448::m_desc[] = { + " LTQ,BIQ,RBIQ, A , B , C , D | a, b, c, d, e, f, g", + + " 1, 1, 1, 0, 0, 0, 0 | 1, 1, 1, 1, 1, 1, 0|100,100,100,100,100,100,100", + " 1, 1, X, 1, 0, 0, 0 | 0, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100", + " 1, 1, X, 0, 1, 0, 0 | 1, 1, 0, 1, 1, 0, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 1, 0, 0 | 1, 1, 1, 1, 0, 0, 1|100,100,100,100,100,100,100", + " 1, 1, X, 0, 0, 1, 0 | 0, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 0, 1, 0 | 1, 0, 1, 1, 0, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 0, 1, 1, 0 | 0, 0, 1, 1, 1, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 1, 1, 0 | 1, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100", + " 1, 1, X, 0, 0, 0, 1 | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 0, 0, 1 | 1, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 0, 1, 0, 1 | 0, 0, 0, 1, 1, 0, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 1, 0, 1 | 0, 0, 1, 1, 0, 0, 1|100,100,100,100,100,100,100", + " 1, 1, X, 0, 0, 1, 1 | 0, 1, 0, 0, 0, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 0, 1, 1 | 1, 0, 0, 1, 0, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 0, 1, 1, 1 | 0, 0, 0, 1, 1, 1, 1|100,100,100,100,100,100,100", + " 1, 1, X, 1, 1, 1, 1 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100", + + // BI/RBO is input output. In the next case it is used as an output will go low. + " 1, 1, 0, 0, 0, 0, 0 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100", // RBI + + " 0, 1, X, X, X, X, X | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100", // LT + + // This condition has precedence + " X, 0, X, X, X, X, X | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100", // BI + "" +}; + +NETLIB_START(7448_dip) +{ + NETLIB_NAME(7448)::start(); + register_subalias("1", m_i[4]); // B + register_subalias("2", m_i[5]); // C + register_subalias("3", m_i[0]); // LTQ + register_subalias("4", m_i[1]); // BIQ + register_subalias("5", m_i[2]); // RBIQ + register_subalias("6", m_i[6]); // D + register_subalias("7", m_i[3]); // A + + register_subalias("9", m_Q[4]); // e + register_subalias("10", m_Q[3]); // d + register_subalias("11", m_Q[2]); // c + register_subalias("12", m_Q[1]); // b + register_subalias("13", m_Q[0]); // a + register_subalias("14", m_Q[6]); // g + register_subalias("15", m_Q[5]); // f +} +#else NETLIB_START(7448) { register_sub("sub", sub); @@ -21,15 +73,17 @@ NETLIB_START(7448) register_input("BIQ", m_BIQ); register_subalias("RBIQ",sub.m_RBIQ); - register_subalias("a", sub.m_a); - register_subalias("b", sub.m_b); - register_subalias("c", sub.m_c); - register_subalias("d", sub.m_d); - register_subalias("e", sub.m_e); - register_subalias("f", sub.m_f); - register_subalias("g", sub.m_g); + register_subalias("a", sub.m_Q[0]); + register_subalias("b", sub.m_Q[1]); + register_subalias("c", sub.m_Q[2]); + register_subalias("d", sub.m_Q[3]); + register_subalias("e", sub.m_Q[4]); + register_subalias("f", sub.m_Q[5]); + register_subalias("g", sub.m_Q[6]); + } + NETLIB_RESET(7448) { sub.do_reset(); @@ -72,20 +126,22 @@ NETLIB_START(7448_sub) register_input("A3", m_D); register_input("RBIQ", m_RBIQ); - register_output("a", m_a); - register_output("b", m_b); - register_output("c", m_c); - register_output("d", m_d); - register_output("e", m_e); - register_output("f", m_f); - register_output("g", m_g); + register_output("a", m_Q[0]); + register_output("b", m_Q[1]); + register_output("c", m_Q[2]); + register_output("d", m_Q[3]); + register_output("e", m_Q[4]); + register_output("f", m_Q[5]); + register_output("g", m_Q[6]); save(NLNAME(m_state)); + save(NLNAME(m_active)); } NETLIB_RESET(7448_sub) { m_state = 0; + m_active = 1; } NETLIB_UPDATE(7448_sub) @@ -105,13 +161,8 @@ NETLIB_FUNC_VOID(7448_sub, update_outputs, (UINT8 v)) { // max transfer time is 100 NS */ - OUTLOGIC(m_a, tab7448[v][0], NLTIME_FROM_NS(100)); - OUTLOGIC(m_b, tab7448[v][1], NLTIME_FROM_NS(100)); - OUTLOGIC(m_c, tab7448[v][2], NLTIME_FROM_NS(100)); - OUTLOGIC(m_d, tab7448[v][3], NLTIME_FROM_NS(100)); - OUTLOGIC(m_e, tab7448[v][4], NLTIME_FROM_NS(100)); - OUTLOGIC(m_f, tab7448[v][5], NLTIME_FROM_NS(100)); - OUTLOGIC(m_g, tab7448[v][6], NLTIME_FROM_NS(100)); + for (int i=0; i<7; i++) + OUTLOGIC(m_Q[i], tab7448[v][i], NLTIME_FROM_NS(100)); m_state = v; } } @@ -136,7 +187,6 @@ const UINT8 NETLIB_NAME(7448_sub)::tab7448[16][7] = { 0, 0, 0, 0, 0, 0, 0 }, /* 15 */ }; - NETLIB_START(7448_dip) { NETLIB_NAME(7448)::start(); @@ -149,15 +199,17 @@ NETLIB_START(7448_dip) register_subalias("6", sub.m_D); register_subalias("7", sub.m_A); - register_subalias("9", sub.m_e); - register_subalias("10", sub.m_d); - register_subalias("11", sub.m_c); - register_subalias("12", sub.m_b); - register_subalias("13", sub.m_a); - register_subalias("14", sub.m_g); - register_subalias("15", sub.m_f); + register_subalias("9", sub.m_Q[4]); // e + register_subalias("10", sub.m_Q[3]); // d + register_subalias("11", sub.m_Q[2]); // c + register_subalias("12", sub.m_Q[1]); // b + register_subalias("13", sub.m_Q[0]); // a + register_subalias("14", sub.m_Q[6]); // g + register_subalias("15", sub.m_Q[5]); // f } +#endif + NETLIB_UPDATE(7448_dip) { NETLIB_NAME(7448)::update(); diff --git a/src/emu/netlist/devices/nld_7448.h b/src/emu/netlist/devices/nld_7448.h index 72aed7fa6f1..951c7716cdd 100644 --- a/src/emu/netlist/devices/nld_7448.h +++ b/src/emu/netlist/devices/nld_7448.h @@ -39,6 +39,15 @@ #define TTL_7448_DIP(_name) \ NET_REGISTER_DEV(7448_dip, _name) +/* + * FIXME: Using truthtable is a lot slower than the explicit device + */ +#if (0 && USE_TRUTHTABLE) +#include "nld_truthtable.h" + +NETLIB_TRUTHTABLE(7448, 7, 7, 0); +#else + NETLIB_SUBDEVICE(7448_sub, ATTR_HOT void update_outputs(UINT8 v); static const UINT8 tab7448[16][7]; @@ -50,14 +59,10 @@ NETLIB_SUBDEVICE(7448_sub, netlist_logic_input_t m_RBIQ; UINT8 m_state; + int m_active; + + netlist_logic_output_t m_Q[7]; /* a .. g */ - netlist_logic_output_t m_a; - netlist_logic_output_t m_b; - netlist_logic_output_t m_c; - netlist_logic_output_t m_d; - netlist_logic_output_t m_e; - netlist_logic_output_t m_f; - netlist_logic_output_t m_g; ); NETLIB_DEVICE(7448, @@ -67,7 +72,7 @@ public: netlist_logic_input_t m_LTQ; netlist_logic_input_t m_BIQ; ); - +#endif NETLIB_DEVICE_DERIVED(7448_dip, 7448, ); diff --git a/src/emu/netlist/devices/nld_7474.c b/src/emu/netlist/devices/nld_7474.c index 8795d83d927..1aeb628030f 100644 --- a/src/emu/netlist/devices/nld_7474.c +++ b/src/emu/netlist/devices/nld_7474.c @@ -10,7 +10,7 @@ ATTR_HOT inline void NETLIB_NAME(7474sub)::newstate(const UINT8 stateQ, const UINT8 stateQQ) { // 0: High-to-low 40 ns, 1: Low-to-high 25 ns - static const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; OUTLOGIC(m_Q, stateQ, delay[stateQ]); OUTLOGIC(m_QQ, stateQQ, delay[stateQQ]); } @@ -83,7 +83,7 @@ NETLIB_START(7474sub) NETLIB_RESET(7474sub) { - m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_CLK.set_state(netlist_logic_t::STATE_INP_LH); m_nextD = 0; /* FIXME: required by pong doubles - need a mechanism to set this from netlist */ diff --git a/src/emu/netlist/devices/nld_7486.c b/src/emu/netlist/devices/nld_7486.c index b6c32b78287..e4009b22180 100644 --- a/src/emu/netlist/devices/nld_7486.c +++ b/src/emu/netlist/devices/nld_7486.c @@ -12,16 +12,19 @@ NETLIB_START(7486) register_input("A", m_A); register_input("B", m_B); register_output("Q", m_Q); + + save(NLNAME(m_active)); } NETLIB_RESET(7486) { + m_active = 1; } -static const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; - NETLIB_UPDATE(7486) { + const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; + UINT8 t = INPLOGIC(m_A) ^ INPLOGIC(m_B); OUTLOGIC(m_Q, t, delay[t]); } @@ -66,3 +69,33 @@ NETLIB_RESET(7486_dip) m_3.do_reset(); m_4.do_reset(); } + +ATTR_HOT void NETLIB_NAME(7486)::inc_active() +{ + const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; + nl_assert(netlist().use_deactivate()); + if (++m_active == 1) + { + m_A.activate(); + m_B.activate(); + + netlist_time mt = this->m_A.net().time(); + if (this->m_B.net().time() > mt) + mt = this->m_B.net().time(); + + UINT8 t = INPLOGIC(m_A) ^ INPLOGIC(m_B); + m_Q.net().set_Q_time(t, mt + delay[t]); + } +} + +ATTR_HOT void NETLIB_NAME(7486)::dec_active() +{ +#if 1 + nl_assert(netlist().use_deactivate()); + if (--m_active == 0) + { + m_A.inactivate(); + m_B.inactivate(); + } +#endif +} diff --git a/src/emu/netlist/devices/nld_7486.h b/src/emu/netlist/devices/nld_7486.h index 6037c46bff1..5febda494f9 100644 --- a/src/emu/netlist/devices/nld_7486.h +++ b/src/emu/netlist/devices/nld_7486.h @@ -44,6 +44,10 @@ public: netlist_logic_input_t m_A; netlist_logic_input_t m_B; netlist_logic_output_t m_Q; + + ATTR_HOT void inc_active(); + ATTR_HOT void dec_active(); + int m_active; ); #define TTL_7486_DIP(_name) \ diff --git a/src/emu/netlist/devices/nld_7493.c b/src/emu/netlist/devices/nld_7493.c index 902486f09b6..7f5be72fd6a 100644 --- a/src/emu/netlist/devices/nld_7493.c +++ b/src/emu/netlist/devices/nld_7493.c @@ -48,7 +48,7 @@ NETLIB_START(7493ff) NETLIB_RESET(7493ff) { m_reset = 1; - m_I.set_state(netlist_input_t::STATE_INP_HL); + m_I.set_state(netlist_logic_t::STATE_INP_HL); } NETLIB_UPDATE(7493ff) diff --git a/src/emu/netlist/devices/nld_74ls629.c b/src/emu/netlist/devices/nld_74ls629.c index aa68b5fb7f4..31f66c562e3 100644 --- a/src/emu/netlist/devices/nld_74ls629.c +++ b/src/emu/netlist/devices/nld_74ls629.c @@ -141,11 +141,11 @@ NETLIB_UPDATE(SN74LS629) freq += k9 * v_rng * v_freq_3; freq += k10 * v_rng * v_freq_4; - freq *= 0.1e-6 / m_CAP.Value(); + freq *= NL_FCONST(0.1e-6) / m_CAP.Value(); // FIXME: we need a possibility to remove entries from queue ... // or an exact model ... - m_clock.m_inc = netlist_time::from_double(0.5 / freq); + m_clock.m_inc = netlist_time::from_double(0.5 / (double) freq); //m_clock.update(); NL_VERBOSE_OUT(("%s %f %f %f\n", name().cstr(), v_freq, v_rng, freq)); diff --git a/src/emu/netlist/devices/nld_9310.c b/src/emu/netlist/devices/nld_9310.c index f4387f53b05..42787be9157 100644 --- a/src/emu/netlist/devices/nld_9310.c +++ b/src/emu/netlist/devices/nld_9310.c @@ -81,7 +81,7 @@ NETLIB_START(9310_sub) NETLIB_RESET(9310_sub) { - m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_CLK.set_state(netlist_logic_t::STATE_INP_LH); m_cnt = 0; m_loadq = 1; m_ent = 1; diff --git a/src/emu/netlist/devices/nld_9316.c b/src/emu/netlist/devices/nld_9316.c index d757544e07b..ce5b05cfbf0 100644 --- a/src/emu/netlist/devices/nld_9316.c +++ b/src/emu/netlist/devices/nld_9316.c @@ -81,7 +81,7 @@ NETLIB_START(9316_sub) NETLIB_RESET(9316_sub) { - m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_CLK.set_state(netlist_logic_t::STATE_INP_LH); m_cnt = 0; m_loadq = 1; m_ent = 1; @@ -123,7 +123,7 @@ NETLIB_UPDATE(9316) sub.m_ent = INPLOGIC(m_ENT); const netlist_sig_t clrq = INPLOGIC(m_CLRQ); - if ((!sub.m_loadq | (sub.m_ent & INPLOGIC(m_ENP))) & clrq) + if (((sub.m_loadq ^ 1) | (sub.m_ent & INPLOGIC(m_ENP))) & clrq) { sub.m_CLK.activate_lh(); OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == MAXCNT), NLTIME_FROM_NS(27)); diff --git a/src/emu/netlist/devices/nld_log.c b/src/emu/netlist/devices/nld_log.c index af94157df1e..51bbad790ab 100644 --- a/src/emu/netlist/devices/nld_log.c +++ b/src/emu/netlist/devices/nld_log.c @@ -24,7 +24,7 @@ NETLIB_RESET(log) NETLIB_UPDATE(log) { - fprintf(m_file, "%20.9e %e\n", netlist().time().as_double(), INPANALOG(m_I)); + fprintf(m_file, "%20.9e %e\n", netlist().time().as_double(), (nl_double) INPANALOG(m_I)); } NETLIB_NAME(log)::~NETLIB_NAME(log)() @@ -44,7 +44,7 @@ NETLIB_RESET(logD) NETLIB_UPDATE(logD) { - fprintf(m_file, "%e %e\n", netlist().time().as_double(), INPANALOG(m_I) - INPANALOG(m_I2)); + fprintf(m_file, "%e %e\n", netlist().time().as_double(), (nl_double) (INPANALOG(m_I) - INPANALOG(m_I2))); } // FIXME: Implement wav later, this must be clock triggered device where the input to be written diff --git a/src/emu/netlist/devices/nld_r2r_dac.c b/src/emu/netlist/devices/nld_r2r_dac.c index 91b2bf4d820..1e76723f9e7 100644 --- a/src/emu/netlist/devices/nld_r2r_dac.c +++ b/src/emu/netlist/devices/nld_r2r_dac.c @@ -34,7 +34,7 @@ NETLIB_UPDATE_PARAM(r2r_dac) update_dev(); - nl_double V = m_VIN.Value() / (double) (1 << m_num.Value()) * (double) m_val.Value(); + nl_double V = m_VIN.Value() / (nl_double) (1 << m_num.Value()) * (nl_double) m_val.Value(); this->set(1.0 / m_R.Value(), V, 0.0); } diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c index b87c2e1e6bf..6a22a633eba 100644 --- a/src/emu/netlist/devices/nld_system.c +++ b/src/emu/netlist/devices/nld_system.c @@ -198,26 +198,21 @@ ATTR_COLD void nld_d_to_a_proxy::reset() m_is_timestep = m_RV.m_P.net().as_analog().solver()->is_timestep(); } -ATTR_COLD netlist_core_terminal_t &nld_d_to_a_proxy::out() -{ - return m_RV.m_P; -} - ATTR_HOT ATTR_ALIGN void nld_d_to_a_proxy::update() { const int state = INPLOGIC(m_I); if (state != m_last_state) { m_last_state = state; - const nl_double R = state ? m_logic_family->m_R_high : m_logic_family->m_R_low; - const nl_double V = state ? m_logic_family->m_high_V : m_logic_family->m_low_V; + const nl_double R = state ? logic_family().m_R_high : logic_family().m_R_low; + const nl_double V = state ? logic_family().m_high_V : logic_family().m_low_V; // We only need to update the net first if this is a time stepping net if (m_is_timestep) { m_RV.update_dev(); } - m_RV.set(1.0 / R, V, 0.0); + m_RV.set(NL_FCONST(1.0) / R, V, 0.0); m_RV.m_P.schedule_after(NLTIME_FROM_NS(1)); } } diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h index 67164f7123a..1392c6aa12e 100644 --- a/src/emu/netlist/devices/nld_system.h +++ b/src/emu/netlist/devices/nld_system.h @@ -256,19 +256,49 @@ private: UINT8 m_last_state; }; +// ----------------------------------------------------------------------------- +// nld_base_proxy +// ----------------------------------------------------------------------------- + +class nld_base_proxy : public netlist_device_t +{ +public: + ATTR_COLD nld_base_proxy(netlist_logic_t &inout_proxied, netlist_core_terminal_t &proxy_inout) + : netlist_device_t() + { + m_logic_family = inout_proxied.logic_family(); + m_term_proxied = &inout_proxied; + m_proxy_term = &proxy_inout; + } + + ATTR_COLD virtual ~nld_base_proxy() {} + + ATTR_COLD netlist_logic_t &term_proxied() const { return *m_term_proxied; } + ATTR_COLD netlist_core_terminal_t &proxy_term() const { return *m_proxy_term; } + +protected: + + ATTR_COLD virtual const netlist_logic_family_desc_t &logic_family() const + { + return *m_logic_family; + } + +private: + const netlist_logic_family_desc_t *m_logic_family; + netlist_logic_t *m_term_proxied; + netlist_core_terminal_t *m_proxy_term; +}; // ----------------------------------------------------------------------------- -// netdev_a_to_d +// nld_a_to_d_proxy // ----------------------------------------------------------------------------- -class nld_a_to_d_proxy : public netlist_device_t +class nld_a_to_d_proxy : public nld_base_proxy { public: ATTR_COLD nld_a_to_d_proxy(netlist_logic_input_t &in_proxied) - : netlist_device_t() + : nld_base_proxy(in_proxied, m_I) { - nl_assert(in_proxied.family() == LOGIC); - m_logic_family = in_proxied.logic_family(); } ATTR_COLD virtual ~nld_a_to_d_proxy() {} @@ -289,34 +319,32 @@ protected: ATTR_HOT ATTR_ALIGN void update() { - if (m_I.Q_Analog() > m_logic_family->m_high_thresh_V) + if (m_I.Q_Analog() > logic_family().m_high_thresh_V) OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(1)); - else if (m_I.Q_Analog() < m_logic_family->m_low_thresh_V) + else if (m_I.Q_Analog() < logic_family().m_low_thresh_V) OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(1)); - //else - // OUTLOGIC(m_Q, m_Q.net().last_Q(), NLTIME_FROM_NS(1)); + else + { + // do nothing + } } private: - const netlist_logic_family_desc_t *m_logic_family; }; // ----------------------------------------------------------------------------- // nld_base_d_to_a_proxy // ----------------------------------------------------------------------------- -class nld_base_d_to_a_proxy : public netlist_device_t +class nld_base_d_to_a_proxy : public nld_base_proxy { public: - ATTR_COLD nld_base_d_to_a_proxy(netlist_logic_output_t &out_proxied) - : netlist_device_t() + ATTR_COLD nld_base_d_to_a_proxy(netlist_logic_output_t &out_proxied, netlist_core_terminal_t &proxy_out) + : nld_base_proxy(out_proxied, proxy_out) { - nl_assert(out_proxied.family() == LOGIC); - m_logic_family = out_proxied.logic_family(); } ATTR_COLD virtual ~nld_base_d_to_a_proxy() {} - ATTR_COLD virtual netlist_core_terminal_t &out() = 0; ATTR_COLD virtual netlist_logic_input_t &in() { return m_I; } protected: @@ -325,60 +353,16 @@ protected: register_input("I", m_I); } - ATTR_COLD virtual const netlist_logic_family_desc_t *logic_family() - { - return m_logic_family; - } - - const netlist_logic_family_desc_t *m_logic_family; - netlist_logic_input_t m_I; private: }; -#if 0 -class nld_d_to_a_proxy : public nld_base_d_to_a_proxy -{ -public: - ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied) - : nld_base_d_to_a_proxy(out_proxied) - { - } - - ATTR_COLD virtual ~nld_d_to_a_proxy() {} - -protected: - ATTR_COLD void start() - { - nld_base_d_to_a_proxy::start(); - register_output("Q", m_Q); - } - - ATTR_COLD void reset() - { - //m_Q.initial(0); - } - - ATTR_COLD virtual netlist_core_terminal_t &out() - { - return m_Q; - } - - ATTR_HOT ATTR_ALIGN void update() - { - OUTANALOG(m_Q, INPLOGIC(m_I) ? m_logic_family->m_high_V : m_logic_family->m_low_V, NLTIME_FROM_NS(1)); - } - -private: - netlist_analog_output_t m_Q; -}; -#else class nld_d_to_a_proxy : public nld_base_d_to_a_proxy { public: ATTR_COLD nld_d_to_a_proxy(netlist_logic_output_t &out_proxied) - : nld_base_d_to_a_proxy(out_proxied) + : nld_base_d_to_a_proxy(out_proxied, m_RV.m_P) , m_RV(TWOTERM) , m_last_state(-1) , m_is_timestep(false) @@ -392,8 +376,6 @@ protected: ATTR_COLD virtual void reset(); - ATTR_COLD virtual netlist_core_terminal_t &out(); - ATTR_HOT ATTR_ALIGN void update(); private: @@ -402,6 +384,5 @@ private: int m_last_state; bool m_is_timestep; }; -#endif #endif /* NLD_SYSTEM_H_ */ diff --git a/src/emu/netlist/devices/nld_truthtable.c b/src/emu/netlist/devices/nld_truthtable.c new file mode 100644 index 00000000000..dace0f3c107 --- /dev/null +++ b/src/emu/netlist/devices/nld_truthtable.c @@ -0,0 +1,237 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_truthtable.c + * + */ + +#include "nld_truthtable.h" +#include "../plists.h" + +int truthtable_desc_t::count_bits(UINT32 v) +{ + int ret = 0; + for (; v != 0; v = v >> 1) + { + if (v & 1) + ret++; + } + return ret; +} + +UINT32 truthtable_desc_t::set_bits(UINT32 v, UINT32 b) +{ + UINT32 ret = 0; + int i = 0; + for (; v != 0; v = v >> 1) + { + if (v & 1) + { + ret |= ((b&1)<<i); + b = b >> 1; + } + i++; + } + return ret; +} + +UINT32 truthtable_desc_t::get_ignored_simple(UINT32 i) +{ + UINT32 m_enable = 0; + for (UINT32 j=0; j<m_size; j++) + { + if (m_outs[j] != m_outs[i]) + { + m_enable |= (i ^ j); + } + } + return m_enable ^ (m_size - 1); +} + +UINT32 truthtable_desc_t::get_ignored_extended(UINT32 i) +{ + // Determine all inputs which may be ignored ... + UINT32 nign = 0; + for (int j=0; j<m_NI; j++) + { + if (m_outs[i] == m_outs[i ^ (1 << j)]) + nign |= (1<<j); + } + /* Check all permutations of ign + * We have to remove those where the ignored inputs + * may change the output + */ + int bits = (1<<count_bits(nign)); + parray_t<int> t(bits); + + for (UINT32 j=1; j<bits; j++) + { + UINT32 tign = set_bits(nign, j); + t[j] = 0; + int bitsk=(1<<count_bits(tign)); + for (UINT32 k=0; k<bitsk; k++) + { + UINT32 b=set_bits(tign, k); + if (m_outs[i] != m_outs[(i & ~tign) | b]) + { + t[j] = 1; + break; + } + } + } + UINT32 jb=0; + UINT32 jm=0; + for (UINT32 j=1; j<bits; j++) + { + int nb = count_bits(j); + if ((t[j] == 0)&& (nb>jb)) + { + jb = nb; + jm = j; + } + } + return set_bits(nign, jm); +} + +// ---------------------------------------------------------------------------------------- +// desc +// ---------------------------------------------------------------------------------------- + +ATTR_COLD void truthtable_desc_t::help(int cur, nl_util::pstring_list list, + UINT64 state,UINT16 val, UINT8 *timing_index) +{ + pstring elem = list[cur].trim(); + int start = 0; + int end = 0; + + if (elem.equals("0")) + { + start = 0; + end = 0; + } + else if (elem.equals("1")) + { + start = 1; + end = 1; + } + else if (elem.equals("X")) + { + start = 0; + end = 1; + } + else + nl_assert_always(false, "unknown input value (not 0, 1, or X)"); + for (int i = start; i <= end; i++) + { + const UINT64 nstate = state | (i << cur); + + if (cur < m_num_bits - 1) + { + help(cur + 1, list, nstate, val, timing_index); + } + else + { + // cutoff previous inputs and outputs for ignore + if (m_outs[nstate] != -1 && m_outs[nstate] != val) + nl_fatalerror("Error in truthtable: State %04x already set, %d != %d\n", + (UINT32) nstate, m_outs[nstate], val); + m_outs[nstate] = val; + for (int j=0; j<m_NO; j++) + m_timing[nstate * m_NO + j] = timing_index[j]; + } + } +} + +ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled_ignore) +{ + if (*m_initialized) + return; + + pstring ttline = pstring(truthtable[0]); + truthtable++; + ttline = pstring(truthtable[0]); + truthtable++; + + for (int j=0; j < m_size; j++) + m_outs[j] = -1; + + for (int j=0; j < 16; j++) + m_timing_nt[j] = netlist_time::zero; + + while (!ttline.equals("")) + { + nl_util::pstring_list io = nl_util::split(ttline,"|"); + // checks + nl_assert_always(io.count() == 3, "io.count mismatch"); + nl_util::pstring_list inout = nl_util::split(io[0], ","); + nl_assert_always(inout.count() == m_num_bits, "number of bits not matching"); + nl_util::pstring_list out = nl_util::split(io[1], ","); + nl_assert_always(out.count() == m_NO, "output count not matching"); + nl_util::pstring_list times = nl_util::split(io[2], ","); + nl_assert_always(times.count() == m_NO, "timing count not matching"); + + UINT16 val = 0; + parray_t<UINT8> tindex(m_NO); + + for (int j=0; j<m_NO; j++) + { + pstring outs = out[j].trim(); + if (outs.equals("1")) + val = val | (1 << j); + else + nl_assert_always(outs.equals("0"), "Unknown value (not 0 or 1"); + netlist_time t = netlist_time::from_nsec(times[j].trim().as_long()); + int k=0; + while (m_timing_nt[k] != netlist_time::zero && m_timing_nt[k] != t) + k++; + m_timing_nt[k] = t; + tindex[j] = k; + } + + help(0, inout, 0 , val, tindex); + ttline = pstring(truthtable[0]); + truthtable++; + } + + // determine ignore + parray_t<UINT32> ign(m_size); + + for (int j=0; j < m_size; j++) + ign[j] = -1; + + for (UINT32 i=0; i<m_size; i++) + { + if (ign[i] == -1) + { + int tign; + if (0) + { + tign = get_ignored_simple(i); + ign[i] = tign; + } + else + { + tign = get_ignored_extended(i); + + ign[i] = tign; + /* don't need to recalculate similar ones */ + int bitsk=(1<<count_bits(tign)); + for (UINT32 k=0; k<bitsk; k++) + { + UINT32 b=set_bits(tign, k); + ign[(i & ~tign) | b] = tign; + } + } + } + } + for (int i=0; i<m_size; i++) + { + if (m_outs[i] == -1) + nl_fatalerror("truthtable: found element not set %04x\n", i); + m_outs[i] |= ((ign[i] & ~disabled_ignore) << m_NO); + } + *m_initialized = true; + +} + + diff --git a/src/emu/netlist/devices/nld_truthtable.h b/src/emu/netlist/devices/nld_truthtable.h index 2ab64bc8b42..12ecb255aaf 100644 --- a/src/emu/netlist/devices/nld_truthtable.h +++ b/src/emu/netlist/devices/nld_truthtable.h @@ -32,26 +32,41 @@ static inline UINT32 remove_first_bit(UINT32 v) return v; } -static inline int count_bits(UINT32 v) +struct truthtable_desc_t { - int ret = 0; - for (int i=0; i<32; i++) - if (v & (1<<i)) - ret++; - return ret; -} + truthtable_desc_t(int NO, int NI, int has_state, bool *initialized, + UINT32 *outs, UINT8 *timing, netlist_time *timing_nt) + : m_NO(NO), m_NI(NI), /*m_has_state(has_state),*/ m_initialized(initialized), + m_outs(outs), m_timing(timing), m_timing_nt(timing_nt), + m_num_bits(m_NI + has_state * (m_NI + m_NO)), + m_size(1 << (m_num_bits)) + { + } -static inline UINT32 set_bits(UINT32 v, UINT32 b) -{ - UINT32 ret = 0; - for (int i=0; i<32; i++) - if (v & (1<<i)) - { - ret |= ((b&1)<<i); - b = b >> 1; - } - return ret; -} + ATTR_COLD void setup(const char **truthtable, UINT32 disabled_ignore); + +private: + ATTR_COLD void help(int cur, nl_util::pstring_list list, + UINT64 state,UINT16 val, UINT8 *timing_index); + static int count_bits(UINT32 v); + static UINT32 set_bits(UINT32 v, UINT32 b); + UINT32 get_ignored_simple(UINT32 i); + UINT32 get_ignored_extended(UINT32 i); + + int m_NO; + int m_NI; + //int m_has_state; + bool *m_initialized; + UINT32 *m_outs; + UINT8 *m_timing; + netlist_time *m_timing_nt; + + /* additional values */ + + const UINT32 m_num_bits; + const UINT32 m_size; + +}; template<int m_NI, int m_NO, int has_state> class nld_truthtable_t : public netlist_device_t @@ -63,11 +78,13 @@ public: struct truthtable_t { - truthtable_t() : m_initialized(false) {} + truthtable_t() : m_initialized(false), + m_desc(m_NO, m_NI, has_state, &m_initialized, m_outs, m_timing, m_timing_nt) {} + bool m_initialized; UINT32 m_outs[m_size]; UINT8 m_timing[m_size * m_NO]; netlist_time m_timing_nt[16]; - bool m_initialized; + truthtable_desc_t m_desc; }; nld_truthtable_t(truthtable_t *ttbl, const char *desc[]) @@ -97,192 +114,48 @@ public: out[i] = out[i].trim(); register_output(out[i], m_Q[i]); } + // 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++) { - // Connect output "Q" to input "_Q" if this exists - // This enables timed state without having explicit state .... - for (int i=0; i < m_NO; i++) - { - pstring tmp = "_" + out[i]; - const int idx = inout.indexof(tmp); - if (idx>=0) - { - //printf("connecting %s %d\n", out[i].cstr(), idx); - connect(m_Q[i], m_i[idx]); - } - } - } - m_ign = 0; - setup_tt(); - // FIXME: save state - } - - ATTR_COLD void help(int cur, nl_util::pstring_list list, - UINT64 state,UINT16 val, UINT8 timing_index[m_NO]) - { - pstring elem = list[cur].trim(); - int start = 0; - int end = 0; - - if (elem.equals("0")) - { - start = 0; - end = 0; - } - else if (elem.equals("1")) - { - start = 1; - end = 1; - } - else if (elem.equals("X")) - { - start = 0; - end = 1; - } - else - nl_assert_always(false, "unknown input value (not 0, 1, or X)"); - for (int i = start; i <= end; i++) - { - const UINT64 nstate = state | (i << cur); - - if (cur < m_num_bits - 1) - { - help(cur + 1, list, nstate, val, timing_index); - } - else - { - // cutoff previous inputs and outputs for ignore - m_ttp->m_outs[nstate] = val; - for (int j=0; j<m_NO; j++) - m_ttp->m_timing[nstate * m_NO + j] = timing_index[j]; - } - } - } - - ATTR_COLD void setup_tt() - { - if (m_ttp->m_initialized) - return; - - const char **truthtable = m_desc; - pstring ttline = pstring(truthtable[0]); - truthtable++; - ttline = pstring(truthtable[0]); - truthtable++; - - for (int j=0; j < m_size; j++) - m_ttp->m_outs[j] = -1; - - for (int j=0; j < 16; j++) - m_ttp->m_timing_nt[j] = netlist_time::zero; - - while (!ttline.equals("")) - { - nl_util::pstring_list io = nl_util::split(ttline,"|"); - // checks - nl_assert_always(io.count() == 3, "io.count mismatch"); - nl_util::pstring_list inout = nl_util::split(io[0], ","); - nl_assert_always(inout.count() == m_num_bits, "number of bits not matching"); - nl_util::pstring_list out = nl_util::split(io[1], ","); - nl_assert_always(out.count() == m_NO, "output count not matching"); - nl_util::pstring_list times = nl_util::split(io[2], ","); - nl_assert_always(times.count() == m_NO, "timing count not matching"); - - UINT16 val = 0; - UINT8 tindex[m_NO]; - for (int j=0; j<m_NO; j++) + pstring tmp = "_" + out[i]; + const int idx = inout.indexof(tmp); + if (idx>=0) { - pstring outs = out[j].trim(); - if (outs.equals("1")) - val = val | (1 << j); - else - nl_assert_always(outs.equals("0"), "Unknown value (not 0 or 1"); - netlist_time t = netlist_time::from_nsec(times[j].trim().as_long()); - int k=0; - while (m_ttp->m_timing_nt[k] != netlist_time::zero && m_ttp->m_timing_nt[k] != t) - k++; - m_ttp->m_timing_nt[k] = t; - tindex[j] = k; + //printf("connecting %s %d\n", out[i].cstr(), idx); + connect(m_Q[i], m_i[idx]); + // disable ignore for this inputs altogether. + // FIXME: This shouldn't be necessary + disabled_ignore |= (1<<idx); } - - help(0, inout, 0 , val, tindex); - ttline = pstring(truthtable[0]); - truthtable++; } - // ((nignore & ((1 << m_NI)-1)) << m_NO) + m_ign = 0; - // determine ignore - UINT32 ign[m_size]; + m_ttp->m_desc.setup(m_desc, disabled_ignore * 0); - for (int i=0; i<m_size; i++) - { -#if 1 - UINT32 m_enable = 0; - for (int j=0; j<m_size; j++) - { - if (m_ttp->m_outs[j] != m_ttp->m_outs[i]) - { - m_enable |= (i ^ j); - } - } - ign[i] = m_enable ^ (m_size - 1); -#else - // this doesn't work in all cases and is dog slow - UINT32 nign = 0; - for (int j=0; j<m_NI; j++) - { - if (m_ttp->m_outs[i] == m_ttp->m_outs[i ^ (1 << j)]) - nign |= (1<<j); - } - /* Check all permutations of ign - */ - int t[1<<count_bits(nign)]; - - for (UINT32 j=0; j<(1<<count_bits(nign)); j++) - { - UINT32 tign = set_bits(nign, j); - t[j] = 0; - for (UINT32 k=0; k<(1<<count_bits(tign)); k++) - { - UINT32 b=set_bits(tign, k); - if (m_ttp->m_outs[i] != m_ttp->m_outs[(i & ~tign) | b]) - t[j] = 1; - } - //printf("x %d %d\n", j, tign); - } - UINT32 jb=0; - UINT32 jm=0; - for (UINT32 j=0; j<(1<<count_bits(nign)); j++) - { - int nb = count_bits(j); - if ((t[j] == 0)&& (nb>jb)) - { - jb = nb; - jm = j; - } - } - ign[i] = set_bits(nign, jm); -#endif - } - for (int i=0; i<m_size; i++) - { - m_ttp->m_outs[i] |= (ign[i] << m_NO); - } #if 0 printf("%s\n", name().cstr()); for (int j=0; j < m_size; j++) printf("%05x %04x %04x %04x\n", j, m_ttp->m_outs[j] & ((1 << m_NO)-1), - m_ttp->m_outs[j] >> m_NO, m_ttp->m_timing[j][0]); + m_ttp->m_outs[j] >> m_NO, m_ttp->m_timing[j * m_NO + 0]); for (int k=0; m_ttp->m_timing_nt[k] != netlist_time::zero; k++) printf("%d %f\n", k, m_ttp->m_timing_nt[k].as_double() * 1000000.0); #endif - m_ttp->m_initialized = true; + // FIXME: save state + save(NLNAME(m_last_state)); + save(NLNAME(m_ign)); + save(NLNAME(m_active)); } ATTR_COLD void reset() { - m_active = 1; + m_active = 0; + for (int i=0; i<m_NO;i++) + if (this->m_Q[i].net().num_cons()>0) + m_active++; m_last_state = 0; } @@ -297,16 +170,13 @@ public: { if (!doOUT || (m_ign & (1<<i)) != 0) m_i[i].activate(); - state |= (INPLOGIC(m_i[i]) << i); } - - if (!doOUT) + for (int i = 0; i < m_NI; i++) { - for (int i = 0; i< m_NI; i++) - { + state |= (INPLOGIC(m_i[i]) << i); + if (!doOUT) if (this->m_i[i].net().time() > mt) mt = this->m_i[i].net().time(); - } } const UINT32 nstate = state | (has_state ? (m_last_state << m_NI) : 0); @@ -315,10 +185,11 @@ public: if (has_state) m_last_state = (state << m_NO) | out; +#if 0 for (int i = 0; i < m_NI; i++) if (m_ign & (1 << i)) m_i[i].inactivate(); - +#endif const UINT32 timebase = nstate * m_NO; if (doOUT) { @@ -329,6 +200,10 @@ public: for (int 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++) + if (m_ign & (1 << i)) + m_i[i].inactivate(); + } ATTR_HOT ATTR_ALIGN void update() @@ -341,7 +216,9 @@ public: nl_assert(netlist().use_deactivate()); if (has_state == 0) if (++m_active == 1) + { process<false>(); + } } ATTR_HOT void dec_active() @@ -349,8 +226,10 @@ public: nl_assert(netlist().use_deactivate()); if (has_state == 0) if (--m_active == 0) + { for (int i = 0; i< m_NI; i++) m_i[i].inactivate(); + } } netlist_logic_input_t m_i[m_NI]; @@ -366,4 +245,7 @@ private: const char **m_desc; }; + + + #endif /* NLD_TRUTHTABLE_H_ */ diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c index dfd7c84e76d..e61cb65a09c 100644 --- a/src/emu/netlist/nl_base.c +++ b/src/emu/netlist/nl_base.c @@ -11,8 +11,6 @@ #include "pstring.h" #include "nl_util.h" -#include <stdlib.h> // FIXME: only included for atof - const netlist_time netlist_time::zero = netlist_time::from_raw(0); class netlist_logic_family_ttl_t : public netlist_logic_family_desc_t @@ -161,7 +159,6 @@ ATTR_COLD void netlist_owned_object_t::init_object(netlist_core_device_t &dev, netlist_base_t::netlist_base_t() : netlist_object_t(NETLIST, GENERIC), m_stop(netlist_time::zero), - // FIXME:: Use a parameter to set this on a schematics per schematics basis m_time(netlist_time::zero), m_queue(*this), m_use_deactivate(0), @@ -196,7 +193,7 @@ ATTR_COLD void netlist_base_t::save_register() netlist_object_t::save_register(); } -ATTR_HOT const nl_double netlist_base_t::gmin() const +ATTR_HOT nl_double netlist_base_t::gmin() const { return solver()->gmin(); } @@ -234,6 +231,19 @@ ATTR_COLD void netlist_base_t::start() } +ATTR_COLD void netlist_base_t::stop() +{ + /* find the main clock and solver ... */ + + NL_VERBOSE_OUT(("Stopping all devices ...\n")); + + // Step all devices once ! + for (int i = 0; i < m_devices.count(); i++) + { + m_devices[i]->stop_dev(); + } +} + ATTR_COLD netlist_net_t *netlist_base_t::find_net(const pstring &name) { for (int i = 0; i < m_nets.count(); i++) @@ -407,9 +417,16 @@ ATTR_COLD void netlist_core_device_t::start_dev() start(); } -ATTR_HOT ATTR_ALIGN const netlist_sig_t netlist_core_device_t::INPLOGIC_PASSIVE(netlist_logic_input_t &inp) +ATTR_COLD void netlist_core_device_t::stop_dev() { - if (inp.state() != netlist_input_t::STATE_INP_PASSIVE) +#if (NL_KEEP_STATISTICS) +#endif + stop(); +} + +ATTR_HOT ATTR_ALIGN netlist_sig_t netlist_core_device_t::INPLOGIC_PASSIVE(netlist_logic_input_t &inp) +{ + if (inp.state() != netlist_logic_t::STATE_INP_PASSIVE) return inp.Q(); else { @@ -456,7 +473,7 @@ ATTR_COLD void netlist_device_t::init(netlist_base_t &anetlist, const pstring &n ATTR_COLD void netlist_device_t::register_sub(const pstring &name, netlist_device_t &dev) { dev.init(netlist(), this->name() + "." + name); - // FIXME: subdevices always first inherit the logic family of the parent + // subdevices always first inherit the logic family of the parent dev.set_logic_family(this->logic_family()); dev.start_dev(); } @@ -485,7 +502,7 @@ ATTR_COLD void netlist_device_t::register_output(const pstring &name, netlist_lo setup().register_object(*this, name, port); } -ATTR_COLD void netlist_device_t::register_output(const pstring &name, netlist_output_t &port) +ATTR_COLD void netlist_device_t::register_output(const pstring &name, netlist_analog_output_t &port) { //port.set_logic_family(this->logic_family()); setup().register_object(*this, name, port); @@ -498,7 +515,7 @@ ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_log m_terminals.add(inp.name()); } -ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_input_t &inp) +ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_analog_input_t &inp) { //inp.set_logic_family(this->logic_family()); setup().register_object(*this, name, inp); @@ -507,7 +524,9 @@ ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_inp ATTR_COLD void netlist_device_t::connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2) { - setup().connect(t1, t2); + /* FIXME: These should really first be collected like NET_C connects */ + if (!setup().connect(t1, t2)) + netlist().error("Error connecting %s to %s\n", t1.name().cstr(), t2.name().cstr()); } @@ -594,7 +613,7 @@ ATTR_HOT void netlist_net_t::dec_active(netlist_core_terminal_t &term) railterminal().netdev().dec_active(); } -ATTR_COLD void netlist_net_t::register_railterminal(netlist_output_t &mr) +ATTR_COLD void netlist_net_t::register_railterminal(netlist_core_terminal_t &mr) { nl_assert(m_railterminal == NULL); m_railterminal = &mr; @@ -606,7 +625,7 @@ ATTR_COLD void netlist_net_t::rebuild_list() m_list_active.clear(); for (int i=0; i < m_core_terms.count(); i++) - if (m_core_terms[i]->state() != netlist_input_t::STATE_INP_PASSIVE) + if (m_core_terms[i]->state() != netlist_logic_t::STATE_INP_PASSIVE) m_list_active.add(*m_core_terms[i]); } @@ -643,31 +662,11 @@ ATTR_HOT /*ATTR_ALIGN*/ inline void netlist_net_t::update_devs() netlist_core_terminal_t *p = m_list_active.first(); -#if 0 - switch (m_active) - { - case 2: - p->update_dev(mask); - p = m_list_active.next(p); - case 1: - p->update_dev(mask); - break; - default: - while (p != NULL) - { - p->update_dev(mask); - p = m_list_active.next(p); - } - break; - } -#else while (p != NULL) { p->update_dev(mask); p = m_list_active.next(p); } -#endif - } ATTR_COLD void netlist_net_t::reset() @@ -690,7 +689,7 @@ ATTR_COLD void netlist_net_t::reset() m_core_terms[i]->do_reset(); for (int i=0; i < m_core_terms.count(); i++) - if (m_core_terms[i]->state() != netlist_input_t::STATE_INP_PASSIVE) + if (m_core_terms[i]->state() != netlist_logic_t::STATE_INP_PASSIVE) m_active++; } @@ -700,7 +699,7 @@ ATTR_COLD void netlist_net_t::register_con(netlist_core_terminal_t &terminal) m_core_terms.add(&terminal); - if (terminal.state() != netlist_input_t::STATE_INP_PASSIVE) + if (terminal.state() != netlist_logic_t::STATE_INP_PASSIVE) m_active++; } @@ -866,8 +865,6 @@ ATTR_HOT void netlist_terminal_t::schedule_after(const netlist_time &after) ATTR_COLD void netlist_terminal_t::reset() { - //printf("reset %s\n", name().cstr()); - //netlist_terminal_core_terminal_t::reset(); set_state(STATE_INP_ACTIVE); set_ptr(m_Idr1, 0.0); set_ptr(m_go1, netlist().gmin()); @@ -891,54 +888,54 @@ ATTR_COLD void netlist_terminal_t::save_register() // net_output_t // ---------------------------------------------------------------------------------------- -netlist_output_t::netlist_output_t(const type_t atype, const family_t afamily) - : netlist_core_terminal_t(atype, afamily) -{ - set_state(STATE_OUT); -} +// ---------------------------------------------------------------------------------------- +// netlist_logic_output_t +// ---------------------------------------------------------------------------------------- -ATTR_COLD netlist_output_t::~netlist_output_t() +ATTR_COLD netlist_logic_output_t::netlist_logic_output_t() + : netlist_logic_t(OUTPUT) { + set_state(STATE_OUT); + this->set_net(m_my_net); } - -ATTR_COLD void netlist_output_t::init_object(netlist_core_device_t &dev, const pstring &aname) +ATTR_COLD void netlist_logic_output_t::init_object(netlist_core_device_t &dev, const pstring &aname) { netlist_core_terminal_t::init_object(dev, aname); net().init_object(dev.netlist(), aname + ".net"); net().register_railterminal(*this); } -// ---------------------------------------------------------------------------------------- -// netlist_logic_output_t -// ---------------------------------------------------------------------------------------- - -ATTR_COLD netlist_logic_output_t::netlist_logic_output_t() - : netlist_output_t(OUTPUT, LOGIC), netlist_logic_family_t(), m_proxy(NULL) -{ - this->set_net(m_my_net); -} - ATTR_COLD void netlist_logic_output_t::initial(const netlist_sig_t val) { net().as_logic().initial(val); } + // ---------------------------------------------------------------------------------------- // netlist_analog_output_t // ---------------------------------------------------------------------------------------- ATTR_COLD netlist_analog_output_t::netlist_analog_output_t() - : netlist_output_t(OUTPUT, ANALOG), m_proxied_net(NULL) + : netlist_analog_t(OUTPUT), m_proxied_net(NULL) { this->set_net(m_my_net); + set_state(STATE_OUT); net().as_analog().m_cur_Analog = 0.98; } +ATTR_COLD void netlist_analog_output_t::init_object(netlist_core_device_t &dev, const pstring &aname) +{ + netlist_core_terminal_t::init_object(dev, aname); + net().init_object(dev.netlist(), aname + ".net"); + net().register_railterminal(*this); +} + ATTR_COLD void netlist_analog_output_t::initial(const nl_double val) { - net().as_analog().m_cur_Analog = val * 0.99; + // FIXME: Really necessary? + net().as_analog().m_cur_Analog = val * NL_FCONST(0.99); } // ---------------------------------------------------------------------------------------- @@ -1007,7 +1004,7 @@ ATTR_COLD nl_double netlist_param_model_t::model_value(const pstring &entity, co if (pequal < 0) netlist().error("parameter %s misformat in model %s temp %s\n", entity.cstr(), Value().cstr(), tmp.cstr()); tmp = tmp.substr(pequal+1); - nl_double factor = 1.0; + nl_double factor = NL_FCONST(1.0); switch (*(tmp.right(1).cstr())) { case 'm': factor = 1e-3; break; @@ -1018,9 +1015,9 @@ ATTR_COLD nl_double netlist_param_model_t::model_value(const pstring &entity, co case 'a': factor = 1e-18; break; } - if (factor != 1.0) + if (factor != NL_FCONST(1.0)) tmp = tmp.left(tmp.len() - 1); - return atof(tmp.cstr()) * factor; + return tmp.as_double() * factor; } else { diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h index dfac03a7491..a5f471f5f5a 100644 --- a/src/emu/netlist/nl_base.h +++ b/src/emu/netlist/nl_base.h @@ -191,11 +191,11 @@ typedef void (*net_update_delegate)(netlist_core_device_t *); #define NETLIB_UPDATE(_chip) ATTR_HOT ATTR_ALIGN void NETLIB_NAME(_chip) :: update(void) #define NETLIB_START(_chip) ATTR_COLD void NETLIB_NAME(_chip) :: start(void) -//#define NETLIB_CONSTRUCTOR(_chip) ATTR_COLD _chip :: _chip (netlist_setup_t &setup, const char *name) -// : net_device_t(setup, name) #define NETLIB_RESET(_chip) ATTR_COLD void NETLIB_NAME(_chip) :: reset(void) +#define NETLIB_STOP(_chip) ATTR_COLD void NETLIB_NAME(_chip) :: stop(void) + #define NETLIB_UPDATE_PARAM(_chip) ATTR_HOT ATTR_ALIGN void NETLIB_NAME(_chip) :: update_param(void) #define NETLIB_FUNC_VOID(_chip, _name, _params) ATTR_HOT ATTR_ALIGN void NETLIB_NAME(_chip) :: _name _params @@ -260,20 +260,20 @@ ATTR_COLD virtual const netlist_logic_family_desc_t *default_logic_family() // forward definitions // ----------------------------------------------------------------------------- -class netlist_net_t; +class netlist_logic_output_t; class netlist_analog_net_t; class netlist_logic_net_t; -class netlist_output_t; -class netlist_logic_output_t; +class netlist_net_t; class netlist_param_t; class netlist_setup_t; class netlist_base_t; class netlist_matrix_solver_t; + class NETLIB_NAME(gnd); class NETLIB_NAME(solver); class NETLIB_NAME(mainclock); class NETLIB_NAME(netlistparams); -class NETLIB_NAME(base_d_to_a_proxy); +class NETLIB_NAME(base_proxy); // ----------------------------------------------------------------------------- // netlist_output_family_t @@ -368,11 +368,11 @@ public: PSTATE_INTERFACE_DECL() - ATTR_HOT inline const type_t type() const { return m_objtype; } - ATTR_HOT inline const family_t family() const { return m_family; } + ATTR_HOT inline type_t type() const { return m_objtype; } + ATTR_HOT inline family_t family() const { return m_family; } - ATTR_HOT inline const bool isType(const type_t atype) const { return (m_objtype == atype); } - ATTR_HOT inline const bool isFamily(const family_t afamily) const { return (m_family == afamily); } + ATTR_HOT inline bool isType(const type_t atype) const { return (m_objtype == atype); } + ATTR_HOT inline bool isFamily(const family_t afamily) const { return (m_family == afamily); } ATTR_HOT inline netlist_base_t & RESTRICT netlist() { return *m_netlist; } ATTR_HOT inline const netlist_base_t & RESTRICT netlist() const { return *m_netlist; } @@ -421,7 +421,7 @@ class netlist_core_terminal_t : public netlist_owned_object_t, public plinkedlis NETLIST_PREVENT_COPYING(netlist_core_terminal_t) public: - typedef plinearlist_t<netlist_core_terminal_t *> list_t; + typedef plist_t<netlist_core_terminal_t *> list_t; /* needed here ... */ @@ -446,8 +446,8 @@ public: ATTR_HOT inline const netlist_net_t & RESTRICT net() const { return *m_net;} ATTR_HOT inline netlist_net_t & RESTRICT net() { return *m_net;} - ATTR_HOT inline const bool is_state(const state_e astate) const { return (m_state == astate); } - ATTR_HOT inline const state_e state() const { return m_state; } + ATTR_HOT inline bool is_state(const state_e astate) const { return (m_state == astate); } + ATTR_HOT inline state_e state() const { return m_state; } ATTR_HOT inline void set_state(const state_e astate) { nl_assert(astate != STATE_NONEX); @@ -477,7 +477,7 @@ class ATTR_ALIGN netlist_terminal_t : public netlist_core_terminal_t NETLIST_PREVENT_COPYING(netlist_terminal_t) public: - typedef plinearlist_t<netlist_terminal_t * RESTRICT> list_t; + typedef plist_t<netlist_terminal_t * RESTRICT> list_t; ATTR_COLD netlist_terminal_t(); @@ -530,27 +530,39 @@ private: // netlist_input_t // ----------------------------------------------------------------------------- -class netlist_input_t : public netlist_core_terminal_t +class netlist_logic_t : public netlist_core_terminal_t, public netlist_logic_family_t { public: - ATTR_COLD netlist_input_t(const type_t atype, const family_t afamily) - : netlist_core_terminal_t(atype, afamily) + ATTR_COLD netlist_logic_t(const type_t atype) + : netlist_core_terminal_t(atype, LOGIC), netlist_logic_family_t(), + m_proxy(NULL) { - set_state(STATE_INP_ACTIVE); } - ATTR_HOT inline void inactivate(); - ATTR_HOT inline void activate(); + ATTR_COLD bool has_proxy() const { return (m_proxy != NULL); } + ATTR_COLD nld_base_proxy *get_proxy() const { return m_proxy; } + ATTR_COLD void set_proxy(nld_base_proxy *proxy) { m_proxy = proxy; } protected: - ATTR_COLD virtual void reset() + +private: + nld_base_proxy *m_proxy; +}; + +class netlist_analog_t : public netlist_core_terminal_t +{ +public: + + + ATTR_COLD netlist_analog_t(const type_t atype) + : netlist_core_terminal_t(atype, ANALOG) { - //netlist_core_terminal_t::reset(); - set_state(STATE_INP_ACTIVE); } +protected: + private: }; @@ -558,33 +570,53 @@ private: // netlist_logic_input_t // ----------------------------------------------------------------------------- -class netlist_logic_input_t : public netlist_input_t, public netlist_logic_family_t +class netlist_logic_input_t : public netlist_logic_t { public: ATTR_COLD netlist_logic_input_t() - : netlist_input_t(INPUT, LOGIC), netlist_logic_family_t() + : netlist_logic_t(INPUT) { + set_state(STATE_INP_ACTIVE); } - ATTR_HOT inline const netlist_sig_t Q() const; - ATTR_HOT inline const netlist_sig_t last_Q() const; + ATTR_HOT inline netlist_sig_t Q() const; + ATTR_HOT inline netlist_sig_t last_Q() const; + ATTR_HOT inline void inactivate(); + ATTR_HOT inline void activate(); ATTR_HOT inline void activate_hl(); ATTR_HOT inline void activate_lh(); +protected: + ATTR_COLD virtual void reset() + { + //netlist_core_terminal_t::reset(); + set_state(STATE_INP_ACTIVE); + } + }; // ----------------------------------------------------------------------------- // netlist_analog_input_t // ----------------------------------------------------------------------------- -class netlist_analog_input_t : public netlist_input_t +class netlist_analog_input_t : public netlist_analog_t { public: ATTR_COLD netlist_analog_input_t() - : netlist_input_t(INPUT, ANALOG) { } + : netlist_analog_t(INPUT) + { + set_state(STATE_INP_ACTIVE); + } - ATTR_HOT inline const nl_double Q_Analog() const; + ATTR_HOT inline nl_double Q_Analog() const; + +protected: + ATTR_COLD virtual void reset() + { + //netlist_core_terminal_t::reset(); + set_state(STATE_INP_ACTIVE); + } }; //#define INPVAL(_x) (_x).Q() @@ -598,7 +630,7 @@ class netlist_net_t : public netlist_object_t NETLIST_PREVENT_COPYING(netlist_net_t) public: - typedef plinearlist_t<netlist_net_t *> list_t; + typedef plist_t<netlist_net_t *> list_t; ATTR_COLD netlist_net_t(const family_t afamily); ATTR_COLD virtual ~netlist_net_t(); @@ -607,7 +639,7 @@ public: ATTR_COLD void register_con(netlist_core_terminal_t &terminal); ATTR_COLD void merge_net(netlist_net_t *othernet); - ATTR_COLD void register_railterminal(netlist_output_t &mr); + ATTR_COLD void register_railterminal(netlist_core_terminal_t &mr); ATTR_HOT inline netlist_logic_net_t & RESTRICT as_logic(); ATTR_HOT inline const netlist_logic_net_t & RESTRICT as_logic() const; @@ -621,7 +653,7 @@ public: ATTR_HOT inline void set_time(const netlist_time &ntime) { m_time = ntime; } ATTR_HOT inline bool isRailNet() const { return !(m_railterminal == NULL); } - ATTR_HOT inline const netlist_core_terminal_t & RESTRICT railterminal() const { return *m_railterminal; } + ATTR_HOT inline netlist_core_terminal_t & railterminal() const { return *m_railterminal; } ATTR_HOT inline void push_to_queue(const netlist_time &delay); ATTR_HOT inline void reschedule_in_queue(const netlist_time &delay); @@ -636,7 +668,7 @@ public: ATTR_COLD void move_connections(netlist_net_t *new_net); - plinearlist_t<netlist_core_terminal_t *> m_core_terms; // save post-start m_list ... + plist_t<netlist_core_terminal_t *> m_core_terms; // save post-start m_list ... ATTR_HOT inline void set_Q_time(const netlist_sig_t &newQ, const netlist_time &at) { @@ -678,17 +710,17 @@ class netlist_logic_net_t : public netlist_net_t NETLIST_PREVENT_COPYING(netlist_logic_net_t) public: - typedef plinearlist_t<netlist_logic_net_t *> list_t; + typedef plist_t<netlist_logic_net_t *> list_t; ATTR_COLD netlist_logic_net_t(); ATTR_COLD virtual ~netlist_logic_net_t() { }; - ATTR_HOT inline const netlist_sig_t Q() const + ATTR_HOT inline netlist_sig_t Q() const { return m_cur_Q; } - ATTR_HOT inline const netlist_sig_t new_Q() const + ATTR_HOT inline netlist_sig_t new_Q() const { return m_new_Q; } @@ -718,7 +750,6 @@ public: */ ATTR_COLD inline netlist_sig_t &Q_state_ptr() { - nl_assert(family() == LOGIC); return m_cur_Q; } @@ -739,22 +770,18 @@ class netlist_analog_net_t : public netlist_net_t NETLIST_PREVENT_COPYING(netlist_analog_net_t) public: - typedef plinearlist_t<netlist_analog_net_t *> list_t; + typedef plist_t<netlist_analog_net_t *> list_t; ATTR_COLD netlist_analog_net_t(); ATTR_COLD virtual ~netlist_analog_net_t() { }; - ATTR_HOT inline const nl_double Q_Analog() const + ATTR_HOT inline nl_double Q_Analog() const { - //nl_assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG); - nl_assert(family() == ANALOG); return m_cur_Analog; } ATTR_COLD inline nl_double &Q_Analog_state_ptr() { - //nl_assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG); - nl_assert(family() == ANALOG); return m_cur_Analog; } @@ -783,13 +810,12 @@ public: // net_output_t // ----------------------------------------------------------------------------- -class netlist_output_t : public netlist_core_terminal_t +class netlist_logic_output_t : public netlist_logic_t { - NETLIST_PREVENT_COPYING(netlist_output_t) + NETLIST_PREVENT_COPYING(netlist_logic_output_t) public: - ATTR_COLD netlist_output_t(const type_t atype, const family_t afamily); - ATTR_COLD virtual ~netlist_output_t(); + ATTR_COLD netlist_logic_output_t(); ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); ATTR_COLD virtual void reset() @@ -797,17 +823,6 @@ public: set_state(STATE_OUT); } -private: -}; - - -class netlist_logic_output_t : public netlist_output_t, public netlist_logic_family_t -{ - NETLIST_PREVENT_COPYING(netlist_logic_output_t) -public: - - ATTR_COLD netlist_logic_output_t(); - ATTR_COLD void initial(const netlist_sig_t val); ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time &delay) @@ -815,22 +830,23 @@ public: net().as_logic().set_Q(newQ, delay); } - ATTR_COLD bool has_proxy() const { return (m_proxy != NULL); } - ATTR_COLD nld_base_d_to_a_proxy *get_proxy() const { return m_proxy; } - ATTR_COLD void set_proxy(nld_base_d_to_a_proxy *proxy) { m_proxy = proxy; } - private: netlist_logic_net_t m_my_net; - nld_base_d_to_a_proxy *m_proxy; }; -class netlist_analog_output_t : public netlist_output_t +class netlist_analog_output_t : public netlist_analog_t { NETLIST_PREVENT_COPYING(netlist_analog_output_t) public: ATTR_COLD netlist_analog_output_t(); + ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); + ATTR_COLD virtual void reset() + { + set_state(STATE_OUT); + } + ATTR_COLD void initial(const nl_double val); ATTR_HOT inline void set_Q(const nl_double newQ); @@ -860,7 +876,7 @@ public: ATTR_COLD netlist_param_t(const param_type_t atype); - ATTR_HOT inline const param_type_t param_type() const { return m_param_type; } + ATTR_HOT inline param_type_t param_type() const { return m_param_type; } protected: @@ -878,7 +894,7 @@ public: ATTR_HOT inline void setTo(const nl_double param); ATTR_COLD inline void initial(const nl_double val) { m_param = val; } - ATTR_HOT inline const nl_double Value() const { return m_param; } + ATTR_HOT inline nl_double Value() const { return m_param; } protected: ATTR_COLD virtual void save_register() @@ -900,7 +916,7 @@ public: ATTR_HOT inline void setTo(const int param); ATTR_COLD inline void initial(const int val) { m_param = val; } - ATTR_HOT inline const int Value() const { return m_param; } + ATTR_HOT inline int Value() const { return m_param; } protected: ATTR_COLD virtual void save_register() @@ -962,7 +978,7 @@ class netlist_core_device_t : public netlist_object_t, public netlist_logic_fami NETLIST_PREVENT_COPYING(netlist_core_device_t) public: - typedef plinearlist_t<netlist_core_device_t *> list_t; + typedef plist_t<netlist_core_device_t *> list_t; ATTR_COLD netlist_core_device_t(const family_t afamily); @@ -987,12 +1003,13 @@ public: end_timing(stat_total_time); } ATTR_COLD void start_dev(); + ATTR_COLD void stop_dev(); - ATTR_HOT const netlist_sig_t INPLOGIC_PASSIVE(netlist_logic_input_t &inp); + ATTR_HOT netlist_sig_t INPLOGIC_PASSIVE(netlist_logic_input_t &inp); - ATTR_HOT inline const netlist_sig_t INPLOGIC(const netlist_logic_input_t &inp) const + ATTR_HOT inline netlist_sig_t INPLOGIC(const netlist_logic_input_t &inp) const { - nl_assert(inp.state() != netlist_input_t::STATE_INP_PASSIVE); + nl_assert(inp.state() != netlist_logic_t::STATE_INP_PASSIVE); return inp.Q(); } @@ -1001,9 +1018,9 @@ public: out.set_Q(val, delay); } - ATTR_HOT inline const nl_double INPANALOG(const netlist_analog_input_t &inp) const { return inp.Q_Analog(); } + ATTR_HOT inline nl_double INPANALOG(const netlist_analog_input_t &inp) const { return inp.Q_Analog(); } - ATTR_HOT inline const nl_double TERMANALOG(const netlist_terminal_t &term) const { return term.net().as_analog().Q_Analog(); } + ATTR_HOT inline nl_double TERMANALOG(const netlist_terminal_t &term) const { return term.net().as_analog().Q_Analog(); } ATTR_HOT inline void OUTANALOG(netlist_analog_output_t &out, const nl_double val) { @@ -1034,6 +1051,7 @@ protected: ATTR_HOT virtual void update() { } ATTR_COLD virtual void start() { } + ATTR_COLD virtual void stop() { } \ ATTR_COLD virtual const netlist_logic_family_desc_t *default_logic_family() { return &netlist_family_TTL; @@ -1060,14 +1078,14 @@ public: ATTR_COLD void register_sub(const pstring &name, netlist_device_t &dev); ATTR_COLD void register_subalias(const pstring &name, netlist_core_terminal_t &term); ATTR_COLD void register_terminal(const pstring &name, netlist_terminal_t &port); - ATTR_COLD void register_output(const pstring &name, netlist_output_t &out); + ATTR_COLD void register_output(const pstring &name, netlist_analog_output_t &out); ATTR_COLD void register_output(const pstring &name, netlist_logic_output_t &out); - ATTR_COLD void register_input(const pstring &name, netlist_input_t &in); + ATTR_COLD void register_input(const pstring &name, netlist_analog_input_t &in); ATTR_COLD void register_input(const pstring &name, netlist_logic_input_t &in); ATTR_COLD void connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2); - plinearlist_t<pstring, 20> m_terminals; + plist_t<pstring> m_terminals; protected: @@ -1121,13 +1139,14 @@ public: virtual ~netlist_base_t(); ATTR_COLD void start(); + ATTR_COLD void stop(); ATTR_HOT inline const netlist_queue_t &queue() const { return m_queue; } ATTR_HOT inline netlist_queue_t &queue() { return m_queue; } ATTR_HOT inline const netlist_time &time() const { return m_time; } ATTR_HOT inline NETLIB_NAME(solver) *solver() const { return m_solver; } ATTR_HOT inline NETLIB_NAME(gnd) *gnd() const { return m_gnd; } - ATTR_HOT const nl_double gmin() const; + ATTR_HOT nl_double gmin() const; ATTR_HOT void push_to_queue(netlist_net_t &out, const netlist_time &attime); ATTR_HOT void remove_from_queue(netlist_net_t &out); @@ -1149,9 +1168,9 @@ public: ATTR_COLD void log(const char *format, ...) const ATTR_PRINTF(2,3); template<class _C> - plinearlist_t<_C *> get_device_list() + plist_t<_C *> get_device_list() { - plinearlist_t<_C *> tmp; + plist_t<_C *> tmp; for (netlist_device_t * const *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) { _C *dev = dynamic_cast<_C *>(*entry); @@ -1164,7 +1183,6 @@ public: template<class _C> _C *get_first_device() { - //FIXME: for (netlist_device_t * const *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) { _C *dev = dynamic_cast<_C *>(*entry); @@ -1293,7 +1311,7 @@ ATTR_HOT inline const netlist_analog_net_t & RESTRICT netlist_net_t::as_analog() } -ATTR_HOT inline void netlist_input_t::inactivate() +ATTR_HOT inline void netlist_logic_input_t::inactivate() { if (EXPECTED(!is_state(STATE_INP_PASSIVE))) { @@ -1302,7 +1320,7 @@ ATTR_HOT inline void netlist_input_t::inactivate() } } -ATTR_HOT inline void netlist_input_t::activate() +ATTR_HOT inline void netlist_logic_input_t::activate() { if (is_state(STATE_INP_PASSIVE)) { @@ -1357,13 +1375,12 @@ ATTR_HOT inline void netlist_net_t::reschedule_in_queue(const netlist_time &dela } -ATTR_HOT inline const netlist_sig_t netlist_logic_input_t::Q() const +ATTR_HOT inline netlist_sig_t netlist_logic_input_t::Q() const { - nl_assert(family() == LOGIC); return net().as_logic().Q(); } -ATTR_HOT inline const nl_double netlist_analog_input_t::Q_Analog() const +ATTR_HOT inline nl_double netlist_analog_input_t::Q_Analog() const { return net().as_analog().Q_Analog(); } diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h index 912127f208d..695a9ced4cd 100644 --- a/src/emu/netlist/nl_config.h +++ b/src/emu/netlist/nl_config.h @@ -75,13 +75,19 @@ #define NETLIST_GMIN_DEFAULT (1e-9) + +//#define nl_double float +//#define NL_FCONST(x) (x ## f) + #define nl_double double +#define NL_FCONST(x) x + //============================================================ // Solver defines //============================================================ -#define USE_MATRIX_GS (1) +#define USE_MATRIX_GS (0) #define USE_PIVOT_SEARCH (0) #define USE_GABS (1) // savings are eaten up by effort diff --git a/src/emu/netlist/nl_dice_compat.h b/src/emu/netlist/nl_dice_compat.h index 06acbd998ed..45a20f1b533 100644 --- a/src/emu/netlist/nl_dice_compat.h +++ b/src/emu/netlist/nl_dice_compat.h @@ -3,12 +3,31 @@ /* * nl_dice_compat.h * + * The follwoing script will convert a circuit using dice syntax into netlist + * syntax. It's not fail proof, but eases the manual work involved significantly. + +sed -e 's/#define \(.*\)"\(.*\)"[ \t]*,[ \t]*\(.*\)/NET_ALIAS(\1,\2.\3)/' src/mame/drivers/nl_breakout.c \ +| sed -e 's/^[ \t]*$/NL_EMPTY /' \ +| cpp -I src/emu -I src/osd/ -DNL_CONVERT_CPP -P -CC - \ +| sed -e 's/\(TTL_.*\)("\(.*\)")/\1(\2)/' \ +| sed -e 's/CONNECTION(\(.*\),[ \t]*"\(.*\)", \(.*\))/NET_C(\1, \2.\3)/' \ +| sed -e 's/CONNECTION("\(.*\)",[ \t]*\(.*\), \(.*\))/NET_C(\1.\2, \3)/' \ +| sed -e 's/NET_C("\(.*\)", \(.*\), \(.*\))/NET_C(\1.\2, \3)/' \ +| sed -e 's/) RES(/)\n RES(/g' \ +| sed -e 's/) CAP(/)\n CAP(/g' \ +| sed -e 's/) NET_C(/)\n NET_C(/g' \ +| sed -e 's/NL_EMPTY//' \ + + * */ #ifndef NL_DICE_COMPAT_H_ #define NL_DICE_COMPAT_H_ +#ifndef NL_CONVERT_CPP #include "netlist/devices/net_lib.h" +#include "netlist/analog/nld_twoterm.h" +#endif /* -------------------------------------------------------------------- * Compatibility macros for DICE netlists ... @@ -20,6 +39,7 @@ * a temporary support and not be used in commits. */ +#ifndef NL_CONVERT_CPP #ifdef NETLIST_DEVELOPMENT #define CHIP(_n, _t) setup.register_dev( nl_alloc(nld_ ## _t ## _dip), _n); #else @@ -31,10 +51,6 @@ #define CONNECTIONX(_a, _b, _c, _d) setup.register_link(_a "." # _b, _c "." # _d); #define NET_CSTR(_a, _b) setup.register_link( _a, _b); -#define CIRCUIT_LAYOUT(x) NETLIST_START(x) -#define CIRCUIT_LAYOUT_END NETLIST_END() - - #define OHM(x) (x) #define K_OHM(x) ((x) * 1000.0) #define M_OHM(x) ((x) * 1.0e6) @@ -81,6 +97,22 @@ public: CapacitorDesc(nl_double cap) : SeriesRCDesc(0.0, cap) { } }; +#else +#define CHIP(_n, _t) TTL_ ## _t ## _DIP(_n) + +#define OHM(x) x +#define K_OHM(x) RES_K(X) +#define M_OHM(x) RES_M(X) +#define U_FARAD(x) CAP_U(x) +#define N_FARAD(x) CAP_N(x) +#define P_FARAD(x) CAP_P(x) + +#endif + + +#define CIRCUIT_LAYOUT(x) NETLIST_START(x) +#define CIRCUIT_LAYOUT_END NETLIST_END() + #define CHIP_555_Mono(_name, _pdesc) \ CHIP(# _name, NE555) \ NET_C(_name.6, _name.7) \ diff --git a/src/emu/netlist/nl_factory.h b/src/emu/netlist/nl_factory.h index 7f6f664cb7c..421bdfefdad 100644 --- a/src/emu/netlist/nl_factory.h +++ b/src/emu/netlist/nl_factory.h @@ -12,11 +12,6 @@ #include "nl_config.h" #include "plists.h" #include "nl_base.h" -#if 0 -#include "nl_time.h" -#include "nl_util.h" -#include "pstate.h" -#endif #include "pstring.h" // ----------------------------------------------------------------------------- @@ -68,7 +63,7 @@ public: class netlist_factory_t { public: - typedef plinearlist_t<net_device_t_base_factory *> list_t; + typedef plist_t<net_device_t_base_factory *> list_t; ATTR_COLD netlist_factory_t(); ATTR_COLD ~netlist_factory_t(); diff --git a/src/emu/netlist/nl_lists.h b/src/emu/netlist/nl_lists.h index 54ce482f228..b0bfdd9b517 100644 --- a/src/emu/netlist/nl_lists.h +++ b/src/emu/netlist/nl_lists.h @@ -49,9 +49,9 @@ public: clear(); } - ATTR_HOT inline const int capacity() const { return _Size; } - ATTR_HOT inline const bool is_empty() const { return (m_end == &m_list[0]); } - ATTR_HOT inline const bool is_not_empty() const { return (m_end > &m_list[0]); } + ATTR_HOT inline int capacity() const { return _Size; } + ATTR_HOT inline bool is_empty() const { return (m_end == &m_list[0]); } + ATTR_HOT inline bool is_not_empty() const { return (m_end > &m_list[0]); } ATTR_HOT /*ATTR_ALIGN*/ void push(const entry_t &e) { diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c index 086dcd7d360..fb939ed6ebd 100644 --- a/src/emu/netlist/nl_parser.c +++ b/src/emu/netlist/nl_parser.c @@ -194,7 +194,7 @@ ATTR_COLD void ptokenizer::error(const char *format, ...) va_list ap; va_start(ap, format); - pstring errmsg1 =pstring(format).vprintf(ap); + pstring errmsg1 = pstring(format).vprintf(ap); va_end(ap); verror(errmsg1, currentline_no(), currentline_str()); @@ -379,20 +379,19 @@ void netlist_parser::net_alias() void netlist_parser::net_c() { - pstring last = get_identifier(); + pstring first = get_identifier(); require_token(m_tok_comma); while (true) { pstring t1 = get_identifier(); - m_setup.register_link(last , t1); + m_setup.register_link(first , t1); NL_VERBOSE_OUT(("Parser: Connect: %s %s\n", last.cstr(), t1.cstr())); token_t n = get_token(); if (n.is(m_tok_param_right)) break; if (!n.is(m_tok_comma)) error("expected a comma, found <%s>", n.str().cstr()); - last = t1; } } diff --git a/src/emu/netlist/nl_parser.h b/src/emu/netlist/nl_parser.h index 3af51255cda..d93bf7585d4 100644 --- a/src/emu/netlist/nl_parser.h +++ b/src/emu/netlist/nl_parser.h @@ -36,7 +36,7 @@ public: public: token_id_t() : m_id(-2) {} token_id_t(const int id) : m_id(id) {} - const int id() const { return m_id; } + int id() const { return m_id; } private: int m_id; }; @@ -127,7 +127,7 @@ private: pstring m_identifier_chars; pstring m_number_chars; - plinearlist_t<pstring> m_tokens; + plist_t<pstring> m_tokens; pstring m_whitespace; char m_string; @@ -182,7 +182,7 @@ private: class netlist_source_t { public: - typedef plinearlist_t<netlist_source_t> list_t; + typedef plist_t<netlist_source_t> list_t; enum source_e { diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c index 8fe226a2159..ba69d6bd47c 100644 --- a/src/emu/netlist/nl_setup.c +++ b/src/emu/netlist/nl_setup.c @@ -15,9 +15,6 @@ #include "analog/nld_solver.h" #include "analog/nld_twoterm.h" -//FIXME: we need a nl_getenv -#include <stdlib.h> - static NETLIST_START(base) TTL_INPUT(ttlhigh, 1) TTL_INPUT(ttllow, 0) @@ -193,7 +190,14 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name { netlist_core_terminal_t &term = dynamic_cast<netlist_core_terminal_t &>(obj); if (obj.isType(netlist_terminal_t::OUTPUT)) - dynamic_cast<netlist_output_t &>(term).init_object(dev, dev.name() + "." + name); + { + if (obj.isFamily(netlist_terminal_t::LOGIC)) + dynamic_cast<netlist_logic_output_t &>(term).init_object(dev, dev.name() + "." + name); + else if (obj.isFamily(netlist_terminal_t::ANALOG)) + dynamic_cast<netlist_analog_output_t &>(term).init_object(dev, dev.name() + "." + name); + else + netlist().error("Error adding %s %s to terminal list, neither LOGIC nor ANALOG\n", objtype_as_astr(term).cstr(), term.name().cstr()); + } else term.init_object(dev, dev.name() + "." + name); @@ -389,23 +393,24 @@ netlist_param_t *netlist_setup_t::find_param(const pstring ¶m_in, bool requi return ret; } -nld_base_d_to_a_proxy *netlist_setup_t::get_d_a_proxy(netlist_output_t &out) +// FIXME avoid dynamic cast here +nld_base_proxy *netlist_setup_t::get_d_a_proxy(netlist_core_terminal_t &out) { nl_assert(out.isFamily(netlist_terminal_t::LOGIC)); //printf("proxy for %s\n", out.name().cstr());; netlist_logic_output_t &out_cast = dynamic_cast<netlist_logic_output_t &>(out); - nld_base_d_to_a_proxy *proxy = out_cast.get_proxy(); + nld_base_proxy *proxy = out_cast.get_proxy(); if (proxy == NULL) { // create a new one ... - proxy = out_cast.logic_family()->create_d_a_proxy(out_cast); + nld_base_d_to_a_proxy *new_proxy = out_cast.logic_family()->create_d_a_proxy(out_cast); pstring x = pstring::sprintf("proxy_da_%s_%d", out.name().cstr(), m_proxy_cnt); m_proxy_cnt++; - register_dev(proxy, x); - proxy->start_dev(); + register_dev(new_proxy, x); + new_proxy->start_dev(); #if 1 /* connect all existing terminals to new net */ @@ -414,23 +419,25 @@ nld_base_d_to_a_proxy *netlist_setup_t::get_d_a_proxy(netlist_output_t &out) { netlist_core_terminal_t *p = out.net().m_core_terms[i]; p->clear_net(); // de-link from all nets ... - connect(proxy->out(), *p); + if (!connect(new_proxy->proxy_term(), *p)) + netlist().error("Error connecting %s to %s\n", new_proxy->proxy_term().name().cstr(), (*p).name().cstr()); } out.net().m_core_terms.clear(); // clear the list #endif - out.net().register_con(proxy->in()); - out_cast.set_proxy(proxy); - + out.net().register_con(new_proxy->in()); + out_cast.set_proxy(new_proxy); + proxy = new_proxy; } return proxy; } -void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t &out) +void netlist_setup_t::connect_input_output(netlist_core_terminal_t &in, netlist_core_terminal_t &out) { if (out.isFamily(netlist_terminal_t::ANALOG) && in.isFamily(netlist_terminal_t::LOGIC)) { netlist_logic_input_t &incast = dynamic_cast<netlist_logic_input_t &>(in); nld_a_to_d_proxy *proxy = nl_alloc(nld_a_to_d_proxy, incast); + incast.set_proxy(proxy); pstring x = pstring::sprintf("proxy_ad_%s_%d", in.name().cstr(), m_proxy_cnt); m_proxy_cnt++; @@ -443,9 +450,9 @@ void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t } else if (out.isFamily(netlist_terminal_t::LOGIC) && in.isFamily(netlist_terminal_t::ANALOG)) { - nld_base_d_to_a_proxy *proxy = get_d_a_proxy(out); + nld_base_proxy *proxy = get_d_a_proxy(out); - connect_terminals(proxy->out(), in); + connect_terminals(proxy->proxy_term(), in); //proxy->out().net().register_con(in); } else @@ -457,7 +464,8 @@ void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t } } -void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_input_t &inp) + +void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_core_terminal_t &inp) { if (inp.isFamily(netlist_terminal_t::ANALOG)) { @@ -468,6 +476,7 @@ void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_i netlist_logic_input_t &incast = dynamic_cast<netlist_logic_input_t &>(inp); NL_VERBOSE_OUT(("connect_terminal_input: connecting proxy\n")); nld_a_to_d_proxy *proxy = nl_alloc(nld_a_to_d_proxy, incast); + incast.set_proxy(proxy); pstring x = pstring::sprintf("proxy_ad_%s_%d", inp.name().cstr(), m_proxy_cnt); m_proxy_cnt++; @@ -488,7 +497,7 @@ void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_i } } -void netlist_setup_t::connect_terminal_output(netlist_terminal_t &in, netlist_output_t &out) +void netlist_setup_t::connect_terminal_output(netlist_terminal_t &in, netlist_core_terminal_t &out) { if (out.isFamily(netlist_terminal_t::ANALOG)) { @@ -502,9 +511,9 @@ void netlist_setup_t::connect_terminal_output(netlist_terminal_t &in, netlist_ou else if (out.isFamily(netlist_terminal_t::LOGIC)) { NL_VERBOSE_OUT(("connect_terminal_output: connecting proxy\n")); - nld_base_d_to_a_proxy *proxy = get_d_a_proxy(out); + nld_base_proxy *proxy = get_d_a_proxy(out); - connect_terminals(proxy->out(), in); + connect_terminals(proxy->proxy_term(), in); } else { @@ -547,55 +556,106 @@ void netlist_setup_t::connect_terminals(netlist_core_terminal_t &t1, netlist_cor static netlist_core_terminal_t &resolve_proxy(netlist_core_terminal_t &term) { - if (term.isType(netlist_core_terminal_t::OUTPUT) && term.isFamily(netlist_core_terminal_t::LOGIC)) + if (term.isFamily(netlist_core_terminal_t::LOGIC)) { - netlist_logic_output_t &out = dynamic_cast<netlist_logic_output_t &>(term); + netlist_logic_t &out = dynamic_cast<netlist_logic_t &>(term); if (out.has_proxy()) - return out.get_proxy()->out(); + return out.get_proxy()->proxy_term(); } return term; } -void netlist_setup_t::connect(netlist_core_terminal_t &t1_in, netlist_core_terminal_t &t2_in) +bool netlist_setup_t::connect_input_input(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2) +{ + bool ret = false; + if (t1.has_net()) + { + if (t1.net().isRailNet()) + ret = connect(t2, t1.net().railterminal()); + if (!ret) + { + for (int i=0; i<t1.net().m_core_terms.count(); i++) + { + if (t1.net().m_core_terms[i]->isType(netlist_core_terminal_t::TERMINAL) + /*|| t1.net().m_core_terms[i]->isType(netlist_core_terminal_t::OUTPUT)*/) + { + ret = connect(t2, *t1.net().m_core_terms[i]); + } + if (ret) + break; + } + } + } + if (!ret && t2.has_net()) + { + if (t2.net().isRailNet()) + ret = connect(t1, t2.net().railterminal()); + if (!ret) + { + for (int i=0; i<t2.net().m_core_terms.count(); i++) + { + if (t2.net().m_core_terms[i]->isType(netlist_core_terminal_t::TERMINAL) + /*|| t2.net().m_core_terms[i]->isType(netlist_core_terminal_t::OUTPUT)*/) + { + ret = connect(t1, *t2.net().m_core_terms[i]); + } + if (ret) + break; + } + } + } + return ret; +} + + + +bool netlist_setup_t::connect(netlist_core_terminal_t &t1_in, netlist_core_terminal_t &t2_in) { NL_VERBOSE_OUT(("Connecting %s to %s\n", t1_in.name().cstr(), t2_in.name().cstr())); netlist_core_terminal_t &t1 = resolve_proxy(t1_in); netlist_core_terminal_t &t2 = resolve_proxy(t2_in); + bool ret = true; if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::INPUT)) { if (t2.has_net() && t2.net().isRailNet()) netlist().error("Input %s already connected\n", t2.name().cstr()); - connect_input_output(dynamic_cast<netlist_input_t &>(t2), dynamic_cast<netlist_output_t &>(t1)); + connect_input_output(t2, t1); } else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::OUTPUT)) { if (t1.has_net() && t1.net().isRailNet()) netlist().error("Input %s already connected\n", t1.name().cstr()); - connect_input_output(dynamic_cast<netlist_input_t &>(t1), dynamic_cast<netlist_output_t &>(t2)); + connect_input_output(t1, t2); } else if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::TERMINAL)) { - connect_terminal_output(dynamic_cast<netlist_terminal_t &>(t2), dynamic_cast<netlist_output_t &>(t1)); + connect_terminal_output(dynamic_cast<netlist_terminal_t &>(t2), t1); } else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::OUTPUT)) { - connect_terminal_output(dynamic_cast<netlist_terminal_t &>(t1), dynamic_cast<netlist_output_t &>(t2)); + connect_terminal_output(dynamic_cast<netlist_terminal_t &>(t1), t2); } else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::TERMINAL)) { - connect_terminal_input(dynamic_cast<netlist_terminal_t &>(t2), dynamic_cast<netlist_input_t &>(t1)); + connect_terminal_input(dynamic_cast<netlist_terminal_t &>(t2), t1); } else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::INPUT)) { - connect_terminal_input(dynamic_cast<netlist_terminal_t &>(t1), dynamic_cast<netlist_input_t &>(t2)); + connect_terminal_input(dynamic_cast<netlist_terminal_t &>(t1), t2); } else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::TERMINAL)) { connect_terminals(dynamic_cast<netlist_terminal_t &>(t1), dynamic_cast<netlist_terminal_t &>(t2)); } + else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::INPUT)) + { + ret = connect_input_input(t1, t2); + } else - netlist().error("Connecting %s to %s not supported!\n", t1.name().cstr(), t2.name().cstr()); + ret = false; + //netlist().error("Connecting %s to %s not supported!\n", t1.name().cstr(), t2.name().cstr()); + return ret; } void netlist_setup_t::resolve_inputs() @@ -604,23 +664,38 @@ void netlist_setup_t::resolve_inputs() netlist().log("Resolving inputs ..."); - for (const link_t *entry = m_links.first(); entry != NULL; entry = m_links.next(entry)) + /* Netlist can directly connect input to input. + * We therefore first park connecting inputs and retry + * after all other terminals were connected. + */ + int tries = 100; + while (m_links.count() > 0 && tries > 0) // FIXME: convert into constant { - const pstring t1s = entry->e1; - const pstring t2s = entry->e2; - netlist_core_terminal_t *t1 = find_terminal(t1s); - netlist_core_terminal_t *t2 = find_terminal(t2s); + int li = 0; + while (li < m_links.count()) + { + const pstring t1s = m_links[li].e1; + const pstring t2s = m_links[li].e2; + netlist_core_terminal_t *t1 = find_terminal(t1s); + netlist_core_terminal_t *t2 = find_terminal(t2s); - connect(*t1, *t2); + if (connect(*t1, *t2)) + { + m_links.remove_at(li); + } + else + { + li++; + } + } + tries--; } - - //netlist().log("printing outputs ..."); - /* print all outputs */ - for (int i = 0; i < m_terminals.count(); i++) + if (tries == 0) { - ATTR_UNUSED netlist_output_t *out = dynamic_cast<netlist_output_t *>(m_terminals[i]); - //if (out != NULL) - //VERBOSE_OUT(("%s %d\n", out->netdev()->name(), *out->Q_ptr())); + for (int i = 0; i < m_links.count(); i++ ) + netlist().warning("Error connecting %s to %s\n", m_links[i].e1.cstr(), m_links[i].e2.cstr()); + + netlist().error("Error connecting -- bailing out\n"); } netlist().log("deleting empty nets ..."); @@ -637,12 +712,7 @@ void netlist_setup_t::resolve_inputs() } else { -#if 0 - for (netlist_core_terminal_t *p = (*pn)->m_list.first(); p != NULL; p = (*pn)->m_list.next(p)) - (*pn)->m_registered.add(p); -#else (*pn)->rebuild_list(); -#endif } } @@ -698,11 +768,12 @@ void netlist_setup_t::resolve_inputs() void netlist_setup_t::start_devices() { - //FIXME: we need a nl_getenv - if (getenv("NL_LOGS")) + pstring env = nl_util::environment("NL_LOGS"); + + if (env != "") { NL_VERBOSE_OUT(("Creating dynamic logs ...\n")); - nl_util::pstring_list ll = nl_util::split(getenv("NL_LOGS"), ":"); + nl_util::pstring_list ll = nl_util::split(env, ":"); for (int i=0; i < ll.count(); i++) { 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 f385ed079c3..d58893ca6af 100644 --- a/src/emu/netlist/nl_setup.h +++ b/src/emu/netlist/nl_setup.h @@ -104,7 +104,7 @@ public: typedef pnamedlist_t<link_t> tagmap_nstring_t; typedef pnamedlist_t<netlist_param_t *> tagmap_param_t; typedef pnamedlist_t<netlist_core_terminal_t *> tagmap_terminal_t; - typedef plinearlist_t<link_t> tagmap_link_t; + typedef plist_t<link_t> tagmap_link_t; netlist_setup_t(netlist_base_t &netlist); ~netlist_setup_t(); @@ -129,7 +129,7 @@ public: void register_param(const pstring ¶m, const double value); void register_object(netlist_device_t &dev, const pstring &name, netlist_object_t &obj); - void connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2); + bool connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2); netlist_core_terminal_t *find_terminal(const pstring &outname_in, bool required = true); netlist_core_terminal_t *find_terminal(const pstring &outname_in, netlist_object_t::type_t atype, bool required = true); @@ -167,7 +167,7 @@ private: netlist_factory_t *m_factory; - plinearlist_t<pstring> m_models; + plist_t<pstring> m_models; int m_proxy_cnt; @@ -175,15 +175,16 @@ private: void connect_terminals(netlist_core_terminal_t &in, netlist_core_terminal_t &out); - void connect_input_output(netlist_input_t &in, netlist_output_t &out); - void connect_terminal_output(netlist_terminal_t &in, netlist_output_t &out); - void connect_terminal_input(netlist_terminal_t &term, netlist_input_t &inp); + void connect_input_output(netlist_core_terminal_t &in, netlist_core_terminal_t &out); + void connect_terminal_output(netlist_terminal_t &in, netlist_core_terminal_t &out); + void connect_terminal_input(netlist_terminal_t &term, netlist_core_terminal_t &inp); + bool connect_input_input(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2); // helpers pstring objtype_as_astr(netlist_object_t &in) const; const pstring resolve_alias(const pstring &name) const; - nld_base_d_to_a_proxy *get_d_a_proxy(netlist_output_t &out); + nld_base_proxy *get_d_a_proxy(netlist_core_terminal_t &out); }; #endif /* NLSETUP_H_ */ diff --git a/src/emu/netlist/nl_time.h b/src/emu/netlist/nl_time.h index af358320f8a..457f7622307 100644 --- a/src/emu/netlist/nl_time.h +++ b/src/emu/netlist/nl_time.h @@ -8,6 +8,7 @@ #define NLTIME_H_ #include "nl_config.h" +#include "pstate.h" //============================================================ // MACROS @@ -35,7 +36,7 @@ public: ATTR_HOT friend inline const netlist_time operator-(const netlist_time &left, const netlist_time &right); ATTR_HOT friend inline const netlist_time operator+(const netlist_time &left, const netlist_time &right); ATTR_HOT friend inline const netlist_time operator*(const netlist_time &left, const UINT32 factor); - ATTR_HOT friend inline const UINT32 operator/(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline UINT32 operator/(const netlist_time &left, const netlist_time &right); ATTR_HOT friend inline bool operator>(const netlist_time &left, const netlist_time &right); ATTR_HOT friend inline bool operator<(const netlist_time &left, const netlist_time &right); ATTR_HOT friend inline bool operator>=(const netlist_time &left, const netlist_time &right); @@ -50,8 +51,8 @@ public: ATTR_HOT inline const netlist_time &operator+=(const netlist_time &right) { m_time += right.m_time; return *this; } - ATTR_HOT inline const INTERNALTYPE as_raw() const { return m_time; } - ATTR_HOT inline const double as_double() const { return (double) m_time / (double) RESOLUTION; } + ATTR_HOT inline INTERNALTYPE as_raw() const { return m_time; } + ATTR_HOT inline double as_double() const { return (double) m_time / (double) RESOLUTION; } // for save states .... ATTR_HOT inline INTERNALTYPE *get_internaltype_ptr() { return &m_time; } @@ -72,6 +73,11 @@ protected: INTERNALTYPE m_time; }; +template<> ATTR_COLD inline void pstate_manager_t::save_item(netlist_time &nlt, const void *owner, const pstring &stname) +{ + save_state_ptr(stname, DT_INT64, owner, sizeof(netlist_time::INTERNALTYPE), 1, nlt.get_internaltype_ptr(), false); +} + ATTR_HOT inline const netlist_time operator-(const netlist_time &left, const netlist_time &right) { return netlist_time::from_raw(left.m_time - right.m_time); @@ -82,7 +88,7 @@ ATTR_HOT inline const netlist_time operator*(const netlist_time &left, const UIN return netlist_time::from_raw(left.m_time * factor); } -ATTR_HOT inline const UINT32 operator/(const netlist_time &left, const netlist_time &right) +ATTR_HOT inline UINT32 operator/(const netlist_time &left, const netlist_time &right) { return left.m_time / right.m_time; } diff --git a/src/emu/netlist/nl_util.h b/src/emu/netlist/nl_util.h index 3ec22f72f1e..ff5511b7f90 100644 --- a/src/emu/netlist/nl_util.h +++ b/src/emu/netlist/nl_util.h @@ -19,9 +19,9 @@ private: nl_util() {}; public: - typedef plinearlist_t<pstring, 10> pstring_list; + typedef plist_t<pstring> pstring_list; - static pstring_list split(const pstring &str, const pstring &onstr) + static pstring_list split(const pstring &str, const pstring &onstr, bool ignore_empty = false) { pstring_list temp; @@ -31,14 +31,27 @@ public: pn = str.find(onstr, p); while (pn>=0) { - temp.add(str.substr(p, pn - p)); + 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()) - temp.add(str.substr(p)); + { + pstring t = str.substr(p); + if (!ignore_empty || t.len() != 0) + temp.add(t); + } return temp; } + static const pstring environment(const pstring &var, const pstring &default_val = "") + { + if (getenv(var.cstr()) == NULL) + return default_val; + else + return pstring(getenv(var.cstr())); + } }; class nl_math diff --git a/src/emu/netlist/plists.h b/src/emu/netlist/plists.h index 2165be50196..c9c54f5d54f 100644 --- a/src/emu/netlist/plists.h +++ b/src/emu/netlist/plists.h @@ -14,31 +14,101 @@ #include "pstring.h" // ---------------------------------------------------------------------------------------- +// parray_t: dynamic array +// ---------------------------------------------------------------------------------------- + +template <class _ListClass> +class parray_t +{ +public: + + ATTR_COLD parray_t(int numElements) + : m_list(0), m_capacity(0) + { + set_capacity(numElements); + } + + ATTR_COLD parray_t(const parray_t &rhs) + : m_list(0), m_capacity(0) + { + set_capacity(rhs.capacity()); + for (int i=0; i<m_capacity; i++) + m_list[i] = rhs[i]; + } + + ATTR_COLD parray_t &operator=(const parray_t &rhs) + { + set_capacity(rhs.capacity()); + for (int i=0; i<m_capacity; i++) + m_list[i] = rhs[i]; + return *this; + } + + ATTR_COLD ~parray_t() + { + if (m_list != NULL) + nl_free_array(m_list); + m_list = NULL; + } + + ATTR_HOT inline operator _ListClass * () { return m_list; } + ATTR_HOT inline operator const _ListClass * () const { return m_list; } + + /* using the [] operator will not allow gcc to vectorize code because + * basically a pointer is returned. + * array works around this. + */ + + ATTR_HOT inline _ListClass *array() { return m_list; } + + ATTR_HOT inline _ListClass& operator[](const int index) { return m_list[index]; } + ATTR_HOT inline const _ListClass& operator[](const int index) const { return m_list[index]; } + + ATTR_HOT inline int capacity() const { return m_capacity; } + +protected: + ATTR_COLD void set_capacity(const int new_capacity) + { + if (m_list != NULL) + nl_free_array(m_list); + if (new_capacity > 0) + m_list = nl_alloc_array(_ListClass, new_capacity); + else + m_list = NULL; + m_capacity = new_capacity; + } + +private: + _ListClass * m_list; + int m_capacity; +}; + +// ---------------------------------------------------------------------------------------- // plinearlist_t: a simple list // ---------------------------------------------------------------------------------------- -template <class _ListClass, int _NumElem = 0> -class plinearlist_t +template <class _ListClass> +class plist_t { public: - ATTR_COLD plinearlist_t(int numElements = _NumElem) + ATTR_COLD plist_t(const int numElements = 0) { - m_num_elements = numElements; - if (m_num_elements == 0) + m_capacity = numElements; + if (m_capacity == 0) m_list = NULL; else - m_list = nl_alloc_array(_ListClass, m_num_elements); + m_list = nl_alloc_array(_ListClass, m_capacity); m_count = 0; } - ATTR_COLD plinearlist_t(const plinearlist_t &rhs) + ATTR_COLD plist_t(const plist_t &rhs) { - m_num_elements = rhs.capacity(); - if (m_num_elements == 0) + m_capacity = rhs.capacity(); + if (m_capacity == 0) m_list = NULL; else - m_list = nl_alloc_array(_ListClass, m_num_elements); + m_list = nl_alloc_array(_ListClass, m_capacity); m_count = 0; for (int i=0; i<rhs.count(); i++) { @@ -46,7 +116,7 @@ public: } } - ATTR_COLD plinearlist_t &operator=(const plinearlist_t &rhs) + ATTR_COLD plist_t &operator=(const plist_t &rhs) { this->clear(); for (int i=0; i<rhs.count(); i++) @@ -57,7 +127,7 @@ public: } - ATTR_COLD ~plinearlist_t() + ATTR_COLD ~plist_t() { if (m_list != NULL) nl_free_array(m_list); @@ -79,11 +149,11 @@ public: ATTR_HOT inline void add(const _ListClass &elem) { - if (m_count >= m_num_elements){ - int new_size = m_num_elements * 2; + if (m_count >= m_capacity){ + int new_size = m_capacity * 2; if (new_size < 32) new_size = 32; - resize(new_size); + set_capacity(new_size); } m_list[m_count++] = elem; @@ -151,7 +221,7 @@ public: ATTR_HOT inline int count() const { return m_count; } ATTR_HOT inline bool is_empty() const { return (m_count == 0); } ATTR_HOT inline void clear() { m_count = 0; } - ATTR_HOT inline int capacity() const { return m_num_elements; } + ATTR_HOT inline int capacity() const { return m_capacity; } ATTR_COLD void clear_and_free() { @@ -163,16 +233,16 @@ public: } private: - ATTR_COLD void resize(const int new_size) + ATTR_COLD void set_capacity(const int new_capacity) { int cnt = count(); - if (new_size > 0) + if (new_capacity > 0) { - _ListClass *m_new = nl_alloc_array(_ListClass, new_size); + _ListClass *m_new = nl_alloc_array(_ListClass, new_capacity); _ListClass *pd = m_new; - if (cnt > new_size) - cnt = new_size; + if (cnt > new_capacity) + cnt = new_capacity; for (_ListClass *ps = m_list; ps < m_list + cnt; ps++, pd++) *pd = *ps; if (m_list != NULL) @@ -187,55 +257,52 @@ private: m_list = NULL; m_count = 0; } - m_num_elements = new_size; + m_capacity = new_capacity; } int m_count; _ListClass * m_list /* ATTR_ALIGN */; - int m_num_elements; + int m_capacity; }; // ---------------------------------------------------------------------------------------- -// pnamedlist_t: a simple list +// pnamedlist_t: a simple list of elements which have a name() interface // ---------------------------------------------------------------------------------------- -#if (defined(__sun__) && defined(__svr4__)) || defined(__ANDROID__) || defined(__OpenBSD__) -#undef _C -#endif - -template <class _C> -class pnamedlist_t : public plinearlist_t<_C> +template <class _ListClass> +class pnamedlist_t : public plist_t<_ListClass> { public: - _C find(const pstring name) const + _ListClass find(const pstring &name) const { for (int i=0; i < this->count(); i++) if (get_name((*this)[i]) == name) return (*this)[i]; - return _C(NULL); + return _ListClass(NULL); } - void remove_by_name(const pstring name) + void remove_by_name(const pstring &name) { - plinearlist_t<_C>::remove(find(name)); + plist_t<_ListClass>::remove(find(name)); } - bool add(_C dev, bool allow_duplicate) + bool add(_ListClass dev, bool allow_duplicate) { if (allow_duplicate) - plinearlist_t<_C>::add(dev); + plist_t<_ListClass>::add(dev); else { - if (!(this->find(get_name(dev)) == _C(NULL))) + if (!(this->find(get_name(dev)) == _ListClass(NULL))) return false; - plinearlist_t<_C>::add(dev); + plist_t<_ListClass>::add(dev); } return true; } private: - template <typename T> static const pstring get_name(T &elem) { return elem.name(); } + template <typename T> static const pstring get_name(const T *elem) { return elem->name(); } template <typename T> static const pstring get_name(T *elem) { return elem->name(); } + template <typename T> static const pstring get_name(const T &elem) { return elem.name(); } }; @@ -244,12 +311,12 @@ private: // pstack_t: a simple stack // ---------------------------------------------------------------------------------------- -template <class _StackClass, int _NumElem = 128> +template <class _StackClass> class pstack_t { public: - ATTR_COLD pstack_t(int numElements = _NumElem) + ATTR_COLD pstack_t(const int numElements = 128) : m_list(numElements) { } @@ -293,7 +360,7 @@ public: ATTR_HOT inline int capacity() const { return m_list.capacity(); } private: - plinearlist_t<_StackClass, _NumElem> m_list; + plist_t<_StackClass> m_list; }; template <class _ListClass> diff --git a/src/emu/netlist/pstate.h b/src/emu/netlist/pstate.h index be665d31fee..3e8cbcd3a15 100644 --- a/src/emu/netlist/pstate.h +++ b/src/emu/netlist/pstate.h @@ -8,8 +8,8 @@ #ifndef PSTATE_H_ #define PSTATE_H_ -#include "nl_config.h" -#include "nl_time.h" +//#include "nl_config.h" +//#include "nl_time.h" #include "plists.h" #include "pstring.h" @@ -79,7 +79,7 @@ class pstate_manager_t; class pstate_callback_t { public: - typedef plinearlist_t<pstate_callback_t *> list_t; + typedef plist_t<pstate_callback_t *> list_t; virtual ~pstate_callback_t() { }; @@ -91,7 +91,7 @@ protected: struct pstate_entry_t { - typedef plinearlist_t<pstate_entry_t *> list_t; + typedef plist_t<pstate_entry_t *> list_t; pstate_entry_t(const pstring &stname, const pstate_data_type_e dt, const void *owner, const int size, const int count, void *ptr, bool is_ptr) @@ -157,11 +157,5 @@ private: template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname); -template<> ATTR_COLD inline void pstate_manager_t::save_item(netlist_time &nlt, const void *owner, const pstring &stname) -{ - save_state_ptr(stname, DT_INT64, owner, sizeof(netlist_time::INTERNALTYPE), 1, nlt.get_internaltype_ptr(), false); -} - - #endif /* PSTATE_H_ */ diff --git a/src/emu/netlist/pstring.c b/src/emu/netlist/pstring.c index dd06aa399a9..de44e1571d9 100644 --- a/src/emu/netlist/pstring.c +++ b/src/emu/netlist/pstring.c @@ -118,7 +118,28 @@ int pstring::find_last_not_of(const pstring no) const return -1; } +pstring pstring::replace(const pstring &search, const pstring &replace) +{ + pstring ret = ""; + if (search.len() == 0) + return *this; + int i = 0; + while (i<len()) + { + if (strncmp(cstr()+i,search.cstr(),search.len()) == 0) + { + ret += replace; + i += search.len(); + } + else + { + ret += *(cstr() + i); + i++; + } + } + return ret; +} pstring pstring::ltrim(const pstring ws) const { int f = find_first_not_of(ws); diff --git a/src/emu/netlist/pstring.h b/src/emu/netlist/pstring.h index 6ed539e0c13..2bf3a0f9877 100644 --- a/src/emu/netlist/pstring.h +++ b/src/emu/netlist/pstring.h @@ -63,7 +63,7 @@ inline void *operator new(std::size_t size, pblockpool &pool, int extra = 0) thr return result; } -inline void operator delete(void *pMem, pblockpool &pool, int extra) +inline void operator delete(void *pMem, pblockpool &pool, ATTR_UNUSED int extra) { pool.dealloc(pMem); } @@ -102,6 +102,7 @@ public: pstring& operator+=(const pstring &string) { pcat(string.cstr()); return *this; } friend pstring operator+(const pstring &lhs, const pstring &rhs) { return pstring(lhs) += rhs; } friend pstring operator+(const pstring &lhs, const char *rhs) { return pstring(lhs) += rhs; } + friend pstring operator+(const pstring &lhs, const char rhs) { return pstring(lhs) += rhs; } friend pstring operator+(const char *lhs, const pstring &rhs) { return pstring(lhs) += rhs; } // comparison operators @@ -146,6 +147,8 @@ public: inline bool startsWith(const pstring &arg) const { return (pcmp(cstr(), arg.cstr(), arg.len()) == 0); } inline bool startsWith(const char *arg) const { return (pcmp(cstr(), arg, strlen(arg)) == 0); } + pstring replace(const pstring &search, const pstring &replace); + // these return nstring ... inline pstring cat(const pstring &s) const { return *this + s; } inline pstring cat(const char *s) const { return *this + s; } diff --git a/src/emu/render.c b/src/emu/render.c index 30a0b992215..57fcc418e97 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -1890,7 +1890,7 @@ bool render_target::map_point_internal(INT32 target_x, INT32 target_y, render_co if (container != NULL && container == &m_manager.ui_container()) { // this hit test went against the UI container - if (target_fx >= 0.0 && target_fx < 1.0 && target_fy >= 0.0 && target_fy < 1.0) + if (target_fx >= 0.0f && target_fx < 1.0f && target_fy >= 0.0f && target_fy < 1.0f) { // this point was successfully mapped mapped_x = (float)target_x / m_width; diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c index a3b5f48e8b1..c72a291dbb5 100644 --- a/src/emu/rendlay.c +++ b/src/emu/rendlay.c @@ -327,7 +327,8 @@ void parse_bounds(running_machine &machine, xml_data_node *boundsnode, render_bo // check for errors if (bounds.x0 > bounds.x1 || bounds.y0 > bounds.y1) - throw emu_fatalerror("Illegal bounds value in XML: (%f-%f)-(%f-%f)", bounds.x0, bounds.x1, bounds.y0, bounds.y1); + throw emu_fatalerror("Illegal bounds value in XML: (%f-%f)-(%f-%f)", + (double) bounds.x0, (double) bounds.x1, (double) bounds.y0, (double) bounds.y1); } @@ -351,9 +352,10 @@ void parse_color(running_machine &machine, xml_data_node *colornode, render_colo color.a = xml_get_attribute_float_with_subst(machine, *colornode, "alpha", 1.0); // check for errors - if (color.r < 0.0 || color.r > 1.0 || color.g < 0.0 || color.g > 1.0 || - color.b < 0.0 || color.b > 1.0 || color.a < 0.0 || color.a > 1.0) - throw emu_fatalerror("Illegal ARGB color value in XML: %f,%f,%f,%f", color.r, color.g, color.b, color.a); + if (color.r < 0.0f || color.r > 1.0f || color.g < 0.0f || color.g > 1.0f || + color.b < 0.0f || color.b > 1.0f || color.a < 0.0f || color.a > 1.0f) + throw emu_fatalerror("Illegal ARGB color value in XML: %f,%f,%f,%f", + (double) color.r, (double) color.g, (double) color.b, (double) color.a); } @@ -807,10 +809,10 @@ void layout_element::component::draw(running_machine &machine, bitmap_argb32 &de void layout_element::component::draw_rect(bitmap_argb32 &dest, const rectangle &bounds) { // compute premultiplied colors - UINT32 r = m_color.r * m_color.a * 255.0; - UINT32 g = m_color.g * m_color.a * 255.0; - UINT32 b = m_color.b * m_color.a * 255.0; - UINT32 inva = (1.0f - m_color.a) * 255.0; + UINT32 r = m_color.r * m_color.a * 255.0f; + UINT32 g = m_color.g * m_color.a * 255.0f; + UINT32 b = m_color.b * m_color.a * 255.0f; + UINT32 inva = (1.0f - m_color.a) * 255.0f; // iterate over X and Y for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++) @@ -845,10 +847,10 @@ void layout_element::component::draw_rect(bitmap_argb32 &dest, const rectangle & void layout_element::component::draw_disk(bitmap_argb32 &dest, const rectangle &bounds) { // compute premultiplied colors - UINT32 r = m_color.r * m_color.a * 255.0; - UINT32 g = m_color.g * m_color.a * 255.0; - UINT32 b = m_color.b * m_color.a * 255.0; - UINT32 inva = (1.0f - m_color.a) * 255.0; + UINT32 r = m_color.r * m_color.a * 255.0f; + UINT32 g = m_color.g * m_color.a * 255.0f; + UINT32 b = m_color.b * m_color.a * 255.0f; + UINT32 inva = (1.0f - m_color.a) * 255.0f; // find the center float xcenter = float(bounds.xcenter()); @@ -861,7 +863,7 @@ void layout_element::component::draw_disk(bitmap_argb32 &dest, const rectangle & for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++) { float ycoord = ycenter - ((float)y + 0.5f); - float xval = xradius * sqrt(1.0f - (ycoord * ycoord) * ooyradius2); + float xval = xradius * sqrtf(1.0f - (ycoord * ycoord) * ooyradius2); // compute left/right coordinates INT32 left = (INT32)(xcenter - xval + 0.5f); @@ -897,10 +899,10 @@ void layout_element::component::draw_disk(bitmap_argb32 &dest, const rectangle & void layout_element::component::draw_text(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds) { // compute premultiplied colors - UINT32 r = m_color.r * 255.0; - UINT32 g = m_color.g * 255.0; - UINT32 b = m_color.b * 255.0; - UINT32 a = m_color.a * 255.0; + UINT32 r = m_color.r * 255.0f; + UINT32 g = m_color.g * 255.0f; + UINT32 b = m_color.b * 255.0f; + UINT32 a = m_color.a * 255.0f; // get the width of the string render_font *font = machine.render().font_alloc("default"); @@ -1006,10 +1008,10 @@ void layout_element::component::draw_reel(running_machine &machine, bitmap_argb3 int use_state = (state + m_stateoffset) % max_state_used; // compute premultiplied colors - UINT32 r = m_color.r * 255.0; - UINT32 g = m_color.g * 255.0; - UINT32 b = m_color.b * 255.0; - UINT32 a = m_color.a * 255.0; + UINT32 r = m_color.r * 255.0f; + UINT32 g = m_color.g * 255.0f; + UINT32 b = m_color.b * 255.0f; + UINT32 a = m_color.a * 255.0f; // get the width of the string render_font *font = machine.render().font_alloc("default"); @@ -1159,10 +1161,10 @@ void layout_element::component::draw_beltreel(running_machine &machine, bitmap_a int use_state = (state + m_stateoffset) % max_state_used; // compute premultiplied colors - UINT32 r = m_color.r * 255.0; - UINT32 g = m_color.g * 255.0; - UINT32 b = m_color.b * 255.0; - UINT32 a = m_color.a * 255.0; + UINT32 r = m_color.r * 255.0f; + UINT32 g = m_color.g * 255.0f; + UINT32 b = m_color.b * 255.0f; + UINT32 a = m_color.a * 255.0f; // get the width of the string render_font *font = machine.render().font_alloc("default"); diff --git a/src/emu/rendutil.c b/src/emu/rendutil.c index d2862a6498a..a813fa2d54b 100644 --- a/src/emu/rendutil.c +++ b/src/emu/rendutil.c @@ -72,10 +72,10 @@ static void resample_argb_bitmap_average(UINT32 *dest, UINT32 drowpixels, UINT32 UINT32 x, y; /* precompute premultiplied R/G/B/A factors */ - r = color.r * color.a * 256.0; - g = color.g * color.a * 256.0; - b = color.b * color.a * 256.0; - a = color.a * 256.0; + r = color.r * color.a * 256.0f; + g = color.g * color.a * 256.0f; + b = color.b * color.a * 256.0f; + a = color.a * 256.0f; /* loop over the target vertically */ for (y = 0; y < dheight; y++) @@ -163,10 +163,10 @@ static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT3 UINT32 x, y; /* precompute premultiplied R/G/B/A factors */ - r = color.r * color.a * 256.0; - g = color.g * color.a * 256.0; - b = color.b * color.a * 256.0; - a = color.a * 256.0; + r = color.r * color.a * 256.0f; + g = color.g * color.a * 256.0f; + b = color.b * color.a * 256.0f; + a = color.a * 256.0f; /* loop over the target vertically */ for (y = 0; y < dheight; y++) @@ -500,7 +500,7 @@ void render_line_to_quad(const render_bounds *bounds, float width, render_bounds else { /* prescale unitx and unity by the half-width */ - float invlength = width / sqrt(unitx * unitx + unity * unity); + float invlength = width / sqrtf(unitx * unitx + unity * unity); unitx *= invlength; unity *= invlength; } diff --git a/src/emu/sound.c b/src/emu/sound.c index b4179336582..ed5527edc39 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -225,7 +225,8 @@ int sound_stream::input_source_outputnum(int inputnum) const void sound_stream::set_input(int index, sound_stream *input_stream, int output_index, float gain) { - VPRINTF(("stream_set_input(%p, '%s', %d, %p, %d, %f)\n", this, m_device.tag(), index, input_stream, output_index, gain)); + VPRINTF(("stream_set_input(%p, '%s', %d, %p, %d, %f)\n", this, m_device.tag(), + index, input_stream, output_index, (double) gain)); // make sure it's a valid input if (index >= m_input.size()) @@ -983,9 +984,9 @@ void sound_manager::config_load(int config_type, xml_data_node *parentnode) mixer_input info; if (indexed_mixer_input(xml_get_attribute_int(channelnode, "index", -1), info)) { - float defvol = xml_get_attribute_float(channelnode, "defvol", 1.0); - float newvol = xml_get_attribute_float(channelnode, "newvol", -1000.0); - if (newvol != -1000.0) + float defvol = xml_get_attribute_float(channelnode, "defvol", 1.0f); + float newvol = xml_get_attribute_float(channelnode, "newvol", -1000.0f); + if (newvol != -1000.0f) info.stream->set_user_gain(info.inputnum, newvol / defvol); } } diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c index f7751a89e93..225d3e396e1 100644 --- a/src/emu/sound/aica.c +++ b/src/emu/sound/aica.c @@ -24,10 +24,10 @@ #define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v))) //Convert DB to multiply amplitude -#define DB(v) LFIX(pow(10.0,v/20.0)) +#define DB(v) LFIX(powf(10.0f,v/20.0f)) //Convert cents to step increment -#define CENTS(v) LFIX(pow(2.0,v/1200.0)) +#define CENTS(v) LFIX(powf(2.0f,v/1200.0f)) /* AICA features 64 programmable slots @@ -433,9 +433,9 @@ void aica_device::Init() for(i=0;i<0x400;++i) { - float envDB=((float)(3*(i-0x3ff)))/32.0; + float envDB=((float)(3*(i-0x3ff)))/32.0f; float scale=(float)(1<<SHIFT); - m_EG_TABLE[i]=(INT32)(pow(10.0,envDB/20.0)*scale); + m_EG_TABLE[i]=(INT32)(powf(10.0f,envDB/20.0f)*scale); } for(i=0;i<0x20000;++i) @@ -458,7 +458,7 @@ void aica_device::Init() if(iTL&0x40) SegaDB-=24.0f; if(iTL&0x80) SegaDB-=48.0f; - TL=pow(10.0,SegaDB/20.0); + TL=powf(10.0f,SegaDB/20.0f); SegaDB=0; if(iPAN&0x1) SegaDB-=3.0f; @@ -467,7 +467,7 @@ void aica_device::Init() if(iPAN&0x8) SegaDB-=24.0f; if((iPAN&0xf)==0xf) PAN=0.0; - else PAN=pow(10.0,SegaDB/20.0); + else PAN=powf(10.0f,SegaDB/20.0f); if(iPAN<0x10) { @@ -481,12 +481,12 @@ void aica_device::Init() } if(iSDL) - fSDL=pow(10.0,(SDLT[iSDL])/20.0); + fSDL=powf(10.0f,(SDLT[iSDL])/20.0f); else fSDL=0.0; - m_LPANTABLE[i]=FIX((4.0*LPAN*TL*fSDL)); - m_RPANTABLE[i]=FIX((4.0*RPAN*TL*fSDL)); + m_LPANTABLE[i]=FIX((4.0f*LPAN*TL*fSDL)); + m_RPANTABLE[i]=FIX((4.0f*RPAN*TL*fSDL)); } m_ARTABLE[0]=m_DRTABLE[0]=0; //Infinite time @@ -497,7 +497,7 @@ void aica_device::Init() t=ARTimes[i]; //In ms if(t!=0.0) { - step=(1023*1000.0)/((float) 44100.0f*t); + step=(1023*1000.0)/(44100.0*t); scale=(double) (1<<EG_SHIFT); m_ARTABLE[i]=(int) (step*scale); } @@ -505,7 +505,7 @@ void aica_device::Init() m_ARTABLE[i]=1024<<EG_SHIFT; t=DRTimes[i]; //In ms - step=(1023*1000.0)/((float) 44100.0f*t); + step=(1023*1000.0)/(44100.0*t); scale=(double) (1<<EG_SHIFT); m_DRTABLE[i]=(int) (step*scale); } @@ -1596,12 +1596,12 @@ void aica_device::AICALFO_Init() float limit=PSCALE[s]; for(i=-128;i<128;++i) { - m_PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0)); + m_PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0f)); } limit=-ASCALE[s]; for(i=0;i<256;++i) { - m_ASCALES[s][i]=DB(((limit*(float) i)/256.0)); + m_ASCALES[s][i]=DB(((limit*(float) i)/256.0f)); } } } @@ -1633,7 +1633,7 @@ signed int aica_device::AICAALFO_Step(AICA_LFO_t *LFO) void aica_device::AICALFO_ComputeStep(AICA_LFO_t *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO) { - float step=(float) LFOFreq[LFOF]*256.0/(float)44100.0; + float step=(float) LFOFreq[LFOF]*256.0f/(float)44100.0f; LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step); if(ALFO) { diff --git a/src/emu/sound/beep.c b/src/emu/sound/beep.c index fe77c721b48..ce5558f3320 100644 --- a/src/emu/sound/beep.c +++ b/src/emu/sound/beep.c @@ -1,4 +1,4 @@ -// license:? +// license:BSD-3-Clause // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/emu/sound/beep.h b/src/emu/sound/beep.h index f7b15e58530..4b587bd3c89 100644 --- a/src/emu/sound/beep.h +++ b/src/emu/sound/beep.h @@ -1,4 +1,4 @@ -// license:? +// license:BSD-3-Clause // copyright-holders:Kevin Thacker #pragma once diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c index d097ec8cd8c..24c5af2381d 100644 --- a/src/emu/sound/c140.c +++ b/src/emu/sound/c140.c @@ -154,7 +154,7 @@ void c140_device::sound_stream_update(sound_stream &stream, stream_sample_t **in INT32 frequency,delta,offset,pos; INT32 cnt, voicecnt; INT32 lastdt,prevdt,dltdt; - float pbase=(float)m_baserate*2.0 / (float)m_sample_rate; + float pbase=(float)m_baserate*2.0f / (float)m_sample_rate; INT16 *lmix, *rmix; diff --git a/src/emu/sound/c6280.c b/src/emu/sound/c6280.c index 44d94f93c3e..099224f78be 100644 --- a/src/emu/sound/c6280.c +++ b/src/emu/sound/c6280.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Charles MacDonald /* HuC6280 sound chip emulator diff --git a/src/emu/sound/c6280.h b/src/emu/sound/c6280.h index 6255f99dfd0..af53962a83e 100644 --- a/src/emu/sound/c6280.h +++ b/src/emu/sound/c6280.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Charles MacDonald #pragma once diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index 980cf034774..e0998a271d6 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -648,7 +648,7 @@ void discrete_device::display_profiling(void) discrete_step_interface *step; if ((*node)->interface(step)) if (step->run_time > tresh) - printf("%3d: %20s %8.2f %10.2f\n", (*node)->index(), (*node)->module_name(), (float) step->run_time / (float) total * 100.0, ((float) step->run_time) / (float) m_total_samples); + printf("%3d: %20s %8.2f %10.2f\n", (*node)->index(), (*node)->module_name(), (double) step->run_time / (double) total * 100.0, ((double) step->run_time) / (double) m_total_samples); } /* Task information */ diff --git a/src/emu/sound/es1373.c b/src/emu/sound/es1373.c index d957302865d..509b4a873d2 100644 --- a/src/emu/sound/es1373.c +++ b/src/emu/sound/es1373.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green #include "es1373.h" diff --git a/src/emu/sound/es1373.h b/src/emu/sound/es1373.h index 6f1b0023654..a5c7e974204 100644 --- a/src/emu/sound/es1373.h +++ b/src/emu/sound/es1373.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green // Creative Labs Ensonic AudioPCI97 ES1373 diff --git a/src/emu/sound/es8712.c b/src/emu/sound/es8712.c index 5f1f6dd85e4..f6087f83dc1 100644 --- a/src/emu/sound/es8712.c +++ b/src/emu/sound/es8712.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Quench /********************************************************************************************** * diff --git a/src/emu/sound/es8712.h b/src/emu/sound/es8712.h index 5f5cffc43a6..ed05a4b3497 100644 --- a/src/emu/sound/es8712.h +++ b/src/emu/sound/es8712.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Quench /* An interface for the ES8712 ADPCM chip */ diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index 1e14bf132b1..f5ddf3cdf55 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -2548,7 +2548,7 @@ static void FM_ADPCMAWrite(YM2610 *F2610,int r,int v) if( (v>>c)&1 ) { /**** start adpcm ****/ - adpcm[c].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0); + adpcm[c].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0f); adpcm[c].now_addr = adpcm[c].start<<1; adpcm[c].now_step = 0; adpcm[c].adpcm_acc = 0; @@ -3043,9 +3043,9 @@ void ym2608_reset_chip(void *chip) for( i = 0; i < 6; i++ ) { if (i<=3) /* channels 0,1,2,3 */ - F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/3.0); + F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/3.0f); else /* channels 4 and 5 work with slower clock */ - F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/6.0); + F2608->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2608->OPN.ST.freqbase)/6.0f); F2608->adpcm[i].start = YM2608_ADPCM_ROM_addr[i*2]; F2608->adpcm[i].end = YM2608_ADPCM_ROM_addr[i*2+1]; @@ -3721,7 +3721,7 @@ void ym2610_reset_chip(void *chip) /**** ADPCM work initial ****/ for( i = 0; i < 6 ; i++ ) { - F2610->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0); + F2610->adpcm[i].step = (UINT32)((float)(1<<ADPCM_SHIFT)*((float)F2610->OPN.ST.freqbase)/3.0f); F2610->adpcm[i].now_addr = 0; F2610->adpcm[i].now_step = 0; F2610->adpcm[i].start = 0; diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index e89b1ff3b4c..d69b9f25445 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -121,7 +121,7 @@ void k051649_device::sound_stream_update(sound_stream &stream, stream_sample_t * const signed char *w = voice[j].waveram; int v=voice[j].volume * voice[j].key; int c=voice[j].counter; - int step = ((INT64)m_mclock * (1 << FREQ_BITS)) / (float)((voice[j].frequency + 1) * 16 * (m_rate / 32)) + 0.5; + int step = ((INT64)m_mclock * (1 << FREQ_BITS)) / (float)((voice[j].frequency + 1) * 16 * (m_rate / 32)) + 0.5f; mix = m_mixer_buffer; diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index a1a340972c9..37399e10c36 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -37,7 +37,7 @@ #include "multipcm.h" //???? -#define MULTIPCM_CLOCKDIV (180.0) +#define MULTIPCM_CLOCKDIV (180.0f) ALLOW_SAVE_TYPE(STATE); // allow save_item on a non-fundamental type @@ -158,10 +158,10 @@ void multipcm_device::EG_Calc(SLOT *slot) #define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v))) //Convert DB to multiply amplitude -#define DB(v) LFIX(pow(10.0,v/20.0)) +#define DB(v) LFIX(powf(10.0f,v/20.0f)) //Convert cents to step increment -#define CENTS(v) LFIX(pow(2.0,v/1200.0)) +#define CENTS(v) LFIX(powf(2.0f,v/1200.0f)) static int PLFO_TRI[256]; static int ALFO_TRI[256]; @@ -202,12 +202,12 @@ static void LFO_Init(void) float limit=PSCALE[s]; for(i=-128;i<128;++i) { - PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0)); + PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0f)); } limit=-ASCALE[s]; for(i=0;i<256;++i) { - ASCALES[s][i]=DB(((limit*(float) i)/256.0)); + ASCALES[s][i]=DB(((limit*(float) i)/256.0f)); } } } @@ -232,7 +232,7 @@ INLINE signed int ALFO_Step(LFO_t *LFO) void multipcm_device::LFO_ComputeStep(LFO_t *LFO,UINT32 LFOF,UINT32 LFOS,int ALFO) { - float step=(float) LFOFreq[LFOF]*256.0/(float) m_Rate; + float step=(float) LFOFreq[LFOF]*256.0f/(float) m_Rate; LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step); if(ALFO) { @@ -453,9 +453,9 @@ void multipcm_device::device_start() unsigned char iTL=i&0x7f; unsigned char iPAN=(i>>7)&0xf; - SegaDB=(float) iTL*(-24.0)/(float) 0x40; + SegaDB=(float) iTL*(-24.0f)/(float) 0x40; - TL=pow(10.0,SegaDB/20.0); + TL=powf(10.0f,SegaDB/20.0f); if(iPAN==0x8) @@ -472,9 +472,9 @@ void multipcm_device::device_start() iPAN=0x10-iPAN; - SegaDB=(float) iPAN*(-12.0)/(float) 0x4; + SegaDB=(float) iPAN*(-12.0f)/(float) 0x4; - RPAN=pow(10.0,SegaDB/20.0); + RPAN=pow(10.0f,SegaDB/20.0f); if((iPAN&0x7)==7) RPAN=0.0; @@ -483,14 +483,14 @@ void multipcm_device::device_start() { RPAN=1.0; - SegaDB=(float) iPAN*(-12.0)/(float) 0x4; + SegaDB=(float) iPAN*(-12.0f)/(float) 0x4; - LPAN=pow(10.0,SegaDB/20.0); + LPAN=pow(10.0f,SegaDB/20.0f); if((iPAN&0x7)==7) LPAN=0.0; } - TL/=4.0; + TL/=4.0f; LPANTABLE[i]=FIX((LPAN*TL)); RPANTABLE[i]=FIX((RPAN*TL)); @@ -499,7 +499,7 @@ void multipcm_device::device_start() //Pitch steps for(i=0;i<0x400;++i) { - float fcent=m_Rate*(1024.0+(float) i)/1024.0; + float fcent=m_Rate*(1024.0f+(float) i)/1024.0f; m_FNS_Table[i]=(unsigned int ) ((float) (1<<SHIFT) *fcent); } @@ -507,8 +507,8 @@ void multipcm_device::device_start() for(i=0;i<0x40;++i) { //Times are based on 44100 clock, adjust to real chip clock - m_ARStep[i]=(float) (0x400<<EG_SHIFT)/(BaseTimes[i]*44100.0/(1000.0)); - m_DRStep[i]=(float) (0x400<<EG_SHIFT)/(BaseTimes[i]*AR2DR*44100.0/(1000.0)); + m_ARStep[i]=(float) (0x400<<EG_SHIFT)/(float)(BaseTimes[i]*44100.0/(1000.0)); + m_DRStep[i]=(float) (0x400<<EG_SHIFT)/(float)(BaseTimes[i]*AR2DR*44100.0/(1000.0)); } m_ARStep[0]=m_ARStep[1]=m_ARStep[2]=m_ARStep[3]=0; m_ARStep[0x3f]=0x400<<EG_SHIFT; @@ -516,15 +516,15 @@ void multipcm_device::device_start() //TL Interpolation steps //lower - TLSteps[0]=-(float) (0x80<<SHIFT)/(78.2*44100.0/1000.0); + TLSteps[0]=-(float) (0x80<<SHIFT)/(78.2f*44100.0f/1000.0f); //raise - TLSteps[1]=(float) (0x80<<SHIFT)/(78.2*2*44100.0/1000.0); + TLSteps[1]=(float) (0x80<<SHIFT)/(78.2f*2*44100.0f/1000.0f); //build the linear->exponential ramps for(i=0;i<0x400;++i) { - float db=-(96.0-(96.0*(float) i/(float) 0x400)); - lin2expvol[i]=pow(10.0,db/20.0)*(float) (1<<SHIFT); + float db=-(96.0f-(96.0f*(float) i/(float) 0x400)); + lin2expvol[i]=powf(10.0f,db/20.0f)*(float) (1<<SHIFT); } diff --git a/src/emu/sound/qs1000.c b/src/emu/sound/qs1000.c index 0d08755dc27..18872b99e1f 100644 --- a/src/emu/sound/qs1000.c +++ b/src/emu/sound/qs1000.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** qs1000.c diff --git a/src/emu/sound/qs1000.h b/src/emu/sound/qs1000.h index d8137d143a6..b3610dda400 100644 --- a/src/emu/sound/qs1000.h +++ b/src/emu/sound/qs1000.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** qs1000.h diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c index 9c9a9dce102..eb9479e4782 100644 --- a/src/emu/sound/scsp.c +++ b/src/emu/sound/scsp.c @@ -528,7 +528,7 @@ void scsp_device::init() { float envDB=((float)(3*(i-0x3ff)))/32.0f; float scale=(float)(1<<SHIFT); - m_EG_TABLE[i]=(INT32)(pow(10.0,envDB/20.0)*scale); + m_EG_TABLE[i]=(INT32)(powf(10.0f,envDB/20.0f)*scale); } for(i=0;i<0x10000;++i) @@ -551,7 +551,7 @@ void scsp_device::init() if(iTL&0x40) SegaDB-=24.0f; if(iTL&0x80) SegaDB-=48.0f; - TL=pow(10.0,SegaDB/20.0); + TL=powf(10.0f,SegaDB/20.0f); SegaDB=0; if(iPAN&0x1) SegaDB-=3.0f; @@ -560,7 +560,7 @@ void scsp_device::init() if(iPAN&0x8) SegaDB-=24.0f; if((iPAN&0xf)==0xf) PAN=0.0; - else PAN=pow(10.0,SegaDB/20.0); + else PAN=powf(10.0f,SegaDB/20.0f); if(iPAN<0x10) { @@ -574,12 +574,12 @@ void scsp_device::init() } if(iSDL) - fSDL=pow(10.0,(SDLT[iSDL])/20.0); + fSDL=powf(10.0f,(SDLT[iSDL])/20.0f); else fSDL=0.0; - m_LPANTABLE[i]=FIX((4.0*LPAN*TL*fSDL)); - m_RPANTABLE[i]=FIX((4.0*RPAN*TL*fSDL)); + m_LPANTABLE[i]=FIX((4.0f*LPAN*TL*fSDL)); + m_RPANTABLE[i]=FIX((4.0f*RPAN*TL*fSDL)); } m_ARTABLE[0]=m_DRTABLE[0]=0; //Infinite time @@ -590,7 +590,7 @@ void scsp_device::init() t=ARTimes[i]; //In ms if(t!=0.0) { - step=(1023*1000.0)/((float) 44100.0f*t); + step=(1023*1000.0)/( 44100.0*t); scale=(double) (1<<EG_SHIFT); m_ARTABLE[i]=(int) (step*scale); } @@ -598,7 +598,7 @@ void scsp_device::init() m_ARTABLE[i]=1024<<EG_SHIFT; t=DRTimes[i]; //In ms - step=(1023*1000.0)/((float) 44100.0f*t); + step=(1023*1000.0)/( 44100.0*t); scale=(double) (1<<EG_SHIFT); m_DRTABLE[i]=(int) (step*scale); } @@ -1432,10 +1432,10 @@ READ16_MEMBER( scsp_device::midi_out_r ) #define LFIX(v) ((unsigned int) ((float) (1<<LFO_SHIFT)*(v))) //Convert DB to multiply amplitude -#define DB(v) LFIX(pow(10.0,v/20.0)) +#define DB(v) LFIX(powf(10.0f,v/20.0f)) //Convert cents to step increment -#define CENTS(v) LFIX(pow(2.0,v/1200.0)) +#define CENTS(v) LFIX(powf(2.0f,v/1200.0f)) static const float LFOFreq[32]= @@ -1506,12 +1506,12 @@ void scsp_device::LFO_Init() float limit=PSCALE[s]; for(i=-128;i<128;++i) { - m_PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0)); + m_PSCALES[s][i+128]=CENTS(((limit*(float) i)/128.0f)); } limit=-ASCALE[s]; for(i=0;i<256;++i) { - m_ASCALES[s][i]=DB(((limit*(float) i)/256.0)); + m_ASCALES[s][i]=DB(((limit*(float) i)/256.0f)); } } } @@ -1542,7 +1542,7 @@ signed int scsp_device::ALFO_Step(SCSP_LFO_t *LFO) void scsp_device::LFO_ComputeStep(SCSP_LFO_t *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO) { - float step=(float) LFOFreq[LFOF]*256.0/(float)44100; + float step=(float) LFOFreq[LFOF]*256.0f/(float)44100; LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step); if(ALFO) { diff --git a/src/emu/sound/sid.c b/src/emu/sound/sid.c index a5c8e8377ac..375095e7401 100644 --- a/src/emu/sound/sid.c +++ b/src/emu/sound/sid.c @@ -174,7 +174,7 @@ static void filterTableInit(running_machine &machine) uk = 0; for ( rk = 0; rk < 0x800; rk++ ) { - filterTable[uk] = (((exp(rk/0x800*log(400.0))/60.0)+0.05) + filterTable[uk] = (((expf(rk/0x800*logf(400.0f))/60.0f)+0.05f) *filterRefFreq) / sample_rate; if ( filterTable[uk] < yMin ) filterTable[uk] = yMin; diff --git a/src/emu/sound/sidvoice.c b/src/emu/sound/sidvoice.c index 8f9f1c1f3ee..2dd42bcf3c4 100644 --- a/src/emu/sound/sidvoice.c +++ b/src/emu/sound/sidvoice.c @@ -344,7 +344,7 @@ INLINE void waveCalcFilter(sidOperator* pVoice) else if (pVoice->sid->filter.Type == 0x40) { float tmp, tmp2; - pVoice->filtLow += ( pVoice->filtRef * pVoice->sid->filter.Dy * 0.1 ); + pVoice->filtLow += ( pVoice->filtRef * pVoice->sid->filter.Dy * 0.1f ); tmp = (float)pVoice->filtIO - pVoice->filtLow; tmp -= pVoice->filtRef * pVoice->sid->filter.ResDy; pVoice->filtRef += ( tmp * (pVoice->sid->filter.Dy) ); diff --git a/src/emu/sound/spu.c b/src/emu/sound/spu.c index 7a755dbc628..433f7737ba6 100644 --- a/src/emu/sound/spu.c +++ b/src/emu/sound/spu.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:pSXAuthor, R.Belmont /* @@ -2333,9 +2333,9 @@ void spu_device::set_xa_format(const float _freq, const int channels) // Adjust frequency to compensate for slightly slower/faster frame rate // float freq=44100.0; //(_freq*get_adjusted_frame_rate())/ps1hw.rcnt->get_vertical_refresh(); - xa_freq=(unsigned int)((_freq/44100.0)*4096.0f); + xa_freq=(unsigned int)((_freq/44100.0f)*4096.0f); xa_channels=channels; - xa_spf=(unsigned int)(_freq/60.0)*channels; + xa_spf=(unsigned int)(_freq/60.0f)*channels; } // diff --git a/src/emu/sound/spu.h b/src/emu/sound/spu.h index d76da751a65..1a74d11331c 100644 --- a/src/emu/sound/spu.h +++ b/src/emu/sound/spu.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:pSXAuthor, R.Belmont #pragma once diff --git a/src/emu/sound/spu_tables.c b/src/emu/sound/spu_tables.c index 15312741710..6af97ded049 100644 --- a/src/emu/sound/spu_tables.c +++ b/src/emu/sound/spu_tables.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:pSXAuthor, R.Belmont #include "emu.h" #include "spu.h" diff --git a/src/emu/sound/spureverb.c b/src/emu/sound/spureverb.c index 6870b714066..0603386d19c 100644 --- a/src/emu/sound/spureverb.c +++ b/src/emu/sound/spureverb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:pSXAuthor, R.Belmont #include "emu.h" #include "spureverb.h" diff --git a/src/emu/sound/spureverb.h b/src/emu/sound/spureverb.h index d89148ad4bc..590a2ac1771 100644 --- a/src/emu/sound/spureverb.h +++ b/src/emu/sound/spureverb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:pSXAuthor, R.Belmont #ifndef _included_reverb_ #define _included_reverb_ diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index 03729598737..c1595b1caa7 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // 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 6196834a24a..5addc3d967e 100644 --- a/src/emu/sound/tms5110.h +++ b/src/emu/sound/tms5110.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo, Jarek Burczynski, Aaron Giles, Jonathan Gevaryahu, Couriersud #pragma once diff --git a/src/emu/sound/tms5110r.inc b/src/emu/sound/tms5110r.inc index 0bf46a8ba24..4e20ef96e2d 100644 --- a/src/emu/sound/tms5110r.inc +++ b/src/emu/sound/tms5110r.inc @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo, Couriersud, Jonathan Gevaryahu /* TMS51xx and TMS52xx ROM Tables */ diff --git a/src/emu/sound/x1_010.c b/src/emu/sound/x1_010.c index 588907a0401..1025f9d99d4 100644 --- a/src/emu/sound/x1_010.c +++ b/src/emu/sound/x1_010.c @@ -216,7 +216,7 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t ** // Meta Fox does write the frequency register, but this is a hack to make it "work" with the current setup // This is broken for Arbalester (it writes 8), but that'll be fixed later. if( freq == 0 ) freq = 4; - smp_step = (UINT32)((float)m_base_clock/8192.0 + smp_step = (UINT32)((float)m_base_clock/8192.0f *freq*(1<<FREQ_BASE_BITS)/(float)m_rate); if( smp_offs == 0 ) { LOG_SOUND(( "Play sample %p - %p, channel %X volume %d:%d freq %X step %X offset %X\n", @@ -239,11 +239,11 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t ** start = (INT8 *)&(m_reg[reg->volume*128+0x1000]); smp_offs = m_smp_offset[ch]; freq = (reg->pitch_hi<<8)+reg->frequency; - smp_step = (UINT32)((float)m_base_clock/128.0/1024.0/4.0*freq*(1<<FREQ_BASE_BITS)/(float)m_rate); + smp_step = (UINT32)((float)m_base_clock/128.0f/1024.0f/4.0f*freq*(1<<FREQ_BASE_BITS)/(float)m_rate); env = (UINT8 *)&(m_reg[reg->end*128]); env_offs = m_env_offset[ch]; - env_step = (UINT32)((float)m_base_clock/128.0/1024.0/4.0*reg->start*(1<<ENV_BASE_BITS)/(float)m_rate); + env_step = (UINT32)((float)m_base_clock/128.0f/1024.0f/4.0f*reg->start*(1<<ENV_BASE_BITS)/(float)m_rate); /* Print some more debug info */ if( smp_offs == 0 ) { LOG_SOUND(( "Play waveform %X, channel %X volume %X freq %4X step %X offset %X\n", diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c index d41e9e9b08f..9aa63fdcec9 100644 --- a/src/emu/ui/inputmap.c +++ b/src/emu/ui/inputmap.c @@ -25,7 +25,7 @@ /* DIP switch rendering parameters */ #define DIP_SWITCH_HEIGHT 0.05f -#define DIP_SWITCH_SPACING 0.01 +#define DIP_SWITCH_SPACING 0.01f #define SINGLE_TOGGLE_SWITCH_FIELD_WIDTH 0.025f #define SINGLE_TOGGLE_SWITCH_WIDTH 0.020f /* make the switch 80% of the width space and 1/2 of the switch height */ diff --git a/src/emu/ui/menu.c b/src/emu/ui/menu.c index 9cb279ebd51..c53cfd5146d 100644 --- a/src/emu/ui/menu.c +++ b/src/emu/ui/menu.c @@ -695,7 +695,7 @@ void ui_menu::draw_text_box() JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); target_height += 2.0f * line_height; if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER) - target_height = floor((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; + target_height = floorf((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; // maximum against "return to prior menu" text prior_width = machine().ui().get_string_width(backtext) + 2.0f * gutter_width; diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c index f9be4057ddc..b9b9da66643 100644 --- a/src/emu/ui/ui.c +++ b/src/emu/ui/ui.c @@ -455,7 +455,7 @@ void ui_manager::update_and_render(render_container *container) { float mouse_y=-1,mouse_x=-1; if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) { - container->add_quad(mouse_x,mouse_y,mouse_x + 0.05*container->manager().ui_aspect(container),mouse_y + 0.05,UI_TEXT_COLOR,m_mouse_arrow_texture,PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + container->add_quad(mouse_x,mouse_y,mouse_x + 0.05f*container->manager().ui_aspect(container),mouse_y + 0.05f,UI_TEXT_COLOR,m_mouse_arrow_texture,PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); } } } @@ -828,7 +828,7 @@ void ui_manager::draw_text_box(render_container *container, const char *text, in draw_text_full(container, text, target_x, target_y, target_width + 0.00001f, justify, WRAP_WORD, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &target_width, &target_height); if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER) - target_height = floor((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; + target_height = floorf((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; // if we match our last value, we're done if (target_height == last_target_height) @@ -2006,8 +2006,8 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *s info.stream->set_user_gain(info.inputnum, (float)newval * 0.001f); } if (str != NULL) - strprintf(*str,"%4.2f", info.stream->user_gain(info.inputnum)); - return floor(info.stream->user_gain(info.inputnum) * 1000.0f + 0.5f); + strprintf(*str,"%4.2f", (double) info.stream->user_gain(info.inputnum)); + return floorf(info.stream->user_gain(info.inputnum) * 1000.0f + 0.5f); } @@ -2044,8 +2044,8 @@ static INT32 slider_overclock(running_machine &machine, void *arg, std::string * if (newval != SLIDER_NOCHANGE) cpu->set_clock_scale((float)newval * 0.001f); if (str != NULL) - strprintf(*str,"%3.0f%%", floor(cpu->clock_scale() * 100.0f + 0.5f)); - return floor(cpu->clock_scale() * 1000.0f + 0.5f); + strprintf(*str,"%3.0f%%", floor(cpu->clock_scale() * 100.0 + 0.5)); + return floor(cpu->clock_scale() * 1000.0 + 0.5); } @@ -2069,7 +2069,7 @@ static INT32 slider_refresh(running_machine &machine, void *arg, std::string *st if (str != NULL) strprintf(*str,"%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds)); refresh = ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds); - return floor((refresh - defrefresh) * 1000.0f + 0.5f); + return floor((refresh - defrefresh) * 1000.0 + 0.5); } @@ -2090,7 +2090,7 @@ static INT32 slider_brightness(running_machine &machine, void *arg, std::string screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_brightness); + strprintf(*str,"%.3f", (double) settings.m_brightness); return floor(settings.m_brightness * 1000.0f + 0.5f); } @@ -2112,7 +2112,7 @@ static INT32 slider_contrast(running_machine &machine, void *arg, std::string *s screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_contrast); + strprintf(*str,"%.3f", (double) settings.m_contrast); return floor(settings.m_contrast * 1000.0f + 0.5f); } @@ -2133,7 +2133,7 @@ static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str, screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_gamma); + strprintf(*str,"%.3f", (double) settings.m_gamma); return floor(settings.m_gamma * 1000.0f + 0.5f); } @@ -2155,7 +2155,7 @@ static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_xscale); + strprintf(*str,"%.3f", (double) settings.m_xscale); return floor(settings.m_xscale * 1000.0f + 0.5f); } @@ -2177,7 +2177,7 @@ static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_yscale); + strprintf(*str,"%.3f", (double) settings.m_yscale); return floor(settings.m_yscale * 1000.0f + 0.5f); } @@ -2199,7 +2199,7 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *st screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_xoffset); + strprintf(*str,"%.3f", (double) settings.m_xoffset); return floor(settings.m_xoffset * 1000.0f + 0.5f); } @@ -2221,7 +2221,7 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *st screen->container().set_user_settings(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_yoffset); + strprintf(*str,"%.3f", (double) settings.m_yoffset); return floor(settings.m_yoffset * 1000.0f + 0.5f); } @@ -2243,7 +2243,7 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, std::string laserdisc->set_overlay_config(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_overscalex); + strprintf(*str,"%.3f", (double) settings.m_overscalex); return floor(settings.m_overscalex * 1000.0f + 0.5f); } @@ -2265,7 +2265,7 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, std::string laserdisc->set_overlay_config(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_overscaley); + strprintf(*str,"%.3f", (double) settings.m_overscaley); return floor(settings.m_overscaley * 1000.0f + 0.5f); } @@ -2287,7 +2287,7 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string laserdisc->set_overlay_config(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_overposx); + strprintf(*str,"%.3f", (double) settings.m_overposx); return floor(settings.m_overposx * 1000.0f + 0.5f); } @@ -2309,7 +2309,7 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string laserdisc->set_overlay_config(settings); } if (str != NULL) - strprintf(*str,"%.3f", settings.m_overposy); + strprintf(*str,"%.3f", (double) settings.m_overposy); return floor(settings.m_overposy * 1000.0f + 0.5f); } @@ -2325,7 +2325,7 @@ static INT32 slider_flicker(running_machine &machine, void *arg, std::string *st if (newval != SLIDER_NOCHANGE) vector->set_flicker((float)newval * 0.1f); if (str != NULL) - strprintf(*str,"%1.2f", vector->get_flicker()); + strprintf(*str,"%1.2f", (double) vector->get_flicker()); return floor(vector->get_flicker() * 10.0f + 0.5f); } @@ -2341,7 +2341,7 @@ static INT32 slider_beam(running_machine &machine, void *arg, std::string *str, if (newval != SLIDER_NOCHANGE) vector->set_beam((float)newval * 0.01f); if (str != NULL) - strprintf(*str,"%1.2f", vector->get_beam()); + strprintf(*str,"%1.2f", (double) vector->get_beam()); return floor(vector->get_beam() * 100.0f + 0.5f); } diff --git a/src/emu/validity.c b/src/emu/validity.c index 28ba842df85..2c5e08cb40b 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -482,7 +482,7 @@ void validity_checker::validate_inlines() if (resultu32 != expectedu32) osd_printf_error("Error testing divu_32x32_shift (%08X << 3) / %08X = %08X (expected %08X)\n", (UINT32)testu64a, testu32a, resultu32, expectedu32); - if (fabs(recip_approx(100.0) - 0.01) > 0.0001) + if (fabsf(recip_approx(100.0f) - 0.01f) > 0.0001f) osd_printf_error("Error testing recip_approx\n"); testi32a = (testi32a & 0x0000ffff) | 0x400000; diff --git a/src/emu/video.c b/src/emu/video.c index 55e596d36bc..2ce890d44e4 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -636,7 +636,7 @@ inline bool video_manager::effective_throttle() const inline int video_manager::original_speed_setting() const { - return machine().options().speed() * 1000.0 + 0.5; + return machine().options().speed() * 1000.0f + 0.5f; } @@ -901,7 +901,7 @@ void video_manager::update_frameskip() if (effective_throttle() && effective_autoframeskip() && m_frameskip_counter == 0) { // calibrate the "adjusted speed" based on the target - double adjusted_speed_percent = m_speed_percent / m_throttle_rate; + double adjusted_speed_percent = m_speed_percent / (double) m_throttle_rate; // if we're too fast, attempt to increase the frameskip double speed = m_speed * 0.001; @@ -953,7 +953,7 @@ void video_manager::update_refresh_speed() // only do this if the refreshspeed option is used if (machine().options().refresh_speed()) { - float minrefresh = machine().render().max_update_rate(); + double minrefresh = machine().render().max_update_rate(); if (minrefresh != 0) { // find the screen with the shortest frame period (max refresh rate) @@ -970,7 +970,7 @@ void video_manager::update_refresh_speed() // compute a target speed as an integral percentage // note that we lop 0.25Hz off of the minrefresh when doing the computation to allow for // the fact that most refresh rates are not accurate to 10 digits... - UINT32 target_speed = floor((minrefresh - 0.25f) * 1000.0 / ATTOSECONDS_TO_HZ(min_frame_period)); + UINT32 target_speed = floor((minrefresh - 0.25) * 1000.0 / ATTOSECONDS_TO_HZ(min_frame_period)); UINT32 original_speed = original_speed_setting(); target_speed = MIN(target_speed, original_speed); diff --git a/src/emu/video/315_5124.c b/src/emu/video/315_5124.c index a7a8d8d9e92..6e43a4d9510 100644 --- a/src/emu/video/315_5124.c +++ b/src/emu/video/315_5124.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol, Enik Land /********************************************************************* sega315_5124.c diff --git a/src/emu/video/315_5124.h b/src/emu/video/315_5124.h index 75916c1d993..409dc2e08a3 100644 --- a/src/emu/video/315_5124.h +++ b/src/emu/video/315_5124.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol, Enik Land /************************************************************************* sega315_5124.h diff --git a/src/emu/video/315_5313.c b/src/emu/video/315_5313.c index fcb144f54a1..0153c2ad05b 100644 --- a/src/emu/video/315_5313.c +++ b/src/emu/video/315_5313.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega 315-5313 - Megadrive VDP */ #include "emu.h" @@ -176,10 +176,10 @@ void sega315_5313_device::device_start() save_pointer(NAME(m_sprite_renderline), 1024); save_pointer(NAME(m_highpri_renderline), 320); save_pointer(NAME(m_video_renderline), 320/4); - save_pointer(NAME(m_palette_lookup), 0x40/2); - save_pointer(NAME(m_palette_lookup_sprite), 0x40/2); - save_pointer(NAME(m_palette_lookup_shadow), 0x40/2); - save_pointer(NAME(m_palette_lookup_highlight), 0x40/2); + save_pointer(NAME(m_palette_lookup), 0x40); + save_pointer(NAME(m_palette_lookup_sprite), 0x40); + save_pointer(NAME(m_palette_lookup_shadow), 0x40); + save_pointer(NAME(m_palette_lookup_highlight), 0x40); save_pointer(NAME(m_render_line_raw), 320/2); if (m_use_alt_timing) save_pointer(NAME(m_render_line), 320/2); diff --git a/src/emu/video/315_5313.h b/src/emu/video/315_5313.h index b2146896ac3..8bcf91a6d5f 100644 --- a/src/emu/video/315_5313.h +++ b/src/emu/video/315_5313.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega Megadrive / Genesis VDP */ #pragma once diff --git a/src/emu/video/clgd542x.c b/src/emu/video/clgd542x.c index cf3e3e04c05..acd4beecd85 100644 --- a/src/emu/video/clgd542x.c +++ b/src/emu/video/clgd542x.c @@ -372,31 +372,46 @@ void cirrus_gd5428_device::start_system_bitblt() m_blt_status |= 0x09; } +// non colour-expanded BitBLTs from system memory must be doubleword sized, extra bytes are ignored void cirrus_gd5428_device::blit_dword() { // TODO: add support for reverse direction UINT8 x,pixel; - if(m_blt_mode & 0x80) // colour expand + + for(x=0;x<32;x+=8) { - for(x=0;x<32;x++) - { - pixel = ((m_blt_system_buffer & (0x00000001 << x)) >> x) ? vga.gc.enable_set_reset : vga.gc.set_reset; // use GR0/1/10/11 background/foreground regs - if(m_blt_pixel_count <= m_blt_width) - copy_pixel(pixel,vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); - m_blt_dest_current++; - m_blt_pixel_count++; - } + pixel = ((m_blt_system_buffer & (0x000000ff << x)) >> x); + if(m_blt_pixel_count <= m_blt_width) + copy_pixel(pixel,vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); + m_blt_dest_current++; + m_blt_pixel_count++; } - else + if(m_blt_pixel_count > m_blt_width) { - for(x=0;x<32;x+=8) - { - pixel = ((m_blt_system_buffer & (0x000000ff << x)) >> x); - if(m_blt_pixel_count <= m_blt_width) - copy_pixel(pixel,vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); - m_blt_dest_current++; - m_blt_pixel_count++; - } + m_blt_pixel_count = 0; + m_blt_scan_count++; + m_blt_dest_current = m_blt_dest + (m_blt_dest_pitch*m_blt_scan_count); + } + if(m_blt_scan_count > m_blt_height) + { + m_blt_system_transfer = false; // BitBLT complete + m_blt_status &= ~0x0b; + } +} + +// colour-expanded BitBLTs from system memory are on a byte boundary, unused bits are ignored +void cirrus_gd5428_device::blit_byte() +{ + // TODO: add support for reverse direction + UINT8 x,pixel; + + for(x=0;x<8;x++) + { + pixel = ((m_blt_system_buffer & (0x00000001 << (7-x))) >> (7-x)) ? vga.gc.enable_set_reset : vga.gc.set_reset; // use GR0/1/10/11 background/foreground regs + if(m_blt_pixel_count <= m_blt_width - 1) + copy_pixel(pixel,vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); + m_blt_dest_current++; + m_blt_pixel_count++; } if(m_blt_pixel_count > m_blt_width) { @@ -413,26 +428,38 @@ void cirrus_gd5428_device::blit_dword() void cirrus_gd5428_device::copy_pixel(UINT8 src, UINT8 dst) { + UINT8 res = src; + switch(m_blt_rop) { case 0x00: // BLACK - vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = 0x00; + res = 0x00; break; case 0x0b: // DSTINVERT - vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = ~dst; + res = ~dst; break; case 0x0d: // SRC - vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = src; + res = src; break; case 0x0e: // WHITE - vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = 0xff; + res = 0xff; break; case 0x59: // SRCINVERT - vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = src ^ dst; + res = src ^ dst; break; default: popmessage("CL: Unsupported BitBLT ROP mode %02x",m_blt_rop); } + + // handle transparency compare + if(m_blt_mode & 0x08) // TODO: 16-bit compare + { + // if ROP result matches the transparency colour, don't change the pixel + if((res & (~m_blt_trans_colour_mask & 0xff)) == ((m_blt_trans_colour & 0xff) & (~m_blt_trans_colour_mask & 0xff))) + return; + } + + vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = res; } UINT8 cirrus_gd5428_device::cirrus_seq_reg_read(UINT8 index) @@ -687,6 +714,18 @@ UINT8 cirrus_gd5428_device::cirrus_gc_reg_read(UINT8 index) case 0x32: // BitBLT ROP mode res = m_blt_rop; break; + case 0x34: // BitBLT Transparent Colour + res = m_blt_trans_colour & 0x00ff; + break; + case 0x35: + res = m_blt_trans_colour >> 8; + break; + case 0x36: // BitBLT Transparent Colour Mask + res = m_blt_trans_colour_mask & 0x00ff; + break; + case 0x37: + res = m_blt_trans_colour_mask >> 8; + break; default: res = gc_reg_read(index); } @@ -810,6 +849,18 @@ void cirrus_gd5428_device::cirrus_gc_reg_write(UINT8 index, UINT8 data) case 0x32: // BitBLT ROP mode m_blt_rop = data; break; + case 0x34: // BitBLT Transparent Colour + m_blt_trans_colour = (m_blt_trans_colour & 0xff00) | data; + break; + case 0x35: + m_blt_trans_colour = (m_blt_trans_colour & 0x00ff) | (data << 8); + break; + case 0x36: // BitBLT Transparent Colour Mask + m_blt_trans_colour_mask = (m_blt_trans_colour_mask & 0xff00) | data; + break; + case 0x37: + m_blt_trans_colour_mask = (m_blt_trans_colour_mask & 0x00ff) | (data << 8); + break; default: gc_reg_write(index,data); } @@ -1224,15 +1275,25 @@ WRITE8_MEMBER(cirrus_gd5428_device::mem_w) UINT8 cur_mode = pc_vga_choosevideomode(); if(m_blt_system_transfer) - { - m_blt_system_buffer &= ~(0x000000ff << (m_blt_system_count * 8)); - m_blt_system_buffer |= (data << (m_blt_system_count * 8)); - m_blt_system_count++; - if(m_blt_system_count >= 4) + { + if(m_blt_mode & 0x80) // colour expand { - blit_dword(); + m_blt_system_buffer &= ~(0x000000ff); + m_blt_system_buffer |= data; + blit_byte(); m_blt_system_count = 0; } + else + { + m_blt_system_buffer &= ~(0x000000ff << (m_blt_system_count * 8)); + m_blt_system_buffer |= (data << (m_blt_system_count * 8)); + m_blt_system_count++; + if(m_blt_system_count >= 4) + { + blit_dword(); + m_blt_system_count = 0; + } + } return; } diff --git a/src/emu/video/clgd542x.h b/src/emu/video/clgd542x.h index 371136ba489..dcd7f966641 100644 --- a/src/emu/video/clgd542x.h +++ b/src/emu/video/clgd542x.h @@ -66,6 +66,8 @@ protected: UINT16 m_blt_width; UINT32 m_blt_source_current; UINT32 m_blt_dest_current; + UINT16 m_blt_trans_colour; + UINT16 m_blt_trans_colour_mask; bool m_blt_system_transfer; // blit from system memory UINT8 m_blt_system_count; @@ -93,6 +95,7 @@ private: void start_reverse_bitblt(); void start_system_bitblt(); void blit_dword(); + void blit_byte(); // used for colour expanded system-to-vram bitblts void copy_pixel(UINT8 src, UINT8 dst); }; diff --git a/src/emu/video/ef9345.c b/src/emu/video/ef9345.c index f4b69ba4556..1568da9baf1 100644 --- a/src/emu/video/ef9345.c +++ b/src/emu/video/ef9345.c @@ -1,4 +1,4 @@ -// license:? +// license:??? // copyright-holders:Daniel Coulom,Sandro Ronco /********************************************************************* diff --git a/src/emu/video/ef9345.h b/src/emu/video/ef9345.h index 07138a7956a..610e889091c 100644 --- a/src/emu/video/ef9345.h +++ b/src/emu/video/ef9345.h @@ -1,4 +1,4 @@ -// license:? +// license:??? // copyright-holders:Daniel Coulom,Sandro Ronco /********************************************************************* diff --git a/src/emu/video/epic12.h b/src/emu/video/epic12.h index 0815d715c7f..2391e4fef8c 100644 --- a/src/emu/video/epic12.h +++ b/src/emu/video/epic12.h @@ -27,7 +27,7 @@ union colour_t UINT32 u32; }; -typedef const void (*epic12_device_blitfunction)(bitmap_rgb32 *, +typedef void (*epic12_device_blitfunction)(bitmap_rgb32 *, const rectangle *, UINT32 *, /* gfx */ int , /* src_x */ @@ -114,7 +114,7 @@ public: void gfx_exec_unsafe(void); static void *blit_request_callback_unsafe(void *param, int threadid); -#define BLIT_FUNCTION static const void +#define BLIT_FUNCTION static void #define BLIT_PARAMS bitmap_rgb32 *bitmap, const rectangle *clip, UINT32 *gfx, int src_x, int src_y, const int dst_x_start, const int dst_y_start, int dimx, int dimy, const int flipy, const UINT8 s_alpha, const UINT8 d_alpha, const clr_t *tint_clr BLIT_FUNCTION draw_sprite_f0_ti0_plain(BLIT_PARAMS); diff --git a/src/emu/video/epic12in.inc b/src/emu/video/epic12in.inc index a9dd70c0b12..cf0c81dd80f 100644 --- a/src/emu/video/epic12in.inc +++ b/src/emu/video/epic12in.inc @@ -1,6 +1,6 @@ /* blitter function */ -const void epic12_device::FUNCNAME(BLIT_PARAMS) +void epic12_device::FUNCNAME(BLIT_PARAMS) { UINT32* gfx2; int y, yf; diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index 595c0f607fc..2824c90a834 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -261,12 +261,6 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid) col = rgb_t(colv, colv, colv); } - while (0 && pixels >= m_htotal) - { - bm->plot_box(m_last_x, m_last_y + m_sig_field * has_fields, m_htotal - 1 - m_last_x, 1, col); - pixels -= m_htotal; - m_last_x = 0; - } bm->plot_box(m_last_x, m_last_y + m_sig_field * has_fields, pixels - m_last_x, 1, col); m_last_x = pixels; } @@ -286,7 +280,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid) if (sync & 1) { - m_last_y = m_vbackporch - m_vsync; // 6; // FIXME: needed for pong - need to be able to adjust screen parameters + m_last_y = m_vbackporch - m_vsync; // toggle bitmap m_cur_bm ^= 1; update_screen_parameters(time - m_last_vsync_time); diff --git a/src/emu/video/gf4500.c b/src/emu/video/gf4500.c index 8fa8cdcb19b..48e2f8495c3 100644 --- a/src/emu/video/gf4500.c +++ b/src/emu/video/gf4500.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/emu/video/gf4500.h b/src/emu/video/gf4500.h index 382f15adc2c..eb246ec0ea9 100644 --- a/src/emu/video/gf4500.h +++ b/src/emu/video/gf4500.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/emu/video/hd63484.c b/src/emu/video/hd63484.c index 8718bc52330..cdfddbcb23d 100644 --- a/src/emu/video/hd63484.c +++ b/src/emu/video/hd63484.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Roberto Zandona' /*************************************************************************** diff --git a/src/emu/video/hd63484.h b/src/emu/video/hd63484.h index 1683cc67bd2..08d147a8081 100644 --- a/src/emu/video/hd63484.h +++ b/src/emu/video/hd63484.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Roberto Zandona' /************************************************************************* diff --git a/src/emu/video/hd66421.c b/src/emu/video/hd66421.c index aff6154a6c4..af67be24d78 100644 --- a/src/emu/video/hd66421.c +++ b/src/emu/video/hd66421.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/emu/video/hd66421.h b/src/emu/video/hd66421.h index 48b42d819e1..baed72ad30c 100644 --- a/src/emu/video/hd66421.h +++ b/src/emu/video/hd66421.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /*************************************************************************** diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c index f9b5166fa77..d67a7df128a 100644 --- a/src/emu/video/pc_vga.c +++ b/src/emu/video/pc_vga.c @@ -2672,7 +2672,7 @@ void s3_vga_device::s3_define_video_mode() if((vga.miscellaneous_output & 0xc) == 0x0c) { // DCLK calculation - freq = ((double)(s3.clk_pll_m+2) / (double)((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318f; // clock between XIN and XOUT + freq = ((double)(s3.clk_pll_m+2) / (double)((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318; // clock between XIN and XOUT xtal = freq * 1000000; } diff --git a/src/emu/video/pc_vga.h b/src/emu/video/pc_vga.h index 05bce83c4a2..613d38a1616 100644 --- a/src/emu/video/pc_vga.h +++ b/src/emu/video/pc_vga.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods, Peter Trauner, Angelo Salese /*************************************************************************** pc_vga.h diff --git a/src/emu/video/polylgcy.c b/src/emu/video/polylgcy.c index 575226e26a3..720110e5ca3 100644 --- a/src/emu/video/polylgcy.c +++ b/src/emu/video/polylgcy.c @@ -607,7 +607,7 @@ UINT32 poly_render_triangle(legacy_poly_manager *poly, void *dest, const rectang float a22 = v1->x*v2->y - v2->x*v1->y; float det = a02 + a12 + a22; - if(fabsf(det) < 0.001) { + if(fabsf(det) < 0.001f) { for (int paramnum = 0; paramnum < paramcount; paramnum++) { poly_param *params = &polygon->param[paramnum]; diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c index 8665f64f9e2..b695ce08ed7 100644 --- a/src/emu/video/tlc34076.c +++ b/src/emu/video/tlc34076.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** tlc34076.c diff --git a/src/emu/video/tlc34076.h b/src/emu/video/tlc34076.h index 018b7f79703..08c8d666fee 100644 --- a/src/emu/video/tlc34076.h +++ b/src/emu/video/tlc34076.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** tlc34076.h diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c index ff5ba2449c6..1be2f88302d 100644 --- a/src/emu/video/tms34061.c +++ b/src/emu/video/tms34061.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari, Aaron Giles /**************************************************************************** * * * Functions to emulate the TMS34061 video controller * diff --git a/src/emu/video/tms34061.h b/src/emu/video/tms34061.h index 74b6104fd26..0ad3143cd53 100644 --- a/src/emu/video/tms34061.h +++ b/src/emu/video/tms34061.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari, Aaron Giles /**************************************************************************** * * * Function prototypes and constants used by the TMS34061 emulator * diff --git a/src/emu/video/upd7220.c b/src/emu/video/upd7220.c index b1eabbf6feb..05f64cc2878 100644 --- a/src/emu/video/upd7220.c +++ b/src/emu/video/upd7220.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Miodrag Milanovic +// copyright-holders:Angelo Salese, Miodrag Milanovic, Carl /********************************************************************** Intel 82720 Graphics Display Controller emulation diff --git a/src/emu/video/upd7220.h b/src/emu/video/upd7220.h index 3e0ca3d01a3..4a8be071cac 100644 --- a/src/emu/video/upd7220.h +++ b/src/emu/video/upd7220.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Miodrag Milanovic +// copyright-holders:Angelo Salese, Miodrag Milanovic, Carl /********************************************************************** NEC uPD7220 Graphics Display Controller emulation diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c index 44e01885ff9..79dc174d229 100644 --- a/src/emu/video/vector.c +++ b/src/emu/video/vector.c @@ -164,7 +164,7 @@ void vector_device::device_start() void vector_device::set_flicker(float _flicker) { m_flicker_correction = _flicker; - m_flicker = (int)(m_flicker_correction * 2.55); + m_flicker = (int)(m_flicker_correction * 2.55f); } float vector_device::get_flicker() diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index b27c794723c..1942aaa392f 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -2918,7 +2918,7 @@ default_case: if (regnum < fvertexAx || regnum > fdWdY) logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, origdata); else - logerror("VOODOO.%d.REG:%s(%d) write = %f\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, u2f(origdata)); + logerror("VOODOO.%d.REG:%s(%d) write = %f\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, (double) u2f(origdata)); } return cycles; @@ -5436,12 +5436,12 @@ static INT32 setup_and_draw_triangle(voodoo_state *v) float divisor, tdiv; /* grab the X/Ys at least */ - v->fbi.ax = (INT16)(v->fbi.svert[0].x * 16.0); - v->fbi.ay = (INT16)(v->fbi.svert[0].y * 16.0); - v->fbi.bx = (INT16)(v->fbi.svert[1].x * 16.0); - v->fbi.by = (INT16)(v->fbi.svert[1].y * 16.0); - v->fbi.cx = (INT16)(v->fbi.svert[2].x * 16.0); - v->fbi.cy = (INT16)(v->fbi.svert[2].y * 16.0); + v->fbi.ax = (INT16)(v->fbi.svert[0].x * 16.0f); + v->fbi.ay = (INT16)(v->fbi.svert[0].y * 16.0f); + v->fbi.bx = (INT16)(v->fbi.svert[1].x * 16.0f); + v->fbi.by = (INT16)(v->fbi.svert[1].y * 16.0f); + v->fbi.cx = (INT16)(v->fbi.svert[2].x * 16.0f); + v->fbi.cy = (INT16)(v->fbi.svert[2].y * 16.0f); /* compute the divisor */ divisor = 1.0f / ((v->fbi.svert[0].x - v->fbi.svert[1].x) * (v->fbi.svert[0].y - v->fbi.svert[2].y) - @@ -5486,7 +5486,7 @@ static INT32 setup_and_draw_triangle(voodoo_state *v) /* set up alpha */ if (v->reg[sSetupMode].u & (1 << 1)) { - v->fbi.starta = (INT32)(v->fbi.svert[0].a * 4096.0); + v->fbi.starta = (INT32)(v->fbi.svert[0].a * 4096.0f); v->fbi.dadx = (INT32)(((v->fbi.svert[0].a - v->fbi.svert[1].a) * dx1 - (v->fbi.svert[0].a - v->fbi.svert[2].a) * dx2) * tdiv); v->fbi.dady = (INT32)(((v->fbi.svert[0].a - v->fbi.svert[2].a) * dy1 - (v->fbi.svert[0].a - v->fbi.svert[1].a) * dy2) * tdiv); } @@ -5494,7 +5494,7 @@ static INT32 setup_and_draw_triangle(voodoo_state *v) /* set up Z */ if (v->reg[sSetupMode].u & (1 << 2)) { - v->fbi.startz = (INT32)(v->fbi.svert[0].z * 4096.0); + v->fbi.startz = (INT32)(v->fbi.svert[0].z * 4096.0f); v->fbi.dzdx = (INT32)(((v->fbi.svert[0].z - v->fbi.svert[1].z) * dx1 - (v->fbi.svert[0].z - v->fbi.svert[2].z) * dx2) * tdiv); v->fbi.dzdy = (INT32)(((v->fbi.svert[0].z - v->fbi.svert[2].z) * dy1 - (v->fbi.svert[0].z - v->fbi.svert[1].z) * dy2) * tdiv); } diff --git a/src/emu/video/voodoo_pci.c b/src/emu/video/voodoo_pci.c index ede0e406935..e747ce30264 100644 --- a/src/emu/video/voodoo_pci.c +++ b/src/emu/video/voodoo_pci.c @@ -1,8 +1,30 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green #include "voodoo_pci.h" -static MACHINE_CONFIG_FRAGMENT( voodoo_pci ) +int voodoo_pci_device::m_type = 0; + +static MACHINE_CONFIG_FRAGMENT( voodoo_1_pci ) + MCFG_DEVICE_ADD("voodoo", VOODOO_1, STD_VOODOO_1_CLOCK) + MCFG_VOODOO_FBMEM(4) + MCFG_VOODOO_TMUMEM(1, 0) + MCFG_VOODOO_SCREEN_TAG("screen") +MACHINE_CONFIG_END + +static MACHINE_CONFIG_FRAGMENT( voodoo_2_pci ) + MCFG_DEVICE_ADD("voodoo", VOODOO_2, STD_VOODOO_2_CLOCK) + MCFG_VOODOO_FBMEM(4) + MCFG_VOODOO_TMUMEM(1, 0) + MCFG_VOODOO_SCREEN_TAG("screen") +MACHINE_CONFIG_END + +static MACHINE_CONFIG_FRAGMENT( voodoo_banshee_pci ) + MCFG_DEVICE_ADD("voodoo", VOODOO_BANSHEE, STD_VOODOO_BANSHEE_CLOCK) + MCFG_VOODOO_FBMEM(16) + MCFG_VOODOO_SCREEN_TAG("screen") +MACHINE_CONFIG_END + +static MACHINE_CONFIG_FRAGMENT( voodoo_3_pci ) MCFG_DEVICE_ADD("voodoo", VOODOO_3, STD_VOODOO_3_CLOCK) MCFG_VOODOO_FBMEM(16) MCFG_VOODOO_SCREEN_TAG("screen") @@ -10,12 +32,36 @@ MACHINE_CONFIG_END machine_config_constructor voodoo_pci_device::device_mconfig_additions() const { - return MACHINE_CONFIG_NAME( voodoo_pci ); + switch (m_type) { + case TYPE_VOODOO_1: + return MACHINE_CONFIG_NAME( voodoo_1_pci ); + break; + case TYPE_VOODOO_2: + return MACHINE_CONFIG_NAME( voodoo_2_pci ); + break; + case TYPE_VOODOO_BANSHEE: + return MACHINE_CONFIG_NAME( voodoo_banshee_pci ); + break; + //case TYPE_VOODOO_3 + default: + return MACHINE_CONFIG_NAME( voodoo_3_pci ); + break; + } } const device_type VOODOO_PCI = &device_creator<voodoo_pci_device>; -DEVICE_ADDRESS_MAP_START(reg_map, 32, voodoo_pci_device) +DEVICE_ADDRESS_MAP_START(config_map, 32, voodoo_pci_device) + AM_RANGE(0x40, 0x4f) AM_READWRITE (pcictrl_r, pcictrl_w) + AM_INHERIT_FROM(pci_device::config_map) +ADDRESS_MAP_END + +DEVICE_ADDRESS_MAP_START(voodoo_reg_map, 32, voodoo_pci_device) + AM_RANGE(0x0, 0x00ffffff) AM_DEVREADWRITE("voodoo", voodoo_device, voodoo_r, voodoo_w) +ADDRESS_MAP_END + + +DEVICE_ADDRESS_MAP_START(banshee_reg_map, 32, voodoo_pci_device) AM_RANGE(0x0, 0x01ffffff) AM_DEVREADWRITE("voodoo", voodoo_banshee_device, banshee_r, banshee_w) ADDRESS_MAP_END DEVICE_ADDRESS_MAP_START(lfb_map, 32, voodoo_pci_device) @@ -27,7 +73,7 @@ ADDRESS_MAP_END voodoo_pci_device::voodoo_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pci_device(mconfig, VOODOO_PCI, "Voodoo PCI", tag, owner, clock, "voodoo_pci", __FILE__), - m_voodoo(*this, "voodoo") + m_voodoo(*this, "voodoo"), m_fbmem(2), m_tmumem0(0), m_tmumem1(0) { } @@ -39,14 +85,37 @@ void voodoo_pci_device::set_cpu_tag(const char *_cpu_tag) void voodoo_pci_device::device_start() { voodoo_device::static_set_cpu_tag(m_voodoo, m_cpu_tag); + voodoo_device::static_set_fbmem(m_voodoo, m_fbmem); + voodoo_device::static_set_tmumem(m_voodoo, m_tmumem0, m_tmumem1); + switch (m_type) { + //void set_ids(UINT32 main_id, UINT8 revision, UINT32 pclass, UINT32 subsystem_id); + case TYPE_VOODOO_1: + set_ids(0x121a0001, 0x02, 0x000000, 0x000000); + break; + case TYPE_VOODOO_2: + set_ids(0x121a0002, 0x02, 0x040000, 0x000000); + break; + case TYPE_VOODOO_BANSHEE: + set_ids(0x121a0003, 0x02, 0x000003, 0x000000); + break; + //case TYPE_VOODOO_3 + default: + set_ids(0x121a0005, 0x02, 0x000003, 0x000000); + break; + } pci_device::device_start(); - add_map(32*1024*1024, M_MEM, FUNC(voodoo_pci_device::reg_map)); - add_map(32*1024*1024, M_MEM, FUNC(voodoo_pci_device::lfb_map)); - add_map(256, M_IO, FUNC(voodoo_pci_device::io_map)); + if (m_type<=TYPE_VOODOO_2) { + add_map(16*1024*1024, M_MEM, FUNC(voodoo_pci_device::voodoo_reg_map)); + } else { + add_map(32*1024*1024, M_MEM, FUNC(voodoo_pci_device::banshee_reg_map)); + add_map(32*1024*1024, M_MEM, FUNC(voodoo_pci_device::lfb_map)); + add_map(256, M_IO, FUNC(voodoo_pci_device::io_map)); + } } void voodoo_pci_device::device_reset() { + memset(m_pcictrl_reg, 0, sizeof(m_pcictrl_reg)); pci_device::device_reset(); } @@ -86,3 +155,26 @@ UINT32 voodoo_pci_device::screen_update(screen_device &screen, bitmap_rgb32 &bit { return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } + +// PCI bus control +READ32_MEMBER (voodoo_pci_device::pcictrl_r) +{ + UINT32 result = m_pcictrl_reg[offset]; + if (1) + logerror("%06X:voodoo_pci_device pcictrl_r from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask); + return result; +} +WRITE32_MEMBER (voodoo_pci_device::pcictrl_w) +{ + COMBINE_DATA(&m_pcictrl_reg[offset]); + switch (offset) { + case 0x0/4: // The address map starts at 0x40 + // HW initEnable + voodoo_set_init_enable(m_voodoo, data); + logerror("%06X:voodoo_pci_device pcictrl_w to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask); + break; + default: + logerror("%06X:voodoo_pci_device pcictrl_w to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask); + break; + } +} diff --git a/src/emu/video/voodoo_pci.h b/src/emu/video/voodoo_pci.h index f1fd22ce068..a1fe30bd7db 100644 --- a/src/emu/video/voodoo_pci.h +++ b/src/emu/video/voodoo_pci.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green // 3dfx Voodoo Graphics SST-1/2 emulator. @@ -8,10 +8,17 @@ #include "machine/pci.h" #include "voodoo.h" -#define MCFG_VOODOO_ADD(_tag, _cpu_tag) \ - MCFG_PCI_DEVICE_ADD(_tag, VOODOO_PCI, 0x121a0005, 0x02, 0x000003, 0x000000) \ +#define MCFG_VOODOO_PCI_ADD(_tag, _type, _cpu_tag) \ + voodoo_pci_device::set_type(_type); \ + MCFG_PCI_DEVICE_ADD(_tag, VOODOO_PCI, 0, 0, 0, 0) \ downcast<voodoo_pci_device *>(device)->set_cpu_tag(_cpu_tag); +#define MCFG_VOODOO_PCI_FBMEM(_value) \ + downcast<voodoo_pci_device *>(device)->set_fbmem(_value); + +#define MCFG_VOODOO_PCI_TMUMEM(_value1, _value2) \ + downcast<voodoo_pci_device *>(device)->set_tmumem(_value1, _value2); + class voodoo_pci_device : public pci_device { public: voodoo_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -20,18 +27,29 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const; UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + virtual DECLARE_ADDRESS_MAP(config_map, 32); void set_cpu_tag(const char *tag); + static void set_type(const int type) {m_type = type;} + void set_fbmem(const int fbmem) {m_fbmem = fbmem;} + void set_tmumem(const int tmumem0, const int tmumem1) {m_tmumem0 = tmumem0; m_tmumem1 = tmumem1;} + + DECLARE_READ32_MEMBER( pcictrl_r); + DECLARE_WRITE32_MEMBER( pcictrl_w); protected: virtual void device_start(); virtual void device_reset(); private: - required_device<voodoo_banshee_device> m_voodoo; + required_device<voodoo_device> m_voodoo; + static int m_type; + int m_fbmem, m_tmumem0, m_tmumem1; const char *m_cpu_tag; - DECLARE_ADDRESS_MAP(reg_map, 32); + UINT32 m_pcictrl_reg[0x10]; + DECLARE_ADDRESS_MAP(voodoo_reg_map, 32); + DECLARE_ADDRESS_MAP(banshee_reg_map, 32); DECLARE_ADDRESS_MAP(lfb_map, 32); DECLARE_ADDRESS_MAP(io_map, 32); }; diff --git a/src/lib/formats/ace_tap.c b/src/lib/formats/ace_tap.c index 4465a587e16..3479d6ba1f5 100644 --- a/src/lib/formats/ace_tap.c +++ b/src/lib/formats/ace_tap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /******************************************************************** Support for Jupiter Ace .tap cassette images diff --git a/src/lib/formats/ace_tap.h b/src/lib/formats/ace_tap.h index f920a5f23e2..27a1e93129d 100644 --- a/src/lib/formats/ace_tap.h +++ b/src/lib/formats/ace_tap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /********************************************************************* ace_tap.h diff --git a/src/lib/formats/adam_cas.c b/src/lib/formats/adam_cas.c index fdc3a5fd6c7..54d7427242d 100644 --- a/src/lib/formats/adam_cas.c +++ b/src/lib/formats/adam_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder #include <assert.h> diff --git a/src/lib/formats/adam_cas.h b/src/lib/formats/adam_cas.h index b5eaa761eff..68ac57af5e9 100644 --- a/src/lib/formats/adam_cas.h +++ b/src/lib/formats/adam_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder /********************************************************************* adam_cas.h diff --git a/src/lib/formats/ap2_dsk.c b/src/lib/formats/ap2_dsk.c index 7f7e62400e6..b601934e4a0 100644 --- a/src/lib/formats/ap2_dsk.c +++ b/src/lib/formats/ap2_dsk.c @@ -998,10 +998,10 @@ const floppy_format_type FLOPPY_A216S_FORMAT = &floppy_image_format_creator<a2_1 D5 9D <track> <sector> <checksum> AA FF FF <titlespecific sync> <0x400 nybbles which represent 768 bytes> <data checksum> D6 Title-specific sync bytes are: Airheart: D4 - Toy Shop: unknown + Toy Shop: A5 Carmen USA: unknown (not all released versions used RWTS18) Wings of Fury: 96 - Prince of Persia: unknown + Prince of Persia: A9 And several others. */ a2_rwts18_format::a2_rwts18_format() : floppy_image_format_t() diff --git a/src/lib/formats/apridisk.c b/src/lib/formats/apridisk.c index 02d472ebe5e..46dfaf96c36 100644 --- a/src/lib/formats/apridisk.c +++ b/src/lib/formats/apridisk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Dirk Best /*************************************************************************** APRIDISK disk image format diff --git a/src/lib/formats/apridisk.h b/src/lib/formats/apridisk.h index 8ff40b790f9..d33743d8711 100644 --- a/src/lib/formats/apridisk.h +++ b/src/lib/formats/apridisk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Dirk Best /*************************************************************************** APRIDISK disk image format diff --git a/src/lib/formats/atari_dsk.c b/src/lib/formats/atari_dsk.c index 90a998018c0..f5ccd03c952 100644 --- a/src/lib/formats/atari_dsk.c +++ b/src/lib/formats/atari_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/atari_dsk.c diff --git a/src/lib/formats/atari_dsk.h b/src/lib/formats/atari_dsk.h index 1948725af0e..3ae04603e67 100644 --- a/src/lib/formats/atari_dsk.h +++ b/src/lib/formats/atari_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/atari_dsk.h diff --git a/src/lib/formats/atarist_dsk.c b/src/lib/formats/atarist_dsk.c index fd9178184ea..eb559a940c4 100644 --- a/src/lib/formats/atarist_dsk.c +++ b/src/lib/formats/atarist_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/atarist_dsk.c diff --git a/src/lib/formats/atarist_dsk.h b/src/lib/formats/atarist_dsk.h index 9b65ddbdc4e..6c86e456a5b 100644 --- a/src/lib/formats/atarist_dsk.h +++ b/src/lib/formats/atarist_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/atarist_dsk.h diff --git a/src/lib/formats/atom_tap.c b/src/lib/formats/atom_tap.c index eff2e125e2e..06d614a10b3 100644 --- a/src/lib/formats/atom_tap.c +++ b/src/lib/formats/atom_tap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder /********************************************************************* formats/atom_tap.c diff --git a/src/lib/formats/atom_tap.h b/src/lib/formats/atom_tap.h index 4b8829e89b8..b8e62aa1726 100644 --- a/src/lib/formats/atom_tap.h +++ b/src/lib/formats/atom_tap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder /********************************************************************* formats/atom_tap.h diff --git a/src/lib/formats/bw12_dsk.h b/src/lib/formats/bw12_dsk.h index 4d15c364c8a..c9455463486 100644 --- a/src/lib/formats/bw12_dsk.h +++ b/src/lib/formats/bw12_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/bw12_dsk.h diff --git a/src/lib/formats/bw2_dsk.h b/src/lib/formats/bw2_dsk.h index 7c5ce51ca41..d5fa5c66187 100644 --- a/src/lib/formats/bw2_dsk.h +++ b/src/lib/formats/bw2_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/bw2_dsk.h diff --git a/src/lib/formats/cbm_tap.c b/src/lib/formats/cbm_tap.c index 13119ad1f8f..23b8a8846ed 100644 --- a/src/lib/formats/cbm_tap.c +++ b/src/lib/formats/cbm_tap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /* Tape support for C16 / C64 / VIC20 TAP format diff --git a/src/lib/formats/cbm_tap.h b/src/lib/formats/cbm_tap.h index 6a339e9d95e..d8043cd883e 100644 --- a/src/lib/formats/cbm_tap.h +++ b/src/lib/formats/cbm_tap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /********************************************************************* cbm_tap.h diff --git a/src/lib/formats/cgen_cas.c b/src/lib/formats/cgen_cas.c index db499a1e5c1..d9165441618 100644 --- a/src/lib/formats/cgen_cas.c +++ b/src/lib/formats/cgen_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /******************************************************************** Support for EACA Colour Genie .cas cassette images diff --git a/src/lib/formats/cgen_cas.h b/src/lib/formats/cgen_cas.h index fe01d49713b..6e419e9d47c 100644 --- a/src/lib/formats/cgen_cas.h +++ b/src/lib/formats/cgen_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /********************************************************************* cgen_cas.h diff --git a/src/lib/formats/cgenie_dsk.c b/src/lib/formats/cgenie_dsk.c new file mode 100644 index 00000000000..895651acbe2 --- /dev/null +++ b/src/lib/formats/cgenie_dsk.c @@ -0,0 +1,69 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie + + Disk image format + +***************************************************************************/ + +#include "cgenie_dsk.h" + +cgenie_format::cgenie_format() : wd177x_format(formats) +{ +} + +const char *cgenie_format::name() const +{ + return "cgenie"; +} + +const char *cgenie_format::description() const +{ + return "Colour Genie disk image"; +} + +const char *cgenie_format::extensions() const +{ + return "dsk"; +} + +const cgenie_format::format cgenie_format::formats[] = +{ + { // 102k 5 1/4 inch single density single sided (Type A) + floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, + 4000, 10, 41, 1, 256, {}, 0, {}, 14, 11, 12 + }, + { // 184k 5 1/4 inch double density single sided (Type C) + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 18, 42, 1, 256, {}, 0, {}, 21, 22, 16 + }, + { // 204k 5 1/4 inch single density single sided (Type I) + floppy_image::FF_525, floppy_image::SSQD, floppy_image::FM, + 4000, 10, 81, 1, 256, {}, 0, {}, 14, 11, 12 + }, + { // 368k 5 1/4 inch double density single sided (Type K) + floppy_image::FF_525, floppy_image::SSQD, floppy_image::MFM, + 2000, 18, 82, 1, 256, {}, 0, {}, 21, 22, 16 + }, + { // 204k 5 1/4 inch single density double sided (Type B) + floppy_image::FF_525, floppy_image::DSSD, floppy_image::FM, + 4000, 10, 41, 2, 256, {}, 0, {}, 14, 11, 12 + }, + { // 368k 5 1/4 inch double density double sided (Type D) + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 18, 42, 2, 256, {}, 0, {}, 21, 22, 16 + }, + { // 408k 5 1/4 inch single density double sided (Type J) + floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, + 4000, 10, 81, 2, 256, {}, 0, {}, 14, 11, 12 + }, + { // 736k 5 1/4 inch double density double sided (Type L) + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 18, 82, 2, 256, {}, 0, {}, 21, 22, 16 + }, + {} +}; + +const floppy_format_type FLOPPY_CGENIE_FORMAT = &floppy_image_format_creator<cgenie_format>; diff --git a/src/lib/formats/cgenie_dsk.h b/src/lib/formats/cgenie_dsk.h new file mode 100644 index 00000000000..2c88860b9cc --- /dev/null +++ b/src/lib/formats/cgenie_dsk.h @@ -0,0 +1,33 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie + + Disk image format + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_DSK_H__ +#define __CGENIE_DSK_H__ + +#include "wd177x_dsk.h" + +class cgenie_format : public wd177x_format +{ +public: + cgenie_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_CGENIE_FORMAT; + +#endif // __CGENIE_DSK_H__ diff --git a/src/lib/formats/concept_dsk.h b/src/lib/formats/concept_dsk.h index 1c194114bef..171798c0fc6 100644 --- a/src/lib/formats/concept_dsk.h +++ b/src/lib/formats/concept_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert, R. Belmont /********************************************************************* formats/concept_dsk.h diff --git a/src/lib/formats/coupedsk.c b/src/lib/formats/coupedsk.c index c7c397f6e5b..f45222ae1ae 100644 --- a/src/lib/formats/coupedsk.c +++ b/src/lib/formats/coupedsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /************************************************************************* formats/coupedsk.c diff --git a/src/lib/formats/coupedsk.h b/src/lib/formats/coupedsk.h index c67448f71c9..9345ded421a 100644 --- a/src/lib/formats/coupedsk.h +++ b/src/lib/formats/coupedsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /************************************************************************* formats/coupedsk.h diff --git a/src/lib/formats/cpis_dsk.c b/src/lib/formats/cpis_dsk.c index fd9d4e4e610..088fcebb908 100644 --- a/src/lib/formats/cpis_dsk.c +++ b/src/lib/formats/cpis_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/cpis_dsk.c @@ -97,9 +97,6 @@ LEGACY_FLOPPY_OPTIONS_END - -// license:BSD-3-Clause -// copyright-holders:Olivier Galibert /********************************************************************* formats/cpis_dsk.c diff --git a/src/lib/formats/cpis_dsk.h b/src/lib/formats/cpis_dsk.h index 05f014fded9..e6e4e8bad20 100644 --- a/src/lib/formats/cpis_dsk.h +++ b/src/lib/formats/cpis_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/cpis_dsk.h diff --git a/src/lib/formats/cqm_dsk.c b/src/lib/formats/cqm_dsk.c index df3f98462d8..5ecf4da3186 100644 --- a/src/lib/formats/cqm_dsk.c +++ b/src/lib/formats/cqm_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/cqm_dsk.c diff --git a/src/lib/formats/cqm_dsk.h b/src/lib/formats/cqm_dsk.h index 93db124f54c..e07577c1e4c 100644 --- a/src/lib/formats/cqm_dsk.h +++ b/src/lib/formats/cqm_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/cqm_dsk.h diff --git a/src/lib/formats/csw_cas.c b/src/lib/formats/csw_cas.c index ae9640d8a10..94a45edde1f 100644 --- a/src/lib/formats/csw_cas.c +++ b/src/lib/formats/csw_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Gordon Jefferyes /* CSW format ---------- diff --git a/src/lib/formats/csw_cas.h b/src/lib/formats/csw_cas.h index cd7c1a53790..2f1971bfdbd 100644 --- a/src/lib/formats/csw_cas.h +++ b/src/lib/formats/csw_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Gordon Jefferyes /* csw_cas.h diff --git a/src/lib/formats/dcp_dsk.c b/src/lib/formats/dcp_dsk.c index dc05f4a4b44..fa805979d7b 100644 --- a/src/lib/formats/dcp_dsk.c +++ b/src/lib/formats/dcp_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************* formats/dcp_dsk.h diff --git a/src/lib/formats/dcp_dsk.h b/src/lib/formats/dcp_dsk.h index 1a1756faf2d..d6e169809cf 100644 --- a/src/lib/formats/dcp_dsk.h +++ b/src/lib/formats/dcp_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /********************************************************************* formats/dcp_dsk.h diff --git a/src/lib/formats/dim_dsk.c b/src/lib/formats/dim_dsk.c index 3cf84536c9c..42668b39faf 100644 --- a/src/lib/formats/dim_dsk.c +++ b/src/lib/formats/dim_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/dim_dsk.c @@ -103,8 +103,6 @@ FLOPPY_CONSTRUCT(dim_dsk_construct) } -// license:BSD-3-Clause -// copyright-holders:Olivier Galibert /********************************************************************* formats/dim_dsk.c diff --git a/src/lib/formats/dim_dsk.h b/src/lib/formats/dim_dsk.h index ce586a21975..c7d4cea0d34 100644 --- a/src/lib/formats/dim_dsk.h +++ b/src/lib/formats/dim_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/dim_dsk.h diff --git a/src/lib/formats/dip_dsk.c b/src/lib/formats/dip_dsk.c index ae320e4cb7e..e7c7aa072e9 100644 --- a/src/lib/formats/dip_dsk.c +++ b/src/lib/formats/dip_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************* formats/dip_dsk.h diff --git a/src/lib/formats/dip_dsk.h b/src/lib/formats/dip_dsk.h index cf5dab24101..e2ca876dff0 100644 --- a/src/lib/formats/dip_dsk.h +++ b/src/lib/formats/dip_dsk.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************* formats/dip_dsk.h diff --git a/src/lib/formats/dsk_dsk.c b/src/lib/formats/dsk_dsk.c index 88ec2917ed8..6922071de25 100644 --- a/src/lib/formats/dsk_dsk.c +++ b/src/lib/formats/dsk_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/dsk_dsk.c diff --git a/src/lib/formats/dsk_dsk.h b/src/lib/formats/dsk_dsk.h index 9ca89c04685..d92784f78e8 100644 --- a/src/lib/formats/dsk_dsk.h +++ b/src/lib/formats/dsk_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/dsk_dsk.h diff --git a/src/lib/formats/esq16_dsk.c b/src/lib/formats/esq16_dsk.c index 5e3fe626656..bf676f18460 100644 --- a/src/lib/formats/esq16_dsk.c +++ b/src/lib/formats/esq16_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/esq16_dsk.c diff --git a/src/lib/formats/esq16_dsk.h b/src/lib/formats/esq16_dsk.h index 5c2e78095df..57088110cf5 100644 --- a/src/lib/formats/esq16_dsk.h +++ b/src/lib/formats/esq16_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/esq16_dsk.h diff --git a/src/lib/formats/esq8_dsk.c b/src/lib/formats/esq8_dsk.c index 9d4b047acd6..d95c6119636 100644 --- a/src/lib/formats/esq8_dsk.c +++ b/src/lib/formats/esq8_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/esq8_dsk.c diff --git a/src/lib/formats/esq8_dsk.h b/src/lib/formats/esq8_dsk.h index 0d6d823e66c..f2f19419016 100644 --- a/src/lib/formats/esq8_dsk.h +++ b/src/lib/formats/esq8_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/esq8_dsk.h diff --git a/src/lib/formats/fdd_dsk.c b/src/lib/formats/fdd_dsk.c index 10d9958ca59..2c564e3e306 100644 --- a/src/lib/formats/fdd_dsk.c +++ b/src/lib/formats/fdd_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************* formats/fdd_dsk.h diff --git a/src/lib/formats/fdd_dsk.h b/src/lib/formats/fdd_dsk.h index d7570f89320..9e43479565e 100644 --- a/src/lib/formats/fdd_dsk.h +++ b/src/lib/formats/fdd_dsk.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************* formats/fdd_dsk.h diff --git a/src/lib/formats/fdi_dsk.c b/src/lib/formats/fdi_dsk.c index 15de54005f4..05d3d7807b7 100644 --- a/src/lib/formats/fdi_dsk.c +++ b/src/lib/formats/fdi_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder /********************************************************************* formats/fdi_dsk.h diff --git a/src/lib/formats/flex_dsk.c b/src/lib/formats/flex_dsk.c index 03a288e9efd..e8e24e1dd53 100644 --- a/src/lib/formats/flex_dsk.c +++ b/src/lib/formats/flex_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * flex_dsk.c - FLEX compatible disk images * diff --git a/src/lib/formats/flex_dsk.h b/src/lib/formats/flex_dsk.h index 7d680002b05..95a03a78f15 100644 --- a/src/lib/formats/flex_dsk.h +++ b/src/lib/formats/flex_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * flex_dsk.h * diff --git a/src/lib/formats/fm7_cas.c b/src/lib/formats/fm7_cas.c index b1a605ea55a..b1ce8f397b4 100644 --- a/src/lib/formats/fm7_cas.c +++ b/src/lib/formats/fm7_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Fujitsu FM-7 series cassette handling */ diff --git a/src/lib/formats/fm7_cas.h b/src/lib/formats/fm7_cas.h index e8ca98933ae..6c528f71882 100644 --- a/src/lib/formats/fm7_cas.h +++ b/src/lib/formats/fm7_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Fujitsu FM-7 cassette format handling */ diff --git a/src/lib/formats/fmsx_cas.c b/src/lib/formats/fmsx_cas.c index 32bf6e62d6e..10a26d2e232 100644 --- a/src/lib/formats/fmsx_cas.c +++ b/src/lib/formats/fmsx_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Sean Young #include <assert.h> #include "formats/fmsx_cas.h" diff --git a/src/lib/formats/fmsx_cas.h b/src/lib/formats/fmsx_cas.h index d9998345367..3dc53b1dce4 100644 --- a/src/lib/formats/fmsx_cas.h +++ b/src/lib/formats/fmsx_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Sean Young /********************************************************************* fmsx_cas.h diff --git a/src/lib/formats/fmtowns_dsk.c b/src/lib/formats/fmtowns_dsk.c index 32409019cc3..633b53fcd87 100644 --- a/src/lib/formats/fmtowns_dsk.c +++ b/src/lib/formats/fmtowns_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * fmtowns_dsk.c * diff --git a/src/lib/formats/fmtowns_dsk.h b/src/lib/formats/fmtowns_dsk.h index c6361fe2316..ae11ef78961 100644 --- a/src/lib/formats/fmtowns_dsk.h +++ b/src/lib/formats/fmtowns_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * fmtowns_dsk.h * diff --git a/src/lib/formats/gtp_cas.c b/src/lib/formats/gtp_cas.c index 9cb28dabe76..1711a0a76b5 100644 --- a/src/lib/formats/gtp_cas.c +++ b/src/lib/formats/gtp_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /* Tape support for Glaksija GTP format diff --git a/src/lib/formats/gtp_cas.h b/src/lib/formats/gtp_cas.h index b78b68deaba..aba3031dbec 100644 --- a/src/lib/formats/gtp_cas.h +++ b/src/lib/formats/gtp_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /* gtp_cas.h diff --git a/src/lib/formats/hect_dsk.c b/src/lib/formats/hect_dsk.c index 5ae102ad5d1..4e8794131f8 100644 --- a/src/lib/formats/hect_dsk.c +++ b/src/lib/formats/hect_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:JJ Stacino /********************************************************************* formats/hect_dsk.c diff --git a/src/lib/formats/hect_dsk.h b/src/lib/formats/hect_dsk.h index c334ed60d27..7ff95f76edc 100644 --- a/src/lib/formats/hect_dsk.h +++ b/src/lib/formats/hect_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:JJ Stacino /********************************************************************* formats/hect_dsk.h diff --git a/src/lib/formats/hect_tap.c b/src/lib/formats/hect_tap.c index 26ad7f7b607..b9365d35f05 100644 --- a/src/lib/formats/hect_tap.c +++ b/src/lib/formats/hect_tap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:JJ Stacino /******************************************************************** Support for Micronique machine .K7 and *.FOR cassette images diff --git a/src/lib/formats/hect_tap.h b/src/lib/formats/hect_tap.h index 1abaabab23b..67e0a0b2bd1 100644 --- a/src/lib/formats/hect_tap.h +++ b/src/lib/formats/hect_tap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:JJ Stacino /********************************************************************* hect_tap.h diff --git a/src/lib/formats/ioprocs.c b/src/lib/formats/ioprocs.c index 04daf16b1c6..284da9851d2 100644 --- a/src/lib/formats/ioprocs.c +++ b/src/lib/formats/ioprocs.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods #include <stdio.h> #include <string.h> #include <assert.h> diff --git a/src/lib/formats/ioprocs.h b/src/lib/formats/ioprocs.h index c8cd45226a0..824e0d38129 100644 --- a/src/lib/formats/ioprocs.h +++ b/src/lib/formats/ioprocs.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods /********************************************************************* ioprocs.h diff --git a/src/lib/formats/iq151_dsk.h b/src/lib/formats/iq151_dsk.h index 699c84482f6..9f2b69d7617 100644 --- a/src/lib/formats/iq151_dsk.h +++ b/src/lib/formats/iq151_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/iq151_dsk.h diff --git a/src/lib/formats/itt3030_dsk.h b/src/lib/formats/itt3030_dsk.h index 8d35a842f4e..a43c9c1cd20 100644 --- a/src/lib/formats/itt3030_dsk.h +++ b/src/lib/formats/itt3030_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/itt3030_dsk.h diff --git a/src/lib/formats/kaypro_dsk.h b/src/lib/formats/kaypro_dsk.h index f633a779c88..589d16fc150 100644 --- a/src/lib/formats/kaypro_dsk.h +++ b/src/lib/formats/kaypro_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert, Robbbert /********************************************************************* formats/kaypro_dsk.h diff --git a/src/lib/formats/kc85_dsk.h b/src/lib/formats/kc85_dsk.h index ab582a4f71d..f13ba7f6a0d 100644 --- a/src/lib/formats/kc85_dsk.h +++ b/src/lib/formats/kc85_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/kc85_dsk.h diff --git a/src/lib/formats/kim1_cas.c b/src/lib/formats/kim1_cas.c index b10a9980b34..b8527e10462 100644 --- a/src/lib/formats/kim1_cas.c +++ b/src/lib/formats/kim1_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol #include <assert.h> #include "kim1_cas.h" diff --git a/src/lib/formats/kim1_cas.h b/src/lib/formats/kim1_cas.h index 5cde2a30baf..f8d4f0e0c83 100644 --- a/src/lib/formats/kim1_cas.h +++ b/src/lib/formats/kim1_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /********************************************************************* kim1_cas.h diff --git a/src/lib/formats/lviv_lvt.c b/src/lib/formats/lviv_lvt.c index c381da94c1c..b78e931e2a1 100644 --- a/src/lib/formats/lviv_lvt.c +++ b/src/lib/formats/lviv_lvt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Krzysztof Strzecha /* .LVT tape images */ #include <assert.h> diff --git a/src/lib/formats/lviv_lvt.h b/src/lib/formats/lviv_lvt.h index 19663b893a1..78b7a885713 100644 --- a/src/lib/formats/lviv_lvt.h +++ b/src/lib/formats/lviv_lvt.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Krzysztof Strzecha /********************************************************************* lviv_lvt.h diff --git a/src/lib/formats/m20_dsk.c b/src/lib/formats/m20_dsk.c index 33fa283a63d..8dbb403143b 100644 --- a/src/lib/formats/m20_dsk.c +++ b/src/lib/formats/m20_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/m20_dsk.c @@ -172,8 +172,6 @@ LEGACY_FLOPPY_OPTIONS_START( m20 ) LEGACY_FLOPPY_OPTIONS_END -// license:BSD-3-Clause -// copyright-holders:Olivier Galibert /********************************************************************* formats/m20_dsk.c diff --git a/src/lib/formats/m20_dsk.h b/src/lib/formats/m20_dsk.h index 39f7c1ce3d7..f4b23017953 100644 --- a/src/lib/formats/m20_dsk.h +++ b/src/lib/formats/m20_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/m20_dsk.c diff --git a/src/lib/formats/m5_dsk.h b/src/lib/formats/m5_dsk.h index 65378e6405d..15b806b6035 100644 --- a/src/lib/formats/m5_dsk.h +++ b/src/lib/formats/m5_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/m5_dsk.h diff --git a/src/lib/formats/mm_dsk.h b/src/lib/formats/mm_dsk.h index 52a436254d8..ad72b23d4e9 100644 --- a/src/lib/formats/mm_dsk.h +++ b/src/lib/formats/mm_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/mm_dsk.h diff --git a/src/lib/formats/msx_dsk.c b/src/lib/formats/msx_dsk.c index fbbcb2b0de0..815c6fa5e2e 100644 --- a/src/lib/formats/msx_dsk.c +++ b/src/lib/formats/msx_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/msx_dsk.c diff --git a/src/lib/formats/msx_dsk.h b/src/lib/formats/msx_dsk.h index c175f5ba80f..8e26ec93128 100644 --- a/src/lib/formats/msx_dsk.h +++ b/src/lib/formats/msx_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* msx_dsk.h diff --git a/src/lib/formats/mz_cas.c b/src/lib/formats/mz_cas.c index 6ea6022e6b9..9aa0ced3554 100644 --- a/src/lib/formats/mz_cas.c +++ b/src/lib/formats/mz_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods #include <string.h> #include <assert.h> #include "mz_cas.h" diff --git a/src/lib/formats/mz_cas.h b/src/lib/formats/mz_cas.h index 49080f8608b..f1010a111a9 100644 --- a/src/lib/formats/mz_cas.h +++ b/src/lib/formats/mz_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods /********************************************************************* mz_cas.h diff --git a/src/lib/formats/nanos_dsk.h b/src/lib/formats/nanos_dsk.h index 79db83dcc1d..97767aa9a59 100644 --- a/src/lib/formats/nanos_dsk.h +++ b/src/lib/formats/nanos_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/nanos_dsk.h diff --git a/src/lib/formats/nascom_dsk.c b/src/lib/formats/nascom_dsk.c new file mode 100644 index 00000000000..258de89c326 --- /dev/null +++ b/src/lib/formats/nascom_dsk.c @@ -0,0 +1,53 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom 1/2/3 + + Disk image format + +***************************************************************************/ + +#include "nascom_dsk.h" + +nascom_format::nascom_format() : wd177x_format(formats) +{ +} + +const char *nascom_format::name() const +{ + return "nascom"; +} + +const char *nascom_format::description() const +{ + return "Nascom disk image"; +} + +const char *nascom_format::extensions() const +{ + return "dsk"; +} + +const nascom_format::format nascom_format::formats[] = +{ + { // 320k 5 1/4 inch double density single sided (NASDOS) + floppy_image::FF_525, floppy_image::SSQD, floppy_image::MFM, + 2000, 16, 80, 1, 256, {}, 1, {}, 32, 22, 54 + }, + { // 640k 5 1/4 inch double density double sided (NASDOS) + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, 1, {}, 32, 22, 54 + }, + { // 385k 5 1/4 inch double density single sided (CP/M) + floppy_image::FF_525, floppy_image::SSQD, floppy_image::MFM, + 2000, 10, 77, 1, 512, {}, 1, {}, 32, 22, 32 + }, + { // 770k 5 1/4 inch double density double sided (CP/M) + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 10, 77, 2, 512, {}, 1, {}, 32, 22, 32 + }, + {} +}; + +const floppy_format_type FLOPPY_NASCOM_FORMAT = &floppy_image_format_creator<nascom_format>; diff --git a/src/lib/formats/nascom_dsk.h b/src/lib/formats/nascom_dsk.h new file mode 100644 index 00000000000..95b1e80e49e --- /dev/null +++ b/src/lib/formats/nascom_dsk.h @@ -0,0 +1,33 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom 1/2/3 + + Disk image format + +***************************************************************************/ + +#pragma once + +#ifndef __NASCOM_DSK_H__ +#define __NASCOM_DSK_H__ + +#include "wd177x_dsk.h" + +class nascom_format : public wd177x_format +{ +public: + nascom_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_NASCOM_FORMAT; + +#endif // __NASCOM_DSK_H__ diff --git a/src/lib/formats/nes_dsk.c b/src/lib/formats/nes_dsk.c index dd1f3cf74b9..5fc263a5f26 100644 --- a/src/lib/formats/nes_dsk.c +++ b/src/lib/formats/nes_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/nes_dsk.c diff --git a/src/lib/formats/nes_dsk.h b/src/lib/formats/nes_dsk.h index 4f3f1b51e2b..1e56614e673 100644 --- a/src/lib/formats/nes_dsk.h +++ b/src/lib/formats/nes_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/nes_dsk.h diff --git a/src/lib/formats/nfd_dsk.c b/src/lib/formats/nfd_dsk.c index 7702d3814a5..816498190a7 100644 --- a/src/lib/formats/nfd_dsk.c +++ b/src/lib/formats/nfd_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:etabeta +// copyright-holders:Fabio Priuli /********************************************************************* formats/nfd_dsk.h diff --git a/src/lib/formats/nfd_dsk.h b/src/lib/formats/nfd_dsk.h index ca7b25c7d9c..5bf460f9084 100644 --- a/src/lib/formats/nfd_dsk.h +++ b/src/lib/formats/nfd_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /********************************************************************* formats/nfd_dsk.h diff --git a/src/lib/formats/orao_cas.c b/src/lib/formats/orao_cas.c index 36df3d98422..9e88119d825 100644 --- a/src/lib/formats/orao_cas.c +++ b/src/lib/formats/orao_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Tape support for Orao TAP format diff --git a/src/lib/formats/orao_cas.h b/src/lib/formats/orao_cas.h index 187664ca870..588acd05f30 100644 --- a/src/lib/formats/orao_cas.h +++ b/src/lib/formats/orao_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* orao_cas.h diff --git a/src/lib/formats/oric_dsk.h b/src/lib/formats/oric_dsk.h index 77a1c162ad4..97bd6e35408 100644 --- a/src/lib/formats/oric_dsk.h +++ b/src/lib/formats/oric_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/oric_dsk.h diff --git a/src/lib/formats/oric_tap.c b/src/lib/formats/oric_tap.c index 1c5ca227b93..9dbf378db9b 100644 --- a/src/lib/formats/oric_tap.c +++ b/src/lib/formats/oric_tap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Kevin Thacker #include <assert.h> #include "oric_tap.h" diff --git a/src/lib/formats/oric_tap.h b/src/lib/formats/oric_tap.h index 793f84fb37c..d873495b220 100644 --- a/src/lib/formats/oric_tap.h +++ b/src/lib/formats/oric_tap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Kevin Thacker /********************************************************************* oric_tap.h diff --git a/src/lib/formats/p6001_cas.c b/src/lib/formats/p6001_cas.c index 724d3f23bb5..a0ce656e4eb 100644 --- a/src/lib/formats/p6001_cas.c +++ b/src/lib/formats/p6001_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* * NEC PC-6001 cassette format handling */ diff --git a/src/lib/formats/p6001_cas.h b/src/lib/formats/p6001_cas.h index a6365a4ed96..fc7ba0af860 100644 --- a/src/lib/formats/p6001_cas.h +++ b/src/lib/formats/p6001_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* * NEC PC-6001 cassette format handling */ diff --git a/src/lib/formats/pasti_dsk.c b/src/lib/formats/pasti_dsk.c index c0e8668cdab..656a50c86b0 100644 --- a/src/lib/formats/pasti_dsk.c +++ b/src/lib/formats/pasti_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" // logerror #include "pasti_dsk.h" diff --git a/src/lib/formats/pasti_dsk.h b/src/lib/formats/pasti_dsk.h index 46e7df42131..0d1165f48b4 100644 --- a/src/lib/formats/pasti_dsk.h +++ b/src/lib/formats/pasti_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef PASTI_DSK_H_ #define PASTI_DSK_H_ diff --git a/src/lib/formats/pc98_dsk.c b/src/lib/formats/pc98_dsk.c index b6a46bd2e23..3d85a4380dd 100644 --- a/src/lib/formats/pc98_dsk.c +++ b/src/lib/formats/pc98_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /********************************************************************* formats/pc98_dsk.c diff --git a/src/lib/formats/pc98_dsk.h b/src/lib/formats/pc98_dsk.h index 6694feaeb17..5655d187399 100644 --- a/src/lib/formats/pc98_dsk.h +++ b/src/lib/formats/pc98_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /********************************************************************* formats/pc98_dsk.h diff --git a/src/lib/formats/pc98fdi_dsk.h b/src/lib/formats/pc98fdi_dsk.h index cd69a60892d..c71c4c587fd 100644 --- a/src/lib/formats/pc98fdi_dsk.h +++ b/src/lib/formats/pc98fdi_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/pc98fdi_dsk.h diff --git a/src/lib/formats/pc_dsk.c b/src/lib/formats/pc_dsk.c index 2fccabaaef6..19e0f21e08e 100644 --- a/src/lib/formats/pc_dsk.c +++ b/src/lib/formats/pc_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods /********************************************************************* formats/pc_dsk.c diff --git a/src/lib/formats/pc_dsk.h b/src/lib/formats/pc_dsk.h index 7bf8e2b3779..f6e1fbc5637 100644 --- a/src/lib/formats/pc_dsk.h +++ b/src/lib/formats/pc_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods /********************************************************************* formats/pc_dsk.h diff --git a/src/lib/formats/primoptp.c b/src/lib/formats/primoptp.c index f2c53975049..fc02d0b6cd3 100644 --- a/src/lib/formats/primoptp.c +++ b/src/lib/formats/primoptp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Krzysztof Strzecha /* .PTP Microkey Primo tape images */ diff --git a/src/lib/formats/primoptp.h b/src/lib/formats/primoptp.h index e0788745998..006dd61a20c 100644 --- a/src/lib/formats/primoptp.h +++ b/src/lib/formats/primoptp.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Krzysztof Strzecha /********************************************************************* primoptp.h diff --git a/src/lib/formats/pyldin_dsk.h b/src/lib/formats/pyldin_dsk.h index 67e37e6144e..485a5c1e3fe 100644 --- a/src/lib/formats/pyldin_dsk.h +++ b/src/lib/formats/pyldin_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/pyldin_dsk.h diff --git a/src/lib/formats/rk_cas.c b/src/lib/formats/rk_cas.c index 9fba1803223..03139e1515d 100644 --- a/src/lib/formats/rk_cas.c +++ b/src/lib/formats/rk_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /* Tape support for RK format diff --git a/src/lib/formats/rk_cas.h b/src/lib/formats/rk_cas.h index 6878b40b666..c67b534033e 100644 --- a/src/lib/formats/rk_cas.h +++ b/src/lib/formats/rk_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /* rk_cas.h diff --git a/src/lib/formats/rx50_dsk.c b/src/lib/formats/rx50_dsk.c index 58e4cfc86a9..b612db5b4a7 100644 --- a/src/lib/formats/rx50_dsk.c +++ b/src/lib/formats/rx50_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Karl-Ludwig Deisenhofer /********************************************************************** formats/rx50_dsk.c diff --git a/src/lib/formats/rx50_dsk.h b/src/lib/formats/rx50_dsk.h index 4ac73575c2b..2fd09429c9a 100644 --- a/src/lib/formats/rx50_dsk.h +++ b/src/lib/formats/rx50_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Karl-Ludwig Deisenhofer /********************************************************************* formats/rx50_dsk.h diff --git a/src/lib/formats/sc3000_bit.c b/src/lib/formats/sc3000_bit.c index f06a7eae085..2b5fd635db5 100644 --- a/src/lib/formats/sc3000_bit.c +++ b/src/lib/formats/sc3000_bit.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder /********************************************************************* formats/sc3000_bit.c diff --git a/src/lib/formats/sc3000_bit.h b/src/lib/formats/sc3000_bit.h index b8de99bd2e0..aed4b0c08f3 100644 --- a/src/lib/formats/sc3000_bit.h +++ b/src/lib/formats/sc3000_bit.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Curt Coder /********************************************************************* formats/sc3000_bit.h diff --git a/src/lib/formats/smx_dsk.h b/src/lib/formats/smx_dsk.h index a989134e2c8..0b8aba5ac07 100644 --- a/src/lib/formats/smx_dsk.h +++ b/src/lib/formats/smx_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/smx_dsk.h diff --git a/src/lib/formats/sorc_dsk.c b/src/lib/formats/sorc_dsk.c index 426ea6884c0..5e59d30cdb1 100644 --- a/src/lib/formats/sorc_dsk.c +++ b/src/lib/formats/sorc_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Robbbert /********************************************************************* formats/sorc_dsk.c diff --git a/src/lib/formats/sorc_dsk.h b/src/lib/formats/sorc_dsk.h index 8ba6e1750ed..413497c07c3 100644 --- a/src/lib/formats/sorc_dsk.h +++ b/src/lib/formats/sorc_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Robbbert /********************************************************************* formats/sorc_dsk.h diff --git a/src/lib/formats/sord_cas.c b/src/lib/formats/sord_cas.c index 0e82254df09..eb8a27bdba4 100644 --- a/src/lib/formats/sord_cas.c +++ b/src/lib/formats/sord_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Tim Schuerewegen /************************************************************************** sord_cas.c diff --git a/src/lib/formats/sord_cas.h b/src/lib/formats/sord_cas.h index 4e55094e13f..6c9141a5065 100644 --- a/src/lib/formats/sord_cas.h +++ b/src/lib/formats/sord_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Tim Schuerewegen /********************************************************************* sord_cas.h diff --git a/src/lib/formats/st_dsk.h b/src/lib/formats/st_dsk.h index 21d85e04686..0888c980c72 100644 --- a/src/lib/formats/st_dsk.h +++ b/src/lib/formats/st_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/st_dsk.h diff --git a/src/lib/formats/svi_cas.c b/src/lib/formats/svi_cas.c index b0606b50c81..dd2bde8d5a1 100644 --- a/src/lib/formats/svi_cas.c +++ b/src/lib/formats/svi_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Sean Young #include <assert.h> #include "svi_cas.h" diff --git a/src/lib/formats/svi_cas.h b/src/lib/formats/svi_cas.h index a90272c5277..2c73b5cfee9 100644 --- a/src/lib/formats/svi_cas.h +++ b/src/lib/formats/svi_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Sean Young /********************************************************************* svi_cas.h diff --git a/src/lib/formats/svi_dsk.c b/src/lib/formats/svi_dsk.c index caf2b76f441..491169bec28 100644 --- a/src/lib/formats/svi_dsk.c +++ b/src/lib/formats/svi_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/svi_dsk.c diff --git a/src/lib/formats/svi_dsk.h b/src/lib/formats/svi_dsk.h index 23575853a46..3b88c496dcb 100644 --- a/src/lib/formats/svi_dsk.h +++ b/src/lib/formats/svi_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/svi_dsk.h diff --git a/src/lib/formats/thom_dsk.h b/src/lib/formats/thom_dsk.h index 2b05b69fbb2..439365243f5 100644 --- a/src/lib/formats/thom_dsk.h +++ b/src/lib/formats/thom_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic #ifndef THOM_DSK #define THOM_DSK diff --git a/src/lib/formats/ti99_dsk.h b/src/lib/formats/ti99_dsk.h index d5439c9c0be..28cae3e2edf 100644 --- a/src/lib/formats/ti99_dsk.h +++ b/src/lib/formats/ti99_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Michael Zapf /********************************************************************* formats/ti99_dsk.c diff --git a/src/lib/formats/trd_dsk.c b/src/lib/formats/trd_dsk.c index 61897e270ee..4766a3426e3 100644 --- a/src/lib/formats/trd_dsk.c +++ b/src/lib/formats/trd_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/trd_dsk.c diff --git a/src/lib/formats/trd_dsk.h b/src/lib/formats/trd_dsk.h index 5ad4765692d..1d830c6d6c5 100644 --- a/src/lib/formats/trd_dsk.h +++ b/src/lib/formats/trd_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/trd_dsk.h diff --git a/src/lib/formats/trs_cas.c b/src/lib/formats/trs_cas.c index 98710a2e8b5..b1c9857acf4 100644 --- a/src/lib/formats/trs_cas.c +++ b/src/lib/formats/trs_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wibert Pol /******************************************************************** Support for TRS80 .cas cassette images diff --git a/src/lib/formats/trs_cas.h b/src/lib/formats/trs_cas.h index 5d3fe9bcc6e..16b529cea04 100644 --- a/src/lib/formats/trs_cas.h +++ b/src/lib/formats/trs_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wibert Pol /********************************************************************* trs_cas.h diff --git a/src/lib/formats/trs_dsk.c b/src/lib/formats/trs_dsk.c index b7c0981bc02..2bb87173167 100644 --- a/src/lib/formats/trs_dsk.c +++ b/src/lib/formats/trs_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods #include <string.h> #include <assert.h> #include "trs_dsk.h" diff --git a/src/lib/formats/trs_dsk.h b/src/lib/formats/trs_dsk.h index 39205df94bc..a33cec6872b 100644 --- a/src/lib/formats/trs_dsk.h +++ b/src/lib/formats/trs_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nathan Woods /********************************************************************* formats/trs_dsk.h diff --git a/src/lib/formats/tvc_dsk.h b/src/lib/formats/tvc_dsk.h index 56cd3ea0490..f6796639d03 100644 --- a/src/lib/formats/tvc_dsk.h +++ b/src/lib/formats/tvc_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/tvc_dsk.h diff --git a/src/lib/formats/tzx_cas.c b/src/lib/formats/tzx_cas.c index 811156b3062..6037c200122 100644 --- a/src/lib/formats/tzx_cas.c +++ b/src/lib/formats/tzx_cas.c @@ -213,7 +213,7 @@ INLINE int millisec_to_samplecount( int millisec ) INLINE int tcycles_to_samplecount( int tcycles ) { - return (int) ((0.5 + (((double)TZX_WAV_FREQUENCY / 3500000) * (double)tcycles)) * t_scale); + return (int) ((0.5 + (((double)TZX_WAV_FREQUENCY / 3500000) * (double)tcycles)) * (double) t_scale); } static void tzx_output_wave( INT16 **buffer, int length ) diff --git a/src/lib/formats/uef_cas.c b/src/lib/formats/uef_cas.c index 35224f2b00c..f078ae776c4 100644 --- a/src/lib/formats/uef_cas.c +++ b/src/lib/formats/uef_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /* UEF format support (for electron driver) diff --git a/src/lib/formats/uef_cas.h b/src/lib/formats/uef_cas.h index b8e7fba83a4..34d95b02afe 100644 --- a/src/lib/formats/uef_cas.h +++ b/src/lib/formats/uef_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol /* uef_cas.h diff --git a/src/lib/formats/vt_cas.c b/src/lib/formats/vt_cas.c index 15adbaddbc6..d0910efcc84 100644 --- a/src/lib/formats/vt_cas.c +++ b/src/lib/formats/vt_cas.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller #include <assert.h> #include "formats/vt_cas.h" diff --git a/src/lib/formats/vt_cas.h b/src/lib/formats/vt_cas.h index 4f1408d87d2..5c3277244f5 100644 --- a/src/lib/formats/vt_cas.h +++ b/src/lib/formats/vt_cas.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller /********************************************************************* vt_cas.h diff --git a/src/lib/formats/vt_dsk.c b/src/lib/formats/vt_dsk.c index 26f810030b5..4e75e843d28 100644 --- a/src/lib/formats/vt_dsk.c +++ b/src/lib/formats/vt_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller /********************************************************************* formats/vt_dsk.c diff --git a/src/lib/formats/vt_dsk.h b/src/lib/formats/vt_dsk.h index 97f9b687c3b..7b5f1fe4098 100644 --- a/src/lib/formats/vt_dsk.h +++ b/src/lib/formats/vt_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller /********************************************************************* formats/vt_dsk.h diff --git a/src/lib/formats/vtech1_dsk.c b/src/lib/formats/vtech1_dsk.c index b50ac8a1092..c0771ea7227 100644 --- a/src/lib/formats/vtech1_dsk.c +++ b/src/lib/formats/vtech1_dsk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/vtech1_dsk.c diff --git a/src/lib/formats/vtech1_dsk.h b/src/lib/formats/vtech1_dsk.h index d9ccfa73479..338faf452e3 100644 --- a/src/lib/formats/vtech1_dsk.h +++ b/src/lib/formats/vtech1_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* formats/vtech1_dsk.h diff --git a/src/lib/formats/wd177x_dsk.c b/src/lib/formats/wd177x_dsk.c index 0816da1d295..da0ab9e7130 100644 --- a/src/lib/formats/wd177x_dsk.c +++ b/src/lib/formats/wd177x_dsk.c @@ -234,7 +234,7 @@ bool wd177x_format::save(io_generic *io, floppy_image *image) // Previously tested cell size int min_cell_size = 0; for(;;) { - // Build the list of all formats for the immediatly superior cell size + // Build the list of all formats for the immediately superior cell size int cur_cell_size = 0; candidates.clear(); for(int i=0; i != formats_count; i++) { @@ -288,13 +288,10 @@ bool wd177x_format::save(io_generic *io, floppy_image *image) else if(cc.head_count >= heads && cn.head_count < heads) goto dont_change; - // Since we're limited to two heads, at that point head - // count is identical for both formats. - // Handling enough tracks is better than not if(cn.track_count >= tracks && cc.track_count < tracks) goto change; - else if(cn.track_count >= tracks && cc.track_count < tracks) + else if(cc.track_count >= tracks && cn.track_count < tracks) goto dont_change; // Both are on the same side of the track count, so closest is best @@ -302,6 +299,11 @@ bool wd177x_format::save(io_generic *io, floppy_image *image) goto change; if(cc.track_count >= tracks && cn.track_count < cc.track_count) goto change; + + // Lower number of heads is better + if (cn.head_count < cc.head_count && cn.head_count <= heads) + goto change; + goto dont_change; change: diff --git a/src/lib/formats/wd177x_dsk.h b/src/lib/formats/wd177x_dsk.h index 657032b50c8..64846e95dcf 100644 --- a/src/lib/formats/wd177x_dsk.h +++ b/src/lib/formats/wd177x_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/wd177x_sk.h diff --git a/src/lib/formats/x1_tap.c b/src/lib/formats/x1_tap.c index 1b8f825dac3..5cf6f9fef94 100644 --- a/src/lib/formats/x1_tap.c +++ b/src/lib/formats/x1_tap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * * Sharp X1 TAP image format diff --git a/src/lib/formats/x1_tap.h b/src/lib/formats/x1_tap.h index 018eff56aa0..40f9298d7f7 100644 --- a/src/lib/formats/x1_tap.h +++ b/src/lib/formats/x1_tap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * * Sharp X1 TAP image format diff --git a/src/lib/formats/xdf_dsk.h b/src/lib/formats/xdf_dsk.h index 5d460db2285..628d998be87 100644 --- a/src/lib/formats/xdf_dsk.h +++ b/src/lib/formats/xdf_dsk.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /********************************************************************* formats/xdf_dsk.h diff --git a/src/lib/formats/z80ne_dsk.c b/src/lib/formats/z80ne_dsk.c index 384338e3ff2..1f82d844c88 100644 --- a/src/lib/formats/z80ne_dsk.c +++ b/src/lib/formats/z80ne_dsk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Roberto Lavarone /********************************************************************* formats/z80ne_dsk.c diff --git a/src/lib/formats/z80ne_dsk.h b/src/lib/formats/z80ne_dsk.h index 4294d75ec44..8740008e821 100644 --- a/src/lib/formats/z80ne_dsk.h +++ b/src/lib/formats/z80ne_dsk.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Roberto Lavarone /********************************************************************* formats/z80ne_dsk.h diff --git a/src/lib/formats/zx81_p.c b/src/lib/formats/zx81_p.c index 760539cea0c..9a556f05ce5 100644 --- a/src/lib/formats/zx81_p.c +++ b/src/lib/formats/zx81_p.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert /***************************************************************************** Taken from nocash ZX81 docs by Martin Korth. diff --git a/src/lib/formats/zx81_p.h b/src/lib/formats/zx81_p.h index cb7276c7ac8..16a1b22724d 100644 --- a/src/lib/formats/zx81_p.h +++ b/src/lib/formats/zx81_p.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert /********************************************************************* zx81_p.h diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c index 62aa04c24a9..a94b27c1590 100644 --- a/src/lib/util/chdcd.c +++ b/src/lib/util/chdcd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /*************************************************************************** TOC parser for CHD compression frontend diff --git a/src/lib/util/chdcd.h b/src/lib/util/chdcd.h index fbb65e2faa8..be585aad87e 100644 --- a/src/lib/util/chdcd.h +++ b/src/lib/util/chdcd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /*************************************************************************** CDRDAO TOC parser for CHD compression frontend diff --git a/src/lib/util/corealloc.c b/src/lib/util/corealloc.c index af4ec856887..0f752aa1b7c 100644 --- a/src/lib/util/corealloc.c +++ b/src/lib/util/corealloc.c @@ -17,6 +17,7 @@ //************************************************************************** #define LOG_ALLOCS (0) +#define DEBUG_MISMATCHED_ALLOCS (0) // define this to initialize allocated memory to a fixed non-0 value #ifdef MAME_DEBUG @@ -95,6 +96,41 @@ bool memory_entry::s_tracking = false; memory_entry *memory_entry::s_hash[memory_entry::k_hash_prime] = { NULL }; memory_entry *memory_entry::s_freehead = NULL; +//************************************************************************** +// OPERATOR REPLACEMENTS +//************************************************************************** + +#ifndef NO_MEM_TRACKING + +// standard new/delete operators (try to avoid using) +void *operator new(std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, NULL, 0, false, true, false); } +void *operator new[](std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, NULL, 0, true, true, false); } +void operator delete(void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); } +void operator delete[](void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); } + +void* operator new(std::size_t size,const std::nothrow_t&) throw() { return malloc_file_line(size, NULL, 0, false, false, false); } +void* operator new[](std::size_t size, const std::nothrow_t&) throw() { return malloc_file_line(size, NULL, 0, true, false, false); } +void operator delete(void* ptr, const std::nothrow_t&) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); } +void operator delete[](void* ptr, const std::nothrow_t&) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); } + +#endif + +//************************************************************************** +// OPERATOR OVERLOADS - DEFINITIONS +//************************************************************************** + +// file/line new/delete operators +void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, false); } +void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, false); } +void operator delete(void *ptr, const char *file, int line) { if (ptr != NULL) free_file_line(ptr, file, line, false); } +void operator delete[](void *ptr, const char *file, int line) { if (ptr != NULL) free_file_line(ptr, file, line, true); } + +// file/line new/delete operators with zeroing +void *operator new(std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, true); } +void *operator new[](std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, true); } +void operator delete(void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != NULL) free_file_line(ptr, file, line, false); } +void operator delete[](void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != NULL) free_file_line(ptr, file, line, true); } + //************************************************************************** @@ -157,14 +193,18 @@ void free_file_line(void *memory, const char *file, int line, bool array) // warn about mismatched arrays if (!array && entry->m_array) { - fprintf(stderr, "Error: attempt to free array %p with global_free in %s(%d)!\n", memory, file, line); - osd_break_into_debugger("Error: attempt to free array with global_free"); + fprintf(stderr, "Warning: attempt to free array %p with global_free in %s(%d)!\n", memory, file, line); + if (DEBUG_MISMATCHED_ALLOCS) { + osd_break_into_debugger("Error: attempt to free array with global_free"); + } } if (array && !entry->m_array) { #ifndef __INTEL_COMPILER // todo: fix this properly, it appears some optimization the compiler applies breaks our logic here - fprintf(stderr, "Error: attempt to free single object %p with global_free_array in %s(%d)!\n", memory, file, line); - osd_break_into_debugger("Error: attempt to free single object with global_free_array"); + fprintf(stderr, "Warning: attempt to free single object %p with global_free_array in %s(%d)!\n", memory, file, line); + if (DEBUG_MISMATCHED_ALLOCS) { + osd_break_into_debugger("Error: attempt to free single object with global_free_array"); + } #endif } diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h index 5b002557769..eb97e643686 100644 --- a/src/lib/util/corealloc.h +++ b/src/lib/util/corealloc.h @@ -51,33 +51,23 @@ void dump_unfreed_mem(UINT64 start = 0); //************************************************************************** -// INLINE FUNCTIONS +// OPERATOR OVERLOADS - DECLARATIONS //************************************************************************** // zeromem_t is a dummy class used to tell new to zero memory after allocation class zeromem_t { }; -#ifndef NO_MEM_TRACKING - -// standard new/delete operators (try to avoid using) -ATTR_FORCE_INLINE inline void *operator new(std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, NULL, 0, false, true, false); } -ATTR_FORCE_INLINE inline void *operator new[](std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, NULL, 0, true, true, false); } -ATTR_FORCE_INLINE inline void operator delete(void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); } -ATTR_FORCE_INLINE inline void operator delete[](void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); } - -#endif - // file/line new/delete operators -ATTR_FORCE_INLINE inline void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, false); } -ATTR_FORCE_INLINE inline void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, false); } -ATTR_FORCE_INLINE inline void operator delete(void *ptr, const char *file, int line) { if (ptr != NULL) free_file_line(ptr, file, line, false); } -ATTR_FORCE_INLINE inline void operator delete[](void *ptr, const char *file, int line) { if (ptr != NULL) free_file_line(ptr, file, line, true); } +void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc); +void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc); +void operator delete(void *ptr, const char *file, int line); +void operator delete[](void *ptr, const char *file, int line); // file/line new/delete operators with zeroing -ATTR_FORCE_INLINE inline void *operator new(std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, true); } -ATTR_FORCE_INLINE inline void *operator new[](std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, true); } -ATTR_FORCE_INLINE inline void operator delete(void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != NULL) free_file_line(ptr, file, line, false); } -ATTR_FORCE_INLINE inline void operator delete[](void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != NULL) free_file_line(ptr, file, line, true); } +void *operator new(std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc); +void *operator new[](std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc); +void operator delete(void *ptr, const char *file, int line, const zeromem_t &); +void operator delete[](void *ptr, const char *file, int line, const zeromem_t &); diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c index 4ada0f36aae..823d37b8b55 100644 --- a/src/lib/util/corefile.c +++ b/src/lib/util/corefile.c @@ -877,6 +877,27 @@ int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) } +/*------------------------------------------------- + core_truncate - truncate a file +-------------------------------------------------*/ + +file_error core_truncate(core_file *f, UINT64 offset) +{ + file_error err; + + /* truncate file */ + err = osd_truncate(f->file, offset); + if (err != FILERR_NONE) + return err; + + /* and adjust to new length and offset */ + f->length = offset; + f->offset = MIN(f->offset, f->length); + + return FILERR_NONE; +} + + /*************************************************************************** FILENAME UTILITIES diff --git a/src/lib/util/corefile.h b/src/lib/util/corefile.h index 42dfd70aef8..eeb5a8efa22 100644 --- a/src/lib/util/corefile.h +++ b/src/lib/util/corefile.h @@ -117,6 +117,9 @@ int core_fputs(core_file *f, const char *s); int core_vfprintf(core_file *f, const char *fmt, va_list va); int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) ATTR_PRINTF(2,3); +/* file truncation */ +file_error core_truncate(core_file *f, UINT64 offset); + /* ----- filename utilities ----- */ diff --git a/src/lib/util/options.c b/src/lib/util/options.c index d229624017a..62c3cc0379a 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -642,7 +642,7 @@ bool core_options::set_value(const char *name, int value, int priority, std::str bool core_options::set_value(const char *name, float value, int priority, std::string &error_string) { std::string tempstr; - strprintf(tempstr, "%f", value); + strprintf(tempstr, "%f", (double) value); return set_value(name, tempstr.c_str(), priority, error_string); } @@ -780,7 +780,7 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch strcatprintf(error_string, "Illegal float value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); return false; } - if (curentry.has_range() && (fval < atof(curentry.minimum()) || fval > atof(curentry.maximum()))) + if (curentry.has_range() && ((double) fval < atof(curentry.minimum()) || (double) fval > atof(curentry.maximum()))) { strcatprintf(error_string, "Out-of-range float value for %s: \"%s\" (must be between %s and %s); reverting to %s\n", curentry.name(), data.c_str(), curentry.minimum(), curentry.maximum(), curentry.value()); return false; diff --git a/src/lib/util/sha1.c b/src/lib/util/sha1.c index fb9cc84b80c..b8de519c7bc 100644 --- a/src/lib/util/sha1.c +++ b/src/lib/util/sha1.c @@ -1,4 +1,4 @@ -// license:LGPL2.1 +// license:LGPL-2.1+ // copyright-holders:Peter Gutmann, Andrew Kuchling, Niels Moeller /* sha1.h * diff --git a/src/lib/util/sha1.h b/src/lib/util/sha1.h index bce05793e25..ba5866c5819 100644 --- a/src/lib/util/sha1.h +++ b/src/lib/util/sha1.h @@ -1,4 +1,4 @@ -// license:LGPL2.1 +// license:LGPL-2.1+ // copyright-holders:Peter Gutmann, Andrew Kuchling, Niels Moeller /* sha1.h * diff --git a/src/lib/util/xmlfile.c b/src/lib/util/xmlfile.c index 8635cfc427f..7956654a984 100644 --- a/src/lib/util/xmlfile.c +++ b/src/lib/util/xmlfile.c @@ -511,7 +511,7 @@ xml_attribute_node *xml_set_attribute_int(xml_data_node *node, const char *name, xml_attribute_node *xml_set_attribute_float(xml_data_node *node, const char *name, float value) { char buffer[100]; - sprintf(buffer, "%f", value); + sprintf(buffer, "%f", (double) value); return xml_set_attribute(node, name, buffer); } diff --git a/src/mame/audio/asteroid.c b/src/mame/audio/asteroid.c index ee9be14aeed..1e79f1950b9 100644 --- a/src/mame/audio/asteroid.c +++ b/src/mame/audio/asteroid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas /***************************************************************************** * * Asteroids Analog Sound system interface diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c index 2349a3fed86..f30484842c5 100644 --- a/src/mame/audio/aztarac.c +++ b/src/mame/audio/aztarac.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mathis Rosenhauer /*************************************************************************** Centuri Aztarac hardware diff --git a/src/mame/audio/beezer.c b/src/mame/audio/beezer.c index 567a01a7b18..d1bec0b06fb 100644 --- a/src/mame/audio/beezer.c +++ b/src/mame/audio/beezer.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /************************************************************************* diff --git a/src/mame/audio/blockade.c b/src/mame/audio/blockade.c index e2493279fbc..42a820c8f2c 100644 --- a/src/mame/audio/blockade.c +++ b/src/mame/audio/blockade.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo #include "emu.h" diff --git a/src/mame/audio/bwidow.c b/src/mame/audio/bwidow.c index 8de697b31a1..65a242557d0 100644 --- a/src/mame/audio/bwidow.c +++ b/src/mame/audio/bwidow.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas diff --git a/src/mame/audio/bzone.c b/src/mame/audio/bzone.c index d3d21abfb12..2f32fcda03d 100644 --- a/src/mame/audio/bzone.c +++ b/src/mame/audio/bzone.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Nicola Salmoria /* Battlezone sound info, courtesy of Al Kossow: diff --git a/src/mame/audio/carnival.c b/src/mame/audio/carnival.c index b527135594c..cbe22f9d833 100644 --- a/src/mame/audio/carnival.c +++ b/src/mame/audio/carnival.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mike Coates, Peter J.C.Clare /*****************************************************************************/ /* */ /* (C) Copyright Peter J.C.Clare */ diff --git a/src/mame/audio/cchasm.c b/src/mame/audio/cchasm.c index 8d0ae240ec1..f38bf1845d5 100644 --- a/src/mame/audio/cchasm.c +++ b/src/mame/audio/cchasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** @@ -14,7 +14,7 @@ #include "sound/dac.h" -WRITE8_MEMBER(cchasm_state::cchasm_reset_coin_flag_w) +WRITE8_MEMBER(cchasm_state::reset_coin_flag_w) { if (m_coin_flag) { @@ -23,7 +23,7 @@ WRITE8_MEMBER(cchasm_state::cchasm_reset_coin_flag_w) } } -INPUT_CHANGED_MEMBER(cchasm_state::cchasm_set_coin_flag ) +INPUT_CHANGED_MEMBER(cchasm_state::set_coin_flag ) { if (!newval && !m_coin_flag) { @@ -32,27 +32,27 @@ INPUT_CHANGED_MEMBER(cchasm_state::cchasm_set_coin_flag ) } } -READ8_MEMBER(cchasm_state::cchasm_coin_sound_r) +READ8_MEMBER(cchasm_state::coin_sound_r) { UINT8 coin = (ioport("IN3")->read() >> 4) & 0x7; return m_sound_flags | (m_coin_flag << 3) | coin; } -READ8_MEMBER(cchasm_state::cchasm_soundlatch2_r) +READ8_MEMBER(cchasm_state::soundlatch2_r) { m_sound_flags &= ~0x80; m_ctc->trg2(0); return soundlatch2_byte_r(space, offset); } -WRITE8_MEMBER(cchasm_state::cchasm_soundlatch4_w) +WRITE8_MEMBER(cchasm_state::soundlatch4_w) { m_sound_flags |= 0x40; soundlatch4_byte_w(space, offset, data); m_maincpu->set_input_line(1, HOLD_LINE); } -WRITE16_MEMBER(cchasm_state::cchasm_io_w) +WRITE16_MEMBER(cchasm_state::io_w) { //static int led; @@ -77,7 +77,7 @@ WRITE16_MEMBER(cchasm_state::cchasm_io_w) } } -READ16_MEMBER(cchasm_state::cchasm_io_r) +READ16_MEMBER(cchasm_state::io_r) { switch (offset & 0xf) { @@ -122,5 +122,11 @@ void cchasm_state::sound_start() { m_coin_flag = 0; m_sound_flags = 0; - m_output[0] = 0; m_output[1] = 0; + m_output[0] = 0; + m_output[1] = 0; + + save_item(NAME(m_sound_flags)); + save_item(NAME(m_coin_flag)); + save_item(NAME(m_channel_active)); + save_item(NAME(m_output)); } diff --git a/src/mame/audio/cclimber.c b/src/mame/audio/cclimber.c index 7205c5307ac..80108dddb91 100644 --- a/src/mame/audio/cclimber.c +++ b/src/mame/audio/cclimber.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "sound/ay8910.h" #include "audio/cclimber.h" diff --git a/src/mame/audio/circus.c b/src/mame/audio/circus.c index ae40513c6d9..0b9eac7a306 100644 --- a/src/mame/audio/circus.c +++ b/src/mame/audio/circus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates #include "emu.h" #include "sound/samples.h" diff --git a/src/mame/audio/cps3.h b/src/mame/audio/cps3.h index abb4428c4c1..b4228ca3d7c 100644 --- a/src/mame/audio/cps3.h +++ b/src/mame/audio/cps3.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Andreas Naive, Tomasz Slanina, ElSemi /*************************************************************************** Capcom CPS-3 Sound Hardware diff --git a/src/mame/audio/decobsmt.c b/src/mame/audio/decobsmt.c index 45b0ac7a0fc..c0b3aae1be8 100644 --- a/src/mame/audio/decobsmt.c +++ b/src/mame/audio/decobsmt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:R. Belmont /*************************************************************************** Data East Pinball BSMT2000 sound board diff --git a/src/mame/audio/decobsmt.h b/src/mame/audio/decobsmt.h index 3b3a4e52e3b..d89a343e28d 100644 --- a/src/mame/audio/decobsmt.h +++ b/src/mame/audio/decobsmt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:R. Belmont #pragma once #ifndef __DECOBSMT_H__ diff --git a/src/mame/audio/depthch.c b/src/mame/audio/depthch.c index 61c753e3edc..d08d208866f 100644 --- a/src/mame/audio/depthch.c +++ b/src/mame/audio/depthch.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /* * Depth Charge audio routines */ diff --git a/src/mame/audio/dragrace.c b/src/mame/audio/dragrace.c index 183f1c1811e..feb19dc00cd 100644 --- a/src/mame/audio/dragrace.c +++ b/src/mame/audio/dragrace.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* audio\dragrace.c diff --git a/src/mame/audio/dsbz80.c b/src/mame/audio/dsbz80.c index dff38bda980..dfc97fd6028 100644 --- a/src/mame/audio/dsbz80.c +++ b/src/mame/audio/dsbz80.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Olivier Galibert /*************************************************************************** Sega Z80 Digital Sound Board diff --git a/src/mame/audio/dsbz80.h b/src/mame/audio/dsbz80.h index fb5a487f235..b39438955a1 100644 --- a/src/mame/audio/dsbz80.h +++ b/src/mame/audio/dsbz80.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Olivier Galibert #pragma once #ifndef __DSBZ80_H__ diff --git a/src/mame/audio/firetrk.c b/src/mame/audio/firetrk.c index d64b539fbc9..cb84a9e065c 100644 --- a/src/mame/audio/firetrk.c +++ b/src/mame/audio/firetrk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /************************************************************************* audio\firetrk.c diff --git a/src/mame/audio/flower.c b/src/mame/audio/flower.c index 3ab2923a284..785051faa64 100644 --- a/src/mame/audio/flower.c +++ b/src/mame/audio/flower.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// 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/galaxian.h b/src/mame/audio/galaxian.h index 6a6f8f25252..ea7d570ab10 100644 --- a/src/mame/audio/galaxian.h +++ b/src/mame/audio/galaxian.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles #include "sound/discrete.h" #define GAL_AUDIO "discrete" diff --git a/src/mame/audio/gomoku.c b/src/mame/audio/gomoku.c index fd00aefbafe..e4253038649 100644 --- a/src/mame/audio/gomoku.c +++ b/src/mame/audio/gomoku.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/audio/gorf.c b/src/mame/audio/gorf.c index 23a082cc8bb..0114cb5afb3 100644 --- a/src/mame/audio/gorf.c +++ b/src/mame/audio/gorf.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mike Coates /************************************************************************** Gorf/Votrax SC-01 Emulator diff --git a/src/mame/audio/hyprolyb.c b/src/mame/audio/hyprolyb.c index 5c01b10f000..18bc9ea5bdc 100644 --- a/src/mame/audio/hyprolyb.c +++ b/src/mame/audio/hyprolyb.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy #include "emu.h" #include "cpu/m6800/m6800.h" #include "audio/hyprolyb.h" diff --git a/src/mame/audio/hyprolyb.h b/src/mame/audio/hyprolyb.h index 2a8c66e1777..88ecbd9ccde 100644 --- a/src/mame/audio/hyprolyb.h +++ b/src/mame/audio/hyprolyb.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy #include "sound/msm5205.h" class hyprolyb_adpcm_device : public device_t, diff --git a/src/mame/audio/invinco.c b/src/mame/audio/invinco.c index 0998ecc9054..81f3e7b8012 100644 --- a/src/mame/audio/invinco.c +++ b/src/mame/audio/invinco.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /* * Invinco sound routines */ diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index be7380cb695..3e0b8117f3f 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Couriersud /*************************************************************************** Irem M52/M62 sound hardware diff --git a/src/mame/audio/irem.h b/src/mame/audio/irem.h index 625b32ab049..a5d578dbfc9 100644 --- a/src/mame/audio/irem.h +++ b/src/mame/audio/irem.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Couriersud #include "sound/ay8910.h" #include "sound/msm5205.h" diff --git a/src/mame/audio/llander.c b/src/mame/audio/llander.c index 432ab873a2e..c21b670b970 100644 --- a/src/mame/audio/llander.c +++ b/src/mame/audio/llander.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Keith Wilkins /*************************************************************************** Lunar Lander Specific Sound Code diff --git a/src/mame/audio/m72.h b/src/mame/audio/m72.h index 0fc019e64cf..ab975347fa5 100644 --- a/src/mame/audio/m72.h +++ b/src/mame/audio/m72.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** M72 audio interface diff --git a/src/mame/audio/m79amb.c b/src/mame/audio/m79amb.c index c6cd061866e..abcffa6e66c 100644 --- a/src/mame/audio/m79amb.c +++ b/src/mame/audio/m79amb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Al Kossow /************************************************************************ * m79amb Sound System Analog emulation * Nov 2008, Derrick Renaud diff --git a/src/mame/audio/micro3d.c b/src/mame/audio/micro3d.c index 8c218fb7a5d..eff49247cfa 100644 --- a/src/mame/audio/micro3d.c +++ b/src/mame/audio/micro3d.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Microprose sound hardware @@ -147,7 +147,7 @@ void micro3d_sound_device::noise_sh_w(UINT8 data) if (m_vca == 255) m_gain = 0; else - m_gain = exp(-(float)(m_vca) / 25.0) * 10.0; + m_gain = expf(-(float)(m_vca) / 25.0f) * 10.0f; q = 0.75/255 * (255 - m_vcq) + 0.1; fc = 4500.0/255 * (255 - m_vcf) + 100; @@ -241,8 +241,8 @@ void micro3d_sound_device::sound_stream_update(sound_stream &stream, stream_samp if (m_gain == 0) return; - pan_l = (float)(255 - m_pan) / 255.0; - pan_r = (float)(m_pan) / 255.0; + pan_l = (float)(255 - m_pan) / 255.0f; + pan_r = (float)(m_pan) / 255.0f; while (samples--) { @@ -260,7 +260,7 @@ void micro3d_sound_device::sound_stream_update(sound_stream &stream, stream_samp m_noise_subcount = 2000000 / MM5837_CLOCK; } m_noise_subcount -= step; - input = (float)m_noise_value - 0.5; + input = (float)m_noise_value - 0.5f; white = input; /* Pink noise filtering */ @@ -296,7 +296,7 @@ void micro3d_sound_device::sound_stream_update(sound_stream &stream, stream_samp hist1_ptr++; hist2_ptr++; } - output *= 3.5; + output *= 3.5f; /* Clip */ if (output > 32767) diff --git a/src/mame/audio/n8080.c b/src/mame/audio/n8080.c index 4ffeaeb0d95..9447c885b22 100644 --- a/src/mame/audio/n8080.c +++ b/src/mame/audio/n8080.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli /*************************************************************************** Nintendo 8080 sound emulation diff --git a/src/mame/audio/orbit.c b/src/mame/audio/orbit.c index fefb9cb83da..da64fe2cb10 100644 --- a/src/mame/audio/orbit.c +++ b/src/mame/audio/orbit.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /************************************************************************* audio\orbit.c diff --git a/src/mame/audio/pleiads.h b/src/mame/audio/pleiads.h index a1ddb679e4f..0c116bd1b26 100644 --- a/src/mame/audio/pleiads.h +++ b/src/mame/audio/pleiads.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller #include "sound/tms36xx.h" struct pl_t_state diff --git a/src/mame/audio/poolshrk.c b/src/mame/audio/poolshrk.c index d60663bdd0d..4107a585b24 100644 --- a/src/mame/audio/poolshrk.c +++ b/src/mame/audio/poolshrk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* audio\poolshrk.c diff --git a/src/mame/audio/pulsar.c b/src/mame/audio/pulsar.c index 492a7eefe77..343879e4f7f 100644 --- a/src/mame/audio/pulsar.c +++ b/src/mame/audio/pulsar.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /* * Pulsar sound routines * diff --git a/src/mame/audio/redbaron.c b/src/mame/audio/redbaron.c index 6387e80a44d..b9ada2027de 100644 --- a/src/mame/audio/redbaron.c +++ b/src/mame/audio/redbaron.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Nicola Salmoria /************************************************************************* Atari Red Baron sound hardware diff --git a/src/mame/audio/redbaron.h b/src/mame/audio/redbaron.h index 9ce9d8ee3b2..0bd5243cff8 100644 --- a/src/mame/audio/redbaron.h +++ b/src/mame/audio/redbaron.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Nicola Salmoria //************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/mame/audio/s11c_bg.c b/src/mame/audio/s11c_bg.c index b340fb1783e..bc5a10566d0 100644 --- a/src/mame/audio/s11c_bg.c +++ b/src/mame/audio/s11c_bg.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * s11c_bg.c - Williams System 11C background music (M68B09E + YM2151 + HC55516 + DAC) * diff --git a/src/mame/audio/s11c_bg.h b/src/mame/audio/s11c_bg.h index f0a1ced41d5..4d36f471c3f 100644 --- a/src/mame/audio/s11c_bg.h +++ b/src/mame/audio/s11c_bg.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * s11c_bg.h - Williams System 11C background sound (M68B09E + YM2151 + HC55516 + DAC) * diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c index b7e870a36d8..cd9b499a77d 100644 --- a/src/mame/audio/scramble.c +++ b/src/mame/audio/scramble.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** This file contains functions to emulate the sound hardware found on diff --git a/src/mame/audio/segam1audio.c b/src/mame/audio/segam1audio.c index 64631b29d59..3e5a37120a3 100644 --- a/src/mame/audio/segam1audio.c +++ b/src/mame/audio/segam1audio.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /*************************************************************************** Sega Model 1 sound board (68000 + 2x 315-5560 "MultiPCM") diff --git a/src/mame/audio/segam1audio.h b/src/mame/audio/segam1audio.h index c32c4b6c1dd..9abb8f3d273 100644 --- a/src/mame/audio/segam1audio.h +++ b/src/mame/audio/segam1audio.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #pragma once #ifndef __SEGAM1AUDIO_H__ diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h index eb0660d7418..a92ab8a5855 100644 --- a/src/mame/audio/seibu.h +++ b/src/mame/audio/seibu.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Seibu Sound System v1.02, games using this include: diff --git a/src/mame/audio/skyraid.c b/src/mame/audio/skyraid.c index 73832d39a28..2545b5a8056 100644 --- a/src/mame/audio/skyraid.c +++ b/src/mame/audio/skyraid.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /************************************************************************ * skyraid Sound System Analog emulation * Sept 2009, Derrick Renaud diff --git a/src/mame/audio/snes_snd.c b/src/mame/audio/snes_snd.c index 4bb2ac84faa..02a73c798e7 100644 --- a/src/mame/audio/snes_snd.c +++ b/src/mame/audio/snes_snd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:R. Belmont, Brad Martin /*************************************************************************** snes_snd.c diff --git a/src/mame/audio/snes_snd.h b/src/mame/audio/snes_snd.h index bfd3e7410f8..35ca43588b8 100644 --- a/src/mame/audio/snes_snd.h +++ b/src/mame/audio/snes_snd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:R. Belmont, Brad Martin /***************************************************************************** * * audio/snes_spc.h diff --git a/src/mame/audio/snk6502.c b/src/mame/audio/snk6502.c index bf305a217c0..bbbc98e9789 100644 --- a/src/mame/audio/snk6502.c +++ b/src/mame/audio/snk6502.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Dan Boris /* from Andrew Scott (ascott@utkux.utcc.utk.edu) */ /* @@ -148,15 +148,6 @@ snk6502_sound_device::snk6502_sound_device(const machine_config &mconfig, const { } -//------------------------------------------------- -// device_config_complete - perform any -// operations now that the configuration is -// complete -//------------------------------------------------- - -void snk6502_sound_device::device_config_complete() -{ -} //------------------------------------------------- // device_start - device-specific startup @@ -173,12 +164,29 @@ void snk6502_sound_device::device_start() set_music_clock(M_LN2 * (RES_K(18) * 2 + RES_K(1)) * CAP_U(1)); m_tone_stream = machine().sound().stream_alloc(*this, 0, 1, SAMPLE_RATE); + + for (int i = 0; i < CHANNELS; i++) + { + save_item(NAME(m_tone_channels[i].mute), i); + save_item(NAME(m_tone_channels[i].offset), i); + save_item(NAME(m_tone_channels[i].base), i); + save_item(NAME(m_tone_channels[i].mask), i); + save_item(NAME(m_tone_channels[i].sample_step), i); + save_item(NAME(m_tone_channels[i].sample_cur), i); + save_item(NAME(m_tone_channels[i].form), i); + } + + save_item(NAME(m_tone_clock)); + save_item(NAME(m_Sound0StopOnRollover)); + save_item(NAME(m_LastPort1)); + save_item(NAME(m_hd38880_cmd)); + save_item(NAME(m_hd38880_addr)); + save_item(NAME(m_hd38880_data_bytes)); + save_item(NAME(m_hd38880_speed)); } inline void snk6502_sound_device::validate_tone_channel(int channel) { - //TONE *tone_channels = m_tone_channels; - if (!m_tone_channels[channel].mute) { UINT8 romdata = m_ROM[m_tone_channels[channel].base + m_tone_channels[channel].offset]; @@ -704,7 +712,7 @@ WRITE8_MEMBER( snk6502_sound_device::fantasy_sound_w ) m_tone_channels[2].base = 0x1000 + ((data & 0x70) << 4); m_tone_channels[2].mask = 0xff; snk6502_state *drvstate = space.machine().driver_data<snk6502_state>(); - drvstate->snk6502_flipscreen_w(space, 0, data); + drvstate->flipscreen_w(space, 0, data); break; } } diff --git a/src/mame/audio/sprint4.c b/src/mame/audio/sprint4.c index 45da34ff8c5..7d4a0e93d3e 100644 --- a/src/mame/audio/sprint4.c +++ b/src/mame/audio/sprint4.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* audio\sprint4.c diff --git a/src/mame/audio/sprint4.h b/src/mame/audio/sprint4.h index afc3b92ad71..4443e7a1287 100644 --- a/src/mame/audio/sprint4.h +++ b/src/mame/audio/sprint4.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Sprint 4 + Ultra Tank Audio diff --git a/src/mame/audio/sprint8.c b/src/mame/audio/sprint8.c index 0f09a65d2c1..3dad6bb9cac 100644 --- a/src/mame/audio/sprint8.c +++ b/src/mame/audio/sprint8.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************ * sprint8 Sound System Analog emulation * Sept 2009, Derrick Renaud diff --git a/src/mame/audio/starshp1.c b/src/mame/audio/starshp1.c index ad301d0b038..adf3b90622c 100644 --- a/src/mame/audio/starshp1.c +++ b/src/mame/audio/starshp1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Frank Palazzolo, Stefan Jokish /************************************************************************ * starshp1 Sound System Analog emulation * Aug 2008, Derrick Renaud diff --git a/src/mame/audio/starwars.c b/src/mame/audio/starwars.c index 5493ecd8a16..c5cbb6b9939 100644 --- a/src/mame/audio/starwars.c +++ b/src/mame/audio/starwars.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/audio/t5182.c b/src/mame/audio/t5182.c index 9954ac0024f..e5c84cc6c68 100644 --- a/src/mame/audio/t5182.c +++ b/src/mame/audio/t5182.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jonathan Gevaryahu /*************************************************************************** Toshiba T5182 die map, by Jonathan Gevaryahu AKA Lord Nightmare, diff --git a/src/mame/audio/t5182.h b/src/mame/audio/t5182.h index 7bc817c1bc3..38464470b42 100644 --- a/src/mame/audio/t5182.h +++ b/src/mame/audio/t5182.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jonathan Gevaryahu #include "sound/2151intf.h" #include "cpu/z80/z80.h" diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c index 162e2326a2f..da58dd9186d 100644 --- a/src/mame/audio/taito_en.c +++ b/src/mame/audio/taito_en.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Graves /*************************************************************************** Taito Ensoniq ES5505-based sound hardware diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h index a5598e96f62..6d1838f550a 100644 --- a/src/mame/audio/taito_en.h +++ b/src/mame/audio/taito_en.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Graves /*************************************************************************** Taito Ensoniq ES5505-based sound hardware diff --git a/src/mame/audio/taitosnd.c b/src/mame/audio/taitosnd.c index 717cd1f75d6..9c6b1a8e88f 100644 --- a/src/mame/audio/taitosnd.c +++ b/src/mame/audio/taitosnd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Phil Bennett /********************************************************************************************** Taito TC0140SYT diff --git a/src/mame/audio/taitosnd.h b/src/mame/audio/taitosnd.h index 7c1792f5110..0c798d03b6f 100644 --- a/src/mame/audio/taitosnd.h +++ b/src/mame/audio/taitosnd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Phil Bennett #ifndef __TAITOSND_H__ #define __TAITOSND_H__ diff --git a/src/mame/audio/tank8.c b/src/mame/audio/tank8.c index f79f6a8a89b..f9b27fbad2a 100644 --- a/src/mame/audio/tank8.c +++ b/src/mame/audio/tank8.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* audio\tank8.c diff --git a/src/mame/audio/targ.c b/src/mame/audio/targ.c index 536bb65b936..3ebfe9b2708 100644 --- a/src/mame/audio/targ.c +++ b/src/mame/audio/targ.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /************************************************************************* Targ hardware diff --git a/src/mame/audio/timeplt.h b/src/mame/audio/timeplt.h index 6c82d9b606d..fcbe30fcce4 100644 --- a/src/mame/audio/timeplt.h +++ b/src/mame/audio/timeplt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/flt_rc.h" diff --git a/src/mame/audio/trackfld.c b/src/mame/audio/trackfld.c index 026c3743b46..0ad6853f5bf 100644 --- a/src/mame/audio/trackfld.c +++ b/src/mame/audio/trackfld.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy #include "emu.h" #include "sound/sn76496.h" #include "sound/msm5205.h" diff --git a/src/mame/audio/trackfld.h b/src/mame/audio/trackfld.h index 370bb32caa8..4b7260e48b7 100644 --- a/src/mame/audio/trackfld.h +++ b/src/mame/audio/trackfld.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy #include "sound/vlm5030.h" #include "cpu/m6800/m6800.h" diff --git a/src/mame/audio/triplhnt.c b/src/mame/audio/triplhnt.c index 5f0c92dec23..5847f3483d2 100644 --- a/src/mame/audio/triplhnt.c +++ b/src/mame/audio/triplhnt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /************************************************************************* audio\triplhnt.c diff --git a/src/mame/audio/turrett.c b/src/mame/audio/turrett.c index b7259d9daad..29b07dbb4c8 100644 --- a/src/mame/audio/turrett.c +++ b/src/mame/audio/turrett.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Turret Tower sound hardware diff --git a/src/mame/audio/tx1.c b/src/mame/audio/tx1.c index 26226c534d3..8fc0c5085a9 100644 --- a/src/mame/audio/tx1.c +++ b/src/mame/audio/tx1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Tatsumi TX-1/Buggy Boy sound hardware diff --git a/src/mame/audio/vicdual.c b/src/mame/audio/vicdual.c index f3f5a3b7055..48bc54b4b7a 100644 --- a/src/mame/audio/vicdual.c +++ b/src/mame/audio/vicdual.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /************************************************************************* VIC Dual Game board diff --git a/src/mame/audio/videopin.c b/src/mame/audio/videopin.c index 8e5d0622564..b7e2fa0ccfe 100644 --- a/src/mame/audio/videopin.c +++ b/src/mame/audio/videopin.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sebastien Monassa /************************************************************************* diff --git a/src/mame/audio/warpwarp.h b/src/mame/audio/warpwarp.h index a87f4a3c48b..490649a0da5 100644 --- a/src/mame/audio/warpwarp.h +++ b/src/mame/audio/warpwarp.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Allard van der Bas class geebee_sound_device : public device_t, public device_sound_interface { diff --git a/src/mame/audio/wiping.h b/src/mame/audio/wiping.h index ca23a82ea01..3b8313a0ccd 100644 --- a/src/mame/audio/wiping.h +++ b/src/mame/audio/wiping.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Allard van der Bas /* 8 voices max */ #define MAX_VOICES 8 diff --git a/src/mame/audio/wow.c b/src/mame/audio/wow.c index 35fa98cb025..e6a1b8888bd 100644 --- a/src/mame/audio/wow.c +++ b/src/mame/audio/wow.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mike Coates /************************************************************************** WOW/Votrax SC-01 Emulator diff --git a/src/mame/audio/wpcsnd.c b/src/mame/audio/wpcsnd.c index badc5719b1f..134456fe19b 100644 --- a/src/mame/audio/wpcsnd.c +++ b/src/mame/audio/wpcsnd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * wpcsnd.c - Williams WPC pinball sound * M6809E + YM2151 + HC55516 + DAC diff --git a/src/mame/audio/wpcsnd.h b/src/mame/audio/wpcsnd.h index 732d74e3d12..397a3e186a7 100644 --- a/src/mame/audio/wpcsnd.h +++ b/src/mame/audio/wpcsnd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * wpcsnd.h - Williams WPC pinball sound * diff --git a/src/mame/audio/zaxxon.c b/src/mame/audio/zaxxon.c index 8de9fc5f4f9..1e3205bf138 100644 --- a/src/mame/audio/zaxxon.c +++ b/src/mame/audio/zaxxon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Sega Zaxxon hardware diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c index af8304b1888..597ef620784 100644 --- a/src/mame/drivers/1945kiii.c +++ b/src/mame/drivers/1945kiii.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c index 5142f8749a5..902018c9932 100644 --- a/src/mame/drivers/39in1.c +++ b/src/mame/drivers/39in1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Ryan Holtz, Andreas Naive /************************************************************************** * diff --git a/src/mame/drivers/4enlinea.c b/src/mame/drivers/4enlinea.c index 94cb6c26797..3e3dbd5a9bc 100644 --- a/src/mame/drivers/4enlinea.c +++ b/src/mame/drivers/4enlinea.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca /************************************************************************* diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index 8336385a9fb..234d3e0cde3 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** 88 Games (c) 1988 Konami diff --git a/src/mame/drivers/a1supply.c b/src/mame/drivers/a1supply.c index 9b9a1843b5f..142f9e6b54f 100644 --- a/src/mame/drivers/a1supply.c +++ b/src/mame/drivers/a1supply.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** A-1 Supply discrete hardware games diff --git a/src/mame/drivers/aces1.c b/src/mame/drivers/aces1.c index 026189ccb9c..bc421716105 100644 --- a/src/mame/drivers/aces1.c +++ b/src/mame/drivers/aces1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Ace System 1 Hardware Fruit Machines diff --git a/src/mame/drivers/acesp.c b/src/mame/drivers/acesp.c index be002af3271..55762c4e582 100644 --- a/src/mame/drivers/acesp.c +++ b/src/mame/drivers/acesp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* sp.ACE system by ACE based roughly on the Mach2000 hardware used by Castle diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c index a988db42519..7a06f384054 100644 --- a/src/mame/drivers/adp.c +++ b/src/mame/drivers/adp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /* ADP (Merkur?) games from '90 running on similar hardware. diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c index 00ccbf92f44..f1d6e837b80 100644 --- a/src/mame/drivers/aeroboto.c +++ b/src/mame/drivers/aeroboto.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /**************************************************************************** diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c index 40a09f473a3..ab211fa7c55 100644 --- a/src/mame/drivers/albazc.c +++ b/src/mame/drivers/albazc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Stephane Humbert /* Hanaroku - Alba ZC HW */ /* diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c index 29b7c453c54..00df3236cce 100644 --- a/src/mame/drivers/aleck64.c +++ b/src/mame/drivers/aleck64.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ville Linde /* 'Aleck64' and similar boards */ /* N64 based hardware */ /* diff --git a/src/mame/drivers/aleisttl.c b/src/mame/drivers/aleisttl.c index b7db84d75af..c9efe1a854b 100644 --- a/src/mame/drivers/aleisttl.c +++ b/src/mame/drivers/aleisttl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Allied Leisure discrete hardware games diff --git a/src/mame/drivers/alien.c b/src/mame/drivers/alien.c index dcef79da022..c76c0225441 100644 --- a/src/mame/drivers/alien.c +++ b/src/mame/drivers/alien.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /********************************************************************************** Alien: The Arcade Medal Edition (c) 2005 Capcom diff --git a/src/mame/drivers/alinvade.c b/src/mame/drivers/alinvade.c index 12f9d28c102..cb5dcd12892 100644 --- a/src/mame/drivers/alinvade.c +++ b/src/mame/drivers/alinvade.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Mariusz Wojcieszek /* @@ -39,11 +39,11 @@ public: DECLARE_WRITE8_MEMBER(sound_w); DECLARE_WRITE8_MEMBER(sounden_w); INTERRUPT_GEN_MEMBER(vblank_irq); - UINT32 screen_update_alinvade(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); private: - UINT8 irqmask; - UINT8 irqff; + UINT8 m_irqmask; + UINT8 m_irqff; virtual void machine_start(); virtual void machine_reset(); required_device<cpu_device> m_maincpu; @@ -90,10 +90,10 @@ READ8_MEMBER(alinvade_state::irqmask_r) WRITE8_MEMBER(alinvade_state::irqmask_w) { - if((!(irqff & 1)) && (data & 1)) // f/f, active high? If the above actually returns 0xff this could be active low ... - irqmask^= 1; + if((!(m_irqff & 1)) && (data & 1)) // f/f, active high? If the above actually returns 0xff this could be active low ... + m_irqmask^= 1; - irqff = data; + m_irqff = data; } static ADDRESS_MAP_START( alinvade_map, AS_PROGRAM, 8, alinvade_state ) @@ -157,14 +157,16 @@ INPUT_PORTS_END void alinvade_state::machine_start() { + save_item(NAME(m_irqff)); + save_item(NAME(m_irqmask)); } void alinvade_state::machine_reset() { - irqmask = 1; + m_irqmask = 1; } -UINT32 alinvade_state::screen_update_alinvade(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +UINT32 alinvade_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { offs_t offs; @@ -192,7 +194,7 @@ UINT32 alinvade_state::screen_update_alinvade(screen_device &screen, bitmap_rgb3 INTERRUPT_GEN_MEMBER(alinvade_state::vblank_irq) { - if(irqmask & 1) + if(m_irqmask & 1) m_maincpu->set_input_line(0,HOLD_LINE); } @@ -209,7 +211,7 @@ static MACHINE_CONFIG_START( alinvade, alinvade_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(128, 128) MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 128-1) - MCFG_SCREEN_UPDATE_DRIVER(alinvade_state, screen_update_alinvade) + MCFG_SCREEN_UPDATE_DRIVER(alinvade_state, screen_update) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -235,4 +237,4 @@ ROM_START( alinvade ) ROM_END -GAMEL( 198?, alinvade, 0, alinvade, alinvade, driver_device, 0, ROT90, "Forbes?", "Alien Invaders", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND, layout_alinvade ) +GAMEL( 198?, alinvade, 0, alinvade, alinvade, driver_device, 0, ROT90, "Forbes?", "Alien Invaders", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_alinvade ) diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c index 1e90e238ebe..47e225f680f 100644 --- a/src/mame/drivers/angelkds.c +++ b/src/mame/drivers/angelkds.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Angel Kids / Space Position hardware driver diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c index ea638aee8dc..43e6426d756 100644 --- a/src/mame/drivers/aquarium.c +++ b/src/mame/drivers/aquarium.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Aquarium (c)1996 Excellent Systems */ diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 2a608b6db69..166e01c0be1 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Palindrome, FraSher +// copyright-holders:Angelo Salese, Palindrome, FraSher, Roberto Fresca /* Driver: aristmk4 diff --git a/src/mame/drivers/aristmk5.c b/src/mame/drivers/aristmk5.c index 4b38e2e5103..5fa9abfc1fc 100644 --- a/src/mame/drivers/aristmk5.c +++ b/src/mame/drivers/aristmk5.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Aristocrat MK5 / MKV hardware diff --git a/src/mame/drivers/aristmk6.c b/src/mame/drivers/aristmk6.c index 784c2b59ea7..7ec076a6a2c 100644 --- a/src/mame/drivers/aristmk6.c +++ b/src/mame/drivers/aristmk6.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* Aristocrat MK6 hardware diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c index 6282cce579a..e6b0fed2f33 100644 --- a/src/mame/drivers/arkanoid.c +++ b/src/mame/drivers/arkanoid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** Arkanoid driver diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c index 0e6d556f825..1773e1eaf26 100644 --- a/src/mame/drivers/armedf.c +++ b/src/mame/drivers/armedf.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Phil Stroffolino, Carlos A. Lozano /********************************************************************** Legion diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index f1eacd1f4c3..5e57c75bc76 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c index af866493245..0c9ede70076 100644 --- a/src/mame/drivers/asterix.c +++ b/src/mame/drivers/asterix.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /*************************************************************************** Asterix diff --git a/src/mame/drivers/asteroid.c b/src/mame/drivers/asteroid.c index 5873847a5f9..99e69c8f532 100644 --- a/src/mame/drivers/asteroid.c +++ b/src/mame/drivers/asteroid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas /*************************************************************************** Atari Asteroids hardware diff --git a/src/mame/drivers/astrafr.c b/src/mame/drivers/astrafr.c index 253f8c96f58..62386cea1d8 100644 --- a/src/mame/drivers/astrafr.c +++ b/src/mame/drivers/astrafr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Astra Fruit Machines -- Unknown 68340 based HW platform (seems related to pluto5.c?) -- dumps are of an unknown quality diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c index 61c4971b50d..d6a8fa0a33f 100644 --- a/src/mame/drivers/astrocde.c +++ b/src/mame/drivers/astrocde.c @@ -209,8 +209,8 @@ WRITE8_MEMBER(astrocde_state::seawolf2_sound_2_w)// Port 41 m_samples->set_volume(9, (data & 0x80) ? 1.0 : 0.0); /* dive panning controlled by low 3 bits */ - m_samples->set_volume(2, (float)(~data & 0x07) / 7.0); - m_samples->set_volume(7, (float)(data & 0x07) / 7.0); + m_samples->set_volume(2, (float)(~data & 0x07) / 7.0f); + m_samples->set_volume(7, (float)(data & 0x07) / 7.0f); if (rising_bits & 0x08) { diff --git a/src/mame/drivers/astropc.c b/src/mame/drivers/astropc.c index 1aa9cb9c4ab..7deed2b4d96 100644 --- a/src/mame/drivers/astropc.c +++ b/src/mame/drivers/astropc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Astro Russian Fruit Machines diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c index 7775ede4255..7a69f5b80ce 100644 --- a/src/mame/drivers/atarisy4.c +++ b/src/mame/drivers/atarisy4.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Atari System IV hardware diff --git a/src/mame/drivers/atarittl.c b/src/mame/drivers/atarittl.c index 2db9e2bf82b..7b14a0860ff 100644 --- a/src/mame/drivers/atarittl.c +++ b/src/mame/drivers/atarittl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Atari / Kee Games Driver - Discrete Games made in the 1970's diff --git a/src/mame/drivers/atronic.c b/src/mame/drivers/atronic.c index 181f2e8db72..0e2c6489431 100644 --- a/src/mame/drivers/atronic.c +++ b/src/mame/drivers/atronic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Atronic Russian Video Fruit Machines */ /* From 1999? (documentation is dated August 99) diff --git a/src/mame/drivers/atvtrack.c b/src/mame/drivers/atvtrack.c index c5f88a9324d..7b02148cdf9 100644 --- a/src/mame/drivers/atvtrack.c +++ b/src/mame/drivers/atvtrack.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese, Samuele Zannoli /* ATV Track (c)2002 Gaelco diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c index 5dae5ec131e..f75eb9389b5 100644 --- a/src/mame/drivers/avt.c +++ b/src/mame/drivers/avt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Roberto Fresca /************************************************************************************************ AVT - ADVANCED VIDEO TECHNOLOGY diff --git a/src/mame/drivers/aztarac.c b/src/mame/drivers/aztarac.c index 4e9e96ef903..76f0b68896e 100644 --- a/src/mame/drivers/aztarac.c +++ b/src/mame/drivers/aztarac.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mathis Rosenhauer /*************************************************************************** Centuri Aztarac hardware diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 827d57a7204..b029c8a5c41 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Data East Backfire! diff --git a/src/mame/drivers/bailey.c b/src/mame/drivers/bailey.c index 06496b0622a..4ccf874269d 100644 --- a/src/mame/drivers/bailey.c +++ b/src/mame/drivers/bailey.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Bailey International discrete hardware games diff --git a/src/mame/drivers/battlex.c b/src/mame/drivers/battlex.c index 294b05f2e40..780a82477eb 100644 --- a/src/mame/drivers/battlex.c +++ b/src/mame/drivers/battlex.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/beezer.c b/src/mame/drivers/beezer.c index c01c9f3649a..3f9363ff2f9 100644 --- a/src/mame/drivers/beezer.c +++ b/src/mame/drivers/beezer.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /* diff --git a/src/mame/drivers/belatra.c b/src/mame/drivers/belatra.c index 32e8b12a5ae..17e2d458295 100644 --- a/src/mame/drivers/belatra.c +++ b/src/mame/drivers/belatra.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Belatra Russian Fruit Machines (Video?) */ /* diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c index 43e8e3e21ac..13cc18813b1 100644 --- a/src/mame/drivers/bfcobra.c +++ b/src/mame/drivers/bfcobra.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett, Anonymous +// license:BSD-3-Clause +// copyright-holders:Philip Bennett, Anonymous /****************************************************************************** Bell-Fruit Cobra I/II and Viper Hardware diff --git a/src/mame/drivers/bfm_ad5.c b/src/mame/drivers/bfm_ad5.c index 7f372c99622..cf4f4501c0f 100644 --- a/src/mame/drivers/bfm_ad5.c +++ b/src/mame/drivers/bfm_ad5.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Adder 5 diff --git a/src/mame/drivers/bfm_ad5sw.c b/src/mame/drivers/bfm_ad5sw.c index d7802a0a84a..4abf560196d 100644 --- a/src/mame/drivers/bfm_ad5sw.c +++ b/src/mame/drivers/bfm_ad5sw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Adder 5 diff --git a/src/mame/drivers/bfm_sc4.c b/src/mame/drivers/bfm_sc4.c index cfa0a9a5053..d8808a7de89 100644 --- a/src/mame/drivers/bfm_sc4.c +++ b/src/mame/drivers/bfm_sc4.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Scorpion 4 Hardware Platform (c)1996 Bell Fruit Manufacturing diff --git a/src/mame/drivers/bfm_sc45_helper.c b/src/mame/drivers/bfm_sc45_helper.c index 8eac6f93712..8a5d3c38998 100644 --- a/src/mame/drivers/bfm_sc45_helper.c +++ b/src/mame/drivers/bfm_sc45_helper.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* helper functions for BFM SC4/5 set identification and layout file creation - these are not strictly required by the emulation diff --git a/src/mame/drivers/bfm_sc45_helper.h b/src/mame/drivers/bfm_sc45_helper.h index 753acc48a01..7171c59f8e3 100644 --- a/src/mame/drivers/bfm_sc45_helper.h +++ b/src/mame/drivers/bfm_sc45_helper.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* */ void bfm_sc45_layout_helper(running_machine &machine); diff --git a/src/mame/drivers/bfm_sc4h.c b/src/mame/drivers/bfm_sc4h.c index 7fc663e8be2..ec728bc160a 100644 --- a/src/mame/drivers/bfm_sc4h.c +++ b/src/mame/drivers/bfm_sc4h.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Scorpion 4 Hardware Platform (c)1996 Bell Fruit Manufacturing diff --git a/src/mame/drivers/bfm_sc5.c b/src/mame/drivers/bfm_sc5.c index 78fea240087..4f159a99d0d 100644 --- a/src/mame/drivers/bfm_sc5.c +++ b/src/mame/drivers/bfm_sc5.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Scorpion 5 diff --git a/src/mame/drivers/bfm_sc5sw.c b/src/mame/drivers/bfm_sc5sw.c index 9788bb54b11..0b456ecf25b 100644 --- a/src/mame/drivers/bfm_sc5sw.c +++ b/src/mame/drivers/bfm_sc5sw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Scorpion 5 diff --git a/src/mame/drivers/bfm_swp.c b/src/mame/drivers/bfm_swp.c index d944f559668..266b8ee6631 100644 --- a/src/mame/drivers/bfm_swp.c +++ b/src/mame/drivers/bfm_swp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Bellfruit SWP (Skill With Prizes) Video hardware aka Cobra 3 diff --git a/src/mame/drivers/bfmsys83.c b/src/mame/drivers/bfmsys83.c index 589d843f585..293a9ad2b31 100644 --- a/src/mame/drivers/bfmsys83.c +++ b/src/mame/drivers/bfmsys83.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* BFM System 83 */ #include "emu.h" diff --git a/src/mame/drivers/bgt.c b/src/mame/drivers/bgt.c index 53ce5913285..599617df52e 100644 --- a/src/mame/drivers/bgt.c +++ b/src/mame/drivers/bgt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* BGT Fruit Machines BGT (British Gaming Technology) were a small Spanish company diff --git a/src/mame/drivers/bigstrkb.c b/src/mame/drivers/bigstrkb.c index 9e585dd4c47..8a5a1300935 100644 --- a/src/mame/drivers/bigstrkb.c +++ b/src/mame/drivers/bigstrkb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Jaleco's Big Striker (bootleg version) diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c index 100b4ee3688..2c2fd036ddd 100644 --- a/src/mame/drivers/bingor.c +++ b/src/mame/drivers/bingor.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese, Roberto Fresca /*********************************************************************** Bingo Roll / Bell Star diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c index dee9d5965ed..196c217979e 100644 --- a/src/mame/drivers/bionicc.c +++ b/src/mame/drivers/bionicc.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /****************************************************************************************** Bionic Commando diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c index efa35e9a10a..afd9040a65a 100644 --- a/src/mame/drivers/bking.c +++ b/src/mame/drivers/bking.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c index d8a4a5a71df..b7e2799536f 100644 --- a/src/mame/drivers/blackt96.c +++ b/src/mame/drivers/blackt96.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Black Touch '96 diff --git a/src/mame/drivers/blockade.c b/src/mame/drivers/blockade.c index 6adcb9f7693..9faab7d4b42 100644 --- a/src/mame/drivers/blockade.c +++ b/src/mame/drivers/blockade.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /**************************************************************************** diff --git a/src/mame/drivers/bloodbro.c b/src/mame/drivers/bloodbro.c index 6e13a318c13..b7fd5f64360 100644 --- a/src/mame/drivers/bloodbro.c +++ b/src/mame/drivers/bloodbro.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano Baides /************************************************************************** diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c index 15febdd2397..42b4dacf4ab 100644 --- a/src/mame/drivers/bnstars.c +++ b/src/mame/drivers/bnstars.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? /* Vs. Janshi Brandnew Stars diff --git a/src/mame/drivers/bntyhunt.c b/src/mame/drivers/bntyhunt.c index ff2835d6d51..3860ef27189 100644 --- a/src/mame/drivers/bntyhunt.c +++ b/src/mame/drivers/bntyhunt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* Bounty Hunter PC hardware.. no dumps of the bios roms are currently available diff --git a/src/mame/drivers/bowltry.c b/src/mame/drivers/bowltry.c index f574806cf7a..b464dd410d6 100644 --- a/src/mame/drivers/bowltry.c +++ b/src/mame/drivers/bowltry.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************************************************ Bowling Try diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c index 76cf2935265..8ed6612aa13 100644 --- a/src/mame/drivers/boxer.c +++ b/src/mame/drivers/boxer.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Boxer (prototype) driver diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c index f7ea6a2a6fa..6910480856b 100644 --- a/src/mame/drivers/buster.c +++ b/src/mame/drivers/buster.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Buster diff --git a/src/mame/drivers/bwidow.c b/src/mame/drivers/bwidow.c index ed9d3634faa..5e9076b8a03 100644 --- a/src/mame/drivers/bwidow.c +++ b/src/mame/drivers/bwidow.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas /*************************************************************************** Atari Black Widow hardware diff --git a/src/mame/drivers/bzone.c b/src/mame/drivers/bzone.c index 656760bb200..c9a09506ef4 100644 --- a/src/mame/drivers/bzone.c +++ b/src/mame/drivers/bzone.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Nicola Salmoria /*************************************************************************** Atari Battlezone hardware diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index 50060c8f59b..2e9b2936dee 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano Baides /****************************************************************** diff --git a/src/mame/drivers/calchase.c b/src/mame/drivers/calchase.c index 758f356cf0b..0f4a3887c9c 100644 --- a/src/mame/drivers/calchase.c +++ b/src/mame/drivers/calchase.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Grull Osgo +// copyright-holders:Angelo Salese, Grull Osgo, Peter Ferrie /************************************************************************************ California Chase (c) 1999 The Game Room diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c index 79895c824c5..effedfd8a5f 100644 --- a/src/mame/drivers/calorie.c +++ b/src/mame/drivers/calorie.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli /* diff --git a/src/mame/drivers/capcom.c b/src/mame/drivers/capcom.c index 70573cd2b1d..3980c58816a 100644 --- a/src/mame/drivers/capcom.c +++ b/src/mame/drivers/capcom.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /* Capcom A0015405 */ diff --git a/src/mame/drivers/carjmbre.c b/src/mame/drivers/carjmbre.c index 0765cc54151..3e45d9cd7e1 100644 --- a/src/mame/drivers/carjmbre.c +++ b/src/mame/drivers/carjmbre.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:insideoutboy, Nicola Salmoria /*************************************************************************** Car Jamboree diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c index ca3c1e9fa07..d567ecc67da 100644 --- a/src/mame/drivers/carrera.c +++ b/src/mame/drivers/carrera.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* This is a simple 'Pairs' game called diff --git a/src/mame/drivers/castle.c b/src/mame/drivers/castle.c index df6ed846b6f..da694472bb9 100644 --- a/src/mame/drivers/castle.c +++ b/src/mame/drivers/castle.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Castle Mach2000 Hardware Mechanical Fruit Machines with DMD display diff --git a/src/mame/drivers/cavepc.c b/src/mame/drivers/cavepc.c index dcb300390d7..9ec8de09c2e 100644 --- a/src/mame/drivers/cavepc.c +++ b/src/mame/drivers/cavepc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** CAVE PC hardware diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c index e3a43f7d637..9377fd875b0 100644 --- a/src/mame/drivers/cb2001.c +++ b/src/mame/drivers/cb2001.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Roberto Zandona' /************************************************************************************************* Cherry Bonus 2001 (c)2000/2001 Dyna diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c index 8fc7debf4f6..9ebb3a22315 100644 --- a/src/mame/drivers/cball.c +++ b/src/mame/drivers/cball.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Cannonball (prototype) driver @@ -20,35 +20,39 @@ public: cball_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") - { } + m_palette(*this, "palette"), + m_video_ram(*this, "video_ram") { } + + /* devices */ + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; /* memory pointers */ required_shared_ptr<UINT8> m_video_ram; /* video-related */ tilemap_t* m_bg_tilemap; + + emu_timer *m_int_timer; + TIMER_CALLBACK_MEMBER(interrupt_callback); - /* devices */ - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; + DECLARE_WRITE8_MEMBER(vram_w); + DECLARE_READ8_MEMBER(wram_r); + DECLARE_WRITE8_MEMBER(wram_w); - DECLARE_WRITE8_MEMBER(cball_vram_w); - DECLARE_READ8_MEMBER(cball_wram_r); - DECLARE_WRITE8_MEMBER(cball_wram_w); TILE_GET_INFO_MEMBER(get_tile_info); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(cball); - UINT32 screen_update_cball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(interrupt_callback); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); @@ -63,7 +67,7 @@ TILE_GET_INFO_MEMBER(cball_state::get_tile_info) } -WRITE8_MEMBER(cball_state::cball_vram_w) +WRITE8_MEMBER(cball_state::vram_w) { m_video_ram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); @@ -76,7 +80,7 @@ void cball_state::video_start() } -UINT32 cball_state::screen_update_cball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 cball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* draw playfield */ m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); @@ -116,17 +120,18 @@ TIMER_CALLBACK_MEMBER(cball_state::interrupt_callback) if (scanline >= 262) scanline = 16; - timer_set(m_screen->time_until_pos(scanline), TIMER_INTERRUPT, scanline); + m_int_timer->adjust(m_screen->time_until_pos(scanline), scanline); } void cball_state::machine_start() { + m_int_timer = timer_alloc(TIMER_INTERRUPT); } void cball_state::machine_reset() { - timer_set(m_screen->time_until_pos(16), TIMER_INTERRUPT, 16); + m_int_timer->adjust(m_screen->time_until_pos(16), 16); } @@ -141,13 +146,13 @@ PALETTE_INIT_MEMBER(cball_state, cball) } -READ8_MEMBER(cball_state::cball_wram_r) +READ8_MEMBER(cball_state::wram_r) { return m_video_ram[0x380 + offset]; } -WRITE8_MEMBER(cball_state::cball_wram_w) +WRITE8_MEMBER(cball_state::wram_w) { m_video_ram[0x380 + offset] = data; } @@ -157,7 +162,7 @@ WRITE8_MEMBER(cball_state::cball_wram_w) static ADDRESS_MAP_START( cpu_map, AS_PROGRAM, 8, cball_state ) ADDRESS_MAP_GLOBAL_MASK(0x7fff) - AM_RANGE(0x0000, 0x03ff) AM_READ(cball_wram_r) AM_MASK(0x7f) + AM_RANGE(0x0000, 0x03ff) AM_READ(wram_r) AM_MASK(0x7f) AM_RANGE(0x0400, 0x07ff) AM_READONLY AM_RANGE(0x1001, 0x1001) AM_READ_PORT("1001") AM_RANGE(0x1003, 0x1003) AM_READ_PORT("1003") @@ -167,8 +172,8 @@ static ADDRESS_MAP_START( cpu_map, AS_PROGRAM, 8, cball_state ) AM_RANGE(0x2000, 0x2001) AM_NOP AM_RANGE(0x2800, 0x2800) AM_READ_PORT("2800") - AM_RANGE(0x0000, 0x03ff) AM_WRITE(cball_wram_w) AM_MASK(0x7f) - AM_RANGE(0x0400, 0x07ff) AM_WRITE(cball_vram_w) AM_SHARE("video_ram") + AM_RANGE(0x0000, 0x03ff) AM_WRITE(wram_w) AM_MASK(0x7f) + AM_RANGE(0x0400, 0x07ff) AM_WRITE(vram_w) AM_SHARE("video_ram") AM_RANGE(0x1800, 0x1800) AM_NOP /* watchdog? */ AM_RANGE(0x1810, 0x1811) AM_NOP AM_RANGE(0x1820, 0x1821) AM_NOP @@ -265,7 +270,7 @@ static MACHINE_CONFIG_START( cball, cball_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(256, 262) MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 223) - MCFG_SCREEN_UPDATE_DRIVER(cball_state, screen_update_cball) + MCFG_SCREEN_UPDATE_DRIVER(cball_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", cball) @@ -298,4 +303,4 @@ ROM_START( cball ) ROM_END -GAME( 1976, cball, 0, cball, cball, driver_device, 0, ROT0, "Atari", "Cannonball (Atari, prototype)", GAME_NO_SOUND | GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS ) +GAME( 1976, cball, 0, cball, cball, driver_device, 0, ROT0, "Atari", "Cannonball (Atari, prototype)", GAME_NO_SOUND | GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/cbasebal.c b/src/mame/drivers/cbasebal.c index 15c0a72c672..d3b7bd38cb1 100644 --- a/src/mame/drivers/cbasebal.c +++ b/src/mame/drivers/cbasebal.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Capcom Baseball diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c index 49e7b60828f..1bac5ec616f 100644 --- a/src/mame/drivers/cchasm.c +++ b/src/mame/drivers/cchasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** @@ -35,10 +35,10 @@ static ADDRESS_MAP_START( memmap, AS_PROGRAM, 16, cchasm_state ) AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_RANGE(0x040000, 0x04000f) AM_DEVREADWRITE8("6840ptm", ptm6840_device, read, write, 0xff) - AM_RANGE(0x050000, 0x050001) AM_WRITE(cchasm_refresh_control_w) - AM_RANGE(0x060000, 0x060001) AM_READ_PORT("DSW") AM_WRITE(cchasm_led_w) + AM_RANGE(0x050000, 0x050001) AM_WRITE(refresh_control_w) + AM_RANGE(0x060000, 0x060001) AM_READ_PORT("DSW") AM_WRITE(led_w) AM_RANGE(0x070000, 0x070001) AM_WRITE(watchdog_reset16_w) - AM_RANGE(0xf80000, 0xf800ff) AM_READWRITE(cchasm_io_r,cchasm_io_w) + AM_RANGE(0xf80000, 0xf800ff) AM_READWRITE(io_r,io_w) AM_RANGE(0xffb000, 0xffffff) AM_RAM AM_SHARE("ram") ADDRESS_MAP_END @@ -53,13 +53,13 @@ static ADDRESS_MAP_START( sound_memmap, AS_PROGRAM, 8, cchasm_state ) AM_RANGE(0x4000, 0x43ff) AM_RAM AM_RANGE(0x5000, 0x53ff) AM_RAM AM_RANGE(0x6000, 0x6001) AM_MIRROR(0xf9e) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0xf9e) AM_READ(cchasm_coin_sound_r) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0xf9e) AM_READ(coin_sound_r) AM_RANGE(0x6001, 0x6001) AM_MIRROR(0xf9e) AM_DEVREAD("ay1", ay8910_device, data_r) AM_RANGE(0x6020, 0x6021) AM_MIRROR(0xf9e) AM_DEVWRITE("ay2", ay8910_device, address_data_w) AM_RANGE(0x6021, 0x6021) AM_MIRROR(0xf9e) AM_DEVREAD("ay2", ay8910_device, data_r) AM_RANGE(0x6040, 0x6040) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch_byte_r, soundlatch3_byte_w) - AM_RANGE(0x6041, 0x6041) AM_MIRROR(0xf9e) AM_READWRITE(cchasm_soundlatch2_r, cchasm_soundlatch4_w) - AM_RANGE(0x6061, 0x6061) AM_MIRROR(0xf9e) AM_WRITE(cchasm_reset_coin_flag_w) + AM_RANGE(0x6041, 0x6041) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch2_r, soundlatch4_w) + AM_RANGE(0x6061, 0x6061) AM_MIRROR(0xf9e) AM_WRITE(reset_coin_flag_w) AM_RANGE(0x7041, 0x7041) AM_NOP // TODO ADDRESS_MAP_END @@ -68,11 +68,6 @@ static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, cchasm_state ) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ctc", z80ctc_device, read, write) ADDRESS_MAP_END -WRITE_LINE_MEMBER(cchasm_state::cchasm_6840_irq) -{ - m_maincpu->set_input_line(4, state ? ASSERT_LINE : CLEAR_LINE); -} - /************************************* * * Port definitions @@ -117,9 +112,9 @@ static INPUT_PORTS_START( cchasm ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START("IN3") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, cchasm_set_coin_flag, 0) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, cchasm_set_coin_flag, 0) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, cchasm_set_coin_flag, 0) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, set_coin_flag, 0) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, set_coin_flag, 0) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, set_coin_flag, 0) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Test 1") PORT_CODE(KEYCODE_F1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* Test 2, not used in cchasm */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* Test 3, not used in cchasm */ @@ -189,7 +184,7 @@ static MACHINE_CONFIG_START( cchasm, cchasm_state ) MCFG_DEVICE_ADD("6840ptm", PTM6840, 0) MCFG_PTM6840_INTERNAL_CLOCK(CCHASM_68K_CLOCK/10) MCFG_PTM6840_EXTERNAL_CLOCKS(0, CCHASM_68K_CLOCK / 10, 0) - MCFG_PTM6840_IRQ_CB(WRITELINE(cchasm_state, cchasm_6840_irq)) + MCFG_PTM6840_IRQ_CB(INPUTLINE("maincpu", 4)) MACHINE_CONFIG_END @@ -259,5 +254,5 @@ ROM_END * *************************************/ -GAME( 1983, cchasm, 0, cchasm, cchasm, driver_device, 0, ROT270, "Cinematronics / GCE", "Cosmic Chasm (set 1)", 0 ) -GAME( 1983, cchasm1, cchasm, cchasm, cchasm, driver_device, 0, ROT270, "Cinematronics / GCE", "Cosmic Chasm (set 2)", 0 ) +GAME( 1983, cchasm, 0, cchasm, cchasm, driver_device, 0, ROT270, "Cinematronics / GCE", "Cosmic Chasm (set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1983, cchasm1, cchasm, cchasm, cchasm, driver_device, 0, ROT270, "Cinematronics / GCE", "Cosmic Chasm (set 2)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c index 879dcceda57..cec97aea9aa 100644 --- a/src/mame/drivers/cclimber.c +++ b/src/mame/drivers/cclimber.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Crazy Climber memory map (preliminary) diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c index f1a714e9f4d..b778720c6ac 100644 --- a/src/mame/drivers/centiped.c +++ b/src/mame/drivers/centiped.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Atari Centipede hardware diff --git a/src/mame/drivers/chance32.c b/src/mame/drivers/chance32.c index 214488a286a..19b5225a857 100644 --- a/src/mame/drivers/chance32.c +++ b/src/mame/drivers/chance32.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Angelo Salese, Roberto Fresca /********************************************************* diff --git a/src/mame/drivers/cheekyms.c b/src/mame/drivers/cheekyms.c index 436f17f4f11..81f953de4f7 100644 --- a/src/mame/drivers/cheekyms.c +++ b/src/mame/drivers/cheekyms.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Lee Taylor, Chris Moore /************************************************************************* Universal Cheeky Mouse Driver (c)Lee Taylor May/June 1998, All rights reserved. diff --git a/src/mame/drivers/chicago.c b/src/mame/drivers/chicago.c index 29c44e584c5..076e9ca46d0 100644 --- a/src/mame/drivers/chicago.c +++ b/src/mame/drivers/chicago.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabiou Priuli /*************************************************************************** Chicago Coin discrete hardware games diff --git a/src/mame/drivers/chihiro.c b/src/mame/drivers/chihiro.c index ce5ea0b9cf2..cb68adbcfc4 100644 --- a/src/mame/drivers/chihiro.c +++ b/src/mame/drivers/chihiro.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Samuele Zannoli /* Chihiro is an Xbox-based arcade system from SEGA. @@ -384,6 +384,11 @@ public: driver_device(mconfig, type, tag), nvidia_nv2a(NULL), debug_irq_active(false), + debug_irq_number(0), + dimm_board_memory(NULL), + dimm_board_memory_size(0), + usbhack_index(-1), + usbhack_counter(0), m_maincpu(*this, "maincpu") { } DECLARE_READ32_MEMBER(geforce_r); @@ -469,6 +474,7 @@ public: int debug_irq_number; UINT8 *dimm_board_memory; UINT32 dimm_board_memory_size; + int usbhack_index; int usbhack_counter; required_device<cpu_device> m_maincpu; }; @@ -1046,36 +1052,32 @@ static const char *const usbregnames[] = { }; #endif +static const struct { + const char *game_name; + struct { + UINT32 address; + UINT8 write_byte; + } modify[16]; +} hacks[2] = { { "chihiro", { { 0x6a79f, 0x01 }, { 0x6a7a0, 0x00 }, { 0x6b575, 0x00 }, { 0x6b576, 0x00 }, { 0x6b5af, 0x75 }, { 0x6b78a, 0x75 }, { 0x6b7ca, 0x00 }, { 0x6b7b8, 0x00 }, { 0x8f5b2, 0x75 }, { 0x79a9e, 0x74 }, { 0x79b80, 0x74 }, { 0x79b97, 0x74 }, { 0, 0 } } }, + { "outr2", { { 0x12e4cf, 0x01 }, { 0x12e4d0, 0x00 }, { 0x4793e, 0x01 }, { 0x4793f, 0x00 }, { 0x47aa3, 0x01 }, { 0x47aa4, 0x00 }, { 0x14f2b6, 0x84 }, { 0x14f2d1, 0x75 }, { 0x8732f, 0x7d }, { 0x87384, 0x7d }, { 0x87388, 0xeb }, { 0, 0 } } } }; + READ32_MEMBER(chihiro_state::usbctrl_r) { - if (offset == 0) { /* hack needed until usb (and jvs) is implemented */ - if (usbhack_counter == 0) { - m_maincpu->space(0).write_byte(0x6a79f, 0x01); - m_maincpu->space(0).write_byte(0x6a7a0, 0x00); - m_maincpu->space(0).write_byte(0x6b575, 0x00); - m_maincpu->space(0).write_byte(0x6b576, 0x00); - m_maincpu->space(0).write_byte(0x6b5af, 0x75); - m_maincpu->space(0).write_byte(0x6b78a, 0x75); - m_maincpu->space(0).write_byte(0x6b7ca, 0x00); - m_maincpu->space(0).write_byte(0x6b7b8, 0x00); - m_maincpu->space(0).write_byte(0x8f5b2, 0x75); - m_maincpu->space(0).write_byte(0x79a9e, 0x74); - m_maincpu->space(0).write_byte(0x79b80, 0x74); - m_maincpu->space(0).write_byte(0x79b97, 0x74); - } - // after game loaded - if (usbhack_counter == 1) { - m_maincpu->space(0).write_byte(0x12e4cf, 0x01); - m_maincpu->space(0).write_byte(0x12e4d0, 0x00); - m_maincpu->space(0).write_byte(0x4793e, 0x01); - m_maincpu->space(0).write_byte(0x4793f, 0x00); - m_maincpu->space(0).write_byte(0x47aa3, 0x01); - m_maincpu->space(0).write_byte(0x47aa4, 0x00); - m_maincpu->space(0).write_byte(0x14f2b6, 0x84); - m_maincpu->space(0).write_byte(0x14f2d1, 0x75); - m_maincpu->space(0).write_byte(0x8732f, 0x7d); - m_maincpu->space(0).write_byte(0x87384, 0x7d); - m_maincpu->space(0).write_byte(0x87388, 0xeb); + int a, p; + + if (offset == 0) { /* hacks needed until usb (and jvs) is implemented */ + if (usbhack_counter == 0) + p = 0; + else if (usbhack_counter == 1) // after game loaded + p = usbhack_index; + else + p = -1; + if (p >= 0) { + for (a = 0; a < 16; a++) { + if (hacks[p].modify[a].address == 0) + break; + m_maincpu->space(0).write_byte(hacks[p].modify[a].address, hacks[p].modify[a].write_byte); + } } usbhack_counter++; } @@ -1179,9 +1181,9 @@ WRITE32_MEMBER(chihiro_state::audio_apu_w) } if (offset == 0x2037c / 4) { // value related to sample rate INT16 v = (INT16)(data >> 16); // upper 16 bits as a signed 16 bit value - float vv = ((float)v) / 4096.0; // divide by 4096 + float vv = ((float)v) / 4096.0f; // divide by 4096 float vvv = powf(2, vv); // two to the vv - int f = vvv*48000.0; // sample rate + int f = vvv*48000.0f; // sample rate apust.voices_frequency[apust.voice_number] = f; return; } @@ -1790,6 +1792,12 @@ void chihiro_state::machine_start() apust.timer->enable(false); if (machine().debug_flags & DEBUG_FLAG_ENABLED) debug_console_register_command(machine(), "chihiro", CMDFLAG_NONE, 0, 1, 4, chihiro_debug_commands); + usbhack_index = -1; + for (int a = 1; a < 2; a++) + if (strcmp(machine().basename(), hacks[a].game_name) == 0) { + usbhack_index = a; + break; + } usbhack_counter = 0; // savestates save_item(NAME(debug_irq_active)); diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c index b2977383765..4b67c197b5b 100644 --- a/src/mame/drivers/chinagat.c +++ b/src/mame/drivers/chinagat.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria,Paul Hampson, Quench /* China Gate. By Paul Hampson from First Principles diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c index 9af5e034b27..33031e08dac 100644 --- a/src/mame/drivers/chinsan.c +++ b/src/mame/drivers/chinsan.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Ganbare Chinsan Ooshoubu driver by David Haywood diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c index 601eee9aef8..b8f2f6ea57e 100644 --- a/src/mame/drivers/chqflag.c +++ b/src/mame/drivers/chqflag.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Manuel Abadia /*************************************************************************** Chequered Flag / Checkered Flag (GX717) (c) Konami 1988 diff --git a/src/mame/drivers/circus.c b/src/mame/drivers/circus.c index ee8a87b5ce8..2535e43bd22 100644 --- a/src/mame/drivers/circus.c +++ b/src/mame/drivers/circus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /*************************************************************************** diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c index 891bb1c9072..2ffcd897421 100644 --- a/src/mame/drivers/circusc.c +++ b/src/mame/drivers/circusc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria,Chris Hardy /*************************************************************************** Circus Charlie GX380 (c) 1984 Konami diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c index 18f9b9bb91a..3d5bd56ce30 100644 --- a/src/mame/drivers/citycon.c +++ b/src/mame/drivers/citycon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mirko Buffoni /*************************************************************************** City Connection (c) 1985 Jaleco diff --git a/src/mame/drivers/cloak.c b/src/mame/drivers/cloak.c index 63d4ed1ca04..3ab39a3d77f 100644 --- a/src/mame/drivers/cloak.c +++ b/src/mame/drivers/cloak.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris, Mirko Buffoni /*************************************************************************** Atari Cloak & Dagger hardware diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c index fb702bda809..61896941cd2 100644 --- a/src/mame/drivers/coinmstr.c +++ b/src/mame/drivers/coinmstr.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Pierpaolo Prazzoli, Roberto Fresca +// copyright-holders:Pierpaolo Prazzoli, Roberto Fresca, David Haywood /*================================================================================== Coinmaster trivia and poker games. diff --git a/src/mame/drivers/comebaby.c b/src/mame/drivers/comebaby.c index 1b24426ed43..64dd498e542 100644 --- a/src/mame/drivers/comebaby.c +++ b/src/mame/drivers/comebaby.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /* Come On Baby (c) 2000 ExPotato Co. Ltd (Excellent Potato) diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c index 4946a961e77..d2d046949e6 100644 --- a/src/mame/drivers/contra.c +++ b/src/mame/drivers/contra.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano, Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/cop01.c b/src/mame/drivers/cop01.c index 4f4da1e4211..715d063dbd2 100644 --- a/src/mame/drivers/cop01.c +++ b/src/mame/drivers/cop01.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /*************************************************************************** diff --git a/src/mame/drivers/cosmic.c b/src/mame/drivers/cosmic.c index ab594544831..6370e33fe02 100644 --- a/src/mame/drivers/cosmic.c +++ b/src/mame/drivers/cosmic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Lee Taylor /*************************************************************************** Universal board numbers (found on the schematics) diff --git a/src/mame/drivers/cswat.c b/src/mame/drivers/cswat.c index b63561a1ea6..4ddd63f3931 100644 --- a/src/mame/drivers/cswat.c +++ b/src/mame/drivers/cswat.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:hap /*************************************************************************** Namco Cosmoswat, a lightgun game that uses a projector and a bunch of diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c index 5a752875f6a..d11cf9ead2a 100644 --- a/src/mame/drivers/cubeqst.c +++ b/src/mame/drivers/cubeqst.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Simutrek Cube Quest diff --git a/src/mame/drivers/cupidon.c b/src/mame/drivers/cupidon.c index 298e2becaba..02a20d0e84f 100644 --- a/src/mame/drivers/cupidon.c +++ b/src/mame/drivers/cupidon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Cupidon - Russian Video Fruit Machines? */ /* diff --git a/src/mame/drivers/cv1k.c b/src/mame/drivers/cv1k.c index e015e2a1989..c08d9ad83ff 100644 --- a/src/mame/drivers/cv1k.c +++ b/src/mame/drivers/cv1k.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* U2 flash rom note diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c index 413168e910f..1db8597c5a9 100644 --- a/src/mame/drivers/cvs.c +++ b/src/mame/drivers/cvs.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates, Couriersud /*************************************************************************** diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c index de9761cf004..1dd3a67a96d 100644 --- a/src/mame/drivers/dai3wksi.c +++ b/src/mame/drivers/dai3wksi.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Derrick Renaud /* -Galaxy Force diff --git a/src/mame/drivers/darkmist.c b/src/mame/drivers/darkmist.c index e9e0a52f730..eb5d5589b41 100644 --- a/src/mame/drivers/darkmist.c +++ b/src/mame/drivers/darkmist.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Nicola Salmoria, Tomasz Slanina /* *********************************************************************************** diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index 732b8f24c32..bfb9b470842 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Double Wings diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c index 87742ea7ca2..9a03a0a42d9 100644 --- a/src/mame/drivers/dbz.c +++ b/src/mame/drivers/dbz.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, R. Belmont, Pierpaolo Prazzoli /* Dragonball Z (c) 1993 Banpresto diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index a8e05cad8a1..87d0230678f 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont +// license:BSD-3-Clause +// copyright-holders:Philip Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont /*************************************************************************** Double Dragon (c) 1987 Technos Japan diff --git a/src/mame/drivers/ddz.c b/src/mame/drivers/ddz.c index f3081c2e466..b1d98427e5f 100644 --- a/src/mame/drivers/ddz.c +++ b/src/mame/drivers/ddz.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Xing Xing /* Dou Di Zhu (by IGS?) diff --git a/src/mame/drivers/deadang.c b/src/mame/drivers/deadang.c index c9f9034b55c..e685c4267d0 100644 --- a/src/mame/drivers/deadang.c +++ b/src/mame/drivers/deadang.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood /*************************************************************************** Dead Angle (c) 1988 Seibu Kaihatsu diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c index 0ae8ec9d2a9..4461a9ca70b 100644 --- a/src/mame/drivers/destroyr.c +++ b/src/mame/drivers/destroyr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Destroyer Driver diff --git a/src/mame/drivers/dgpix.c b/src/mame/drivers/dgpix.c index 172595bf09b..5a43c7d57f6 100644 --- a/src/mame/drivers/dgpix.c +++ b/src/mame/drivers/dgpix.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Pierpaolo PrazzoliPierpaolo Prazzoli, Tomasz Slanina +// copyright-holders:Pierpaolo Prazzoli, Tomasz Slanina /******************************************************************** dgPIX VRender0 hardware diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index bdf426a80e5..f9a04d09be6 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Disco Boy diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index 793b5038e84..c4272cf8321 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Diver Boy (c)1992 Device Electronics diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c index 25ec4978712..13bb90da863 100644 --- a/src/mame/drivers/djboy.c +++ b/src/mame/drivers/djboy.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* DJ Boy (c)1989 Kaneko diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c index 19248484d93..2bbdf3750a2 100644 --- a/src/mame/drivers/djmain.c +++ b/src/mame/drivers/djmain.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf /* * Beatmania DJ Main Board (GX753) * diff --git a/src/mame/drivers/dlair2.c b/src/mame/drivers/dlair2.c index bd2b8a9ae21..7b4d4bde9be 100644 --- a/src/mame/drivers/dlair2.c +++ b/src/mame/drivers/dlair2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Leland /*************************************************************************** Skeleton driver for Dragon's Lair II: Time Warp diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c index e1dea69a5b8..d2f5b452c6f 100644 --- a/src/mame/drivers/docastle.c +++ b/src/mame/drivers/docastle.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** Mr. Do's Castle memory map (preliminary) diff --git a/src/mame/drivers/dragrace.c b/src/mame/drivers/dragrace.c index ba303d23bc7..2978c417832 100644 --- a/src/mame/drivers/dragrace.c +++ b/src/mame/drivers/dragrace.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Drag Race Driver diff --git a/src/mame/drivers/dreambal.c b/src/mame/drivers/dreambal.c index 3f2dd133f48..1a57133c4ef 100644 --- a/src/mame/drivers/dreambal.c +++ b/src/mame/drivers/dreambal.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Dream Ball PCB DE-0386-2 diff --git a/src/mame/drivers/dreamwld.c b/src/mame/drivers/dreamwld.c index 48b53bae189..ec8ddb5935f 100644 --- a/src/mame/drivers/dreamwld.c +++ b/src/mame/drivers/dreamwld.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/drgnmst.c b/src/mame/drivers/drgnmst.c index 3ca5c7828d9..27c6e53a790 100644 --- a/src/mame/drivers/drgnmst.c +++ b/src/mame/drivers/drgnmst.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/drtomy.c b/src/mame/drivers/drtomy.c index 6868aace82d..9dc220898c6 100644 --- a/src/mame/drivers/drtomy.c +++ b/src/mame/drivers/drtomy.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli /* Dr. Tomy - (c) 1993 Playmark diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c index f0d9ea3c184..51939381949 100644 --- a/src/mame/drivers/dwarfd.c +++ b/src/mame/drivers/dwarfd.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Tomasz Slanina /* Dwarfs Den by Electro-Sport diff --git a/src/mame/drivers/dynduke.c b/src/mame/drivers/dynduke.c index d834c760ae6..8d0329907c2 100644 --- a/src/mame/drivers/dynduke.c +++ b/src/mame/drivers/dynduke.c @@ -82,19 +82,19 @@ static ADDRESS_MAP_START( master_map, AS_PROGRAM, 16, dynduke_state ) AM_RANGE(0x0b000, 0x0b001) AM_READ_PORT("P1_P2") AM_RANGE(0x0b002, 0x0b003) AM_READ_PORT("DSW") AM_RANGE(0x0b004, 0x0b005) AM_WRITENOP - AM_RANGE(0x0b006, 0x0b007) AM_WRITE(dynduke_control_w) - AM_RANGE(0x0c000, 0x0c7ff) AM_RAM_WRITE(dynduke_text_w) AM_SHARE("videoram") + AM_RANGE(0x0b006, 0x0b007) AM_WRITE(control_w) + AM_RANGE(0x0c000, 0x0c7ff) AM_RAM_WRITE(text_w) AM_SHARE("videoram") AM_RANGE(0x0d000, 0x0d00d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w) AM_RANGE(0xa0000, 0xfffff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, dynduke_state ) AM_RANGE(0x00000, 0x05fff) AM_RAM - AM_RANGE(0x06000, 0x067ff) AM_RAM_WRITE(dynduke_background_w) AM_SHARE("back_data") - AM_RANGE(0x06800, 0x06fff) AM_RAM_WRITE(dynduke_foreground_w) AM_SHARE("fore_data") - AM_RANGE(0x07000, 0x07fff) AM_RAM_WRITE(dynduke_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x06000, 0x067ff) AM_RAM_WRITE(background_w) AM_SHARE("back_data") + AM_RANGE(0x06800, 0x06fff) AM_RAM_WRITE(foreground_w) AM_SHARE("fore_data") + AM_RANGE(0x07000, 0x07fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x08000, 0x08fff) AM_RAM AM_SHARE("share1") - AM_RANGE(0x0a000, 0x0a001) AM_WRITE(dynduke_gfxbank_w) + AM_RANGE(0x0a000, 0x0a001) AM_WRITE(gfxbank_w) AM_RANGE(0x0c000, 0x0c001) AM_WRITENOP AM_RANGE(0xc0000, 0xfffff) AM_ROM ADDRESS_MAP_END @@ -103,14 +103,14 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( masterj_map, AS_PROGRAM, 16, dynduke_state ) AM_RANGE(0x00000, 0x06fff) AM_RAM AM_RANGE(0x07000, 0x07fff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x08000, 0x087ff) AM_RAM_WRITE(dynduke_text_w) AM_SHARE("videoram") + AM_RANGE(0x08000, 0x087ff) AM_RAM_WRITE(text_w) AM_SHARE("videoram") AM_RANGE(0x09000, 0x0900d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w) AM_RANGE(0x0c000, 0x0c0ff) AM_RAM AM_SHARE("scroll_ram") AM_RANGE(0x0e000, 0x0efff) AM_RAM AM_SHARE("share1") AM_RANGE(0x0f000, 0x0f001) AM_READ_PORT("P1_P2") AM_RANGE(0x0f002, 0x0f003) AM_READ_PORT("DSW") AM_RANGE(0x0f004, 0x0f005) AM_WRITENOP - AM_RANGE(0x0f006, 0x0f007) AM_WRITE(dynduke_control_w) + AM_RANGE(0x0f006, 0x0f007) AM_WRITE(control_w) AM_RANGE(0xa0000, 0xfffff) AM_ROM ADDRESS_MAP_END @@ -265,7 +265,7 @@ GFXDECODE_END /* Interrupt Generator */ -INTERRUPT_GEN_MEMBER(dynduke_state::dynduke_interrupt) +INTERRUPT_GEN_MEMBER(dynduke_state::interrupt) { device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // VBL } @@ -276,11 +276,11 @@ static MACHINE_CONFIG_START( dynduke, dynduke_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", V30, 16000000/2) // NEC V30-8 CPU MCFG_CPU_PROGRAM_MAP(master_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, dynduke_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, interrupt) MCFG_CPU_ADD("slave", V30, 16000000/2) // NEC V30-8 CPU MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, dynduke_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, interrupt) SEIBU_SOUND_SYSTEM_CPU(14318180/4) @@ -294,7 +294,7 @@ static MACHINE_CONFIG_START( dynduke, dynduke_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(dynduke_state, screen_update_dynduke) + MCFG_SCREEN_UPDATE_DRIVER(dynduke_state, screen_update) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_SCREEN_PALETTE("palette") @@ -612,9 +612,9 @@ DRIVER_INIT_MEMBER(dynduke_state,dynduke) /* Game Drivers */ -GAME( 1989, dynduke, 0, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe set 1)", 0 ) -GAME( 1989, dyndukea, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe set 2)", 0 ) -GAME( 1989, dyndukej, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Japan)", 0 ) -GAME( 1989, dyndukeu, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu (Fabtek license)", "Dynamite Duke (US)", 0 ) -GAME( 1989, dbldynj, dynduke, dbldyn, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "The Double Dynamites (Japan)", 0 ) -GAME( 1989, dbldynu, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu (Fabtek license)", "The Double Dynamites (US)", 0 ) +GAME( 1989, dynduke, 0, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1989, dyndukea, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Europe set 2)", GAME_SUPPORTS_SAVE ) +GAME( 1989, dyndukej, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "Dynamite Duke (Japan)", GAME_SUPPORTS_SAVE ) +GAME( 1989, dyndukeu, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu (Fabtek license)", "Dynamite Duke (US)", GAME_SUPPORTS_SAVE ) +GAME( 1989, dbldynj, dynduke, dbldyn, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu", "The Double Dynamites (Japan)", GAME_SUPPORTS_SAVE ) +GAME( 1989, dbldynu, dynduke, dynduke, dynduke, dynduke_state, dynduke, ROT0, "Seibu Kaihatsu (Fabtek license)", "The Double Dynamites (US)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ecoinf1.c b/src/mame/drivers/ecoinf1.c index 10d3f917e79..6de5fd27015 100644 --- a/src/mame/drivers/ecoinf1.c +++ b/src/mame/drivers/ecoinf1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Electrocoin Older (original?) HW type this appears to be the earliest of the Electrocoin hardware diff --git a/src/mame/drivers/ecoinf2.c b/src/mame/drivers/ecoinf2.c index 735b2a1d7fe..e5020d27760 100644 --- a/src/mame/drivers/ecoinf2.c +++ b/src/mame/drivers/ecoinf2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Electrocoin 'OXO' hardware type (Phoenix?) at least some of these are multiple part cabs, with both top and bottom units all linked together diff --git a/src/mame/drivers/ecoinf3.c b/src/mame/drivers/ecoinf3.c index 13082451168..f324c8825dd 100644 --- a/src/mame/drivers/ecoinf3.c +++ b/src/mame/drivers/ecoinf3.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Electrocoin Pyramid HW type */ // this seems to not like our Z180 timers much? (or wants a 10ms interrupt externally?) diff --git a/src/mame/drivers/ecoinfr.c b/src/mame/drivers/ecoinfr.c index ed2aec706a6..2801206c24d 100644 --- a/src/mame/drivers/ecoinfr.c +++ b/src/mame/drivers/ecoinfr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Electrocoin Fruit Machines This seems to be the most common Electrocoin hardware type, used diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index bdff3e2ec10..b4b47eb3dfe 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/electra.c b/src/mame/drivers/electra.c index e72e3daf508..9dde18b782a 100644 --- a/src/mame/drivers/electra.c +++ b/src/mame/drivers/electra.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Electra discrete hardware games diff --git a/src/mame/drivers/embargo.c b/src/mame/drivers/embargo.c index b4c7ac4a36d..d5f919e4012 100644 --- a/src/mame/drivers/embargo.c +++ b/src/mame/drivers/embargo.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Cinematronics Embargo driver diff --git a/src/mame/drivers/eolithsp.c b/src/mame/drivers/eolithsp.c index 217b6c9519d..ace5a16201a 100644 --- a/src/mame/drivers/eolithsp.c +++ b/src/mame/drivers/eolithsp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Eolith Speedup Handling */ /* diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index 534f91bc316..514b310360f 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -412,7 +412,7 @@ TIMER_CALLBACK_MEMBER(equites_state::equites_frq_adjuster_callback) m_cymvol *= 0.94f; m_hihatvol *= 0.94f; - m_msm->set_output_gain(10, m_hihatvol + m_cymvol * (m_ay_port_b & 3) * 0.33); /* NO from msm5232 */ + m_msm->set_output_gain(10, m_hihatvol + m_cymvol * (m_ay_port_b & 3) * 0.33f); /* NO from msm5232 */ } WRITE8_MEMBER(equites_state::equites_c0f8_w) diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c index d2d09db332b..05c43782f24 100644 --- a/src/mame/drivers/espial.c +++ b/src/mame/drivers/espial.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** Espial hardware games diff --git a/src/mame/drivers/esripsys.c b/src/mame/drivers/esripsys.c index 4abed79e6b8..1333ac7b05b 100644 --- a/src/mame/drivers/esripsys.c +++ b/src/mame/drivers/esripsys.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Entertainment Sciences Real-Time Image Processor (RIP) hardware diff --git a/src/mame/drivers/exedexes.c b/src/mame/drivers/exedexes.c index d52ea48f33c..45c4b028e34 100644 --- a/src/mame/drivers/exedexes.c +++ b/src/mame/drivers/exedexes.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Richard Davies /*************************************************************************** Exed Exes diff --git a/src/mame/drivers/exidyttl.c b/src/mame/drivers/exidyttl.c index 3ae5c1b0044..5ae9538d674 100644 --- a/src/mame/drivers/exidyttl.c +++ b/src/mame/drivers/exidyttl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Exidy discrete hardware games diff --git a/src/mame/drivers/expro02.c b/src/mame/drivers/expro02.c index 604e9dad1fe..cd4c5e9b617 100644 --- a/src/mame/drivers/expro02.c +++ b/src/mame/drivers/expro02.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Kaneko EXPRO-02 board diff --git a/src/mame/drivers/exterm.c b/src/mame/drivers/exterm.c index e4fb813cd76..25954087beb 100644 --- a/src/mame/drivers/exterm.c +++ b/src/mame/drivers/exterm.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari, Alex Pasadyn +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /**************************************************************************** Gottlieb Exterminator hardware diff --git a/src/mame/drivers/extrema.c b/src/mame/drivers/extrema.c index b2eb8f04091..5f737355b7a 100644 --- a/src/mame/drivers/extrema.c +++ b/src/mame/drivers/extrema.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Extrema Russian Video Fruit Machines */ /* Appear to be Z80 based, some rom scramble? diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 75908d7b33f..f05c5dfaaef 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Final Crash & other CPS1 bootlegs */ /* diff --git a/src/mame/drivers/fgoal.c b/src/mame/drivers/fgoal.c index cdeae34d78f..7238476fd78 100644 --- a/src/mame/drivers/fgoal.c +++ b/src/mame/drivers/fgoal.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Taito Field Goal driver diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c index 66943308872..93afdaf7f09 100644 --- a/src/mame/drivers/firetrk.c +++ b/src/mame/drivers/firetrk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Atari Fire Truck + Super Bug + Monte Carlo driver diff --git a/src/mame/drivers/fitfight.c b/src/mame/drivers/fitfight.c index eafbf01277a..47e718ba0cf 100644 --- a/src/mame/drivers/fitfight.c +++ b/src/mame/drivers/fitfight.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Fit of Fighting / The History of Martial Arts / 'BB' */ /* NIX or Novatecnia (both spanish) may have produced these diff --git a/src/mame/drivers/flower.c b/src/mame/drivers/flower.c index 45c4c5e2abe..d6612da69a4 100644 --- a/src/mame/drivers/flower.c +++ b/src/mame/drivers/flower.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy, David Haywood, Stephh /* Flower (c)1986 Komax (USA license) @@ -42,7 +42,6 @@ CHIP # POSITION TYPE Upright or Cocktail cabinet Two 8-Way joysticks with three (3) fire buttons each - NOTE: one cab was found to have 4-Way, so we're not 100% sure. Button 1: Laser Button 2: Missle Button 3: Cutter @@ -118,7 +117,7 @@ static ADDRESS_MAP_START( flower_cpu1_2, AS_PROGRAM, 8, flower_state ) AM_RANGE(0xa002, 0xa002) AM_WRITE(flower_maincpu_irq_ack) AM_RANGE(0xa003, 0xa003) AM_WRITE(flower_subcpu_irq_ack) AM_RANGE(0xa004, 0xa004) AM_WRITE(flower_coin_counter_w) - AM_RANGE(0xa005, 0xa005) AM_WRITENOP // subcpu nmi (unused) + AM_RANGE(0xa005, 0xa005) AM_WRITENOP // subcpu nmi (unused) AM_RANGE(0xa100, 0xa100) AM_READ_PORT("IN0CPU1") AM_RANGE(0xa101, 0xa101) AM_READ_PORT("IN1CPU1") AM_RANGE(0xa102, 0xa102) AM_READ_PORT("IN0CPU0") @@ -197,20 +196,20 @@ static INPUT_PORTS_START( flower ) PORT_DIPSETTING( 0x00, "50k, then every 80k" ) PORT_START("IN0CPU1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Laser") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Missile") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Cutter") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN1CPU1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Laser") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Missile") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Cutter") diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c index 6857112a260..2a3ffc27420 100644 --- a/src/mame/drivers/flstory.c +++ b/src/mame/drivers/flstory.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** The FairyLand Story diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index 92b5378f211..efda701ac73 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Flyball Driver diff --git a/src/mame/drivers/fresh.c b/src/mame/drivers/fresh.c index e99a340d403..59526c87361 100644 --- a/src/mame/drivers/fresh.c +++ b/src/mame/drivers/fresh.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* diff --git a/src/mame/drivers/fruitpc.c b/src/mame/drivers/fruitpc.c index 6bdb146d25c..5c652ce6ab8 100644 --- a/src/mame/drivers/fruitpc.c +++ b/src/mame/drivers/fruitpc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Carl /************************************************************************************ diff --git a/src/mame/drivers/fungames.c b/src/mame/drivers/fungames.c index 71db6236c3c..918bf73b50c 100644 --- a/src/mame/drivers/fungames.c +++ b/src/mame/drivers/fungames.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Fun Games discrete hardware games diff --git a/src/mame/drivers/funkball.c b/src/mame/drivers/funkball.c index 1996218e76e..9717fe4bf8c 100644 --- a/src/mame/drivers/funkball.c +++ b/src/mame/drivers/funkball.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Phil Bennett +// copyright-holders:Angelo Salese, Philip Bennett // dgPIX 'VRender 2 Beta Rev4' hardware // MEDIAGX CPU + 3dFX VooDoo chipset diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c index 3b28879d23e..acf4134b867 100644 --- a/src/mame/drivers/funworld.c +++ b/src/mame/drivers/funworld.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:Roberto Fresca +// copyright-holders:Roberto Fresca, Peter Ferrie /********************************************************************************** Fun World / TAB / Impera diff --git a/src/mame/drivers/funybubl.c b/src/mame/drivers/funybubl.c index 71fbbc9e20d..88f949c898b 100644 --- a/src/mame/drivers/funybubl.c +++ b/src/mame/drivers/funybubl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Funny Bubble ... diff --git a/src/mame/drivers/fuukifg3.c b/src/mame/drivers/fuukifg3.c index 59e1ba8efc2..6de2951bd07 100644 --- a/src/mame/drivers/fuukifg3.c +++ b/src/mame/drivers/fuukifg3.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Paul Priest, David Haywood +// license:BSD-3-Clause +// copyright-holders:Paul Priest, David Haywood, Luca Elia /*************************************************************************** -= Fuuki 32 Bit Games (FG-3) =- diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c index 3a70f0efed0..f847df3b44a 100644 --- a/src/mame/drivers/gaiden.c +++ b/src/mame/drivers/gaiden.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Ninja Gaiden memory map (preliminary) diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c index 9ddb0e1805d..2a126f9fa73 100644 --- a/src/mame/drivers/galaxia.c +++ b/src/mame/drivers/galaxia.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Galaxia Galaxia by Zaccaria (1979) diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index bea017f7756..b99550543ff 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Galaxian/Moon Cresta hardware diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c index c5712609f89..815e92bd643 100644 --- a/src/mame/drivers/galpani3.c +++ b/src/mame/drivers/galpani3.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Gals Panic 3 diff --git a/src/mame/drivers/gambl186.c b/src/mame/drivers/gambl186.c index 75841592981..7040af2f253 100644 --- a/src/mame/drivers/gambl186.c +++ b/src/mame/drivers/gambl186.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Angelo Salese, Roberto Fresca, Peter Ferrie /*********************************************************************************** Multi Game - EGD, 1997 @@ -146,7 +146,7 @@ READ16_MEMBER(gambl186_state::comms_r) case 5: { m_comms_expect = 13; - m_comms_blocks = 5; + m_comms_blocks = 4; break; } @@ -226,9 +226,14 @@ READ16_MEMBER(gambl186_state::comms_r) { m_comms_expect = 3; - if (m_comms_blocks < 5) + if (m_comms_blocks < 4) { m_comms_data[m_comms_ind] += 5; //compensate for ack + + if (m_comms_blocks == 2) + { + m_comms_expect = 2; + } } break; @@ -506,5 +511,6 @@ ROM_START( gambl186a ) ROM_END -GAME( 1997, gambl186, 0, gambl186, gambl186, driver_device, 0, ROT0, "EGD", "Multi Game (V398)", GAME_NOT_WORKING | GAME_NO_SOUND ) -GAME( 199?, gambl186a, gambl186, gambl186, gambl186, driver_device, 0, ROT0, "EGD", "Multi Game (V399)", GAME_NOT_WORKING | GAME_NO_SOUND ) +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ +GAME( 1997, gambl186, 0, gambl186, gambl186, driver_device, 0, ROT0, "EGD", "Multi Game (V398)", GAME_NOT_WORKING | GAME_NO_SOUND ) +GAME( 199?, gambl186a, gambl186, gambl186, gambl186, driver_device, 0, ROT0, "EGD", "Multi Game (V399)", GAME_NOT_WORKING | GAME_NO_SOUND ) diff --git a/src/mame/drivers/gamtor.c b/src/mame/drivers/gamtor.c index 2f5338b8f6b..f9395fb73c4 100644 --- a/src/mame/drivers/gamtor.c +++ b/src/mame/drivers/gamtor.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Novomatic CoolFire I */ /* Austrian gaming system - used late 2002 - early 2008? */ diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c index dea8a95e55d..252b4cb663c 100644 --- a/src/mame/drivers/gcpinbal.c +++ b/src/mame/drivers/gcpinbal.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves, R. Belmont /*************************************************************************** Grand Cross Pinball diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c index 37ce354bf73..91c1fd09a47 100644 --- a/src/mame/drivers/ghosteo.c +++ b/src/mame/drivers/ghosteo.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Tim Schuerewegen /************************************************************************ Eolith Ghost Hardware driver diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index 4522c31aeeb..0c66bf987f6 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /*************************************************************************** G.I. Joe (c) 1992 Konami diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c index 875818142ee..482c56808c7 100644 --- a/src/mame/drivers/gladiatr.c +++ b/src/mame/drivers/gladiatr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Victor Trucco,Steve Ellenoff,Phil Stroffolino,Tatsuyuki Satoh,Tomasz Slanina,Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/globalfr.c b/src/mame/drivers/globalfr.c index f4b03907bfa..5aca2c2c2bb 100644 --- a/src/mame/drivers/globalfr.c +++ b/src/mame/drivers/globalfr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /******************************************************************************* Global Games 'Stealth' Hardware diff --git a/src/mame/drivers/globalvr.c b/src/mame/drivers/globalvr.c index a5052c251a8..0489eaab990 100644 --- a/src/mame/drivers/globalvr.c +++ b/src/mame/drivers/globalvr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Scott Stone /* Global VR - PC-Based Hardware Skeleton only at this time holding info regarding Install Disks diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 08fba1059e1..714f740f0ec 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c index 6538e984750..9c93bbbb93f 100644 --- a/src/mame/drivers/goldstar.c +++ b/src/mame/drivers/goldstar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca /*************************************************************************** diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c index eed4ba3d0f7..8e96ae7b36f 100644 --- a/src/mame/drivers/gomoku.c +++ b/src/mame/drivers/gomoku.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /****************************************************************************** diff --git a/src/mame/drivers/good.c b/src/mame/drivers/good.c index 24d22946082..169792cd78b 100644 --- a/src/mame/drivers/good.c +++ b/src/mame/drivers/good.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* 'Good' Driver by David Haywood diff --git a/src/mame/drivers/goodejan.c b/src/mame/drivers/goodejan.c index c09c2e56057..2559538edcc 100644 --- a/src/mame/drivers/goodejan.c +++ b/src/mame/drivers/goodejan.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /****************************************************************************************** Seibu Mahjong games (distributed by Tecmo) diff --git a/src/mame/drivers/gstream.c b/src/mame/drivers/gstream.c index 39e0aaf4df8..b21492213d2 100644 --- a/src/mame/drivers/gstream.c +++ b/src/mame/drivers/gstream.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /******************************************************************** G-Stream (c)2002 Oriental Soft Japan diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c index f112769a5f8..c8577e644f8 100644 --- a/src/mame/drivers/gstriker.c +++ b/src/mame/drivers/gstriker.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch, David Haywood /*** DRIVER INFO ************************************************************** diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c index 2c07db34a79..1a284d57c9a 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** JPM Give us a Break hardware diff --git a/src/mame/drivers/gumbo.c b/src/mame/drivers/gumbo.c index 50f8f3956be..cf644396194 100644 --- a/src/mame/drivers/gumbo.c +++ b/src/mame/drivers/gumbo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c index 25f10ded9e4..d9fa91696a2 100644 --- a/src/mame/drivers/gyruss.c +++ b/src/mame/drivers/gyruss.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Gyruss memory map (preliminary) diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index 631976c8a67..16cc4337d19 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Acho A. Tang /* Halley's Comet, 1986 Taito diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c index 3f0dd16556c..43238a42336 100644 --- a/src/mame/drivers/harddriv.c +++ b/src/mame/drivers/harddriv.c @@ -5148,7 +5148,7 @@ void harddriv_state::init_hdrivairp(void) * *************************************/ -GAME( 1999, harddriv, 0, harddriv_machine, harddriv, driver_device, 0, ROT0, "Atari Games", "Hard Drivin' (cockpit, rev 7)", 0 ) +GAME( 1988, harddriv, 0, harddriv_machine, harddriv, driver_device, 0, ROT0, "Atari Games", "Hard Drivin' (cockpit, rev 7)", 0 ) GAME( 1988, harddrivb, harddriv, harddriv_machine, harddriv, driver_device, 0, ROT0, "Atari Games", "Hard Drivin' (cockpit, British, rev 7)", 0 ) GAME( 1988, harddrivg, harddriv, harddriv_machine, harddriv, driver_device, 0, ROT0, "Atari Games", "Hard Drivin' (cockpit, German, rev 7)", 0 ) GAME( 1988, harddrivj, harddriv, harddriv_machine, harddriv, driver_device, 0, ROT0, "Atari Games", "Hard Drivin' (cockpit, Japan, rev 7)", 0 ) diff --git a/src/mame/drivers/hazelgr.c b/src/mame/drivers/hazelgr.c index 0a366408752..a97bfaf4a94 100644 --- a/src/mame/drivers/hazelgr.c +++ b/src/mame/drivers/hazelgr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Hazel Grove Fruit Machine HW unknown platform! z80 based.. diff --git a/src/mame/drivers/hideseek.c b/src/mame/drivers/hideseek.c index d870044eeab..4bb990a197d 100644 --- a/src/mame/drivers/hideseek.c +++ b/src/mame/drivers/hideseek.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Guru /* Hide & Seek the AG-2 AX51201 should be the follow-up to the AG-1 AX51101 in gunpey.c diff --git a/src/mame/drivers/hikaru.c b/src/mame/drivers/hikaru.c index 55fa23032da..e2dd7b80466 100644 --- a/src/mame/drivers/hikaru.c +++ b/src/mame/drivers/hikaru.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega Hikaru / 'Samurai' */ /* diff --git a/src/mame/drivers/holeland.c b/src/mame/drivers/holeland.c index 4bc23ac106f..c81e97ee057 100644 --- a/src/mame/drivers/holeland.c +++ b/src/mame/drivers/holeland.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c index 74c43de0e71..8283c48693b 100644 --- a/src/mame/drivers/hotblock.c +++ b/src/mame/drivers/hotblock.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* HotBlock board diff --git a/src/mame/drivers/hotstuff.c b/src/mame/drivers/hotstuff.c index ed9e37502a1..f17b35ff388 100644 --- a/src/mame/drivers/hotstuff.c +++ b/src/mame/drivers/hotstuff.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* TAS 5 REEL system? by Olympic Video Gaming */ #include "emu.h" diff --git a/src/mame/drivers/hshavoc.c b/src/mame/drivers/hshavoc.c index 4b872bd732f..105a8183252 100644 --- a/src/mame/drivers/hshavoc.c +++ b/src/mame/drivers/hshavoc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* High Seas Havoc diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c index 45f509237c0..81d179ab26e 100644 --- a/src/mame/drivers/hvyunit.c +++ b/src/mame/drivers/hvyunit.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Angelo Salese, Tomasz Slanina, David Haywood /*************************************************************************************** Heavy Unit diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 20ec5dfafe5..2150dc9c0ef 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz) diff --git a/src/mame/drivers/ichiban.c b/src/mame/drivers/ichiban.c index a40de833356..9306da356cb 100644 --- a/src/mame/drivers/ichiban.c +++ b/src/mame/drivers/ichiban.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Guru /*************************************************************************** Ichi Ban Jyan diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c index 7e611e792cb..fdb289f6632 100644 --- a/src/mame/drivers/igs009.c +++ b/src/mame/drivers/igs009.c @@ -37,52 +37,61 @@ class igs009_state : public driver_device public: igs009_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_bg_scroll(*this, "bg_scroll"), - m_gp98_reel1_ram(*this, "gp98_reel1_ram"), - m_gp98_reel2_ram(*this, "gp98_reel2_ram"), - m_gp98_reel3_ram(*this, "gp98_reel3_ram"), - m_gp98_reel4_ram(*this, "gp98_reel4_ram"), - m_bg_scroll2(*this, "bg_scroll2"), - m_fg_tile_ram(*this, "fg_tile_ram"), - m_fg_color_ram(*this, "fg_color_ram"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_bg_scroll(*this, "bg_scroll"), + m_reel1_ram(*this, "reel1_ram"), + m_reel2_ram(*this, "reel2_ram"), + m_reel3_ram(*this, "reel3_ram"), + m_reel4_ram(*this, "reel4_ram"), + m_bg_scroll2(*this, "bg_scroll2"), + m_fg_tile_ram(*this, "fg_tile_ram"), + m_fg_color_ram(*this, "fg_color_ram") { } + + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; required_shared_ptr<UINT8> m_bg_scroll; - required_shared_ptr<UINT8> m_gp98_reel1_ram; - required_shared_ptr<UINT8> m_gp98_reel2_ram; - required_shared_ptr<UINT8> m_gp98_reel3_ram; - required_shared_ptr<UINT8> m_gp98_reel4_ram; + required_shared_ptr<UINT8> m_reel1_ram; + required_shared_ptr<UINT8> m_reel2_ram; + required_shared_ptr<UINT8> m_reel3_ram; + required_shared_ptr<UINT8> m_reel4_ram; required_shared_ptr<UINT8> m_bg_scroll2; required_shared_ptr<UINT8> m_fg_tile_ram; required_shared_ptr<UINT8> m_fg_color_ram; - tilemap_t *m_gp98_reel1_tilemap; - tilemap_t *m_gp98_reel2_tilemap; - tilemap_t *m_gp98_reel3_tilemap; - tilemap_t *m_gp98_reel4_tilemap; + + tilemap_t *m_reel1_tilemap; + tilemap_t *m_reel2_tilemap; + tilemap_t *m_reel3_tilemap; + tilemap_t *m_reel4_tilemap; tilemap_t *m_fg_tilemap; int m_video_enable; int m_nmi_enable; int m_hopper; UINT8 m_out[3]; UINT8 m_igs_magic[2]; - DECLARE_WRITE8_MEMBER(gp98_reel1_ram_w); - DECLARE_WRITE8_MEMBER(gp98_reel2_ram_w); - DECLARE_WRITE8_MEMBER(gp98_reel3_ram_w); - DECLARE_WRITE8_MEMBER(gp98_reel4_ram_w); + + DECLARE_WRITE8_MEMBER(reel1_ram_w); + DECLARE_WRITE8_MEMBER(reel2_ram_w); + DECLARE_WRITE8_MEMBER(reel3_ram_w); + DECLARE_WRITE8_MEMBER(reel4_ram_w); DECLARE_WRITE8_MEMBER(bg_scroll_w); DECLARE_WRITE8_MEMBER(fg_tile_w); DECLARE_WRITE8_MEMBER(fg_color_w); - DECLARE_WRITE8_MEMBER(jingbell_nmi_and_coins_w); - DECLARE_WRITE8_MEMBER(jingbell_video_and_leds_w); - DECLARE_WRITE8_MEMBER(jingbell_leds_w); - DECLARE_WRITE8_MEMBER(jingbell_magic_w); - DECLARE_READ8_MEMBER(jingbell_magic_r); + DECLARE_WRITE8_MEMBER(nmi_and_coins_w); + DECLARE_WRITE8_MEMBER(video_and_leds_w); + DECLARE_WRITE8_MEMBER(leds_w); + DECLARE_WRITE8_MEMBER(magic_w); + DECLARE_READ8_MEMBER(magic_r); + void show_out(); DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); - DECLARE_DRIVER_INIT(jingbell); + INTERRUPT_GEN_MEMBER(interrupt); + TILE_GET_INFO_MEMBER(get_jingbell_reel1_tile_info); TILE_GET_INFO_MEMBER(get_gp98_reel1_tile_info); TILE_GET_INFO_MEMBER(get_jingbell_reel2_tile_info); @@ -92,15 +101,14 @@ public: TILE_GET_INFO_MEMBER(get_jingbell_reel4_tile_info); TILE_GET_INFO_MEMBER(get_gp98_reel4_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); + + DECLARE_DRIVER_INIT(jingbell); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_VIDEO_START(gp98); - UINT32 screen_update_jingbell(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(jingbell_interrupt); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -110,15 +118,15 @@ public: -WRITE8_MEMBER(igs009_state::gp98_reel1_ram_w) +WRITE8_MEMBER(igs009_state::reel1_ram_w) { - m_gp98_reel1_ram[offset] = data; - m_gp98_reel1_tilemap->mark_tile_dirty(offset); + m_reel1_ram[offset] = data; + m_reel1_tilemap->mark_tile_dirty(offset); } TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel1_tile_info) { - int code = m_gp98_reel1_ram[tile_index]; + int code = m_reel1_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code)+(((tile_index+1)&0x3)*0x100), @@ -129,7 +137,7 @@ TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel1_tile_info) TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel1_tile_info) { - int code = m_gp98_reel1_ram[tile_index]; + int code = m_reel1_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code*4)+(tile_index&0x3), @@ -138,15 +146,15 @@ TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel1_tile_info) } -WRITE8_MEMBER(igs009_state::gp98_reel2_ram_w) +WRITE8_MEMBER(igs009_state::reel2_ram_w) { - m_gp98_reel2_ram[offset] = data; - m_gp98_reel2_tilemap->mark_tile_dirty(offset); + m_reel2_ram[offset] = data; + m_reel2_tilemap->mark_tile_dirty(offset); } TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel2_tile_info) { - int code = m_gp98_reel2_ram[tile_index]; + int code = m_reel2_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code)+(((tile_index+1)&0x3)*0x100), @@ -156,7 +164,7 @@ TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel2_tile_info) TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel2_tile_info) { - int code = m_gp98_reel2_ram[tile_index]; + int code = m_reel2_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code*4)+(tile_index&0x3), @@ -166,15 +174,15 @@ TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel2_tile_info) -WRITE8_MEMBER(igs009_state::gp98_reel3_ram_w) +WRITE8_MEMBER(igs009_state::reel3_ram_w) { - m_gp98_reel3_ram[offset] = data; - m_gp98_reel3_tilemap->mark_tile_dirty(offset); + m_reel3_ram[offset] = data; + m_reel3_tilemap->mark_tile_dirty(offset); } TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel3_tile_info) { - int code = m_gp98_reel3_ram[tile_index]; + int code = m_reel3_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code)+(((tile_index+1)&0x3)*0x100), @@ -184,7 +192,7 @@ TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel3_tile_info) TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel3_tile_info) { - int code = m_gp98_reel3_ram[tile_index]; + int code = m_reel3_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code*4)+(tile_index&0x3), @@ -194,15 +202,15 @@ TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel3_tile_info) -WRITE8_MEMBER(igs009_state::gp98_reel4_ram_w) +WRITE8_MEMBER(igs009_state::reel4_ram_w) { - m_gp98_reel4_ram[offset] = data; - m_gp98_reel4_tilemap->mark_tile_dirty(offset); + m_reel4_ram[offset] = data; + m_reel4_tilemap->mark_tile_dirty(offset); } TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel4_tile_info) { - int code = m_gp98_reel4_ram[tile_index]; + int code = m_reel4_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code)+(((tile_index+1)&0x3)*0x100), @@ -212,7 +220,7 @@ TILE_GET_INFO_MEMBER(igs009_state::get_jingbell_reel4_tile_info) TILE_GET_INFO_MEMBER(igs009_state::get_gp98_reel4_tile_info) { - int code = m_gp98_reel4_ram[tile_index]; + int code = m_reel4_ram[tile_index]; SET_TILE_INFO_MEMBER(0, (code*4)+(tile_index&0x3), @@ -256,15 +264,15 @@ void igs009_state::video_start() m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 0x80,0x20); m_fg_tilemap->set_transparent_pen(0); - m_gp98_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel2_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel3_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel4_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel4_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel2_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel3_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel4_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_jingbell_reel4_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel1_tilemap->set_scroll_cols(128); - m_gp98_reel2_tilemap->set_scroll_cols(128); - m_gp98_reel3_tilemap->set_scroll_cols(128); - m_gp98_reel4_tilemap->set_scroll_cols(128); + m_reel1_tilemap->set_scroll_cols(128); + m_reel2_tilemap->set_scroll_cols(128); + m_reel3_tilemap->set_scroll_cols(128); + m_reel4_tilemap->set_scroll_cols(128); } @@ -273,19 +281,19 @@ VIDEO_START_MEMBER(igs009_state,gp98) m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 0x80,0x20); m_fg_tilemap->set_transparent_pen(0); - m_gp98_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel2_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel3_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel4_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel4_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel1_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel2_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel3_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); + m_reel4_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(igs009_state::get_gp98_reel4_tile_info),this),TILEMAP_SCAN_ROWS,8,32, 128, 8); - m_gp98_reel1_tilemap->set_scroll_cols(128); - m_gp98_reel2_tilemap->set_scroll_cols(128); - m_gp98_reel3_tilemap->set_scroll_cols(128); - m_gp98_reel4_tilemap->set_scroll_cols(128); + m_reel1_tilemap->set_scroll_cols(128); + m_reel2_tilemap->set_scroll_cols(128); + m_reel3_tilemap->set_scroll_cols(128); + m_reel4_tilemap->set_scroll_cols(128); } -UINT32 igs009_state::screen_update_jingbell(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 igs009_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int layers_ctrl = m_video_enable ? -1 : 0; @@ -309,10 +317,10 @@ UINT32 igs009_state::screen_update_jingbell(screen_device &screen, bitmap_ind16 for (i= 0;i < 0x80;i++) { - m_gp98_reel1_tilemap->set_scrolly(i, m_bg_scroll[i]*2); - m_gp98_reel2_tilemap->set_scrolly(i, m_bg_scroll[i+0x80]*2); - m_gp98_reel3_tilemap->set_scrolly(i, m_bg_scroll[i+0x100]*2); - m_gp98_reel4_tilemap->set_scrolly(i, m_bg_scroll[i+0x180]*2); + m_reel1_tilemap->set_scrolly(i, m_bg_scroll[i]*2); + m_reel2_tilemap->set_scrolly(i, m_bg_scroll[i+0x80]*2); + m_reel3_tilemap->set_scrolly(i, m_bg_scroll[i+0x100]*2); + m_reel4_tilemap->set_scrolly(i, m_bg_scroll[i+0x180]*2); } @@ -330,19 +338,19 @@ UINT32 igs009_state::screen_update_jingbell(screen_device &screen, bitmap_ind16 if (rowenable==0) { // 0 and 1 are the same? or is there a global switchoff? - m_gp98_reel1_tilemap->draw(screen, bitmap, clip, 0,0); + m_reel1_tilemap->draw(screen, bitmap, clip, 0,0); } else if (rowenable==1) { - m_gp98_reel2_tilemap->draw(screen, bitmap, clip, 0,0); + m_reel2_tilemap->draw(screen, bitmap, clip, 0,0); } else if (rowenable==2) { - m_gp98_reel3_tilemap->draw(screen, bitmap, clip, 0,0); + m_reel3_tilemap->draw(screen, bitmap, clip, 0,0); } else if (rowenable==3) { - m_gp98_reel4_tilemap->draw(screen, bitmap, clip, 0,0); + m_reel4_tilemap->draw(screen, bitmap, clip, 0,0); } @@ -376,7 +384,7 @@ void igs009_state::show_out() #endif } -WRITE8_MEMBER(igs009_state::jingbell_nmi_and_coins_w) +WRITE8_MEMBER(igs009_state::nmi_and_coins_w) { if ((m_nmi_enable ^ data) & (~0xdd)) { @@ -397,7 +405,7 @@ WRITE8_MEMBER(igs009_state::jingbell_nmi_and_coins_w) show_out(); } -WRITE8_MEMBER(igs009_state::jingbell_video_and_leds_w) +WRITE8_MEMBER(igs009_state::video_and_leds_w) { set_led_status(machine(), 4, data & 0x01); // start? set_led_status(machine(), 5, data & 0x04); // l_bet? @@ -409,7 +417,7 @@ WRITE8_MEMBER(igs009_state::jingbell_video_and_leds_w) show_out(); } -WRITE8_MEMBER(igs009_state::jingbell_leds_w) +WRITE8_MEMBER(igs009_state::leds_w) { set_led_status(machine(), 0, data & 0x01); // stop_1 set_led_status(machine(), 1, data & 0x02); // stop_2 @@ -422,7 +430,7 @@ WRITE8_MEMBER(igs009_state::jingbell_leds_w) } -WRITE8_MEMBER(igs009_state::jingbell_magic_w) +WRITE8_MEMBER(igs009_state::magic_w) { m_igs_magic[offset] = data; @@ -440,7 +448,7 @@ WRITE8_MEMBER(igs009_state::jingbell_magic_w) } } -READ8_MEMBER(igs009_state::jingbell_magic_r) +READ8_MEMBER(igs009_state::magic_r) { switch(m_igs_magic[0]) { @@ -476,29 +484,29 @@ static ADDRESS_MAP_START( jingbell_portmap, AS_IO, 8, igs009_state ) AM_RANGE( 0x2000, 0x23ff ) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE( 0x2400, 0x27ff ) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") - AM_RANGE( 0x3000, 0x33ff ) AM_RAM_WRITE(gp98_reel1_ram_w ) AM_SHARE("gp98_reel1_ram") - AM_RANGE( 0x3400, 0x37ff ) AM_RAM_WRITE(gp98_reel2_ram_w ) AM_SHARE("gp98_reel2_ram") - AM_RANGE( 0x3800, 0x3bff ) AM_RAM_WRITE(gp98_reel3_ram_w ) AM_SHARE("gp98_reel3_ram") - AM_RANGE( 0x3c00, 0x3fff ) AM_RAM_WRITE(gp98_reel4_ram_w ) AM_SHARE("gp98_reel4_ram") + AM_RANGE( 0x3000, 0x33ff ) AM_RAM_WRITE(reel1_ram_w ) AM_SHARE("reel1_ram") + AM_RANGE( 0x3400, 0x37ff ) AM_RAM_WRITE(reel2_ram_w ) AM_SHARE("reel2_ram") + AM_RANGE( 0x3800, 0x3bff ) AM_RAM_WRITE(reel3_ram_w ) AM_SHARE("reel3_ram") + AM_RANGE( 0x3c00, 0x3fff ) AM_RAM_WRITE(reel4_ram_w ) AM_SHARE("reel4_ram") AM_RANGE( 0x4000, 0x407f ) AM_RAM AM_SHARE("bg_scroll2") AM_RANGE( 0x5000, 0x5fff ) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram") - AM_RANGE( 0x6480, 0x6480 ) AM_WRITE(jingbell_nmi_and_coins_w ) + AM_RANGE( 0x6480, 0x6480 ) AM_WRITE(nmi_and_coins_w ) AM_RANGE( 0x6481, 0x6481 ) AM_READ_PORT( "SERVICE" ) AM_RANGE( 0x6482, 0x6482 ) AM_READ_PORT( "COINS" ) AM_RANGE( 0x6490, 0x6490 ) AM_READ_PORT( "BUTTONS1" ) - AM_RANGE( 0x6491, 0x6491 ) AM_WRITE(jingbell_video_and_leds_w ) - AM_RANGE( 0x6492, 0x6492 ) AM_WRITE(jingbell_leds_w ) + AM_RANGE( 0x6491, 0x6491 ) AM_WRITE(video_and_leds_w ) + AM_RANGE( 0x6492, 0x6492 ) AM_WRITE(leds_w ) AM_RANGE( 0x64a0, 0x64a0 ) AM_READ_PORT( "BUTTONS2" ) AM_RANGE( 0x64b0, 0x64b1 ) AM_DEVWRITE("ymsnd", ym2413_device, write) AM_RANGE( 0x64c0, 0x64c0 ) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE( 0x64d0, 0x64d1 ) AM_READWRITE(jingbell_magic_r, jingbell_magic_w ) // DSW1-5 + AM_RANGE( 0x64d0, 0x64d1 ) AM_READWRITE(magic_r, magic_w ) // DSW1-5 AM_RANGE( 0x7000, 0x7fff ) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram") @@ -744,6 +752,15 @@ GFXDECODE_END Machine Drivers ***************************************************************************/ +void igs009_state::machine_start() +{ + save_item(NAME(m_video_enable)); + save_item(NAME(m_nmi_enable)); + save_item(NAME(m_hopper)); + save_item(NAME(m_out)); + save_item(NAME(m_igs_magic)); +} + void igs009_state::machine_reset() { m_nmi_enable = 0; @@ -751,7 +768,7 @@ void igs009_state::machine_reset() m_video_enable = 1; } -INTERRUPT_GEN_MEMBER(igs009_state::jingbell_interrupt) +INTERRUPT_GEN_MEMBER(igs009_state::interrupt) { if (m_nmi_enable & 0x80) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); @@ -762,7 +779,7 @@ static MACHINE_CONFIG_START( jingbell, igs009_state ) MCFG_CPU_ADD("maincpu", Z180, XTAL_12MHz / 2) /* HD64180RP8, 8 MHz? */ MCFG_CPU_PROGRAM_MAP(jingbell_map) MCFG_CPU_IO_MAP(jingbell_portmap) - MCFG_CPU_VBLANK_INT_DRIVER("screen", igs009_state, jingbell_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", igs009_state, interrupt) MCFG_NVRAM_ADD_0FILL("nvram") @@ -773,7 +790,7 @@ static MACHINE_CONFIG_START( jingbell, igs009_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-16-1) - MCFG_SCREEN_UPDATE_DRIVER(igs009_state, screen_update_jingbell) + MCFG_SCREEN_UPDATE_DRIVER(igs009_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", jingbell) @@ -948,5 +965,5 @@ ROM_START( gp98 ) // no OKI on this ROM_END -GAME( 1995?, jingbell, 0, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (Italy, V133I)", 0 ) -GAME( 1998, gp98, 0, gp98, jingbell, driver_device, 0, ROT0, "Romtec Co. Ltd", "Grand Prix '98 (V100K)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS ) +GAME( 1995?, jingbell, 0, jingbell, jingbell, igs009_state, jingbell, ROT0, "IGS", "Jingle Bell (Italy, V133I)", GAME_SUPPORTS_SAVE ) +GAME( 1998, gp98, 0, gp98, jingbell, driver_device, 0, ROT0, "Romtec Co. Ltd", "Grand Prix '98 (V100K)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/igs_m027.c b/src/mame/drivers/igs_m027.c index 9fb570cc750..350e6699b5b 100644 --- a/src/mame/drivers/igs_m027.c +++ b/src/mame/drivers/igs_m027.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Xing Xing /* IGS ARM7 (IGS027A) based Mahjong / Gambling platform(s) Driver by Xing Xing diff --git a/src/mame/drivers/igs_m036.c b/src/mame/drivers/igs_m036.c index c0afd0247d6..e22bb7031f8 100644 --- a/src/mame/drivers/igs_m036.c +++ b/src/mame/drivers/igs_m036.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* IGS Gambling games using IGS036 CPU pgm2.c also uses this CPU diff --git a/src/mame/drivers/igspc.c b/src/mame/drivers/igspc.c index ef340403ae7..023e042281a 100644 --- a/src/mame/drivers/igspc.c +++ b/src/mame/drivers/igspc.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Scott Stone /* IGS PC based hardware diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index ba45cd928fd..13595ba1ef9 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** IMOLA GP by RB Bologna (Alberici?) diff --git a/src/mame/drivers/intrscti.c b/src/mame/drivers/intrscti.c index 31a5bb3decb..1c48ff75d21 100644 --- a/src/mame/drivers/intrscti.c +++ b/src/mame/drivers/intrscti.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Intersecti diff --git a/src/mame/drivers/invqix.c b/src/mame/drivers/invqix.c index 3802edfd802..90cdf22fd3d 100644 --- a/src/mame/drivers/invqix.c +++ b/src/mame/drivers/invqix.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:R. Belmont /*************************************************************************** invqix.c diff --git a/src/mame/drivers/irobot.c b/src/mame/drivers/irobot.c index a8830ea43b6..0615ecd80a2 100644 --- a/src/mame/drivers/irobot.c +++ b/src/mame/drivers/irobot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris /*************************************************************************** Atari I, Robot hardware diff --git a/src/mame/drivers/iteagle.c b/src/mame/drivers/iteagle.c index a268bda9fb9..8dd0442a7bf 100644 --- a/src/mame/drivers/iteagle.c +++ b/src/mame/drivers/iteagle.c @@ -34,19 +34,23 @@ * Creative/Ensoniq AudioPCI ES1373 audio * Atmel 90S2313 AVR-based microcontroller for protection * STM48T02 NVRAM + * AMD AM85C30 Enhanced Serial Communications Controller * Conexant CX88168 modem + Eagle 1 Notes: + * Cypress CY82C693 Peripheral Controller + * 3DFX Voodoo 1 video TODO: * Add support for Eagle 1 (Virtual Pool) PCBs - * Add support for later RED boards + * Add support for later RED boards - Notes: - Sound volume may be muted, it can be adjusted through the service menu or with volume up/down buttons (+/-) + Notes: + Sound volume may be muted, it can be adjusted through the service menu or with volume up/down buttons (+/-) - The PCB for Virtual Pool is considered "Eagle 1" while the boards - that were production runs for later games are considered Eagle 2. - IE: GT Fore! & BBH, both security chips are "E2-" as are various - preprogrammed PALs: E2-CARD1 & E2-RES3 + The PCB for Virtual Pool is considered "Eagle 1" while the boards + that were production runs for later games are considered Eagle 2. + IE: GT Fore! & BBH, both security chips are "E2-" as are various + preprogrammed PALs: E2-CARD1 & E2-RES3 ***************************************************************************/ @@ -138,6 +142,14 @@ void iteagle_state::machine_reset() { } +#define PCI_ID_IDE ":pci:06.0" +// Primary IDE Control ":pci:06.1" +// Seconday IDE Control ":pci:06.2" +#define PCI_ID_SOUND ":pci:07.0" +#define PCI_ID_FPGA ":pci:08.0" +#define PCI_ID_VIDEO ":pci:09.0" +#define PCI_ID_EEPROM ":pci:0a.0" + static MACHINE_CONFIG_START( iteagle, iteagle_state ) /* basic machine hardware */ @@ -147,91 +159,95 @@ static MACHINE_CONFIG_START( iteagle, iteagle_state ) MCFG_PCI_ROOT_ADD( ":pci") MCFG_VRC4373_ADD( ":pci:00.0", ":maincpu") - MCFG_ITEAGLE_FPGA_ADD( ":pci:06.0") - MCFG_ITEAGLE_IDE_ADD( ":pci:06.1") + MCFG_ITEAGLE_IDE_ADD( PCI_ID_IDE) MCFG_ITEAGLE_IDE_IRQ_ADD( ":maincpu", MIPS3_IRQ2) - MCFG_ES1373_ADD( ":pci:07.0") - MCFG_SOUND_ROUTE(0, ":pci:07.0:lspeaker", 1.0) - MCFG_SOUND_ROUTE(1, ":pci:07.0:rspeaker", 1.0) + MCFG_ITEAGLE_FPGA_ADD( PCI_ID_FPGA, ":maincpu", MIPS3_IRQ1) + MCFG_ES1373_ADD( PCI_ID_SOUND) + MCFG_SOUND_ROUTE(0, PCI_ID_SOUND":lspeaker", 1.0) + MCFG_SOUND_ROUTE(1, PCI_ID_SOUND":rspeaker", 1.0) MCFG_ES1373_IRQ_ADD( ":maincpu", MIPS3_IRQ3) - MCFG_VOODOO_ADD( ":pci:09.0", ":maincpu") - MCFG_ITEAGLE_EEPROM_ADD( ":pci:0a.0") + MCFG_VOODOO_PCI_ADD( PCI_ID_VIDEO, TYPE_VOODOO_3, ":maincpu") + MCFG_VOODOO_PCI_FBMEM(16) + MCFG_ITEAGLE_EEPROM_ADD( PCI_ID_EEPROM) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(59) MCFG_SCREEN_SIZE(512, 384) - MCFG_SCREEN_UPDATE_DEVICE(":pci:09.0", voodoo_pci_device, screen_update) - + MCFG_SCREEN_UPDATE_DEVICE(PCI_ID_VIDEO, voodoo_pci_device, screen_update) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore01, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000401, 0x0b0b0b) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0401, 0x7) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore02, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000402, 0x020201) MCFG_DEVICE_MODIFY(":pci:0a.0") MCFG_ITEAGLE_EEPROM_INIT(0x0402, 0x7) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore03, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000403, 0x0a0b0a) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0403, 0x7) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore04, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000404, 0x0a020b) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0404, 0x7) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore05, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000405, 0x0b0a0c) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0405, 0x7); MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore06, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000406, 0x0c0b0d) MCFG_DEVICE_MODIFY(":pci:0a.0") - MCFG_ITEAGLE_EEPROM_INIT(0x0406, 0x7); + MCFG_ITEAGLE_EEPROM_INIT(0x0406, 0x9); MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( carnking, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000603, 0x0c0b0d) - MCFG_DEVICE_MODIFY(":pci:0a.0") - MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x7) + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) + MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbhsc, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") - MCFG_ITEAGLE_FPGA_INIT(0x02000201, 0x0c0a0a) - MCFG_DEVICE_MODIFY(":pci:0a.0") - MCFG_ITEAGLE_EEPROM_INIT(0x0201, 0x7) + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) + MCFG_ITEAGLE_FPGA_INIT(0x01000600, 0x0c0a0a) + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) + MCFG_ITEAGLE_EEPROM_INIT(0x0600, 0x9) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbhcotw, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x02000603, 0x080704) MCFG_DEVICE_MODIFY(":pci:0a.0") - MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x7) + MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( virtpool, iteagle ) - MCFG_DEVICE_MODIFY(":pci:06.0") + MCFG_DEVICE_REMOVE(PCI_ID_VIDEO) + MCFG_VOODOO_PCI_ADD(PCI_ID_VIDEO, TYPE_VOODOO_1, ":maincpu") + MCFG_VOODOO_PCI_FBMEM(4) + MCFG_VOODOO_PCI_TMUMEM(4, 4) + MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000202, 0x0c0b0d) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0202, 0x7) MACHINE_CONFIG_END @@ -252,11 +268,12 @@ static INPUT_PORTS_START( iteagle ) PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Left" ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Right" ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Left/Trigger" ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Right/Pump" ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Fly By" ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Backspin" ) - PORT_BIT( 0x00c0, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -282,32 +299,21 @@ static INPUT_PORTS_START( iteagle ) PORT_DIPSETTING(0x4000, "High" ) PORT_DIPSETTING(0x0000, "Not Detected" ) -INPUT_PORTS_END - -static INPUT_PORTS_START( gtfore ) - PORT_INCLUDE(iteagle) - PORT_START("TRACKX1") PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1) PORT_START("TRACKY1") PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1) -INPUT_PORTS_END - -static INPUT_PORTS_START( carnking ) - PORT_INCLUDE(iteagle) - - PORT_START("TRACKX1") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - //PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1) + PORT_START("GUNX1") + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) - PORT_START("TRACKY1") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - //PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1) + PORT_START("GUNY1") + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) INPUT_PORTS_END + /************************************* * * ROM definition(s) @@ -337,8 +343,6 @@ INPUT_PORTS_END ROMX_LOAD( "eagle102.u15", 0x000000, 0x100000, CRC(1fd39e73) SHA1(d1ac758f94defc5c55c62594b3999a406dd9ef1f), ROM_BIOS(10) ) \ ROM_SYSTEM_BIOS( 10, "101", "bootrom 1.01" ) \ ROMX_LOAD( "eagle101.u15", 0x000000, 0x100000, CRC(2600bc2b) SHA1(c4b89e69c51e4a3bb1874407c4d30b6caed4f396), ROM_BIOS(11) ) \ - ROM_SYSTEM_BIOS( 11, "pool", "Virtual Pool bootrom" ) \ - ROMX_LOAD( "eagle1_bootrom_v1p01", 0x000000, 0x080000, CRC(6c8c1593) SHA1(707d5633388f8dd4e9252f4d8d6f27c98c2cb35a), ROM_BIOS(12) ) \ ROM_REGION( 0x30000, "fpga", 0 ) \ ROM_LOAD( "17s20lpc_sb4.u26", 0x000000, 0x008000, CRC(62c4af8a) SHA1(6eca277b9c66a401990599e98fdca64a9e38cc9a) ) \ ROM_LOAD( "17s20lpc_sb5.u26", 0x008000, 0x008000, CRC(c88b9d42) SHA1(b912d0fc50ecdc6a198c626f6e1644e8405fac6e) ) \ @@ -347,21 +351,23 @@ INPUT_PORTS_END ROM_LOAD( "e2-card1.u22.jed", 0x000000, 0x000bd1, CRC(9d1e1ace) SHA1(287d6a30e9f32137ef4eba54f0effa092c97a6eb) ) \ ROM_LOAD( "e2-res3.u117.jed", 0x001000, 0x000bd1, CRC(4f1ff45a) SHA1(213cbdd6cd37ad9b5bfc9545084892a68d29f5ff) ) - + ROM_START( iteagle ) EAGLE_BIOS - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) - //DISK_REGION( ":pci:06.1:ide:1:cdrom" ) // program CD-ROM + //DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) + //DISK_REGION( PCI_ID_IDE":ide2:1:cdrom" ) // program CD-ROM ROM_END ROM_START( virtpool ) /* On earlier Eagle 1 PCB, possibly a prototype version - later boards are known as Eagle 2 */ - EAGLE_BIOS - + ROM_REGION( 0x100000, ":pci:00.0", 0 ) /* MIPS code */ + ROM_SYSTEM_BIOS( 0, "pool", "Virtual Pool bootrom" ) + ROMX_LOAD( "eagle1_bootrom_v1p01", 0x000000, 0x080000, CRC(6c8c1593) SHA1(707d5633388f8dd4e9252f4d8d6f27c98c2cb35a), ROM_BIOS(1) ) + ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "itvp-1.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "virtualpool", 0, SHA1(be8f890c33701ca17fab8112ee6cd7b5e435d8cf) ) /* HD hand labeled 3-1-99 V.P. */ ROM_END @@ -371,7 +377,7 @@ ROM_START( carnking ) /* REQUIRES a "RED" board, will NOT work with earlier gree ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "ck1-us.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "carnival_king_v_1.00.11", 0, SHA1(c819af66d36df173ab17bf42f4045c7cca3203d8) ) /* Labeled Carnival King V 1.00.11 */ ROM_END @@ -381,7 +387,7 @@ ROM_START( gtfore01 ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "e2-led0.u53", 0x0000, 0x0880, CRC(6ec86dc6) SHA1(01665ad6d92d2b8e917e33ca705fab9258766513) ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_v1.00.25", 0, SHA1(6dc445b982aee3bab93ade5c4f5d148471939ecc) ) /* Build 19:19:59, Sep 11 2000 */ ROM_END @@ -391,7 +397,7 @@ ROM_START( gtfore02 ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g42-us-u.u53", 0x0000, 0x0880, CRC(06e0b452) SHA1(f6b865799cb94941e0e77453b9d556d5988b0194) ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2002_v2.01.06", 0, SHA1(d1363bc17337c91684148b76fa1e73ac9dd80d8f) ) /* Build 11:27:20, Nov 5 2001 */ ROM_END @@ -401,7 +407,7 @@ ROM_START( gtfore03 ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g43-us-u.u53", 0x0000, 0x0880, CRC(51c6f726) SHA1(9930337315128f89f7202893fb123ee3f0d33649) ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2003_v3.00.10", 0, SHA1(d789ef86837a5012beb224c487537dd563d93886) ) /* Build 09:36:45, Nov 7 2002 */ ROM_END @@ -411,7 +417,7 @@ ROM_START( gtfore03a ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g43-us-u.u53", 0x0000, 0x0880, CRC(51c6f726) SHA1(9930337315128f89f7202893fb123ee3f0d33649) ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2003_v3.00.09", 0, SHA1(3c9cf82c3ad87b0d6b5a21089795abd8a08f8dd2) ) /* Build 09:36:45, Oct 17 2002 */ ROM_END @@ -421,7 +427,7 @@ ROM_START( gtfore04 ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g44-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2004_v4.00.08", 0, SHA1(739a52d6ce13bb6ac7a543ee0e8086fb66be19b9) ) /* Build 14:15:44, Aug 27 2003 - Has been upgraded to Extra */ ROM_END @@ -431,7 +437,7 @@ ROM_START( gtfore04a ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g44-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2004_v4.00.00", 0, SHA1(fe7525de89d67e0e3d10c48572fd04382543c19f) ) /* Build 16:40:59, Feb 28 2003 */ ROM_END @@ -441,7 +447,7 @@ ROM_START( gtfore05 ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g45-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2005_v5.01.06", 0, SHA1(fa465263218d8e39102ec81d116c11447ef07e19) ) /* Build 10:55:49, Oct 27 2005 - Has been upgraded to Extra */ ROM_END @@ -451,7 +457,7 @@ ROM_START( gtfore05a ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g45-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2005_v5.01.02", 0, SHA1(6e20d60fb7e9ab6bf0086267fa5b4329d8a9f468) ) /* Build 15:02:32, Feb 27 2004 - Has been upgraded to Extra */ ROM_END @@ -461,7 +467,7 @@ ROM_START( gtfore05b ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g45-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2005_v5.01.00", 0, SHA1(d8de569d8cf97b5aaada10ce896eb3c75f1b37f1) ) /* Build 12:30:35, Feb 16 2004 - Has been upgraded to Extra */ ROM_END @@ -471,7 +477,7 @@ ROM_START( gtfore05c ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g45-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2005_v5.00.00", 0, SHA1(4236f57e639cae2e5a3eaa97fb24f5ff80557e84) ) /* Build 23:15:38, Jan 31 2004 - Has been upgraded to Extra */ ROM_END @@ -481,7 +487,7 @@ ROM_START( gtfore06 ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "g4c-us-u.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_complete_v6.00.01", 0, SHA1(e902b91bd739daee0b95b10e5cf33700dd63a76b) ) /* Build 09:51:13, Jan 20 2006 */ ROM_END @@ -491,7 +497,7 @@ ROM_START( bbhsc ) ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "bb15-us.u53", 0x0000, 0x0880, NO_DUMP ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "bbhsc_v1.50.07_cf", 0, SHA1(21dcf1f7e5ab901ac64e6afb099c35e273b3bf1f) ) /* Build 16:35:34, Feb 26 2002 - 4gb Compact Flash conversion */ ROM_END @@ -501,7 +507,7 @@ ROM_START( bbhcotw ) /* This version is meant for 8meg GREEN board PCBs */ ROM_REGION( 0x0880, "atmel", 0 ) /* Atmel 90S2313 AVR internal CPU code */ ROM_LOAD( "cw-us-8.u53", 0x0000, 0x0880, CRC(c5234b58) SHA1(fb47b2233147a3f633f01edebef9994c358bd162) ) - DISK_REGION( ":pci:06.1:ide2:0:hdd:image" ) + DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) DISK_IMAGE( "bbhcotw_v3.02.05_cf", 0, SHA1(b1fcaab3a5aa51821673a914333c8868d36f77ae) ) /* Build 21:00:39, Sep 10 2006 - 4gb Compact Flash conversion */ ROM_END @@ -511,19 +517,19 @@ ROM_END * *************************************/ -GAME( 2000, iteagle, 0, iteagle, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Eagle BIOS", GAME_IS_BIOS_ROOT ) -GAME( 1998, virtpool, iteagle, virtpool, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Virtual Pool", GAME_NOT_WORKING ) -GAME( 2002, carnking, iteagle, carnking, carnking, driver_device, 0, ROT0, "Incredible Technologies", "Carnival King (v1.00.11)", GAME_NOT_WORKING ) -GAME( 2000, gtfore01, iteagle, gtfore01, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! (v1.00.25)", 0 ) -GAME( 2001, gtfore02, iteagle, gtfore02, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2002 (v2.01.06)", 0 ) -GAME( 2002, gtfore03, iteagle, gtfore03, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2003 (v3.00.10)", 0 ) -GAME( 2002, gtfore03a, gtfore03, gtfore03, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2003 (v3.00.09)", 0 ) -GAME( 2003, gtfore04, iteagle, gtfore04, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2004 Extra (v4.00.08)", 0 ) -GAME( 2003, gtfore04a, gtfore04, gtfore04, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2004 (v4.00.00)", 0 ) -GAME( 2004, gtfore05, iteagle, gtfore05, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.06)", 0 ) -GAME( 2004, gtfore05a, gtfore05, gtfore05, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.02)", 0 ) -GAME( 2004, gtfore05b, gtfore05, gtfore05, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.00)", 0 ) -GAME( 2004, gtfore05c, gtfore05, gtfore05, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.00.00)", 0 ) -GAME( 2005, gtfore06, iteagle, gtfore06, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2006 Complete (v6.00.01)", 0 ) -GAME( 2002, bbhsc, iteagle, bbhsc, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter - Shooter's Challenge (v1.50.07)", GAME_NOT_WORKING ) -GAME( 2006, bbhcotw, iteagle, bbhcotw, gtfore, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter Call of the Wild (v3.02.5)", GAME_NOT_WORKING ) +GAME( 2000, iteagle, 0, iteagle, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Eagle BIOS", GAME_IS_BIOS_ROOT ) +GAME( 1998, virtpool, iteagle, virtpool, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Virtual Pool", GAME_NOT_WORKING ) +GAME( 2002, carnking, iteagle, carnking, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Carnival King (v1.00.11)", GAME_NOT_WORKING ) +GAME( 2000, gtfore01, iteagle, gtfore01, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! (v1.00.25)", 0 ) +GAME( 2001, gtfore02, iteagle, gtfore02, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2002 (v2.01.06)", 0 ) +GAME( 2002, gtfore03, iteagle, gtfore03, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2003 (v3.00.10)", 0 ) +GAME( 2002, gtfore03a, gtfore03, gtfore03, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2003 (v3.00.09)", 0 ) +GAME( 2003, gtfore04, iteagle, gtfore04, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2004 Extra (v4.00.08)", 0 ) +GAME( 2003, gtfore04a, gtfore04, gtfore04, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2004 (v4.00.00)", 0 ) +GAME( 2004, gtfore05, iteagle, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.06)", 0 ) +GAME( 2004, gtfore05a, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.02)", 0 ) +GAME( 2004, gtfore05b, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.00)", 0 ) +GAME( 2004, gtfore05c, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.00.00)", 0 ) +GAME( 2005, gtfore06, iteagle, gtfore06, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2006 Complete (v6.00.01)", 0 ) +GAME( 2002, bbhsc, iteagle, bbhsc, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter - Shooter's Challenge (v1.50.07)", GAME_NOT_WORKING ) +GAME( 2006, bbhcotw, iteagle, bbhcotw, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter Call of the Wild (v3.02.5)", GAME_NOT_WORKING ) diff --git a/src/mame/drivers/itgamble.c b/src/mame/drivers/itgamble.c index 7294faf9163..043963046a6 100644 --- a/src/mame/drivers/itgamble.c +++ b/src/mame/drivers/itgamble.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /****************************************************************** Nazionale Elettronica + others (mostly Italian) Gambling games diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c index 44d71932a37..85d42992ae7 100644 --- a/src/mame/drivers/jangou.c +++ b/src/mame/drivers/jangou.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood, Angelo Salese, Phil Bennett +// copyright-holders:David Haywood, Angelo Salese, Philip Bennett /******************************************************************************************* Jangou (c) 1983 Nichibutsu diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c index 4f8bcff8470..40294bcf10a 100644 --- a/src/mame/drivers/jchan.c +++ b/src/mame/drivers/jchan.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Jackie Chan The Kung-Fu Master diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c index 5f2fc339a8a..5b13a9ee921 100644 --- a/src/mame/drivers/jongkyo.c +++ b/src/mame/drivers/jongkyo.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Nicola Salmoria /********************************************************** Jongkyo diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c index e9127eda62c..47fe3e69d45 100644 --- a/src/mame/drivers/jpmimpct.c +++ b/src/mame/drivers/jpmimpct.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** JPM IMPACT (aka System 6) diff --git a/src/mame/drivers/jpmimpctsw.c b/src/mame/drivers/jpmimpctsw.c index 354f8dae8ef..de6b28e67f8 100644 --- a/src/mame/drivers/jpmimpctsw.c +++ b/src/mame/drivers/jpmimpctsw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************************************** JPM Impact non-video software **************************************************************************************************/ diff --git a/src/mame/drivers/jpmmps.c b/src/mame/drivers/jpmmps.c index 9c865045a4a..6feb43b4a7a 100644 --- a/src/mame/drivers/jpmmps.c +++ b/src/mame/drivers/jpmmps.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* JPM MPS1/2 Hardware TMS9995 CPU diff --git a/src/mame/drivers/jpms80.c b/src/mame/drivers/jpms80.c index 3399bffbbbc..584720cb843 100644 --- a/src/mame/drivers/jpms80.c +++ b/src/mame/drivers/jpms80.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* JPM System 80 Hardware TMS9995 CPU diff --git a/src/mame/drivers/jpmsru.c b/src/mame/drivers/jpmsru.c index 0128f29bee2..52d93590b1d 100644 --- a/src/mame/drivers/jpmsru.c +++ b/src/mame/drivers/jpmsru.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /********************************************************************** JPM S.R.U Hardware diff --git a/src/mame/drivers/jpmsys5.c b/src/mame/drivers/jpmsys5.c index b5882ab4e06..0d52dead2ee 100644 --- a/src/mame/drivers/jpmsys5.c +++ b/src/mame/drivers/jpmsys5.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Phil Bennett, J.Wallace, David Haywood +// copyright-holders:Philip Bennett, J.Wallace, David Haywood /*************************************************************************** JPM System 5 diff --git a/src/mame/drivers/jpmsys5sw.c b/src/mame/drivers/jpmsys5sw.c index c6912eb38ce..da92b96b80f 100644 --- a/src/mame/drivers/jpmsys5sw.c +++ b/src/mame/drivers/jpmsys5sw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************************************** JPM System 5 non-video software diff --git a/src/mame/drivers/jpmsys7.c b/src/mame/drivers/jpmsys7.c index 90618f79e67..238886497c1 100644 --- a/src/mame/drivers/jpmsys7.c +++ b/src/mame/drivers/jpmsys7.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Unkonwn JPM Platform */ /* only Ker - Chinq has sound roms, they seem to map in cpu space, sound roms are probably missing from the rest? */ diff --git a/src/mame/drivers/jrpacman.c b/src/mame/drivers/jrpacman.c index 57dc8b52d9e..6c596be8ae9 100644 --- a/src/mame/drivers/jrpacman.c +++ b/src/mame/drivers/jrpacman.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Bally/Midway Jr. Pac-Man diff --git a/src/mame/drivers/kenseim.c b/src/mame/drivers/kenseim.c index 0f64107f7f3..09e1084f1f2 100644 --- a/src/mame/drivers/kenseim.c +++ b/src/mame/drivers/kenseim.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, hap /* Ken Sei Mogura: Street Fighter II aka Street Fighter II Whack-a-mole game */ diff --git a/src/mame/drivers/kickgoal.c b/src/mame/drivers/kickgoal.c index b63e3c9243f..4649429370b 100644 --- a/src/mame/drivers/kickgoal.c +++ b/src/mame/drivers/kickgoal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Driver Info diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index 005cf8b538d..cdc72258e99 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Acho A. Tang, Phil Stroffolino, Olivier Galibert /************************************************************************** * diff --git a/src/mame/drivers/konendev.c b/src/mame/drivers/konendev.c index 872c6e872d0..216b9dd4158 100644 --- a/src/mame/drivers/konendev.c +++ b/src/mame/drivers/konendev.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Konami Endeavour hardware (gambling games) diff --git a/src/mame/drivers/kopunch.c b/src/mame/drivers/kopunch.c index 8f9d495d6ce..cec9e36ea8a 100644 --- a/src/mame/drivers/kopunch.c +++ b/src/mame/drivers/kopunch.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /******************************************************** KO Punch (c) 1981 Sega diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index 9e6ac7b3e68..3a03be090d0 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/liberatr.c b/src/mame/drivers/liberatr.c index 8bb0cf1f6b0..e40c3d192d2 100644 --- a/src/mame/drivers/liberatr.c +++ b/src/mame/drivers/liberatr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Liberator hardware diff --git a/src/mame/drivers/lindbergh.c b/src/mame/drivers/lindbergh.c index 63bd7dc3c47..b9a8f6855e9 100644 --- a/src/mame/drivers/lindbergh.c +++ b/src/mame/drivers/lindbergh.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /*************************************************************************** Sega Lindbergh skeleton driver diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c index 4cc7cb12121..81fd4dcea5a 100644 --- a/src/mame/drivers/lockon.c +++ b/src/mame/drivers/lockon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Tatsumi Lock-On hardware diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 3893ea7ea45..6887ccded5d 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* To Do: - redump COP420 internal ROM diff --git a/src/mame/drivers/ltcasino.c b/src/mame/drivers/ltcasino.c index a817c3c9cee..8715d04ecb1 100644 --- a/src/mame/drivers/ltcasino.c +++ b/src/mame/drivers/ltcasino.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli, David Haywood /* Little Casino diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c index 9f4fb7d0fcb..d4323fc01c5 100644 --- a/src/mame/drivers/luckgrln.c +++ b/src/mame/drivers/luckgrln.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Haywood, Roberto Fresca, Angelo Salese /* Lucky Girl (newer 1991 version on different hardware?) @@ -1091,6 +1091,6 @@ ROM_END * Game Drivers * ********************************************** - YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ -GAMEL( 1991, luckgrln, 0, luckgrln, luckgrln, luckgrln_state, luckgrln, ROT0, "Wing Co., Ltd.", "Lucky Girl (newer Z180 based hardware)", GAME_NO_SOUND, layout_luckgrln ) -GAMEL( 1993, 7smash, 0, _7smash, _7smash, driver_device, 0, ROT0, "Sovic", "7 Smash", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_NO_SOUND, layout_luckgrln ) + YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ +GAMEL( 1991, luckgrln, 0, luckgrln, luckgrln, luckgrln_state, luckgrln, ROT0, "Wing Co., Ltd.", "Lucky Girl (newer Z180 based hardware)", GAME_NO_SOUND, layout_luckgrln ) +GAMEL( 1993, 7smash, 0, _7smash, _7smash, driver_device, 0, ROT0, "Sovic", "7 Smash", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_NO_SOUND, layout_luckgrln ) diff --git a/src/mame/drivers/m58.c b/src/mame/drivers/m58.c index 84f9dcf5ad9..f82aef0c0be 100644 --- a/src/mame/drivers/m58.c +++ b/src/mame/drivers/m58.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Lee Taylor, John Clegg /**************************************************************************** Irem M58 hardware diff --git a/src/mame/drivers/m62.c b/src/mame/drivers/m62.c index 07f3bb8d206..00c5fbfbc44 100644 --- a/src/mame/drivers/m62.c +++ b/src/mame/drivers/m62.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf, David Haywood /**************************************************************************** Irem "M62" system diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c index e9d67dfcca0..7fcaf671cc8 100644 --- a/src/mame/drivers/m79amb.c +++ b/src/mame/drivers/m79amb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Al Kossow /* Ramtek M79 Ambush diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c index 16bfcc58034..b67309d46cb 100644 --- a/src/mame/drivers/m92.c +++ b/src/mame/drivers/m92.c @@ -830,9 +830,6 @@ static INPUT_PORTS_START( gunforc2 ) PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x000c, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0004, DEF_STR( Hard ) ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:5") - PORT_DIPSETTING( 0x0000, "15000 35000 75000 120000" ) - PORT_DIPSETTING( 0x0010, "20000 40000 90000 150000" ) INPUT_PORTS_END diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c index d535a6dde19..4e673f4cb3e 100644 --- a/src/mame/drivers/macrossp.c +++ b/src/mame/drivers/macrossp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*** DRIVER INFO ************************************************************** diff --git a/src/mame/drivers/macs.c b/src/mame/drivers/macs.c index c0c7bf551df..1d4fa845f54 100644 --- a/src/mame/drivers/macs.c +++ b/src/mame/drivers/macs.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* macs.c - Multi Amenity Cassette System diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c index 1b21c9445fa..20f3a4c88bc 100644 --- a/src/mame/drivers/magicard.c +++ b/src/mame/drivers/magicard.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Roberto Fresca,David Haywood +// copyright-holders:Angelo Salese, Roberto Fresca, David Haywood /****************************************************************************** MAGIC CARD - IMPERA diff --git a/src/mame/drivers/magictg.c b/src/mame/drivers/magictg.c index 8e36676fa0e..31f47c165ef 100644 --- a/src/mame/drivers/magictg.c +++ b/src/mame/drivers/magictg.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Magic the Gathering: Armageddon diff --git a/src/mame/drivers/mainsnk.c b/src/mame/drivers/mainsnk.c index ce8151afa28..576dcff171a 100644 --- a/src/mame/drivers/mainsnk.c +++ b/src/mame/drivers/mainsnk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Tomasz Slanina /* Main Event - SNK 1984 diff --git a/src/mame/drivers/malzak.c b/src/mame/drivers/malzak.c index 8ed859cb133..d418a4c856a 100644 --- a/src/mame/drivers/malzak.c +++ b/src/mame/drivers/malzak.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Reip, Barry Rodewald +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli, Barry Rodewald /* Malzak diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index 47f7cee766d..8ea96e9e701 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy /* --------------------------- Marine Date by TAITO (1981) diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 5d66b21d5af..cb5e604f87e 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Master Boy - Gaelco (c)1991 diff --git a/src/mame/drivers/maygay1b.c b/src/mame/drivers/maygay1b.c index 362e73c19c8..998e4b19800 100644 --- a/src/mame/drivers/maygay1b.c +++ b/src/mame/drivers/maygay1b.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /***************************************************************************************** Maygay M1 A/B driver, (under heavy construction !!!) diff --git a/src/mame/drivers/maygay1bsw.c b/src/mame/drivers/maygay1bsw.c index 22ec8c8cbc3..76d58aa4c65 100644 --- a/src/mame/drivers/maygay1bsw.c +++ b/src/mame/drivers/maygay1bsw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MayGay M1A/B Software */ /* diff --git a/src/mame/drivers/maygayep.c b/src/mame/drivers/maygayep.c index 74371a100b1..9aa5699657e 100644 --- a/src/mame/drivers/maygayep.c +++ b/src/mame/drivers/maygayep.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************************************************ Maygay EPOCH hardware diff --git a/src/mame/drivers/maygaysw.c b/src/mame/drivers/maygaysw.c index ef413f30084..75a69f918d8 100644 --- a/src/mame/drivers/maygaysw.c +++ b/src/mame/drivers/maygaysw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MayGay M2 hardware SWP (Skill With Prizes) Video based games */ diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c index ea20aec215f..9cc4980f307 100644 --- a/src/mame/drivers/maygayv1.c +++ b/src/mame/drivers/maygayv1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** MAYGAY MV1 hardware diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c index 1f5ffb37217..acac838fd8a 100644 --- a/src/mame/drivers/mcatadv.c +++ b/src/mame/drivers/mcatadv.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Paul Priest, David Haywood /****************************************************************************** diff --git a/src/mame/drivers/meadwttl.c b/src/mame/drivers/meadwttl.c index 8a5d19a87e2..4313a7740c8 100644 --- a/src/mame/drivers/meadwttl.c +++ b/src/mame/drivers/meadwttl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Meadows Discrete Game List diff --git a/src/mame/drivers/megadrvb.c b/src/mame/drivers/megadrvb.c index a333d651b6d..1905de7236b 100644 --- a/src/mame/drivers/megadrvb.c +++ b/src/mame/drivers/megadrvb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/megaphx.c b/src/mame/drivers/megaphx.c index da221595f48..37d9a792063 100644 --- a/src/mame/drivers/megaphx.c +++ b/src/mame/drivers/megaphx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Dinamic / Inder arcade hardware diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c index 91dbb79b8d7..af91020e30e 100644 --- a/src/mame/drivers/megaplay.c +++ b/src/mame/drivers/megaplay.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Sega MegaPlay diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c index 7a1a33effba..02a61342eca 100644 --- a/src/mame/drivers/megatech.c +++ b/src/mame/drivers/megatech.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? /* Sega MegaTech diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index aa76185b688..20b592a7482 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /************************************************************************** Based on drivers from Juno First emulator by Chris Hardy (chris@junofirst.freeserve.co.uk) diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c index 6cd01077fbd..2aa830ca202 100644 --- a/src/mame/drivers/metalmx.c +++ b/src/mame/drivers/metalmx.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Phil Bennett /*************************************************************************** Atari Metal Maniax diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index d3ac0ff4035..e1369c74c73 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Mini Golf (prototype) driver diff --git a/src/mame/drivers/micro3d.c b/src/mame/drivers/micro3d.c index 9da2b9a68d8..695d5f4972e 100644 --- a/src/mame/drivers/micro3d.c +++ b/src/mame/drivers/micro3d.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Microprose Games 3D hardware diff --git a/src/mame/drivers/midqslvr.c b/src/mame/drivers/midqslvr.c index 1c8ec43199b..3e52f4c72ef 100644 --- a/src/mame/drivers/midqslvr.c +++ b/src/mame/drivers/midqslvr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /*************************************************************************** Midway Quicksilver skeleton driver diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c index cf58a67114f..ded88b06c0d 100644 --- a/src/mame/drivers/mirage.c +++ b/src/mame/drivers/mirage.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* Mirage Youjuu Mahjongden TODO: diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index a967e8e410c..d0a3ad1be18 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Miss Bubble 2 / Bubble Pong Pong diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c index d24fbe397b7..c1ce0a6e4e4 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************************* "Mitchell hardware". Actually used mostly by Capcom. diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index 98420265a16..571b0bdfacc 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, Tomasz Slanina, Phil Bennett, hap +// copyright-holders:Angelo Salese, Tomasz Slanina, Philip Bennett, hap /*************************************************************************** Midnight Landing diff --git a/src/mame/drivers/mmm.c b/src/mame/drivers/mmm.c index a966dbd7445..481a0c2fc0f 100644 --- a/src/mame/drivers/mmm.c +++ b/src/mame/drivers/mmm.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Early Maygay HW I believe this is 'Triple M' or 'MMM' hardware diff --git a/src/mame/drivers/model1.c b/src/mame/drivers/model1.c index 54bed151064..7cf50339ff2 100644 --- a/src/mame/drivers/model1.c +++ b/src/mame/drivers/model1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Sega Model 1 Hardware Overview diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 0e2269e56ab..641c454ad4d 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont, Olivier Galibert, ElSemi +// copyright-holders:R. Belmont, Olivier Galibert, ElSemi, Angelo Salese /* Sega Model 2: i960KB + (5x TGP) or (2x SHARC) or (2x TGPx4) System 24 tilemaps @@ -7,7 +7,7 @@ (68000 + YM3834 + 2x MultiPCM) or (68000 + SCSP) Hardware and protection reverse-engineering and general assistance by ElSemi. - MAME driver by R. Belmont, Olivier Galibert, and ElSemi. + MAME driver by R. Belmont, Olivier Galibert, ElSemi and Angelo Salese. TODO (updated as for April 2014): - all Model 2B games: FIFO comms looks way wrong, and 3d is mostly missing/incomplete. Games also tends to stalls at some point, culprit might be when i960 tries diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index 9a291b45523..4aafded3d75 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Mogura Desse */ diff --git a/src/mame/drivers/monacogp.c b/src/mame/drivers/monacogp.c index 2b15eaa4b12..dba88697c9a 100644 --- a/src/mame/drivers/monacogp.c +++ b/src/mame/drivers/monacogp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Charles MacDonald, David Haywood /*************************************************************************** Sega Monaco GP diff --git a/src/mame/drivers/monzagp.c b/src/mame/drivers/monzagp.c index 3a87d34a466..fa37c6ef75d 100644 --- a/src/mame/drivers/monzagp.c +++ b/src/mame/drivers/monzagp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Monza GP - Olympia diff --git a/src/mame/drivers/mosaic.c b/src/mame/drivers/mosaic.c index 0efa147cc40..08eda5435e4 100644 --- a/src/mame/drivers/mosaic.c +++ b/src/mame/drivers/mosaic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Mosaic (c) 1990 Space diff --git a/src/mame/drivers/mouser.c b/src/mame/drivers/mouser.c index d41952d9fd1..a953d8f4e73 100644 --- a/src/mame/drivers/mouser.c +++ b/src/mame/drivers/mouser.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /******************************************************************************* diff --git a/src/mame/drivers/mpu2.c b/src/mame/drivers/mpu2.c index 52ce2d0cfd9..d39df506596 100644 --- a/src/mame/drivers/mpu2.c +++ b/src/mame/drivers/mpu2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* There were also MPU0 and MPU1 units Information from 'MAGIK' diff --git a/src/mame/drivers/mpu4.c b/src/mame/drivers/mpu4.c index 6a8a3a6733b..572ce91e335 100644 --- a/src/mame/drivers/mpu4.c +++ b/src/mame/drivers/mpu4.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* these are the MPU4 set listings / set specific code, for hardware emulation see mpu4hw.c */ /* todo: driver inits (basic hw reel, protection configs etc.) should probably be moved here diff --git a/src/mame/drivers/mpu4avan.c b/src/mame/drivers/mpu4avan.c index 4355978e514..8214a67461b 100644 --- a/src/mame/drivers/mpu4avan.c +++ b/src/mame/drivers/mpu4avan.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 'Avantine' games These seem to be 3rd party games for various regions diff --git a/src/mame/drivers/mpu4bwb.c b/src/mame/drivers/mpu4bwb.c index 22e7b140082..b718f79d96b 100644 --- a/src/mame/drivers/mpu4bwb.c +++ b/src/mame/drivers/mpu4bwb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 BwB games - these are Bwb originals, not rebuilds.. typically they have large 0x3f fills in rom.. diff --git a/src/mame/drivers/mpu4concept.c b/src/mame/drivers/mpu4concept.c index 21a266a8580..30ad95ccf5b 100644 --- a/src/mame/drivers/mpu4concept.c +++ b/src/mame/drivers/mpu4concept.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 games by 'Concept' */ #include "emu.h" diff --git a/src/mame/drivers/mpu4crystal.c b/src/mame/drivers/mpu4crystal.c index 0de1cb13d7b..95218a2a799 100644 --- a/src/mame/drivers/mpu4crystal.c +++ b/src/mame/drivers/mpu4crystal.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 games by Crystal */ /* Crystal games tend to have scrambled ROM + a different sound chip */ diff --git a/src/mame/drivers/mpu4dealem.c b/src/mame/drivers/mpu4dealem.c index 3beaa3852b0..1dbb341b1a0 100644 --- a/src/mame/drivers/mpu4dealem.c +++ b/src/mame/drivers/mpu4dealem.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Deal 'Em */ /* Deal 'Em was designed as an enhanced gamecard, to fit into various existing MPU4 cabinets diff --git a/src/mame/drivers/mpu4empire.c b/src/mame/drivers/mpu4empire.c index f06072156bd..c4724efd163 100644 --- a/src/mame/drivers/mpu4empire.c +++ b/src/mame/drivers/mpu4empire.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 games by 'Empire' */ diff --git a/src/mame/drivers/mpu4hw.c b/src/mame/drivers/mpu4hw.c index 8a8de39b954..33efa218e90 100644 --- a/src/mame/drivers/mpu4hw.c +++ b/src/mame/drivers/mpu4hw.c @@ -1415,7 +1415,7 @@ WRITE8_MEMBER(mpu4_state::ic3ss_w) float num = (1720000/((m_t3l + 1)*(m_t3h + 1))); float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1))); - int denom2 = denom1 +0.5;//need to round up, this gives same precision as chip + int denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip int freq=num*denom2; if (freq) diff --git a/src/mame/drivers/mpu4mdm.c b/src/mame/drivers/mpu4mdm.c index a2cea078cc7..67cd49d9556 100644 --- a/src/mame/drivers/mpu4mdm.c +++ b/src/mame/drivers/mpu4mdm.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 games by MDM */ diff --git a/src/mame/drivers/mpu4misc.c b/src/mame/drivers/mpu4misc.c index 3fd870f8ef3..9cf9d7b8dfc 100644 --- a/src/mame/drivers/mpu4misc.c +++ b/src/mame/drivers/mpu4misc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 sets from various other manufactuers which appear to be based off unique code / behaviors (no barcrest headers etc.) */ #include "emu.h" diff --git a/src/mame/drivers/mpu4mod2sw.c b/src/mame/drivers/mpu4mod2sw.c index 325fdbfe98e..0365c2177a0 100644 --- a/src/mame/drivers/mpu4mod2sw.c +++ b/src/mame/drivers/mpu4mod2sw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 'Mod2' Sets This is the original MPU4 board, with AY8913 chip diff --git a/src/mame/drivers/mpu4mod4yam.c b/src/mame/drivers/mpu4mod4yam.c index 516ac89b6b9..f02b9ea0e58 100644 --- a/src/mame/drivers/mpu4mod4yam.c +++ b/src/mame/drivers/mpu4mod4yam.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* This is MPU4 MOD4 with a Y2413 instead of an OKI */ #include "emu.h" diff --git a/src/mame/drivers/mpu4plasma.c b/src/mame/drivers/mpu4plasma.c index b5cfe6a2904..49d45ae63bb 100644 --- a/src/mame/drivers/mpu4plasma.c +++ b/src/mame/drivers/mpu4plasma.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 'Plasma' addition */ /* the Plasma was an oversized DMD, but was rarely used, Big Chief might be the only game with it, at least it's the only dump we have? */ diff --git a/src/mame/drivers/mpu4sw.c b/src/mame/drivers/mpu4sw.c index 08471ced8f5..ab00ff0f445 100644 --- a/src/mame/drivers/mpu4sw.c +++ b/src/mame/drivers/mpu4sw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* mpu4 sets which have been split, and appear to do something useful I'm trying to keep this file to official Barcrest / BwB rebuilds on mod4 hw diff --git a/src/mame/drivers/mpu4union.c b/src/mame/drivers/mpu4union.c index fae76e2199d..f6254398cd6 100644 --- a/src/mame/drivers/mpu4union.c +++ b/src/mame/drivers/mpu4union.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU4 games by 'Union' */ #include "emu.h" diff --git a/src/mame/drivers/mpu5.c b/src/mame/drivers/mpu5.c index e233614bc77..f9d1f53b0b6 100644 --- a/src/mame/drivers/mpu5.c +++ b/src/mame/drivers/mpu5.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* for MPU5 hardware emulation see mpu5hw.c, this just contains the set listing and per machine configs */ #include "emu.h" diff --git a/src/mame/drivers/mpu5hw.c b/src/mame/drivers/mpu5hw.c index 82e149bdfca..9d99ff7d242 100644 --- a/src/mame/drivers/mpu5hw.c +++ b/src/mame/drivers/mpu5hw.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* MPU5 hardware emulation */ /* This file contains the hardware emulation, the mpu5.c contains the set listings */ diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c index 65d70363dd9..1d5559b5051 100644 --- a/src/mame/drivers/mrflea.c +++ b/src/mame/drivers/mrflea.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /****************************************************************** Mr F Lea diff --git a/src/mame/drivers/mrjong.c b/src/mame/drivers/mrjong.c index b138c584d92..4aa53c3b2f6 100644 --- a/src/mame/drivers/mrjong.c +++ b/src/mame/drivers/mrjong.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Takahiro Nogi /*************************************************************************** Mr. Jong diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c index 78d21d2bd8f..ff41c6c5a93 100644 --- a/src/mame/drivers/ms32.c +++ b/src/mame/drivers/ms32.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Jaleco MegaSystem 32 (Preliminary Driver) diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c index bb766c814c0..1a2c3328522 100644 --- a/src/mame/drivers/mugsmash.c +++ b/src/mame/drivers/mugsmash.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Mug Smashers (c)199? Electronic Devices (Italy) / 3D Games (England) driver by David Haywood - Dip Switches and Inputs by stephh diff --git a/src/mame/drivers/multfish.c b/src/mame/drivers/multfish.c index 22040101fc9..7e1bb982107 100644 --- a/src/mame/drivers/multfish.c +++ b/src/mame/drivers/multfish.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, MetalliC /* todo: bank handlers etc. should be installed on a per-game basis diff --git a/src/mame/drivers/multfish_boot.c b/src/mame/drivers/multfish_boot.c index 4241f7834b5..0b5dfec8983 100644 --- a/src/mame/drivers/multfish_boot.c +++ b/src/mame/drivers/multfish_boot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "includes/multfish.h" diff --git a/src/mame/drivers/multfish_ref.c b/src/mame/drivers/multfish_ref.c index 10d3d8ef749..1fe33d98d0e 100644 --- a/src/mame/drivers/multfish_ref.c +++ b/src/mame/drivers/multfish_ref.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* The following sets are known to exist based on official documentation, but have not been dumped. */ /* no other official sets are known to exist apart from these and the ones in multfish.c */ diff --git a/src/mame/drivers/munchmo.c b/src/mame/drivers/munchmo.c index b1d1e080d4b..494e5c45cd9 100644 --- a/src/mame/drivers/munchmo.c +++ b/src/mame/drivers/munchmo.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Munch Mobile (C) 1983 SNK diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index 5aeeed8e8da..8a77a23d815 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Roberto Fresca /* note: diff --git a/src/mame/drivers/murogmbl.c b/src/mame/drivers/murogmbl.c index f3f5046c63c..516bd7d25a0 100644 --- a/src/mame/drivers/murogmbl.c +++ b/src/mame/drivers/murogmbl.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Roberto Zandona' /* Unknown - Poker (morugem diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 826f6fb14e1..fccae97b145 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Phil Stroffolino, Acho Tang, Nicola Salmoria /************************************************************************** * Mystic Warrior (c) 1993 Konami diff --git a/src/mame/drivers/n8080.c b/src/mame/drivers/n8080.c index 75db397f1f1..9e7a5b785f0 100644 --- a/src/mame/drivers/n8080.c +++ b/src/mame/drivers/n8080.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli /*************************************************************************** Nintendo 8080 hardware diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c index de10398e49b..4ced250ac44 100644 --- a/src/mame/drivers/namcoic.c +++ b/src/mame/drivers/namcoic.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino #include "emu.h" #include "includes/namcos2.h" /* for game-specific hacks */ #include "includes/namcoic.h" diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c index 40ee5b0c46c..0c0f1d75c48 100644 --- a/src/mame/drivers/namcona1.c +++ b/src/mame/drivers/namcona1.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Namco NA-1 / NA-2 System diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index e2c251a7cfd..16052b9c6ae 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* Namco System NB-1 diff --git a/src/mame/drivers/namcond1.c b/src/mame/drivers/namcond1.c index f44459e0910..6749c6b317f 100644 --- a/src/mame/drivers/namcond1.c +++ b/src/mame/drivers/namcond1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall, R. Belmont /************************************************************* diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c index 81009c199b0..03b70f0a0ca 100644 --- a/src/mame/drivers/namcos21.c +++ b/src/mame/drivers/namcos21.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /** 2008/06/11, by Naibo(translated to English by Mameplus team): Driver's Eyes works, diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index bd1804a726f..e9e72caa243 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1887,9 +1887,9 @@ static void render_scanline(void *dest, INT32 scanline, const poly_extent *exten void namcos23_state::render_apply_transform(INT32 xi, INT32 yi, INT32 zi, const namcos23_render_entry *re, poly_vertex &pv) { - pv.x = (INT32((re->model.m[0]*INT64(xi) + re->model.m[1]*INT64(yi) + re->model.m[2]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[0])/16384.0; - pv.y = (INT32((re->model.m[3]*INT64(xi) + re->model.m[4]*INT64(yi) + re->model.m[5]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[1])/16384.0; - pv.p[0] = (INT32((re->model.m[6]*INT64(xi) + re->model.m[7]*INT64(yi) + re->model.m[8]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[2])/16384.0; + pv.x = (INT32((re->model.m[0]*INT64(xi) + re->model.m[1]*INT64(yi) + re->model.m[2]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[0])/16384.0f; + pv.y = (INT32((re->model.m[3]*INT64(xi) + re->model.m[4]*INT64(yi) + re->model.m[5]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[1])/16384.0f; + pv.p[0] = (INT32((re->model.m[6]*INT64(xi) + re->model.m[7]*INT64(yi) + re->model.m[8]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[2])/16384.0f; } void namcos23_state::render_apply_matrot(INT32 xi, INT32 yi, INT32 zi, const namcos23_render_entry *re, INT32 &x, INT32 &y, INT32 &z) @@ -1975,7 +1975,7 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) render_apply_transform(u32_to_s24(v1), u32_to_s24(v2), u32_to_s24(v3), re, pv[i]); pv[i].p[1] = (((v1 >> 20) & 0xf00) | ((v2 >> 24 & 0xff))) + 0.5; - pv[i].p[2] = (((v1 >> 16) & 0xf00) | ((v3 >> 24 & 0xff))) + 0.5 + tbase; + pv[i].p[2] = (((v1 >> 16) & 0xf00) | ((v3 >> 24 & 0xff))) + 0.5f + tbase; if(pv[i].p[0] > maxz) maxz = pv[i].p[0]; @@ -1999,12 +1999,12 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) INT32 nz = u32_to_s10(norm); INT32 nrx, nry, nrz; render_apply_matrot(nx, ny, nz, re, nrx, nry, nrz); - float lsi = float(nrx*m_light_vector[0] + nry*m_light_vector[1] + nrz*m_light_vector[2])/4194304.0; + float lsi = float(nrx*m_light_vector[0] + nry*m_light_vector[1] + nrz*m_light_vector[2])/4194304.0f; if(lsi < 0) lsi = 0; // Mapping taken out of a hat - pv[i].p[3] = 0.25+1.5*lsi; + pv[i].p[3] = 0.25f+1.5f*lsi; break; } } @@ -2022,7 +2022,7 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) p->pv[i].p[2] *= w; p->pv[i].p[3] *= w; } - p->zkey = 0.5*(minz+maxz); + p->zkey = 0.5f*(minz+maxz); p->front = !(h & 0x00000001); p->rd.machine = &machine(); p->rd.texture_lookup = render_texture_lookup_nocache_point; diff --git a/src/mame/drivers/namcos86.c b/src/mame/drivers/namcos86.c index 0edd5828eb2..7c3c2cce60c 100644 --- a/src/mame/drivers/namcos86.c +++ b/src/mame/drivers/namcos86.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /******************************************************************* Namco System 86 diff --git a/src/mame/drivers/neogeo_noslot.c b/src/mame/drivers/neogeo_noslot.c index 72e31d1d52a..5d503031452 100644 --- a/src/mame/drivers/neogeo_noslot.c +++ b/src/mame/drivers/neogeo_noslot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari // MAME NeoGeo code for single fixed slot 'shortname' configs // none of this is required by MESS or the slot-based implementation diff --git a/src/mame/drivers/neptunp2.c b/src/mame/drivers/neptunp2.c index 38960db2350..0a53f945066 100644 --- a/src/mame/drivers/neptunp2.c +++ b/src/mame/drivers/neptunp2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /*************************************************************************** Neptune's Pearls (c) Unidesa? diff --git a/src/mame/drivers/news.c b/src/mame/drivers/news.c index 5149b3ac74f..1f32c07bff7 100644 --- a/src/mame/drivers/news.c +++ b/src/mame/drivers/news.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/nexus3d.c b/src/mame/drivers/nexus3d.c index 80f45997fb9..5671af2d931 100644 --- a/src/mame/drivers/nexus3d.c +++ b/src/mame/drivers/nexus3d.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Scott Stone /************************************************************************ NEXUS 3D Version 1.0 Board from Interpark diff --git a/src/mame/drivers/nl_breakout.c b/src/mame/drivers/nl_breakout.c index dbc5ece001b..71330d092b8 100644 --- a/src/mame/drivers/nl_breakout.c +++ b/src/mame/drivers/nl_breakout.c @@ -81,8 +81,6 @@ #define NETLIST_DEVELOPMENT 0 #include "netlist/nl_dice_compat.h" -#include "netlist/devices/net_lib.h" -#include "netlist/analog/nld_twoterm.h" #define SLOW_BUT_ACCURATE 0 diff --git a/src/mame/drivers/nl_pongd.c b/src/mame/drivers/nl_pongd.c index 5a320f6cf27..e9355b5c8a0 100644 --- a/src/mame/drivers/nl_pongd.c +++ b/src/mame/drivers/nl_pongd.c @@ -70,8 +70,6 @@ //#define NETLIST_DEVELOPMENT 1 #include "netlist/nl_dice_compat.h" -#include "netlist/devices/net_lib.h" -#include "netlist/analog/nld_twoterm.h" static Mono555Desc a3_555_desc(K_OHM(100.0), U_FARAD(0.1)); diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index 7450c2eed86..6f95a82d39a 100644 --- a/src/mame/drivers/nmk16.c +++ b/src/mame/drivers/nmk16.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,trap15,Angelo Salese +// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,trap15,Angelo Salese,Luca Elia /******************************************************************** Task Force Harrier 1989 UPL 68000 Z80 YM2203 2xOKIM6295 @@ -29,7 +29,7 @@ Bombjack Twin 1993 NMK 68000 2xOKIM6295 Nouryoku Koujou Iinkai 1995 Tecmo 68000 2xOKIM6295 driver by Mirko Buffoni, Richard Bush, Nicola Salmoria, Bryan McPhail, - David Haywood, R. Belmont, and trap15. + David Haywood, R. Belmont, trap15 and Luca Elia. Afega based their hardware on the NMK hardware, not surprising considering Twin Action is simply a hack of USSAF Mustang. diff --git a/src/mame/drivers/nova2001.c b/src/mame/drivers/nova2001.c index 661d9df588b..d00b2853091 100644 --- a/src/mame/drivers/nova2001.c +++ b/src/mame/drivers/nova2001.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Howie Cohen, Frank Palazzolo, Alex Pasadyn, David Haywood, Steph, Phil Stroffolino, Uki /****************************************************************************** diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 97249bf165c..90a87b1f1d4 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Darren Olafson /*************************************************************************** New York! New York! hardware diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c index d4e4ade8fc0..5f282a41a76 100644 --- a/src/mame/drivers/oneshot.c +++ b/src/mame/drivers/oneshot.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /* One Shot One Kill & Maddonna Driver by David Haywood and Paul Priest diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index 73806fa4ee3..517c5b84c0d 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli /* diff --git a/src/mame/drivers/orbit.c b/src/mame/drivers/orbit.c index c1b36f8bf4c..766d842b2d3 100644 --- a/src/mame/drivers/orbit.c +++ b/src/mame/drivers/orbit.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /*************************************************************************** Atari Orbit Driver diff --git a/src/mame/drivers/pangofun.c b/src/mame/drivers/pangofun.c index d98e011bd09..f0b90a4cde9 100644 --- a/src/mame/drivers/pangofun.c +++ b/src/mame/drivers/pangofun.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* It's a standard 486 PC motherboard, gfx card etc. with expansion ROM board probably impossible to emulate right now due to the bad / missing (blank when read) rom diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c index 25dde0ddefa..bd3fcca783e 100644 --- a/src/mame/drivers/panicr.c +++ b/src/mame/drivers/panicr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Panic Road diff --git a/src/mame/drivers/pass.c b/src/mame/drivers/pass.c index c1443bc44f8..1b2896ba61b 100644 --- a/src/mame/drivers/pass.c +++ b/src/mame/drivers/pass.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Pass (c)1992, Oksan diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 542524b92e5..8bb4f4a01c2 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -8276,7 +8276,7 @@ Designed and co-created by Best Bet Products ROM_LOAD( "capx1321.u43", 0x0000, 0x0200, CRC(4b57569f) SHA1(fa29c0f627e7ce79951ec6dadec114864144f37d) ) /* Wrong!! Should be CAPX2325 */ ROM_END -ROM_START( pex2297p ) /* Superboard : Jackpot Poker (X002284P+XP000053) */ +ROM_START( pex2297p ) /* Superboard : Jackpot Poker (X002297P+XP000053) */ /* PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus) ---------------------------------------------------------- @@ -9339,14 +9339,10 @@ Double Double Bonus P505A 97.80% ROM_LOAD( "xm00008p.u66", 0x00000, 0x10000, CRC(37ff1a79) SHA1(5b15245e79d8f1b984d254f4307f1a2219ce3ed2) ) ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2228.u77", 0x00000, 0x8000, NO_DUMP ) /* This set requires CG2228 for the correct banners on the MENU page */ - ROM_LOAD( "mgo-cg2228.u78", 0x08000, 0x8000, NO_DUMP ) - ROM_LOAD( "mbo-cg2228.u79", 0x10000, 0x8000, NO_DUMP ) - ROM_LOAD( "mxo-cg2228.u80", 0x18000, 0x8000, NO_DUMP ) - ROM_LOAD( "mro-cg2174.u77", 0x00000, 0x8000, CRC(bb666733) SHA1(dcaa1980b051a554cb0f443b1183a680edc9ad3f) ) /* 07/26/95 @ IGT L95-1616 */ - ROM_LOAD( "mgo-cg2174.u78", 0x08000, 0x8000, CRC(cc46adb0) SHA1(6065aa5dcb9091ad80e499c7ee6dc629e79c865a) ) /* Close but banners on MEMU WRONG!! */ - ROM_LOAD( "mbo-cg2174.u79", 0x10000, 0x8000, CRC(7291a0c8) SHA1(1068f35e6ef5fd88c584922860231840a90fb623) ) - ROM_LOAD( "mxo-cg2174.u80", 0x18000, 0x8000, CRC(14f9480c) SHA1(59323f9fc5995277aea86d088893b6eb95b4e89b) ) + ROM_LOAD( "mro-cg2228.u77", 0x00000, 0x8000, CRC(b8abca87) SHA1(b008e0c0b272bc024fc1bfee1aeb80b8df589e4a) ) + ROM_LOAD( "mgo-cg2228.u78", 0x08000, 0x8000, CRC(ad9b93ae) SHA1(3ffba64d4763bc0e107f6279b5cce4c0e7e4fa7a) ) + ROM_LOAD( "mbo-cg2228.u79", 0x10000, 0x8000, CRC(4ad376ef) SHA1(116160d507f734ecdf5e80a3e746ab10fb9b4d78) ) + ROM_LOAD( "mxo-cg2228.u80", 0x18000, 0x8000, CRC(8965ff2f) SHA1(9d5ba61504f9a7e3225ecaf72e81d65a9fbf3667) ) ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2174.u43", 0x0000, 0x0200, CRC(50bdad55) SHA1(958d463c7effb3457c1f9c44c9b7822339c04e8b) ) @@ -10045,7 +10041,7 @@ GAMEL(1995, pexm004p, 0, peplus, peplus_poker, peplus_state, peplussb, GAMEL(1995, pexm005p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00005P+XMP00004) Multi-Poker", 0, layout_pe_poker ) GAMEL(1995, pexm006p, pexm001p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00006P+XMP00006) Multi-Poker", 0, layout_pe_poker ) GAMEL(1995, pexm007p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00007P+XMP00006) Multi-Poker", 0, layout_pe_poker ) -GAMEL(1995, pexm008p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00008P+XMP00006) Multi-Poker", GAME_IMPERFECT_GRAPHICS, layout_pe_poker ) /* Needs CG2228 graphics roms for correct MENU game banners */ +GAMEL(1995, pexm008p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00008P+XMP00006) Multi-Poker", 0, layout_pe_poker ) GAMEL(1995, pexm009p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00009P+XMP00002) Multi-Poker", GAME_IMPERFECT_GRAPHICS, layout_pe_poker ) /* Needs unknown CG2??? graphics roms for correct MENU game banners */ GAMEL(1995, pexm013p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00013P+XMP00025) Multi-Poker", 0, layout_pe_poker ) diff --git a/src/mame/drivers/pgm2.c b/src/mame/drivers/pgm2.c index 1698963de8a..626d19f7889 100644 --- a/src/mame/drivers/pgm2.c +++ b/src/mame/drivers/pgm2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? /* PGM 2 hardware. diff --git a/src/mame/drivers/pinball2k.c b/src/mame/drivers/pinball2k.c index 5dd280d42d7..be631967fd5 100644 --- a/src/mame/drivers/pinball2k.c +++ b/src/mame/drivers/pinball2k.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont +// copyright-holders:R. Belmont, Peter Ferrie /* Pinball 2000 diff --git a/src/mame/drivers/pingpong.c b/src/mame/drivers/pingpong.c index 6962610c80f..afc0c923417 100644 --- a/src/mame/drivers/pingpong.c +++ b/src/mame/drivers/pingpong.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jarek Parchanski /*************************************************************************** Ping Pong (c) 1985 Konami diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c index 55dc3a7895e..cb4adde9baa 100644 --- a/src/mame/drivers/pinkiri8.c +++ b/src/mame/drivers/pinkiri8.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c index d3c7f123bcc..dae7a111319 100644 --- a/src/mame/drivers/pipeline.c +++ b/src/mame/drivers/pipeline.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /* PCB Layout ---------- diff --git a/src/mame/drivers/pirates.c b/src/mame/drivers/pirates.c index 5c3672828c3..7b1f63d51f2 100644 --- a/src/mame/drivers/pirates.c +++ b/src/mame/drivers/pirates.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood,Nicola Salmoria /*--- diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c index e3a8bfa817e..1c7a1d17ba0 100644 --- a/src/mame/drivers/pkscram.c +++ b/src/mame/drivers/pkscram.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/pktgaldx.c b/src/mame/drivers/pktgaldx.c index 464641b470a..c29d8089f28 100644 --- a/src/mame/drivers/pktgaldx.c +++ b/src/mame/drivers/pktgaldx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Bryan McPhail /* diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c index 7bd289a854c..b63e207c5c8 100644 --- a/src/mame/drivers/playmark.c +++ b/src/mame/drivers/playmark.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Pierpaolo Prazzoli +// copyright-holders:Nicola Salmoria, Pierpaolo Prazzoli, Quench /*************************************************************************** Big Twin diff --git a/src/mame/drivers/pluto5.c b/src/mame/drivers/pluto5.c index dfd96046034..8297dd458c6 100644 --- a/src/mame/drivers/pluto5.c +++ b/src/mame/drivers/pluto5.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Pluto 5 diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index 0b61b1dbd26..de3714e9768 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Andrew Gardner /* Polygonet Commanders (Konami, 1993) diff --git a/src/mame/drivers/pntnpuzl.c b/src/mame/drivers/pntnpuzl.c index f882f99c9c6..0a7687f256e 100644 --- a/src/mame/drivers/pntnpuzl.c +++ b/src/mame/drivers/pntnpuzl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* paint & puzzle */ /* video is standard VGA */ /* diff --git a/src/mame/drivers/pokechmp.c b/src/mame/drivers/pokechmp.c index 65af976f994..6394aea67fe 100644 --- a/src/mame/drivers/pokechmp.c +++ b/src/mame/drivers/pokechmp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Poke Champ */ diff --git a/src/mame/drivers/poker72.c b/src/mame/drivers/poker72.c index 512e7273336..3b90523609a 100644 --- a/src/mame/drivers/poker72.c +++ b/src/mame/drivers/poker72.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Unknown game, dump was marked 'slot 72 - poker' @@ -125,6 +125,19 @@ static ADDRESS_MAP_START( poker72_map, AS_PROGRAM, 8, poker72_state ) AM_RANGE(0xfe22, 0xfe22) AM_WRITE(tile_bank_w) AM_RANGE(0xfe40, 0xfe40) AM_DEVREADWRITE("ay", ay8910_device, data_r, data_w) AM_RANGE(0xfe60, 0xfe60) AM_DEVWRITE("ay", ay8910_device, address_w) + + AM_RANGE(0xff00, 0xffff) AM_RAM //?? +/* +bp 13a + +fe06 w +fe08 w +fe0b = 9b (ppi?) +fe24 w + +01f9 : call 6399 --> cls + +*/ ADDRESS_MAP_END diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c index 469fb098982..d644fb4d310 100644 --- a/src/mame/drivers/policetr.c +++ b/src/mame/drivers/policetr.c @@ -30,7 +30,7 @@ Noted differences in versions of SharpShooter: Added a "Welcome to Sharpshooter" start-up screen showing rom versions for v1.9 Initial High Score names are changed between v1.1 and v1.2 Circus of Mystery: - The ballon challenge has been rewritten for v1.7 + The balloon challenge has been rewritten for v1.7 Jugglers throw balls painted with targets for v1.1 & v1.2 Version 1.7 uses regular targets Alien Encounter: First saucer challenge has been modified for v1.7 @@ -64,7 +64,7 @@ Sound: BSMT2000 Other: Bt481AKPJ110 (44 Pin PQFP, Brooktree RAMDAC) AT001 (160 Pin PQFP, P&P Marketing, custom programmed XILINX XC4310) ATMEL 93C66 (EEPROM) - CN7 - 4 pin connector for stero speaker output + CN7 - 4 pin connector for stereo speaker output PLDs: XILINX-1 XC9536 Labeled as U175A (Rev 2/3: Not Used) XILINX-2 XC9536 Labeled as U109A (Rev 2/3: Lattice ispLSI 2032-80LJ - U109.P) diff --git a/src/mame/drivers/pong.c b/src/mame/drivers/pong.c index a21737ea97e..34b8ea3b11d 100644 --- a/src/mame/drivers/pong.c +++ b/src/mame/drivers/pong.c @@ -108,8 +108,6 @@ public: NETDEV_ANALOG_CALLBACK_MEMBER(sound_cb) { - //printf("snd %f\n", newval); - //dac_w(m_dac, 0, newval*64); m_dac->write_unsigned8(64*data); } diff --git a/src/mame/drivers/poolshrk.c b/src/mame/drivers/poolshrk.c index d97f406e232..78e6d6f16fc 100644 --- a/src/mame/drivers/poolshrk.c +++ b/src/mame/drivers/poolshrk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Poolshark Driver diff --git a/src/mame/drivers/popper.c b/src/mame/drivers/popper.c index 523ff7a4828..5fee425e612 100644 --- a/src/mame/drivers/popper.c +++ b/src/mame/drivers/popper.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli /*************************************************************************** Popper diff --git a/src/mame/drivers/potgoldu.c b/src/mame/drivers/potgoldu.c index da9a1439429..b83c25b6725 100644 --- a/src/mame/drivers/potgoldu.c +++ b/src/mame/drivers/potgoldu.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** Pot of Gold (c)200? U. S. Games diff --git a/src/mame/drivers/powerbal.c b/src/mame/drivers/powerbal.c index 3aa017a21e6..434a7604c74 100644 --- a/src/mame/drivers/powerbal.c +++ b/src/mame/drivers/powerbal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli /* diff --git a/src/mame/drivers/ppmast93.c b/src/mame/drivers/ppmast93.c index 01b0c391b21..c4e83f0433e 100644 --- a/src/mame/drivers/ppmast93.c +++ b/src/mame/drivers/ppmast93.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/proconn.c b/src/mame/drivers/proconn.c index 5d355ac77a1..b907aee0b7f 100644 --- a/src/mame/drivers/proconn.c +++ b/src/mame/drivers/proconn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Project PROCONN (and PC92/PC98) Fruit Machine hardware skeleton driver! diff --git a/src/mame/drivers/psattack.c b/src/mame/drivers/psattack.c index cd96d03d104..3444ba5f5e6 100644 --- a/src/mame/drivers/psattack.c +++ b/src/mame/drivers/psattack.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* P's Attack using VRender0 System on a Chip diff --git a/src/mame/drivers/pse.c b/src/mame/drivers/pse.c index ce870bb32de..d24aca5a0d0 100644 --- a/src/mame/drivers/pse.c +++ b/src/mame/drivers/pse.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Dave Widel, gregf /*************************************************************************** Project Support Engineering Games diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c index 96d789b76b0..e2fb6d99d12 100644 --- a/src/mame/drivers/psikyo4.c +++ b/src/mame/drivers/psikyo4.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /*---------------------------------------------------------------- Psikyo PS4 SH-2 Based Systems diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c index d16c6267f84..19eb3b07d4f 100644 --- a/src/mame/drivers/psikyosh.c +++ b/src/mame/drivers/psikyosh.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /*---------------------------------------------------------------- Psikyo PS3/PS5/PS5v2 SH-2 Based Systems diff --git a/src/mame/drivers/pyson.c b/src/mame/drivers/pyson.c index f3dffc8d4f5..a8b370c03a1 100644 --- a/src/mame/drivers/pyson.c +++ b/src/mame/drivers/pyson.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Guru /*************************************************************************** Konami Pyson Hardware Overview diff --git a/src/mame/drivers/quakeat.c b/src/mame/drivers/quakeat.c index 19a0e86b8a3..d3f752cc2a8 100644 --- a/src/mame/drivers/quakeat.c +++ b/src/mame/drivers/quakeat.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /* Quake Arcade Tournament diff --git a/src/mame/drivers/quasar.c b/src/mame/drivers/quasar.c index 635108f3c50..92cdc363797 100644 --- a/src/mame/drivers/quasar.c +++ b/src/mame/drivers/quasar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates, Pierpaolo Prazzoli /************************************************************************ diff --git a/src/mame/drivers/quizpani.c b/src/mame/drivers/quizpani.c index 63ea79172e9..0bde30d62a3 100644 --- a/src/mame/drivers/quizpani.c +++ b/src/mame/drivers/quizpani.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli /************************************************************************* Quiz Panicuru Fantasy diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index 65152b08d04..d58974a108b 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli /******************************************************************* R2D Tank (c) 1980 Sigma Ent. Inc. diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c index caf5d21ac58..dc859ecd187 100644 --- a/src/mame/drivers/r2dx_v33.c +++ b/src/mame/drivers/r2dx_v33.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Olivier Galibert, David Haywood, ??? /* diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c index eac6c6aabe8..ba102963da0 100644 --- a/src/mame/drivers/rabbit.c +++ b/src/mame/drivers/rabbit.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c index d8648ddd904..9472563f769 100644 --- a/src/mame/drivers/rainbow.c +++ b/src/mame/drivers/rainbow.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /*************************************************************************** diff --git a/src/mame/drivers/ramtek.c b/src/mame/drivers/ramtek.c index 760c06ca14e..a7d0683580d 100644 --- a/src/mame/drivers/ramtek.c +++ b/src/mame/drivers/ramtek.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /********************************************************************************* Ramtek Discrete Games List diff --git a/src/mame/drivers/rastersp.c b/src/mame/drivers/rastersp.c index 59369badf17..3b01e34fd03 100644 --- a/src/mame/drivers/rastersp.c +++ b/src/mame/drivers/rastersp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Bell-Fruit/ATD RasterSpeed hardware diff --git a/src/mame/drivers/rbmk.c b/src/mame/drivers/rbmk.c index b5339fd344a..43117d672e6 100644 --- a/src/mame/drivers/rbmk.c +++ b/src/mame/drivers/rbmk.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina, David Haywood /* Real Battle Mahjong King by 'Game Men System Co. Ltd.' diff --git a/src/mame/drivers/rcorsair.c b/src/mame/drivers/rcorsair.c index d34b9ae413d..6d8cf8a880f 100644 --- a/src/mame/drivers/rcorsair.c +++ b/src/mame/drivers/rcorsair.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Red Corsair */ /* skeleton driver */ diff --git a/src/mame/drivers/redclash.c b/src/mame/drivers/redclash.c index 533547ea704..23722c1e9f8 100644 --- a/src/mame/drivers/redclash.c +++ b/src/mame/drivers/redclash.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** Zero Hour / Red Clash diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c index d2d22dde524..57808b1d19b 100644 --- a/src/mame/drivers/renegade.c +++ b/src/mame/drivers/renegade.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Carlos A. Lozano, Rob Rosenbrock /*************************************************************************** diff --git a/src/mame/drivers/rgum.c b/src/mame/drivers/rgum.c index 797fee84dc5..d48c065bf03 100644 --- a/src/mame/drivers/rgum.c +++ b/src/mame/drivers/rgum.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Royal Gum diff --git a/src/mame/drivers/rocnrope.c b/src/mame/drivers/rocnrope.c index 4012df6ecea..28b436fa72c 100644 --- a/src/mame/drivers/rocnrope.c +++ b/src/mame/drivers/rocnrope.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** Roc'n Rope (c) 1983 Konami diff --git a/src/mame/drivers/rollrace.c b/src/mame/drivers/rollrace.c index b8a310076ab..014fd775752 100644 --- a/src/mame/drivers/rollrace.c +++ b/src/mame/drivers/rollrace.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli /*************************************************************************** Fighting Roller (c) 1983 Kaneko diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c index b269b49ac4d..ec53f6ae71c 100644 --- a/src/mame/drivers/rotaryf.c +++ b/src/mame/drivers/rotaryf.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Barry Rodewald /* Rotary Fighter, 01/1979, Kasco (Kansai Seiki Seisakusho Co.) board KIV-101 CPU: xtal(??mhz), i8085A, 40 pin IC(i8255?), 6*ROM, 1*RAM, DIP(8 switches), .. diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c index 0e2af1474ca..c418eb6b8e5 100644 --- a/src/mame/drivers/roul.c +++ b/src/mame/drivers/roul.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Roberto Zandona' /* Super Lucky Roulette? diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 3bedb19f13f..16ea4753484 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /************************************************************************* Run and Gun / Slam Dunk diff --git a/src/mame/drivers/sangho.c b/src/mame/drivers/sangho.c index eedf42d53ee..6d1bd3e73d3 100644 --- a/src/mame/drivers/sangho.c +++ b/src/mame/drivers/sangho.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Tomasz Slanina, Mariusz Wojcieszek /* diff --git a/src/mame/drivers/savquest.c b/src/mame/drivers/savquest.c index 86731c41895..ccb44922472 100644 --- a/src/mame/drivers/savquest.c +++ b/src/mame/drivers/savquest.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:R. Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Peter Ferrie /*************************************************************************** savquest.c @@ -54,14 +54,16 @@ #include "machine/idectrl.h" #include "video/pc_vga.h" #include "video/voodoo.h" - +#include "machine/ds128x.h" +#include "bus/isa/sblaster.h" class savquest_state : public pcat_base_state { public: savquest_state(const machine_config &mconfig, device_type type, const char *tag) : pcat_base_state(mconfig, type, tag), - m_vga(*this, "vga") + m_vga(*this, "vga"), + m_voodoo(*this, "voodoo") { } @@ -74,6 +76,7 @@ public: UINT8 *m_smram; required_device<s3_vga_device> m_vga; + required_device<voodoo_2_device> m_voodoo; int m_haspind; int m_haspstate; @@ -85,12 +88,14 @@ public: HASPSTATE_READ }; int m_hasp_passind; - UINT8 m_hasp_tmppass[15]; + UINT8 m_hasp_tmppass[0x29]; UINT8 m_port379; int m_hasp_passmode; + int m_hasp_prodind; UINT8 m_mtxc_config_reg[256]; UINT8 m_piix4_config_reg[8][256]; + UINT32 m_pci_3dfx_regs[0x40]; DECLARE_WRITE32_MEMBER( bios_f0000_ram_w ); DECLARE_WRITE32_MEMBER( bios_e0000_ram_w ); @@ -98,8 +103,8 @@ public: DECLARE_WRITE32_MEMBER( bios_e8000_ram_w ); DECLARE_WRITE32_MEMBER( bios_ec000_ram_w ); - DECLARE_READ32_MEMBER(parallel_port_r); - DECLARE_WRITE32_MEMBER(parallel_port_w); + DECLARE_READ8_MEMBER(parallel_port_r); + DECLARE_WRITE8_MEMBER(parallel_port_w); DECLARE_WRITE_LINE_MEMBER(vblank_assert); @@ -115,6 +120,7 @@ public: virtual void machine_start(); virtual void machine_reset(); void intel82439tx_init(); + void vid_3dfx_init(); }; // Intel 82439TX System Controller (MTXC) @@ -327,6 +333,44 @@ static void intel82371ab_pci_w(device_t *busdevice, device_t *device, int functi } } +void savquest_state::vid_3dfx_init() +{ + m_pci_3dfx_regs[0x00 / 4] = 0x0002121a; // 3dfx Multimedia device + m_pci_3dfx_regs[0x08 / 4] = 2; // revision ID + m_pci_3dfx_regs[0x10 / 4] = 0xff000000; + m_pci_3dfx_regs[0x40 / 4] = 0x4000; //INITEN_SECONDARY_REV_ID + voodoo_set_init_enable(m_voodoo, 0x4000); //INITEN_SECONDARY_REV_ID +} + +static UINT32 pci_3dfx_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) +{ +//osd_printf_warning("PCI read: %x\n", reg); + savquest_state *state = busdevice->machine().driver_data<savquest_state>(); + return state->m_pci_3dfx_regs[reg / 4]; +} + +static void pci_3dfx_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) +{ +osd_printf_warning("PCI write: %x %x\n", reg, data); + + savquest_state *state = busdevice->machine().driver_data<savquest_state>(); + + if (reg == 0x10) + { + data &= 0xff000000; + } + else if (reg == 0x40) + { + voodoo_set_init_enable(state->m_voodoo, data); + } + else if (reg == 0x54) + { + data &= 0xf000ffff; /* bits 16-27 are read-only */ + } + + state->m_pci_3dfx_regs[reg / 4] = data; +} + WRITE32_MEMBER(savquest_state::bios_f0000_ram_w) { //if (m_mtxc_config_reg[0x59] & 0x20) // write to RAM if this region is write-enabled @@ -382,21 +426,71 @@ WRITE32_MEMBER(savquest_state::bios_ec000_ram_w) #endif } -static const UINT8 m_hasp_cmppass[] = {0xc3, 0xd9, 0xd3, 0xfb, 0x9d, 0x89, 0xb9, 0xa1, 0xb3, 0xc1, 0xf1, 0xcd, 0xdf, 0x9d, 0x9d}; +static const UINT8 m_hasp_cmppass[] = {0xc3, 0xd9, 0xd3, 0xfb, 0x9d, 0x89, 0xb9, 0xa1, 0xb3, 0xc1, 0xf1, 0xcd, 0xdf, 0x9d}; /* 0x9d or 0x9e */ +static const UINT8 m_hasp_prodinfo[] = {0x51, 0x4c, 0x52, 0x4d, 0x53, 0x4e, 0x53, 0x4e, 0x53, 0x49, 0x53, 0x48, 0x53, 0x4b, 0x53, 0x4a, + 0x53, 0x43, 0x53, 0x45, 0x52, 0x46, 0x53, 0x43, 0x53, 0x41, 0xac, 0x40, 0x53, 0xbc, 0x53, 0x42, + 0x53, 0x57, 0x53, 0x5d, 0x52, 0x5e, 0x53, 0x5b, 0x53, 0x59, 0xac, 0x58, 0x53, 0xa4 + }; -READ32_MEMBER(savquest_state::parallel_port_r) +READ8_MEMBER(savquest_state::parallel_port_r) { - if (ACCESSING_BITS_8_15) + if (offset == 1) { - return ((UINT32) m_port379 << 8); + if ((m_haspstate == HASPSTATE_READ) + && (m_hasp_passmode == 3) + ) + { + /* passmode 3 is used to retrieve the product(s) information + it comes in two parts: header and product + the header has this format: + offset range purpose + 00 01 header type + 01 01-05 count of used product slots, must be 2 + 02 01-05 count of unused product slots + this is assumed to be 6-(count of used slots) + but it is not enforced here + however a total of 6 structures will be checked + 03 01-02 unknown + 04 01-46 country code + 05-0f 00 reserved + the used product slots have this format: + (the unused product slots must be entirely zeroes) + 00-01 0001-000a product ID, one must be 6, the other 0a + 02 0001-0003 unknown but must be 0001 + 04 01-05 HASP plug country ID + 05 01-02 unknown but must be 01 + 06 05 unknown + 07-0a any unknown, not used + 0b ff unknown + 0c ff unknown + 0d-0f 00 reserved + + the read is performed by accessing an array of 16-bit big-endian values + and returning one bit at a time into bit 5 of the result + the 16-bit value is then XORed with 0x534d and the register index + */ + + if (m_hasp_prodind <= (sizeof(m_hasp_prodinfo) * 8)) + { + m_port379 = ((m_hasp_prodinfo[(m_hasp_prodind - 1) >> 3] >> ((8 - m_hasp_prodind) & 7)) & 1) << 5; /* return defined info */ + } + else + { + m_port379 = (((0x534d ^ ((m_hasp_prodind - 1) >> 4)) >> ((16 - m_hasp_prodind) & 15)) & 1) << 5; /* then just alternate between the two key values */ + } + + ++m_hasp_prodind; + } + + return m_port379; } return 0; } -WRITE32_MEMBER(savquest_state::parallel_port_w) +WRITE8_MEMBER(savquest_state::parallel_port_w) { - if (ACCESSING_BITS_0_7) + if (!offset) { UINT8 data8 = (UINT8) (data & 0xff); @@ -443,13 +537,15 @@ WRITE32_MEMBER(savquest_state::parallel_port_w) case 3: { + m_haspind = 0; + if (data8 == 0x80) { m_haspstate = HASPSTATE_PASSBEG; m_hasp_passind = 0; + return; } - m_haspind = 0; break; } @@ -462,35 +558,36 @@ WRITE32_MEMBER(savquest_state::parallel_port_w) if (m_haspstate == HASPSTATE_READ) { - /* different passwords causes different values to be returned - but there is really only one password of interest + /* different passwords cause different values to be returned + but there are really only two passwords of interest + passmode 2 is used to verify that the dongle is responding correctly */ - if (m_hasp_passmode == 1) + if (m_hasp_passmode == 2) { - /* in passmode 1, some values remain unknown: 96, 9a, c4, d4, ec, f8 + /* in passmode 2, some values remain unknown: 96, 9a, c4, d4, ec, f8 they all return 00, but if that's wrong then there will be failures to start */ if ((data8 == 0x94) - || (data8 == 0x9e) - || (data8 == 0xa4) - || (data8 == 0xb2) - || (data8 == 0xbe) - || (data8 == 0xd0) - ) + || (data8 == 0x9e) + || (data8 == 0xa4) + || (data8 == 0xb2) + || (data8 == 0xbe) + || (data8 == 0xd0) + ) { return; } if ((data8 == 0x8a) - || (data8 == 0x8e) - || (data8 == 0xca) - || (data8 == 0xd2) - || (data8 == 0xe2) - || (data8 == 0xf0) - || (data8 == 0xfc) - ) + || (data8 == 0x8e) + || (data8 == 0xca) + || (data8 == 0xd2) + || (data8 == 0xe2) + || (data8 == 0xf0) + || (data8 == 0xfc) + ) { /* someone with access to the actual dongle could dump the true values I've never seen it so I just determined the relevant bits instead @@ -548,31 +645,64 @@ WRITE32_MEMBER(savquest_state::parallel_port_w) { } } - - return; } - - if (m_haspstate == HASPSTATE_PASSEND) + else if (m_haspstate == HASPSTATE_PASSEND) { - m_haspstate = HASPSTATE_READ; - return; - } + if (data8 & 1) + { + if ((m_hasp_passmode == 1) + && (data8 == 0x9d) + ) + { + m_hasp_passmode = 2; + } - if ((m_haspstate == HASPSTATE_PASSBEG) - && (data8 & 1) + m_haspstate = HASPSTATE_READ; + } + else if (m_hasp_passmode == 1) + { + m_hasp_tmppass[m_hasp_passind] = data8; + + if (++m_hasp_passind == sizeof(m_hasp_tmppass)) + { + if ((m_hasp_tmppass[0] == 0x9c) + && (m_hasp_tmppass[1] == 0x9e) + ) + { + int i; + + i = 2; + m_hasp_prodind = 0; + + do + { + m_hasp_prodind = (m_hasp_prodind << 1) + ((m_hasp_tmppass[i] >> 6) & 1); + } + while ((i += 3) < sizeof(m_hasp_tmppass)); + + m_hasp_prodind = (m_hasp_prodind - 0xc08) << 4; + + if (m_hasp_prodind < (0x38 << 4)) + { + m_hasp_passmode = 3; + } + } + + m_haspstate = HASPSTATE_READ; + } + } + } + else if ((m_haspstate == HASPSTATE_PASSBEG) + && (data8 & 1) ) { m_hasp_tmppass[m_hasp_passind] = data8; - if (++m_hasp_passind == 15) + if (++m_hasp_passind == sizeof(m_hasp_cmppass)) { m_haspstate = HASPSTATE_PASSEND; - m_hasp_passmode = 0; - - if (!memcmp(m_hasp_tmppass, m_hasp_cmppass, sizeof(m_hasp_tmppass))) - { - m_hasp_passmode = 1; - } + m_hasp_passind = 0; + m_hasp_passmode = (int) !memcmp(m_hasp_tmppass, m_hasp_cmppass, sizeof(m_hasp_cmppass)); } } } @@ -598,26 +728,29 @@ WRITE8_MEMBER(savquest_state::smram_w) } static ADDRESS_MAP_START(savquest_map, AS_PROGRAM, 32, savquest_state) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00000000, 0x0009ffff) AM_RAM AM_RANGE(0x000a0000, 0x000bffff) AM_READWRITE8(smram_r,smram_w,0xffffffff) //AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff) - AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0) + AM_RANGE(0x000c0000, 0x000cffff) AM_ROM AM_REGION("video_bios", 0) AM_RANGE(0x000f0000, 0x000fffff) AM_ROMBANK("bios_f0000") AM_WRITE(bios_f0000_ram_w) AM_RANGE(0x000e0000, 0x000e3fff) AM_ROMBANK("bios_e0000") AM_WRITE(bios_e0000_ram_w) AM_RANGE(0x000e4000, 0x000e7fff) AM_ROMBANK("bios_e4000") AM_WRITE(bios_e4000_ram_w) AM_RANGE(0x000e8000, 0x000ebfff) AM_ROMBANK("bios_e8000") AM_WRITE(bios_e8000_ram_w) AM_RANGE(0x000ec000, 0x000effff) AM_ROMBANK("bios_ec000") AM_WRITE(bios_ec000_ram_w) AM_RANGE(0x00100000, 0x07ffffff) AM_RAM // 128MB RAM + AM_RANGE(0xe0000000, 0xe0fbffff) AM_DEVREADWRITE("voodoo", voodoo_device, voodoo_r, voodoo_w) AM_RANGE(0xfffc0000, 0xffffffff) AM_ROM AM_REGION("bios", 0) /* System BIOS */ ADDRESS_MAP_END static ADDRESS_MAP_START(savquest_io, AS_IO, 32, savquest_state) AM_IMPORT_FROM(pcat32_io_common) + AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("rtc", ds12885_device, read, write, 0xffffffff) AM_RANGE(0x00e8, 0x00ef) AM_NOP AM_RANGE(0x0170, 0x0177) AM_DEVREADWRITE("ide2", ide_controller_32_device, read_cs0, write_cs0) AM_RANGE(0x01f0, 0x01f7) AM_DEVREADWRITE("ide", ide_controller_32_device, read_cs0, write_cs0) - AM_RANGE(0x0378, 0x037b) AM_READWRITE(parallel_port_r, parallel_port_w) + AM_RANGE(0x0378, 0x037b) AM_READWRITE8(parallel_port_r, parallel_port_w, 0xffffffff) AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", vga_device, port_03b0_r, port_03b0_w, 0xffffffff) AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", vga_device, port_03c0_r, port_03c0_w, 0xffffffff) AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", vga_device, port_03d0_r, port_03d0_w, 0xffffffff) @@ -646,6 +779,7 @@ void savquest_state::machine_start() m_bios_ec000_ram = auto_alloc_array(machine(), UINT32, 0x4000/4); intel82439tx_init(); + vid_3dfx_init(); } void savquest_state::machine_reset() @@ -655,12 +789,17 @@ void savquest_state::machine_reset() membank("bios_e4000")->set_base(memregion("bios")->base() + 0x24000); membank("bios_e8000")->set_base(memregion("bios")->base() + 0x28000); membank("bios_ec000")->set_base(memregion("bios")->base() + 0x2c000); + m_haspstate = HASPSTATE_NONE; } WRITE_LINE_MEMBER(savquest_state::vblank_assert) { } +SLOT_INTERFACE_START( savquest_isa16_cards ) + SLOT_INTERFACE("sb16", ISA16_SOUND_BLASTER_16) +SLOT_INTERFACE_END + static MACHINE_CONFIG_START( savquest, savquest_state ) MCFG_CPU_ADD("maincpu", PENTIUM2, 450000000) // actually Pentium II 450 MCFG_CPU_PROGRAM_MAP(savquest_map) @@ -668,10 +807,13 @@ static MACHINE_CONFIG_START( savquest, savquest_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb) MCFG_FRAGMENT_ADD( pcat_common ) + MCFG_DEVICE_REMOVE("rtc") + MCFG_DS12885_ADD("rtc") MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w) MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w) + MCFG_PCI_BUS_LEGACY_DEVICE(13, NULL, pci_3dfx_r, pci_3dfx_w) MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", NULL, true) MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w)) @@ -679,12 +821,18 @@ static MACHINE_CONFIG_START( savquest, savquest_state ) MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, NULL, NULL, true) MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir7_w)) + /* sound hardware */ + + MCFG_DEVICE_ADD("isa", ISA16, 0) + MCFG_ISA16_CPU(":maincpu") + MCFG_ISA16_SLOT_ADD("isa", "isa1", savquest_isa16_cards, "sb16", false) + /* video hardware */ MCFG_FRAGMENT_ADD( pcvideo_s3_vga ) MCFG_DEVICE_ADD("voodoo", VOODOO_2, STD_VOODOO_2_CLOCK) - MCFG_VOODOO_FBMEM(2) - MCFG_VOODOO_TMUMEM(4,4) + MCFG_VOODOO_FBMEM(4) + MCFG_VOODOO_TMUMEM(4,4) /* this is the 12Mb card */ MCFG_VOODOO_SCREEN_TAG("screen") MCFG_VOODOO_CPU_TAG("maincpu") MCFG_VOODOO_VBLANK_CB(WRITELINE(savquest_state,vblank_assert)) diff --git a/src/mame/drivers/sbugger.c b/src/mame/drivers/sbugger.c index 68b9c71154c..de62f1914a8 100644 --- a/src/mame/drivers/sbugger.c +++ b/src/mame/drivers/sbugger.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Space Bugger diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c index a6147a25e3d..3d79366c04a 100644 --- a/src/mame/drivers/scobra.c +++ b/src/mame/drivers/scobra.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Super Cobra hardware diff --git a/src/mame/drivers/scotrsht.c b/src/mame/drivers/scotrsht.c index 8314ca5c970..df6a73bb89f 100644 --- a/src/mame/drivers/scotrsht.c +++ b/src/mame/drivers/scotrsht.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? /*************************************************************************** diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c index 19fe8ee7255..bbe27542d99 100644 --- a/src/mame/drivers/scramble.c +++ b/src/mame/drivers/scramble.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Scramble hardware diff --git a/src/mame/drivers/sderby.c b/src/mame/drivers/sderby.c index 6537ecae52d..cd4908f442a 100644 --- a/src/mame/drivers/sderby.c +++ b/src/mame/drivers/sderby.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca /******************************************************************************************* diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c index 47195fb90b7..da14bf458ad 100644 --- a/src/mame/drivers/segac2.c +++ b/src/mame/drivers/segac2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Aaron Giles /*********************************************************************************************** diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c index ff3b4413335..eb824bc8d54 100644 --- a/src/mame/drivers/segae.c +++ b/src/mame/drivers/segae.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega System E */ /* @@ -288,15 +288,6 @@ GND 8A 8B GND E572 : table with L. slot infos (5 bytes wide) E577 : table with R. slot infos (5 bytes wide) -Known issues: - -sometimes hangonjr has corrupt gfx when you start a game, I don't know why (timing?) - -todo: - -tidy up, add save states, clean up so we can use it with hazemd again -add emulation of vdp bugs, use mame's new screen timing system instead -covert megatech / megaplay drivers to use new code etc. etc. */ diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c index 81ea376f1bb..4c691aa7898 100644 --- a/src/mame/drivers/segas24.c +++ b/src/mame/drivers/segas24.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* * Sega System 24 * diff --git a/src/mame/drivers/segasp.c b/src/mame/drivers/segasp.c index 2d38aea78b9..44b70d208b9 100644 --- a/src/mame/drivers/segasp.c +++ b/src/mame/drivers/segasp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega System SP (Spider) diff --git a/src/mame/drivers/segaufo.c b/src/mame/drivers/segaufo.c index 5a164d4471f..f77b60e3e6e 100644 --- a/src/mame/drivers/segaufo.c +++ b/src/mame/drivers/segaufo.c @@ -224,7 +224,7 @@ READ8_MEMBER(ufo_state::crane_limits_r) } // d6: crane open sensor (reflective sticker on the stepper motor rotation disc) - if (m_player[p].motor[3].position >= 0.97) + if (m_player[p].motor[3].position >= 0.97f) ret ^= 0x40; // d7: prize sensor (mirror?) @@ -358,7 +358,7 @@ READ8_MEMBER(ufo_state::ex_crane_open_r) for (int p = 0; p < 2; p++) { // d0: crane open sensor - if (m_player[p].motor[3].position >= 0.97) + if (m_player[p].motor[3].position >= 0.97f) ret ^= (1 << (p*4)); // d1: coincounter is plugged in (ufo800 gives error 14 otherwise) diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index 4017b195e2b..55c4ed8f09d 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, hap, ??? +// copyright-holders:Ville Linde, hap, Nicola Salmoria /* Seibu SPI Hardware Seibu SYS386I diff --git a/src/mame/drivers/sfbonus.c b/src/mame/drivers/sfbonus.c index 97fe00a4416..e2ca6d141be 100644 --- a/src/mame/drivers/sfbonus.c +++ b/src/mame/drivers/sfbonus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* "CGA" Amcoe HW (c) 1999-2004 Amcoe diff --git a/src/mame/drivers/sfcbox.c b/src/mame/drivers/sfcbox.c index bd158fe8223..821bbec67bb 100644 --- a/src/mame/drivers/sfcbox.c +++ b/src/mame/drivers/sfcbox.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Angelo Salese /*************************************************************************** sfcbox.c diff --git a/src/mame/drivers/shadfrce.c b/src/mame/drivers/shadfrce.c index 162e19a36a4..e32221a3c6c 100644 --- a/src/mame/drivers/shadfrce.c +++ b/src/mame/drivers/shadfrce.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /******************************************************************************* Shadow Force (c)1993 Technos diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c index 6db5547bf68..b307779705b 100644 --- a/src/mame/drivers/shangkid.c +++ b/src/mame/drivers/shangkid.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* Dynamic Ski (c)1984 Taiyo diff --git a/src/mame/drivers/shtzone.c b/src/mame/drivers/shtzone.c index b0793e603fe..0dc37aff422 100644 --- a/src/mame/drivers/shtzone.c +++ b/src/mame/drivers/shtzone.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* "Sega Shooting Zone" aka "Sega Sharp Shooter" diff --git a/src/mame/drivers/silkroad.c b/src/mame/drivers/silkroad.c index 932c0ffcffa..d72dc4230c8 100644 --- a/src/mame/drivers/silkroad.c +++ b/src/mame/drivers/silkroad.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, R. Belmont /* The Legend of Silk Road - Unico 1999 */ diff --git a/src/mame/drivers/silvmil.c b/src/mame/drivers/silvmil.c index a76fd1c92c1..556c50f4af6 100644 --- a/src/mame/drivers/silvmil.c +++ b/src/mame/drivers/silvmil.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Silver Millennium diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c index 5f98337f005..fecf10a306d 100644 --- a/src/mame/drivers/simpl156.c +++ b/src/mame/drivers/simpl156.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* "Simple" 156 based Data East Hardware diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c index 3a5a04dd3af..c9576a5d100 100644 --- a/src/mame/drivers/skeetsht.c +++ b/src/mame/drivers/skeetsht.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Philip Bennett, Angelo Salese /*************************************************************************** Dynamo Skeet Shot diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c index eac290fd634..ad0b1cbf8aa 100644 --- a/src/mame/drivers/skimaxx.c +++ b/src/mame/drivers/skimaxx.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Phil Bennett, Luca Elia +// copyright-holders:Philip Bennett, Luca Elia /***************************************************************************************************** Skimaxx diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c index 2db9d42f276..8692ce3351a 100644 --- a/src/mame/drivers/skylncr.c +++ b/src/mame/drivers/skylncr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Roberto Fresca, David Haywood /*************************************************************************************************** diff --git a/src/mame/drivers/skyraid.c b/src/mame/drivers/skyraid.c index b581b354f8f..d677b22b2e7 100644 --- a/src/mame/drivers/skyraid.c +++ b/src/mame/drivers/skyraid.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /*************************************************************************** Atari Sky Raider driver diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c index 4b7bbdce6c9..89ccc25e18e 100644 --- a/src/mame/drivers/slotcarn.c +++ b/src/mame/drivers/slotcarn.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca /*************************************************************************** diff --git a/src/mame/drivers/snesb.c b/src/mame/drivers/snesb.c index 29bc4b4f644..10aa371c1ba 100644 --- a/src/mame/drivers/snesb.c +++ b/src/mame/drivers/snesb.c @@ -1,5 +1,5 @@ // license:LGPL-2.1+ -// copyright-holders:Tomasz Slanina +// copyright-holders:Tomasz Slanina, Peter Ferrie /*************************************************************************** Arcade games (hacks of console games) running on SNES harware. diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c index 161c262fa72..e93980ffcf6 100644 --- a/src/mame/drivers/snk6502.c +++ b/src/mame/drivers/snk6502.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Dan Boris /*************************************************************************** Sasuke vs. Commander @@ -298,6 +298,16 @@ Stephh's notes (based on the games M6502 code and some tests) : #endif +void snk6502_state::machine_start() +{ + // these could be split in different MACHINE_STARTs to save only + // what's actually needed, but is the extra complexity really worth it? + save_item(NAME(m_sasuke_counter)); // sasuke only + save_item(NAME(m_charbank)); + save_item(NAME(m_backcolor)); + save_item(NAME(m_irq_mask)); // satansat only +} + /* binary counter (1.4MHz update) */ TIMER_DEVICE_CALLBACK_MEMBER(snk6502_state::sasuke_update_counter) { @@ -335,10 +345,10 @@ CUSTOM_INPUT_MEMBER(snk6502_state::sasuke_count_r) static ADDRESS_MAP_START( sasuke_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM - AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(snk6502_videoram2_w) AM_SHARE("videoram2") - AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(snk6502_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(snk6502_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(snk6502_charram_w) AM_SHARE("charram") + AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") + AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") + AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("crtc", mc6845_device, register_w) AM_RANGE(0x4000, 0x8fff) AM_ROM @@ -354,10 +364,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( satansat_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM - AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(snk6502_videoram2_w) AM_SHARE("videoram2") - AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(snk6502_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(snk6502_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(snk6502_charram_w) AM_SHARE("charram") + AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") + AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") + AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("crtc", mc6845_device, register_w) AM_RANGE(0x4000, 0x9fff) AM_ROM @@ -373,20 +383,20 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( vanguard_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM - AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(snk6502_videoram2_w) AM_SHARE("videoram2") - AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(snk6502_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(snk6502_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(snk6502_charram_w) AM_SHARE("charram") + AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") + AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") + AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("crtc", mc6845_device, register_w) AM_RANGE(0x3100, 0x3102) AM_DEVWRITE("snk6502", snk6502_sound_device, vanguard_sound_w) - AM_RANGE(0x3103, 0x3103) AM_WRITE(snk6502_flipscreen_w) + AM_RANGE(0x3103, 0x3103) AM_WRITE(flipscreen_w) AM_RANGE(0x3104, 0x3104) AM_READ_PORT("IN0") AM_RANGE(0x3105, 0x3105) AM_READ_PORT("IN1") AM_RANGE(0x3106, 0x3106) AM_READ_PORT("DSW") AM_RANGE(0x3107, 0x3107) AM_READ_PORT("IN2") - AM_RANGE(0x3200, 0x3200) AM_WRITE(snk6502_scrollx_w) - AM_RANGE(0x3300, 0x3300) AM_WRITE(snk6502_scrolly_w) + AM_RANGE(0x3200, 0x3200) AM_WRITE(scrollx_w) + AM_RANGE(0x3300, 0x3300) AM_WRITE(scrolly_w) AM_RANGE(0x3400, 0x3400) AM_DEVWRITE("snk6502", snk6502_sound_device, vanguard_speech_w) // speech AM_RANGE(0x4000, 0xbfff) AM_ROM AM_RANGE(0xf000, 0xffff) AM_ROM /* for the reset / interrupt vectors */ @@ -394,10 +404,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( fantasy_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM - AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(snk6502_videoram2_w) AM_SHARE("videoram2") - AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(snk6502_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(snk6502_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(snk6502_charram_w) AM_SHARE("charram") + AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") + AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") + AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x2001, 0x2001) AM_DEVWRITE("crtc", mc6845_device, register_w) AM_RANGE(0x2100, 0x2103) AM_DEVWRITE("snk6502", snk6502_sound_device, fantasy_sound_w) @@ -405,8 +415,8 @@ static ADDRESS_MAP_START( fantasy_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0x2105, 0x2105) AM_READ_PORT("IN1") AM_RANGE(0x2106, 0x2106) AM_READ_PORT("DSW") AM_RANGE(0x2107, 0x2107) AM_READ_PORT("IN2") - AM_RANGE(0x2200, 0x2200) AM_WRITE(snk6502_scrollx_w) - AM_RANGE(0x2300, 0x2300) AM_WRITE(snk6502_scrolly_w) + AM_RANGE(0x2200, 0x2200) AM_WRITE(scrollx_w) + AM_RANGE(0x2300, 0x2300) AM_WRITE(scrolly_w) AM_RANGE(0x2400, 0x2400) AM_DEVWRITE("snk6502", snk6502_sound_device, fantasy_speech_w) // speech AM_RANGE(0x3000, 0xbfff) AM_ROM AM_RANGE(0xf000, 0xffff) AM_ROM @@ -414,10 +424,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pballoon_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM - AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(snk6502_videoram2_w) AM_SHARE("videoram2") - AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(snk6502_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(snk6502_colorram_w) AM_SHARE("colorram") - AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(snk6502_charram_w) AM_SHARE("charram") + AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") + AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") + AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") AM_RANGE(0x3000, 0x9fff) AM_ROM AM_RANGE(0xb000, 0xb000) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0xb001, 0xb001) AM_DEVWRITE("crtc", mc6845_device, register_w) @@ -426,8 +436,8 @@ static ADDRESS_MAP_START( pballoon_map, AS_PROGRAM, 8, snk6502_state ) AM_RANGE(0xb105, 0xb105) AM_READ_PORT("IN1") AM_RANGE(0xb106, 0xb106) AM_READ_PORT("DSW") AM_RANGE(0xb107, 0xb107) AM_READ_PORT("IN2") - AM_RANGE(0xb200, 0xb200) AM_WRITE(snk6502_scrollx_w) - AM_RANGE(0xb300, 0xb300) AM_WRITE(snk6502_scrolly_w) + AM_RANGE(0xb200, 0xb200) AM_WRITE(scrollx_w) + AM_RANGE(0xb300, 0xb300) AM_WRITE(scrolly_w) AM_RANGE(0xf000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -808,7 +818,7 @@ static MACHINE_CONFIG_START( sasuke, snk6502_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_DRIVER(snk6502_state, screen_update_snk6502) + MCFG_SCREEN_UPDATE_DRIVER(snk6502_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", sasuke) @@ -941,7 +951,7 @@ static MACHINE_CONFIG_START( vanguard, snk6502_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_DRIVER(snk6502_state, screen_update_snk6502) + MCFG_SCREEN_UPDATE_DRIVER(snk6502_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", vanguard) @@ -1577,21 +1587,21 @@ ROM_END * *************************************/ -GAME( 1980, sasuke, 0, sasuke, sasuke, driver_device, 0, ROT90, "SNK", "Sasuke vs. Commander", GAME_IMPERFECT_SOUND ) -GAME( 1981, satansat, 0, satansat, satansat, driver_device, 0, ROT90, "SNK", "Satan of Saturn (set 1)", GAME_IMPERFECT_SOUND ) -GAME( 1981, satansata,satansat, satansat, satansat, driver_device, 0, ROT90, "SNK", "Satan of Saturn (set 2)", GAME_IMPERFECT_SOUND ) -GAME( 1981, zarzon, satansat, satansat, satansat, driver_device, 0, ROT90, "SNK (Taito America license)", "Zarzon", GAME_IMPERFECT_SOUND ) -GAME( 1981, satansatind,satansat,satansat,satansat, driver_device, 0, ROT90, "bootleg (Inder S.A.)", "Satan of Saturn (Inder S.A., bootleg)", GAME_IMPERFECT_SOUND ) -GAME( 1981, vanguard, 0, vanguard, vanguard, driver_device, 0, ROT90, "SNK", "Vanguard (SNK)", GAME_IMPERFECT_SOUND ) -GAME( 1981, vanguardc,vanguard, vanguard, vanguard, driver_device, 0, ROT90, "SNK (Centuri license)", "Vanguard (Centuri)", GAME_IMPERFECT_SOUND ) -GAME( 1981, vanguardj,vanguard, vanguard, vanguard, driver_device, 0, ROT90, "SNK", "Vanguard (Japan)", GAME_IMPERFECT_SOUND ) -GAME( 1981, fantasy, 0, fantasy, fantasy, driver_device, 0, ROT90, "SNK", "Fantasy (World)", GAME_IMPERFECT_SOUND ) -GAME( 1981, fantasyu, fantasy, fantasy, fantasyu, driver_device, 0, ROT90, "SNK (Rock-Ola license)", "Fantasy (US)", GAME_IMPERFECT_SOUND ) -GAME( 1981, fantasyj, fantasy, fantasy, fantasyu, driver_device, 0, ROT90, "SNK", "Fantasy (Japan)", GAME_IMPERFECT_SOUND ) -GAME( 1982, pballoon, 0, pballoon, pballoon, driver_device, 0, ROT90, "SNK", "Pioneer Balloon", 0 ) -GAME( 1982, pballoonr,pballoon, pballoon, pballoon, driver_device, 0, ROT90, "SNK (Rock-Ola license)", "Pioneer Balloon (Rock-Ola license)", 0 ) -GAME( 1982, nibbler, 0, nibbler, nibbler, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (rev 9)", 0 ) -GAME( 1982, nibbler8, nibbler, nibbler, nibbler8, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (rev 8)", 0 ) -GAME( 1982, nibbler6, nibbler, nibbler, nibbler6, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (rev 6)", 0 ) -GAME( 1982, nibblerp, nibbler, nibbler, nibbler6, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (Pioneer Balloon conversion)", 0 ) -GAME( 1983, nibblero, nibbler, nibbler, nibbler8, driver_device, 0, ROT90, "Rock-Ola (Olympia license)", "Nibbler (Olympia - rev 8)", 0 ) +GAME( 1980, sasuke, 0, sasuke, sasuke, driver_device, 0, ROT90, "SNK", "Sasuke vs. Commander", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, satansat, 0, satansat, satansat, driver_device, 0, ROT90, "SNK", "Satan of Saturn (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, satansata,satansat, satansat, satansat, driver_device, 0, ROT90, "SNK", "Satan of Saturn (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, zarzon, satansat, satansat, satansat, driver_device, 0, ROT90, "SNK (Taito America license)", "Zarzon", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, satansatind,satansat,satansat,satansat, driver_device, 0, ROT90, "bootleg (Inder S.A.)", "Satan of Saturn (Inder S.A., bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, vanguard, 0, vanguard, vanguard, driver_device, 0, ROT90, "SNK", "Vanguard (SNK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, vanguardc,vanguard, vanguard, vanguard, driver_device, 0, ROT90, "SNK (Centuri license)", "Vanguard (Centuri)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, vanguardj,vanguard, vanguard, vanguard, driver_device, 0, ROT90, "SNK", "Vanguard (Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, fantasy, 0, fantasy, fantasy, driver_device, 0, ROT90, "SNK", "Fantasy (World)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, fantasyu, fantasy, fantasy, fantasyu, driver_device, 0, ROT90, "SNK (Rock-Ola license)", "Fantasy (US)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1981, fantasyj, fantasy, fantasy, fantasyu, driver_device, 0, ROT90, "SNK", "Fantasy (Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1982, pballoon, 0, pballoon, pballoon, driver_device, 0, ROT90, "SNK", "Pioneer Balloon", GAME_SUPPORTS_SAVE ) +GAME( 1982, pballoonr,pballoon, pballoon, pballoon, driver_device, 0, ROT90, "SNK (Rock-Ola license)", "Pioneer Balloon (Rock-Ola license)", GAME_SUPPORTS_SAVE ) +GAME( 1982, nibbler, 0, nibbler, nibbler, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (rev 9)", GAME_SUPPORTS_SAVE ) +GAME( 1982, nibbler8, nibbler, nibbler, nibbler8, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (rev 8)", GAME_SUPPORTS_SAVE ) +GAME( 1982, nibbler6, nibbler, nibbler, nibbler6, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (rev 6)", GAME_SUPPORTS_SAVE ) +GAME( 1982, nibblerp, nibbler, nibbler, nibbler6, driver_device, 0, ROT90, "Rock-Ola", "Nibbler (Pioneer Balloon conversion)", GAME_SUPPORTS_SAVE ) +GAME( 1983, nibblero, nibbler, nibbler, nibbler8, driver_device, 0, ROT90, "Rock-Ola (Olympia license)", "Nibbler (Olympia - rev 8)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index 9175c0e776c..dee53e1e965 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:David Haywood, ??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Mike Coates /*************************************************************************** Snow Brothers (Toaplan) / SemiCom Hardware diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c index 47fdf01c51a..b4b64320e07 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jarek Burczynski, Tomasz Slanina /************************************************************************************** Space Guerrilla PCB Layout diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c index 4efd2a10721..d4fcfec56a1 100644 --- a/src/mame/drivers/spbactn.c +++ b/src/mame/drivers/spbactn.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Stephh /******************************************************************************* Super Pinball Action (c) 1991 Tecmo diff --git a/src/mame/drivers/spectra.c b/src/mame/drivers/spectra.c index 061ab4605ef..f7da8660725 100644 --- a/src/mame/drivers/spectra.c +++ b/src/mame/drivers/spectra.c @@ -158,11 +158,11 @@ WRITE8_MEMBER( spectra_state::portb_w ) { m_portb = data; float vco = 5.0; - if (BIT(data, 0)) vco -= 0.3125; - if (BIT(data, 1)) vco -= 0.625; - if (BIT(data, 2)) vco -= 1.25; - if (BIT(data, 3)) vco -= 2.5; - m_snsnd->vco_voltage_w(5.3125 - vco); + if (BIT(data, 0)) vco -= 0.3125f; + if (BIT(data, 1)) vco -= 0.625f; + if (BIT(data, 2)) vco -= 1.25f; + if (BIT(data, 3)) vco -= 2.5f; + m_snsnd->vco_voltage_w(5.3125f - vco); m_snsnd->enable_w(!BIT(data, 4)); // strobe: toggles enable m_snsnd->envelope_1_w(!BIT(data, 5)); //decay: toggles envelope m_snsnd->vco_w(BIT(data, 6)); // "phaser" sound: VCO toggled diff --git a/src/mame/drivers/speedspn.c b/src/mame/drivers/speedspn.c index 5ce8e4b42ca..f39fb3d350a 100644 --- a/src/mame/drivers/speedspn.c +++ b/src/mame/drivers/speedspn.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Farfetch'd /*** DRIVER INFO & NOTES ****************************************************** Speed Spin (c)1994 TCH diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index ab1913e17f1..a5c1e7aeb49 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, David Haywood /*************************************************************************** diff --git a/src/mame/drivers/sprcros2.c b/src/mame/drivers/sprcros2.c index 3d09bc96004..473fbce281a 100644 --- a/src/mame/drivers/sprcros2.c +++ b/src/mame/drivers/sprcros2.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy /* Super Cross II (JPN Ver.) (c)1986 GM Shoji diff --git a/src/mame/drivers/sprint4.c b/src/mame/drivers/sprint4.c index 331526e8d9d..715a654ab21 100644 --- a/src/mame/drivers/sprint4.c +++ b/src/mame/drivers/sprint4.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Sprint 4 driver diff --git a/src/mame/drivers/sprint8.c b/src/mame/drivers/sprint8.c index 2549234fd4d..d0827739fb7 100644 --- a/src/mame/drivers/sprint8.c +++ b/src/mame/drivers/sprint8.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Sprint 8 driver diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c index 2ce73c8d0ad..2744f928dfa 100644 --- a/src/mame/drivers/sslam.c +++ b/src/mame/drivers/sslam.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Pierpaolo Prazzoli +// copyright-holders:Pierpaolo Prazzoli, Quench /* Super Slam (c)1993 Playmark */ /* diff --git a/src/mame/drivers/sspeedr.c b/src/mame/drivers/sspeedr.c index 61ef12e14bf..39082b8efa6 100644 --- a/src/mame/drivers/sspeedr.c +++ b/src/mame/drivers/sspeedr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Taito Super Speed Race driver diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index 9c040717cef..f96b592b59a 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /*******************************************************/ /* */ /* Yachiyo "Space Stranger/Space Stranger 2" */ diff --git a/src/mame/drivers/stactics.c b/src/mame/drivers/stactics.c index 7a846e2040c..23a6b0661e0 100644 --- a/src/mame/drivers/stactics.c +++ b/src/mame/drivers/stactics.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /**************************************************************************** diff --git a/src/mame/drivers/starcrus.c b/src/mame/drivers/starcrus.c index 5231497545b..b33dbe0df33 100644 --- a/src/mame/drivers/starcrus.c +++ b/src/mame/drivers/starcrus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /*************************************************************************** diff --git a/src/mame/drivers/starfire.c b/src/mame/drivers/starfire.c index 96f80c2f943..82c9d43511c 100644 --- a/src/mame/drivers/starfire.c +++ b/src/mame/drivers/starfire.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Daniel Boris, Olivier Galibert, Aaron Giles +// license:BSD-3-Clause +// copyright-holders:Dan Boris, Olivier Galibert, Aaron Giles /*************************************************************************** Star Fire/Fire One system diff --git a/src/mame/drivers/starshp1.c b/src/mame/drivers/starshp1.c index 84668087c60..fe46f02e618 100644 --- a/src/mame/drivers/starshp1.c +++ b/src/mame/drivers/starshp1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Frank Palazzolo, Stefan Jokish /*************************************************************************** Atari Starship 1 driver diff --git a/src/mame/drivers/starwars.c b/src/mame/drivers/starwars.c index 979d714f063..ee5eeeaca7d 100644 --- a/src/mame/drivers/starwars.c +++ b/src/mame/drivers/starwars.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/drivers/stellafr.c b/src/mame/drivers/stellafr.c index 4e2c0725199..1a39ef52dfc 100644 --- a/src/mame/drivers/stellafr.c +++ b/src/mame/drivers/stellafr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Stella diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c index c47cb6d1c0d..75467910f10 100644 --- a/src/mame/drivers/stfight.c +++ b/src/mame/drivers/stfight.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall /***************************** (by Mark McDougall) *** STREET FIGHT hardware *** This has been adapted from the excellent diff --git a/src/mame/drivers/stlforce.c b/src/mame/drivers/stlforce.c index d7c211252cc..35c08ade4e6 100644 --- a/src/mame/drivers/stlforce.c +++ b/src/mame/drivers/stlforce.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/stuntair.c b/src/mame/drivers/stuntair.c index 121a2a234e7..941c66ccb76 100644 --- a/src/mame/drivers/stuntair.c +++ b/src/mame/drivers/stuntair.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/su2000.c b/src/mame/drivers/su2000.c index ef6a604ce8d..cd97731ff87 100644 --- a/src/mame/drivers/su2000.c +++ b/src/mame/drivers/su2000.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Virtuality SU2000 hardware diff --git a/src/mame/drivers/summit.c b/src/mame/drivers/summit.c index 6fada7c7974..ddc3f36d70f 100644 --- a/src/mame/drivers/summit.c +++ b/src/mame/drivers/summit.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Summit Coin - Push Over (c)1981 diff --git a/src/mame/drivers/sumt8035.c b/src/mame/drivers/sumt8035.c index 00ed46e697e..7b91746793f 100644 --- a/src/mame/drivers/sumt8035.c +++ b/src/mame/drivers/sumt8035.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Summit Coin - 8035 hardware diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c index ac6282aa2f0..01fe7220c43 100644 --- a/src/mame/drivers/supdrapo.c +++ b/src/mame/drivers/supdrapo.c @@ -494,21 +494,21 @@ A3-1J */ ROM_START( supdrapo ) ROM_REGION( 0x010000, "maincpu", 0 ) - ROM_LOAD( "a2-1c", 0x0000, 0x1000, CRC(b65af689) SHA1(b45cd15ca8f9c931d83a90f3cdbebf218070b195) ) - ROM_LOAD( "a2-1d", 0x1000, 0x1000, CRC(9ccc4347) SHA1(ea8f4d17aaacc7091ca0a66247b55eb12155c9d7) ) - ROM_LOAD( "a1-1e", 0x2000, 0x1000, CRC(44f2b75d) SHA1(615d0acd3f8a109334f415732b6b4fe7b810d91c) ) //a2-1e - ROM_LOAD( "a1-1h", 0x3000, 0x1000, CRC(9c1a10ff) SHA1(243dd64f0b29f9bed4cfa8ecb801ddd973d9e3c3) ) - ROM_LOAD( "a3-1j", 0x4000, 0x1000, CRC(71c2bf1c) SHA1(cb98bbf88b8a410075a074ec8619c6e703c6c582) ) + ROM_LOAD( "a2-1c", 0x0000, 0x1000, CRC(b65af689) SHA1(b45cd15ca8f9c931d83a90f3cdbebf218070b195) ) + ROM_LOAD( "a2-1d", 0x1000, 0x1000, CRC(9ccc4347) SHA1(ea8f4d17aaacc7091ca0a66247b55eb12155c9d7) ) + ROM_LOAD( "a1-1e", 0x2000, 0x1000, CRC(44f2b75d) SHA1(615d0acd3f8a109334f415732b6b4fe7b810d91c) ) //a2-1e + ROM_LOAD( "a1-1h", 0x3000, 0x1000, CRC(9c1a10ff) SHA1(243dd64f0b29f9bed4cfa8ecb801ddd973d9e3c3) ) + ROM_LOAD( "a3-1j", 0x4000, 0x1000, CRC(71c2bf1c) SHA1(cb98bbf88b8a410075a074ec8619c6e703c6c582) ) ROM_REGION( 0x04000, "gfx1", 0 ) - ROM_LOAD( "a1-4p", 0x0000, 0x1000, CRC(5ac096cc) SHA1(60173a83d0e60fd4d0eb40b7b4e80a74ac5fb23d) ) - ROM_LOAD( "a1-4n", 0x1000, 0x1000, CRC(6985fac9) SHA1(c6357fe0f042b67f8559ec9da03106d1ff08dc66) ) - ROM_LOAD( "a1-4l", 0x2000, 0x1000, CRC(534f7b94) SHA1(44b83053827b27b9e45f6fc50d3878984ef5c5cc) ) - ROM_LOAD( "a1-4k", 0x3000, 0x1000, CRC(3d881f5b) SHA1(53d8800a098e4393224de0b82f8e516f73fd6b62) ) + ROM_LOAD( "a1-4p", 0x0000, 0x1000, CRC(5ac096cc) SHA1(60173a83d0e60fd4d0eb40b7b4e80a74ac5fb23d) ) + ROM_LOAD( "a1-4n", 0x1000, 0x1000, CRC(6985fac9) SHA1(c6357fe0f042b67f8559ec9da03106d1ff08dc66) ) + ROM_LOAD( "a1-4l", 0x2000, 0x1000, CRC(534f7b94) SHA1(44b83053827b27b9e45f6fc50d3878984ef5c5cc) ) + ROM_LOAD( "a1-4k", 0x3000, 0x1000, CRC(3d881f5b) SHA1(53d8800a098e4393224de0b82f8e516f73fd6b62) ) ROM_REGION( 0x00200, "proms", 0 ) - ROM_LOAD( "a1-9n", 0x0000, 0x0100, CRC(e62529e3) SHA1(176f2069b0c06c1d088909e81658652af06c8eec) ) - ROM_LOAD( "a1-9p", 0x0100, 0x0100, CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) ) + ROM_LOAD( "a1-9n", 0x0000, 0x0100, CRC(e62529e3) SHA1(176f2069b0c06c1d088909e81658652af06c8eec) ) + ROM_LOAD( "a1-9p", 0x0100, 0x0100, CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) ) ROM_END /* @@ -525,21 +525,21 @@ ROM_END */ ROM_START( supdrapoa ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "0.c1", 0x0000, 0x1000, CRC(63e2775a) SHA1(742e8db5378631fd93a22d2131f9523ee74c03a5) ) - ROM_LOAD( "1.d1", 0x1000, 0x1000, CRC(aa1578de) SHA1(8f1a33864b2c8e09a25c7603522ebfc7e0757d56) ) - ROM_LOAD( "2.e1", 0x2000, 0x1000, CRC(ffe0415c) SHA1(0233d192814ced0b32abd4b7d2e93431a339732f) ) - ROM_LOAD( "3.h1", 0x3000, 0x1000, CRC(1bae52fa) SHA1(f89d48d67e52d0fca51eb23fee2d5cb94afcf7f4) ) - ROM_LOAD( "4.j1", 0x4000, 0x1000, CRC(7af26f63) SHA1(aeeca69ef1c21acae4283183e4b073ec0d303f4a) ) + ROM_LOAD( "0.c1", 0x0000, 0x1000, CRC(63e2775a) SHA1(742e8db5378631fd93a22d2131f9523ee74c03a5) ) + ROM_LOAD( "1.d1", 0x1000, 0x1000, CRC(aa1578de) SHA1(8f1a33864b2c8e09a25c7603522ebfc7e0757d56) ) + ROM_LOAD( "2.e1", 0x2000, 0x1000, CRC(ffe0415c) SHA1(0233d192814ced0b32abd4b7d2e93431a339732f) ) + ROM_LOAD( "3.h1", 0x3000, 0x1000, CRC(1bae52fa) SHA1(f89d48d67e52d0fca51eb23fee2d5cb94afcf7f4) ) + ROM_LOAD( "4.j1", 0x4000, 0x1000, CRC(7af26f63) SHA1(aeeca69ef1c21acae4283183e4b073ec0d303f4a) ) ROM_REGION( 0x4000, "gfx1", 0 ) - ROM_LOAD( "8.p4", 0x0000, 0x1000, CRC(ef0700c5) SHA1(53f49d99f310fdf675e3b7339bdca1115e4a1935) ) - ROM_LOAD( "7.n4", 0x1000, 0x1000, CRC(3f77031b) SHA1(2d282d39ea568aa44af8b56228b6e096c2713a15) ) - ROM_LOAD( "6.l4", 0x2000, 0x1000, CRC(d70cd50e) SHA1(c3e3dcf79f8a25df5b878ef8734a6d0dc22004ba) ) - ROM_LOAD( "5.k4", 0x3000, 0x1000, CRC(34564917) SHA1(90b49fe8a5371159388839d42913352cf58c60e6) ) + ROM_LOAD( "8.p4", 0x0000, 0x1000, CRC(ef0700c5) SHA1(53f49d99f310fdf675e3b7339bdca1115e4a1935) ) + ROM_LOAD( "7.n4", 0x1000, 0x1000, CRC(3f77031b) SHA1(2d282d39ea568aa44af8b56228b6e096c2713a15) ) + ROM_LOAD( "6.l4", 0x2000, 0x1000, CRC(d70cd50e) SHA1(c3e3dcf79f8a25df5b878ef8734a6d0dc22004ba) ) + ROM_LOAD( "5.k4", 0x3000, 0x1000, CRC(34564917) SHA1(90b49fe8a5371159388839d42913352cf58c60e6) ) ROM_REGION( 0x00200, "proms", 0 ) /* using the color PROMs from the parent set - no reason to think they differ */ - ROM_LOAD( "a1-9n", 0x0000, 0x0100, CRC(e62529e3) SHA1(176f2069b0c06c1d088909e81658652af06c8eec) ) - ROM_LOAD( "a1-9p", 0x0100, 0x0100, CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) ) + ROM_LOAD( "a1-9n", 0x0000, 0x0100, CRC(e62529e3) SHA1(176f2069b0c06c1d088909e81658652af06c8eec) ) + ROM_LOAD( "a1-9p", 0x0100, 0x0100, CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) ) ROM_END /* @@ -600,12 +600,11 @@ ROM_START( supdrapob ) ROM_END - /********************************************************************* Games Drivers **********************************************************************/ -/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS... */ -GAME( 1983, supdrapo, 0, supdrapo, supdrapo, driver_device, 0, ROT90, "Valadon Automation (Stern Electronics license)", "Super Draw Poker (set 1)", GAME_SUPPORTS_SAVE ) -GAME( 1983, supdrapoa, supdrapo, supdrapo, supdrapo, driver_device, 0, ROT90, "Valadon Automation / Jeutel", "Super Draw Poker (set 2)", GAME_SUPPORTS_SAVE ) -GAME( 1983, supdrapob, supdrapo, supdrapo, supdrapo, driver_device, 0, ROT90, "bootleg", "Super Draw Poker (bootleg)", GAME_SUPPORTS_SAVE ) +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ +GAME( 1983, supdrapo, 0, supdrapo, supdrapo, driver_device, 0, ROT90, "Valadon Automation (Stern Electronics license)", "Super Draw Poker (set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1983, supdrapoa, supdrapo, supdrapo, supdrapo, driver_device, 0, ROT90, "Valadon Automation / Jeutel", "Super Draw Poker (set 2)", GAME_SUPPORTS_SAVE ) +GAME( 1983, supdrapob, supdrapo, supdrapo, supdrapo, driver_device, 0, ROT90, "bootleg", "Super Draw Poker (bootleg)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/supduck.c b/src/mame/drivers/supduck.c index 5f93a653a2c..a95ca3b7521 100644 --- a/src/mame/drivers/supduck.c +++ b/src/mame/drivers/supduck.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /********************************************************************************* diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c index d5d56d6e7a1..95d4b91ad7d 100644 --- a/src/mame/drivers/superdq.c +++ b/src/mame/drivers/superdq.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ernesto Corvi /************************************************************************* Universal System 1 diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c index 3d467517c06..6f31c82138d 100644 --- a/src/mame/drivers/suprnova.c +++ b/src/mame/drivers/suprnova.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:David Haywood, Sylvain Glaize +// license:BSD-3-Clause +// copyright-holders:David Haywood, Sylvain Glaize, Paul Priest, Olivier Galibert /* Super Kaneko Nova System Original Driver by Sylvain Glaize diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index 9bed4e260e0..44246f5f5e8 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*** DRIVER INFORMATION & NOTES *********************************************** diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index 5916bcb1f73..692c99e659f 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Phil Stroffolino, Mirko Buffoni /* System 16 / 18 bootlegs diff --git a/src/mame/drivers/tagteam.c b/src/mame/drivers/tagteam.c index 217a2eada49..e0abaacd8af 100644 --- a/src/mame/drivers/tagteam.c +++ b/src/mame/drivers/tagteam.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Steve Ellenoff, Brad Oliver /*************************************************************************** Tag Team Wrestling hardware description: diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index 968a77a9bc2..80a69da57db 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -586,7 +586,7 @@ void taitof2_state::device_timer(emu_timer &timer, device_timer_id id, int param INTERRUPT_GEN_MEMBER(taitof2_state::taitof2_interrupt) { - timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), TIMER_TAITOF2_INTERRUPT6); + m_int6_timer->adjust(m_maincpu->cycles_to_attotime(500)); device.execute().set_input_line(5, HOLD_LINE); } @@ -2836,6 +2836,7 @@ WRITE8_MEMBER(taitof2_state::cameltrya_porta_w) MACHINE_START_MEMBER(taitof2_state,common) { + m_int6_timer = timer_alloc(TIMER_TAITOF2_INTERRUPT6); } MACHINE_START_MEMBER(taitof2_state,f2) diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c index e69956bc752..ed0ca9d6bf9 100644 --- a/src/mame/drivers/taito_l.c +++ b/src/mame/drivers/taito_l.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Taito L-System diff --git a/src/mame/drivers/taito_o.c b/src/mame/drivers/taito_o.c index 4bc09d4a877..4ae6f880c5c 100644 --- a/src/mame/drivers/taito_o.c +++ b/src/mame/drivers/taito_o.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /*************************************************************** Taito 'O System' diff --git a/src/mame/drivers/taitogn.c b/src/mame/drivers/taitogn.c index 852ba2a55be..d71f4ab4384 100644 --- a/src/mame/drivers/taitogn.c +++ b/src/mame/drivers/taitogn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert, smf /* GNET Motherboard diff --git a/src/mame/drivers/taitopjc.c b/src/mame/drivers/taitopjc.c index 79a267a95d7..db656c9ba9a 100644 --- a/src/mame/drivers/taitopjc.c +++ b/src/mame/drivers/taitopjc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /* Taito Power-JC System diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c index 5dc3df017df..1d5ec5916c7 100644 --- a/src/mame/drivers/taitosj.c +++ b/src/mame/drivers/taitosj.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Taito SJ system diff --git a/src/mame/drivers/taitottl.c b/src/mame/drivers/taitottl.c index 901fb204e98..83d30685e7c 100644 --- a/src/mame/drivers/taitottl.c +++ b/src/mame/drivers/taitottl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli /*************************************************************************** Taito Discrete Hardware Games diff --git a/src/mame/drivers/taitotx.c b/src/mame/drivers/taitotx.c index e2f240f2e6f..4da4f131dbb 100644 --- a/src/mame/drivers/taitotx.c +++ b/src/mame/drivers/taitotx.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Taito Type X Skeleton - PC based platforms diff --git a/src/mame/drivers/tank8.c b/src/mame/drivers/tank8.c index b8cc1a8f304..86971793027 100644 --- a/src/mame/drivers/tank8.c +++ b/src/mame/drivers/tank8.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Tank 8 driver diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c index e8828c0c037..ce6ac51e3f4 100644 --- a/src/mame/drivers/taotaido.c +++ b/src/mame/drivers/taotaido.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c index c8984d5b92b..2f5e6ec3da9 100644 --- a/src/mame/drivers/tapatune.c +++ b/src/mame/drivers/tapatune.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Mariusz Wojcieszek, Phil Bennett +// copyright-holders:Mariusz Wojcieszek, Philip Bennett /*************************************************************************** Tap a Tune diff --git a/src/mame/drivers/tasman.c b/src/mame/drivers/tasman.c index ffab0b366a2..af882f6ef15 100644 --- a/src/mame/drivers/tasman.c +++ b/src/mame/drivers/tasman.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Philip Bennett, R. Belmont /* Konami Gambling Games ("Tasman" hardware) System GX derivative diff --git a/src/mame/drivers/taxidriv.c b/src/mame/drivers/taxidriv.c index 20b81291426..bac03070b22 100644 --- a/src/mame/drivers/taxidriv.c +++ b/src/mame/drivers/taxidriv.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Taxi Driver (c) 1984 Graphic Techno diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c index 4a55d74572e..252944a9d36 100644 --- a/src/mame/drivers/tbowl.c +++ b/src/mame/drivers/tbowl.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*** Tecmo Bowl (c)1987 Tecmo diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c index 6b94ff2934e..98790ac360a 100644 --- a/src/mame/drivers/tecmosys.c +++ b/src/mame/drivers/tecmosys.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch,David Haywood,Tomasz Slanina /* Tecmo System Driver by Farfetch, David Haywood & Tomasz Slanina diff --git a/src/mame/drivers/tempest.c b/src/mame/drivers/tempest.c index 4e91768703f..fda9c73fdf9 100644 --- a/src/mame/drivers/tempest.c +++ b/src/mame/drivers/tempest.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas /*************************************************************************** Atari Tempest hardware diff --git a/src/mame/drivers/terracre.c b/src/mame/drivers/terracre.c index 99cd13f8699..76fbefa2e0f 100644 --- a/src/mame/drivers/terracre.c +++ b/src/mame/drivers/terracre.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /****************************************************************** Terra Cresta (preliminary) diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c index c0df9ef622a..96fb1712799 100644 --- a/src/mame/drivers/tgtpanic.c +++ b/src/mame/drivers/tgtpanic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Konami Target Panic (cabinet test PCB) diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c index b60f8dffe8c..5d6fbda845d 100644 --- a/src/mame/drivers/thayers.c +++ b/src/mame/drivers/thayers.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Andrew Gardner /* TODO: diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c index 7e2e5ba5ee0..960fdd08614 100644 --- a/src/mame/drivers/thief.c +++ b/src/mame/drivers/thief.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Victor Trucco, Mike Balfour, Phil Stroffolino /****************************************************************** diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index 89899b4fe23..bf8a1312cc5 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia, Mariusz Wojcieszek +// copyright-holders:Luca Elia, Mariusz Wojcieszek, Peter Ferrie /*************************************************************************** -= Touch Master / Galaxy Games =- diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c index 3e6e96e152f..8b536a1e30e 100644 --- a/src/mame/drivers/tmmjprd.c +++ b/src/mame/drivers/tmmjprd.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* tmmjprd.c diff --git a/src/mame/drivers/toaplan1.c b/src/mame/drivers/toaplan1.c index d31cb186bfa..e1a7dc09a64 100644 --- a/src/mame/drivers/toaplan1.c +++ b/src/mame/drivers/toaplan1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Darren Olafson, Quench /*************************************************************************** diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 0ed377d6e53..f704fde1ac2 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Quench, Yochizo +// license:BSD-3-Clause +// copyright-holders:Quench, Yochizo, David Haywood /***************************************************************************** ToaPlan game hardware from 1991 - 1994 diff --git a/src/mame/drivers/tokyocop.c b/src/mame/drivers/tokyocop.c index ce87243c2ff..e5d6634be0f 100644 --- a/src/mame/drivers/tokyocop.c +++ b/src/mame/drivers/tokyocop.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Tokyo Cop TODO: diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index e632c3dc29e..1bab838ec81 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves /***************+************************************************************ Top Speed / Full Throttle (c) Taito 1987 diff --git a/src/mame/drivers/tourtabl.c b/src/mame/drivers/tourtabl.c index 5cbefd850f9..a89d312c37f 100644 --- a/src/mame/drivers/tourtabl.c +++ b/src/mame/drivers/tourtabl.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Tournament Table driver diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c index cac7593b0ba..43913905cf5 100644 --- a/src/mame/drivers/trackfld.c +++ b/src/mame/drivers/trackfld.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /* Track & Field / Hyper Olympic diff --git a/src/mame/drivers/triforce.c b/src/mame/drivers/triforce.c index a85948758f6..a6743767dad 100644 --- a/src/mame/drivers/triforce.c +++ b/src/mame/drivers/triforce.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Triforce Skeleton -- split from Naomi.c diff --git a/src/mame/drivers/triplhnt.c b/src/mame/drivers/triplhnt.c index 5da2fdc6669..6d34dc5a573 100644 --- a/src/mame/drivers/triplhnt.c +++ b/src/mame/drivers/triplhnt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /*************************************************************************** Atari Triple Hunt Driver diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 929dcae1793..48981ebf535 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Table Tennis Champions (c) 1995 Gamart diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c index e22929793e4..b5bef479cb2 100644 --- a/src/mame/drivers/tugboat.c +++ b/src/mame/drivers/tugboat.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /**************************************************************************** Tug Boat diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index ec99f39778e..5df2fc2cb20 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index 4143b84d46f..63e7f1d22e8 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** Tumblepop (World) (c) 1991 Data East Corporation diff --git a/src/mame/drivers/tunhunt.c b/src/mame/drivers/tunhunt.c index 834774112c7..7d995584ec1 100644 --- a/src/mame/drivers/tunhunt.c +++ b/src/mame/drivers/tunhunt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Owen Rubin,David Haywood /*************************************************************************** Atari Tunnel Hunt hardware diff --git a/src/mame/drivers/turrett.c b/src/mame/drivers/turrett.c index 7b9d523a4ee..ba7c5cac401 100644 --- a/src/mame/drivers/turrett.c +++ b/src/mame/drivers/turrett.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Turret Tower by Dell Electronics diff --git a/src/mame/drivers/twincobr.c b/src/mame/drivers/twincobr.c index 62e8aaeb6d0..98991e2b173 100644 --- a/src/mame/drivers/twincobr.c +++ b/src/mame/drivers/twincobr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Quench /**************************************************************************** diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index d3142eadc0e..b35d2139bc7 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c index e3f543441f8..4300c9826e3 100644 --- a/src/mame/drivers/tx1.c +++ b/src/mame/drivers/tx1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Tatsumi TX-1/Buggy Boy hardware diff --git a/src/mame/drivers/ultratnk.c b/src/mame/drivers/ultratnk.c index e950f79b480..ccb8e1b4858 100644 --- a/src/mame/drivers/ultratnk.c +++ b/src/mame/drivers/ultratnk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Stefan Jokisch /*************************************************************************** Atari Ultra Tank driver diff --git a/src/mame/drivers/unkfr.c b/src/mame/drivers/unkfr.c index 43ef67c24b3..4299196873d 100644 --- a/src/mame/drivers/unkfr.c +++ b/src/mame/drivers/unkfr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Unknown Fruit Machine ROMs diff --git a/src/mame/drivers/usgames.c b/src/mame/drivers/usgames.c index e088d3b5c44..e1afbc65520 100644 --- a/src/mame/drivers/usgames.c +++ b/src/mame/drivers/usgames.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Nicola Salmoria /* US Games - Trivia / Quiz / 'Amusement Only' Gambling Games diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index fee206a2499..895e9c6f8cf 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Jason Eckhardt, Andrew Gardner, Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Jason Eckhardt, Andrew Gardner, Philip Bennett /* Virtual Combat hardware games. diff --git a/src/mame/drivers/vectrex.c b/src/mame/drivers/vectrex.c index cf1ac1b8046..297f55cb28c 100644 --- a/src/mame/drivers/vectrex.c +++ b/src/mame/drivers/vectrex.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /***************************************************************** diff --git a/src/mame/drivers/vertigo.c b/src/mame/drivers/vertigo.c index ecb7daefe28..fb6377f1e13 100644 --- a/src/mame/drivers/vertigo.c +++ b/src/mame/drivers/vertigo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c index a0a2b787060..e7ae9926454 100644 --- a/src/mame/drivers/vicdual.c +++ b/src/mame/drivers/vicdual.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /*************************************************************************** VIC Dual Game board diff --git a/src/mame/drivers/videopin.c b/src/mame/drivers/videopin.c index ab5578f1248..cd4a5f6f95f 100644 --- a/src/mame/drivers/videopin.c +++ b/src/mame/drivers/videopin.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sebastien Monassa /************************************************************************* diff --git a/src/mame/drivers/videopkr.c b/src/mame/drivers/videopkr.c index f2d00738b14..472eb19ca93 100644 --- a/src/mame/drivers/videopkr.c +++ b/src/mame/drivers/videopkr.c @@ -1,278 +1,273 @@ // license:??? -// copyright-holders:Roberto Fresca +// copyright-holders:Roberto Fresca, Grull Osgo /************************************************************************* - VIDEO POKER - IGT/INTERFLIP - ----------------------- + VIDEO POKER - IGT/INTERFLIP + --------------------------- - Original driver by Grull Osgo. - Rewrite and additional work by Roberto Fresca. - Fortune I (IGT) added by Jim Stolis. + Original driver by Grull Osgo. + Rewrite and additional work by Roberto Fresca. + Fortune I (IGT) added by Jim Stolis. - Games running on this hardware: + Games running on this hardware: - * Draw Poker, 1984, IGT - International Game Technology + * Draw Poker, 1984, IGT - International Game Technology - * Video Poker, 1984, InterFlip. - * Black Jack, 1984, InterFlip. - * Video Dado, 1987, InterFlip. - * Video Cordoba, 1987, InterFlip. + * Video Poker, 1984, InterFlip. + * Black Jack, 1984, InterFlip. + * Video Dado, 1987, InterFlip. + * Video Cordoba, 1987, InterFlip. - * Baby Poker, 1989, Recreativos Franco. - * Baby Dado, 1989, Recreativos Franco. + * Baby Poker, 1989, Recreativos Franco. + * Baby Dado, 1989, Recreativos Franco. - * Video Poker (v1403), 198?, Recreativos Franco?. + * Video Poker (v1403), 198?, Recreativos Franco?. *************************************************************************** + History: + ======== - History: - ======== + In 1975, Si Redd founded A1-Supply. This was renamed to Sircoma in 1978, + and eventually IGT (International Game Technology) in 1981. - In 1975, Si Redd founded A1-Supply. This was renamed to Sircoma in 1978, - and eventually IGT (International Game Technology) in 1981. + Along the way, in 1978, Fortune Coin Company was acquired and contained + the basis to their Fortune I game machines. - Along the way, in 1978, Fortune Coin Company was acquired and contained - the basis to their Fortune I game machines. + The Fortune I hardware consisted of the following games: + Regular Draw Poker + Progressive Draw Poker + Joker Wild Poker + Double Up Draw Poker + Credit Draw Poker + Lucky 7 Poker (Seven Card Stud Poker) + Twenty One + Live 21 + Count Down 21 + Two Hand 21 + In Between + Regular Slot + Credit Slot - The Fortune I hardware consisted of the following games: - Regular Draw Poker - Progressive Draw Poker - Joker Wild Poker - Double Up Draw Poker - Credit Draw Poker - Lucky 7 Poker (Seven Card Stud Poker) - Twenty One - Live 21 - Count Down 21 - Two Hand 21 - In Between - Regular Slot - Credit Slot + InterFlip (Spain), is a subsidiary of Recreativos Franco. + This company was created mainly with the purpose of manufacture + and distribute export-class games. - InterFlip (Spain), is a subsidiary of Recreativos Franco. - This company was created mainly with the purpose of manufacture - and distribute export-class games. - - These machines were build in upright wood style cabinets, and compliment - with class "C" (for casinos) spanish gaming regulations. + These machines were build in upright wood style cabinets, and compliment + with class "C" (for casinos) spanish gaming regulations. *************************************************************************** + Hardware Info + ============= - Hardware Info - ============= - - This is a two board system: Main & Sound board. + This is a two board system: Main & Sound board. + * Main board: - * Main board: + 1x Intel 8039 CPU Clocked @ 6/8 MHz. + 2x 2716 EPROM Program ROM. + 2x 2716 EPROM Character/graphics ROM. + 1x 5101 (256 x 4) SRAM Data Memory (Battery Backed RAM). + 2x 2114 (1024 x 4) SRAM 8-Bit Char. RAM. + 1x 2114 (1024 x 4) SRAM 4-Bit Color RAM. + 1x 74s287 (256 x 4) TTL PROM Color PROM. - 1x Intel 8039 CPU Clocked @ 6/8 MHz. - 2x 2716 EPROM Program ROM. - 2x 2716 EPROM Character/graphics ROM. - 1x 5101 (256 x 4) SRAM Data Memory (Battery Backed RAM). - 2x 2114 (1024 x 4) SRAM 8-Bit Char. RAM. - 1x 2114 (1024 x 4) SRAM 4-Bit Color RAM. - 1x 74s287 (256 x 4) TTL PROM Color PROM. + 1x 6 MHz.(or 8 MHz.) Crystal CPU clock. + 1x 7.8643 MHz. Crystal Video System. - 1x 6 MHz.(or 8 MHz.) Crystal CPU clock. - 1x 7.8643 MHz. Crystal Video System. + 1x 3.6 Ni-Cd Battery Data Memory. - 1x 3.6 Ni-Cd Battery Data Memory. + TTL type Raster video Configurable HIGH-LOW resolution through hardware jumper. + Configurable 50Hz-60Hz V-Sync through hardware jumper. - TTL type Raster video Configurable HIGH-LOW resolution through hardware jumper. - Configurable 50Hz-60Hz V-Sync through hardware jumper. + I/O System Buffered, latched & optocoupled. - I/O System Buffered, latched & optocoupled. + * Sound board: - * Sound board: - - 1x Intel 8039 CPU Clocked @ 8 MHz. - 2x 2716 EPROM Program ROM. - 1x 1408 DAC - 1x 8.0000 MHz. Crystal + 1x Intel 8039 CPU Clocked @ 8 MHz. + 2x 2716 EPROM Program ROM. + 1x 1408 DAC + 1x 8.0000 MHz. Crystal ******************************************************************************** + Main CPU Memory Map + =================== - Main CPU Memory Map - =================== - - 0x0000 - 0x0FFF Program ROM. + 0x0000 - 0x0FFF Program ROM. - Data & Video RAM are mapped through I/O hardware implementations due to - I8039 memory addressing restrictions. + Data & Video RAM are mapped through I/O hardware implementations due to + I8039 memory addressing restrictions. - Main CPU I/0 Map - ================ + Main CPU I/0 Map + ================ - P1.0 ; Used at bit level, Aux_0 signal. - P1.1 ; Used at bit level, Aux_1 signal. - P1.2 ; Used at bit level, Aux_2 signal. - P1.3 ; Used at bit level, Aux_3 signal. - P1.4 ; Used at bit level, Aux_4 signal & Sound Latch bit 3 - P1.5 ; Used at bit level, Aux_5 signal & Sound Latch bit 0 - P1.6 ; Expands address bus for video and color RAM access (V.A8) - P1.7 ; Expands address bus for video and color RAM access (V.A9) + P1.0 ; Used at bit level, Aux_0 signal. + P1.1 ; Used at bit level, Aux_1 signal. + P1.2 ; Used at bit level, Aux_2 signal. + P1.3 ; Used at bit level, Aux_3 signal. + P1.4 ; Used at bit level, Aux_4 signal & Sound Latch bit 3 + P1.5 ; Used at bit level, Aux_5 signal & Sound Latch bit 0 + P1.6 ; Expands address bus for video and color RAM access (V.A8) + P1.7 ; Expands address bus for video and color RAM access (V.A9) - P2.0 - P2.3: ; I8039 as address bus expansion (Program memory - High address nibble). + P2.0 - P2.3: ; I8039 as address bus expansion (Program memory - High address nibble). - P2.4: ; Reads 8 bits from data buffer input port (interface for switch encoder). - Bit 0: Lamp_1. - Bit 1: Lamp_2. - Bit 2: Lamp_3. - Bit 3: Lamp_4. - Bit 4: Coin Acceptor. - Bit 5: Hopper 1 & Sound Latch bit 1. - Bit 6: Hopper 2 & Sound Latch bit 2. - Bit 7: Diverter. + P2.4: ; Reads 8 bits from data buffer input port (interface for switch encoder). + Bit 0: Lamp_1. + Bit 1: Lamp_2. + Bit 2: Lamp_3. + Bit 3: Lamp_4. + Bit 4: Coin Acceptor. + Bit 5: Hopper 1 & Sound Latch bit 1. + Bit 6: Hopper 2 & Sound Latch bit 2. + Bit 7: Diverter. - Writes 8 bits to data latch out port (lamps, relays and coils). - Bit 0: SW_encoder_0. - Bit 1: SW_encoder_1. - Bit 2: SW_encoder_2. - Bit 3: SW_encoder_3. - Bit 4: Coin Out. - Bit 5: Undocumented jumper. - Bit 6: N/U (pulled up). - Bit 7: N/U (pulled up). + ; Writes 8 bits to data latch out port (lamps, relays and coils). + Bit 0: SW_encoder_0. + Bit 1: SW_encoder_1. + Bit 2: SW_encoder_2. + Bit 3: SW_encoder_3. + Bit 4: Coin Out. + Bit 5: Undocumented jumper. + Bit 6: N/U (pulled up). + Bit 7: N/U (pulled up). - P2.5: ; Enable access to data RAM. - P2.6: ; Enable access to video RAM (write mode) - no read mode. - P2.7: ; Enable access to color RAM (write Mode) - no read mode. + P2.5: ; Enable access to data RAM. + P2.6: ; Enable access to video RAM (write mode) - no read mode. + P2.7: ; Enable access to color RAM (write Mode) - no read mode. ******************************************************************************** + Game Info + ========= - Game Info - ========= + Pay Tables: - Pay Tables: + These machines had their pay tables out of screen, in a backlighted upper front panel. - These machines had its pay tables out of screen, in the upper front panel (backlighted). + Video Poker (Spanish text only) + ---------------------------------------------------------------------------- + Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas + ---------------------------------------------------------------------------- + Escalera Maxima 250 500 750 1000 4000 + de color - Video Poker (Spanish text only) - ---------------------------------------------------------------------------- - Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas - ---------------------------------------------------------------------------- - Escalera Maxima 250 500 750 1000 4000 - de color + Escalera de Color 100 200 300 400 500 - Escalera de Color 100 200 300 400 500 + Poker 50 100 150 200 250 - Poker 50 100 150 200 250 + Full 11 22 33 44 55 - Full 11 22 33 44 55 + Color 7 14 21 28 35 - Color 7 14 21 28 35 + Escalera 5 10 15 20 25 - Escalera 5 10 15 20 25 + Trio 3 6 9 12 15 - Trio 3 6 9 12 15 + Doble Pareja 2 4 6 8 10 + ---------------------------------------------------------------------------- - Doble Pareja 2 4 6 8 10 - ---------------------------------------------------------------------------- + Black Jack (Spanish text only) + ---------------------------------------------------------------------------- + Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas + ---------------------------------------------------------------------------- + Empate 1 2 3 4 5 - Black Jack (Spanish text only) - ---------------------------------------------------------------------------- - Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas - ---------------------------------------------------------------------------- - Empate 1 2 3 4 5 + La Banca se pasa 2 4 6 8 10 - La Banca se pasa 2 4 6 8 10 + Jugador tiene mas 2 4 6 8 10 + que la banca - Jugador tiene mas 2 4 6 8 10 - que la banca + Jugador tiene menos 2 4 6 8 10 + de 22 con 6 cartas - Jugador tiene menos 2 4 6 8 10 - de 22 con 6 cartas + Jugador tiene blackjack 2 5 7 10 12 + y la Banca no + ---------------------------------------------------------------------------- - Jugador tiene blackjack 2 5 7 10 12 - y la Banca no - ---------------------------------------------------------------------------- + Video Cordoba + ---------------------------------------------------------------------------- + Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas + ---------------------------------------------------------------------------- + TRIPLE BAR 250 250 250 250 2000 + ............................................................................ + 3 x Doble Bar - 100 | Olive-Olive-Any Bar - 18 + 3 x Single Bar - 50 | 3 x Orange - 14 + 3 x Any Bar - 20 | Orange-Orange-Any Bar - 14 + 3 x Bell - 20 | 3 x Cherry - 10 + Bell-Bell-Any Bar - 20 | 2 x Cherry - 5 + 3 x Olive - 10 | 1 x Cherry - 2 + ............................................................................ + All combinations are valid only from left to rigth + ---------------------------------------------------------------------------- - Video Cordoba - ---------------------------------------------------------------------------- - Fichas Jugadas 1 Ficha 2 Fichas 3 Fichas 4 Fichas 5 Fichas - ---------------------------------------------------------------------------- - TRIPLE BAR 250 250 250 250 2000 - ............................................................................ - 3 x Doble Bar - 100 | Olive-Olive-Any Bar - 18 - 3 x Single Bar - 50 | 3 x Orange - 14 - 3 x Any Bar - 20 | Orange-Orange-Any Bar - 14 - 3 x Bell - 20 | 3 x Cherry - 10 - Bell-Bell-Any Bar - 20 | 2 x Cherry - 5 - 3 x Olive - 10 | 1 x Cherry - 2 - ............................................................................ - All combinations are valid only from left to rigth - ---------------------------------------------------------------------------- + Video Dado + --------------------------------------------- + Twelve (12) 33 x 1 + Eleven (11) 16 x 1 + Crap (2,3,12) 8 x 1 + Seven (7) 5 x 1 + Field (2,12) 3 x 1 + 8 or More (8,9,10,11,12) 2 x 1 + 6 or Less (2,3,4,5,6) 2 x 1 - Video Dado - --------------------------------------------- - Twelve (12) 33 x 1 - Eleven (11) 16 x 1 - Crap (2,3,12) 8 x 1 - Seven (7) 5 x 1 - Field (2,12) 3 x 1 - 8 or More (8,9,10,11,12) 2 x 1 - 6 or Less (2,3,4,5,6) 2 x 1 - - Winnings less or equal to 25 can be re-played - --------------------------------------------- + Winnings less or equal to 25 can be re-played + --------------------------------------------- - All payments with less than 400 coins are done through hopper. - (you need to press "Coin Out" button once per coin due to the lack of hopper emulation) + All payments with less than 400 coins are done through hopper. + (you need to press "Coin Out" button once per coin due to the lack of hopper emulation) - Payments over 400 coins are manual. + Payments over 400 coins are manual. ************************************************************************** - - [2008-10-08] - - - Added Baby Poker Game. - - Added Baby Dado Game. - - Mapped "Hand Pay" button for Baby Games. - - Added decoder to Jackpot mechanical counter. - - Added sound support to Baby Poker Game. - - Added tower lamps to Baby Games layouts. - - Reworked layouts for Baby Games. - - Reworked the color routines. - - Added new color routines for Baby Games. - - Redumped the videocba color PROM. - - Added color switch. (It changes background color in some games). - - Added "hopper full" switch support (for diverter function). - - Added diverter function decoder. - - Added Button-lamps layout. - - Added full functional mechanical counters decoding. - - Added 7 Segment decoder and 7 Digit Counter functions. - - Added button-lamps layout & mechanical counters simulation on layout. - Mechanical counters to layout: Coin-In, Coin-Out and Coin to Drop. - - Added NVRAM support to mechanical counters. - - TO DO - ===== - - * Add Tech. Notes for Baby board, a reworked and improved version on Video Poker hardware. - * Fix some missing pulses on mechanical counters. - * Fix the bug on bookeeping mode (videodad & videocba). - * Figure out the undocumented jumper. - * Hopper simulation. - * Switch to resnet system. + [2008-10-08] + + - Added Baby Poker Game. + - Added Baby Dado Game. + - Mapped "Hand Pay" button for Baby Games. + - Added decoder to Jackpot mechanical counter. + - Added sound support to Baby Poker Game. + - Added tower lamps to Baby Games layouts. + - Reworked layouts for Baby Games. + - Reworked the color routines. + - Added new color routines for Baby Games. + - Redumped the videocba color PROM. + - Added color switch. (It changes background color in some games). + - Added "hopper full" switch support (for diverter function). + - Added diverter function decoder. + - Added Button-lamps layout. + - Added full functional mechanical counters decoding. + - Added 7 Segment decoder and 7 Digit Counter functions. + - Added button-lamps layout & mechanical counters simulation on layout. + Mechanical counters to layout: Coin-In, Coin-Out and Coin to Drop. + - Added NVRAM support to mechanical counters. + + + TO DO + ===== + + * Add Tech. Notes for Baby board, a reworked and improved version on Video Poker hardware. + * Fix some missing pulses on mechanical counters. + * Fix the bug on bookeeping mode (videodad & videocba). + * Figure out the undocumented jumper. + * Hopper simulation. + * Switch to resnet system. **************************************************************************/ @@ -384,7 +379,6 @@ public: * Video Hardware * *************************/ - /* BCD to Seven Segment Decoder */ static UINT8 dec_7seg(int data) { diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c index 6692ef47549..ffc9cf92df7 100644 --- a/src/mame/drivers/vigilant.c +++ b/src/mame/drivers/vigilant.c @@ -1057,11 +1057,11 @@ ROM_END GAME( 1988, vigilant, 0, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev E)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1988, vigilantg, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East license)", "Vigilante (US, Rev G)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1988, vigilano, 0, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East license)", "Vigilante (US)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1988, vigilanta, vigilano, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev A)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1988, vigilantb, vigilano, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East license)", "Vigilante (US, Rev B)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1988, vigilantc, vigilano, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev C)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1988, vigilantd, vigilano, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (Japan, Rev D)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilano, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East license)", "Vigilante (US)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilanta, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev A)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantb, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East license)", "Vigilante (US, Rev B)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantc, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev C)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantd, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (Japan, Rev D)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1988, vigilanbl, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "bootleg", "Vigilante (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1988, kikcubic, 0, kikcubic, kikcubic, driver_device, 0, ROT0, "Irem", "Meikyu Jima (Japan)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) /* English title is Kickle Cubicle */ diff --git a/src/mame/drivers/vlc.c b/src/mame/drivers/vlc.c index 16a3be7d3c2..6ad4eb24a36 100644 --- a/src/mame/drivers/vlc.c +++ b/src/mame/drivers/vlc.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Yves /* vlc.c Multi-games from VLC Nevada 1995 CGA monitor 15Khz 60hz diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c index 949118ada6c..ae47407c0d5 100644 --- a/src/mame/drivers/volfied.c +++ b/src/mame/drivers/volfied.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Nicola Salmoria /****************************************************************** Volfied (c) 1989 Taito Corporation diff --git a/src/mame/drivers/voyager.c b/src/mame/drivers/voyager.c index 682b5d2a7f5..ce8d61375f2 100644 --- a/src/mame/drivers/voyager.c +++ b/src/mame/drivers/voyager.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont /************************************************************************************ diff --git a/src/mame/drivers/vp101.c b/src/mame/drivers/vp101.c index a8d442c50c1..c033473d48b 100644 --- a/src/mame/drivers/vp101.c +++ b/src/mame/drivers/vp101.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont /*************************************************************************** diff --git a/src/mame/drivers/vpoker.c b/src/mame/drivers/vpoker.c index 8864ad0d333..3dc2a78efd0 100644 --- a/src/mame/drivers/vpoker.c +++ b/src/mame/drivers/vpoker.c @@ -1,110 +1,84 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese +// copyright-holders:Angelo Salese, Roberto Fresca /************************************************************************************************************** -Videotronics Poker (c) 198? Videotronics + Videotronics Poker (c) 198? Videotronics + Preliminary driver by Angelo Salese & Roberto Fresca. -preliminary driver by Angelo Salese + Notes: + - Looks like the 2nd generation of Noraut Poker / Draw Poker Hi-Lo HW. -Notes: -- Looks like the 2nd generation of Noraut Poker / Draw Poker Hi-Lo HW. - -TODO: -- Understand how the 6840PTM hooks up, needed to let it work properly; -- I/Os; -- sound; + TODO: + - Understand how the 6840PTM hooks up, needed to let it work properly; + - I/Os; + - sound; =============================================================================================================== -Bought as "old poker game by videotronics early 80's" - -Scratched on the CPU board SN1069 -Scratched on the CPU board SN1069 - -CPU board -.0 2716 stickered DRAWPKR2 located top left - 8-F - REV A - -.1 2716 stickered DRAWPKR2 located next to .0 - 0-7 - REV A - -ROM board -Top of board left to right -.R0 2716 stickered RA - 0-7 + Bought as "old poker game by videotronics early 80's" -.R1 2716 stickered RA - 8-F + Scratched on the CPU board SN1069 + Scratched on the CPU board SN1069 -.R2 2716 stickered BA - 0-7 + CPU board -.R3 2716 stickered BA - 8-F + .0 2716 stickered DRAWPKR2 8-F REV A located top left + .1 2716 stickered DRAWPKR2 0-7 REV A located next to .0 -.R4 2716 stickered GA - 0-7 + ROM board -.R5 2716 stickered GA - 8-F + Top of board left to right + .R0 2716 stickered RA 0-7 + .R1 2716 stickered RA 8-F + .R2 2716 stickered BA 0-7 + .R3 2716 stickered BA 8-F + .R4 2716 stickered GA 0-7 + .R5 2716 stickered GA 8-F -Below top row left to right -.R6 2716 stickered RB - 0-7 + Below top row left to right -.R7 2716 stickered RB - 8-F + .R6 2716 stickered RB 0-7 + .R7 2716 stickered RB 8-F + .R8 2716 stickered BB 0-7 + .R9 2716 stickered BB 8-F + .R10 2716 stickered GB 0-7 + .R11 2716 stickered GB 8-F -.R8 2716 stickered BB - 0-7 + ROM data showed cards -.R9 2716 stickered BB - 8-F - -.R10 2716 stickered GB - 0-7 - -.R11 2716 stickered GB - 8-F - -ROM data showed cards - -6809 cpu -4.000Mhz crystal -MC6840P -mm74c920J/mmc6551j-9 x2 + 6809 CPU + 4.000 Mhz crystal + MC6840P + mm74c920J/mmc6551j-9 x2 ************************************************************************************************************** -- Added 5-Aces Poker (Roberto Fresca) - -.1 is closest to the connector -.7 is closest to the cpu + - Added 5-Aces Poker (Roberto Fresca) -Etched in copper on top by .1 eprom 6000 + .1 is closest to the connector + .7 is closest to the cpu -.1 2732 handwritten sticker GJOK1 -.2 2732 handwritten sticker GJOK2 -.3 2732 handwritten sticker BJOK1 -.4 2732 handwritten sticker BJOK2 -.5 2732 handwritten sticker RJOK1 -.6 2732 handwritten sticker RJOK2 -.7 2764 handwritten sticker 688C + Etched in copper on top by .1 eprom 6000 + .1 2732 handwritten sticker GJOK1 + .2 2732 handwritten sticker GJOK2 + .3 2732 handwritten sticker BJOK1 + .4 2732 handwritten sticker BJOK2 + .5 2732 handwritten sticker RJOK1 + .6 2732 handwritten sticker RJOK2 + .7 2764 handwritten sticker 688C -4 Mhz crystal -6809 -MC6840P -nmc6514-9 x2 -nm23114 x2 + 4 MHz crystal + 6809 + MC6840P + nmc6514-9 x2 + nm23114 x2 -16 pin chip marked 74166F 7745 - SA2889-0697 - stamped ETC + 16 pin chip marked 74166F 7745 + SA2889-0697 + stamped ETC **************************************************************************************************************/ @@ -727,5 +701,6 @@ ROM_START( 5acespkr ) ROM_END -GAME( 198?, vpoker, 0, vpoker, vpoker, driver_device, 0, ROT0, "Videotronics", "Videotronics Poker", GAME_NOT_WORKING | GAME_NO_SOUND ) -GAME( 198?, 5acespkr, 0, vpoker, 5acespkr, driver_device, 0, ROT0, "<unknown>", "5-Aces Poker", GAME_NOT_WORKING | GAME_NO_SOUND ) +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ +GAME( 198?, vpoker, 0, vpoker, vpoker, driver_device, 0, ROT0, "Videotronics", "Videotronics Poker", GAME_NOT_WORKING | GAME_NO_SOUND ) +GAME( 198?, 5acespkr, 0, vpoker, 5acespkr, driver_device, 0, ROT0, "<unknown>", "5-Aces Poker", GAME_NOT_WORKING | GAME_NO_SOUND ) diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c index 419a226eacb..c295ed9de3c 100644 --- a/src/mame/drivers/vroulet.c +++ b/src/mame/drivers/vroulet.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Curt Coder,Tomasz Slanina /* diff --git a/src/mame/drivers/wardner.c b/src/mame/drivers/wardner.c index 9a968bce97d..d6c1d4232b7 100644 --- a/src/mame/drivers/wardner.c +++ b/src/mame/drivers/wardner.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Quench /*************************************************************************** diff --git a/src/mame/drivers/warpwarp.c b/src/mame/drivers/warpwarp.c index 93b2af1a700..7669ea5ca56 100644 --- a/src/mame/drivers/warpwarp.c +++ b/src/mame/drivers/warpwarp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** Namco early 8080-based games diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c index c021f5527b4..43c5617115a 100644 --- a/src/mame/drivers/welltris.c +++ b/src/mame/drivers/welltris.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /******************************************************************************* Welltris (c)1991 Video System diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c index 9c82dd1fab1..03d8c97e055 100644 --- a/src/mame/drivers/wgp.c +++ b/src/mame/drivers/wgp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves /*************************************************************************** World Grand Prix (c) Taito Corporation 1989 diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index 75dde6e6fc8..849248f035c 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood,Tomasz Slanina /**************************************************************** diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c index 11bb7e1483e..5a80c7b5ce5 100644 --- a/src/mame/drivers/witch.c +++ b/src/mame/drivers/witch.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /* Witch / Pinball Champ '95 diff --git a/src/mame/drivers/wms.c b/src/mame/drivers/wms.c index ea216173654..d23d7749fe9 100644 --- a/src/mame/drivers/wms.c +++ b/src/mame/drivers/wms.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Roberto Fresca /************************************************************************************************** WMS 360 / 550 (also 3601?) CPU 1.5 Plus board @@ -560,7 +560,7 @@ DRIVER_INIT_MEMBER(wms_state,wms) * Game Drivers * *********************************************/ -// YEAR NAME PARENT MACHINE INPUT STATS INIT ROT COMPANY FULLNAME FLAGS +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS GAME( 200?, wms, 0, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 1)", GAME_IS_SKELETON ) GAME( 200?, wmsa, wms, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 2)", GAME_IS_SKELETON ) diff --git a/src/mame/drivers/wolfpack.c b/src/mame/drivers/wolfpack.c index 83d80a3d61f..131c8444329 100644 --- a/src/mame/drivers/wolfpack.c +++ b/src/mame/drivers/wolfpack.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Wolf Pack (prototype) driver diff --git a/src/mame/drivers/wrally.c b/src/mame/drivers/wrally.c index 5a8c5ab7adb..1867a683915 100644 --- a/src/mame/drivers/wrally.c +++ b/src/mame/drivers/wrally.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, Mike Coates, Nicola Salmoria, Miguel Andel Horna /*************************************************************************** diff --git a/src/mame/drivers/wwfsstar.c b/src/mame/drivers/wwfsstar.c index dba16d1ec31..670c9af870a 100644 --- a/src/mame/drivers/wwfsstar.c +++ b/src/mame/drivers/wwfsstar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /******************************************************************************* WWF Superstars (C) 1989 Technos Japan (drivers/wwfsstar.c) diff --git a/src/mame/drivers/wyvernf0.c b/src/mame/drivers/wyvernf0.c index 66ab798a7fe..598195012c3 100644 --- a/src/mame/drivers/wyvernf0.c +++ b/src/mame/drivers/wyvernf0.c @@ -6,14 +6,14 @@ Wyvern F-0 (1985, Taito) driver by Luca Elia -Typical Taito mid-80s hardware but with dual video outputs. +Typical Taito mid-80s hardware but with dual video output. Sound board: Z80, 2 x YM2149, OKI M5232 CPU board: Z80, ROM and RAM, 68705P5 MCU (protected) OBJ board: ROMs and RAM Video board: ROMs and RAM, 4 x Fujitsu MB112S146 (also used on arkanoid, lkage) -The rest is just common logic, there's no custom chips. +The rest is just common logic, there are no custom chips. The cabinet uses a half-silvered mirror to mix the images from two screens for a pseudo-3D effect: @@ -24,6 +24,8 @@ player ship and enemies in the air are displayed in the upper screen. And the cabinet also has two speakers. The sound of enemies on the ground is heard from the bottom speaker and the sound of enemies in the air is heard from the top speaker. +Actual game video: http://www.nicozon.net/watch/sm10823430 + ***************************************************************************/ #include "emu.h" @@ -127,20 +129,18 @@ WRITE8_MEMBER(wyvernf0_state::fgram_w) TILE_GET_INFO_MEMBER(wyvernf0_state::get_bg_tile_info) { int offs = tile_index * 2; - int code = m_bgram[offs] + ((m_bgram[offs+1] & 0xff) << 8); - int color = 0 + ((code & 0x7000) >> 12); + int code = m_bgram[offs] + (m_bgram[offs+1] << 8); + int color = 0 + ((code & 0x3000) >> 12); SET_TILE_INFO_MEMBER(1, code, color, TILE_FLIPXY(code >> 14)); } TILE_GET_INFO_MEMBER(wyvernf0_state::get_fg_tile_info) { int offs = tile_index * 2; - int code = m_fgram[offs] + ((m_fgram[offs+1] & 0xff) << 8); - int color = 8 + ((code & 0x7000) >> 12); + int code = m_fgram[offs] + (m_fgram[offs+1] << 8); + int color = 8 + ((code & 0x3000) >> 12); SET_TILE_INFO_MEMBER(1, code, color, TILE_FLIPXY(code >> 14)); - // flip bits overlap color bits, but this way the rotated taito copyright matches the screenshot here: - // http://twitter.yfrog.com/odzpridj } VIDEO_START_MEMBER(wyvernf0_state,wyvernf0) @@ -182,7 +182,7 @@ YY XX 71 11 04 a8 <- target 71 01 0f 50 <- player -yyyyyyyy fccccccc xf??pppp xxxxxxxx +yyyyyyyy fccccccc x???pppp xxxxxxxx */ UINT8 *sprram = &m_spriteram[ is_foreground ? m_spriteram.bytes()/2 : 0 ]; @@ -195,7 +195,8 @@ yyyyyyyy fccccccc xf??pppp xxxxxxxx sx = sprram[offs + 3] - ((sprram[offs + 2] & 0x80) << 1); sy = 256 - 8 - sprram[offs + 0] - 23; // center player sprite: 256 - 8 - 0x71 + dy = 256/2-32/2 -> dy = -23 - int flipx = sprram[offs + 2] & 0x40; // maybe +// int flipx = sprram[offs + 2] & 0x40; // nope + int flipx = 0; int flipy = sprram[offs + 1] & 0x80; if (flip_screen_x()) diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c index 6988ae5796e..0c35ac7954c 100644 --- a/src/mame/drivers/xain.c +++ b/src/mame/drivers/xain.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index 8a96322a5ba..c4456151741 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /*************************************************************************** Xexex (c) 1991 Konami - GX067 diff --git a/src/mame/drivers/xtom3d.c b/src/mame/drivers/xtom3d.c index 1da4a94531c..df6b92ec568 100644 --- a/src/mame/drivers/xtom3d.c +++ b/src/mame/drivers/xtom3d.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Guru /*************************************************************************** X Tom 3D diff --git a/src/mame/drivers/xyonix.c b/src/mame/drivers/xyonix.c index fd1ac6cc27d..d491ef98cb1 100644 --- a/src/mame/drivers/xyonix.c +++ b/src/mame/drivers/xyonix.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Stephh /* Xyonix ********************************************************************* diff --git a/src/mame/drivers/zac2650.c b/src/mame/drivers/zac2650.c index 718607a5053..ee0b616a5e1 100644 --- a/src/mame/drivers/zac2650.c +++ b/src/mame/drivers/zac2650.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /* * Signetics 2650 CPU Games diff --git a/src/mame/drivers/zaxxon.c b/src/mame/drivers/zaxxon.c index a34419396df..0b09caa8cab 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Sega Zaxxon hardware diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index 58d48e9087a..1a47dd93e7f 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -6,7 +6,7 @@ ================================== Driver by smf & R Belmont Board notes by The Guru - Thanks to Zinc Team, Amuse & Miguel Angel Horna + Thanks to Zinc Team, Peter Ferrie, Amuse & Miguel Angel Horna ***************************************************************************/ diff --git a/src/mame/etc/fd1094dp.c b/src/mame/etc/fd1094dp.c index 204f9aab227..1b8dbb0a3e8 100644 --- a/src/mame/etc/fd1094dp.c +++ b/src/mame/etc/fd1094dp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Charles MacDonald, Nicola Salmoria /***************************************************************************** FD1094 key dumper diff --git a/src/mame/etc/jrcrypt.c b/src/mame/etc/jrcrypt.c index 28ba754df47..399c16d7722 100644 --- a/src/mame/etc/jrcrypt.c +++ b/src/mame/etc/jrcrypt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Caldwell /*************************************************************************** jrcrypt.c diff --git a/src/mame/etc/template_cpu.c b/src/mame/etc/template_cpu.c index 4c3e3cac81e..eaf99a72996 100644 --- a/src/mame/etc/template_cpu.c +++ b/src/mame/etc/template_cpu.c @@ -1,5 +1,5 @@ -// license: BSD-3-Clause -// copyright-holders: Angelo Salese +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /***************************************************************************** * * template for CPU cores diff --git a/src/mame/etc/template_cpu.h b/src/mame/etc/template_cpu.h index 82900d37406..d174e572f4c 100644 --- a/src/mame/etc/template_cpu.h +++ b/src/mame/etc/template_cpu.h @@ -1,5 +1,5 @@ -// license: BSD-3-Clause -// copyright-holders: Angelo Salese +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /***************************************************************************** * * template for CPU cores diff --git a/src/mame/etc/template_device.c b/src/mame/etc/template_device.c index 60d70bff597..8bc48c8e5de 100644 --- a/src/mame/etc/template_device.c +++ b/src/mame/etc/template_device.c @@ -1,5 +1,5 @@ -// license: BSD-3-Clause -// copyright-holders: Angelo Salese +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /*************************************************************************** Template for skeleton device diff --git a/src/mame/etc/template_device.h b/src/mame/etc/template_device.h index f081344fc6c..409c9cb3ad3 100644 --- a/src/mame/etc/template_device.h +++ b/src/mame/etc/template_device.h @@ -1,5 +1,5 @@ -// license: BSD-3-Clause -// copyright-holders: Angelo Salese +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /*************************************************************************** Template for skeleton device diff --git a/src/mame/etc/template_driver.c b/src/mame/etc/template_driver.c index a144601b3e8..80ea67157cd 100644 --- a/src/mame/etc/template_driver.c +++ b/src/mame/etc/template_driver.c @@ -1,5 +1,5 @@ -// license: BSD-3-Clause -// copyright-holders: Angelo Salese +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /*************************************************************************** Template for skeleton drivers diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index 6dd7ad424ed..f2ebec8ac88 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* 88 Games diff --git a/src/mame/includes/aeroboto.h b/src/mame/includes/aeroboto.h index 3b6ba8b0da8..4a13d61773e 100644 --- a/src/mame/includes/aeroboto.h +++ b/src/mame/includes/aeroboto.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /*************************************************************************** diff --git a/src/mame/includes/angelkds.h b/src/mame/includes/angelkds.h index 970cd4ee431..d40f622a265 100644 --- a/src/mame/includes/angelkds.h +++ b/src/mame/includes/angelkds.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /************************************************************************* diff --git a/src/mame/includes/aquarium.h b/src/mame/includes/aquarium.h index 45e906bd6c6..19218015471 100644 --- a/src/mame/includes/aquarium.h +++ b/src/mame/includes/aquarium.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "sound/okim6295.h" #include "video/excellent_spr.h" diff --git a/src/mame/includes/archimds.h b/src/mame/includes/archimds.h index 8c12b413d97..bd5ebc608f7 100644 --- a/src/mame/includes/archimds.h +++ b/src/mame/includes/archimds.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Angelo Salese, R. Belmont, Juergen Bunchmueller /****************************************************************************** * * Acorn Archimedes custom chips (IOC, MEMC, VIDC) diff --git a/src/mame/includes/arkanoid.h b/src/mame/includes/arkanoid.h index a66c01ddb72..79cf2ea6739 100644 --- a/src/mame/includes/arkanoid.h +++ b/src/mame/includes/arkanoid.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /* This it the best way to allow game specific kludges until the system is fully understood */ enum { ARKUNK = 0, /* unknown bootlegs for inclusion of possible new sets */ diff --git a/src/mame/includes/armedf.h b/src/mame/includes/armedf.h index 5533202a3dc..b534441aa39 100644 --- a/src/mame/includes/armedf.h +++ b/src/mame/includes/armedf.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Phil Stroffolino, Carlos A. Lozano #include "includes/nb1414m4.h" #include "video/bufsprite.h" diff --git a/src/mame/includes/ashnojoe.h b/src/mame/includes/ashnojoe.h index 8b4c7e5a0b9..6cf2dc1748a 100644 --- a/src/mame/includes/ashnojoe.h +++ b/src/mame/includes/ashnojoe.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /************************************************************************* diff --git a/src/mame/includes/asterix.h b/src/mame/includes/asterix.h index fcee83852e8..6bc29450828 100644 --- a/src/mame/includes/asterix.h +++ b/src/mame/includes/asterix.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /************************************************************************* Asterix diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h index 0a6f59bbaef..3ad4b96e4a7 100644 --- a/src/mame/includes/asteroid.h +++ b/src/mame/includes/asteroid.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas /************************************************************************* Atari Asteroids hardware diff --git a/src/mame/includes/aztarac.h b/src/mame/includes/aztarac.h index 4a79397a219..3f8842ce199 100644 --- a/src/mame/includes/aztarac.h +++ b/src/mame/includes/aztarac.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mathis Rosenhauer /************************************************************************* Centuri Aztarac hardware diff --git a/src/mame/includes/battlex.h b/src/mame/includes/battlex.h index 2dc456e38ab..6aac0ac568c 100644 --- a/src/mame/includes/battlex.h +++ b/src/mame/includes/battlex.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/includes/beezer.h b/src/mame/includes/beezer.h index e51fa9228cf..44dfa22f341 100644 --- a/src/mame/includes/beezer.h +++ b/src/mame/includes/beezer.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer #include "machine/6522via.h" #include "cpu/m6809/m6809.h" diff --git a/src/mame/includes/bfm_ad5.h b/src/mame/includes/bfm_ad5.h index e664e3716ab..39f01c25739 100644 --- a/src/mame/includes/bfm_ad5.h +++ b/src/mame/includes/bfm_ad5.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "cpu/m68000/m68000.h" #include "includes/bfm_sc45.h" diff --git a/src/mame/includes/bfm_sc45.h b/src/mame/includes/bfm_sc45.h index 12ab55557e4..690be3ce8e3 100644 --- a/src/mame/includes/bfm_sc45.h +++ b/src/mame/includes/bfm_sc45.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Scorpion 4 + 5 driver related includes */ /* mainly used for stuff which is currently shared between sc4 / 5 sets to avoid duplication */ diff --git a/src/mame/includes/bfm_sc5.h b/src/mame/includes/bfm_sc5.h index f2a12e7ed0f..004a727ce04 100644 --- a/src/mame/includes/bfm_sc5.h +++ b/src/mame/includes/bfm_sc5.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "cpu/m68000/m68000.h" #include "includes/bfm_sc45.h" diff --git a/src/mame/includes/bigstrkb.h b/src/mame/includes/bigstrkb.h index 736ed4b1dea..46628e2bf2b 100644 --- a/src/mame/includes/bigstrkb.h +++ b/src/mame/includes/bigstrkb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class bigstrkb_state : public driver_device { diff --git a/src/mame/includes/bionicc.h b/src/mame/includes/bionicc.h index b814acb2051..1fd57dd5e7c 100644 --- a/src/mame/includes/bionicc.h +++ b/src/mame/includes/bionicc.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /*************************************************************************** Bionic Commando diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h index 6f2a04284c7..539ceb9a579 100644 --- a/src/mame/includes/bking.h +++ b/src/mame/includes/bking.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari #include "machine/buggychl.h" class bking_state : public driver_device diff --git a/src/mame/includes/blockade.h b/src/mame/includes/blockade.h index e2ee5dc7b18..4a91244425a 100644 --- a/src/mame/includes/blockade.h +++ b/src/mame/includes/blockade.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo #include "sound/discrete.h" #include "sound/samples.h" diff --git a/src/mame/includes/bloodbro.h b/src/mame/includes/bloodbro.h index 38b3818b0d4..3adf387eba5 100644 --- a/src/mame/includes/bloodbro.h +++ b/src/mame/includes/bloodbro.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano Baides class bloodbro_state : public driver_device { diff --git a/src/mame/includes/bwidow.h b/src/mame/includes/bwidow.h index 4a2c4212e64..de748c4a66d 100644 --- a/src/mame/includes/bwidow.h +++ b/src/mame/includes/bwidow.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas #ifndef BWIDOW_H_ #define BWIDOW_H_ diff --git a/src/mame/includes/bzone.h b/src/mame/includes/bzone.h index 83b5c4d27d4..fdf97f9d269 100644 --- a/src/mame/includes/bzone.h +++ b/src/mame/includes/bzone.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Nicola Salmoria /************************************************************************* Atari Battle Zone hardware diff --git a/src/mame/includes/cabal.h b/src/mame/includes/cabal.h index 0359820f9a1..6126f861fcb 100644 --- a/src/mame/includes/cabal.h +++ b/src/mame/includes/cabal.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano Baides #include "audio/seibu.h" #include "sound/msm5205.h" diff --git a/src/mame/includes/carjmbre.h b/src/mame/includes/carjmbre.h index 4f0a927cece..0ba946b2418 100644 --- a/src/mame/includes/carjmbre.h +++ b/src/mame/includes/carjmbre.h @@ -1,8 +1,8 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:insideoutboy, Nicola Salmoria /*************************************************************************** - carjmbre + Car Jamboree ***************************************************************************/ diff --git a/src/mame/includes/cbasebal.h b/src/mame/includes/cbasebal.h index 1cc3380eabe..5c9428de199 100644 --- a/src/mame/includes/cbasebal.h +++ b/src/mame/includes/cbasebal.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Capcom Baseball diff --git a/src/mame/includes/cchasm.h b/src/mame/includes/cchasm.h index 81d4984ea64..5a43fcbbf75 100644 --- a/src/mame/includes/cchasm.h +++ b/src/mame/includes/cchasm.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /************************************************************************* @@ -20,16 +20,15 @@ public: cchasm_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_ram(*this, "ram"), m_maincpu(*this, "maincpu"), m_ctc(*this, "ctc"), m_audiocpu(*this, "audiocpu"), m_dac1(*this, "dac1"), m_dac2(*this, "dac2"), m_vector(*this, "vector"), - m_screen(*this, "screen") { } + m_screen(*this, "screen"), + m_ram(*this, "ram") { } - required_shared_ptr<UINT16> m_ram; required_device<cpu_device> m_maincpu; required_device<z80ctc_device> m_ctc; required_device<cpu_device> m_audiocpu; @@ -37,6 +36,8 @@ public: required_device<dac_device> m_dac2; required_device<vector_device> m_vector; required_device<screen_device> m_screen; + + required_shared_ptr<UINT16> m_ram; int m_sound_flags; int m_coin_flag; @@ -44,21 +45,25 @@ public: int m_output[2]; int m_xcenter; int m_ycenter; - DECLARE_WRITE16_MEMBER(cchasm_led_w); - DECLARE_WRITE16_MEMBER(cchasm_refresh_control_w); - DECLARE_WRITE8_MEMBER(cchasm_reset_coin_flag_w); - DECLARE_READ8_MEMBER(cchasm_coin_sound_r); - DECLARE_READ8_MEMBER(cchasm_soundlatch2_r); - DECLARE_WRITE8_MEMBER(cchasm_soundlatch4_w); - DECLARE_WRITE16_MEMBER(cchasm_io_w); - DECLARE_READ16_MEMBER(cchasm_io_r); - INPUT_CHANGED_MEMBER(cchasm_set_coin_flag); - DECLARE_WRITE_LINE_MEMBER(cchasm_6840_irq); - virtual void video_start(); - virtual void sound_start(); + emu_timer *m_refresh_end_timer; + + DECLARE_WRITE16_MEMBER(led_w); + DECLARE_WRITE16_MEMBER(refresh_control_w); + DECLARE_WRITE8_MEMBER(reset_coin_flag_w); + DECLARE_READ8_MEMBER(coin_sound_r); + DECLARE_READ8_MEMBER(soundlatch2_r); + DECLARE_WRITE8_MEMBER(soundlatch4_w); + DECLARE_WRITE16_MEMBER(io_w); + DECLARE_READ16_MEMBER(io_r); DECLARE_WRITE_LINE_MEMBER(ctc_timer_1_w); DECLARE_WRITE_LINE_MEMBER(ctc_timer_2_w); - void cchasm_refresh (); + + INPUT_CHANGED_MEMBER(set_coin_flag); + + virtual void video_start(); + virtual void sound_start(); + + void refresh(); protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h index a3389f24be0..9939d71fe13 100644 --- a/src/mame/includes/cclimber.h +++ b/src/mame/includes/cclimber.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria class cclimber_state : public driver_device { public: diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h index 2abaaa59ba2..74eb06ad0c6 100644 --- a/src/mame/includes/centiped.h +++ b/src/mame/includes/centiped.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Atari Centipede hardware diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index 7cfb0241efd..b96c6032a73 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Moore /************************************************************************* Cheeky Mouse diff --git a/src/mame/includes/chihiro.h b/src/mame/includes/chihiro.h index 685bb48d6d2..d9db8632f87 100644 --- a/src/mame/includes/chihiro.h +++ b/src/mame/includes/chihiro.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Samuele Zannoli /* * geforce 3d (NV2A) vertex program disassembler */ diff --git a/src/mame/includes/chqflag.h b/src/mame/includes/chqflag.h index f2772ba0eb0..22127cce04b 100644 --- a/src/mame/includes/chqflag.h +++ b/src/mame/includes/chqflag.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Manuel Abadia /************************************************************************* Chequered Flag diff --git a/src/mame/includes/circus.h b/src/mame/includes/circus.h index 0101357cee1..9fc97ae9e03 100644 --- a/src/mame/includes/circus.h +++ b/src/mame/includes/circus.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates #include "sound/discrete.h" diff --git a/src/mame/includes/circusc.h b/src/mame/includes/circusc.h index f29f0393ea5..1b4ebec80ed 100644 --- a/src/mame/includes/circusc.h +++ b/src/mame/includes/circusc.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria,Chris Hardy /************************************************************************* Circus Charlie diff --git a/src/mame/includes/citycon.h b/src/mame/includes/citycon.h index be09bd81efe..4204710e97a 100644 --- a/src/mame/includes/citycon.h +++ b/src/mame/includes/citycon.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mirko Buffoni /************************************************************************* City Connection diff --git a/src/mame/includes/cloak.h b/src/mame/includes/cloak.h index 75c0d383c0d..0cca75c9ce3 100644 --- a/src/mame/includes/cloak.h +++ b/src/mame/includes/cloak.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris, Mirko Buffoni /************************************************************************* Atari Cloak & Dagger hardware diff --git a/src/mame/includes/contra.h b/src/mame/includes/contra.h index faf5e22358f..75fa69e8675 100644 --- a/src/mame/includes/contra.h +++ b/src/mame/includes/contra.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano, Phil Stroffolino /************************************************************************* diff --git a/src/mame/includes/cop01.h b/src/mame/includes/cop01.h index 05b362e8435..e2b3a1ccb40 100644 --- a/src/mame/includes/cop01.h +++ b/src/mame/includes/cop01.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /************************************************************************* diff --git a/src/mame/includes/cosmic.h b/src/mame/includes/cosmic.h index f1f8eb74ac9..02e3dce20f1 100644 --- a/src/mame/includes/cosmic.h +++ b/src/mame/includes/cosmic.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Lee Taylor /************************************************************************* Cosmic Guerilla & other Universal boards (in cosmic.c) diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 73c6f93856b..8a1a41c773c 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates, Couriersud /*************************************************************************** diff --git a/src/mame/includes/darkmist.h b/src/mame/includes/darkmist.h index 6eb0c07a51f..f7f0e0704bf 100644 --- a/src/mame/includes/darkmist.h +++ b/src/mame/includes/darkmist.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Nicola Salmoria, Tomasz Slanina #include "audio/t5182.h" diff --git a/src/mame/includes/dbz.h b/src/mame/includes/dbz.h index 25a7dd05099..7063cf4ac07 100644 --- a/src/mame/includes/dbz.h +++ b/src/mame/includes/dbz.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, R. Belmont, Pierpaolo Prazzoli /************************************************************************* diff --git a/src/mame/includes/dc.h b/src/mame/includes/dc.h index ecd058622c8..a2ab218f2a7 100644 --- a/src/mame/includes/dc.h +++ b/src/mame/includes/dc.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Angelo Salese, Olivier Galibert, David Haywood, Samuele Zannoli, R. Belmont, ElSemi /* dc.h - Sega Dreamcast includes diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 92e12908d1d..1c5d203856d 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont +// license:BSD-3-Clause +// copyright-holders:Philip Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont /************************************************************************* Double Dragon & Double Dragon II (but also China Gate) diff --git a/src/mame/includes/deadang.h b/src/mame/includes/deadang.h index 4ffa507392c..e1339637ed2 100644 --- a/src/mame/includes/deadang.h +++ b/src/mame/includes/deadang.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood #include "audio/seibu.h" class deadang_state : public driver_device diff --git a/src/mame/includes/decocrpt.h b/src/mame/includes/decocrpt.h index 42abdf4631a..3bfcd1c6e8a 100644 --- a/src/mame/includes/decocrpt.h +++ b/src/mame/includes/decocrpt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*----------- defined in machine/decocrpt.c -----------*/ void deco56_decrypt_gfx(running_machine &machine, const char *tag); diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index 6999453873a..bff657388ed 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /************************************************************************* DJ Boy diff --git a/src/mame/includes/djmain.h b/src/mame/includes/djmain.h index de04caf5d9f..975b2f34dae 100644 --- a/src/mame/includes/djmain.h +++ b/src/mame/includes/djmain.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf #include "machine/ataintf.h" #include "video/konami_helper.h" #include "video/k054156_k054157_k056832.h" diff --git a/src/mame/includes/docastle.h b/src/mame/includes/docastle.h index fd63b4678b5..165e6667ed7 100644 --- a/src/mame/includes/docastle.h +++ b/src/mame/includes/docastle.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** Mr. Do's Castle hardware diff --git a/src/mame/includes/dragrace.h b/src/mame/includes/dragrace.h index dbb260d83b5..c6048948a39 100644 --- a/src/mame/includes/dragrace.h +++ b/src/mame/includes/dragrace.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* Atari Drag Race hardware diff --git a/src/mame/includes/drgnmst.h b/src/mame/includes/drgnmst.h index 2e545a0c260..65e67b5ed1b 100644 --- a/src/mame/includes/drgnmst.h +++ b/src/mame/includes/drgnmst.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "sound/okim6295.h" diff --git a/src/mame/includes/dynduke.h b/src/mame/includes/dynduke.h index d9c2fba1fda..4a8e84bcdff 100644 --- a/src/mame/includes/dynduke.h +++ b/src/mame/includes/dynduke.h @@ -8,27 +8,27 @@ class dynduke_state : public driver_device public: dynduke_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram") , - m_scroll_ram(*this, "scroll_ram"), - m_videoram(*this, "videoram"), - m_back_data(*this, "back_data"), - m_fore_data(*this, "fore_data"), m_maincpu(*this, "maincpu"), m_seibu_sound(*this, "seibu_sound"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), + m_spriteram(*this, "spriteram") , + m_scroll_ram(*this, "scroll_ram"), + m_videoram(*this, "videoram"), + m_back_data(*this, "back_data"), + m_fore_data(*this, "fore_data"), m_generic_paletteram_16(*this, "paletteram") { } + required_device<cpu_device> m_maincpu; + required_device<seibu_sound_device> m_seibu_sound; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; required_device<buffered_spriteram16_device> m_spriteram; + required_shared_ptr<UINT16> m_scroll_ram; required_shared_ptr<UINT16> m_videoram; required_shared_ptr<UINT16> m_back_data; required_shared_ptr<UINT16> m_fore_data; - - required_device<cpu_device> m_maincpu; - required_device<seibu_sound_device> m_seibu_sound; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; required_shared_ptr<UINT16> m_generic_paletteram_16; tilemap_t *m_bg_layer; @@ -43,19 +43,23 @@ public: int m_old_back; int m_old_fore; - DECLARE_WRITE16_MEMBER(dynduke_paletteram_w); - DECLARE_WRITE16_MEMBER(dynduke_background_w); - DECLARE_WRITE16_MEMBER(dynduke_foreground_w); - DECLARE_WRITE16_MEMBER(dynduke_text_w); - DECLARE_WRITE16_MEMBER(dynduke_gfxbank_w); - DECLARE_WRITE16_MEMBER(dynduke_control_w); - DECLARE_DRIVER_INIT(dynduke); + DECLARE_WRITE16_MEMBER(paletteram_w); + DECLARE_WRITE16_MEMBER(background_w); + DECLARE_WRITE16_MEMBER(foreground_w); + DECLARE_WRITE16_MEMBER(text_w); + DECLARE_WRITE16_MEMBER(gfxbank_w); + DECLARE_WRITE16_MEMBER(control_w); + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); + virtual void video_start(); - UINT32 screen_update_dynduke(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(dynduke_interrupt); + DECLARE_DRIVER_INIT(dynduke); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri); void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); + + INTERRUPT_GEN_MEMBER(interrupt); }; diff --git a/src/mame/includes/espial.h b/src/mame/includes/espial.h index b0e43a2a4fb..1b9479309bf 100644 --- a/src/mame/includes/espial.h +++ b/src/mame/includes/espial.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** Espial hardware games (drivers: espial.c) diff --git a/src/mame/includes/esripsys.h b/src/mame/includes/esripsys.h index 3c79da93e5f..e51232e7ced 100644 --- a/src/mame/includes/esripsys.h +++ b/src/mame/includes/esripsys.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /************************************************************************* Entertainment Sciences RIP System hardware diff --git a/src/mame/includes/exedexes.h b/src/mame/includes/exedexes.h index 392a9389113..8bd9693bc4f 100644 --- a/src/mame/includes/exedexes.h +++ b/src/mame/includes/exedexes.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Richard Davies /************************************************************************* Exed Exes diff --git a/src/mame/includes/exterm.h b/src/mame/includes/exterm.h index ab6bdc0fbbb..8e91d2e3057 100644 --- a/src/mame/includes/exterm.h +++ b/src/mame/includes/exterm.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari, Alex Pasadyn +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /************************************************************************* Gottlieb Exterminator hardware diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h index 3b91b8a95a5..195b9f31119 100644 --- a/src/mame/includes/fgoal.h +++ b/src/mame/includes/fgoal.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch #include "machine/mb14241.h" class fgoal_state : public driver_device diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index 09e19240d4b..cb5795f5fd7 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /************************************************************************* Atari Fire Truck + Super Bug + Monte Carlo driver diff --git a/src/mame/includes/fitfight.h b/src/mame/includes/fitfight.h index 05c90f8f890..3eab210bf59 100644 --- a/src/mame/includes/fitfight.h +++ b/src/mame/includes/fitfight.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood class fitfight_state : public driver_device { diff --git a/src/mame/includes/flower.h b/src/mame/includes/flower.h index b144283ab73..1ae2c8b69ef 100644 --- a/src/mame/includes/flower.h +++ b/src/mame/includes/flower.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy class flower_state : public driver_device { public: diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index 05780c8ab41..932efe566cf 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "sound/msm5232.h" class flstory_state : public driver_device diff --git a/src/mame/includes/funybubl.h b/src/mame/includes/funybubl.h index 7162ad40734..9ae88627a6d 100644 --- a/src/mame/includes/funybubl.h +++ b/src/mame/includes/funybubl.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "sound/okim6295.h" class funybubl_state : public driver_device diff --git a/src/mame/includes/fuukifg3.h b/src/mame/includes/fuukifg3.h index c6341098f7b..5f0f14617b3 100644 --- a/src/mame/includes/fuukifg3.h +++ b/src/mame/includes/fuukifg3.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Paul Priest, David Haywood +// license:BSD-3-Clause +// copyright-holders:Paul Priest, David Haywood, Luca Elia #include "video/fuukifg.h" /* Define clocks based on actual OSC on the PCB */ diff --git a/src/mame/includes/gaelcrpt.h b/src/mame/includes/gaelcrpt.h index 092d896fc19..736b1355012 100644 --- a/src/mame/includes/gaelcrpt.h +++ b/src/mame/includes/gaelcrpt.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Manuel Abadia /*----------- defined in machine/gaelcrpt.c -----------*/ UINT16 gaelco_decrypt(address_space &space, int offset, int data, int param1, int param2); diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index c7761ad856f..bb42a5dfaf1 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Ninja Gaiden diff --git a/src/mame/includes/galaxia.h b/src/mame/includes/galaxia.h index 275db515c84..faad6ffc99a 100644 --- a/src/mame/includes/galaxia.h +++ b/src/mame/includes/galaxia.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** Zaccaria Galaxia HW diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index c58f6504525..3c77d0b6be2 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Galaxian hardware family (old) diff --git a/src/mame/includes/galpnipt.h b/src/mame/includes/galpnipt.h index 9a34f511433..39e8d8ccbd6 100644 --- a/src/mame/includes/galpnipt.h +++ b/src/mame/includes/galpnipt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /******************************************************************************* Input port macros used by games in the galpanic.c driver diff --git a/src/mame/includes/gcpinbal.h b/src/mame/includes/gcpinbal.h index 2da75a6f1ee..261f63545fe 100644 --- a/src/mame/includes/gcpinbal.h +++ b/src/mame/includes/gcpinbal.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves, R. Belmont #include "sound/okim6295.h" #include "sound/msm5205.h" diff --git a/src/mame/includes/gijoe.h b/src/mame/includes/gijoe.h index 66cd9934732..92ab66a86e2 100644 --- a/src/mame/includes/gijoe.h +++ b/src/mame/includes/gijoe.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /************************************************************************* GI Joe diff --git a/src/mame/includes/gladiatr.h b/src/mame/includes/gladiatr.h index 93beba148e4..06813718742 100644 --- a/src/mame/includes/gladiatr.h +++ b/src/mame/includes/gladiatr.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Victor Trucco,Steve Ellenoff,Phil Stroffolino,Tatsuyuki Satoh,Tomasz Slanina,Nicola Salmoria #include "sound/msm5205.h" diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h index 8235f9a4fa0..be89c7791a4 100644 --- a/src/mame/includes/goldstar.h +++ b/src/mame/includes/goldstar.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca #include "emu.h" diff --git a/src/mame/includes/gomoku.h b/src/mame/includes/gomoku.h index a5c42d4e488..a7210b2e7d9 100644 --- a/src/mame/includes/gomoku.h +++ b/src/mame/includes/gomoku.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class gomoku_state : public driver_device diff --git a/src/mame/includes/gstriker.h b/src/mame/includes/gstriker.h index 35272db9cc2..61b96e6fea8 100644 --- a/src/mame/includes/gstriker.h +++ b/src/mame/includes/gstriker.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch, David Haywood #ifndef __GSTRIKER_H #define __GSTRIKER_H diff --git a/src/mame/includes/gumbo.h b/src/mame/includes/gumbo.h index 9e63acd4ef2..e69653ed63c 100644 --- a/src/mame/includes/gumbo.h +++ b/src/mame/includes/gumbo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /************************************************************************* diff --git a/src/mame/includes/gyruss.h b/src/mame/includes/gyruss.h index 914bd228418..137446fd6be 100644 --- a/src/mame/includes/gyruss.h +++ b/src/mame/includes/gyruss.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Gyruss diff --git a/src/mame/includes/holeland.h b/src/mame/includes/holeland.h index ea3822f16b7..02b6da3a281 100644 --- a/src/mame/includes/holeland.h +++ b/src/mame/includes/holeland.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /************************************************************************* diff --git a/src/mame/includes/hyperspt.h b/src/mame/includes/hyperspt.h index 89922d78f0f..7e6464f6bab 100644 --- a/src/mame/includes/hyperspt.h +++ b/src/mame/includes/hyperspt.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy #include "sound/sn76496.h" #include "sound/vlm5030.h" diff --git a/src/mame/includes/hyprduel.h b/src/mame/includes/hyprduel.h index bd3f7353c49..23b676d8529 100644 --- a/src/mame/includes/hyprduel.h +++ b/src/mame/includes/hyprduel.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, Hau #define RASTER_LINES 262 #define FIRST_VISIBLE_LINE 0 #define LAST_VISIBLE_LINE 223 diff --git a/src/mame/includes/iremipt.h b/src/mame/includes/iremipt.h index d2bb97cbca2..8cb13d1a05c 100644 --- a/src/mame/includes/iremipt.h +++ b/src/mame/includes/iremipt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Nicola Salmoria /******************************************************************************* Input port macros used by many games in mutiple IREM drivers diff --git a/src/mame/includes/irobot.h b/src/mame/includes/irobot.h index c24ccaa05ea..2e6cdb4953b 100644 --- a/src/mame/includes/irobot.h +++ b/src/mame/includes/irobot.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris /************************************************************************* Atari I, Robot hardware diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h index d2b7bacea34..c681af26435 100644 --- a/src/mame/includes/jpmimpct.h +++ b/src/mame/includes/jpmimpct.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** JPM IMPACT with Video hardware diff --git a/src/mame/includes/jpmsys5.h b/src/mame/includes/jpmsys5.h index caafa03bad3..0ebd9a16482 100644 --- a/src/mame/includes/jpmsys5.h +++ b/src/mame/includes/jpmsys5.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Phil Bennett, J.Wallace, David Haywood +// copyright-holders:Philip Bennett, J.Wallace, David Haywood #include "cpu/m68000/m68000.h" #include "machine/6821pia.h" diff --git a/src/mame/includes/kickgoal.h b/src/mame/includes/kickgoal.h index 5ac809cddaf..24ad168b4b2 100644 --- a/src/mame/includes/kickgoal.h +++ b/src/mame/includes/kickgoal.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /************************************************************************* diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h index d4627f34041..705d809b497 100644 --- a/src/mame/includes/konamigx.h +++ b/src/mame/includes/konamigx.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Acho A. Tang, Phil Stroffolino, Olivier Galibert #include "sound/k056800.h" #include "sound/k054539.h" diff --git a/src/mame/includes/konamipt.h b/src/mame/includes/konamipt.h index e1c1eed6c4f..196f9507924 100644 --- a/src/mame/includes/konamipt.h +++ b/src/mame/includes/konamipt.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Manuel Abadia /******************************************************************************* Input port macros used by many games in multiple KONAMI drivers diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h index e067e4df69c..f425503dc9d 100644 --- a/src/mame/includes/kopunch.h +++ b/src/mame/includes/kopunch.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Sega KO Punch diff --git a/src/mame/includes/lethal.h b/src/mame/includes/lethal.h index e36fde5109b..d1fa59cb463 100644 --- a/src/mame/includes/lethal.h +++ b/src/mame/includes/lethal.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Nicola Salmoria /************************************************************************* diff --git a/src/mame/includes/liberatr.h b/src/mame/includes/liberatr.h index acd174bf3c7..c956cd6b5ea 100644 --- a/src/mame/includes/liberatr.h +++ b/src/mame/includes/liberatr.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* Atari Liberator hardware diff --git a/src/mame/includes/lockon.h b/src/mame/includes/lockon.h index 84f9f792bba..5c5bbc831e6 100644 --- a/src/mame/includes/lockon.h +++ b/src/mame/includes/lockon.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /************************************************************************* Lock-On hardware diff --git a/src/mame/includes/lordgun.h b/src/mame/includes/lordgun.h index 1666e237ae5..875e476609a 100644 --- a/src/mame/includes/lordgun.h +++ b/src/mame/includes/lordgun.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia /************************************************************************* -= IGS Lord Of Gun =- diff --git a/src/mame/includes/m58.h b/src/mame/includes/m58.h index b0f18ddd6eb..0a4977a0163 100644 --- a/src/mame/includes/m58.h +++ b/src/mame/includes/m58.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Lee Taylor, John Clegg class m58_state : public driver_device { public: diff --git a/src/mame/includes/m62.h b/src/mame/includes/m62.h index 0496b6d0a0b..9a508876b61 100644 --- a/src/mame/includes/m62.h +++ b/src/mame/includes/m62.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf, David Haywood class m62_state : public driver_device { public: diff --git a/src/mame/includes/m79amb.h b/src/mame/includes/m79amb.h index b8e6fe872d4..22574023cf5 100644 --- a/src/mame/includes/m79amb.h +++ b/src/mame/includes/m79amb.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Al Kossow #include "sound/discrete.h" class m79amb_state : public driver_device diff --git a/src/mame/includes/macrossp.h b/src/mame/includes/macrossp.h index 9dd35238d98..aa5ab298cc0 100644 --- a/src/mame/includes/macrossp.h +++ b/src/mame/includes/macrossp.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /************************************************************************* diff --git a/src/mame/includes/mainsnk.h b/src/mame/includes/mainsnk.h index 961b08ba0c0..9ca96b469fa 100644 --- a/src/mame/includes/mainsnk.h +++ b/src/mame/includes/mainsnk.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Tomasz Slanina class mainsnk_state : public driver_device { diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h index e8481c95853..5e01417516a 100644 --- a/src/mame/includes/malzak.h +++ b/src/mame/includes/malzak.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Reip, Barry Rodewald +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli, Barry Rodewald /************************************************************************* Malzak diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index b07cfe00bc9..9674dccefd7 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood diff --git a/src/mame/includes/mcatadv.h b/src/mame/includes/mcatadv.h index 85588fbb714..5c7f5bf1cb0 100644 --- a/src/mame/includes/mcatadv.h +++ b/src/mame/includes/mcatadv.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Paul Priest, David Haywood class mcatadv_state : public driver_device diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h index 1308ce5a7d3..96cf8fa3f1c 100644 --- a/src/mame/includes/megadriv.h +++ b/src/mame/includes/megadriv.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "coreutil.h" #include "cpu/m68000/m68000.h" diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h index 09190d6a25f..2fc4d1f7649 100644 --- a/src/mame/includes/megazone.h +++ b/src/mame/includes/megazone.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /************************************************************************* Megazone diff --git a/src/mame/includes/metalmx.h b/src/mame/includes/metalmx.h index 33b790f68f6..b12eeb11a67 100644 --- a/src/mame/includes/metalmx.h +++ b/src/mame/includes/metalmx.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Phil Bennett #include "cpu/adsp2100/adsp2100.h" #include "cpu/m68000/m68000.h" #include "cpu/tms34010/tms34010.h" diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h index 74ec5d63e32..e4fe37b871c 100644 --- a/src/mame/includes/micro3d.h +++ b/src/mame/includes/micro3d.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /************************************************************************* Microprose Games 3D hardware diff --git a/src/mame/includes/midvunit.h b/src/mame/includes/midvunit.h index 89a2e6f6566..8d15d4db507 100644 --- a/src/mame/includes/midvunit.h +++ b/src/mame/includes/midvunit.h @@ -148,6 +148,8 @@ public: optional_device<midway_ioasic_device> m_midway_ioasic; required_device<dcs_audio_device> m_dcs; required_shared_ptr<UINT32> m_generic_paletteram_32; + void postload(); + protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); }; diff --git a/src/mame/includes/mitchell.h b/src/mame/includes/mitchell.h index e890db691ea..497c50460d5 100644 --- a/src/mame/includes/mitchell.h +++ b/src/mame/includes/mitchell.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Mitchell hardware diff --git a/src/mame/includes/model1.h b/src/mame/includes/model1.h index 3c9747c918c..41b5562af07 100644 --- a/src/mame/includes/model1.h +++ b/src/mame/includes/model1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "audio/dsbz80.h" #include "audio/segam1audio.h" #include "cpu/v60/v60.h" diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index 3f4f266d637..0cf8b34c042 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Acho A. Tang /************************************************************************* diff --git a/src/mame/includes/mosaic.h b/src/mame/includes/mosaic.h index b5076b9f45d..d93a99bc9e0 100644 --- a/src/mame/includes/mosaic.h +++ b/src/mame/includes/mosaic.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Mosaic diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index c7d91db75b8..4b103f80d22 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /************************************************************************* diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h index 331e65acdec..d73fcf8abfd 100644 --- a/src/mame/includes/mpu4.h +++ b/src/mame/includes/mpu4.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "machine/6821pia.h" #include "machine/6840ptm.h" diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index 9cbe6d6fe11..d8e8ee40698 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /************************************************************************* Mr. Flea diff --git a/src/mame/includes/mrjong.h b/src/mame/includes/mrjong.h index 024f1b1b6fd..87f56aba920 100644 --- a/src/mame/includes/mrjong.h +++ b/src/mame/includes/mrjong.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Takahiro Nogi /************************************************************************* Mr. Jong diff --git a/src/mame/includes/ms32.h b/src/mame/includes/ms32.h index 7ff025baa5e..1dba0297b71 100644 --- a/src/mame/includes/ms32.h +++ b/src/mame/includes/ms32.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class ms32_state : public driver_device { diff --git a/src/mame/includes/mugsmash.h b/src/mame/includes/mugsmash.h index 465bafc8ef5..8bf5f9000fb 100644 --- a/src/mame/includes/mugsmash.h +++ b/src/mame/includes/mugsmash.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class mugsmash_state : public driver_device diff --git a/src/mame/includes/multfish.h b/src/mame/includes/multfish.h index 78ea0968c22..d4303c35024 100644 --- a/src/mame/includes/multfish.h +++ b/src/mame/includes/multfish.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, MetalliC /* Multifish */ diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index 0e7b595e569..1b4a83d044c 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /************************************************************************* Munch Mobile diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index efcb1f1bb65..240bd19099d 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Phil Stroffolino, Acho Tang, Nicola Salmoria #include "sound/k054539.h" #include "machine/k053252.h" diff --git a/src/mame/includes/n64.h b/src/mame/includes/n64.h index 8fd3ed7d008..4712299f75e 100644 --- a/src/mame/includes/n64.h +++ b/src/mame/includes/n64.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #ifndef _INCLUDES_N64_H_ #define _INCLUDES_N64_H_ diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index 7886425fd00..fb54e162d55 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli #include "cpu/mcs48/mcs48.h" #include "sound/dac.h" #include "sound/sn76477.h" diff --git a/src/mame/includes/namcoic.h b/src/mame/includes/namcoic.h index 85e4e0d74de..0b0274ccb56 100644 --- a/src/mame/includes/namcoic.h +++ b/src/mame/includes/namcoic.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* namcoic.h Custom Chips: Final Lap Assault LuckyWld System21 NA1/2 NB1/2 diff --git a/src/mame/includes/namcona1.h b/src/mame/includes/namcona1.h index cc739a69c88..d529db09569 100644 --- a/src/mame/includes/namcona1.h +++ b/src/mame/includes/namcona1.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Namco NA-1 System hardware diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 23eb305ab04..7066c90f630 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Namco System NB-1 hardware diff --git a/src/mame/includes/namcond1.h b/src/mame/includes/namcond1.h index 8a81f10fc7b..3cc1d6c8288 100644 --- a/src/mame/includes/namcond1.h +++ b/src/mame/includes/namcond1.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall, R. Belmont /*************************************************************************** diff --git a/src/mame/includes/namcos21.h b/src/mame/includes/namcos21.h index dfddffc7ebb..df676b499a7 100644 --- a/src/mame/includes/namcos21.h +++ b/src/mame/includes/namcos21.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /** * @file namcos21.h */ diff --git a/src/mame/includes/namcos86.h b/src/mame/includes/namcos86.h index 40274d02ba8..eb114022533 100644 --- a/src/mame/includes/namcos86.h +++ b/src/mame/includes/namcos86.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "sound/namco.h" class namcos86_state : public driver_device diff --git a/src/mame/includes/nb1413m3.h b/src/mame/includes/nb1413m3.h index d84417e2351..9dcafe709b9 100644 --- a/src/mame/includes/nb1413m3.h +++ b/src/mame/includes/nb1413m3.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Takahiro Nogi /****************************************************************************** Machine Hardware for Nichibutsu Mahjong series. diff --git a/src/mame/includes/nb1414m4.h b/src/mame/includes/nb1414m4.h index 8ab82d9c4d4..3e09af5c385 100644 --- a/src/mame/includes/nb1414m4.h +++ b/src/mame/includes/nb1414m4.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Angelo Salese class nb1414m4_device : public device_t, public device_video_interface { diff --git a/src/mame/includes/news.h b/src/mame/includes/news.h index 890b281d56a..455fd17bf70 100644 --- a/src/mame/includes/news.h +++ b/src/mame/includes/news.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class news_state : public driver_device diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h index f3f730a9a87..16ea6bedd0c 100644 --- a/src/mame/includes/nmk16.h +++ b/src/mame/includes/nmk16.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,trap15,Angelo Salese +// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,trap15,Angelo Salese,Luca Elia #include "machine/nmk112.h" #include "sound/okim6295.h" #include "machine/nmk004.h" diff --git a/src/mame/includes/nova2001.h b/src/mame/includes/nova2001.h index 2f5059d68c7..7dcaa7817e1 100644 --- a/src/mame/includes/nova2001.h +++ b/src/mame/includes/nova2001.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Howie Cohen, Frank Palazzolo, Alex Pasadyn, David Haywood, Steph, Phil Stroffolino, Uki class nova2001_state : public driver_device { diff --git a/src/mame/includes/oneshot.h b/src/mame/includes/oneshot.h index 5c911b0de2e..8e4ef5dc814 100644 --- a/src/mame/includes/oneshot.h +++ b/src/mame/includes/oneshot.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest #include "sound/okim6295.h" diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h index 5b2ca7ff348..6fd124e5001 100644 --- a/src/mame/includes/orbit.h +++ b/src/mame/includes/orbit.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /************************************************************************* Atari Orbit hardware diff --git a/src/mame/includes/pass.h b/src/mame/includes/pass.h index 5fc27c0c9c1..86e6ee67e1e 100644 --- a/src/mame/includes/pass.h +++ b/src/mame/includes/pass.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class pass_state : public driver_device { diff --git a/src/mame/includes/pingpong.h b/src/mame/includes/pingpong.h index 2f429ad0f15..59daddda7ee 100644 --- a/src/mame/includes/pingpong.h +++ b/src/mame/includes/pingpong.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jarek Parchanski class pingpong_state : public driver_device { public: diff --git a/src/mame/includes/pirates.h b/src/mame/includes/pirates.h index 72815067966..21cf12ebb42 100644 --- a/src/mame/includes/pirates.h +++ b/src/mame/includes/pirates.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood,Nicola Salmoria #include "machine/eepromser.h" #include "sound/okim6295.h" diff --git a/src/mame/includes/pk8000.h b/src/mame/includes/pk8000.h index e6250c5c292..ad895850537 100644 --- a/src/mame/includes/pk8000.h +++ b/src/mame/includes/pk8000.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic class pk8000_base_state : public driver_device { public: diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index 9fafc75f692..b185d8f2727 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Bryan McPhail /************************************************************************* diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h index 7cfba6c474c..2d609ea518f 100644 --- a/src/mame/includes/playmark.h +++ b/src/mame/includes/playmark.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Pierpaolo Prazzoli +// copyright-holders:Nicola Salmoria, Pierpaolo Prazzoli, Quench #include "sound/okim6295.h" #include "machine/eepromser.h" #include "cpu/pic16c5x/pic16c5x.h" diff --git a/src/mame/includes/plygonet.h b/src/mame/includes/plygonet.h index 02e6b67370c..7c1175e06f2 100644 --- a/src/mame/includes/plygonet.h +++ b/src/mame/includes/plygonet.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Andrew Gardner #include "machine/eepromser.h" #include "video/k053936.h" diff --git a/src/mame/includes/pokechmp.h b/src/mame/includes/pokechmp.h index ffa29aec23f..16174399878 100644 --- a/src/mame/includes/pokechmp.h +++ b/src/mame/includes/pokechmp.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class pokechmp_state : public driver_device { diff --git a/src/mame/includes/poolshrk.h b/src/mame/includes/poolshrk.h index 24ec0b5abaf..530f113bf95 100644 --- a/src/mame/includes/poolshrk.h +++ b/src/mame/includes/poolshrk.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* Atari Pool Shark hardware diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h index f9e0471633a..2bd29ed83ec 100644 --- a/src/mame/includes/popper.h +++ b/src/mame/includes/popper.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli /*************************************************************************** Popper diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index c1f6e323850..214d417217b 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /************************************************************************* diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h index 28c42da5313..1da9d161b13 100644 --- a/src/mame/includes/psikyosh.h +++ b/src/mame/includes/psikyosh.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest #include "video/bufsprite.h" #include "machine/eepromser.h" diff --git a/src/mame/includes/quasar.h b/src/mame/includes/quasar.h index 66ca4d12e74..424312da082 100644 --- a/src/mame/includes/quasar.h +++ b/src/mame/includes/quasar.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates, Pierpaolo Prazzoli /*************************************************************************** diff --git a/src/mame/includes/quizpani.h b/src/mame/includes/quizpani.h index 20072526956..6b302a0ea5b 100644 --- a/src/mame/includes/quizpani.h +++ b/src/mame/includes/quizpani.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli #include "machine/nmk112.h" diff --git a/src/mame/includes/rainbow.h b/src/mame/includes/rainbow.h index 1b693c5c793..ee221bdacd6 100644 --- a/src/mame/includes/rainbow.h +++ b/src/mame/includes/rainbow.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /************************************************************************* diff --git a/src/mame/includes/renegade.h b/src/mame/includes/renegade.h index f236f5f724d..4bee502c641 100644 --- a/src/mame/includes/renegade.h +++ b/src/mame/includes/renegade.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Carlos A. Lozano, Rob Rosenbrock #include "sound/msm5205.h" diff --git a/src/mame/includes/rocnrope.h b/src/mame/includes/rocnrope.h index 772dac7b0e0..76bf00401e0 100644 --- a/src/mame/includes/rocnrope.h +++ b/src/mame/includes/rocnrope.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy class rocnrope_state : public driver_device { public: diff --git a/src/mame/includes/rollrace.h b/src/mame/includes/rollrace.h index 4fafbde3ae1..f7ae7c0e9e4 100644 --- a/src/mame/includes/rollrace.h +++ b/src/mame/includes/rollrace.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli class rollrace_state : public driver_device { public: diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index 6c83983e5fd..0bee30ca5bf 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /************************************************************************* Run and Gun / Slam Dunk diff --git a/src/mame/includes/sbugger.h b/src/mame/includes/sbugger.h index 112f95aecf1..f6a88de5492 100644 --- a/src/mame/includes/sbugger.h +++ b/src/mame/includes/sbugger.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood class sbugger_state : public driver_device { public: diff --git a/src/mame/includes/scotrsht.h b/src/mame/includes/scotrsht.h index 759e9d8abc4..bc4027083b3 100644 --- a/src/mame/includes/scotrsht.h +++ b/src/mame/includes/scotrsht.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? class scotrsht_state : public driver_device { diff --git a/src/mame/includes/scramble.h b/src/mame/includes/scramble.h index 6e0864e21f7..83ee95d4b87 100644 --- a/src/mame/includes/scramble.h +++ b/src/mame/includes/scramble.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "machine/i8255.h" #include "includes/galaxold.h" #include "sound/tms5110.h" diff --git a/src/mame/includes/sderby.h b/src/mame/includes/sderby.h index 392dd41db42..9037dee7bbc 100644 --- a/src/mame/includes/sderby.h +++ b/src/mame/includes/sderby.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca class sderby_state : public driver_device { diff --git a/src/mame/includes/segaipt.h b/src/mame/includes/segaipt.h index 2ad6605dc97..266acd25348 100644 --- a/src/mame/includes/segaipt.h +++ b/src/mame/includes/segaipt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /******************************************************************************* Input port macros used by many games in multiple Sega drivers diff --git a/src/mame/includes/segas24.h b/src/mame/includes/segas24.h index 837eee252ac..94ea38c43db 100644 --- a/src/mame/includes/segas24.h +++ b/src/mame/includes/segas24.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* * Sega System 24 * diff --git a/src/mame/includes/segasp.h b/src/mame/includes/segasp.h index bb5defddcd3..ee952a7dcd9 100644 --- a/src/mame/includes/segasp.h +++ b/src/mame/includes/segasp.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega SP (Spider) Naomi derived platform diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h index 118b7c27ba1..6b5bd5ca558 100644 --- a/src/mame/includes/seibuspi.h +++ b/src/mame/includes/seibuspi.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, hap, ??? +// copyright-holders:Ville Linde, hap, Nicola Salmoria /****************************************************************************** Seibu SPI hardware diff --git a/src/mame/includes/shadfrce.h b/src/mame/includes/shadfrce.h index 45794485e18..effaca560dd 100644 --- a/src/mame/includes/shadfrce.h +++ b/src/mame/includes/shadfrce.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "sound/okim6295.h" diff --git a/src/mame/includes/shangkid.h b/src/mame/includes/shangkid.h index f257eaedc15..4ec57042a72 100644 --- a/src/mame/includes/shangkid.h +++ b/src/mame/includes/shangkid.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino class shangkid_state : public driver_device { public: diff --git a/src/mame/includes/silkroad.h b/src/mame/includes/silkroad.h index 945d17f6401..c812b7ba5b7 100644 --- a/src/mame/includes/silkroad.h +++ b/src/mame/includes/silkroad.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, R. Belmont #include "sound/okim6295.h" diff --git a/src/mame/includes/simpl156.h b/src/mame/includes/simpl156.h index 22ace0df130..50ead59f380 100644 --- a/src/mame/includes/simpl156.h +++ b/src/mame/includes/simpl156.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************* Simple 156 based board diff --git a/src/mame/includes/skyraid.h b/src/mame/includes/skyraid.h index 1ae1a04d40d..e39988ea6e7 100644 --- a/src/mame/includes/skyraid.h +++ b/src/mame/includes/skyraid.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish #include "sound/discrete.h" class skyraid_state : public driver_device diff --git a/src/mame/includes/slapstic.h b/src/mame/includes/slapstic.h index ac63d6046c9..1510d96439a 100644 --- a/src/mame/includes/slapstic.h +++ b/src/mame/includes/slapstic.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /************************************************************************* Atari Slapstic decoding helper diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h index 4857726b7b5..7db807267b0 100644 --- a/src/mame/includes/snes.h +++ b/src/mame/includes/snes.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Angelo Salese, R. Belmont, Anthony Kruize, Fabio Priuli, Ryan Holtz #ifndef _SNES_H_ #define _SNES_H_ diff --git a/src/mame/includes/snk6502.h b/src/mame/includes/snk6502.h index 85405815a10..66e0ac17443 100644 --- a/src/mame/includes/snk6502.h +++ b/src/mame/includes/snk6502.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Dan Boris /************************************************************************* rokola hardware @@ -17,51 +17,55 @@ class snk6502_state : public driver_device public: snk6502_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram2(*this, "videoram2"), - m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"), - m_charram(*this, "charram"), m_maincpu(*this, "maincpu"), m_sound(*this, "snk6502"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - UINT8 m_sasuke_counter; - - required_shared_ptr<UINT8> m_videoram2; - required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_colorram; - required_shared_ptr<UINT8> m_charram; + m_palette(*this, "palette"), + m_videoram(*this, "videoram"), + m_videoram2(*this, "videoram2"), + m_colorram(*this, "colorram"), + m_charram(*this, "charram") { } required_device<cpu_device> m_maincpu; required_device<snk6502_sound_device> m_sound; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; + required_shared_ptr<UINT8> m_videoram; + required_shared_ptr<UINT8> m_videoram2; + required_shared_ptr<UINT8> m_colorram; + required_shared_ptr<UINT8> m_charram; + + UINT8 m_sasuke_counter; int m_charbank; int m_backcolor; tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - rgb_t m_palette_val[64]; - UINT8 m_irq_mask; - DECLARE_WRITE8_MEMBER(snk6502_videoram_w); - DECLARE_WRITE8_MEMBER(snk6502_videoram2_w); - DECLARE_WRITE8_MEMBER(snk6502_colorram_w); - DECLARE_WRITE8_MEMBER(snk6502_charram_w); - DECLARE_WRITE8_MEMBER(snk6502_flipscreen_w); - DECLARE_WRITE8_MEMBER(snk6502_scrollx_w); - DECLARE_WRITE8_MEMBER(snk6502_scrolly_w); + + // common + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(videoram2_w); + DECLARE_WRITE8_MEMBER(colorram_w); + DECLARE_WRITE8_MEMBER(charram_w); + + DECLARE_WRITE8_MEMBER(scrollx_w); + DECLARE_WRITE8_MEMBER(scrolly_w); + DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(satansat_b002_w); DECLARE_WRITE8_MEMBER(satansat_backcolor_w); + DECLARE_CUSTOM_INPUT_MEMBER(snk6502_music0_r); DECLARE_CUSTOM_INPUT_MEMBER(sasuke_count_r); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(satansat_get_bg_tile_info); TILE_GET_INFO_MEMBER(satansat_get_fg_tile_info); + + virtual void machine_start(); DECLARE_MACHINE_RESET(sasuke); DECLARE_VIDEO_START(satansat); DECLARE_PALETTE_INIT(satansat); @@ -71,11 +75,15 @@ public: DECLARE_MACHINE_RESET(satansat); DECLARE_MACHINE_RESET(pballoon); DECLARE_VIDEO_START(pballoon); - UINT32 screen_update_snk6502(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(satansat_interrupt); INTERRUPT_GEN_MEMBER(snk6502_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(sasuke_update_counter); + void sasuke_start_counter(); + void postload(); }; @@ -115,7 +123,6 @@ public: protected: // device-level overrides - virtual void device_config_complete(); virtual void device_start(); // sound stream update overrides diff --git a/src/mame/includes/snowbros.h b/src/mame/includes/snowbros.h index cc6def00ff3..e194e55492f 100644 --- a/src/mame/includes/snowbros.h +++ b/src/mame/includes/snowbros.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? #include "emu.h" #include "sound/okim6295.h" diff --git a/src/mame/includes/spbactn.h b/src/mame/includes/spbactn.h index bd86e87662f..fd8074c28a3 100644 --- a/src/mame/includes/spbactn.h +++ b/src/mame/includes/spbactn.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Stephh #include "video/tecmo_spr.h" diff --git a/src/mame/includes/speedspn.h b/src/mame/includes/speedspn.h index 865a46c7ddc..b1e83fd685c 100644 --- a/src/mame/includes/speedspn.h +++ b/src/mame/includes/speedspn.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Farfetch'd #include "sound/okim6295.h" diff --git a/src/mame/includes/splash.h b/src/mame/includes/splash.h index 024e8fa4188..99a8299fb82 100644 --- a/src/mame/includes/splash.h +++ b/src/mame/includes/splash.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, David Haywood #include "sound/msm5205.h" diff --git a/src/mame/includes/sprcros2.h b/src/mame/includes/sprcros2.h index 3eb780a4697..4d6cdcfee2f 100644 --- a/src/mame/includes/sprcros2.h +++ b/src/mame/includes/sprcros2.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy class sprcros2_state : public driver_device { public: diff --git a/src/mame/includes/sprint4.h b/src/mame/includes/sprint4.h index 07cf9ef5f73..86f9f20ad09 100644 --- a/src/mame/includes/sprint4.h +++ b/src/mame/includes/sprint4.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch class sprint4_state : public driver_device { public: diff --git a/src/mame/includes/sprint8.h b/src/mame/includes/sprint8.h index 87f39e7321f..1b5a112ff83 100644 --- a/src/mame/includes/sprint8.h +++ b/src/mame/includes/sprint8.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch #include "sound/discrete.h" class sprint8_state : public driver_device diff --git a/src/mame/includes/sslam.h b/src/mame/includes/sslam.h index 9ffee056203..c52ee6f3672 100644 --- a/src/mame/includes/sslam.h +++ b/src/mame/includes/sslam.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Pierpaolo Prazzoli +// copyright-holders:Pierpaolo Prazzoli, Quench #include "sound/okim6295.h" class sslam_state : public driver_device diff --git a/src/mame/includes/sspeedr.h b/src/mame/includes/sspeedr.h index 6363dbbfb19..cd028e54c5b 100644 --- a/src/mame/includes/sspeedr.h +++ b/src/mame/includes/sspeedr.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch class sspeedr_state : public driver_device { public: diff --git a/src/mame/includes/stactics.h b/src/mame/includes/stactics.h index e27be92f4c7..abb8eceda53 100644 --- a/src/mame/includes/stactics.h +++ b/src/mame/includes/stactics.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /**************************************************************************** diff --git a/src/mame/includes/starcrus.h b/src/mame/includes/starcrus.h index 1c444414415..96e006cae87 100644 --- a/src/mame/includes/starcrus.h +++ b/src/mame/includes/starcrus.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo #include "sound/samples.h" class starcrus_state : public driver_device diff --git a/src/mame/includes/starfire.h b/src/mame/includes/starfire.h index a3978aae9e6..6915519dd2f 100644 --- a/src/mame/includes/starfire.h +++ b/src/mame/includes/starfire.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Daniel Boris, Olivier Galibert, Aaron Giles +// license:BSD-3-Clause +// copyright-holders:Dan Boris, Olivier Galibert, Aaron Giles /*************************************************************************** Star Fire/Fire One system diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h index 222111c5d90..8b5e78b5a8f 100644 --- a/src/mame/includes/starshp1.h +++ b/src/mame/includes/starshp1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Frank Palazzolo, Stefan Jokish /* * The schematics don't seem to make a lot of sense when it * comes to the video timing chain:: diff --git a/src/mame/includes/starwars.h b/src/mame/includes/starwars.h index 921ce07ac30..a4e8062873e 100644 --- a/src/mame/includes/starwars.h +++ b/src/mame/includes/starwars.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index 4bd03c6da2a..48e66bdd91c 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall #include "sound/msm5205.h" diff --git a/src/mame/includes/stlforce.h b/src/mame/includes/stlforce.h index f923ed147ea..164bd2de4a0 100644 --- a/src/mame/includes/stlforce.h +++ b/src/mame/includes/stlforce.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "sound/okim6295.h" #include "machine/eepromser.h" diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h index 4c210768a5d..9ecc01b1b85 100644 --- a/src/mame/includes/suprnova.h +++ b/src/mame/includes/suprnova.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Sylvain Glaize #include "cpu/sh2/sh2.h" diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h index b0c8b8bbfee..c691bfb902b 100644 --- a/src/mame/includes/suprslam.h +++ b/src/mame/includes/suprslam.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /************************************************************************* diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 14a4a7db9b5..f2171e180ce 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Phil Stroffolino, Mirko Buffoni // later, this might be merged with segas1x_state in segas16.h diff --git a/src/mame/includes/tagteam.h b/src/mame/includes/tagteam.h index b6a28dc7be4..aa588c11567 100644 --- a/src/mame/includes/tagteam.h +++ b/src/mame/includes/tagteam.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Steve Ellenoff, Brad Oliver class tagteam_state : public driver_device { public: diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index e31c6d609df..98c9f772fbb 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -96,6 +96,7 @@ public: int m_nibble; INT32 m_driveout_sound_latch; INT32 m_oki_bank; + emu_timer *m_int6_timer; /* devices */ required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/taito_l.h b/src/mame/includes/taito_l.h index c4a216796c3..bd3730a3fd6 100644 --- a/src/mame/includes/taito_l.h +++ b/src/mame/includes/taito_l.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "sound/msm5205.h" #include "sound/2203intf.h" diff --git a/src/mame/includes/taito_o.h b/src/mame/includes/taito_o.h index 8b67c350803..2b132d95efe 100644 --- a/src/mame/includes/taito_o.h +++ b/src/mame/includes/taito_o.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /************************************************************************* Taito O system diff --git a/src/mame/includes/taitoipt.h b/src/mame/includes/taitoipt.h index 4410748d25c..d41f6d05322 100644 --- a/src/mame/includes/taitoipt.h +++ b/src/mame/includes/taitoipt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Graves, Bryan McPhail, Brad Oliver, Andrew Prime, Brian Troha, Nicola Salmoria /******************************************************************************* Input port macros used by many games in multiple Taito drivers diff --git a/src/mame/includes/taitosj.h b/src/mame/includes/taitosj.h index 74829f086d5..49e1fbf7959 100644 --- a/src/mame/includes/taitosj.h +++ b/src/mame/includes/taitosj.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "sound/dac.h" class taitosj_state : public driver_device diff --git a/src/mame/includes/tank8.h b/src/mame/includes/tank8.h index 62c3af0e82d..e953d955ca0 100644 --- a/src/mame/includes/tank8.h +++ b/src/mame/includes/tank8.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /************************************************************************* Atari tank8 hardware diff --git a/src/mame/includes/taotaido.h b/src/mame/includes/taotaido.h index b61654e2c50..35e548cf300 100644 --- a/src/mame/includes/taotaido.h +++ b/src/mame/includes/taotaido.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class taotaido_state : public driver_device { diff --git a/src/mame/includes/taxidriv.h b/src/mame/includes/taxidriv.h index 722335aaade..063f007ad08 100644 --- a/src/mame/includes/taxidriv.h +++ b/src/mame/includes/taxidriv.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria class taxidriv_state : public driver_device { public: diff --git a/src/mame/includes/tbowl.h b/src/mame/includes/tbowl.h index 1f08a292e38..20ee14ed3c8 100644 --- a/src/mame/includes/tbowl.h +++ b/src/mame/includes/tbowl.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "sound/msm5205.h" #include "video/tecmo_spr.h" diff --git a/src/mame/includes/tecmosys.h b/src/mame/includes/tecmosys.h index 8caaa640254..cd43196094b 100644 --- a/src/mame/includes/tecmosys.h +++ b/src/mame/includes/tecmosys.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch,David Haywood,Tomasz Slanina /*************************************************************************** diff --git a/src/mame/includes/terracre.h b/src/mame/includes/terracre.h index efb6e238b4f..81d2611efeb 100644 --- a/src/mame/includes/terracre.h +++ b/src/mame/includes/terracre.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano #include "video/bufsprite.h" diff --git a/src/mame/includes/thief.h b/src/mame/includes/thief.h index b03222bbec3..f67bd93f391 100644 --- a/src/mame/includes/thief.h +++ b/src/mame/includes/thief.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Victor Trucco, Mike Balfour, Phil Stroffolino #include "sound/samples.h" #include "video/tms9927.h" diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h index 3e93d47bdaa..6d1f773dc65 100644 --- a/src/mame/includes/toaplan1.h +++ b/src/mame/includes/toaplan1.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Darren Olafson, Quench /*************************************************************************** ToaPlan game hardware from 1988-1991 diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 4f4b0dadc94..85e5ccc0a0d 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Quench, Yochizo +// license:BSD-3-Clause +// copyright-holders:Quench, Yochizo, David Haywood /**************** Machine stuff ******************/ //#define USE_HD64x180 /* Define if CPU support is available */ //#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */ diff --git a/src/mame/includes/toaplipt.h b/src/mame/includes/toaplipt.h index 0ab6f05eacc..2297781f6b1 100644 --- a/src/mame/includes/toaplipt.h +++ b/src/mame/includes/toaplipt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Quench, Stephh /******************************************************************************* Input port macros used by many games in multiple Toaplan drivers diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index c5876436ca8..efecd20ac9d 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves /************************************************************************* Top Speed / Full Throttle diff --git a/src/mame/includes/trackfld.h b/src/mame/includes/trackfld.h index 10b549ed43c..ad631d1e457 100644 --- a/src/mame/includes/trackfld.h +++ b/src/mame/includes/trackfld.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** Track'n'Field diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h index bf6a324f626..5b171eaf5b2 100644 --- a/src/mame/includes/triplhnt.h +++ b/src/mame/includes/triplhnt.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /************************************************************************* Atari Triple Hunt hardware diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index 547213a7820..735e2ae269d 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "video/decospr.h" diff --git a/src/mame/includes/tumblep.h b/src/mame/includes/tumblep.h index 4a743adce23..09d28d2d54e 100644 --- a/src/mame/includes/tumblep.h +++ b/src/mame/includes/tumblep.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************* Tumble Pop diff --git a/src/mame/includes/tunhunt.h b/src/mame/includes/tunhunt.h index 6d86e5748a6..7dc6bb5be26 100644 --- a/src/mame/includes/tunhunt.h +++ b/src/mame/includes/tunhunt.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Owen Rubin,David Haywood class tunhunt_state : public driver_device { public: diff --git a/src/mame/includes/turrett.h b/src/mame/includes/turrett.h index 256d609a6ba..a266befb4f2 100644 --- a/src/mame/includes/turrett.h +++ b/src/mame/includes/turrett.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Turret Tower hardware diff --git a/src/mame/includes/twincobr.h b/src/mame/includes/twincobr.h index 2f59182342e..bd9ae4478d6 100644 --- a/src/mame/includes/twincobr.h +++ b/src/mame/includes/twincobr.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Quench /*************************************************************************** Twincobr/Flying Shark/Wardner game hardware from 1986-1987 diff --git a/src/mame/includes/tx1.h b/src/mame/includes/tx1.h index c22afbdd931..235d564437f 100644 --- a/src/mame/includes/tx1.h +++ b/src/mame/includes/tx1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /************************************************************************* TX-1/Buggy Boy hardware diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h index 4740a47d29c..b347ecf7b89 100644 --- a/src/mame/includes/ultratnk.h +++ b/src/mame/includes/ultratnk.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Stefan Jokisch /************************************************************************* Atari Ultra Tank hardware diff --git a/src/mame/includes/usgames.h b/src/mame/includes/usgames.h index 2e713a89a57..dae9e5b9b7c 100644 --- a/src/mame/includes/usgames.h +++ b/src/mame/includes/usgames.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Nicola Salmoria class usgames_state : public driver_device { public: diff --git a/src/mame/includes/vectrex.h b/src/mame/includes/vectrex.h index cc47f139875..b73ff2b71d6 100644 --- a/src/mame/includes/vectrex.h +++ b/src/mame/includes/vectrex.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /***************************************************************************** * diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h index b1dbf21934d..bac9fcc61ad 100644 --- a/src/mame/includes/vertigo.h +++ b/src/mame/includes/vertigo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /************************************************************************* diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h index 2335b699a6d..7eeba314307 100644 --- a/src/mame/includes/vicdual.h +++ b/src/mame/includes/vicdual.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /************************************************************************* VIC Dual Game board diff --git a/src/mame/includes/videopin.h b/src/mame/includes/videopin.h index 57a91f6b89e..e97c842da2e 100644 --- a/src/mame/includes/videopin.h +++ b/src/mame/includes/videopin.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sebastien Monassa /************************************************************************* diff --git a/src/mame/includes/volfied.h b/src/mame/includes/volfied.h index 6112e9d85e2..8633ab5ae70 100644 --- a/src/mame/includes/volfied.h +++ b/src/mame/includes/volfied.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Nicola Salmoria /************************************************************************* Volfied diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index a8bf44d8ce3..8f9b9895bdf 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy #include "audio/warpwarp.h" class warpwarp_state : public driver_device diff --git a/src/mame/includes/welltris.h b/src/mame/includes/welltris.h index 34a044ad4e8..6a0c481ee17 100644 --- a/src/mame/includes/welltris.h +++ b/src/mame/includes/welltris.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "video/vsystem_spr2.h" diff --git a/src/mame/includes/wgp.h b/src/mame/includes/wgp.h index 77bbd5a387f..cde714d9dd3 100644 --- a/src/mame/includes/wgp.h +++ b/src/mame/includes/wgp.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves /************************************************************************* World Grand Prix diff --git a/src/mame/includes/wolfpack.h b/src/mame/includes/wolfpack.h index c1c08dcceaa..7eefe29f0d6 100644 --- a/src/mame/includes/wolfpack.h +++ b/src/mame/includes/wolfpack.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch #include "sound/s14001a.h" class wolfpack_state : public driver_device diff --git a/src/mame/includes/wpc_pin.h b/src/mame/includes/wpc_pin.h index cb0a68ce862..f81ee2c3ab4 100644 --- a/src/mame/includes/wpc_pin.h +++ b/src/mame/includes/wpc_pin.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * wpc_pin.h * diff --git a/src/mame/includes/wrally.h b/src/mame/includes/wrally.h index 44bb9c85037..4fe26021140 100644 --- a/src/mame/includes/wrally.h +++ b/src/mame/includes/wrally.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, Mike Coates, Nicola Salmoria, Miguel Andel Horna class wrally_state : public driver_device { diff --git a/src/mame/includes/wwfsstar.h b/src/mame/includes/wwfsstar.h index b377c3933c8..d0086e870fd 100644 --- a/src/mame/includes/wwfsstar.h +++ b/src/mame/includes/wwfsstar.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood class wwfsstar_state : public driver_device { diff --git a/src/mame/includes/xain.h b/src/mame/includes/xain.h index 1f65025d602..b1a1db6bc33 100644 --- a/src/mame/includes/xain.h +++ b/src/mame/includes/xain.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino class xain_state : public driver_device { diff --git a/src/mame/includes/xexex.h b/src/mame/includes/xexex.h index b4d592d5ad1..2b03361443e 100644 --- a/src/mame/includes/xexex.h +++ b/src/mame/includes/xexex.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /************************************************************************* Xexex diff --git a/src/mame/includes/xyonix.h b/src/mame/includes/xyonix.h index 77e9ec83824..5b5bab46372 100644 --- a/src/mame/includes/xyonix.h +++ b/src/mame/includes/xyonix.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Stephh class xyonix_state : public driver_device { diff --git a/src/mame/includes/zac2650.h b/src/mame/includes/zac2650.h index e1d9c01e514..eaf3e198323 100644 --- a/src/mame/includes/zac2650.h +++ b/src/mame/includes/zac2650.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates #include "machine/s2636.h" diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h index a967067d2d3..e89aeacea1b 100644 --- a/src/mame/includes/zaxxon.h +++ b/src/mame/includes/zaxxon.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Sega Zaxxon hardware diff --git a/src/mame/machine/315-5838_317-0229_comp.c b/src/mame/machine/315-5838_317-0229_comp.c index 0fafd8a151a..d7c33c5afad 100644 --- a/src/mame/machine/315-5838_317-0229_comp.c +++ b/src/mame/machine/315-5838_317-0229_comp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega Compression (and possibly encryption) device 315-5838 - Decathlete (ST-V) diff --git a/src/mame/machine/315-5838_317-0229_comp.h b/src/mame/machine/315-5838_317-0229_comp.h index 143c85c7604..74cf265ebbe 100644 --- a/src/mame/machine/315-5838_317-0229_comp.h +++ b/src/mame/machine/315-5838_317-0229_comp.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once diff --git a/src/mame/machine/315-5881_crypt.c b/src/mame/machine/315-5881_crypt.c index 99d0f85e15b..7997000400d 100644 --- a/src/mame/machine/315-5881_crypt.c +++ b/src/mame/machine/315-5881_crypt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Andreas Naive, Olivier Galibert, David Haywood /* re: Tecmo World Cup '98 (ST-V) (from ANY) diff --git a/src/mame/machine/315-5881_crypt.h b/src/mame/machine/315-5881_crypt.h index 9be2011e36d..19b0e6ba960 100644 --- a/src/mame/machine/315-5881_crypt.h +++ b/src/mame/machine/315-5881_crypt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once diff --git a/src/mame/machine/315_5296.c b/src/mame/machine/315_5296.c index 7b2d23b8f58..e87744d159b 100644 --- a/src/mame/machine/315_5296.c +++ b/src/mame/machine/315_5296.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:hap /********************************************************************** Sega 315-5296 I/O chip diff --git a/src/mame/machine/315_5296.h b/src/mame/machine/315_5296.h index 667265c9886..8a07b7f1d1a 100644 --- a/src/mame/machine/315_5296.h +++ b/src/mame/machine/315_5296.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:hap /********************************************************************** Sega 315-5296 I/O chip diff --git a/src/mame/machine/acitya.c b/src/mame/machine/acitya.c index beeec4bcda0..f986e9fa00d 100644 --- a/src/mame/machine/acitya.c +++ b/src/mame/machine/acitya.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Widel /*************************************************************************** machine.c diff --git a/src/mame/machine/archimds.c b/src/mame/machine/archimds.c index a48b4ef4e88..d136dc4845d 100644 --- a/src/mame/machine/archimds.c +++ b/src/mame/machine/archimds.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Angelo Salese, R. Belmont, Juergen Bunchmueller /****************************************************************************** * * Acorn Archimedes custom chips (IOC, MEMC, VIDC) diff --git a/src/mame/machine/arkanoid.c b/src/mame/machine/arkanoid.c index ba023058829..4153fcbc27e 100644 --- a/src/mame/machine/arkanoid.c +++ b/src/mame/machine/arkanoid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** machine.c diff --git a/src/mame/machine/asteroid.c b/src/mame/machine/asteroid.c index 2218b763f21..9c844e6f5b7 100644 --- a/src/mame/machine/asteroid.c +++ b/src/mame/machine/asteroid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard Van Der Bas /*************************************************************************** machine.c diff --git a/src/mame/machine/atari_vg.c b/src/mame/machine/atari_vg.c index 43b95de3143..9f2f043de58 100644 --- a/src/mame/machine/atari_vg.c +++ b/src/mame/machine/atari_vg.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Atari vector hardware diff --git a/src/mame/machine/atari_vg.h b/src/mame/machine/atari_vg.h index 095085ffe09..7815f20ace9 100644 --- a/src/mame/machine/atari_vg.h +++ b/src/mame/machine/atari_vg.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Atari vector hardware diff --git a/src/mame/machine/awboard.c b/src/mame/machine/awboard.c index 71d9d9fbc18..e0b030ba87b 100644 --- a/src/mame/machine/awboard.c +++ b/src/mame/machine/awboard.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "awboard.h" diff --git a/src/mame/machine/awboard.h b/src/mame/machine/awboard.h index 5b6854260ce..7196fad961e 100644 --- a/src/mame/machine/awboard.h +++ b/src/mame/machine/awboard.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _AWBOARD_H_ #define _AWBOARD_H_ diff --git a/src/mame/machine/beezer.c b/src/mame/machine/beezer.c index aa5914554a0..42984c26f32 100644 --- a/src/mame/machine/beezer.c +++ b/src/mame/machine/beezer.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer #include "emu.h" #include "cpu/m6809/m6809.h" diff --git a/src/mame/machine/bfm_bd1.h b/src/mame/machine/bfm_bd1.h index ad50842b18b..12493d33ff4 100644 --- a/src/mame/machine/bfm_bd1.h +++ b/src/mame/machine/bfm_bd1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef BFM_BD1_H #define BFM_BD1_H diff --git a/src/mame/machine/bfm_bda.h b/src/mame/machine/bfm_bda.h index e1b6c3ff2f7..d0b4fbd58b8 100644 --- a/src/mame/machine/bfm_bda.h +++ b/src/mame/machine/bfm_bda.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef BFM_BDA_H #define BFM_BDA_H diff --git a/src/mame/machine/bfm_comn.c b/src/mame/machine/bfm_comn.c index 020a2a5d600..9b917a75914 100644 --- a/src/mame/machine/bfm_comn.c +++ b/src/mame/machine/bfm_comn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Bellfruit Common Hardware / Functions */ #include "emu.h" diff --git a/src/mame/machine/bfm_comn.h b/src/mame/machine/bfm_comn.h index 009776d6327..d45c0291b4e 100644 --- a/src/mame/machine/bfm_comn.h +++ b/src/mame/machine/bfm_comn.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood void bfm_decode_mainrom(running_machine &machine, const char *rom_region, UINT8* codec_data); diff --git a/src/mame/machine/bonzeadv.c b/src/mame/machine/bonzeadv.c index 67a8c364618..0cd31e4ea01 100644 --- a/src/mame/machine/bonzeadv.c +++ b/src/mame/machine/bonzeadv.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ernesto Corvi, Nicola Salmoria /************************************************************************* Bonze Adventure C-Chip diff --git a/src/mame/machine/buggychl.h b/src/mame/machine/buggychl.h index 48d741f5d50..507f5543e0a 100644 --- a/src/mame/machine/buggychl.h +++ b/src/mame/machine/buggychl.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ernesto Corvi, Nicola Salmoria class buggychl_mcu_device : public device_t { public: diff --git a/src/mame/machine/cat702.c b/src/mame/machine/cat702.c index 5e2e5f44873..c02c4394ce1 100644 --- a/src/mame/machine/cat702.c +++ b/src/mame/machine/cat702.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf /* CAT702 ZN security chip diff --git a/src/mame/machine/cat702.h b/src/mame/machine/cat702.h index 39b7690f017..b1a69c38e21 100644 --- a/src/mame/machine/cat702.h +++ b/src/mame/machine/cat702.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf /* CAT702 security chip */ #pragma once diff --git a/src/mame/machine/cchasm.c b/src/mame/machine/cchasm.c index b3103fd5639..0f13a3c413d 100644 --- a/src/mame/machine/cchasm.c +++ b/src/mame/machine/cchasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** @@ -9,7 +9,7 @@ #include "emu.h" #include "includes/cchasm.h" -WRITE16_MEMBER(cchasm_state::cchasm_led_w) +WRITE16_MEMBER(cchasm_state::led_w) { /*logerror("LED write %x to %x\n", data, offset);*/ } diff --git a/src/mame/machine/cchip.c b/src/mame/machine/cchip.c index dcbcb2fc7e7..5ae6b5f3e0d 100644 --- a/src/mame/machine/cchip.c +++ b/src/mame/machine/cchip.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Nicola Salmoria /*************************************************************************** cchip.c diff --git a/src/mame/machine/cclimber.c b/src/mame/machine/cclimber.c index a599d0b72ed..803d1c00947 100644 --- a/src/mame/machine/cclimber.c +++ b/src/mame/machine/cclimber.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/cclimber.h" diff --git a/src/mame/machine/cdi070.c b/src/mame/machine/cdi070.c index c1207bac607..c8a9ab2f9ea 100644 --- a/src/mame/machine/cdi070.c +++ b/src/mame/machine/cdi070.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/machine/cdi070.h b/src/mame/machine/cdi070.h index 97a5c33d04a..07234e7705c 100644 --- a/src/mame/machine/cdi070.h +++ b/src/mame/machine/cdi070.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/machine/cdicdic.c b/src/mame/machine/cdicdic.c index 6814489f020..332f962b6fd 100644 --- a/src/mame/machine/cdicdic.c +++ b/src/mame/machine/cdicdic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/machine/cdicdic.h b/src/mame/machine/cdicdic.h index abb0279bc26..7fec96caee6 100644 --- a/src/mame/machine/cdicdic.h +++ b/src/mame/machine/cdicdic.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/machine/cdislave.c b/src/mame/machine/cdislave.c index 235b15579cf..4bfa5952115 100644 --- a/src/mame/machine/cdislave.c +++ b/src/mame/machine/cdislave.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/machine/cdislave.h b/src/mame/machine/cdislave.h index 16301bf132a..7940c66d3a8 100644 --- a/src/mame/machine/cdislave.h +++ b/src/mame/machine/cdislave.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/machine/cps2crpt.c b/src/mame/machine/cps2crpt.c index b8dd188f340..e0af3a75bf6 100644 --- a/src/mame/machine/cps2crpt.c +++ b/src/mame/machine/cps2crpt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Paul Leaman, Andreas Naive, Nicola Salmoria,Charles MacDonald /****************************************************************************** CPS-2 Encryption diff --git a/src/mame/machine/dc-ctrl.c b/src/mame/machine/dc-ctrl.c index 71afaa89678..c5c1d77c8d4 100644 --- a/src/mame/machine/dc-ctrl.c +++ b/src/mame/machine/dc-ctrl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "dc-ctrl.h" diff --git a/src/mame/machine/dc-ctrl.h b/src/mame/machine/dc-ctrl.h index 1c75cd9218c..99309e8318c 100644 --- a/src/mame/machine/dc-ctrl.h +++ b/src/mame/machine/dc-ctrl.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _DC_CTRL_H_ #define _DC_CTRL_H_ diff --git a/src/mame/machine/deco102.c b/src/mame/machine/deco102.c index 74bab8937d9..5441ae9b0a6 100644 --- a/src/mame/machine/deco102.c +++ b/src/mame/machine/deco102.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Data East Custom Chip 102 decryption diff --git a/src/mame/machine/deco104.c b/src/mame/machine/deco104.c index 19247a14df6..554ad3ac47f 100644 --- a/src/mame/machine/deco104.c +++ b/src/mame/machine/deco104.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /**************************************************************************** diff --git a/src/mame/machine/deco104.h b/src/mame/machine/deco104.h index a4f29e919f0..ee321cbdba1 100644 --- a/src/mame/machine/deco104.h +++ b/src/mame/machine/deco104.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __DECO104_H__ #define __DECO104_H__ diff --git a/src/mame/machine/deco146.c b/src/mame/machine/deco146.c index 1026301d226..1bdc820147e 100644 --- a/src/mame/machine/deco146.c +++ b/src/mame/machine/deco146.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Charles MacDonald /* Data East 146 protection chip / memory-mapper & I/O interface */ /* diff --git a/src/mame/machine/deco146.h b/src/mame/machine/deco146.h index 8f17f9d8552..81b56fdb216 100644 --- a/src/mame/machine/deco146.h +++ b/src/mame/machine/deco146.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Charles MacDonald #pragma once #ifndef __DECO146_H__ #define __DECO146_H__ diff --git a/src/mame/machine/deco222.c b/src/mame/machine/deco222.c index c9205d91644..ebc6dc46f9a 100644 --- a/src/mame/machine/deco222.c +++ b/src/mame/machine/deco222.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Data East encrypted CPU 222, aka C10707? also sometimes implemented as basic logic outside the CPU on early revs and bootlegs */ diff --git a/src/mame/machine/deco222.h b/src/mame/machine/deco222.h index c78652ce15d..d221d59b91e 100644 --- a/src/mame/machine/deco222.h +++ b/src/mame/machine/deco222.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "cpu/m6502/m6502.h" diff --git a/src/mame/machine/decocass_tape.c b/src/mame/machine/decocass_tape.c index a8d5b86c144..2cc211f689b 100644 --- a/src/mame/machine/decocass_tape.c +++ b/src/mame/machine/decocass_tape.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller, David Haywood /*********************************************************************** DECO Cassette System machine diff --git a/src/mame/machine/decocass_tape.h b/src/mame/machine/decocass_tape.h index 81a14861ee0..8e1040d48af 100644 --- a/src/mame/machine/decocass_tape.h +++ b/src/mame/machine/decocass_tape.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:GPL-2.0+ +// copyright-holders:Juergen Buchmueller, David Haywood #ifndef __DECOCASS_TAPE_H__ #define __DECOCASS_TAPE_H__ diff --git a/src/mame/machine/decocpu6.c b/src/mame/machine/decocpu6.c index e2de6122cba..98542ff12fb 100644 --- a/src/mame/machine/decocpu6.c +++ b/src/mame/machine/decocpu6.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* apparently Deco CPU-6 used by ProGolf just seems to be a bitswap on the opcodes like 222, but not the same one not a complex scheme like CPU-7? diff --git a/src/mame/machine/decocpu6.h b/src/mame/machine/decocpu6.h index 39a845b3507..6e6fc64effa 100644 --- a/src/mame/machine/decocpu6.h +++ b/src/mame/machine/decocpu6.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" diff --git a/src/mame/machine/decocpu7.c b/src/mame/machine/decocpu7.c index 1339af37f67..e77f47b057f 100644 --- a/src/mame/machine/decocpu7.c +++ b/src/mame/machine/decocpu7.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "decocpu7.h" diff --git a/src/mame/machine/decocpu7.h b/src/mame/machine/decocpu7.h index 341d8844fd4..0cf2dbf4bfd 100644 --- a/src/mame/machine/decocpu7.h +++ b/src/mame/machine/decocpu7.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "cpu/m6502/m6502.h" diff --git a/src/mame/machine/decocrpt.c b/src/mame/machine/decocrpt.c index 570696c162d..dc31db80fdf 100644 --- a/src/mame/machine/decocrpt.c +++ b/src/mame/machine/decocrpt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /******************************************************************************* Data East gfx encryption emulation by Nicola Salmoria diff --git a/src/mame/machine/decopincpu.c b/src/mame/machine/decopincpu.c index e9ef5ed2d11..4e748670071 100644 --- a/src/mame/machine/decopincpu.c +++ b/src/mame/machine/decopincpu.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball CPU boards * diff --git a/src/mame/machine/decopincpu.h b/src/mame/machine/decopincpu.h index 4412c3784d1..35b251bbedd 100644 --- a/src/mame/machine/decopincpu.h +++ b/src/mame/machine/decopincpu.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball CPU boards * diff --git a/src/mame/machine/docastle.c b/src/mame/machine/docastle.c index cd6e5473139..d4bc39159a6 100644 --- a/src/mame/machine/docastle.c +++ b/src/mame/machine/docastle.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** machine.c diff --git a/src/mame/machine/fd1089.c b/src/mame/machine/fd1089.c index 3e93a4f4693..c9cea731f83 100644 --- a/src/mame/machine/fd1089.c +++ b/src/mame/machine/fd1089.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Andreas Naive, Charles MacDonald /*************************************************************************** Hitachi FD1089A/FD1089B encryption emulation diff --git a/src/mame/machine/fd1089.h b/src/mame/machine/fd1089.h index 2a67be833cc..0e66d1e2bdc 100644 --- a/src/mame/machine/fd1089.h +++ b/src/mame/machine/fd1089.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Andreas Naive, Charles MacDonald /*************************************************************************** Hitachi FD1089A/FD1089B encryption emulation diff --git a/src/mame/machine/fd1094.c b/src/mame/machine/fd1094.c index 08f466a67c0..32c369ef221 100644 --- a/src/mame/machine/fd1094.c +++ b/src/mame/machine/fd1094.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Andreas Naive, Charles MacDonald /*************************************************************************** Hitachi FD1089FD1094 encryption emulation diff --git a/src/mame/machine/fd1094.h b/src/mame/machine/fd1094.h index 266b41c0240..3439a4c288c 100644 --- a/src/mame/machine/fd1094.h +++ b/src/mame/machine/fd1094.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Andreas Naive, Charles MacDonald /*************************************************************************** Hitachi FD1094 encryption emulation diff --git a/src/mame/machine/fddebug.h b/src/mame/machine/fddebug.h index 588769dc944..12ff2efabbd 100644 --- a/src/mame/machine/fddebug.h +++ b/src/mame/machine/fddebug.h @@ -1,4 +1,4 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles void fd1094_regenerate_key(running_machine &machine); void fd1094_init_debugging(running_machine &machine, const char *cpureg, const char *keyreg, const char *statreg, void (*changed)(running_machine &)); diff --git a/src/mame/machine/flstory.c b/src/mame/machine/flstory.c index 9b7929eb82e..47c91810b61 100644 --- a/src/mame/machine/flstory.c +++ b/src/mame/machine/flstory.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** machine.c diff --git a/src/mame/machine/gaelcrpt.c b/src/mame/machine/gaelcrpt.c index 26c55ad8a90..b6f46bae5d6 100644 --- a/src/mame/machine/gaelcrpt.c +++ b/src/mame/machine/gaelcrpt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Manuel Abadia /* Gaelco video RAM encryption diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c index a462331665e..2c7d11fddc6 100644 --- a/src/mame/machine/galaxold.c +++ b/src/mame/machine/galaxold.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** machine.c diff --git a/src/mame/machine/gdrom.c b/src/mame/machine/gdrom.c index ffa7c338d8f..2909cda71db 100644 --- a/src/mame/machine/gdrom.c +++ b/src/mame/machine/gdrom.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf, Angelo Salese /*************************************************************************** gdrom.c - Implementation of the Sega GD-ROM device diff --git a/src/mame/machine/gdrom.h b/src/mame/machine/gdrom.h index 7bc609d64d2..96fa7188ed3 100644 --- a/src/mame/machine/gdrom.h +++ b/src/mame/machine/gdrom.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf, Angelo Salese /*************************************************************************** gdrom.h diff --git a/src/mame/machine/genpin.c b/src/mame/machine/genpin.c index d1d613a572b..bac8743f5d2 100644 --- a/src/mame/machine/genpin.c +++ b/src/mame/machine/genpin.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Robbbert /********************************************************************************* This is for common pinball machine coding. diff --git a/src/mame/machine/genpin.h b/src/mame/machine/genpin.h index 792bb574682..ca3084524b4 100644 --- a/src/mame/machine/genpin.h +++ b/src/mame/machine/genpin.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Robbbert #ifndef GENPIN_H_ #define GENPIN_H_ diff --git a/src/mame/machine/hng64_net.c b/src/mame/machine/hng64_net.c index 57264986c76..7edd0b53882 100644 --- a/src/mame/machine/hng64_net.c +++ b/src/mame/machine/hng64_net.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:David Haywood, Angelo Salese, ElSemi, Andrew Gardner, Andrew Zaferakis /* HNG64 Communication / Network CPU */ // this is driven by a KL5C80A12CFP which is basically a super-charged Z80 diff --git a/src/mame/machine/igs022.c b/src/mame/machine/igs022.c index 10b243f0441..360b333d52f 100644 --- a/src/mame/machine/igs022.c +++ b/src/mame/machine/igs022.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS022 is an encrypted DMA device, most likely an MCU of some sort diff --git a/src/mame/machine/igs022.h b/src/mame/machine/igs022.h index 20f1992e3d9..fa5ae2ee74b 100644 --- a/src/mame/machine/igs022.h +++ b/src/mame/machine/igs022.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS022 */ diff --git a/src/mame/machine/igs025.c b/src/mame/machine/igs025.c index deb5749492e..e7ac5803c58 100644 --- a/src/mame/machine/igs025.c +++ b/src/mame/machine/igs025.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS025 is some kind of state machine / logic device which the game diff --git a/src/mame/machine/igs025.h b/src/mame/machine/igs025.h index 5a762c43b73..4eb59ab89fd 100644 --- a/src/mame/machine/igs025.h +++ b/src/mame/machine/igs025.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* Common device stuff for IGS025 / IGS022, should be split into devices for each chip once we know where what part does what */ diff --git a/src/mame/machine/igs028.c b/src/mame/machine/igs028.c index 21a9407bc63..5836d946933 100644 --- a/src/mame/machine/igs028.c +++ b/src/mame/machine/igs028.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS 028 */ // this seems to be very similar to the igs022 - encrypted DMA + some other ops with shared RAM diff --git a/src/mame/machine/igs028.h b/src/mame/machine/igs028.h index 698d89925e1..41b9811bf34 100644 --- a/src/mame/machine/igs028.h +++ b/src/mame/machine/igs028.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS 028 */ diff --git a/src/mame/machine/igs036crypt.c b/src/mame/machine/igs036crypt.c index 9510af39d16..d017ea9c763 100644 --- a/src/mame/machine/igs036crypt.c +++ b/src/mame/machine/igs036crypt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "igs036crypt.h" /**************************************************************************** diff --git a/src/mame/machine/igs036crypt.h b/src/mame/machine/igs036crypt.h index 7bdc899a4d3..0fc88d6072a 100644 --- a/src/mame/machine/igs036crypt.h +++ b/src/mame/machine/igs036crypt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #ifndef _IGS036CRYPT_H_ #define _IGS036CRYPT_H_ diff --git a/src/mame/machine/inder_sb.c b/src/mame/machine/inder_sb.c index 36b421814a4..99b45e98568 100644 --- a/src/mame/machine/inder_sb.c +++ b/src/mame/machine/inder_sb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Inder / Dinamic Sound Board */ diff --git a/src/mame/machine/inder_sb.h b/src/mame/machine/inder_sb.h index 36e10bc62d9..7d0fd098feb 100644 --- a/src/mame/machine/inder_sb.h +++ b/src/mame/machine/inder_sb.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* */ diff --git a/src/mame/machine/inder_vid.c b/src/mame/machine/inder_vid.c index 226c23c5add..5d4ee0b79f9 100644 --- a/src/mame/machine/inder_vid.c +++ b/src/mame/machine/inder_vid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Inder / Dinamic Video */ /* Inder / Dinamic Sound Board */ diff --git a/src/mame/machine/inder_vid.h b/src/mame/machine/inder_vid.h index 6da308d4895..c6089e5c04c 100644 --- a/src/mame/machine/inder_vid.h +++ b/src/mame/machine/inder_vid.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Inder / Dinamic Video */ diff --git a/src/mame/machine/irem_cpu.h b/src/mame/machine/irem_cpu.h index c86e9973d20..d14ab4dab95 100644 --- a/src/mame/machine/irem_cpu.h +++ b/src/mame/machine/irem_cpu.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail extern const UINT8 gunforce_decryption_table[]; extern const UINT8 bomberman_decryption_table[]; diff --git a/src/mame/machine/irobot.c b/src/mame/machine/irobot.c index de118bc1fc6..011f4b8ceeb 100644 --- a/src/mame/machine/irobot.c +++ b/src/mame/machine/irobot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris /*************************************************************************** Atari I, Robot hardware diff --git a/src/mame/machine/iteagle_fpga.c b/src/mame/machine/iteagle_fpga.c index 13abd2ae9b9..40b50e44a83 100644 --- a/src/mame/machine/iteagle_fpga.c +++ b/src/mame/machine/iteagle_fpga.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green #include "iteagle_fpga.h" #include "coreutil.h" @@ -8,7 +8,7 @@ #define LOG_EEPROM (0) #define LOG_IDE (0) #define LOG_IDE_CTRL (0) - +#define LOG_IDE_REG (0) const device_type ITEAGLE_FPGA = &device_creator<iteagle_fpga_device>; @@ -39,35 +39,36 @@ void iteagle_fpga_device::device_start() add_map(sizeof(m_rtc_regs), M_MEM, FUNC(iteagle_fpga_device::rtc_map)); // RTC defaults to base address 0x000c0000 bank_infos[1].adr = 0x000c0000 & (~(bank_infos[1].size - 1)); + + m_timer = timer_alloc(0, NULL); + m_timer->adjust(attotime::zero, 0, attotime::from_hz(25)); } void iteagle_fpga_device::device_reset() { + m_cpu = machine().device<cpu_device>(m_cpu_tag); pci_device::device_reset(); memset(m_fpga_regs, 0, sizeof(m_fpga_regs)); - //memset(m_rtc_regs, 0, sizeof(m_rtc_regs)); - //m_rtc_regs[0] = 0x11223344; m_seq = m_seq_init; m_seq_rem1 = 0; m_seq_rem2 = 0; - // 0x00&0x2 == 1 for boot - //m_fpga_regs[0x00/4] = 0xC1110002; // 0xCF000002;// byte 3 is voltage sensor? high = 0x40 good = 0xC0 0xF0 0xFF; //0x80 0x30 0x00FF = voltage low - //m_fpga_regs[0x00/4] = 0xC010ffff; - // byte 3 is voltage sensor? high = 0x40 good = 0xC0 0xF0 0xFF; //0x80 0x30 0x00FF = voltage low - // Bit 20 seems to be sw51 (operator mode) 0 = Normal, 1 = Operator Mode - //m_fpga_regs[0x04/4] = 0x06060044; // Nibble starting at bit 20 is resolution, byte 0 is atmel response + // 0x00080000 and interrupt starts reading from 0x14 + // 0x02000000 and interrupt starts reading from 0x18 m_fpga_regs[0x04/4] = 0x00000000; // Nibble starting at bit 20 is resolution, byte 0 is atmel response - //m_fpga_regs[0x308/4]=0x0000ffff; // Low 16 bits gets read alot? - //m_fpga_regs[0x08/4]=0x0000ffff; // Low 16 bits is trackball m_prev_reg = 0; + + m_serial_idx = 0; + m_serial_data = false; + m_serial_reg1c[0] = 0x2c; + m_serial_reg1d[0] = 0x2c; } void iteagle_fpga_device::update_sequence(UINT32 data) { UINT32 offset = 0x04/4; if (data & 0x80) { - m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | (m_version>>(8*(data&3))); + m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((m_version>>(8*(data&3)))&0xff); } else { UINT32 val1, feed; feed = ((m_seq<<4) ^ m_seq)>>7; @@ -93,29 +94,65 @@ void iteagle_fpga_device::update_sequence(UINT32 data) } } +//------------------------------------------------- +// device_timer - called when our device timer expires +//------------------------------------------------- +void iteagle_fpga_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr) +{ + if (m_fpga_regs[0x4/4]&0x01000000) { + //m_fpga_regs[0x04/4] |= 0x02080000; + m_fpga_regs[0x04/4] |= 0x00000000; + //m_cpu->set_input_line(m_irq_num, ASSERT_LINE); + if (LOG_FPGA) + logerror("%s:fpga device_timer Setting interrupt(%i)\n", machine().describe_context(), m_irq_num); + } + +} + READ32_MEMBER( iteagle_fpga_device::fpga_r ) { UINT32 result = m_fpga_regs[offset]; + switch (offset) { case 0x00/4: result = ((machine().root_device().ioport("SYSTEM")->read()&0xffff)<<16) | (machine().root_device().ioport("IN1")->read()&0xffff); - if (1 && LOG_FPGA) + if (LOG_FPGA && m_prev_reg!=offset) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; case 0x04/4: - result = (result & 0xFF0FFFFF) | ((machine().root_device().ioport("SW5")->read()&0xf)<<20); - //if (1 && ACCESSING_BITS_0_7) - if (1 && LOG_FPGA) + result = (result & 0xFF0FFFFF) | ((machine().root_device().ioport("SW5")->read()&0xf)<<20); + if (LOG_FPGA && !ACCESSING_BITS_0_7) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; case 0x08/4: - result = (result & 0xffff0000) | ((machine().root_device().ioport("TRACKY1")->read()&0xff)<<8) | (machine().root_device().ioport("TRACKX1")->read()&0xff); - if (1 && LOG_FPGA && m_prev_reg != offset) + //result = ((machine().root_device().ioport("GUNY1")->read()&0xff)<<8) | ((machine().root_device().ioport("GUNX1")->read()&0xff)<<0); + result = ((machine().root_device().ioport("TRACKY1")->read()&0xff)<<8) | (machine().root_device().ioport("TRACKX1")->read()&0xff); + if (LOG_FPGA && m_prev_reg!=offset) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; +// case 0x0c/4: // 1d = modem byte +// result = (result & 0xFFFF0000) | 0x2c2c; +// if (LOG_FPGA) +// logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); +// break; + case 0x14/4: // Interrupt & 0x4==0x00080000 + result = 0x00000000; + if (LOG_FPGA) + logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); + break; + case 0x18/4: // Interrupt & 0x4==0x02000000 + result = 0x00000000; + if (LOG_FPGA) + logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); + break; + case 0x0c/4: // 1d = modem byte case 0x1c/4: // 1d = modem byte - result = (result & 0xFFFFFF00) | 0x04; + result = (result & 0xFFFF0000) | ((m_serial_reg1d[m_serial_idx]&0xff)<<8) | (m_serial_reg1c[m_serial_idx]&0xff); + if (ACCESSING_BITS_0_15) { + m_serial_data = false; + m_serial_idx = 0; + } if (LOG_FPGA) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; @@ -124,7 +161,8 @@ READ32_MEMBER( iteagle_fpga_device::fpga_r ) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; } - m_prev_reg = offset; + if (offset!=0x4/4) + m_prev_reg = offset; return result; } @@ -136,13 +174,55 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if (ACCESSING_BITS_0_7) { // ATMEL Chip access. Returns version id's when bit 7 is set. update_sequence(data & 0xff); - if (1 && LOG_FPGA) + if (0 && LOG_FPGA) logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); + } + // Interrupt clear/enable + if (ACCESSING_BITS_24_31 && (data & 0x01000000)) { + m_cpu->set_input_line(m_irq_num, CLEAR_LINE); + if (LOG_FPGA) + logerror("%s:fpga_w offset %04X = %08X & %08X Clearing interrupt(%i)\n", machine().describe_context(), offset*4, data, mem_mask, m_irq_num); } else { if (LOG_FPGA) logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); } break; + case 0x14/4: + if (ACCESSING_BITS_0_7 && (data&0x1)) { + m_fpga_regs[0x04/4] &= ~0x00080000; + } + if (LOG_FPGA) + logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); + break; + case 0x18/4: + if (ACCESSING_BITS_0_7 && (data&0x1)) { + m_fpga_regs[0x04/4] &= ~0x02000000; + } + if (LOG_FPGA) + logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); + break; + case 0x0c/4: + case 0x1c/4: + if (ACCESSING_BITS_0_7) { + if (!m_serial_data) { + m_serial_idx = data&0xf; + } else { + m_serial_reg1c[m_serial_idx] = data&0xff; + m_serial_idx = 0; + } + m_serial_data = !m_serial_data; + } + if (ACCESSING_BITS_8_15) { + if (!m_serial_data) { + m_serial_idx = (data&0x0f00)>>8; + } else { + m_serial_reg1d[m_serial_idx] = (data&0xff00)>>8; + } + m_serial_data = !m_serial_data; + } + if (LOG_FPGA) + logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); + break; default: if (LOG_FPGA) logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); @@ -249,8 +329,8 @@ ADDRESS_MAP_END // 0x7f = checksum static const UINT16 iteagle_default_eeprom[0x40] = { - 0x0000,0x0000,0x0000,0x0003,0x1209,0x1111,0x2222,0x1234, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001, + 0xd000,0x0022,0x0000,0x0003,0x1209,0x1111,0x2222,0x1234, + 0x0000,0x0000,0x0000,0x0000,0xcd00,0x0000,0x0000,0x0001, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -369,10 +449,10 @@ ADDRESS_MAP_END static MACHINE_CONFIG_FRAGMENT( iteagle_ide ) - MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, NULL, "cdrom", true) + MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(iteagle_ide_device, ide_interrupt)) MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE(":maincpu", AS_PROGRAM) - MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide2", ata_devices, "hdd", NULL, true) + MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide2", ata_devices, NULL, "cdrom", true) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(iteagle_ide_device, ide2_interrupt)) MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE(":maincpu", AS_PROGRAM) MACHINE_CONFIG_END @@ -405,21 +485,20 @@ void iteagle_ide_device::device_start() bank_infos[0].adr = 0x000; add_map(0x8, M_IO, FUNC(iteagle_ide_device::ide_map)); - bank_infos[1].adr = 0x170; + bank_infos[1].adr = 0x1f0; add_map(0x4, M_IO, FUNC(iteagle_ide_device::ide_ctrl_map)); - bank_infos[2].adr = 0x374; + bank_infos[2].adr = 0x3f4; add_map(0x8, M_IO, FUNC(iteagle_ide_device::ide2_map)); - bank_infos[3].adr = 0x1f0; + bank_infos[3].adr = 0x170; add_map(0x4, M_IO, FUNC(iteagle_ide_device::ide2_ctrl_map)); - bank_infos[4].adr = 0x3f4; + bank_infos[4].adr = 0x374; } void iteagle_ide_device::device_reset() { pci_device::device_reset(); memset(m_ctrl_regs, 0, sizeof(m_ctrl_regs)); - // 0x23 & 0x20 = IDE LED - m_ctrl_regs[0x10/4] = 0x00000000; // 0x6=No SIMM, 0x2, 0x0 = SIMM + m_ctrl_regs[0x10/4] = 0x00000000; // 0x6=No SIMM, 0x2, 0x1, 0x0 = SIMM . Top 16 bits are compared to 0x3. } READ32_MEMBER( iteagle_ide_device::ctrl_r ) @@ -427,11 +506,11 @@ READ32_MEMBER( iteagle_ide_device::ctrl_r ) UINT32 result = m_ctrl_regs[offset]; switch (offset) { case 0x0/4: - if (LOG_IDE_CTRL) + if (LOG_IDE_REG) logerror("%s:fpga ctrl_r from offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; default: - if (LOG_IDE_CTRL) + if (LOG_IDE_REG) logerror("%s:fpga ctrl_r from offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; } @@ -442,22 +521,22 @@ WRITE32_MEMBER( iteagle_ide_device::ctrl_w ) { COMBINE_DATA(&m_ctrl_regs[offset]); switch (offset) { - case 0x20/4: // IDE LED and ?? + case 0x20/4: // IDE LED if (ACCESSING_BITS_16_23) { - // Probably watchdog - if (1 && LOG_IDE_CTRL) + // Sets register index + if (LOG_IDE_REG) logerror("%s:fpga ctrl_w to offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); } else if (ACCESSING_BITS_24_31) { // Bit 25 is IDE LED - if (1 && LOG_IDE_CTRL) + if (1 && LOG_IDE_REG) logerror("%s:fpga ctrl_w to offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); } else { - if (LOG_IDE_CTRL) + if (LOG_IDE_REG) logerror("%s:fpga ctrl_w to offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); } break; default: - if (LOG_IDE_CTRL) + if (LOG_IDE_REG) logerror("%s:fpga ctrl_w to offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); break; } @@ -467,8 +546,7 @@ READ32_MEMBER( iteagle_ide_device::ide_r ) { UINT32 result = m_ide->read_cs0(space, offset, mem_mask); if (offset==0x4/4 && ACCESSING_BITS_24_31) { - //result = 0; - if ((m_irq_num!=-1) && m_ctrl_regs[0x20/4]&0x80000000) { + if (m_irq_num!=-1) { m_cpu->set_input_line(m_irq_num, CLEAR_LINE); if (LOG_IDE) logerror("%s:ide_interrupt Clearing interrupt\n", machine().describe_context()); @@ -499,8 +577,7 @@ WRITE32_MEMBER( iteagle_ide_device::ide_ctrl_w ) } WRITE_LINE_MEMBER(iteagle_ide_device::ide_interrupt) { - //cpu_device *m_cpu = machine().device<cpu_device>(":maincpu"); - if ((m_irq_num!=-1) && m_ctrl_regs[0x20/4]&0x80000000) { + if (m_irq_num!=-1) { m_cpu->set_input_line(m_irq_num, ASSERT_LINE); if (LOG_IDE_CTRL) logerror("%s:ide_interrupt Setting interrupt\n", machine().describe_context()); @@ -511,7 +588,7 @@ READ32_MEMBER( iteagle_ide_device::ide2_r ) { UINT32 result = m_ide2->read_cs0(space, offset, mem_mask); if (offset==0x4/4 && ACCESSING_BITS_24_31) { - if ((m_irq_num!=-1) && m_ctrl_regs[0x20/4]&0x40000000) { + if (m_irq_num!=-1) { m_cpu->set_input_line(m_irq_num, CLEAR_LINE); if (LOG_IDE_CTRL) logerror("%s:ide2_interrupt Clearing interrupt\n", machine().describe_context()); @@ -542,7 +619,7 @@ WRITE32_MEMBER( iteagle_ide_device::ide2_ctrl_w ) } WRITE_LINE_MEMBER(iteagle_ide_device::ide2_interrupt) { - if ((m_irq_num!=-1) &&m_ctrl_regs[0x20/4]&0x40000000) { + if (m_irq_num!=-1) { m_cpu->set_input_line(m_irq_num, ASSERT_LINE); if (LOG_IDE_CTRL) logerror("%s:ide2_interrupt Setting interrupt\n", machine().describe_context()); diff --git a/src/mame/machine/iteagle_fpga.h b/src/mame/machine/iteagle_fpga.h index 00e6bd5e68e..959af8dd0bf 100644 --- a/src/mame/machine/iteagle_fpga.h +++ b/src/mame/machine/iteagle_fpga.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Ted Green //************************************* // iteagle fpga device @@ -10,20 +10,22 @@ #include "machine/idectrl.h" #include "machine/eepromser.h" -#define MCFG_ITEAGLE_FPGA_ADD(_tag) \ - MCFG_PCI_DEVICE_ADD(_tag, ITEAGLE_FPGA, 0x55CC33AA, 0xAA, 0xAAAAAA, 0x00) +#define MCFG_ITEAGLE_FPGA_ADD(_tag, _cpu_tag, _irq_num) \ + MCFG_PCI_DEVICE_ADD(_tag, ITEAGLE_FPGA, 0x55CC33AA, 0xAA, 0xAAAAAA, 0x00) \ + downcast<iteagle_fpga_device *>(device)->set_irq_info(_cpu_tag, _irq_num); #define MCFG_ITEAGLE_FPGA_INIT(_version, _seq_init) \ downcast<iteagle_fpga_device *>(device)->set_init_info(_version, _seq_init); #define MCFG_ITEAGLE_EEPROM_ADD(_tag) \ - MCFG_PCI_DEVICE_ADD(_tag, ITEAGLE_EEPROM, 0xAABBCCDD, 0x00, 0x088000, 0x00) + MCFG_PCI_DEVICE_ADD(_tag, ITEAGLE_EEPROM, 0x80861229, 0x00, 0x088000, 0x00) #define MCFG_ITEAGLE_EEPROM_INIT(_sw_version, _hw_version) \ downcast<iteagle_eeprom_device *>(device)->set_info(_sw_version, _hw_version); +// Mimic Cypress CY82C693 Peripheral Controller #define MCFG_ITEAGLE_IDE_ADD(_tag) \ - MCFG_PCI_DEVICE_ADD(_tag, ITEAGLE_IDE, 0x11223344, 0x00, 0x010100, 0x00) + MCFG_PCI_DEVICE_ADD(_tag, ITEAGLE_IDE, 0x1080C693, 0x00, 0x060100, 0x00) #define MCFG_ITEAGLE_IDE_IRQ_ADD(_cpu_tag, _irq_num) \ downcast<iteagle_ide_device *>(device)->set_irq_info(_cpu_tag, _irq_num); @@ -34,10 +36,13 @@ class iteagle_fpga_device : public pci_device, public: iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); void set_init_info(int version, int seq_init) {m_version=version; m_seq_init=seq_init;} + void set_irq_info(const char *tag, const int irq_num) {m_cpu_tag = tag; m_irq_num = irq_num;} + protected: virtual void device_start(); virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); // device_nvram_interface overrides virtual void nvram_default(); @@ -45,11 +50,20 @@ protected: virtual void nvram_write(emu_file &file); private: - + emu_timer * m_timer; + const char *m_cpu_tag; + cpu_device *m_cpu; + int m_irq_num; + UINT32 m_fpga_regs[0x20]; UINT32 m_rtc_regs[0x200]; UINT32 m_prev_reg; + UINT8 m_serial_idx; + bool m_serial_data; + UINT8 m_serial_reg1c[0x10]; + UINT8 m_serial_reg1d[0x10]; + UINT32 m_version; UINT32 m_seq_init; UINT32 m_seq; @@ -81,7 +95,7 @@ protected: private: UINT16 m_sw_version; UINT8 m_hw_version; - + DECLARE_ADDRESS_MAP(eeprom_map, 32); DECLARE_READ32_MEMBER( eeprom_r ); DECLARE_WRITE32_MEMBER( eeprom_w ); diff --git a/src/mame/machine/jalcrpt.c b/src/mame/machine/jalcrpt.c index 09193e1aa0b..e8e35f33c20 100644 --- a/src/mame/machine/jalcrpt.c +++ b/src/mame/machine/jalcrpt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood #include "emu.h" #include "machine/jalcrpt.h" diff --git a/src/mame/machine/jalcrpt.h b/src/mame/machine/jalcrpt.h index 09ce7fde62e..e02d8bbe117 100644 --- a/src/mame/machine/jalcrpt.h +++ b/src/mame/machine/jalcrpt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood void astyanax_rom_decode(running_machine &machine, const char *region); void phantasm_rom_decode(running_machine &machine, const char *region); void rodland_rom_decode (running_machine &machine, const char *region); diff --git a/src/mame/machine/jumpshot.c b/src/mame/machine/jumpshot.c index a6be5f1b9b2..5df077f55b6 100644 --- a/src/mame/machine/jumpshot.c +++ b/src/mame/machine/jumpshot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/pacman.h" diff --git a/src/mame/machine/jvs13551.c b/src/mame/machine/jvs13551.c index 508045f7d8d..69e0f62c655 100644 --- a/src/mame/machine/jvs13551.c +++ b/src/mame/machine/jvs13551.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "jvs13551.h" const device_type SEGA_837_13551 = &device_creator<sega_837_13551>; diff --git a/src/mame/machine/jvs13551.h b/src/mame/machine/jvs13551.h index e11bdc1de22..69c79fee4e9 100644 --- a/src/mame/machine/jvs13551.h +++ b/src/mame/machine/jvs13551.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef __JVS13551_H__ #define __JVS13551_H__ diff --git a/src/mame/machine/k573dio.c b/src/mame/machine/k573dio.c index 505caae0320..69632cf51bd 100644 --- a/src/mame/machine/k573dio.c +++ b/src/mame/machine/k573dio.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf #include "emu.h" #include "k573dio.h" diff --git a/src/mame/machine/k573dio.h b/src/mame/machine/k573dio.h index 41f13eb3d07..9a5f97c4cf8 100644 --- a/src/mame/machine/k573dio.h +++ b/src/mame/machine/k573dio.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf #pragma once #ifndef _K573DIO_H_ diff --git a/src/mame/machine/kabuki.c b/src/mame/machine/kabuki.c index f644ffe3fca..038c1f5f422 100644 --- a/src/mame/machine/kabuki.c +++ b/src/mame/machine/kabuki.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** "Kabuki" Z80 encryption diff --git a/src/mame/machine/kabuki.h b/src/mame/machine/kabuki.h index 3bb715abfd6..e5e1b9bfc76 100644 --- a/src/mame/machine/kabuki.h +++ b/src/mame/machine/kabuki.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" void mgakuen2_decode(running_machine &machine); diff --git a/src/mame/machine/kaneko_calc3.c b/src/mame/machine/kaneko_calc3.c index aacc95f7b41..e5e7a128561 100644 --- a/src/mame/machine/kaneko_calc3.c +++ b/src/mame/machine/kaneko_calc3.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /*************************************************************************** KANEKO CALC3 MCU simulation ( KANEKO CALC3 508 (74 PIN PQFP) ) diff --git a/src/mame/machine/kaneko_calc3.h b/src/mame/machine/kaneko_calc3.h index b158de04c96..93f4f63cac7 100644 --- a/src/mame/machine/kaneko_calc3.h +++ b/src/mame/machine/kaneko_calc3.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* CALC 3 */ #define VERBOSE_OUTPUT 0 diff --git a/src/mame/machine/kaneko_hit.c b/src/mame/machine/kaneko_hit.c index 776e4aa0c2c..626b03bde29 100644 --- a/src/mame/machine/kaneko_hit.c +++ b/src/mame/machine/kaneko_hit.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* Kaneko 'Calc' hitbox collision / protection It is thought that this is done by the 'CALC1' 'TOYBOX' and 'CALC3' protection chips found on the various boards diff --git a/src/mame/machine/kaneko_hit.h b/src/mame/machine/kaneko_hit.h index 48e4fabc89e..d2dc7b0fd04 100644 --- a/src/mame/machine/kaneko_hit.h +++ b/src/mame/machine/kaneko_hit.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* Kaneko Hit protection */ diff --git a/src/mame/machine/kaneko_toybox.c b/src/mame/machine/kaneko_toybox.c index 7d779969abb..cf0ba52dec1 100644 --- a/src/mame/machine/kaneko_toybox.c +++ b/src/mame/machine/kaneko_toybox.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Haywood, Luca Elia, Sebastien Volpe /* Kaneko 'Toybox' protection the following chips have been seen diff --git a/src/mame/machine/kaneko_toybox.h b/src/mame/machine/kaneko_toybox.h index 6378094a2e7..351d0872aca 100644 --- a/src/mame/machine/kaneko_toybox.h +++ b/src/mame/machine/kaneko_toybox.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Haywood, Luca Elia, Sebastien Volpe /* Kaneko Toybox */ diff --git a/src/mame/machine/konami1.c b/src/mame/machine/konami1.c index b9c2e6a6841..bdd17b7ed35 100644 --- a/src/mame/machine/konami1.c +++ b/src/mame/machine/konami1.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Nicola Salmoria, Chris Hardy /*************************************************************************** The Konami_1 CPU is a 6809 with opcodes scrambled. Here is how to diff --git a/src/mame/machine/konami1.h b/src/mame/machine/konami1.h index 56c18552694..e66bbd33442 100644 --- a/src/mame/machine/konami1.h +++ b/src/mame/machine/konami1.h @@ -1,3 +1,3 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Nicola Salmoria, Chris Hardy UINT8 *konami1_decode(running_machine &machine, const char *cpu); diff --git a/src/mame/machine/konamigx.c b/src/mame/machine/konamigx.c index 13a29587105..9515e5aa3cb 100644 --- a/src/mame/machine/konamigx.c +++ b/src/mame/machine/konamigx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Acho A. Tang, Phil Stroffolino, Olivier Galibert /************************************************************************** * diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c index eefa4785be2..76908e28411 100644 --- a/src/mame/machine/konppc.c +++ b/src/mame/machine/konppc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ville Linde /* Konami PowerPC-based 3D games common functions */ #include "emu.h" diff --git a/src/mame/machine/konppc.h b/src/mame/machine/konppc.h index acf408d3efc..b84d63d421c 100644 --- a/src/mame/machine/konppc.h +++ b/src/mame/machine/konppc.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ville Linde #ifndef _KONPPC_H #define _KONPPC_H diff --git a/src/mame/machine/maple-dc.c b/src/mame/machine/maple-dc.c index 76800bd193c..f866243f799 100644 --- a/src/mame/machine/maple-dc.c +++ b/src/mame/machine/maple-dc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "maple-dc.h" diff --git a/src/mame/machine/maple-dc.h b/src/mame/machine/maple-dc.h index ca431a255ca..2170282d0ef 100644 --- a/src/mame/machine/maple-dc.h +++ b/src/mame/machine/maple-dc.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef __MAPLE_DC_H__ #define __MAPLE_DC_H__ diff --git a/src/mame/machine/mapledev.c b/src/mame/machine/mapledev.c index ac1e9d7fe83..85906c33064 100644 --- a/src/mame/machine/mapledev.c +++ b/src/mame/machine/mapledev.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "mapledev.h" #include "maple-dc.h" diff --git a/src/mame/machine/mapledev.h b/src/mame/machine/mapledev.h index 4543870bda8..466945b9ed0 100644 --- a/src/mame/machine/mapledev.h +++ b/src/mame/machine/mapledev.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _MAPLEDEV_H_ #define _MAPLEDEV_H_ diff --git a/src/mame/machine/mathbox.c b/src/mame/machine/mathbox.c index 3841f48e95a..5a7ae2f2b17 100644 --- a/src/mame/machine/mathbox.c +++ b/src/mame/machine/mathbox.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Eric Smith /* * mathbox.c: math box simulation (Battlezone/Red Baron/Tempest) * diff --git a/src/mame/machine/mathbox.h b/src/mame/machine/mathbox.h index 6e869dd7ba4..5ff280477b2 100644 --- a/src/mame/machine/mathbox.h +++ b/src/mame/machine/mathbox.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Eric Smith /* * mathbox.h: math box simulation (Battlezone/Red Baron/Tempest) * diff --git a/src/mame/machine/mc8123.c b/src/mame/machine/mc8123.c index d0f6be28a3c..a82c841347d 100644 --- a/src/mame/machine/mc8123.c +++ b/src/mame/machine/mc8123.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, David Widel /*************************************************************************** NEC MC-8123 encryption emulation diff --git a/src/mame/machine/mc8123.h b/src/mame/machine/mc8123.h index 7ee3d6879b2..02caa2cbe0f 100644 --- a/src/mame/machine/mc8123.h +++ b/src/mame/machine/mc8123.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, David Widel /*************************************************************************** NEC MC-8123 encryption emulation diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c index aa76356083e..03417e178e9 100644 --- a/src/mame/machine/megadriv.c +++ b/src/mame/machine/megadriv.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Megadrive / Genesis support @@ -1031,11 +1031,15 @@ WRITE8_MEMBER(md_base_state::megadriv_tas_callback) void md_base_state::megadriv_init_common() { /* Look to see if this system has the standard Sound Z80 */ - if (machine().device("genesis_snd_z80")) + if (m_z80snd) { //printf("GENESIS Sound Z80 cpu found '%s'\n", machine().device("genesis_snd_z80")->tag()); m_genz80.z80_prgram = auto_alloc_array(machine(), UINT8, 0x2000); membank("bank1")->set_base(m_genz80.z80_prgram); + save_item(NAME(m_genz80.z80_is_reset)); + save_item(NAME(m_genz80.z80_has_bus)); + save_item(NAME(m_genz80.z80_bank_addr)); + save_pointer(NAME(m_genz80.z80_prgram), 0x2000); } m_maincpu->set_tas_write_callback(write8_delegate(FUNC(md_base_state::megadriv_tas_callback),this)); diff --git a/src/mame/machine/meters.c b/src/mame/machine/meters.c index f8b1c679e17..db27b99ba7f 100644 --- a/src/mame/machine/meters.c +++ b/src/mame/machine/meters.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:James Wallace /////////////////////////////////////////////////////////////////////////// // // // Electro mechanical meters // diff --git a/src/mame/machine/meters.h b/src/mame/machine/meters.h index a67f13ecdcb..fa8e3e4be5d 100644 --- a/src/mame/machine/meters.h +++ b/src/mame/machine/meters.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:James Wallace /////////////////////////////////////////////////////////////////////////// // // // Electro mechanical meters // diff --git a/src/mame/machine/micro3d.c b/src/mame/machine/micro3d.c index d4c867a836a..9d825ff427d 100644 --- a/src/mame/machine/micro3d.c +++ b/src/mame/machine/micro3d.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Microprose Games machine hardware diff --git a/src/mame/machine/midikbd.c b/src/mame/machine/midikbd.c index 706f8e36427..a45e6179a3d 100644 --- a/src/mame/machine/midikbd.c +++ b/src/mame/machine/midikbd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Carl #include "machine/midikbd.h" const device_type MIDI_KBD = &device_creator<midi_keyboard_device>; diff --git a/src/mame/machine/midikbd.h b/src/mame/machine/midikbd.h index 2c37f2ae78b..229709f392e 100644 --- a/src/mame/machine/midikbd.h +++ b/src/mame/machine/midikbd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Carl #ifndef MIDIKBD_H_ #define MIDIKBD_H_ diff --git a/src/mame/machine/mie.c b/src/mame/machine/mie.c index 2b738e356e4..86752832f7b 100644 --- a/src/mame/machine/mie.c +++ b/src/mame/machine/mie.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "mie.h" diff --git a/src/mame/machine/mie.h b/src/mame/machine/mie.h index a0b6ceff894..a011d463592 100644 --- a/src/mame/machine/mie.h +++ b/src/mame/machine/mie.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef __MIE_H__ #define __MIE_H__ diff --git a/src/mame/machine/model1.c b/src/mame/machine/model1.c index 63fdfddd3a6..2b7460b2a8b 100644 --- a/src/mame/machine/model1.c +++ b/src/mame/machine/model1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* ** Model 1 coprocessor TGP simulation */ @@ -42,7 +42,7 @@ void model1_state::fifoout_push_f(float data) { m_puuu = 1; - logerror("TGP: Push %f\n", data); + logerror("TGP: Push %f\n", (double) data); fifoout_push(f2u(data)); } @@ -279,7 +279,7 @@ TGP_FUNCTION( model1_state::normalize ) float a = fifoin_pop_f(); float b = fifoin_pop_f(); float c = fifoin_pop_f(); - float n = (a*a+b*b+c*c) / sqrt(a*a+b*b+c*c); + float n = (a*a+b*b+c*c) / sqrtf(a*a+b*b+c*c); logerror("TGP normalize %f, %f, %f (%x)\n", a, b, c, m_pushpc); fifoout_push_f(a/n); fifoout_push_f(b/n); @@ -568,7 +568,7 @@ TGP_FUNCTION( model1_state::distance3 ) a -= d; b -= e; c -= f; - fifoout_push_f((a*a+b*b+c*c)/sqrt(a*a+b*b+c*c)); + fifoout_push_f((a*a+b*b+c*c)/sqrtf(a*a+b*b+c*c)); next_fn(); } @@ -667,7 +667,7 @@ TGP_FUNCTION( model1_state::xyz2rqf ) (void)b; (void)c; logerror("TGP xyz2rqf %f, %f, %f (%x)\n", a, b, c, m_pushpc); - fifoout_push_f((a*a+b*b+c*c)/sqrt(a*a+b*b+c*c)); + fifoout_push_f((a*a+b*b+c*c)/sqrtf(a*a+b*b+c*c)); norm = sqrt(a*a+c*c); if(!c) { if(a>=0) @@ -1109,7 +1109,7 @@ TGP_FUNCTION( model1_state::col_testpt ) logerror("TGP col_testpt %f, %f (%x)\n", a, b, m_pushpc); x = a - m_tgp_vr_circx; y = b - m_tgp_vr_circy; - fifoout_push_f(((x*x+y*y)/sqrt(x*x+y*y)) - m_tgp_vr_circrad); + fifoout_push_f(((x*x+y*y)/sqrtf(x*x+y*y)) - m_tgp_vr_circrad); next_fn(); } @@ -1150,10 +1150,10 @@ TGP_FUNCTION( model1_state::catmull_rom ) m2 = m*m; m3 = m*m*m; - w1 = 0.5*(-m3+2*m2-m); - w2 = 0.5*(3*m3-5*m2+2); - w3 = 0.5*(-3*m3+4*m2+m); - w4 = 0.5*(m3-m2); + w1 = 0.5f*(-m3+2*m2-m); + w2 = 0.5f*(3*m3-5*m2+2); + w3 = 0.5f*(-3*m3+4*m2+m); + w4 = 0.5f*(m3-m2); fifoout_push_f(a*w1+d*w2+g*w3+j*w4); fifoout_push_f(b*w1+e*w2+h*w3+k*w4); @@ -1170,7 +1170,7 @@ TGP_FUNCTION( model1_state::distance ) logerror("TGP distance (%f, %f), (%f, %f) (%x)\n", a, b, c, d, m_pushpc); c -= a; d -= b; - fifoout_push_f((c*c+d*d)/sqrt(c*c+d*d)); + fifoout_push_f((c*c+d*d)/sqrtf(c*c+d*d)); next_fn(); } @@ -1215,7 +1215,7 @@ TGP_FUNCTION( model1_state::cpa ) dv_y = (f-e) - (h-g); dv_z = (j-i) - (l-k); dv2 = dv_x*dv_x + dv_y*dv_y + dv_z*dv_z; - if(dv2 < 0.001) + if(dv2 < 0.001f) dt = 0; else { dw_x = a-c; @@ -1225,8 +1225,8 @@ TGP_FUNCTION( model1_state::cpa ) } if(dt < 0) dt = 0; - else if(dt > 1.0) - dt = 1.0; + else if(dt > 1.0f) + dt = 1.0f; dv_x = (a-c)*(1-dt) + (b-d)*dt; dv_y = (e-g)*(1-dt) + (f-h)*dt; diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index 28a5cd0a6d4..8f1a1783f53 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /* machine/n64.c - contains N64 hardware emulation shared between MAME and MESS */ #include "emu.h" @@ -662,21 +662,21 @@ READ32_MEMBER(n64_periphs::sp_reg_r) case 0x20/4: // DP_CMD_START { n64_state *state = machine().driver_data<n64_state>(); - ret = state->m_rdp->GetStartReg(); + ret = state->m_rdp->get_start(); break; } case 0x24/4: // DP_CMD_END { n64_state *state = machine().driver_data<n64_state>(); - ret = state->m_rdp->GetEndReg(); + ret = state->m_rdp->get_end(); break; } case 0x28/4: // DP_CMD_CURRENT { n64_state *state = machine().driver_data<n64_state>(); - ret = state->m_rdp->GetCurrentReg(); + ret = state->m_rdp->get_current(); break; } @@ -688,13 +688,13 @@ READ32_MEMBER(n64_periphs::sp_reg_r) case 0x2c/4: // DP_CMD_STATUS { n64_state *state = machine().driver_data<n64_state>(); - ret = state->m_rdp->GetStatusReg(); + ret = state->m_rdp->get_status(); break; } case 0x30/4: // DP_CMD_CLOCK { - if(!(machine().driver_data<n64_state>()->m_rdp->GetStatusReg() & DP_STATUS_FREEZE)) + if(!(machine().driver_data<n64_state>()->m_rdp->get_status() & DP_STATUS_FREEZE)) { dp_clock += 13; ret = dp_clock; @@ -908,24 +908,24 @@ READ32_MEMBER( n64_periphs::dp_reg_r ) switch (offset) { case 0x00/4: // DP_START_REG - ret = state->m_rdp->GetStartReg(); + ret = state->m_rdp->get_start(); break; case 0x04/4: // DP_END_REG - ret = state->m_rdp->GetEndReg(); + ret = state->m_rdp->get_end(); break; case 0x08/4: // DP_CURRENT_REG - ret = state->m_rdp->GetCurrentReg(); + ret = state->m_rdp->get_current(); break; case 0x0c/4: // DP_STATUS_REG - ret = state->m_rdp->GetStatusReg(); + ret = state->m_rdp->get_status(); break; case 0x10/4: // DP_CLOCK_REG { - if(!(state->m_rdp->GetStatusReg() & DP_STATUS_FREEZE)) + if(!(state->m_rdp->get_status() & DP_STATUS_FREEZE)) { dp_clock += 13; ret = dp_clock; @@ -948,20 +948,20 @@ WRITE32_MEMBER( n64_periphs::dp_reg_w ) switch (offset) { case 0x00/4: // DP_START_REG - state->m_rdp->SetStartReg(data); - state->m_rdp->SetCurrentReg(state->m_rdp->GetStartReg()); + state->m_rdp->set_start(data); + state->m_rdp->set_current(state->m_rdp->get_start()); break; case 0x04/4: // DP_END_REG - state->m_rdp->SetEndReg(data); + state->m_rdp->set_end(data); g_profiler.start(PROFILER_USER1); - state->m_rdp->ProcessList(); + state->m_rdp->process_command_list(); g_profiler.stop(); break; case 0x0c/4: // DP_STATUS_REG { - UINT32 current_status = state->m_rdp->GetStatusReg(); + UINT32 current_status = state->m_rdp->get_status(); if (data & 0x00000001) current_status &= ~DP_STATUS_XBUS_DMA; if (data & 0x00000002) current_status |= DP_STATUS_XBUS_DMA; if (data & 0x00000004) current_status &= ~DP_STATUS_FREEZE; @@ -969,7 +969,7 @@ WRITE32_MEMBER( n64_periphs::dp_reg_w ) if (data & 0x00000010) current_status &= ~DP_STATUS_FLUSH; if (data & 0x00000020) current_status |= DP_STATUS_FLUSH; if (data & 0x00000200) dp_clock = 0; - state->m_rdp->SetStatusReg(current_status); + state->m_rdp->set_status(current_status); break; } @@ -1025,7 +1025,7 @@ void n64_periphs::vi_recalculate_resolution() if (height > 480) height = 480; - state->m_rdp->MiscState.FBHeight = height; + state->m_rdp->m_misc_state.m_fb_height = height; visarea.max_x = width - 1; visarea.max_y = height - 1; @@ -1122,7 +1122,7 @@ WRITE32_MEMBER( n64_periphs::vi_reg_w ) vi_recalculate_resolution(); } vi_width = data; - state->m_rdp->MiscState.FBWidth = data; + state->m_rdp->m_misc_state.m_fb_width = data; break; case 0x0c/4: // VI_INTR_REG diff --git a/src/mame/machine/namco62.c b/src/mame/machine/namco62.c index bdd215c0946..241e04e9f33 100644 --- a/src/mame/machine/namco62.c +++ b/src/mame/machine/namco62.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Phil Bennett, Andrew Gardner /*************************************************************************** Namco 62XX diff --git a/src/mame/machine/namco62.h b/src/mame/machine/namco62.h index c54f3187a4e..50814b9f8a0 100644 --- a/src/mame/machine/namco62.h +++ b/src/mame/machine/namco62.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Phil Bennett, Andrew Gardner #ifndef NAMCO62_H #define NAMCO62_H diff --git a/src/mame/machine/namco_settings.c b/src/mame/machine/namco_settings.c index 54d380f20fb..ba028892786 100644 --- a/src/mame/machine/namco_settings.c +++ b/src/mame/machine/namco_settings.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "namco_settings.h" diff --git a/src/mame/machine/namcoio.c b/src/mame/machine/namcoio.c index 44020e35ca6..e8e074f8e9b 100644 --- a/src/mame/machine/namcoio.c +++ b/src/mame/machine/namcoio.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** The following Namco custom chips are all instances of the same 4-bit MCU, diff --git a/src/mame/machine/namcoio.h b/src/mame/machine/namcoio.h index d1b35f6049d..f8f7d9d6f15 100644 --- a/src/mame/machine/namcoio.h +++ b/src/mame/machine/namcoio.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __NAMCOIO_H__ #define __NAMCOIO_H__ diff --git a/src/mame/machine/namcomcu.c b/src/mame/machine/namcomcu.c index 94eb5b12f7a..82495680f51 100644 --- a/src/mame/machine/namcomcu.c +++ b/src/mame/machine/namcomcu.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Alex W. Jackson /* Mitsubishi M37702 MCUs with Namco custom labels. diff --git a/src/mame/machine/namcomcu.h b/src/mame/machine/namcomcu.h index 5906b6c9a19..e9ddd9db08c 100644 --- a/src/mame/machine/namcomcu.h +++ b/src/mame/machine/namcomcu.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Alex W. Jackson #pragma once #ifndef __NAMCOMCU_H__ diff --git a/src/mame/machine/namcond1.c b/src/mame/machine/namcond1.c index d9b308e8fbf..2fdca7a7fd1 100644 --- a/src/mame/machine/namcond1.c +++ b/src/mame/machine/namcond1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall, R. Belmont /*************************************************************************** diff --git a/src/mame/machine/naomibd.h b/src/mame/machine/naomibd.h index c4823e7abf1..61a79270472 100644 --- a/src/mame/machine/naomibd.h +++ b/src/mame/machine/naomibd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIBD_H_ #define _NAOMIBD_H_ diff --git a/src/mame/machine/naomig1.c b/src/mame/machine/naomig1.c index 09908151dca..1a4cea48b13 100644 --- a/src/mame/machine/naomig1.c +++ b/src/mame/machine/naomig1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "machine/naomig1.h" diff --git a/src/mame/machine/naomig1.h b/src/mame/machine/naomig1.h index f5bfd204586..931556fe710 100644 --- a/src/mame/machine/naomig1.h +++ b/src/mame/machine/naomig1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIG1_H_ #define _NAOMIG1_H_ diff --git a/src/mame/machine/naomigd.c b/src/mame/machine/naomigd.c index eefb2704d88..fbe9cd3d32c 100644 --- a/src/mame/machine/naomigd.c +++ b/src/mame/machine/naomigd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "naomigd.h" diff --git a/src/mame/machine/naomigd.h b/src/mame/machine/naomigd.h index ef754b347ac..f2a889ad8bb 100644 --- a/src/mame/machine/naomigd.h +++ b/src/mame/machine/naomigd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIGD_H_ #define _NAOMIGD_H_ diff --git a/src/mame/machine/naomim1.c b/src/mame/machine/naomim1.c index 2d26bc793c3..86f0119f578 100644 --- a/src/mame/machine/naomim1.c +++ b/src/mame/machine/naomim1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "naomim1.h" diff --git a/src/mame/machine/naomim1.h b/src/mame/machine/naomim1.h index 1314e7f0a14..2ca8855d268 100644 --- a/src/mame/machine/naomim1.h +++ b/src/mame/machine/naomim1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIM1_H_ #define _NAOMIM1_H_ diff --git a/src/mame/machine/naomim2.c b/src/mame/machine/naomim2.c index 7d973810dfd..d0f64fb4067 100644 --- a/src/mame/machine/naomim2.c +++ b/src/mame/machine/naomim2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "naomim2.h" diff --git a/src/mame/machine/naomim2.h b/src/mame/machine/naomim2.h index 34a6679c1b7..58ff0a8e47c 100644 --- a/src/mame/machine/naomim2.h +++ b/src/mame/machine/naomim2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIM2_H_ #define _NAOMIM2_H_ diff --git a/src/mame/machine/naomim4.c b/src/mame/machine/naomim4.c index 55011c9bd53..6fa357a8571 100644 --- a/src/mame/machine/naomim4.c +++ b/src/mame/machine/naomim4.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "naomim4.h" diff --git a/src/mame/machine/naomim4.h b/src/mame/machine/naomim4.h index d80ac33b118..c7529c59010 100644 --- a/src/mame/machine/naomim4.h +++ b/src/mame/machine/naomim4.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIM4_H_ #define _NAOMIM4_H_ diff --git a/src/mame/machine/naomirom.c b/src/mame/machine/naomirom.c index 12548623525..5f074d16ec6 100644 --- a/src/mame/machine/naomirom.c +++ b/src/mame/machine/naomirom.c @@ -1,6 +1,5 @@ -// license:??? -// copyright-holders:??? - +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "naomirom.h" diff --git a/src/mame/machine/naomirom.h b/src/mame/machine/naomirom.h index 35fdd3036ee..aeb7ada082e 100644 --- a/src/mame/machine/naomirom.h +++ b/src/mame/machine/naomirom.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef _NAOMIROM_H_ #define _NAOMIROM_H_ diff --git a/src/mame/machine/nb1413m3.c b/src/mame/machine/nb1413m3.c index 21fe93431b1..e574b41f78e 100644 --- a/src/mame/machine/nb1413m3.c +++ b/src/mame/machine/nb1413m3.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Takahiro Nogi /****************************************************************************** Machine Hardware for Nichibutsu Mahjong series. diff --git a/src/mame/machine/neoboot.c b/src/mame/machine/neoboot.c deleted file mode 100644 index a36021df56e..00000000000 --- a/src/mame/machine/neoboot.c +++ /dev/null @@ -1,4 +0,0 @@ -// license:??? -// copyright-holders:??? - -// empty diff --git a/src/mame/machine/neocrypt.c b/src/mame/machine/neocrypt.c index 5c449eca50e..c04c3e40e2e 100644 --- a/src/mame/machine/neocrypt.c +++ b/src/mame/machine/neocrypt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/machine/neoprot.c b/src/mame/machine/neoprot.c deleted file mode 100644 index 02c28af0e8b..00000000000 --- a/src/mame/machine/neoprot.c +++ /dev/null @@ -1,3 +0,0 @@ -// license:??? -// copyright-holders:??? -/// empty diff --git a/src/mame/machine/ng_memcard.c b/src/mame/machine/ng_memcard.c index d9c99576a8a..f4c816c6f1c 100644 --- a/src/mame/machine/ng_memcard.c +++ b/src/mame/machine/ng_memcard.c @@ -1,14 +1,11 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* ng_memcard.c NEOGEO Memory card functions. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #include "emu.h" diff --git a/src/mame/machine/ng_memcard.h b/src/mame/machine/ng_memcard.h index 97222f3d4a1..5ca9dbd3bb3 100644 --- a/src/mame/machine/ng_memcard.h +++ b/src/mame/machine/ng_memcard.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic /********************************************************************* ng_memcard.h diff --git a/src/mame/machine/nmk004.c b/src/mame/machine/nmk004.c index 7179eb9d805..eaeaaf5944f 100644 --- a/src/mame/machine/nmk004.c +++ b/src/mame/machine/nmk004.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood,trap15 /*************************************************************************** diff --git a/src/mame/machine/nmk004.h b/src/mame/machine/nmk004.h index b6ee2a4a12e..c5c80a5429d 100644 --- a/src/mame/machine/nmk004.h +++ b/src/mame/machine/nmk004.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood,trap15 /*************************************************************************** diff --git a/src/mame/machine/pacplus.c b/src/mame/machine/pacplus.c index 889a06c121f..c30ab05f63e 100644 --- a/src/mame/machine/pacplus.c +++ b/src/mame/machine/pacplus.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/pacman.h" diff --git a/src/mame/machine/pcecommn.c b/src/mame/machine/pcecommn.c index 9d2015754a2..f231ddc17ab 100644 --- a/src/mame/machine/pcecommn.c +++ b/src/mame/machine/pcecommn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mariusz Wojcieszek #include "emu.h" #include "machine/pcecommn.h" diff --git a/src/mame/machine/pcecommn.h b/src/mame/machine/pcecommn.h index 433d682cd61..deed15decaa 100644 --- a/src/mame/machine/pcecommn.h +++ b/src/mame/machine/pcecommn.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mariusz Wojcieszek /*************************************************************************** pcecommn.h diff --git a/src/mame/machine/pcshare.c b/src/mame/machine/pcshare.c index 56b750abd14..e6d3451c5c4 100644 --- a/src/mame/machine/pcshare.c +++ b/src/mame/machine/pcshare.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Peter Trauner /*************************************************************************** machine/pcshare.c diff --git a/src/mame/machine/pcshare.h b/src/mame/machine/pcshare.h index 59deb3c3bce..81d423ad1d0 100644 --- a/src/mame/machine/pcshare.h +++ b/src/mame/machine/pcshare.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Peter Trauner #include "machine/am9517a.h" #include "machine/pic8259.h" #include "machine/pit8253.h" @@ -28,7 +28,7 @@ public: required_device<pic8259_device> m_pic8259_1; required_device<pic8259_device> m_pic8259_2; required_device<pit8254_device> m_pit8254; - required_device<mc146818_device> m_mc146818; + optional_device<mc146818_device> m_mc146818; required_device<kbdc8042_device> m_kbdc; DECLARE_READ8_MEMBER(at_dma8237_2_r); diff --git a/src/mame/machine/pgmcrypt.c b/src/mame/machine/pgmcrypt.c index 9f05427c068..a030083f87c 100644 --- a/src/mame/machine/pgmcrypt.c +++ b/src/mame/machine/pgmcrypt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS 027 Encryptions the IGS027 chips are typically used with encrypted ROMs. diff --git a/src/mame/machine/pgmcrypt.h b/src/mame/machine/pgmcrypt.h index 6a273ded839..c656eb79b5d 100644 --- a/src/mame/machine/pgmcrypt.h +++ b/src/mame/machine/pgmcrypt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /* IGS 027 Encryptions */ void pgm_kov_decrypt(running_machine &machine); diff --git a/src/mame/machine/pgmprot_igs025_igs012.c b/src/mame/machine/pgmprot_igs025_igs012.c index f068a86e348..aa5de549047 100644 --- a/src/mame/machine/pgmprot_igs025_igs012.c +++ b/src/mame/machine/pgmprot_igs025_igs012.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /*********************************************************************** PGM 012 + 025 PGM protection emulation diff --git a/src/mame/machine/pgmprot_igs025_igs022.c b/src/mame/machine/pgmprot_igs025_igs022.c index 1f6401923e8..e55d8aad943 100644 --- a/src/mame/machine/pgmprot_igs025_igs022.c +++ b/src/mame/machine/pgmprot_igs025_igs022.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /*********************************************************************** PGM 022 + 025 PGM protection emulation diff --git a/src/mame/machine/pgmprot_igs025_igs028.c b/src/mame/machine/pgmprot_igs025_igs028.c index eba78c76b8f..e1242a7326d 100644 --- a/src/mame/machine/pgmprot_igs025_igs028.c +++ b/src/mame/machine/pgmprot_igs025_igs028.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi /*********************************************************************** IGS28 + IGS025 PGM protection emulation diff --git a/src/mame/machine/pgmprot_igs027a_type1.c b/src/mame/machine/pgmprot_igs027a_type1.c index 14b3747cdd7..1a27910739d 100644 --- a/src/mame/machine/pgmprot_igs027a_type1.c +++ b/src/mame/machine/pgmprot_igs027a_type1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi, Xing Xing /*********************************************************************** PGM IGS027A ARM protection simulations & emulation - type 1 diff --git a/src/mame/machine/pgmprot_igs027a_type2.c b/src/mame/machine/pgmprot_igs027a_type2.c index 24967e3791d..83eb15bd96b 100644 --- a/src/mame/machine/pgmprot_igs027a_type2.c +++ b/src/mame/machine/pgmprot_igs027a_type2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, ElSemi, Xing Xing /*********************************************************************** PGM IGS027A ARM protection emulation - type 2 diff --git a/src/mame/machine/pgmprot_igs027a_type3.c b/src/mame/machine/pgmprot_igs027a_type3.c index fa7a579918d..8faa5fc4432 100644 --- a/src/mame/machine/pgmprot_igs027a_type3.c +++ b/src/mame/machine/pgmprot_igs027a_type3.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Xing Xing /*********************************************************************** PGM IGS027A ARM protection emulation diff --git a/src/mame/machine/pgmprot_orlegend.c b/src/mame/machine/pgmprot_orlegend.c index d1350bbbcda..1e4a0553aa9 100644 --- a/src/mame/machine/pgmprot_orlegend.c +++ b/src/mame/machine/pgmprot_orlegend.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert, iq_132 /*********************************************************************** PGM ASIC3 PGM protection emulation diff --git a/src/mame/machine/pxa255.h b/src/mame/machine/pxa255.h index 5057ee459d3..122b129da45 100644 --- a/src/mame/machine/pxa255.h +++ b/src/mame/machine/pxa255.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /************************************************************************** * * Intel PXA255 on-chip peripheral emulation diff --git a/src/mame/machine/r2crypt.c b/src/mame/machine/r2crypt.c index 2f66a453b27..c35b5bc4bd7 100644 --- a/src/mame/machine/r2crypt.c +++ b/src/mame/machine/r2crypt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina /* Raiden 2 Sprite Decryption */ #include "emu.h" diff --git a/src/mame/machine/raiden2cop.c b/src/mame/machine/raiden2cop.c index 613275a680d..0a2baec5caf 100644 --- a/src/mame/machine/raiden2cop.c +++ b/src/mame/machine/raiden2cop.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Olivier Gaibert, Angelo Salese, David Haywood /*************************************************************************** Seibu Cop (Co-Processor) emulation @@ -616,7 +616,7 @@ WRITE16_MEMBER(raiden2cop_device::cop_pal_brightness_mode_w) } /* RE from Seibu Cup Soccer bootleg */ -const UINT8 raiden2cop_device::fade_table(int v) +UINT8 raiden2cop_device::fade_table(int v) { int low = v & 0x001f; int high = v & 0x03e0; diff --git a/src/mame/machine/raiden2cop.h b/src/mame/machine/raiden2cop.h index 4469948d7a5..5ed3a7aa704 100644 --- a/src/mame/machine/raiden2cop.h +++ b/src/mame/machine/raiden2cop.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina /*************************************************************************** Seibu Cop (Co-Processor) emulation @@ -79,7 +79,7 @@ public: DECLARE_WRITE16_MEMBER ( cop_dma_trigger_w ); - const UINT8 fade_table(int v); + UINT8 fade_table(int v); template<class _Object> static devcb_base &set_m_videoramout_cb(device_t &device, _Object object) { return downcast<raiden2cop_device &>(device).m_videoramout_cb.set_callback(object); } diff --git a/src/mame/machine/rainbow.c b/src/mame/machine/rainbow.c index c7655b52a90..8688ce4ee4f 100644 --- a/src/mame/machine/rainbow.c +++ b/src/mame/machine/rainbow.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /************************************************************************* diff --git a/src/mame/machine/scramble.c b/src/mame/machine/scramble.c index d928dbf5269..e51701679ab 100644 --- a/src/mame/machine/scramble.c +++ b/src/mame/machine/scramble.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** machine.c diff --git a/src/mame/machine/sec.c b/src/mame/machine/sec.c index 57e32d4f4a2..b8fa54abe24 100644 --- a/src/mame/machine/sec.c +++ b/src/mame/machine/sec.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Serial Electronic Counter (SEC) */ #include "emu.h" diff --git a/src/mame/machine/sec.h b/src/mame/machine/sec.h index bddeefab42a..e5e97ee2a6c 100644 --- a/src/mame/machine/sec.h +++ b/src/mame/machine/sec.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* commands */ diff --git a/src/mame/machine/segabb.c b/src/mame/machine/segabb.c index a4419369386..8adbf5dc809 100644 --- a/src/mame/machine/segabb.c +++ b/src/mame/machine/segabb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "segabb.h" const device_type SEGA_LINDBERGH_BASEBOARD = &device_creator<sega_lindbergh_baseboard_device>; diff --git a/src/mame/machine/segabb.h b/src/mame/machine/segabb.h index ee79bb52e95..d93d8699f86 100644 --- a/src/mame/machine/segabb.h +++ b/src/mame/machine/segabb.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert // Lindbergh Sega baseboard #ifndef SEGABB_H diff --git a/src/mame/machine/segacrp2.c b/src/mame/machine/segacrp2.c index d2a98904591..e0d128363ad 100644 --- a/src/mame/machine/segacrp2.c +++ b/src/mame/machine/segacrp2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /****************************************************************************** Sega encryption emulation by Nicola Salmoria diff --git a/src/mame/machine/segacrp2.h b/src/mame/machine/segacrp2.h index 5d100cc0fda..36493c9edf0 100644 --- a/src/mame/machine/segacrp2.h +++ b/src/mame/machine/segacrp2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria void sega_315_5162_decode(running_machine &machine, const char *cputag); void sega_315_5177_decode(running_machine &machine, const char *cputag); void sega_315_5178_decode(running_machine &machine, const char *cputag); diff --git a/src/mame/machine/segacrpt.c b/src/mame/machine/segacrpt.c index 17aaa2753e8..48c152a7ed6 100644 --- a/src/mame/machine/segacrpt.c +++ b/src/mame/machine/segacrpt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /****************************************************************************** Sega encryption emulation by Nicola Salmoria diff --git a/src/mame/machine/segacrpt.h b/src/mame/machine/segacrpt.h index 808ea660d13..c0d42bad383 100644 --- a/src/mame/machine/segacrpt.h +++ b/src/mame/machine/segacrpt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria void buckrog_decode(running_machine &machine, const char *cputag); void pengo_decode(running_machine &machine, const char *cputag); void szaxxon_decode(running_machine &machine, const char *cputag); diff --git a/src/mame/machine/segag80.c b/src/mame/machine/segag80.c index 844a3ccfc5d..b2e7d4ce8c5 100644 --- a/src/mame/machine/segag80.c +++ b/src/mame/machine/segag80.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Sega G-80 raster hardware diff --git a/src/mame/machine/segag80.h b/src/mame/machine/segag80.h index 625349492e1..c2cee5ea5d3 100644 --- a/src/mame/machine/segag80.h +++ b/src/mame/machine/segag80.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles typedef UINT8 (*segag80_decrypt_func)(offs_t, UINT8); segag80_decrypt_func segag80_security(int chip); diff --git a/src/mame/machine/seibuspi.c b/src/mame/machine/seibuspi.c index 9b710cfae6d..1f38b48c79f 100644 --- a/src/mame/machine/seibuspi.c +++ b/src/mame/machine/seibuspi.c @@ -1,10 +1,9 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, hap, ??? +// copyright-holders:Ville Linde, Nicola Salmoria + #include "emu.h" #include "machine/seibuspi.h" - - /************************************************************************** Tile encryption diff --git a/src/mame/machine/seibuspi.h b/src/mame/machine/seibuspi.h index cfd1943dc8a..bc16e39a60b 100644 --- a/src/mame/machine/seibuspi.h +++ b/src/mame/machine/seibuspi.h @@ -1,5 +1,8 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ville Linde, Nicola Salmoria + +// TODO: modernize code (spisprit.c too) + UINT32 partial_carry_sum32(UINT32 add1,UINT32 add2,UINT32 carry_mask); void seibuspi_text_decrypt(UINT8 *rom); diff --git a/src/mame/machine/seicop.c b/src/mame/machine/seicop.c index abc6e57e9e1..f5868cb6c9a 100644 --- a/src/mame/machine/seicop.c +++ b/src/mame/machine/seicop.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina /* OLD Seibu Cop simulation code. diff --git a/src/mame/machine/seicop.h b/src/mame/machine/seicop.h index c9ff6df66c8..67fdd400089 100644 --- a/src/mame/machine/seicop.h +++ b/src/mame/machine/seicop.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina #include "raiden2cop.h" diff --git a/src/mame/machine/slikshot.c b/src/mame/machine/slikshot.c index ec744a8f0a9..9730571258f 100644 --- a/src/mame/machine/slikshot.c +++ b/src/mame/machine/slikshot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Slick Shot input handling diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index f31d5bbc33a..b5345151997 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:Angelo Salese, R. Belmont, Anthony Kruize, Fabio Priuli, Harmony +// copyright-holders:Angelo Salese, R. Belmont, Anthony Kruize, Fabio Priuli, Ryan Holtz /*************************************************************************** snes.c @@ -1137,7 +1137,7 @@ void snes_state::machine_reset() } /* Set STAT78 to NTSC or PAL */ - if (ATTOSECONDS_TO_HZ(m_screen->frame_period().attoseconds) >= 59.0f) + if (ATTOSECONDS_TO_HZ(m_screen->frame_period().attoseconds) >= 59.0) m_ppu->m_stat78 = SNES_NTSC; else /* if (ATTOSECONDS_TO_HZ(m_screen->frame_period().attoseconds) == 50.0f) */ m_ppu->m_stat78 = SNES_PAL; diff --git a/src/mame/machine/spisprit.c b/src/mame/machine/spisprit.c index db7b41740be..b9de960cd21 100644 --- a/src/mame/machine/spisprit.c +++ b/src/mame/machine/spisprit.c @@ -1,5 +1,6 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ville Linde, Nicola Salmoria + #if 0 key tables: table[n] is the column of bit n cpu #0 (PC=0033C2F5): unmapped program memory dword write to 00000530 = 0000xxxx & FFFFFFFF (256 times, see key_table[]) diff --git a/src/mame/machine/st0016.c b/src/mame/machine/st0016.c index fcb3c55eca9..5dcfb73fa0e 100644 --- a/src/mame/machine/st0016.c +++ b/src/mame/machine/st0016.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina, David Haywood /* ST0016 - CPU (z80) + Sound + Video */ #include "st0016.h" diff --git a/src/mame/machine/st0016.h b/src/mame/machine/st0016.h index f9035396ad3..09f13d2f78d 100644 --- a/src/mame/machine/st0016.h +++ b/src/mame/machine/st0016.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina, David Haywood /* ST0016 - CPU (z80) + Sound + Video */ #pragma once diff --git a/src/mame/machine/starwars.c b/src/mame/machine/starwars.c index 4caa47d9df1..4ad0c734b2d 100644 --- a/src/mame/machine/starwars.c +++ b/src/mame/machine/starwars.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steve Baines, Frank Palazzolo /*************************************************************************** diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c index 8a5d98e05d9..ff6e07476a5 100644 --- a/src/mame/machine/stfight.c +++ b/src/mame/machine/stfight.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall /*************************************************************************** diff --git a/src/mame/machine/stvprot.c b/src/mame/machine/stvprot.c index 471b5506db7..fc743659f09 100644 --- a/src/mame/machine/stvprot.c +++ b/src/mame/machine/stvprot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:David Haywood, Angelo Salese, Olivier Galibert, Mariusz Wojcieszek, R.Belmont /* ST-V hookup for 315-5881 encryption/compression chip */ /* diff --git a/src/mame/machine/subsino.c b/src/mame/machine/subsino.c index eb2cfacb2d6..37272d11c34 100644 --- a/src/mame/machine/subsino.c +++ b/src/mame/machine/subsino.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia, David Haywood, Angelo Salese, Roberto Fresca. +// copyright-holders:Luca Elia, David Haywood, Angelo Salese, Roberto Fresca /*************************************************************************** Subsino XOR + Bitswap Encryption diff --git a/src/mame/machine/subsino.h b/src/mame/machine/subsino.h index 16c7015d105..671243317dd 100644 --- a/src/mame/machine/subsino.h +++ b/src/mame/machine/subsino.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood, Angelo Salese, Roberto Fresca #ifndef __MACHINE_SUBSINO__ #define __MACHINE_SUBSINO__ diff --git a/src/mame/machine/tait8741.c b/src/mame/machine/tait8741.c index c0e10451343..c6485a90dda 100644 --- a/src/mame/machine/tait8741.c +++ b/src/mame/machine/tait8741.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jarek Parchanski /* Taito 8741 emulation diff --git a/src/mame/machine/tait8741.h b/src/mame/machine/tait8741.h index 3b240e31ff6..d1f7e9119f7 100644 --- a/src/mame/machine/tait8741.h +++ b/src/mame/machine/tait8741.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jarek Parchanski #ifndef __TAITO8741__ #define __TAITO8741__ diff --git a/src/mame/machine/taitoio.c b/src/mame/machine/taitoio.c index 11cf39cf034..4b15fa06932 100644 --- a/src/mame/machine/taitoio.c +++ b/src/mame/machine/taitoio.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** TC0220IOC diff --git a/src/mame/machine/taitoio.h b/src/mame/machine/taitoio.h index b5c6c22785e..34210c46984 100644 --- a/src/mame/machine/taitoio.h +++ b/src/mame/machine/taitoio.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* taitoio.h diff --git a/src/mame/machine/taitosj.c b/src/mame/machine/taitosj.c index 6fe1dceca9e..890f66f3393 100644 --- a/src/mame/machine/taitosj.c +++ b/src/mame/machine/taitosj.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** machine.c diff --git a/src/mame/machine/tecmosys.c b/src/mame/machine/tecmosys.c index 88ed8eb7a8d..d38e2685244 100644 --- a/src/mame/machine/tecmosys.c +++ b/src/mame/machine/tecmosys.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch,David Haywood,Tomasz Slanina /* tecmosys protection related functions */ diff --git a/src/mame/machine/theglobp.c b/src/mame/machine/theglobp.c index 17b3cde9d44..6b60bb1c945 100644 --- a/src/mame/machine/theglobp.c +++ b/src/mame/machine/theglobp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** machine.c diff --git a/src/mame/machine/toaplan1.c b/src/mame/machine/toaplan1.c index 63c0a3a7914..de9342b4007 100644 --- a/src/mame/machine/toaplan1.c +++ b/src/mame/machine/toaplan1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Darren Olafson, Quench /*************************************************************************** ToaPlan game hardware from 1988-1991 diff --git a/src/mame/machine/twincobr.c b/src/mame/machine/twincobr.c index 493da43a303..e727403cc24 100644 --- a/src/mame/machine/twincobr.c +++ b/src/mame/machine/twincobr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Quench /**************************************************************************** * Twin Cobra * diff --git a/src/mame/machine/tx1.c b/src/mame/machine/tx1.c index 76eb83ce599..0760fa17bc9 100644 --- a/src/mame/machine/tx1.c +++ b/src/mame/machine/tx1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Tatsumi TX-1/Buggy Boy machine hardware diff --git a/src/mame/machine/vectrex.c b/src/mame/machine/vectrex.c index 1415aedcc56..ca64a1cd23c 100644 --- a/src/mame/machine/vectrex.c +++ b/src/mame/machine/vectrex.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer #include "emu.h" #include "cpu/m6809/m6809.h" diff --git a/src/mame/machine/vertigo.c b/src/mame/machine/vertigo.c index 519701d4631..63d0eb50aed 100644 --- a/src/mame/machine/vertigo.c +++ b/src/mame/machine/vertigo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /************************************************************************* diff --git a/src/mame/machine/volfied.c b/src/mame/machine/volfied.c index e4eae420231..7776340d11d 100644 --- a/src/mame/machine/volfied.c +++ b/src/mame/machine/volfied.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Nicola Salmoria /************************************************************************* Volfied C-Chip Protection diff --git a/src/mame/machine/wpc.c b/src/mame/machine/wpc.c index 29391f67b17..49608b7075f 100644 --- a/src/mame/machine/wpc.c +++ b/src/mame/machine/wpc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * wpc.c -- Williams WPC ASIC, used on Williams WPC pinball machines * diff --git a/src/mame/machine/wpc.h b/src/mame/machine/wpc.h index 018f0abad22..3e2b4ef8817 100644 --- a/src/mame/machine/wpc.h +++ b/src/mame/machine/wpc.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * wpc.h * diff --git a/src/mame/machine/wrally.c b/src/mame/machine/wrally.c index 9c8f8e29a4a..aac286ff8d6 100644 --- a/src/mame/machine/wrally.c +++ b/src/mame/machine/wrally.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, Mike Coates, Nicola Salmoria, Miguel Andel Horna /*************************************************************************** diff --git a/src/mame/machine/xevious.c b/src/mame/machine/xevious.c index b7af5ae0700..ff98376498c 100644 --- a/src/mame/machine/xevious.c +++ b/src/mame/machine/xevious.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** machine.c diff --git a/src/mame/mess.lst b/src/mame/mess.lst index 9ed3eb90d64..ad5b74bf5c3 100644 --- a/src/mame/mess.lst +++ b/src/mame/mess.lst @@ -269,12 +269,6 @@ intv2 // Mattel Intellivision II- 1982? intvsrs // Intellivision (Sears License) - 19?? intvoice // Mattel Intellivision + IntelliVoice expansion - 1982 -// Milton Bradley -microvsn // MicroVision - 1979 - -// Entex -advision // Adventurevision - // Capcom sfach // CPS Changer (Street Fighter Alpha) sfzbch // CPS Changer (Street Fighter ZERO Brazil) @@ -1038,19 +1032,6 @@ avigo_fr // 1997 Avigo (French) avigo_es // 1997 Avigo (Spanish) avigo_it // 1997 Avigo (Italian) -// TI Speak & Spell -snspell -snspella -snspellb -snspelluk -snspelluka -snspelljp -ladictee -snmath -snmathp -snread -lantutor - // Texas Instruments Calculators tisr16 // 1974 SR-16 tisr16ii @@ -1602,6 +1583,7 @@ fsa1st // NASCOM Microcomputers nascom1 // 1978 Nascom 1 nascom2 // 1979 Nascom 2 +nascom2c // 1980 Nascom 2 (CP/M) // Miles Gordon Technology samcoupe // 1989 Sam Coupe @@ -2152,12 +2134,17 @@ ngen // 1983 ngenb38 // 1991 386i // 199? -// Dedicated handhelds/tabletops +//********** Dedicated handhelds/tabletops ****************** + +// hh_cop400 +ctstein // Castle Toy einvaderc // Entex funjacks // Mattel +funrlgl // Mattel plus1 // Milton Bradley lightfgt // Milton Bradley +// hh_hmcs40 bambball // Bambino bmboxing // Bambino bfriskyt // Bandai @@ -2186,8 +2173,13 @@ kingman // Tomy tmtron // Tomy vinvader // VTech +// hh_melps4 +cfrogger // Coleco + +// hh_pic16 maniac // Ideal +// hh_tms1k mathmagi // APF amaztron // Coleco h2hbaseb // Coleco @@ -2217,9 +2209,24 @@ splitsec // Parker Bros mmerlin // Parker Bros tandy12 // Tandy Radio Shack +// hh_tms1k derivatives elecbowl // Marx mbdtower // Milton Bradley +// TI snspell +snspell +snspella +snspellb +snspelluk +snspelluka +snspelljp +ladictee +snmath +snmathp +snread +lantutor + +// hh_ucom4 ufombs // Bambino ssfball // Bambino bmsoccer // Bambino @@ -2238,6 +2245,12 @@ tmscramb // Tomy tcaveman // Tomy alnchase // Tomy +// other +tama // Bandai +advision // Entex +microvsn // Milton Bradley +monty // Ritam +mmonty // Ritam wildfire // Parker Bros @@ -2658,12 +2671,10 @@ alto2 gimix tecnbras minicom +mcom4_02 gameking leapster leapstertv excali64 bitgrpha bitgrphb -monty -mmonty -tama diff --git a/src/mame/osd/windows/arcade/arcade.ico b/src/mame/osd/windows/arcade/arcade.ico Binary files differdeleted file mode 100644 index 62761447fc2..00000000000 --- a/src/mame/osd/windows/arcade/arcade.ico +++ /dev/null diff --git a/src/mame/osd/windows/arcade/arcade.man b/src/mame/osd/windows/arcade/arcade.man deleted file mode 100644 index 2ea6a6b2e5a..00000000000 --- a/src/mame/osd/windows/arcade/arcade.man +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> - <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="MAME" type="win32" /> - <description>Multiple Arcade Machine Emulator</description> - <dependency> - <dependentAssembly> - <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/> - </dependentAssembly> - </dependency> -</assembly> diff --git a/src/mame/osd/windows/arcade/arcade.rc b/src/mame/osd/windows/arcade/arcade.rc deleted file mode 100644 index 955a08c1b2a..00000000000 --- a/src/mame/osd/windows/arcade/arcade.rc +++ /dev/null @@ -1,14 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -//============================================================ -// -// arcade.rc - Minimal resource file for Win32 MAME -// -//============================================================ - -#include <windows.h> -#include "arcadevers.rc" - -1 24 MOVEABLE PURE "arcade.man" - -2 ICON DISCARDABLE "arcade.ico" diff --git a/src/mame/video/88games.c b/src/mame/video/88games.c index d817b662472..b7b34342c01 100644 --- a/src/mame/video/88games.c +++ b/src/mame/video/88games.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/88games.h" diff --git a/src/mame/video/aeroboto.c b/src/mame/video/aeroboto.c index f87d32ca67a..b6e18e7968d 100644 --- a/src/mame/video/aeroboto.c +++ b/src/mame/video/aeroboto.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /*************************************************************************** diff --git a/src/mame/video/angelkds.c b/src/mame/video/angelkds.c index 703b4562503..7ddc2da4892 100644 --- a/src/mame/video/angelkds.c +++ b/src/mame/video/angelkds.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* video/angelkds.c - see drivers/angelkds.c for more info */ diff --git a/src/mame/video/aquarium.c b/src/mame/video/aquarium.c index 01dd22254bd..54a439249fe 100644 --- a/src/mame/video/aquarium.c +++ b/src/mame/video/aquarium.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Aquarium */ diff --git a/src/mame/video/archimds.c b/src/mame/video/archimds.c index a8e19420380..aa10f098903 100644 --- a/src/mame/video/archimds.c +++ b/src/mame/video/archimds.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Angelo Salese, R. Belmont, Juergen Bunchmueller /*************************************************************************** Acorn Archimedes VIDC (VIDeo Controller) emulation diff --git a/src/mame/video/arkanoid.c b/src/mame/video/arkanoid.c index 53f66486b67..12041d9742c 100644 --- a/src/mame/video/arkanoid.c +++ b/src/mame/video/arkanoid.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** video.c diff --git a/src/mame/video/armedf.c b/src/mame/video/armedf.c index 60a26a39a34..0b82b573edd 100644 --- a/src/mame/video/armedf.c +++ b/src/mame/video/armedf.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Phil Stroffolino, Carlos A. Lozano /*************************************************************************** Armed Formation video emulation diff --git a/src/mame/video/ashnojoe.c b/src/mame/video/ashnojoe.c index 1817f57e140..f742a6ff25f 100644 --- a/src/mame/video/ashnojoe.c +++ b/src/mame/video/ashnojoe.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /******************************************************************** diff --git a/src/mame/video/asterix.c b/src/mame/video/asterix.c index 01abe5cd59c..abe7b8567fe 100644 --- a/src/mame/video/asterix.c +++ b/src/mame/video/asterix.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "includes/asterix.h" diff --git a/src/mame/video/astrocde.c b/src/mame/video/astrocde.c index fe52584e791..962de8e7e2c 100644 --- a/src/mame/video/astrocde.c +++ b/src/mame/video/astrocde.c @@ -96,7 +96,7 @@ PALETTE_INIT_MEMBER(astrocde_state, astrocde) /* transform to RGB */ r = (ry + y) * 255; - g = ((y - 0.299 * (ry + y) - 0.114 * (by + y)) / 0.587) * 255; + g = ((y - 0.299f * (ry + y) - 0.114f * (by + y)) / 0.587f) * 255; b = (by + y) * 255; /* clamp and store */ diff --git a/src/mame/video/avgdvg.h b/src/mame/video/avgdvg.h index a74acddc627..79f923e7f46 100644 --- a/src/mame/video/avgdvg.h +++ b/src/mame/video/avgdvg.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Eric Smith, Brad Oliver, Bernd Wiebelt, Aaron Giles, Andrew Caldwell #ifndef __AVGDVG__ #define __AVGDVG__ diff --git a/src/mame/video/awpvid.h b/src/mame/video/awpvid.h index 3748e9c2292..2a53149fc9c 100644 --- a/src/mame/video/awpvid.h +++ b/src/mame/video/awpvid.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:James Wallace /************************************************************************************* AWP Hardware video simulation system diff --git a/src/mame/video/aztarac.c b/src/mame/video/aztarac.c index 6fe600c49a2..8922541fe8f 100644 --- a/src/mame/video/aztarac.c +++ b/src/mame/video/aztarac.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mathis Rosenhauer /************************************************************************* Centuri Aztarac hardware diff --git a/src/mame/video/battlex.c b/src/mame/video/battlex.c index a797114e7a2..1c8086c417f 100644 --- a/src/mame/video/battlex.c +++ b/src/mame/video/battlex.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /*************************************************************************** diff --git a/src/mame/video/beezer.c b/src/mame/video/beezer.c index 2c7c31fea94..b5ad3cca470 100644 --- a/src/mame/video/beezer.c +++ b/src/mame/video/beezer.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer #include "emu.h" #include "cpu/m6809/m6809.h" diff --git a/src/mame/video/bfm_adr2.h b/src/mame/video/bfm_adr2.h index 2d22bc8ee25..0f9257b7038 100644 --- a/src/mame/video/bfm_adr2.h +++ b/src/mame/video/bfm_adr2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #ifndef INC_BFMADDER2 #define INC_BFMADDER2 diff --git a/src/mame/video/bfm_dm01.h b/src/mame/video/bfm_dm01.h index c134c8ce526..75fe2cc9494 100644 --- a/src/mame/video/bfm_dm01.h +++ b/src/mame/video/bfm_dm01.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /************************************************************************************ Bellfruit dotmatrix driver, (under heavy construction !!!) diff --git a/src/mame/video/bigstrkb.c b/src/mame/video/bigstrkb.c index 1b68e9af09b..2bd41823483 100644 --- a/src/mame/video/bigstrkb.c +++ b/src/mame/video/bigstrkb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Big Striker (bootleg) Video Hardware */ diff --git a/src/mame/video/bionicc.c b/src/mame/video/bionicc.c index cd3f82db575..6f61d0ff32b 100644 --- a/src/mame/video/bionicc.c +++ b/src/mame/video/bionicc.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /*************************************************************************** Bionic Commando Video Hardware diff --git a/src/mame/video/bking.c b/src/mame/video/bking.c index 2d483e6756b..87b0795ea05 100644 --- a/src/mame/video/bking.c +++ b/src/mame/video/bking.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari /*************************************************************************** bking.c diff --git a/src/mame/video/blockade.c b/src/mame/video/blockade.c index 211afef4c24..e8a18178603 100644 --- a/src/mame/video/blockade.c +++ b/src/mame/video/blockade.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo #include "emu.h" #include "includes/blockade.h" diff --git a/src/mame/video/bloodbro.c b/src/mame/video/bloodbro.c index 8e0727d4859..e82109f8741 100644 --- a/src/mame/video/bloodbro.c +++ b/src/mame/video/bloodbro.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano Baides /*************************************************************************** diff --git a/src/mame/video/bosco.c b/src/mame/video/bosco.c index 50e868e7737..c716403329a 100644 --- a/src/mame/video/bosco.c +++ b/src/mame/video/bosco.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/c45.c b/src/mame/video/c45.c index f79cfdb4178..7221f13d9fa 100644 --- a/src/mame/video/c45.c +++ b/src/mame/video/c45.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson /**************************************************************************************************************/ /* Land Line Buffer diff --git a/src/mame/video/c45.h b/src/mame/video/c45.h index 2aedc960411..210009d8a23 100644 --- a/src/mame/video/c45.h +++ b/src/mame/video/c45.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson #pragma once #ifndef __C45_H__ diff --git a/src/mame/video/cabal.c b/src/mame/video/cabal.c index 1c8c67471fb..682b4bdc3e8 100644 --- a/src/mame/video/cabal.c +++ b/src/mame/video/cabal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano Baides /*************************************************************************** diff --git a/src/mame/video/carjmbre.c b/src/mame/video/carjmbre.c index 919435732d5..62256f86f72 100644 --- a/src/mame/video/carjmbre.c +++ b/src/mame/video/carjmbre.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:insideoutboy, Nicola Salmoria /*************************************************************************** Car Jamboree diff --git a/src/mame/video/cbasebal.c b/src/mame/video/cbasebal.c index bee49309c0d..cd7a368de4f 100644 --- a/src/mame/video/cbasebal.c +++ b/src/mame/video/cbasebal.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/cbasebal.h" diff --git a/src/mame/video/cchasm.c b/src/mame/video/cchasm.c index 50552d9cf97..b8aeedcd667 100644 --- a/src/mame/video/cchasm.c +++ b/src/mame/video/cchasm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** @@ -32,7 +32,7 @@ void cchasm_state::device_timer(emu_timer &timer, device_timer_id id, int param, } -void cchasm_state::cchasm_refresh () +void cchasm_state::refresh () { int pc = 0; int done = 0; @@ -105,18 +105,18 @@ void cchasm_state::cchasm_refresh () } } /* Refresh processor runs with 6 MHz */ - timer_set(attotime::from_hz(6000000) * total_length, TIMER_REFRESH_END); + m_refresh_end_timer->adjust(attotime::from_hz(6000000) * total_length); } -WRITE16_MEMBER(cchasm_state::cchasm_refresh_control_w) +WRITE16_MEMBER(cchasm_state::refresh_control_w) { if (ACCESSING_BITS_8_15) { switch (data >> 8) { case 0x37: - cchasm_refresh(); + refresh(); break; case 0xf7: m_maincpu->set_input_line(2, CLEAR_LINE); @@ -131,4 +131,6 @@ void cchasm_state::video_start() m_xcenter=visarea.xcenter() << 16; m_ycenter=visarea.ycenter() << 16; + + m_refresh_end_timer = timer_alloc(TIMER_REFRESH_END); } diff --git a/src/mame/video/cclimber.c b/src/mame/video/cclimber.c index 1e9ec2890e9..80c614148aa 100644 --- a/src/mame/video/cclimber.c +++ b/src/mame/video/cclimber.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/centiped.c b/src/mame/video/centiped.c index 43ae1f15445..97b64d74c2a 100644 --- a/src/mame/video/centiped.c +++ b/src/mame/video/centiped.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Atari Centipede hardware diff --git a/src/mame/video/cheekyms.c b/src/mame/video/cheekyms.c index 0556ed58e50..5277e0fd7dc 100644 --- a/src/mame/video/cheekyms.c +++ b/src/mame/video/cheekyms.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Moore /************************************************************************* Universal Cheeky Mouse Driver (c)Lee Taylor May 1998, All rights reserved. diff --git a/src/mame/video/chihiro.c b/src/mame/video/chihiro.c index d38bfb94596..050b8733f09 100644 --- a/src/mame/video/chihiro.c +++ b/src/mame/video/chihiro.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Samuele Zannoli #include "emu.h" #include "video/poly.h" #include "bitmap.h" @@ -1787,10 +1787,10 @@ void nv2a_renderer::render_color(INT32 scanline, const extent_t &extent, const n int ca, cr, cg, cb; int xp = extent.startx + x; // x coordinate of current pixel - cb = ((extent.param[PARAM_COLOR_B].start + (float)x*extent.param[PARAM_COLOR_B].dpdx))*255.0; - cg = ((extent.param[PARAM_COLOR_G].start + (float)x*extent.param[PARAM_COLOR_G].dpdx))*255.0; - cr = ((extent.param[PARAM_COLOR_R].start + (float)x*extent.param[PARAM_COLOR_R].dpdx))*255.0; - ca = ((extent.param[PARAM_COLOR_A].start + (float)x*extent.param[PARAM_COLOR_A].dpdx))*255.0; + cb = ((extent.param[PARAM_COLOR_B].start + (float)x*extent.param[PARAM_COLOR_B].dpdx))*255.0f; + cg = ((extent.param[PARAM_COLOR_G].start + (float)x*extent.param[PARAM_COLOR_G].dpdx))*255.0f; + cr = ((extent.param[PARAM_COLOR_R].start + (float)x*extent.param[PARAM_COLOR_R].dpdx))*255.0f; + ca = ((extent.param[PARAM_COLOR_A].start + (float)x*extent.param[PARAM_COLOR_A].dpdx))*255.0f; a8r8g8b8 = (ca << 24) + (cr << 16) + (cg << 8) + cb; // pixel color obtained by interpolating the colors of the vertices z = (extent.param[PARAM_Z].start + (float)x*extent.param[PARAM_Z].dpdx); write_pixel(xp, scanline, a8r8g8b8, z); @@ -3235,37 +3235,37 @@ void nv2a_renderer::combiner_map_input_function3(int code, float *data) switch (code) { case 0: - data[0] = MAX(0.0, data[0]); - data[1] = MAX(0.0, data[1]); - data[2] = MAX(0.0, data[2]); + data[0] = MAX(0.0f, data[0]); + data[1] = MAX(0.0f, data[1]); + data[2] = MAX(0.0f, data[2]); break; case 1: - t = MAX(data[0], 0.0); - data[0] = 1.0 - MIN(t, 1.0); - t = MAX(data[1], 0.0); - data[1] = 1.0 - MIN(t, 1.0); - t = MAX(data[2], 0.0); - data[2] = 1.0 - MIN(t, 1.0); + t = MAX(data[0], 0.0f); + data[0] = 1.0f - MIN(t, 1.0f); + t = MAX(data[1], 0.0f); + data[1] = 1.0f - MIN(t, 1.0f); + t = MAX(data[2], 0.0f); + data[2] = 1.0f - MIN(t, 1.0f); break; case 2: - data[0] = 2.0 * MAX(0.0, data[0]) - 1.0; - data[1] = 2.0 * MAX(0.0, data[1]) - 1.0; - data[2] = 2.0 * MAX(0.0, data[2]) - 1.0; + data[0] = 2.0 * MAX(0.0f, data[0]) - 1.0f; + data[1] = 2.0 * MAX(0.0f, data[1]) - 1.0f; + data[2] = 2.0 * MAX(0.0f, data[2]) - 1.0f; break; case 3: - data[0] = -2.0 * MAX(0.0, data[0]) + 1.0; - data[1] = -2.0 * MAX(0.0, data[1]) + 1.0; - data[2] = -2.0 * MAX(0.0, data[2]) + 1.0; + data[0] = -2.0f * MAX(0.0f, data[0]) + 1.0f; + data[1] = -2.0f * MAX(0.0f, data[1]) + 1.0f; + data[2] = -2.0f * MAX(0.0f, data[2]) + 1.0f; break; case 4: - data[0] = MAX(0.0, data[0]) - 0.5; - data[1] = MAX(0.0, data[1]) - 0.5; - data[2] = MAX(0.0, data[2]) - 0.5; + data[0] = MAX(0.0f, data[0]) - 0.5f; + data[1] = MAX(0.0f, data[1]) - 0.5f; + data[2] = MAX(0.0f, data[2]) - 0.5f; break; case 5: - data[0] = -MAX(0.0, data[0]) + 0.5; - data[1] = -MAX(0.0, data[1]) + 0.5; - data[2] = -MAX(0.0, data[2]) + 0.5; + data[0] = -MAX(0.0f, data[0]) + 0.5f; + data[1] = -MAX(0.0f, data[1]) + 0.5f; + data[2] = -MAX(0.0f, data[2]) + 0.5f; break; case 6: return; @@ -3447,9 +3447,9 @@ void nv2a_renderer::combiner_map_final_input() combiner.variable_sumclamp[1] = MAX(0, combiner.register_spare0[1]) + MAX(0, combiner.register_secondarycolor[1]); combiner.variable_sumclamp[2] = MAX(0, combiner.register_spare0[2]) + MAX(0, combiner.register_secondarycolor[2]); if (combiner.final.color_sum_clamp != 0) { - combiner.variable_sumclamp[0] = MIN(combiner.variable_sumclamp[0], 1.0); - combiner.variable_sumclamp[1] = MIN(combiner.variable_sumclamp[1], 1.0); - combiner.variable_sumclamp[2] = MIN(combiner.variable_sumclamp[2], 1.0); + combiner.variable_sumclamp[0] = MIN(combiner.variable_sumclamp[0], 1.0f); + combiner.variable_sumclamp[1] = MIN(combiner.variable_sumclamp[1], 1.0f); + combiner.variable_sumclamp[2] = MIN(combiner.variable_sumclamp[2], 1.0f); } // A pv = combiner_map_input_select3(combiner.final.mapin_rgbA_input); @@ -3494,12 +3494,12 @@ void nv2a_renderer::combiner_map_final_input() void nv2a_renderer::combiner_final_output() { // rgb - combiner.output[0] = combiner.variable_A[0] * combiner.variable_B[0] + (1.0 - combiner.variable_A[0])*combiner.variable_C[0] + combiner.variable_D[0]; - combiner.output[1] = combiner.variable_A[1] * combiner.variable_B[1] + (1.0 - combiner.variable_A[1])*combiner.variable_C[1] + combiner.variable_D[1]; - combiner.output[2] = combiner.variable_A[2] * combiner.variable_B[2] + (1.0 - combiner.variable_A[2])*combiner.variable_C[2] + combiner.variable_D[2]; - combiner.output[0] = MIN(combiner.output[0], 1.0); - combiner.output[1] = MIN(combiner.output[1], 1.0); - combiner.output[2] = MIN(combiner.output[2], 1.0); + combiner.output[0] = combiner.variable_A[0] * combiner.variable_B[0] + (1.0f - combiner.variable_A[0])*combiner.variable_C[0] + combiner.variable_D[0]; + combiner.output[1] = combiner.variable_A[1] * combiner.variable_B[1] + (1.0f - combiner.variable_A[1])*combiner.variable_C[1] + combiner.variable_D[1]; + combiner.output[2] = combiner.variable_A[2] * combiner.variable_B[2] + (1.0f - combiner.variable_A[2])*combiner.variable_C[2] + combiner.variable_D[2]; + combiner.output[0] = MIN(combiner.output[0], 1.0f); + combiner.output[1] = MIN(combiner.output[1], 1.0f); + combiner.output[2] = MIN(combiner.output[2], 1.0f); // a combiner.output[3] = combiner_map_input_function(combiner.final.mapin_aG_mapping, combiner.variable_G); } diff --git a/src/mame/video/chqflag.c b/src/mame/video/chqflag.c index 4bb64f2c0ff..74c8e12f8f0 100644 --- a/src/mame/video/chqflag.c +++ b/src/mame/video/chqflag.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Manuel Abadia /*************************************************************************** video.c diff --git a/src/mame/video/circus.c b/src/mame/video/circus.c index ce10b97f618..60ef798eebd 100644 --- a/src/mame/video/circus.c +++ b/src/mame/video/circus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /*************************************************************************** diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c index fe4a61ed5a7..0f5d59e1000 100644 --- a/src/mame/video/circusc.c +++ b/src/mame/video/circusc.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria,Chris Hardy /*************************************************************************** video.c diff --git a/src/mame/video/citycon.c b/src/mame/video/citycon.c index a65f4de2144..0466e4169e2 100644 --- a/src/mame/video/citycon.c +++ b/src/mame/video/citycon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Mirko Buffoni /*************************************************************************** video.c diff --git a/src/mame/video/cloak.c b/src/mame/video/cloak.c index 2d78de0672a..f9138f25970 100644 --- a/src/mame/video/cloak.c +++ b/src/mame/video/cloak.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris, Mirko Buffoni /*************************************************************************** Atari Cloak & Dagger hardware diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c index 9986f543ed1..4e639e9e7ba 100644 --- a/src/mame/video/contra.c +++ b/src/mame/video/contra.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano, Phil Stroffolino /*************************************************************************** diff --git a/src/mame/video/cop01.c b/src/mame/video/cop01.c index 05d8a8b1a3b..ca29e24db63 100644 --- a/src/mame/video/cop01.c +++ b/src/mame/video/cop01.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /*************************************************************************** diff --git a/src/mame/video/cosmic.c b/src/mame/video/cosmic.c index 1fdf4ce1f1f..da6f49708d4 100644 --- a/src/mame/video/cosmic.c +++ b/src/mame/video/cosmic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Lee Taylor /*************************************************************************** cosmic.c diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c index a1c401f7a0e..068445b6013 100644 --- a/src/mame/video/cvs.c +++ b/src/mame/video/cvs.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates, Couriersud /*************************************************************************** diff --git a/src/mame/video/darkmist.c b/src/mame/video/darkmist.c index a10b5a0ac32..e50fdf3ea1a 100644 --- a/src/mame/video/darkmist.c +++ b/src/mame/video/darkmist.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Nicola Salmoria, Tomasz Slanina #include "emu.h" #include "includes/darkmist.h" diff --git a/src/mame/video/dbz.c b/src/mame/video/dbz.c index 578eb46d929..e226c66b48f 100644 --- a/src/mame/video/dbz.c +++ b/src/mame/video/dbz.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, R. Belmont, Pierpaolo Prazzoli /* Dragonball Z diff --git a/src/mame/video/ddragon.c b/src/mame/video/ddragon.c index 6dcf28b64b0..be0207e80bd 100644 --- a/src/mame/video/ddragon.c +++ b/src/mame/video/ddragon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont +// license:BSD-3-Clause +// copyright-holders:Philip Bennett,Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino, Ernesto Corvi, David Haywood, R. Belmont /*************************************************************************** Video Hardware for some Technos games: diff --git a/src/mame/video/deadang.c b/src/mame/video/deadang.c index 11c6748ba21..08885820a83 100644 --- a/src/mame/video/deadang.c +++ b/src/mame/video/deadang.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood #include "emu.h" #include "includes/deadang.h" diff --git a/src/mame/video/decbac06.c b/src/mame/video/decbac06.c index f4cbe11ad24..8f2d6647e67 100644 --- a/src/mame/video/decbac06.c +++ b/src/mame/video/decbac06.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood /* Deco BAC06 tilemap generator: diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h index cb997e39b14..ceeef4891aa 100644 --- a/src/mame/video/decbac06.h +++ b/src/mame/video/decbac06.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood /* BAC06 */ diff --git a/src/mame/video/deckarn.c b/src/mame/video/deckarn.c index eeec25fc4cd..795bf5894d6 100644 --- a/src/mame/video/deckarn.c +++ b/src/mame/video/deckarn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,David Haywood /* Data East 'Karnov style' sprites */ /* Custom Chip ??? */ diff --git a/src/mame/video/deckarn.h b/src/mame/video/deckarn.h index 22872cecd6a..00d8617f494 100644 --- a/src/mame/video/deckarn.h +++ b/src/mame/video/deckarn.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,David Haywood class deco_karnovsprites_device : public device_t diff --git a/src/mame/video/decmxc06.c b/src/mame/video/decmxc06.c index dd40739b749..888d5ae6ada 100644 --- a/src/mame/video/decmxc06.c +++ b/src/mame/video/decmxc06.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood /* Deco MXC06 sprite generator: diff --git a/src/mame/video/decmxc06.h b/src/mame/video/decmxc06.h index ce724b8880f..c2ff21650f8 100644 --- a/src/mame/video/decmxc06.h +++ b/src/mame/video/decmxc06.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood /* MXC06 */ diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h index 17d5c7dc1f9..d63e1bf50ce 100644 --- a/src/mame/video/deco16ic.h +++ b/src/mame/video/deco16ic.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail /************************************************************************* deco16ic.h diff --git a/src/mame/video/deco_zoomspr.c b/src/mame/video/deco_zoomspr.c index 99ae59bedc6..c357f0376bf 100644 --- a/src/mame/video/deco_zoomspr.c +++ b/src/mame/video/deco_zoomspr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,David Haywood /* the sprites used by DragonGun + Lock 'n' Loaded */ diff --git a/src/mame/video/deco_zoomspr.h b/src/mame/video/deco_zoomspr.h index 11f0e037c6d..2592d684b9b 100644 --- a/src/mame/video/deco_zoomspr.h +++ b/src/mame/video/deco_zoomspr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,David Haywood class deco_zoomspr_device : public device_t diff --git a/src/mame/video/decocomn.c b/src/mame/video/decocomn.c index bd88df2bc1b..a8646815d37 100644 --- a/src/mame/video/decocomn.c +++ b/src/mame/video/decocomn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail /* Common DECO video functions (general, not sorted by IC) */ /* I think most of this stuff is driver specific and really shouldn't be in a device at all. It was only put here because I wanted to split deco_tilegen1 to just be the device for the diff --git a/src/mame/video/decocomn.h b/src/mame/video/decocomn.h index d65306fec3a..409764e3a17 100644 --- a/src/mame/video/decocomn.h +++ b/src/mame/video/decocomn.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail /************************************************************************* decocomn.h diff --git a/src/mame/video/decodmd1.c b/src/mame/video/decodmd1.c index 7c630ea7500..64a853fe61f 100644 --- a/src/mame/video/decodmd1.c +++ b/src/mame/video/decodmd1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball Dot Matrix Display * diff --git a/src/mame/video/decodmd1.h b/src/mame/video/decodmd1.h index 07c5badb155..8c236a851f4 100644 --- a/src/mame/video/decodmd1.h +++ b/src/mame/video/decodmd1.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball DMD Type 1 display */ diff --git a/src/mame/video/decodmd2.c b/src/mame/video/decodmd2.c index 4f4f864edc7..75a561b4e06 100644 --- a/src/mame/video/decodmd2.c +++ b/src/mame/video/decodmd2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball Dot Matrix Display * diff --git a/src/mame/video/decodmd2.h b/src/mame/video/decodmd2.h index 083c94006e0..4de84635cd0 100644 --- a/src/mame/video/decodmd2.h +++ b/src/mame/video/decodmd2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball DMD Type 2 Display */ diff --git a/src/mame/video/decodmd3.c b/src/mame/video/decodmd3.c index 581b0dffa55..44235f83bc1 100644 --- a/src/mame/video/decodmd3.c +++ b/src/mame/video/decodmd3.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball / Sega Pinball Dot Matrix Display * diff --git a/src/mame/video/decodmd3.h b/src/mame/video/decodmd3.h index 6133f6392f7..9064b8d3ec4 100644 --- a/src/mame/video/decodmd3.h +++ b/src/mame/video/decodmd3.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald /* * Data East Pinball DMD Type 3 Display */ diff --git a/src/mame/video/decospr.c b/src/mame/video/decospr.c index 4cc9e30496e..304fba4a87b 100644 --- a/src/mame/video/decospr.c +++ b/src/mame/video/decospr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood /* Data East Sprite Chip DECO 52 diff --git a/src/mame/video/decospr.h b/src/mame/video/decospr.h index d250b193a4e..a35ab97f132 100644 --- a/src/mame/video/decospr.h +++ b/src/mame/video/decospr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, David Haywood typedef device_delegate<UINT16 (UINT16 pri)> decospr_pri_cb_delegate; typedef device_delegate<UINT16 (UINT16 col)> decospr_col_cb_delegate; diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c index c9e6ce88b47..0ba931a0da6 100644 --- a/src/mame/video/digdug.c +++ b/src/mame/video/digdug.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/galaga.h" diff --git a/src/mame/video/djboy.c b/src/mame/video/djboy.c index f7e286b3f85..77938e8ac83 100644 --- a/src/mame/video/djboy.c +++ b/src/mame/video/djboy.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /** * @file video/djboy.c * diff --git a/src/mame/video/djmain.c b/src/mame/video/djmain.c index c18ad6ba676..83221600e35 100644 --- a/src/mame/video/djmain.c +++ b/src/mame/video/djmain.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf /* * Beatmania DJ Main Board (GX753) * emulate video hardware diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index 89ff5a1b6cf..4cec2937812 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -737,7 +737,7 @@ void dkong_state::radarscp_step(int line_cnt) // Solve the amplifier by iteration for (int j=1; j<=11; j++)// 11% = 1/75 / (1/75+1/10) { - double f = (double) j / 100.0f; + double f = (double) j / 100.0; m_vg1 = (m_cv1 - m_cv2)*(1-f) + f * m_vg2; m_vg2 = 5*CD4049(m_vg1/5); } @@ -745,8 +745,8 @@ void dkong_state::radarscp_step(int line_cnt) // Solve the amplifier by iteration 50% = both resistors equal for (int j=10; j<=20; j++) { - double f = (double) j / 40.0f; - vg3i = (1.0f-f) * m_vg2 + f * m_vg3; + double f = (double) j / 40.0; + vg3i = (1.0-f) * m_vg2 + f * m_vg3; m_vg3 = 5*CD4049(vg3i/5); } diff --git a/src/mame/video/docastle.c b/src/mame/video/docastle.c index a8528418ec3..8a6e3a5b58f 100644 --- a/src/mame/video/docastle.c +++ b/src/mame/video/docastle.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** Mr. Do's Castle hardware diff --git a/src/mame/video/dragrace.c b/src/mame/video/dragrace.c index 4f585eab689..4bbbdd4907c 100644 --- a/src/mame/video/dragrace.c +++ b/src/mame/video/dragrace.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Drag Race video emulation diff --git a/src/mame/video/drgnmst.c b/src/mame/video/drgnmst.c index 0d164a8176d..cde85bf7720 100644 --- a/src/mame/video/drgnmst.c +++ b/src/mame/video/drgnmst.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood // remaining gfx glitches diff --git a/src/mame/video/dvi.c b/src/mame/video/dvi.c index 5dea8f30739..a2397953afe 100644 --- a/src/mame/video/dvi.c +++ b/src/mame/video/dvi.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" // This just attempts to parse some of the header structures in the DVI data Dragon Gun uses... diff --git a/src/mame/video/dynduke.c b/src/mame/video/dynduke.c index 0a40857a034..628bb3b9b8e 100644 --- a/src/mame/video/dynduke.c +++ b/src/mame/video/dynduke.c @@ -7,31 +7,28 @@ /******************************************************************************/ -WRITE16_MEMBER(dynduke_state::dynduke_paletteram_w) +WRITE16_MEMBER(dynduke_state::paletteram_w) { - int color; - COMBINE_DATA(&m_generic_paletteram_16[offset]); - color=m_generic_paletteram_16[offset]; + int color=m_generic_paletteram_16[offset]; m_palette->set_pen_color(offset,pal4bit(color >> 0),pal4bit(color >> 4),pal4bit(color >> 8)); } -WRITE16_MEMBER(dynduke_state::dynduke_background_w) +WRITE16_MEMBER(dynduke_state::background_w) { COMBINE_DATA(&m_back_data[offset]); m_bg_layer->mark_tile_dirty(offset); } -WRITE16_MEMBER(dynduke_state::dynduke_foreground_w) +WRITE16_MEMBER(dynduke_state::foreground_w) { COMBINE_DATA(&m_fore_data[offset]); m_fg_layer->mark_tile_dirty(offset); } -WRITE16_MEMBER(dynduke_state::dynduke_text_w) +WRITE16_MEMBER(dynduke_state::text_w) { - UINT16 *videoram = m_videoram; - COMBINE_DATA(&videoram[offset]); + COMBINE_DATA(&m_videoram[offset]); m_tx_layer->mark_tile_dirty(offset); } @@ -63,8 +60,7 @@ TILE_GET_INFO_MEMBER(dynduke_state::get_fg_tile_info) TILE_GET_INFO_MEMBER(dynduke_state::get_tx_tile_info) { - UINT16 *videoram = m_videoram; - int tile=videoram[tile_index]; + int tile=m_videoram[tile_index]; int color=(tile >> 8) & 0x0f; tile = (tile & 0xff) | ((tile & 0xc000) >> 6); @@ -83,9 +79,18 @@ void dynduke_state::video_start() m_fg_layer->set_transparent_pen(15); m_tx_layer->set_transparent_pen(15); + + save_item(NAME(m_back_bankbase)); + save_item(NAME(m_fore_bankbase)); + save_item(NAME(m_back_enable)); + save_item(NAME(m_fore_enable)); + save_item(NAME(m_sprite_enable)); + save_item(NAME(m_txt_enable)); + save_item(NAME(m_old_back)); + save_item(NAME(m_old_fore)); } -WRITE16_MEMBER(dynduke_state::dynduke_gfxbank_w) +WRITE16_MEMBER(dynduke_state::gfxbank_w) { if (ACCESSING_BITS_0_7) { @@ -103,7 +108,7 @@ WRITE16_MEMBER(dynduke_state::dynduke_gfxbank_w) } -WRITE16_MEMBER(dynduke_state::dynduke_control_w) +WRITE16_MEMBER(dynduke_state::control_w) { if (ACCESSING_BITS_0_7) { @@ -214,7 +219,7 @@ void dynduke_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clipr } } -UINT32 dynduke_state::screen_update_dynduke(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 dynduke_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* Setup the tilemaps */ m_fg_layer->set_scrolly(0, ((m_scroll_ram[0x11]&0x30)<<4)+((m_scroll_ram[0x12]&0x7f)<<1)+((m_scroll_ram[0x12]&0x80)>>7) ); diff --git a/src/mame/video/espial.c b/src/mame/video/espial.c index bc2690a4046..2ea5ffb2184 100644 --- a/src/mame/video/espial.c +++ b/src/mame/video/espial.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Brad Oliver /*************************************************************************** video.c diff --git a/src/mame/video/esripsys.c b/src/mame/video/esripsys.c index 784e563deae..0a75d0fc0b9 100644 --- a/src/mame/video/esripsys.c +++ b/src/mame/video/esripsys.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Entertainment Sciences Real-Time Image Processor (RIP) video hardware diff --git a/src/mame/video/excellent_spr.c b/src/mame/video/excellent_spr.c index 6d807ad8ed7..2b178641abd 100644 --- a/src/mame/video/excellent_spr.c +++ b/src/mame/video/excellent_spr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Excellent Systems Sprite chip diff --git a/src/mame/video/excellent_spr.h b/src/mame/video/excellent_spr.h index 458f23f8344..c30de212434 100644 --- a/src/mame/video/excellent_spr.h +++ b/src/mame/video/excellent_spr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood class excellent_spr_device : public device_t, public device_video_interface diff --git a/src/mame/video/exedexes.c b/src/mame/video/exedexes.c index fd1c1daaadf..1636908abd3 100644 --- a/src/mame/video/exedexes.c +++ b/src/mame/video/exedexes.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Richard Davies /*************************************************************************** video.c diff --git a/src/mame/video/exterm.c b/src/mame/video/exterm.c index 8d7622bd7d0..e110a6c2087 100644 --- a/src/mame/video/exterm.c +++ b/src/mame/video/exterm.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Zsolt Vasvari, Alex Pasadyn +// license:BSD-3-Clause +// copyright-holders:Alex Pasadyn,Zsolt Vasvari /*************************************************************************** Gottlieb Exterminator hardware diff --git a/src/mame/video/fgoal.c b/src/mame/video/fgoal.c index 5a935481bb6..47c02d6d7fa 100644 --- a/src/mame/video/fgoal.c +++ b/src/mame/video/fgoal.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Taito Field Goal video emulation diff --git a/src/mame/video/firetrk.c b/src/mame/video/firetrk.c index 6bb346664bf..c0686d95620 100644 --- a/src/mame/video/firetrk.c +++ b/src/mame/video/firetrk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Atari Fire Truck + Super Bug + Monte Carlo video emulation diff --git a/src/mame/video/fitfight.c b/src/mame/video/fitfight.c index 063e41b790e..7e6febcd965 100644 --- a/src/mame/video/fitfight.c +++ b/src/mame/video/fitfight.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Fit of Fighting Video Hardware */ #include "emu.h" diff --git a/src/mame/video/flower.c b/src/mame/video/flower.c index 2ab0646ebbe..86cd5657902 100644 --- a/src/mame/video/flower.c +++ b/src/mame/video/flower.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy /* Flower Video Hardware */ #include "emu.h" diff --git a/src/mame/video/flstory.c b/src/mame/video/flstory.c index 0b0f893d2eb..344cb8c1ede 100644 --- a/src/mame/video/flstory.c +++ b/src/mame/video/flstory.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/funybubl.c b/src/mame/video/funybubl.c index 465e85bf1d1..4f036cce194 100644 --- a/src/mame/video/funybubl.c +++ b/src/mame/video/funybubl.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Funny Bubble Video hardware todo - convert to tilemap diff --git a/src/mame/video/fuukifg.c b/src/mame/video/fuukifg.c index 42e787f7b4f..07257c8931d 100644 --- a/src/mame/video/fuukifg.c +++ b/src/mame/video/fuukifg.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* */ diff --git a/src/mame/video/fuukifg.h b/src/mame/video/fuukifg.h index 0a72948e8be..d11a07ca3b1 100644 --- a/src/mame/video/fuukifg.h +++ b/src/mame/video/fuukifg.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood diff --git a/src/mame/video/fuukifg3.c b/src/mame/video/fuukifg3.c index 43eb268865b..c14aad454dd 100644 --- a/src/mame/video/fuukifg3.c +++ b/src/mame/video/fuukifg3.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Paul Priest, David Haywood +// license:BSD-3-Clause +// copyright-holders:Paul Priest, David Haywood, Luca Elia /*************************************************************************** -= Fuuki 32 Bit Games (FG-3) =- diff --git a/src/mame/video/gaiden.c b/src/mame/video/gaiden.c index c45a16a12cf..0170c3e56f3 100644 --- a/src/mame/video/gaiden.c +++ b/src/mame/video/gaiden.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Ninja Gaiden / Tecmo Knights Video Hardware diff --git a/src/mame/video/galastrm.c b/src/mame/video/galastrm.c index a6fb1c935b6..622837c4bc0 100644 --- a/src/mame/video/galastrm.c +++ b/src/mame/video/galastrm.c @@ -264,21 +264,21 @@ void galastrm_state::tc0610_rotate_draw(bitmap_ind16 &bitmap, bitmap_ind16 &srcb if (rzx != 0 || rzy != 0) { - while (sqrt(pow((float)pxx/4096.0, 2.0) + pow((float)pxy/4096.0, 2.0)) < (float)(lx / 2)) + while (sqrtf(powf((float)pxx/4096.0f, 2.0f) + powf((float)pxy/4096.0f, 2.0f)) < (float)(lx / 2)) { pxx += rzx; pxy += rzy; zx++; } - while (sqrt(pow((float)pyy/4096.0, 2.0) + pow((float)pyx/4096.0, 2.0)) < (float)(ly / 2)) + while (sqrtf(powf((float)pyy/4096.0f, 2.0f) + powf((float)pyx/4096.0f, 2.0f)) < (float)(ly / 2)) { pyy += rzx; pyx += -rzy; zy++; } } - zsn = ((float)pyx/4096.0) / (float)(ly / 2); - zcs = ((float)pxx/4096.0) / (float)(lx / 2); + zsn = ((float)pyx/4096.0f) / (float)(ly / 2); + zcs = ((float)pxx/4096.0f) / (float)(lx / 2); if ((rsx == -240 && rsy == 1072) || !m_tc0610_ctrl_reg[1][7]) @@ -340,13 +340,13 @@ void galastrm_state::tc0610_rotate_draw(bitmap_ind16 &bitmap, bitmap_ind16 &srcb { if (ryx != 0 || ryy != 0) { - while (sqrt(pow((float)pxx/4096.0, 2.0) + pow((float)pxy/4096.0, 2.0)) < (float)(lx / 2)) + while (sqrtf(powf((float)pxx/4096.0f, 2.0f) + powf((float)pxy/4096.0f, 2.0f)) < (float)(lx / 2)) { pxx += ryx; pxy += ryy; yx++; } - while (sqrt(pow((float)pyy/4096.0, 2.0) + pow((float)pyx/4096.0, 2.0)) < (float)(ly / 2)) + while (sqrtf(powf((float)pyy/4096.0f, 2.0f) + powf((float)pyx/4096.0f, 2.0f)) < (float)(ly / 2)) { pyy += ryx; pyx += -ryy; @@ -367,12 +367,12 @@ void galastrm_state::tc0610_rotate_draw(bitmap_ind16 &bitmap, bitmap_ind16 &srcb if (rsx != 0 || rsy != 0) { - while (sqrt(pow((float)pxx/65536.0, 2.0) + pow((float)pxy/65536.0, 2.0)) < (float)(lx / 2)) + while (sqrtf(powf((float)pxx/65536.0f, 2.0) + powf((float)pxy/65536.0f, 2.0f)) < (float)(lx / 2)) { pxx += rsx; pxy += rsy; } - while (sqrt(pow((float)pyy/65536.0, 2.0) + pow((float)pyx/65536.0, 2.0)) < (float)(ly / 2)) + while (sqrtf(powf((float)pyy/65536.0f, 2.0f) + powf((float)pyx/65536.0f, 2.0f)) < (float)(ly / 2)) { pyy += rsx; pyx += -rsy; @@ -413,10 +413,10 @@ void galastrm_state::tc0610_rotate_draw(bitmap_ind16 &bitmap, bitmap_ind16 &srcb vert[0].p[0] = 0.0; vert[0].p[1] = 0.0; vert[1].p[0] = 0.0; - vert[1].p[1] = (float)(ly - 1) * 65536.0; - vert[2].p[0] = (float)(lx - 1) * 65536.0; - vert[2].p[1] = (float)(ly - 1) * 65536.0; - vert[3].p[0] = (float)(lx - 1) * 65536.0; + vert[1].p[1] = (float)(ly - 1) * 65536.0f; + vert[2].p[0] = (float)(lx - 1) * 65536.0f; + vert[2].p[1] = (float)(ly - 1) * 65536.0f; + vert[3].p[0] = (float)(lx - 1) * 65536.0f; vert[3].p[1] = 0.0; extra->texbase = &srcbitmap; diff --git a/src/mame/video/galaxia.c b/src/mame/video/galaxia.c index c871d93f165..883be91df06 100644 --- a/src/mame/video/galaxia.c +++ b/src/mame/video/galaxia.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** Galaxia Video HW @@ -208,7 +208,7 @@ UINT32 galaxia_state::screen_update_astrowar(screen_device &screen, bitmap_ind16 float s_ratio = 256.0f / 196.0f; float sx = x * s_ratio; - if ((int)(sx + 0.5) > cliprect.max_x) + if ((int)(sx + 0.5f) > cliprect.max_x) break; // copy the S2636 bitmap into the main bitmap and check collision @@ -217,11 +217,11 @@ UINT32 galaxia_state::screen_update_astrowar(screen_device &screen, bitmap_ind16 if (S2636_IS_PIXEL_DRAWN(pixel)) { // S2636 vs. background collision detection - if ((m_temp_bitmap.pix16(y, (int)(sx)) | m_temp_bitmap.pix16(y, (int)(sx + 0.5))) & 1) + if ((m_temp_bitmap.pix16(y, (int)(sx)) | m_temp_bitmap.pix16(y, (int)(sx + 0.5f))) & 1) m_collision_register |= 0x01; bitmap.pix16(y, (int)(sx)) = S2636_PIXEL_COLOR(pixel) | SPRITE_PEN_BASE; - bitmap.pix16(y, (int)(sx + 0.5)) = S2636_PIXEL_COLOR(pixel) | SPRITE_PEN_BASE; + bitmap.pix16(y, (int)(sx + 0.5f)) = S2636_PIXEL_COLOR(pixel) | SPRITE_PEN_BASE; } } } diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c index 1b61e932c3f..a1178968b4e 100644 --- a/src/mame/video/galaxold.c +++ b/src/mame/video/galaxold.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Galaxian hardware family diff --git a/src/mame/video/gaplus.c b/src/mame/video/gaplus.c index 2edba73c422..58ceda4e4b3 100644 --- a/src/mame/video/gaplus.c +++ b/src/mame/video/gaplus.c @@ -119,9 +119,9 @@ TILE_GET_INFO_MEMBER(gaplus_state::get_tile_info) ***************************************************************************/ /* starfield speed constants (bigger = faster) */ -#define SPEED_1 0.5 -#define SPEED_2 1.0 -#define SPEED_3 2.0 +#define SPEED_1 0.5f +#define SPEED_2 1.0f +#define SPEED_3 2.0f void gaplus_state::starfield_init() { diff --git a/src/mame/video/gcpinbal.c b/src/mame/video/gcpinbal.c index 3254b8d2976..a69fafb4c17 100644 --- a/src/mame/video/gcpinbal.c +++ b/src/mame/video/gcpinbal.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves, R. Belmont #include "emu.h" #include "includes/gcpinbal.h" diff --git a/src/mame/video/gijoe.c b/src/mame/video/gijoe.c index bcd51252d8d..15b962fa8a9 100644 --- a/src/mame/video/gijoe.c +++ b/src/mame/video/gijoe.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "includes/gijoe.h" diff --git a/src/mame/video/gladiatr.c b/src/mame/video/gladiatr.c index d94bd4e7dd3..31a115c792a 100644 --- a/src/mame/video/gladiatr.c +++ b/src/mame/video/gladiatr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Victor Trucco,Steve Ellenoff,Phil Stroffolino,Tatsuyuki Satoh,Tomasz Slanina,Nicola Salmoria /*************************************************************************** diff --git a/src/mame/video/goldstar.c b/src/mame/video/goldstar.c index 293fad0994d..3cfdf5f7960 100644 --- a/src/mame/video/goldstar.c +++ b/src/mame/video/goldstar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca /*************************************************************************** diff --git a/src/mame/video/gomoku.c b/src/mame/video/gomoku.c index 68302be65a9..46487d30ab5 100644 --- a/src/mame/video/gomoku.c +++ b/src/mame/video/gomoku.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /****************************************************************************** diff --git a/src/mame/video/gp9001.c b/src/mame/video/gp9001.c index e0af85cb684..711eb1b0199 100644 --- a/src/mame/video/gp9001.c +++ b/src/mame/video/gp9001.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Quench, David Haywood /* GP9001 Video Controller */ /*************************************************************************** diff --git a/src/mame/video/gp9001.h b/src/mame/video/gp9001.h index b8140152b96..e6a338ce7be 100644 --- a/src/mame/video/gp9001.h +++ b/src/mame/video/gp9001.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Quench, David Haywood /* GP9001 Video Controller */ struct gp9001layeroffsets diff --git a/src/mame/video/gstriker.c b/src/mame/video/gstriker.c index d35efdaea7c..583154ac42f 100644 --- a/src/mame/video/gstriker.c +++ b/src/mame/video/gstriker.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch, David Haywood #include "emu.h" #include "includes/gstriker.h" diff --git a/src/mame/video/gumbo.c b/src/mame/video/gumbo.c index 2354f33e6c1..8b362ecd3fa 100644 --- a/src/mame/video/gumbo.c +++ b/src/mame/video/gumbo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Gumbo video */ diff --git a/src/mame/video/gyruss.c b/src/mame/video/gyruss.c index d4a3e6d2fd8..316a748a971 100644 --- a/src/mame/video/gyruss.c +++ b/src/mame/video/gyruss.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/hng64_sprite.c b/src/mame/video/hng64_sprite.c index 0e709779018..a3c740096cf 100644 --- a/src/mame/video/hng64_sprite.c +++ b/src/mame/video/hng64_sprite.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:David Haywood, Angelo Salese, ElSemi, Andrew Gardner, Andrew Zaferakis /* Hyper NeoGeo 64 Sprite bits */ diff --git a/src/mame/video/holeland.c b/src/mame/video/holeland.c index 66b275fa59f..2c220eeca74 100644 --- a/src/mame/video/holeland.c +++ b/src/mame/video/holeland.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /*************************************************************************** diff --git a/src/mame/video/hyperspt.c b/src/mame/video/hyperspt.c index 16246a4ede5..b339a2c39b5 100644 --- a/src/mame/video/hyperspt.c +++ b/src/mame/video/hyperspt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** video.c diff --git a/src/mame/video/irobot.c b/src/mame/video/irobot.c index 5599c8821a6..628a5c480e3 100644 --- a/src/mame/video/irobot.c +++ b/src/mame/video/irobot.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Dan Boris /*************************************************************************** Atari I, Robot hardware diff --git a/src/mame/video/jagblit.inc b/src/mame/video/jagblit.inc index b2af11b1e40..6b75f1f4b2d 100644 --- a/src/mame/video/jagblit.inc +++ b/src/mame/video/jagblit.inc @@ -321,23 +321,23 @@ void jaguar_state::FUNCNAME(UINT32 command, UINT32 a1flags, UINT32 a2flags) logerror(" a1_pitch = %d\n", a1_pitch); logerror(" a1_psize = %d\n", 1 << ((A1FIXED >> 3) & 7)); logerror(" a1_width = %d\n", a1_width); - logerror(" a1_xadd = %f (phrase=%d)\n", (float)a1_xadd / 65536.0, a1_phrase_mode); - logerror(" a1_yadd = %f\n", (float)a1_yadd / 65536.0); - logerror(" a1_xstep = %f\n", (float)a1_xstep / 65536.0); - logerror(" a1_ystep = %f\n", (float)a1_ystep / 65536.0); - logerror(" a1_x = %f\n", (float)a1_x / 65536.0); - logerror(" a1_y = %f\n", (float)a1_y / 65536.0); + logerror(" a1_xadd = %f (phrase=%d)\n", (double)a1_xadd / 65536.0, a1_phrase_mode); + logerror(" a1_yadd = %f\n", (double)a1_yadd / 65536.0); + logerror(" a1_xstep = %f\n", (double)a1_xstep / 65536.0); + logerror(" a1_ystep = %f\n", (double)a1_ystep / 65536.0); + logerror(" a1_x = %f\n", (double)a1_x / 65536.0); + logerror(" a1_y = %f\n", (double)a1_y / 65536.0); logerror(" a2_base = %08X\n", a2_base); logerror(" a2_pitch = %d\n", a2_pitch); logerror(" a2_psize = %d\n", 1 << ((A2FIXED >> 3) & 7)); logerror(" a2_width = %d\n", a2_width); - logerror(" a2_xadd = %f (phrase=%d)\n", (float)a2_xadd / 65536.0, a2_phrase_mode); - logerror(" a2_yadd = %f\n", (float)a2_yadd / 65536.0); - logerror(" a2_xstep = %f\n", (float)a2_xstep / 65536.0); - logerror(" a2_ystep = %f\n", (float)a2_ystep / 65536.0); - logerror(" a2_x = %f\n", (float)a2_x / 65536.0); - logerror(" a2_y = %f\n", (float)a2_y / 65536.0); + logerror(" a2_xadd = %f (phrase=%d)\n", (double)a2_xadd / 65536.0, a2_phrase_mode); + logerror(" a2_yadd = %f\n", (double)a2_yadd / 65536.0); + logerror(" a2_xstep = %f\n", (double)a2_xstep / 65536.0); + logerror(" a2_ystep = %f\n", (double)a2_ystep / 65536.0); + logerror(" a2_x = %f\n", (double)a2_x / 65536.0); + logerror(" a2_y = %f\n", (double)a2_y / 65536.0); logerror(" count = %d x %d\n", inner_count, outer_count); logerror(" command = %08X\n", COMMAND); diff --git a/src/mame/video/jalblend.c b/src/mame/video/jalblend.c index 33a337c059c..acfeadd470e 100644 --- a/src/mame/video/jalblend.c +++ b/src/mame/video/jalblend.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Luca Elia /*************************************************************************** Jaleco color blend emulation diff --git a/src/mame/video/jalblend.h b/src/mame/video/jalblend.h index 238064244fa..9a5100a88d2 100644 --- a/src/mame/video/jalblend.h +++ b/src/mame/video/jalblend.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Luca Elia class jaleco_blend_device : public device_t { public: diff --git a/src/mame/video/jpmimpct.c b/src/mame/video/jpmimpct.c index 45b5005c0c6..b315c58b098 100644 --- a/src/mame/video/jpmimpct.c +++ b/src/mame/video/jpmimpct.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** JPM IMPACT with Video hardware diff --git a/src/mame/video/k001005.c b/src/mame/video/k001005.c index 0c713a23795..eb15e55616f 100644 --- a/src/mame/video/k001005.c +++ b/src/mame/video/k001005.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "k001005.h" diff --git a/src/mame/video/k001005.h b/src/mame/video/k001005.h index 0d8f6c4a035..cd4418fadd2 100644 --- a/src/mame/video/k001005.h +++ b/src/mame/video/k001005.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K001005_H__ #define __K001005_H__ diff --git a/src/mame/video/k001006.c b/src/mame/video/k001006.c index ea0ada52c8d..f6b5626a78d 100644 --- a/src/mame/video/k001006.c +++ b/src/mame/video/k001006.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "k001006.h" diff --git a/src/mame/video/k001006.h b/src/mame/video/k001006.h index 030c40942d0..8e92fd785c4 100644 --- a/src/mame/video/k001006.h +++ b/src/mame/video/k001006.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K001006_H__ #define __K001006_H__ diff --git a/src/mame/video/k001604.c b/src/mame/video/k001604.c index 413db917b5f..1ce897f4785 100644 --- a/src/mame/video/k001604.c +++ b/src/mame/video/k001604.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "k001604.h" diff --git a/src/mame/video/k001604.h b/src/mame/video/k001604.h index f8fbd7da6f5..b780af17a69 100644 --- a/src/mame/video/k001604.h +++ b/src/mame/video/k001604.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K001604_H__ #define __K001604_H__ diff --git a/src/mame/video/k007121.c b/src/mame/video/k007121.c index 5253beea980..3bc2c4f3be8 100644 --- a/src/mame/video/k007121.c +++ b/src/mame/video/k007121.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 007121 ------ diff --git a/src/mame/video/k007121.h b/src/mame/video/k007121.h index 8fe62c45415..97997cd4751 100644 --- a/src/mame/video/k007121.h +++ b/src/mame/video/k007121.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K007121_H__ #define __K007121_H__ diff --git a/src/mame/video/k007342.c b/src/mame/video/k007342.c index e332d7ec94c..bc482a5e4ad 100644 --- a/src/mame/video/k007342.c +++ b/src/mame/video/k007342.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 007342 ------ diff --git a/src/mame/video/k007342.h b/src/mame/video/k007342.h index e947fb0dd44..a94943aa51d 100644 --- a/src/mame/video/k007342.h +++ b/src/mame/video/k007342.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K007342_H__ #define __K007342_H__ diff --git a/src/mame/video/k007420.c b/src/mame/video/k007420.c index b8dc2317ab3..cec62760fc8 100644 --- a/src/mame/video/k007420.c +++ b/src/mame/video/k007420.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 007420 ------ diff --git a/src/mame/video/k007420.h b/src/mame/video/k007420.h index 819f5491026..91cd42144a2 100644 --- a/src/mame/video/k007420.h +++ b/src/mame/video/k007420.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K007420_H__ #define __K007420_H__ diff --git a/src/mame/video/k037122.c b/src/mame/video/k037122.c index ac381a86b67..2a96426952e 100644 --- a/src/mame/video/k037122.c +++ b/src/mame/video/k037122.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 037122 */ diff --git a/src/mame/video/k037122.h b/src/mame/video/k037122.h index 2aba06cf2fa..38c106d083f 100644 --- a/src/mame/video/k037122.h +++ b/src/mame/video/k037122.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K037122_H__ #define __K037122_H__ diff --git a/src/mame/video/k051316.c b/src/mame/video/k051316.c index 4dd6a87c7c8..a5411f463ae 100644 --- a/src/mame/video/k051316.c +++ b/src/mame/video/k051316.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 051316 PSAC ------ diff --git a/src/mame/video/k051316.h b/src/mame/video/k051316.h index c65c92ef401..cf63c7cfeb7 100644 --- a/src/mame/video/k051316.h +++ b/src/mame/video/k051316.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K051316_H__ #define __K051316_H__ diff --git a/src/mame/video/k051733.c b/src/mame/video/k051733.c index 1596b822325..8456e0d2ea7 100644 --- a/src/mame/video/k051733.c +++ b/src/mame/video/k051733.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 051733 ------ diff --git a/src/mame/video/k051733.h b/src/mame/video/k051733.h index 49e3247f813..58f7394bb17 100644 --- a/src/mame/video/k051733.h +++ b/src/mame/video/k051733.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K051733_H__ #define __K051733_H__ diff --git a/src/mame/video/k051960.c b/src/mame/video/k051960.c index eacb302694d..a72ed132d86 100644 --- a/src/mame/video/k051960.c +++ b/src/mame/video/k051960.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 051960/051937 ------------- diff --git a/src/mame/video/k051960.h b/src/mame/video/k051960.h index 9d11e8bb4cf..353974ed734 100644 --- a/src/mame/video/k051960.h +++ b/src/mame/video/k051960.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K051960_H__ #define __K051960_H__ diff --git a/src/mame/video/k052109.c b/src/mame/video/k052109.c index 5f9b4e8f4e9..52ef33ecb65 100644 --- a/src/mame/video/k052109.c +++ b/src/mame/video/k052109.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 052109/051962 ------------- diff --git a/src/mame/video/k052109.h b/src/mame/video/k052109.h index 100e93c13d0..13f63b61359 100644 --- a/src/mame/video/k052109.h +++ b/src/mame/video/k052109.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #pragma once #ifndef __K052109_H__ #define __K052109_H__ diff --git a/src/mame/video/k053244_k053245.c b/src/mame/video/k053244_k053245.c index 777e003dbb5..4a887b8004f 100644 --- a/src/mame/video/k053244_k053245.c +++ b/src/mame/video/k053244_k053245.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* 053245/053244 diff --git a/src/mame/video/k053244_k053245.h b/src/mame/video/k053244_k053245.h index 25ad2a3d513..2fe1bd1fe4b 100644 --- a/src/mame/video/k053244_k053245.h +++ b/src/mame/video/k053244_k053245.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K053244_K053245_H__ #define __K053244_K053245_H__ diff --git a/src/mame/video/k053246_k053247_k055673.c b/src/mame/video/k053246_k053247_k055673.c index 517d60e8ec5..dc678d36a45 100644 --- a/src/mame/video/k053246_k053247_k055673.c +++ b/src/mame/video/k053246_k053247_k055673.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /***************************************************************************/ /* */ /* 053246 */ diff --git a/src/mame/video/k053246_k053247_k055673.h b/src/mame/video/k053246_k053247_k055673.h index f9a1c9d0ac6..9fa846f593e 100644 --- a/src/mame/video/k053246_k053247_k055673.h +++ b/src/mame/video/k053246_k053247_k055673.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* */ /* todo: remove code from header, linker starts throwing silly messages when I try due to the templates.. make sense of them */ diff --git a/src/mame/video/k053250.c b/src/mame/video/k053250.c index f84f4d1c21f..bb3c02805fc 100644 --- a/src/mame/video/k053250.c +++ b/src/mame/video/k053250.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "k053250.h" const device_type K053250 = &device_creator<k053250_device>; diff --git a/src/mame/video/k053250.h b/src/mame/video/k053250.h index c99b99cef0f..8b00f917bf6 100644 --- a/src/mame/video/k053250.h +++ b/src/mame/video/k053250.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef __K053250_H__ #define __K053250_H__ diff --git a/src/mame/video/k053251.c b/src/mame/video/k053251.c index 84bbd1c9d2d..b11eb7002e1 100644 --- a/src/mame/video/k053251.c +++ b/src/mame/video/k053251.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont /* Konami 053251 ------ diff --git a/src/mame/video/k053251.h b/src/mame/video/k053251.h index 9b15cf78d87..c7688f0ac19 100644 --- a/src/mame/video/k053251.h +++ b/src/mame/video/k053251.h @@ -1,6 +1,5 @@ -// license:??? -// copyright-holders:??? -#pragma once +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont #ifndef __K053251_H__ #define __K053251_H__ diff --git a/src/mame/video/k053936.c b/src/mame/video/k053936.c index 52b8b96f925..4852e8c1a34 100644 --- a/src/mame/video/k053936.c +++ b/src/mame/video/k053936.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* */ #include "emu.h" diff --git a/src/mame/video/k053936.h b/src/mame/video/k053936.h index 89ec42cf0e2..7e64dbf3ee7 100644 --- a/src/mame/video/k053936.h +++ b/src/mame/video/k053936.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K053936_H__ #define __K053936_H__ diff --git a/src/mame/video/k054000.c b/src/mame/video/k054000.c index 5808ca6eed4..235f72ea1ea 100644 --- a/src/mame/video/k054000.c +++ b/src/mame/video/k054000.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "k054000.h" diff --git a/src/mame/video/k054000.h b/src/mame/video/k054000.h index 83f6cc74346..c26593c9ce2 100644 --- a/src/mame/video/k054000.h +++ b/src/mame/video/k054000.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K054000_H__ diff --git a/src/mame/video/k054156_k054157_k056832.c b/src/mame/video/k054156_k054157_k056832.c index 42ba587ebdd..a7c5e7954b3 100644 --- a/src/mame/video/k054156_k054157_k056832.c +++ b/src/mame/video/k054156_k054157_k056832.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* this should probably be k054156.c and k054156_device (the base management device) */ /***************************************************************************/ diff --git a/src/mame/video/k054156_k054157_k056832.h b/src/mame/video/k054156_k054157_k056832.h index 51c5e1485eb..71e1008002a 100644 --- a/src/mame/video/k054156_k054157_k056832.h +++ b/src/mame/video/k054156_k054157_k056832.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K056832_H__ #define __K056832_H__ diff --git a/src/mame/video/k054338.c b/src/mame/video/k054338.c index afca8ef6d9a..5a389a4c01a 100644 --- a/src/mame/video/k054338.c +++ b/src/mame/video/k054338.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "k054338.h" diff --git a/src/mame/video/k054338.h b/src/mame/video/k054338.h index f255b9e4d18..d0c76f376f8 100644 --- a/src/mame/video/k054338.h +++ b/src/mame/video/k054338.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #pragma once #ifndef __K054338_H__ #define __K054338_H__ diff --git a/src/mame/video/k055555.c b/src/mame/video/k055555.c index 48a4198bfe0..c556c54a02b 100644 --- a/src/mame/video/k055555.c +++ b/src/mame/video/k055555.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /***************************************************************************/ /* */ /* 055555 */ diff --git a/src/mame/video/k055555.h b/src/mame/video/k055555.h index c5ddb880462..f256cea57a5 100644 --- a/src/mame/video/k055555.h +++ b/src/mame/video/k055555.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* */ #pragma once diff --git a/src/mame/video/kan_panb.c b/src/mame/video/kan_panb.c index ee9ef470060..a4c22740d09 100644 --- a/src/mame/video/kan_panb.c +++ b/src/mame/video/kan_panb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Luca Elia /* bootlegs of Kaneko Pandora chip, with modifications */ #include "emu.h" diff --git a/src/mame/video/kan_pand.c b/src/mame/video/kan_pand.c index e36707de1db..5a4f94236f8 100644 --- a/src/mame/video/kan_pand.c +++ b/src/mame/video/kan_pand.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Luca Elia /*********************************************************************** Kaneko Pandora Sprite Chip @@ -262,7 +262,7 @@ WRITE8_MEMBER ( kaneko_pandora_device::spriteram_w ) READ8_MEMBER( kaneko_pandora_device::spriteram_r ) { - // it's either hooked up oddly on this, or ont the 16-bit games + // it's either hooked up oddly on this, or on the 16-bit games // either way, we swap the address lines so that the spriteram is in the same format offset = BITSWAP16(offset, 15,14,13,12, 11, 7,6,5,4,3,2,1,0, 10,9,8 ); diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h index 2b9e2a94bfd..bb0048ebf1d 100644 --- a/src/mame/video/kan_pand.h +++ b/src/mame/video/kan_pand.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Luca Elia /************************************************************************* kan_pand.h diff --git a/src/mame/video/kaneko_grap2.c b/src/mame/video/kaneko_grap2.c index 7bbfff832cb..11bbf227408 100644 --- a/src/mame/video/kaneko_grap2.c +++ b/src/mame/video/kaneko_grap2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Kaneko GRAP2, RLE blitter / Framebuffer etc.? */ diff --git a/src/mame/video/kaneko_grap2.h b/src/mame/video/kaneko_grap2.h index 4254e0f57b1..8997accd846 100644 --- a/src/mame/video/kaneko_grap2.h +++ b/src/mame/video/kaneko_grap2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood diff --git a/src/mame/video/kaneko_spr.c b/src/mame/video/kaneko_spr.c index 47a1e9ee1cc..0dbbb4ada51 100644 --- a/src/mame/video/kaneko_spr.c +++ b/src/mame/video/kaneko_spr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* Kaneko Sprites */ /* diff --git a/src/mame/video/kaneko_spr.h b/src/mame/video/kaneko_spr.h index 89bf0cfa54e..428f52a7dea 100644 --- a/src/mame/video/kaneko_spr.h +++ b/src/mame/video/kaneko_spr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* Kaneko Sprites */ diff --git a/src/mame/video/kaneko_tmap.c b/src/mame/video/kaneko_tmap.c index f65b487aecf..fc181d924cc 100644 --- a/src/mame/video/kaneko_tmap.c +++ b/src/mame/video/kaneko_tmap.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* Kaneko View2 Tilemaps */ /* diff --git a/src/mame/video/kaneko_tmap.h b/src/mame/video/kaneko_tmap.h index b0adf2a105d..1ed745c231a 100644 --- a/src/mame/video/kaneko_tmap.h +++ b/src/mame/video/kaneko_tmap.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood class kaneko_view2_tilemap_device : public device_t diff --git a/src/mame/video/kickgoal.c b/src/mame/video/kickgoal.c index 849f1b33823..1c43dbe212a 100644 --- a/src/mame/video/kickgoal.c +++ b/src/mame/video/kickgoal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Kick Goal - video */ diff --git a/src/mame/video/konami_helper.c b/src/mame/video/konami_helper.c index 7868a907348..be2881ad82c 100644 --- a/src/mame/video/konami_helper.c +++ b/src/mame/video/konami_helper.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Konami Video Helper functions */ #include "emu.h" diff --git a/src/mame/video/konami_helper.h b/src/mame/video/konami_helper.h index 28fdb2470fb..0938217e778 100644 --- a/src/mame/video/konami_helper.h +++ b/src/mame/video/konami_helper.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Konami video helper functions */ #pragma once diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c index 3c5e4603da5..2897a11a62a 100644 --- a/src/mame/video/konamigx.c +++ b/src/mame/video/konamigx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Acho A. Tang, Phil Stroffolino, Olivier Galibert /* * video/konamigx.c - Konami GX video hardware (here there be dragons, and achocode) diff --git a/src/mame/video/kopunch.c b/src/mame/video/kopunch.c index f7771b7be21..ffeccc8637f 100644 --- a/src/mame/video/kopunch.c +++ b/src/mame/video/kopunch.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /************************************************************************* Sega KO Punch diff --git a/src/mame/video/lethal.c b/src/mame/video/lethal.c index 961eb45c4d8..d0e707224a8 100644 --- a/src/mame/video/lethal.c +++ b/src/mame/video/lethal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/video/liberatr.c b/src/mame/video/liberatr.c index 182781c49b0..af7b50584de 100644 --- a/src/mame/video/liberatr.c +++ b/src/mame/video/liberatr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** video/liberatr.c diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c index 9e35f9a6855..4bb6e2e59a0 100644 --- a/src/mame/video/lockon.c +++ b/src/mame/video/lockon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Lock-On video hardware diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c index 99388b994ed..2a5bd454da9 100644 --- a/src/mame/video/m58.c +++ b/src/mame/video/m58.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Lee Taylor, John Clegg /*************************************************************************** Irem M58 hardware diff --git a/src/mame/video/m62.c b/src/mame/video/m62.c index 50a8cee8b09..87b994a0cd1 100644 --- a/src/mame/video/m62.c +++ b/src/mame/video/m62.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:smf, David Haywood /*************************************************************************** Video Hardware for Irem Games: diff --git a/src/mame/video/macrossp.c b/src/mame/video/macrossp.c index d9fcb9d91dd..39019fa6634 100644 --- a/src/mame/video/macrossp.c +++ b/src/mame/video/macrossp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* video/macrossp.c */ diff --git a/src/mame/video/mainsnk.c b/src/mame/video/mainsnk.c index fe11f166031..7d895e3dce1 100644 --- a/src/mame/video/mainsnk.c +++ b/src/mame/video/mainsnk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Tomasz Slanina #include "emu.h" #include "includes/mainsnk.h" diff --git a/src/mame/video/malzak.c b/src/mame/video/malzak.c index afe97f24cc5..653e0c83628 100644 --- a/src/mame/video/malzak.c +++ b/src/mame/video/malzak.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Reip, Barry Rodewald +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli, Barry Rodewald /* Malzak diff --git a/src/mame/video/mb60553.c b/src/mame/video/mb60553.c index eff6125a091..b712003ff66 100644 --- a/src/mame/video/mb60553.c +++ b/src/mame/video/mb60553.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* This is the tilemap chip used by Grand Striker, Tecmo World Cup '94 and V Goal Soccer for the backgrounds the actual line scroll / zoom is not properly understood diff --git a/src/mame/video/mb60553.h b/src/mame/video/mb60553.h index 840c8ead500..248eca97e82 100644 --- a/src/mame/video/mb60553.h +++ b/src/mame/video/mb60553.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*** MB60553 **********************************************/ diff --git a/src/mame/video/mcatadv.c b/src/mame/video/mcatadv.c index e8c048790bd..e6f26d79dbd 100644 --- a/src/mame/video/mcatadv.c +++ b/src/mame/video/mcatadv.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Paul Priest, David Haywood /* Magical Cat Adventure / Nostradamus Video Hardware */ diff --git a/src/mame/video/mcd212.c b/src/mame/video/mcd212.c index ee9bfea88c2..5baa84b59e4 100644 --- a/src/mame/video/mcd212.c +++ b/src/mame/video/mcd212.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/video/mcd212.h b/src/mame/video/mcd212.h index 8800d0639d8..ea730c72f88 100644 --- a/src/mame/video/mcd212.h +++ b/src/mame/video/mcd212.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz /****************************************************************************** diff --git a/src/mame/video/megazone.c b/src/mame/video/megazone.c index 2d1004ee0af..f85fa158b17 100644 --- a/src/mame/video/megazone.c +++ b/src/mame/video/megazone.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** video.c diff --git a/src/mame/video/metro.c b/src/mame/video/metro.c index 339e02daaa5..17622b68686 100644 --- a/src/mame/video/metro.c +++ b/src/mame/video/metro.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia +// copyright-holders:Luca Elia, David Haywood /*************************************************************************** -= Metro Games =- diff --git a/src/mame/video/micro3d.c b/src/mame/video/micro3d.c index df8921b2fea..b1e41470df5 100644 --- a/src/mame/video/micro3d.c +++ b/src/mame/video/micro3d.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Microprose Games 3D hardware diff --git a/src/mame/video/midvunit.c b/src/mame/video/midvunit.c index 1ae3a0bb513..70aec627aaa 100644 --- a/src/mame/video/midvunit.c +++ b/src/mame/video/midvunit.c @@ -76,10 +76,15 @@ void midvunit_state::video_start() save_item(NAME(m_dma_data)); save_item(NAME(m_dma_data_index)); save_item(NAME(m_page_control)); - save_item(NAME(m_video_changed)); + + m_video_changed = TRUE; + machine().save().register_postload(save_prepost_delegate(FUNC(midvunit_state::postload), this)); } - +void midvunit_state::postload() +{ + m_video_changed = TRUE; +} /************************************* * diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c index 3e44a199bf9..28582266053 100644 --- a/src/mame/video/midzeus.c +++ b/src/mame/video/midzeus.c @@ -825,9 +825,9 @@ int midzeus_state::zeus_fifo_process(const UINT32 *data, int numwords) data[2] & 0xffff, data[2] >> 16, data[0] & 0xffff, data[3] & 0xffff, data[3] >> 16, data[1] >> 16, data[4] & 0xffff, data[4] >> 16, data[1] & 0xffff, - (float)(INT32)data[5] * (1.0f / 65536.0f), - (float)(INT32)data[6] * (1.0f / 65536.0f), - (float)(INT32)data[7] * (1.0f / (65536.0f * 512.0f))); + (double)(INT32)data[5] * (1.0 / 65536.0), + (double)(INT32)data[6] * (1.0 / 65536.0), + (double)(INT32)data[7] * (1.0 / (65536.0 * 512.0))); } /* extract the matrix from the raw data */ @@ -860,9 +860,9 @@ int midzeus_state::zeus_fifo_process(const UINT32 *data, int numwords) data[1] & 0xffff, data[2] & 0xffff, data[3] & 0xffff, data[1] >> 16, data[2] >> 16, data[3] >> 16, data[5] & 0xffff, data[6] & 0xffff, data[7] & 0xffff, - (float)(INT32)data[10] * (1.0f / 65536.0f), - (float)(INT32)data[11] * (1.0f / 65536.0f), - (float)(INT32)data[12] * (1.0f / (65536.0f * 512.0f))); + (double)(INT32)data[10] * (1.0 / 65536.0), + (double)(INT32)data[11] * (1.0 / 65536.0), + (double)(INT32)data[12] * (1.0 / (65536.0 * 512.0))); } /* extract the first matrix from the raw data */ @@ -1178,7 +1178,7 @@ void midzeus_state::zeus_draw_quad(int long_fmt, const UINT32 *databuffer, UINT3 if (logit) { logerror("\t\t(%f,%f,%f) (%02X,%02X) (%03X,%03X,%03X) dot=%08X\n", - vert[i].x * (1.0f / 65536.0f), vert[i].y * (1.0f / 65536.0f), vert[i].p[0] * (1.0f / 65536.0f), + (double) vert[i].x * (1.0 / 65536.0), (double) vert[i].y * (1.0 / 65536.0), (double) vert[i].p[0] * (1.0 / 65536.0), (int)(vert[i].p[1] / 256.0f), (int)(vert[i].p[2] / 256.0f), (databuffer[10 + i] >> 20) & 0x3ff, (databuffer[10 + i] >> 10) & 0x3ff, (databuffer[10 + i] >> 0) & 0x3ff, dotnormal); @@ -1202,7 +1202,7 @@ void midzeus_state::zeus_draw_quad(int long_fmt, const UINT32 *databuffer, UINT3 maxx = MAX(maxx, clipvert[i].x); maxy = MAX(maxy, clipvert[i].y); if (logit) - logerror("\t\t\tTranslated=(%f,%f)\n", clipvert[i].x, clipvert[i].y); + logerror("\t\t\tTranslated=(%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y); } for (i = 0; i < numverts; i++) { diff --git a/src/mame/video/midzeus2.c b/src/mame/video/midzeus2.c index 8522bca85d6..0d2a9936528 100644 --- a/src/mame/video/midzeus2.c +++ b/src/mame/video/midzeus2.c @@ -352,8 +352,8 @@ UINT32 midzeus2_state::screen_update_midzeus2(screen_device &screen, bitmap_rgb3 poly_wait(poly, "VIDEO_UPDATE"); -if (machine().input().code_pressed(KEYCODE_UP)) { zbase += 1.0f; popmessage("Zbase = %f", zbase); } -if (machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmessage("Zbase = %f", zbase); } +if (machine().input().code_pressed(KEYCODE_UP)) { zbase += 1.0f; popmessage("Zbase = %f", (double) zbase); } +if (machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmessage("Zbase = %f", (double) zbase); } /* normal update case */ if (!machine().input().code_pressed(KEYCODE_W)) @@ -808,12 +808,12 @@ int midzeus2_state::zeus2_fifo_process(const UINT32 *data, int numwords) { log_fifo_command(data, numwords, ""); logerror("\n\t\tmatrix ( %8.2f %8.2f %8.2f ) ( %8.2f %8.2f %8.2f ) ( %8.2f %8.2f %8.2f )\n\t\tvector %8.2f %8.2f %8.5f\n", - zeus_matrix[0][0], zeus_matrix[0][1], zeus_matrix[0][2], - zeus_matrix[1][0], zeus_matrix[1][1], zeus_matrix[1][2], - zeus_matrix[2][0], zeus_matrix[2][1], zeus_matrix[2][2], - zeus_point[0], - zeus_point[1], - zeus_point[2]); + (double) zeus_matrix[0][0], (double) zeus_matrix[0][1], (double) zeus_matrix[0][2], + (double) zeus_matrix[1][0], (double) zeus_matrix[1][1], (double) zeus_matrix[1][2], + (double) zeus_matrix[2][0], (double) zeus_matrix[2][1], (double) zeus_matrix[2][2], + (double) zeus_point[0], + (double) zeus_point[1], + (double) zeus_point[2]); } break; @@ -833,9 +833,9 @@ int midzeus2_state::zeus2_fifo_process(const UINT32 *data, int numwords) { log_fifo_command(data, numwords, ""); logerror("\n\t\tvector %8.2f %8.2f %8.5f\n", - zeus_point[0], - zeus_point[1], - zeus_point[2]); + (double) zeus_point[0], + (double) zeus_point[1], + (double) zeus_point[2]); } break; @@ -847,9 +847,9 @@ int midzeus2_state::zeus2_fifo_process(const UINT32 *data, int numwords) { log_fifo_command(data, numwords, " -- unknown control + hack clear screen\n"); logerror("\t\tvector %8.2f %8.2f %8.5f\n", - tms3203x_device::fp_to_float(data[1]), - tms3203x_device::fp_to_float(data[2]), - tms3203x_device::fp_to_float(data[3])); + (double) tms3203x_device::fp_to_float(data[1]), + (double) tms3203x_device::fp_to_float(data[2]), + (double) tms3203x_device::fp_to_float(data[3])); /* extract the translation point from the raw data */ zeus_point2[0] = tms3203x_device::fp_to_float(data[1]); @@ -1162,7 +1162,7 @@ In memory: if (logit) { logerror("\t\t(%f,%f,%f) (%02X,%02X)\n", - vert[i].x, vert[i].y, vert[i].p[0], + (double) vert[i].x, (double) vert[i].y, (double) vert[i].p[0], (int)(vert[i].p[1] / 256.0f), (int)(vert[i].p[2] / 256.0f)); } } @@ -1188,7 +1188,7 @@ In memory: maxx = MAX(maxx, clipvert[i].x); maxy = MAX(maxy, clipvert[i].y); if (logit) - logerror("\t\t\tTranslated=(%f,%f)\n", clipvert[i].x, clipvert[i].y); + logerror("\t\t\tTranslated=(%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y); } for (i = 0; i < numverts; i++) { diff --git a/src/mame/video/mitchell.c b/src/mame/video/mitchell.c index f33e9ae586b..f4c4007bf50 100644 --- a/src/mame/video/mitchell.c +++ b/src/mame/video/mitchell.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Pang Video Hardware diff --git a/src/mame/video/model1.c b/src/mame/video/model1.c index 61875e2b5bb..79fee351b93 100644 --- a/src/mame/video/model1.c +++ b/src/mame/video/model1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "video/segaic24.h" #include "cpu/mb86233/mb86233.h" @@ -900,8 +900,8 @@ void model1_state::push_object(UINT32 tex_adr, UINT32 poly_adr, UINT32 size) #endif float dif=mult_vector(&vn, &view->light); float spec=compute_specular(&vn,&view->light,dif,lightmode); - float ln=view->lightparams[lightmode].a + view->lightparams[lightmode].d*MAX(0.0,dif) + spec; - int lumval=255.0*MIN(1.0,ln); + float ln=view->lightparams[lightmode].a + view->lightparams[lightmode].d*MAX(0.0f,dif) + spec; + int lumval=255.0f*MIN(1.0f,ln); int color=m_paletteram16[0x1000|(m_tgp_ram[tex_adr-0x40000] & 0x3ff)]; int r=(color>>0x0)&0x1f; int g=(color>>0x5)&0x1f; @@ -1059,7 +1059,7 @@ UINT16 *model1_state::push_direct(UINT16 *list) cquad.p[3] = p1; cquad.z = z; { - int lumval=((float) (lum>>24)) * 2.0; + int lumval=((float) (lum>>24)) * 2.0f; int color=m_paletteram16[0x1000|(m_tgp_ram[tex_adr-0x40000] & 0x3ff)]; int r=(color>>0x0)&0x1f; int g=(color>>0x5)&0x1f; @@ -1265,9 +1265,9 @@ void model1_state::tgp_render(bitmap_rgb32 &bitmap, const rectangle &cliprect) for(i=0;i<len;++i) { int v=readi(list+6+i*2); - view->lightparams[i+adr].d=((float) (v&0xff))/255.0; - view->lightparams[i+adr].a=((float) ((v>>8)&0xff))/255.0; - view->lightparams[i+adr].s=((float) ((v>>16)&0xff))/255.0; + view->lightparams[i+adr].d=((float) (v&0xff))/255.0f; + view->lightparams[i+adr].a=((float) ((v>>8)&0xff))/255.0f; + view->lightparams[i+adr].s=((float) ((v>>16)&0xff))/255.0f; view->lightparams[i+adr].p=(v>>24)&0xff; } list += 6+len*2; @@ -1398,9 +1398,9 @@ void model1_state::tgp_scan() for(i=0;i<len;++i) { int v=readi(list+6+i*2); - view->lightparams[i+adr].d=((float) (v&0xff))/255.0; - view->lightparams[i+adr].a=((float) ((v>>8)&0xff))/255.0; - view->lightparams[i+adr].s=((float) ((v>>16)&0xff))/255.0; + view->lightparams[i+adr].d=((float) (v&0xff))/255.0f; + view->lightparams[i+adr].a=((float) ((v>>8)&0xff))/255.0f; + view->lightparams[i+adr].s=((float) ((v>>16)&0xff))/255.0f; view->lightparams[i+adr].p=(v>>24)&0xff; //LOG_TGP((" %02X\n",v)); } diff --git a/src/mame/video/model2.c b/src/mame/video/model2.c index a788f84aa4c..106ba7f4aa0 100644 --- a/src/mame/video/model2.c +++ b/src/mame/video/model2.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R. Belmont, Olivier Galibert, ElSemi +// copyright-holders:R. Belmont, Olivier Galibert, ElSemi, Angelo Salese /********************************************************************************************************************************* Sega Model 2 Geometry Engine and 3D Rasterizer Emulation diff --git a/src/mame/video/model2rd.inc b/src/mame/video/model2rd.inc index a2696326bb5..d646b8a3a11 100644 --- a/src/mame/video/model2rd.inc +++ b/src/mame/video/model2rd.inc @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Olivier Galibert, ElSemi, Angelo Salese /******************************************************************** Sega Model 2 3D rasterization functions diff --git a/src/mame/video/moo.c b/src/mame/video/moo.c index bd1bf087e32..237ccbb3a32 100644 --- a/src/mame/video/moo.c +++ b/src/mame/video/moo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Acho A. Tang /*************************************************************************** diff --git a/src/mame/video/mosaic.c b/src/mame/video/mosaic.c index af6d2f3007a..2c061748538 100644 --- a/src/mame/video/mosaic.c +++ b/src/mame/video/mosaic.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** mosaic.c diff --git a/src/mame/video/mouser.c b/src/mame/video/mouser.c index 090d90a1f19..649e13bc616 100644 --- a/src/mame/video/mouser.c +++ b/src/mame/video/mouser.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /******************************************************************************* diff --git a/src/mame/video/mrflea.c b/src/mame/video/mrflea.c index 226efff9bbb..0c4f398411e 100644 --- a/src/mame/video/mrflea.c +++ b/src/mame/video/mrflea.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /****************************************************************** Mr. F. Lea diff --git a/src/mame/video/mrjong.c b/src/mame/video/mrjong.c index 85a80b1b534..b3cd7e862d0 100644 --- a/src/mame/video/mrjong.c +++ b/src/mame/video/mrjong.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Takahiro Nogi /*************************************************************************** video.c diff --git a/src/mame/video/ms32.c b/src/mame/video/ms32.c index 335d5c2ade9..c9d7fade01c 100644 --- a/src/mame/video/ms32.c +++ b/src/mame/video/ms32.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Jaleco MegaSystem 32 Video Hardware */ diff --git a/src/mame/video/mugsmash.c b/src/mame/video/mugsmash.c index e3bd5e3c87f..accac9774f4 100644 --- a/src/mame/video/mugsmash.c +++ b/src/mame/video/mugsmash.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* video/mugsmash.c - see drivers/mugsmash.c for more info */ diff --git a/src/mame/video/munchmo.c b/src/mame/video/munchmo.c index f3b9b10b2b6..afd986d0f68 100644 --- a/src/mame/video/munchmo.c +++ b/src/mame/video/munchmo.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino #include "emu.h" #include "includes/munchmo.h" diff --git a/src/mame/video/mystwarr.c b/src/mame/video/mystwarr.c index e8ba98a9c9c..cc1fae95486 100644 --- a/src/mame/video/mystwarr.c +++ b/src/mame/video/mystwarr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Phil Stroffolino, Acho Tang, Nicola Salmoria #define MW_VERBOSE 0 diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c index 17681d9fc90..1d76af57e30 100644 --- a/src/mame/video/n64.c +++ b/src/mame/video/n64.c @@ -29,29 +29,29 @@ TODO: #define LOG_RDP_EXECUTION 0 -static FILE *rdp_exec; +static FILE* rdp_exec; UINT32 n64_rdp::s_special_9bit_clamptable[512]; bool n64_rdp::rdp_range_check(UINT32 addr) { - if(MiscState.FBSize == 0) return false; + if(m_misc_state.m_fb_size == 0) return false; - int fbcount = ((MiscState.FBWidth * Scissor.m_yl) << (MiscState.FBSize - 1)) * 3; - int fbaddr = MiscState.FBAddress & 0x007fffff; + INT32 fbcount = ((m_misc_state.m_fb_width * m_scissor.m_yl) << (m_misc_state.m_fb_size - 1)) * 3; + INT32 fbaddr = m_misc_state.m_fb_address & 0x007fffff; if ((addr >= fbaddr) && (addr < (fbaddr + fbcount))) { return false; } - int zbcount = MiscState.FBWidth * Scissor.m_yl * 2; - int zbaddr = MiscState.ZBAddress & 0x007fffff; + INT32 zbcount = m_misc_state.m_fb_width * m_scissor.m_yl * 2; + INT32 zbaddr = m_misc_state.m_zb_address & 0x007fffff; if ((addr >= zbaddr) && (addr < (zbaddr + zbcount))) { return false; } - printf("Check failed: %08x vs. %08x-%08x, %08x-%08x (%d, %d)\n", addr, fbaddr, fbaddr + fbcount, zbaddr, zbaddr + zbcount, MiscState.FBWidth, Scissor.m_yl); + printf("Check failed: %08x vs. %08x-%08x, %08x-%08x (%d, %d)\n", addr, fbaddr, fbaddr + fbcount, zbaddr, zbaddr + zbcount, m_misc_state.m_fb_width, m_scissor.m_yl); fflush(stdout); return true; } @@ -61,20 +61,20 @@ bool n64_rdp::rdp_range_check(UINT32 addr) // The functions in this file should be moved into the parent Processor class. #include "rdpfiltr.inc" -void n64_rdp::GetAlphaCvg(UINT8 *comb_alpha, rdp_span_aux *userdata, const rdp_poly_state &object) +void n64_rdp::get_alpha_cvg(UINT8* comb_alpha, rdp_span_aux* userdata, const rdp_poly_state &object) { INT32 temp = *comb_alpha; - INT32 temp2 = userdata->CurrentPixCvg; + INT32 temp2 = userdata->m_current_pix_cvg; INT32 temp3 = 0; - if (object.OtherModes.cvg_times_alpha) + if (object.m_other_modes.cvg_times_alpha) { temp3 = (temp * temp2) + 4; - userdata->CurrentPixCvg = (temp3 >> 8) & 0xf; + userdata->m_current_pix_cvg = (temp3 >> 8) & 0xf; } - if (object.OtherModes.alpha_cvg_select) + if (object.m_other_modes.alpha_cvg_select) { - temp = (OtherModes.cvg_times_alpha) ? (temp3 >> 3) : (temp2 << 5); + temp = (m_other_modes.cvg_times_alpha) ? (temp3 >> 3) : (temp2 << 5); } if (temp > 0xff) { @@ -85,37 +85,37 @@ void n64_rdp::GetAlphaCvg(UINT8 *comb_alpha, rdp_span_aux *userdata, const rdp_p /*****************************************************************************/ -void n64_rdp::VideoUpdate(n64_periphs *n64, bitmap_rgb32 &bitmap) +void n64_rdp::video_update(n64_periphs* n64, bitmap_rgb32 &bitmap) { switch(n64->vi_control & 0x3) { case PIXEL_SIZE_16BIT: - VideoUpdate16(n64, bitmap); + video_update16(n64, bitmap); break; case PIXEL_SIZE_32BIT: - VideoUpdate32(n64, bitmap); + video_update32(n64, bitmap); break; default: - //fatalerror("Unsupported framebuffer depth: m_fb_size=%d\n", MiscState.FBSize); + //fatalerror("Unsupported framebuffer depth: m_fb_size=%d\n", m_misc_state.m_fb_size); break; } } -void n64_rdp::VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap) +void n64_rdp::video_update16(n64_periphs* n64, bitmap_rgb32 &bitmap) { - //int fsaa = (((n64->vi_control >> 8) & 3) < 2); - //int divot = (n64->vi_control >> 4) & 1; + //INT32 fsaa = (((n64->vi_control >> 8) & 3) < 2); + //INT32 divot = (n64->vi_control >> 4) & 1; //UINT32 prev_cvg = 0; //UINT32 next_cvg = 0; - //int dither_filter = (n64->vi_control >> 16) & 1; - //int vibuffering = ((n64->vi_control & 2) && fsaa && divot); + //INT32 dither_filter = (n64->vi_control >> 16) & 1; + //INT32 vibuffering = ((n64->vi_control & 2) && fsaa && divot); - UINT16 *frame_buffer = (UINT16*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; + UINT16* frame_buffer = (UINT16*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; //UINT32 hb = ((n64->vi_origin & 0xffffff) >> 2) >> 1; - //UINT8* hidden_buffer = &HiddenBits[hb]; + //UINT8* hidden_buffer = &m_hidden_bits[hb]; INT32 hdiff = (n64->vi_hstart & 0x3ff) - ((n64->vi_hstart >> 16) & 0x3ff); float hcoeff = ((float)(n64->vi_xscale & 0xfff) / (1 << 10)); @@ -146,17 +146,17 @@ void n64_rdp::VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap) if (frame_buffer) { - for(int j = 0; j < vres; j++) + for(INT32 j = 0; j < vres; j++) { - UINT32 *d = &bitmap.pix32(j); + UINT32* d = &bitmap.pix32(j); - for(int i = 0; i < hres; i++) + for(INT32 i = 0; i < hres; i++) { - Color c; - //int r, g, b; + color_t c; + //INT32 r, g, b; UINT16 pix = frame_buffer[pixels ^ WORD_ADDR_XOR]; - //MiscState.CurrentPixCvg = ((pix & 1) << 2) | (hidden_buffer[pixels ^ BYTE_ADDR_XOR] & 3); + //m_misc_state.m_current_pix_cvg = ((pix & 1) << 2) | (hidden_buffer[pixels ^ BYTE_ADDR_XOR] & 3); //if(divot) //{ @@ -172,12 +172,12 @@ void n64_rdp::VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap) //if(fsaa) //{ - //if (/*!vibuffering &&*/ state->m_rdp.MiscState.CurrentPixCvg < 7 && i > 1 && j > 1 && i < (hres - 2) && j < (vres - 2)) + //if (/*!vibuffering &&*/ state->m_rdp.m_misc_state.m_current_pix_cvg < 7 && i > 1 && j > 1 && i < (hres - 2) && j < (vres - 2)) //{ //video_filter16(&c.i.r, &c.i.g, &c.i.b, &frame_buffer[pixels ^ WORD_ADDR_XOR],&hidden_buffer[pixels ^ BYTE_ADDR_XOR], n64->vi_width); //} //} - //else if (dither_filter && state->m_rdp.MiscState.CurrentPixCvg == 7 && i > 0 && j > 0 && i < (hres - 1) && j < (vres - 1)) + //else if (dither_filter && state->m_rdp.m_misc_state.m_current_pix_cvg == 7 && i > 0 && j > 0 && i < (hres - 1) && j < (vres - 1)) //{ //if (vibuffering) //{ @@ -190,7 +190,7 @@ void n64_rdp::VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap) //} //if(divot) //{ - //if (i > 0 && i < (hres - 1) && (MiscState.CurrentPixCvg != 7 || prev_cvg != 7 || next_cvg != 7)) + //if (i > 0 && i < (hres - 1) && (m_misc_state.m_current_pix_cvg != 7 || prev_cvg != 7 || next_cvg != 7)) //{ //if (vibuffering) //{ @@ -242,13 +242,13 @@ void n64_rdp::VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap) } } -void n64_rdp::VideoUpdate32(n64_periphs *n64, bitmap_rgb32 &bitmap) +void n64_rdp::video_update32(n64_periphs* n64, bitmap_rgb32 &bitmap) { - int gamma = (n64->vi_control >> 3) & 1; - int gamma_dither = (n64->vi_control >> 2) & 1; - //int vibuffering = ((n64->vi_control & 2) && fsaa && divot); + INT32 gamma = (n64->vi_control >> 3) & 1; + INT32 gamma_dither = (n64->vi_control >> 2) & 1; + //INT32 vibuffering = ((n64->vi_control & 2) && fsaa && divot); - UINT32 *frame_buffer32 = (UINT32*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; + UINT32* frame_buffer32 = (UINT32*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; const INT32 hdiff = (n64->vi_hstart & 0x3ff) - ((n64->vi_hstart >> 16) & 0x3ff); const float hcoeff = ((float)(n64->vi_xscale & 0xfff) / (1 << 10)); @@ -272,21 +272,21 @@ void n64_rdp::VideoUpdate32(n64_periphs *n64, bitmap_rgb32 &bitmap) if (frame_buffer32) { - for (int j = 0; j < vres; j++) + for (INT32 j = 0; j < vres; j++) { - UINT32 *d = &bitmap.pix32(j); - for (int i = 0; i < hres; i++) + UINT32* d = &bitmap.pix32(j); + for (INT32 i = 0; i < hres; i++) { UINT32 pix = *frame_buffer32++; if (gamma || gamma_dither) { - int r = (pix >> 24) & 0xff; - int g = (pix >> 16) & 0xff; - int b = (pix >> 8) & 0xff; - int dith = 0; + INT32 r = (pix >> 24) & 0xff; + INT32 g = (pix >> 16) & 0xff; + INT32 b = (pix >> 8) & 0xff; + INT32 dith = 0; if (gamma_dither) { - dith = GetRandom() & 0x3f; + dith = get_random() & 0x3f; } if (gamma) { @@ -325,15 +325,15 @@ void n64_rdp::VideoUpdate32(n64_periphs *n64, bitmap_rgb32 &bitmap) /*****************************************************************************/ -void n64_rdp::TCDivNoPersp(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) +void n64_rdp::tc_div_no_perspective(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) { *sss = (SIGN16(ss)) & 0x1ffff; *sst = (SIGN16(st)) & 0x1ffff; } -void n64_rdp::TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) +void n64_rdp::tc_div(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) { - int w_carry = 0; + INT32 w_carry = 0; if ((sw & 0x8000) || !(sw & 0x7fff)) { w_carry = 1; @@ -341,26 +341,26 @@ void n64_rdp::TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) sw &= 0x7fff; - int shift; + INT32 shift; for (shift = 1; shift <= 14 && !((sw << shift) & 0x8000); shift++); shift -= 1; - int normout = (sw << shift) & 0x3fff; - int wnorm = (normout & 0xff) << 2; + INT32 normout = (sw << shift) & 0x3fff; + INT32 wnorm = (normout & 0xff) << 2; normout >>= 8; - int temppoint = m_norm_point_rom[normout]; - int tempslope = m_norm_slope_rom[normout]; + INT32 temppoint = m_norm_point_rom[normout]; + INT32 tempslope = m_norm_slope_rom[normout]; - int tlu_rcp = ((-(tempslope * wnorm)) >> 10) + temppoint; + INT32 tlu_rcp = ((-(tempslope * wnorm)) >> 10) + temppoint; - int sprod = SIGN16(ss) * tlu_rcp; - int tprod = SIGN16(st) * tlu_rcp; - int tempmask = ((1 << (shift + 1)) - 1) << (29 - shift); - int shift_value = 13 - shift; + INT32 sprod = SIGN16(ss) * tlu_rcp; + INT32 tprod = SIGN16(st) * tlu_rcp; + INT32 tempmask = ((1 << (shift + 1)) - 1) << (29 - shift); + INT32 shift_value = 13 - shift; - int outofbounds_s = sprod & tempmask; - int outofbounds_t = tprod & tempmask; + INT32 outofbounds_s = sprod & tempmask; + INT32 outofbounds_t = tprod & tempmask; if (shift == 0xe) { *sss = sprod << 1; @@ -372,10 +372,10 @@ void n64_rdp::TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) *sst = tprod = (tprod >> shift_value); } //compute clamp flags - int under_s = 0; - int under_t = 0; - int over_s = 0; - int over_t = 0; + INT32 under_s = 0; + INT32 under_t = 0; + INT32 over_s = 0; + INT32 over_t = 0; if (outofbounds_s != tempmask && outofbounds_s != 0) { @@ -408,7 +408,7 @@ void n64_rdp::TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst) *sst = (*sst & 0x1ffff) | (over_t << 18) | (under_t << 17); } -INT32 n64_rdp::ColorCombinerEquation(INT32 a, INT32 b, INT32 c, INT32 d) +INT32 n64_rdp::color_combiner_equation(INT32 a, INT32 b, INT32 c, INT32 d) { a = KURT_AKELEY_SIGN9(a); b = KURT_AKELEY_SIGN9(b); @@ -420,7 +420,7 @@ INT32 n64_rdp::ColorCombinerEquation(INT32 a, INT32 b, INT32 c, INT32 d) return a; } -INT32 n64_rdp::AlphaCombinerEquation(INT32 a, INT32 b, INT32 c, INT32 d) +INT32 n64_rdp::alpha_combiner_equation(INT32 a, INT32 b, INT32 c, INT32 d) { a = KURT_AKELEY_SIGN9(a); b = KURT_AKELEY_SIGN9(b); @@ -432,118 +432,118 @@ INT32 n64_rdp::AlphaCombinerEquation(INT32 a, INT32 b, INT32 c, INT32 d) return a; } -void n64_rdp::SetSubAInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata) +void n64_rdp::set_suba_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata) { switch (code & 0xf) { - case 0: *input_r = &userdata->CombinedColor.i.r; *input_g = &userdata->CombinedColor.i.g; *input_b = &userdata->CombinedColor.i.b; break; - case 1: *input_r = &userdata->Texel0Color.i.r; *input_g = &userdata->Texel0Color.i.g; *input_b = &userdata->Texel0Color.i.b; break; - case 2: *input_r = &userdata->Texel1Color.i.r; *input_g = &userdata->Texel1Color.i.g; *input_b = &userdata->Texel1Color.i.b; break; - case 3: *input_r = &userdata->PrimColor.i.r; *input_g = &userdata->PrimColor.i.g; *input_b = &userdata->PrimColor.i.b; break; - case 4: *input_r = &userdata->ShadeColor.i.r; *input_g = &userdata->ShadeColor.i.g; *input_b = &userdata->ShadeColor.i.b; break; - case 5: *input_r = &userdata->EnvColor.i.r; *input_g = &userdata->EnvColor.i.g; *input_b = &userdata->EnvColor.i.b; break; - case 6: *input_r = &OneColor.i.r; *input_g = &OneColor.i.g; *input_b = &OneColor.i.b; break; - case 7: *input_r = &userdata->NoiseColor.i.r; *input_g = &userdata->NoiseColor.i.g; *input_b = &userdata->NoiseColor.i.b; break; + case 0: *input_r = &userdata->m_combined_color.i.r; *input_g = &userdata->m_combined_color.i.g; *input_b = &userdata->m_combined_color.i.b; break; + case 1: *input_r = &userdata->m_texel0_color.i.r; *input_g = &userdata->m_texel0_color.i.g; *input_b = &userdata->m_texel0_color.i.b; break; + case 2: *input_r = &userdata->m_texel1_color.i.r; *input_g = &userdata->m_texel1_color.i.g; *input_b = &userdata->m_texel1_color.i.b; break; + case 3: *input_r = &userdata->m_prim_color.i.r; *input_g = &userdata->m_prim_color.i.g; *input_b = &userdata->m_prim_color.i.b; break; + case 4: *input_r = &userdata->m_shade_color.i.r; *input_g = &userdata->m_shade_color.i.g; *input_b = &userdata->m_shade_color.i.b; break; + case 5: *input_r = &userdata->m_env_color.i.r; *input_g = &userdata->m_env_color.i.g; *input_b = &userdata->m_env_color.i.b; break; + case 6: *input_r = &m_one.i.r; *input_g = &m_one.i.g; *input_b = &m_one.i.b; break; + case 7: *input_r = &userdata->m_noise_color.i.r; *input_g = &userdata->m_noise_color.i.g; *input_b = &userdata->m_noise_color.i.b; break; case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: { - *input_r = &ZeroColor.i.r; *input_g = &ZeroColor.i.g; *input_b = &ZeroColor.i.b; break; + *input_r = &m_zero.i.r; *input_g = &m_zero.i.g; *input_b = &m_zero.i.b; break; } } } -void n64_rdp::SetSubBInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata) +void n64_rdp::set_subb_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata) { switch (code & 0xf) { - case 0: *input_r = &userdata->CombinedColor.i.r; *input_g = &userdata->CombinedColor.i.g; *input_b = &userdata->CombinedColor.i.b; break; - case 1: *input_r = &userdata->Texel0Color.i.r; *input_g = &userdata->Texel0Color.i.g; *input_b = &userdata->Texel0Color.i.b; break; - case 2: *input_r = &userdata->Texel1Color.i.r; *input_g = &userdata->Texel1Color.i.g; *input_b = &userdata->Texel1Color.i.b; break; - case 3: *input_r = &userdata->PrimColor.i.r; *input_g = &userdata->PrimColor.i.g; *input_b = &userdata->PrimColor.i.b; break; - case 4: *input_r = &userdata->ShadeColor.i.r; *input_g = &userdata->ShadeColor.i.g; *input_b = &userdata->ShadeColor.i.b; break; - case 5: *input_r = &userdata->EnvColor.i.r; *input_g = &userdata->EnvColor.i.g; *input_b = &userdata->EnvColor.i.b; break; + case 0: *input_r = &userdata->m_combined_color.i.r; *input_g = &userdata->m_combined_color.i.g; *input_b = &userdata->m_combined_color.i.b; break; + case 1: *input_r = &userdata->m_texel0_color.i.r; *input_g = &userdata->m_texel0_color.i.g; *input_b = &userdata->m_texel0_color.i.b; break; + case 2: *input_r = &userdata->m_texel1_color.i.r; *input_g = &userdata->m_texel1_color.i.g; *input_b = &userdata->m_texel1_color.i.b; break; + case 3: *input_r = &userdata->m_prim_color.i.r; *input_g = &userdata->m_prim_color.i.g; *input_b = &userdata->m_prim_color.i.b; break; + case 4: *input_r = &userdata->m_shade_color.i.r; *input_g = &userdata->m_shade_color.i.g; *input_b = &userdata->m_shade_color.i.b; break; + case 5: *input_r = &userdata->m_env_color.i.r; *input_g = &userdata->m_env_color.i.g; *input_b = &userdata->m_env_color.i.b; break; case 6: fatalerror("SET_SUBB_RGB_INPUT: key_center\n"); - case 7: *input_r = (UINT8*)&m_k4; *input_g = (UINT8*)&m_k4; *input_b = (UINT8*)&m_k4; break; + case 7: *input_r = (UINT8*)&m_k4; *input_g = (UINT8*)&m_k4; *input_b = (UINT8*)&m_k4; break; case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: { - *input_r = &ZeroColor.i.r; *input_g = &ZeroColor.i.g; *input_b = &ZeroColor.i.b; break; + *input_r = &m_zero.i.r; *input_g = &m_zero.i.g; *input_b = &m_zero.i.b; break; } } } -void n64_rdp::SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata) +void n64_rdp::set_mul_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata) { switch (code & 0x1f) { - case 0: *input_r = &userdata->CombinedColor.i.r; *input_g = &userdata->CombinedColor.i.g; *input_b = &userdata->CombinedColor.i.b; break; - case 1: *input_r = &userdata->Texel0Color.i.r; *input_g = &userdata->Texel0Color.i.g; *input_b = &userdata->Texel0Color.i.b; break; - case 2: *input_r = &userdata->Texel1Color.i.r; *input_g = &userdata->Texel1Color.i.g; *input_b = &userdata->Texel1Color.i.b; break; - case 3: *input_r = &userdata->PrimColor.i.r; *input_g = &userdata->PrimColor.i.g; *input_b = &userdata->PrimColor.i.b; break; - case 4: *input_r = &userdata->ShadeColor.i.r; *input_g = &userdata->ShadeColor.i.g; *input_b = &userdata->ShadeColor.i.b; break; - case 5: *input_r = &userdata->EnvColor.i.r; *input_g = &userdata->EnvColor.i.g; *input_b = &userdata->EnvColor.i.b; break; - case 6: *input_r = &userdata->KeyScale.i.r; *input_g = &userdata->KeyScale.i.g; *input_b = &userdata->KeyScale.i.b; break; - case 7: *input_r = &userdata->CombinedColor.i.a; *input_g = &userdata->CombinedColor.i.a; *input_b = &userdata->CombinedColor.i.a; break; - case 8: *input_r = &userdata->Texel0Color.i.a; *input_g = &userdata->Texel0Color.i.a; *input_b = &userdata->Texel0Color.i.a; break; - case 9: *input_r = &userdata->Texel1Color.i.a; *input_g = &userdata->Texel1Color.i.a; *input_b = &userdata->Texel1Color.i.a; break; - case 10: *input_r = &userdata->PrimColor.i.a; *input_g = &userdata->PrimColor.i.a; *input_b = &userdata->PrimColor.i.a; break; - case 11: *input_r = &userdata->ShadeColor.i.a; *input_g = &userdata->ShadeColor.i.a; *input_b = &userdata->ShadeColor.i.a; break; - case 12: *input_r = &userdata->EnvColor.i.a; *input_g = &userdata->EnvColor.i.a; *input_b = &userdata->EnvColor.i.a; break; - case 13: *input_r = &userdata->LODFraction; *input_g = &userdata->LODFraction; *input_b = &userdata->LODFraction; break; - case 14: *input_r = &userdata->PrimLODFraction; *input_g = &userdata->PrimLODFraction; *input_b = &userdata->PrimLODFraction; break; + case 0: *input_r = &userdata->m_combined_color.i.r; *input_g = &userdata->m_combined_color.i.g; *input_b = &userdata->m_combined_color.i.b; break; + case 1: *input_r = &userdata->m_texel0_color.i.r; *input_g = &userdata->m_texel0_color.i.g; *input_b = &userdata->m_texel0_color.i.b; break; + case 2: *input_r = &userdata->m_texel1_color.i.r; *input_g = &userdata->m_texel1_color.i.g; *input_b = &userdata->m_texel1_color.i.b; break; + case 3: *input_r = &userdata->m_prim_color.i.r; *input_g = &userdata->m_prim_color.i.g; *input_b = &userdata->m_prim_color.i.b; break; + case 4: *input_r = &userdata->m_shade_color.i.r; *input_g = &userdata->m_shade_color.i.g; *input_b = &userdata->m_shade_color.i.b; break; + case 5: *input_r = &userdata->m_env_color.i.r; *input_g = &userdata->m_env_color.i.g; *input_b = &userdata->m_env_color.i.b; break; + case 6: *input_r = &userdata->m_key_scale.i.r; *input_g = &userdata->m_key_scale.i.g; *input_b = &userdata->m_key_scale.i.b; break; + case 7: *input_r = &userdata->m_combined_color.i.a; *input_g = &userdata->m_combined_color.i.a; *input_b = &userdata->m_combined_color.i.a; break; + case 8: *input_r = &userdata->m_texel0_color.i.a; *input_g = &userdata->m_texel0_color.i.a; *input_b = &userdata->m_texel0_color.i.a; break; + case 9: *input_r = &userdata->m_texel1_color.i.a; *input_g = &userdata->m_texel1_color.i.a; *input_b = &userdata->m_texel1_color.i.a; break; + case 10: *input_r = &userdata->m_prim_color.i.a; *input_g = &userdata->m_prim_color.i.a; *input_b = &userdata->m_prim_color.i.a; break; + case 11: *input_r = &userdata->m_shade_color.i.a; *input_g = &userdata->m_shade_color.i.a; *input_b = &userdata->m_shade_color.i.a; break; + case 12: *input_r = &userdata->m_env_color.i.a; *input_g = &userdata->m_env_color.i.a; *input_b = &userdata->m_env_color.i.a; break; + case 13: *input_r = &userdata->m_lod_fraction; *input_g = &userdata->m_lod_fraction; *input_b = &userdata->m_lod_fraction; break; + case 14: *input_r = &userdata->m_prim_lod_fraction; *input_g = &userdata->m_prim_lod_fraction; *input_b = &userdata->m_prim_lod_fraction; break; case 15: *input_r = (UINT8*)&m_k5; *input_g = (UINT8*)&m_k5; *input_b = (UINT8*)&m_k5; break; case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: { - *input_r = &ZeroColor.i.r; *input_g = &ZeroColor.i.g; *input_b = &ZeroColor.i.b; break; + *input_r = &m_zero.i.r; *input_g = &m_zero.i.g; *input_b = &m_zero.i.b; break; } } } -void n64_rdp::SetAddInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata) +void n64_rdp::set_add_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata) { switch (code & 0x7) { - case 0: *input_r = &userdata->CombinedColor.i.r; *input_g = &userdata->CombinedColor.i.g; *input_b = &userdata->CombinedColor.i.b; break; - case 1: *input_r = &userdata->Texel0Color.i.r; *input_g = &userdata->Texel0Color.i.g; *input_b = &userdata->Texel0Color.i.b; break; - case 2: *input_r = &userdata->Texel1Color.i.r; *input_g = &userdata->Texel1Color.i.g; *input_b = &userdata->Texel1Color.i.b; break; - case 3: *input_r = &userdata->PrimColor.i.r; *input_g = &userdata->PrimColor.i.g; *input_b = &userdata->PrimColor.i.b; break; - case 4: *input_r = &userdata->ShadeColor.i.r; *input_g = &userdata->ShadeColor.i.g; *input_b = &userdata->ShadeColor.i.b; break; - case 5: *input_r = &userdata->EnvColor.i.r; *input_g = &userdata->EnvColor.i.g; *input_b = &userdata->EnvColor.i.b; break; - case 6: *input_r = &OneColor.i.r; *input_g = &OneColor.i.g; *input_b = &OneColor.i.b; break; - case 7: *input_r = &ZeroColor.i.r; *input_g = &ZeroColor.i.g; *input_b = &ZeroColor.i.b; break; + case 0: *input_r = &userdata->m_combined_color.i.r; *input_g = &userdata->m_combined_color.i.g; *input_b = &userdata->m_combined_color.i.b; break; + case 1: *input_r = &userdata->m_texel0_color.i.r; *input_g = &userdata->m_texel0_color.i.g; *input_b = &userdata->m_texel0_color.i.b; break; + case 2: *input_r = &userdata->m_texel1_color.i.r; *input_g = &userdata->m_texel1_color.i.g; *input_b = &userdata->m_texel1_color.i.b; break; + case 3: *input_r = &userdata->m_prim_color.i.r; *input_g = &userdata->m_prim_color.i.g; *input_b = &userdata->m_prim_color.i.b; break; + case 4: *input_r = &userdata->m_shade_color.i.r; *input_g = &userdata->m_shade_color.i.g; *input_b = &userdata->m_shade_color.i.b; break; + case 5: *input_r = &userdata->m_env_color.i.r; *input_g = &userdata->m_env_color.i.g; *input_b = &userdata->m_env_color.i.b; break; + case 6: *input_r = &m_one.i.r; *input_g = &m_one.i.g; *input_b = &m_one.i.b; break; + case 7: *input_r = &m_zero.i.r; *input_g = &m_zero.i.g; *input_b = &m_zero.i.b; break; } } -void n64_rdp::SetSubInputAlpha(UINT8 **input, int code, rdp_span_aux *userdata) +void n64_rdp::set_sub_input_alpha(UINT8** input, INT32 code, rdp_span_aux* userdata) { switch (code & 0x7) { - case 0: *input = &userdata->CombinedColor.i.a; break; - case 1: *input = &userdata->Texel0Color.i.a; break; - case 2: *input = &userdata->Texel1Color.i.a; break; - case 3: *input = &userdata->PrimColor.i.a; break; - case 4: *input = &userdata->ShadeColor.i.a; break; - case 5: *input = &userdata->EnvColor.i.a; break; - case 6: *input = &OneColor.i.a; break; - case 7: *input = &ZeroColor.i.a; break; + case 0: *input = &userdata->m_combined_color.i.a; break; + case 1: *input = &userdata->m_texel0_color.i.a; break; + case 2: *input = &userdata->m_texel1_color.i.a; break; + case 3: *input = &userdata->m_prim_color.i.a; break; + case 4: *input = &userdata->m_shade_color.i.a; break; + case 5: *input = &userdata->m_env_color.i.a; break; + case 6: *input = &m_one.i.a; break; + case 7: *input = &m_zero.i.a; break; } } -void n64_rdp::SetMulInputAlpha(UINT8 **input, int code, rdp_span_aux *userdata) +void n64_rdp::set_mul_input_alpha(UINT8** input, INT32 code, rdp_span_aux* userdata) { switch (code & 0x7) { - case 0: *input = &userdata->LODFraction; break; - case 1: *input = &userdata->Texel0Color.i.a; break; - case 2: *input = &userdata->Texel1Color.i.a; break; - case 3: *input = &userdata->PrimColor.i.a; break; - case 4: *input = &userdata->ShadeColor.i.a; break; - case 5: *input = &userdata->EnvColor.i.a; break; - case 6: *input = &userdata->PrimLODFraction; break; - case 7: *input = &ZeroColor.i.a; break; + case 0: *input = &userdata->m_lod_fraction; break; + case 1: *input = &userdata->m_texel0_color.i.a; break; + case 2: *input = &userdata->m_texel1_color.i.a; break; + case 3: *input = &userdata->m_prim_color.i.a; break; + case 4: *input = &userdata->m_shade_color.i.a; break; + case 5: *input = &userdata->m_env_color.i.a; break; + case 6: *input = &userdata->m_prim_lod_fraction; break; + case 7: *input = &m_zero.i.a; break; } } -void n64_rdp::SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, UINT8 **input_a, int a, int b, rdp_span_aux *userdata) +void n64_rdp::set_blender_input(INT32 cycle, INT32 which, UINT8** input_r, UINT8** input_g, UINT8** input_b, UINT8** input_a, INT32 a, INT32 b, rdp_span_aux* userdata) { switch (a & 0x3) { @@ -551,40 +551,40 @@ void n64_rdp::SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **inp { if (cycle == 0) { - *input_r = &userdata->PixelColor.i.r; - *input_g = &userdata->PixelColor.i.g; - *input_b = &userdata->PixelColor.i.b; + *input_r = &userdata->m_pixel_color.i.r; + *input_g = &userdata->m_pixel_color.i.g; + *input_b = &userdata->m_pixel_color.i.b; } else { - *input_r = &userdata->BlendedPixelColor.i.r; - *input_g = &userdata->BlendedPixelColor.i.g; - *input_b = &userdata->BlendedPixelColor.i.b; + *input_r = &userdata->m_blended_pixel_color.i.r; + *input_g = &userdata->m_blended_pixel_color.i.g; + *input_b = &userdata->m_blended_pixel_color.i.b; } break; } case 1: { - *input_r = &userdata->MemoryColor.i.r; - *input_g = &userdata->MemoryColor.i.g; - *input_b = &userdata->MemoryColor.i.b; + *input_r = &userdata->m_memory_color.i.r; + *input_g = &userdata->m_memory_color.i.g; + *input_b = &userdata->m_memory_color.i.b; break; } case 2: { - *input_r = &userdata->BlendColor.i.r; - *input_g = &userdata->BlendColor.i.g; - *input_b = &userdata->BlendColor.i.b; + *input_r = &userdata->m_blend_color.i.r; + *input_g = &userdata->m_blend_color.i.g; + *input_b = &userdata->m_blend_color.i.b; break; } case 3: { - *input_r = &userdata->FogColor.i.r; - *input_g = &userdata->FogColor.i.g; - *input_b = &userdata->FogColor.i.b; + *input_r = &userdata->m_fog_color.i.r; + *input_g = &userdata->m_fog_color.i.g; + *input_b = &userdata->m_fog_color.i.b; break; } } @@ -593,20 +593,20 @@ void n64_rdp::SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **inp { switch (b & 0x3) { - case 0: *input_a = &userdata->PixelColor.i.a; break; - case 1: *input_a = &userdata->FogColor.i.a; break; - case 2: *input_a = &userdata->ShadeColor.i.a; break; - case 3: *input_a = &ZeroColor.i.a; break; + case 0: *input_a = &userdata->m_pixel_color.i.a; break; + case 1: *input_a = &userdata->m_fog_color.i.a; break; + case 2: *input_a = &userdata->m_shade_color.i.a; break; + case 3: *input_a = &m_zero.i.a; break; } } else { switch (b & 0x3) { - case 0: *input_a = &userdata->InvPixelColor.i.a; break; - case 1: *input_a = &userdata->MemoryColor.i.a; break; - case 2: *input_a = &OneColor.i.a; break; - case 3: *input_a = &ZeroColor.i.a; break; + case 0: *input_a = &userdata->m_inv_pixel_color.i.a; break; + case 1: *input_a = &userdata->m_memory_color.i.a; break; + case 2: *input_a = &m_one.i.a; break; + case 3: *input_a = &m_zero.i.a; break; } } } @@ -627,7 +627,7 @@ const UINT8 n64_rdp::s_magic_matrix[16] = 7, 1, 6, 0 }; -const n64_rdp::ZDecompressEntry n64_rdp::z_dec_table[8] = +const z_decompress_entry_t n64_rdp::m_z_dec_table[8] = { { 6, 0x00000 }, { 5, 0x20000 }, @@ -644,157 +644,157 @@ const n64_rdp::ZDecompressEntry n64_rdp::z_dec_table[8] = void n64_rdp::z_build_com_table(void) { UINT16 altmem = 0; - for(int z = 0; z < 0x40000; z++) - { - switch((z >> 11) & 0x7f) - { - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x08: - case 0x09: - case 0x0a: - case 0x0b: - case 0x0c: - case 0x0d: - case 0x0e: - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1a: - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - case 0x1f: - case 0x20: - case 0x21: - case 0x22: - case 0x23: - case 0x24: - case 0x25: - case 0x26: - case 0x27: - case 0x28: - case 0x29: - case 0x2a: - case 0x2b: - case 0x2c: - case 0x2d: - case 0x2e: - case 0x2f: - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - altmem = (z >> 4) & 0x1ffc; - break; - case 0x40: - case 0x41: - case 0x42: - case 0x43: - case 0x44: - case 0x45: - case 0x46: - case 0x47: - case 0x48: - case 0x49: - case 0x4a: - case 0x4b: - case 0x4c: - case 0x4d: - case 0x4e: - case 0x4f: - case 0x50: - case 0x51: - case 0x52: - case 0x53: - case 0x54: - case 0x55: - case 0x56: - case 0x57: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x5e: - case 0x5f: - altmem = ((z >> 3) & 0x1ffc) | 0x2000; - break; - case 0x60: - case 0x61: - case 0x62: - case 0x63: - case 0x64: - case 0x65: - case 0x66: - case 0x67: - case 0x68: - case 0x69: - case 0x6a: - case 0x6b: - case 0x6c: - case 0x6d: - case 0x6e: - case 0x6f: - altmem = ((z >> 2) & 0x1ffc) | 0x4000; - break; - case 0x70: - case 0x71: - case 0x72: - case 0x73: - case 0x74: - case 0x75: - case 0x76: - case 0x77: - altmem = ((z >> 1) & 0x1ffc) | 0x6000; - break; - case 0x78://uncompressed z = 0x3c000 - case 0x79: - case 0x7a: - case 0x7b: - altmem = (z & 0x1ffc) | 0x8000; - break; - case 0x7c://uncompressed z = 0x3e000 - case 0x7d: - altmem = ((z << 1) & 0x1ffc) | 0xa000; - break; - case 0x7e://uncompressed z = 0x3f000 - altmem = ((z << 2) & 0x1ffc) | 0xc000; - break; - case 0x7f://uncompressed z = 0x3f000 - altmem = ((z << 2) & 0x1ffc) | 0xe000; - break; - } + for(INT32 z = 0; z < 0x40000; z++) + { + switch((z >> 11) & 0x7f) + { + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0a: + case 0x0b: + case 0x0c: + case 0x0d: + case 0x0e: + case 0x0f: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1a: + case 0x1b: + case 0x1c: + case 0x1d: + case 0x1e: + case 0x1f: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2a: + case 0x2b: + case 0x2c: + case 0x2d: + case 0x2e: + case 0x2f: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + altmem = (z >> 4) & 0x1ffc; + break; + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4a: + case 0x4b: + case 0x4c: + case 0x4d: + case 0x4e: + case 0x4f: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5a: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x5e: + case 0x5f: + altmem = ((z >> 3) & 0x1ffc) | 0x2000; + break; + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6a: + case 0x6b: + case 0x6c: + case 0x6d: + case 0x6e: + case 0x6f: + altmem = ((z >> 2) & 0x1ffc) | 0x4000; + break; + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + altmem = ((z >> 1) & 0x1ffc) | 0x6000; + break; + case 0x78://uncompressed z = 0x3c000 + case 0x79: + case 0x7a: + case 0x7b: + altmem = (z & 0x1ffc) | 0x8000; + break; + case 0x7c://uncompressed z = 0x3e000 + case 0x7d: + altmem = ((z << 1) & 0x1ffc) | 0xa000; + break; + case 0x7e://uncompressed z = 0x3f000 + altmem = ((z << 2) & 0x1ffc) | 0xc000; + break; + case 0x7f://uncompressed z = 0x3f000 + altmem = ((z << 2) & 0x1ffc) | 0xe000; + break; + } - z_com_table[z] = altmem; + m_z_com_table[z] = altmem; } } @@ -804,24 +804,24 @@ void n64_rdp::precalc_cvmask_derivatives(void) const UINT8 yarray[16] = {0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0}; const UINT8 xarray[16] = {0, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}; - for (int i = 0; i < 0x10000; i++) + for (INT32 i = 0; i < 0x10000; i++) { - compressed_cvmasks[i] = (i & 1) | ((i & 4) >> 1) | ((i & 0x20) >> 3) | ((i & 0x80) >> 4) | + m_compressed_cvmasks[i] = (i & 1) | ((i & 4) >> 1) | ((i & 0x20) >> 3) | ((i & 0x80) >> 4) | ((i & 0x100) >> 4) | ((i & 0x400) >> 5) | ((i & 0x2000) >> 7) | ((i & 0x8000) >> 8); } - for (int i = 0; i < 0x100; i++) + for (INT32 i = 0; i < 0x100; i++) { UINT16 mask = decompress_cvmask_frombyte(i); cvarray[i].cvg = cvarray[i].cvbit = 0; cvarray[i].cvbit = (i >> 7) & 1; - for (int k = 0; k < 8; k++) + for (INT32 k = 0; k < 8; k++) { cvarray[i].cvg += ((i >> k) & 1); } UINT16 masky = 0; - for (int k = 0; k < 4; k++) + for (INT32 k = 0; k < 4; k++) { masky |= ((mask & (0xf000 >> (k << 2))) > 0) << k; } @@ -842,29 +842,29 @@ UINT16 n64_rdp::decompress_cvmask_frombyte(UINT8 x) return y; } -void n64_rdp::lookup_cvmask_derivatives(UINT32 mask, UINT8* offx, UINT8* offy, rdp_span_aux *userdata) +void n64_rdp::lookup_cvmask_derivatives(UINT32 mask, UINT8* offx, UINT8* offy, rdp_span_aux* userdata) { - UINT32 index = compressed_cvmasks[mask]; - userdata->CurrentPixCvg = cvarray[index].cvg; - userdata->CurrentCvgBit = cvarray[index].cvbit; + const UINT32 index = m_compressed_cvmasks[mask]; + userdata->m_current_pix_cvg = cvarray[index].cvg; + userdata->m_current_cvg_bit = cvarray[index].cvbit; *offx = cvarray[index].xoff; *offy = cvarray[index].yoff; } -void n64_rdp::ZStore(const rdp_poly_state &object, UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 z, UINT32 enc) +void n64_rdp::z_store(const rdp_poly_state &object, UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 z, UINT32 enc) { - UINT16 zval = z_com_table[z & 0x3ffff]|(enc >> 2); + UINT16 zval = m_z_com_table[z & 0x3ffff]|(enc >> 2); if(zcurpixel <= MEM16_LIMIT) { ((UINT16*)rdram)[zcurpixel ^ WORD_ADDR_XOR] = zval; } if(dzcurpixel <= MEM8_LIMIT) { - HiddenBits[dzcurpixel ^ BYTE_ADDR_XOR] = enc & 3; + m_hidden_bits[dzcurpixel ^ BYTE_ADDR_XOR] = enc & 3; } } -INT32 n64_rdp::NormalizeDZPix(INT32 sum) +INT32 n64_rdp::normalize_dzpix(INT32 sum) { if (sum & 0xc000) { @@ -874,7 +874,7 @@ INT32 n64_rdp::NormalizeDZPix(INT32 sum) { return 1; } - for(int count = 0x2000; count > 0; count >>= 1) + for(INT32 count = 0x2000; count > 0; count >>= 1) { if (sum & count) { @@ -884,33 +884,30 @@ INT32 n64_rdp::NormalizeDZPix(INT32 sum) return 0; } -UINT32 n64_rdp::ZDecompress(UINT32 zcurpixel) +UINT32 n64_rdp::z_decompress(UINT32 zcurpixel) { - UINT32 zb = RREADIDX16(zcurpixel); - CHECK16(zcurpixel); - return z_complete_dec_table[(zb >> 2) & 0x3fff]; + return m_z_complete_dec_table[(RREADIDX16(zcurpixel) >> 2) & 0x3fff]; } -UINT32 n64_rdp::DZDecompress(UINT32 zcurpixel, UINT32 dzcurpixel) +UINT32 n64_rdp::dz_decompress(UINT32 zcurpixel, UINT32 dzcurpixel) { - UINT16 zval = RREADIDX16(zcurpixel); - CHECK16(zcurpixel); - UINT8 dzval = (((dzcurpixel) <= 0x7fffff) ? (HiddenBits[(dzcurpixel) ^ BYTE_ADDR_XOR]) : 0); - UINT32 dz_compressed = ((zval & 3) << 2) | (dzval & 3); + const UINT16 zval = RREADIDX16(zcurpixel); + const UINT8 dzval = (((dzcurpixel) <= 0x7fffff) ? (m_hidden_bits[(dzcurpixel) ^ BYTE_ADDR_XOR]) : 0); + const UINT32 dz_compressed = ((zval & 3) << 2) | (dzval & 3); return (1 << dz_compressed); } -UINT32 n64_rdp::DZCompress(UINT32 value) +UINT32 n64_rdp::dz_compress(UINT32 value) { INT32 j = 0; for (; value > 1; j++, value >>= 1); return j; } -void n64_rdp::GetDitherValues(int x, int y, int* cdith, int* adith, const rdp_poly_state& object) +void n64_rdp::get_dither_values(INT32 x, INT32 y, INT32* cdith, INT32* adith, const rdp_poly_state& object) { - int dithindex = ((y & 3) << 2) | (x & 3); - switch((object.OtherModes.rgb_dither_sel << 2) | object.OtherModes.alpha_dither_sel) + const INT32 dithindex = ((y & 3) << 2) | (x & 3); + switch((object.m_other_modes.rgb_dither_sel << 2) | object.m_other_modes.alpha_dither_sel) { case 0: *adith = *cdith = s_magic_matrix[dithindex]; @@ -983,7 +980,7 @@ INT32 CLAMP(INT32 in, INT32 min, INT32 max) return in; } -bool n64_rdp::ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dzpix, rdp_span_aux *userdata, const rdp_poly_state &object) +bool n64_rdp::z_compare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dzpix, rdp_span_aux* userdata, const rdp_poly_state &object) { bool force_coplanar = false; sz &= 0x3ffff; @@ -993,13 +990,12 @@ bool n64_rdp::ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dz UINT32 zval; INT32 rawdzmem; - if (object.OtherModes.z_compare_en) + if (object.m_other_modes.z_compare_en) { - oz = ZDecompress(zcurpixel); - dzmem = DZDecompress(zcurpixel, dzcurpixel); + oz = z_decompress(zcurpixel); + dzmem = dz_decompress(zcurpixel, dzcurpixel); zval = RREADIDX16(zcurpixel); - CHECK16(zcurpixel); - rawdzmem = ((zval & 3) << 2) | ((((dzcurpixel) <= 0x3fffff) ? (HiddenBits[(dzcurpixel) ^ BYTE_ADDR_XOR]) : 0) & 3); + rawdzmem = ((zval & 3) << 2) | ((((dzcurpixel) <= 0x3fffff) ? (m_hidden_bits[(dzcurpixel) ^ BYTE_ADDR_XOR]) : 0) & 3); } else { @@ -1009,14 +1005,14 @@ bool n64_rdp::ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dz rawdzmem = 0xf; } - userdata->m_dzpix_enc = DZCompress(dzpix & 0xffff); - userdata->ShiftA = CLAMP(userdata->m_dzpix_enc - rawdzmem, 0, 4); - userdata->ShiftB = CLAMP(rawdzmem - userdata->m_dzpix_enc, 0, 4); + userdata->m_dzpix_enc = dz_compress(dzpix & 0xffff); + userdata->m_shift_a = CLAMP(userdata->m_dzpix_enc - rawdzmem, 0, 4); + userdata->m_shift_b = CLAMP(rawdzmem - userdata->m_dzpix_enc, 0, 4); - int precision_factor = (zval >> 13) & 0xf; + INT32 precision_factor = (zval >> 13) & 0xf; if (precision_factor < 3) { - int dzmemmodifier = 16 >> precision_factor; + INT32 dzmemmodifier = 16 >> precision_factor; if (dzmem == 0x8000) { force_coplanar = true; @@ -1048,21 +1044,21 @@ bool n64_rdp::ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dz farther = true; } - bool overflow = ((userdata->CurrentMemCvg + userdata->CurrentPixCvg) & 8) > 0; - userdata->BlendEnable = (object.OtherModes.force_blend || (!overflow && object.OtherModes.antialias_en && farther)) ? 1 : 0; - userdata->PreWrap = overflow; + bool overflow = ((userdata->m_current_mem_cvg + userdata->m_current_pix_cvg) & 8) > 0; + userdata->m_blend_enable = (object.m_other_modes.force_blend || (!overflow && object.m_other_modes.antialias_en && farther)) ? 1 : 0; + userdata->m_pre_wrap = overflow; - int cvgcoeff = 0; + INT32 cvgcoeff = 0; UINT32 dzenc = 0; - if (object.OtherModes.z_mode == 1 && infront && farther && overflow) + if (object.m_other_modes.z_mode == 1 && infront && farther && overflow) { - dzenc = DZCompress(dznotshift & 0xffff); + dzenc = dz_compress(dznotshift & 0xffff); cvgcoeff = ((oz >> dzenc) - (sz >> dzenc)) & 0xf; - userdata->CurrentPixCvg = ((cvgcoeff * userdata->CurrentPixCvg) >> 3) & 0xf; + userdata->m_current_pix_cvg = ((cvgcoeff * userdata->m_current_pix_cvg) >> 3) & 0xf; } - if (!object.OtherModes.z_compare_en) + if (!object.m_other_modes.z_compare_en) { return true; } @@ -1075,7 +1071,7 @@ bool n64_rdp::ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dz nearer = true; } - switch(object.OtherModes.z_mode) + switch(object.m_other_modes.z_mode) { case 0: return (max || (overflow ? infront : nearer)); @@ -1090,7 +1086,7 @@ bool n64_rdp::ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dz return false; } -UINT32 n64_rdp::GetLog2(UINT32 lod_clamp) +UINT32 n64_rdp::get_log2(UINT32 lod_clamp) { if (lod_clamp < 2) { @@ -1098,7 +1094,7 @@ UINT32 n64_rdp::GetLog2(UINT32 lod_clamp) } else { - for (int i = 7; i > 0; i--) + for (INT32 i = 7; i > 0; i--) { if ((lod_clamp >> i) & 1) { @@ -1112,7 +1108,7 @@ UINT32 n64_rdp::GetLog2(UINT32 lod_clamp) /*****************************************************************************/ -UINT32 n64_rdp::ReadData(UINT32 address) +UINT32 n64_rdp::read_data(UINT32 address) { if (m_status & 0x1) // XBUS_DMEM_DMA enabled { @@ -1124,10 +1120,10 @@ UINT32 n64_rdp::ReadData(UINT32 address) } } -static const char *const image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" }; -static const char *const image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" }; +const char* n64_rdp::s_image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" }; +const char* n64_rdp::s_image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" }; -static const int rdp_command_length[64] = +const INT32 n64_rdp::s_rdp_command_length[64] = { 8, // 0x00, No Op 8, // 0x01, ??? @@ -1195,11 +1191,8 @@ static const int rdp_command_length[64] = 8 // 0x3f, Set_Color_Image }; -void n64_rdp::Dasm(char *buffer) +void n64_rdp::disassemble(char* buffer) { - int i; - int tile; - const char *format, *size; char sl[32], tl[32], sh[32], th[32]; char s[32], t[32], w[32]; char dsdx[32], dtdx[32], dwdx[32]; @@ -1211,13 +1204,10 @@ void n64_rdp::Dasm(char *buffer) char drdx[32], dgdx[32], dbdx[32], dadx[32]; char drdy[32], dgdy[32], dbdy[32], dady[32]; char drde[32], dgde[32], dbde[32], dade[32]; - UINT32 r,g,b,a; UINT32 cmd[64]; - UINT32 length; - UINT32 command; - length = m_cmd_ptr * 4; + const UINT32 length = m_cmd_ptr * 4; if (length < 8) { sprintf(buffer, "ERROR: length = %d\n", length); @@ -1227,29 +1217,29 @@ void n64_rdp::Dasm(char *buffer) cmd[0] = m_cmd_data[m_cmd_cur+0]; cmd[1] = m_cmd_data[m_cmd_cur+1]; - tile = (cmd[1] >> 24) & 0x7; + const INT32 tile = (cmd[1] >> 24) & 0x7; sprintf(sl, "%4.2f", (float)((cmd[0] >> 12) & 0xfff) / 4.0f); sprintf(tl, "%4.2f", (float)((cmd[0] >> 0) & 0xfff) / 4.0f); sprintf(sh, "%4.2f", (float)((cmd[1] >> 12) & 0xfff) / 4.0f); sprintf(th, "%4.2f", (float)((cmd[1] >> 0) & 0xfff) / 4.0f); - format = image_format[(cmd[0] >> 21) & 0x7]; - size = image_size[(cmd[0] >> 19) & 0x3]; + const char* format = s_image_format[(cmd[0] >> 21) & 0x7]; + const char* size = s_image_size[(cmd[0] >> 19) & 0x3]; - r = (cmd[1] >> 24) & 0xff; - g = (cmd[1] >> 16) & 0xff; - b = (cmd[1] >> 8) & 0xff; - a = (cmd[1] >> 0) & 0xff; + const UINT32 r = (cmd[1] >> 24) & 0xff; + const UINT32 g = (cmd[1] >> 16) & 0xff; + const UINT32 b = (cmd[1] >> 8) & 0xff; + const UINT32 a = (cmd[1] >> 0) & 0xff; - command = (cmd[0] >> 24) & 0x3f; + const UINT32 command = (cmd[0] >> 24) & 0x3f; switch (command) { case 0x00: sprintf(buffer, "No Op"); break; case 0x08: // Tri_NoShade { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length != rdp_command_length[command]) + if (length != s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_NoShade length = %d\n", length); return; @@ -1272,14 +1262,14 @@ void n64_rdp::Dasm(char *buffer) sprintf(xm, "%4.4f", (float)(cmd[6] / 65536.0f)); sprintf(dxmdy, "%4.4f", (float)(cmd[7] / 65536.0f)); - sprintf(buffer, "Tri_NoShade %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh); + sprintf(buffer, "Tri_NoShade %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh); break; } case 0x09: // Tri_NoShadeZ { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length != rdp_command_length[command]) + if (length != s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_NoShadeZ length = %d\n", length); return; @@ -1302,20 +1292,20 @@ void n64_rdp::Dasm(char *buffer) sprintf(xm, "%4.4f", (float)(cmd[6] / 65536.0f)); sprintf(dxmdy, "%4.4f", (float)(cmd[7] / 65536.0f)); - sprintf(buffer, "Tri_NoShadeZ %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh); + sprintf(buffer, "Tri_NoShadeZ %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh); break; } case 0x0a: // Tri_Tex { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length < rdp_command_length[command]) + if (length < s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_Tex length = %d\n", length); return; } - for (i=2; i < 24; i++) + for (INT32 i = 2; i < 24; i++) { cmd[i] = m_cmd_data[m_cmd_cur+i]; } @@ -1357,15 +1347,15 @@ void n64_rdp::Dasm(char *buffer) } case 0x0b: // Tri_TexZ { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length < rdp_command_length[command]) + if (length < s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_TexZ length = %d\n", length); return; } - for (i=2; i < 24; i++) + for (INT32 i = 2; i < 24; i++) { cmd[i] = m_cmd_data[m_cmd_cur+i]; } @@ -1407,15 +1397,15 @@ void n64_rdp::Dasm(char *buffer) } case 0x0c: // Tri_Shade { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length != rdp_command_length[command]) + if (length != s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_Shade length = %d\n", length); return; } - for (i=2; i < 24; i++) + for (INT32 i = 2; i < 24; i++) { cmd[i] = m_cmd_data[i]; } @@ -1459,15 +1449,15 @@ void n64_rdp::Dasm(char *buffer) } case 0x0d: // Tri_ShadeZ { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length != rdp_command_length[command]) + if (length != s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_ShadeZ length = %d\n", length); return; } - for (i=2; i < 24; i++) + for (INT32 i = 2; i < 24; i++) { cmd[i] = m_cmd_data[i]; } @@ -1511,15 +1501,15 @@ void n64_rdp::Dasm(char *buffer) } case 0x0e: // Tri_TexShade { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length < rdp_command_length[command]) + if (length < s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_TexShade length = %d\n", length); return; } - for (i=2; i < 40; i++) + for (INT32 i = 2; i < 40; i++) { cmd[i] = m_cmd_data[m_cmd_cur+i]; } @@ -1586,15 +1576,15 @@ void n64_rdp::Dasm(char *buffer) } case 0x0f: // Tri_TexShadeZ { - int lft = (command >> 23) & 0x1; + const INT32 lft = (command >> 23) & 0x1; - if (length < rdp_command_length[command]) + if (length < s_rdp_command_length[command]) { sprintf(buffer, "ERROR: Tri_TexShadeZ length = %d\n", length); return; } - for (i=2; i < 40; i++) + for (INT32 i = 2; i < 40; i++) { cmd[i] = m_cmd_data[m_cmd_cur+i]; } @@ -1703,7 +1693,7 @@ void n64_rdp::Dasm(char *buffer) case 0x3d: sprintf(buffer, "Set_Texture_Image %s, %s, %d, %08X", format, size, (cmd[0] & 0x1ff)+1, cmd[1]); break; case 0x3e: sprintf(buffer, "Set_Mask_Image %08X", cmd[1]); break; case 0x3f: sprintf(buffer, "Set_Color_Image %s, %s, %d, %08X", format, size, (cmd[0] & 0x1ff)+1, cmd[1]); break; - default: sprintf(buffer, "??? (%08X %08X)", cmd[0], cmd[1]); break; + default: sprintf(buffer, "Unknown (%08X %08X)", cmd[0], cmd[1]); break; } } @@ -1741,16 +1731,16 @@ static INT32 CLIP(INT32 value,INT32 min,INT32 max) } } -void n64_rdp::compute_cvg_noflip(extent_t *Spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base) +void n64_rdp::compute_cvg_noflip(extent_t* spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base) { INT32 purgestart = 0xfff; INT32 purgeend = 0; - bool writablescanline = !(scanline & ~0x3ff); - INT32 scanlinespx = scanline << 2; + const bool writablescanline = !(scanline & ~0x3ff); + const INT32 scanlinespx = scanline << 2; if (!writablescanline) return; - for(int i = 0; i < 4; i++) + for(INT32 i = 0; i < 4; i++) { if (minorxint[i] < purgestart) { @@ -1768,10 +1758,10 @@ void n64_rdp::compute_cvg_noflip(extent_t *Spans, INT32* majorx, INT32* minorx, if (length < 0) return; - rdp_span_aux *userdata = (rdp_span_aux*)Spans[scanline - base].userdata; + rdp_span_aux* userdata = (rdp_span_aux*)spans[scanline - base].userdata; memset(&userdata->m_cvg[purgestart], 0, (length + 1) << 1); - for(int i = 0; i < 4; i++) + for(INT32 i = 0; i < 4; i++) { INT32 minorcur = minorx[i]; INT32 majorcur = majorx[i]; @@ -1814,16 +1804,16 @@ void n64_rdp::compute_cvg_noflip(extent_t *Spans, INT32* majorx, INT32* minorx, } } -void n64_rdp::compute_cvg_flip(extent_t *Spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base) +void n64_rdp::compute_cvg_flip(extent_t* spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base) { INT32 purgestart = 0xfff; INT32 purgeend = 0; - bool writablescanline = !(scanline & ~0x3ff); - INT32 scanlinespx = scanline << 2; + const bool writablescanline = !(scanline & ~0x3ff); + const INT32 scanlinespx = scanline << 2; if(!writablescanline) return; - for(int i = 0; i < 4; i++) + for(INT32 i = 0; i < 4; i++) { if (majorxint[i] < purgestart) { @@ -1838,14 +1828,14 @@ void n64_rdp::compute_cvg_flip(extent_t *Spans, INT32* majorx, INT32* minorx, IN purgestart = CLIP(purgestart, 0, 1023); purgeend = CLIP(purgeend, 0, 1023); - int length = purgeend - purgestart; + INT32 length = purgeend - purgestart; if (length < 0) return; - rdp_span_aux *userdata = (rdp_span_aux*)Spans[scanline - base].userdata; + rdp_span_aux* userdata = (rdp_span_aux*)spans[scanline - base].userdata; memset(&userdata->m_cvg[purgestart], 0, (length + 1) << 1); - for(int i = 0; i < 4; i++) + for(INT32 i = 0; i < 4; i++) { INT32 minorcur = minorx[i]; INT32 majorcur = majorx[i]; @@ -1888,30 +1878,30 @@ void n64_rdp::compute_cvg_flip(extent_t *Spans, INT32* majorx, INT32* minorx, IN } } -void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) +void n64_rdp::draw_triangle(bool shade, bool texture, bool zbuffer, bool rect) { - UINT32 *cmd_data = rect ? m_temp_rect_data : m_cmd_data; - UINT32 fifo_index = rect ? 0 : m_cmd_cur; - UINT32 w1 = cmd_data[fifo_index + 0]; - UINT32 w2 = cmd_data[fifo_index + 1]; + const UINT32* cmd_data = rect ? m_temp_rect_data : m_cmd_data; + const UINT32 fifo_index = rect ? 0 : m_cmd_cur; + const UINT32 w1 = cmd_data[fifo_index + 0]; + const UINT32 w2 = cmd_data[fifo_index + 1]; - int flip = (w1 & 0x00800000) ? 1 : 0; - MiscState.MaxLevel = ((w1 >> 19) & 7); - int tilenum = (w1 >> 16) & 0x7; + INT32 flip = (w1 & 0x00800000) ? 1 : 0; + m_misc_state.m_max_level = ((w1 >> 19) & 7); + INT32 tilenum = (w1 >> 16) & 0x7; - int dsdiff = 0, dtdiff = 0, dwdiff = 0, drdiff = 0, dgdiff = 0, dbdiff = 0, dadiff = 0, dzdiff = 0; - int dsdeh = 0, dtdeh = 0, dwdeh = 0, drdeh = 0, dgdeh = 0, dbdeh = 0, dadeh = 0, dzdeh = 0; - int dsdxh = 0, dtdxh = 0, dwdxh = 0, drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0, dzdxh = 0; - int dsdyh = 0, dtdyh = 0, dwdyh = 0, drdyh = 0, dgdyh = 0, dbdyh = 0, dadyh = 0, dzdyh = 0; + INT32 dsdiff = 0, dtdiff = 0, dwdiff = 0, drdiff = 0, dgdiff = 0, dbdiff = 0, dadiff = 0, dzdiff = 0; + INT32 dsdeh = 0, dtdeh = 0, dwdeh = 0, drdeh = 0, dgdeh = 0, dbdeh = 0, dadeh = 0, dzdeh = 0; + INT32 dsdxh = 0, dtdxh = 0, dwdxh = 0, drdxh = 0, dgdxh = 0, dbdxh = 0, dadxh = 0, dzdxh = 0; + INT32 dsdyh = 0, dtdyh = 0, dwdyh = 0, drdyh = 0, dgdyh = 0, dbdyh = 0, dadyh = 0, dzdyh = 0; INT32 maxxmx = 0; // maxxmx / minxhx very opaque names, consider re-naming INT32 minxmx = 0; INT32 maxxhx = 0; INT32 minxhx = 0; - int shade_base = fifo_index + 8; - int texture_base = fifo_index + 8; - int zbuffer_base = fifo_index + 8; + INT32 shade_base = fifo_index + 8; + INT32 texture_base = fifo_index + 8; + INT32 zbuffer_base = fifo_index + 8; if(shade) { texture_base += 16; @@ -1948,73 +1938,73 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) if (xm & 0x20000000) xm |= 0xc0000000; if (xh & 0x20000000) xh |= 0xc0000000; - int r = (cmd_data[shade_base+0 ] & 0xffff0000) | ((cmd_data[shade_base+4 ] >> 16) & 0x0000ffff); - int g = ((cmd_data[shade_base+0 ] << 16) & 0xffff0000) | (cmd_data[shade_base+4 ] & 0x0000ffff); - int b = (cmd_data[shade_base+1 ] & 0xffff0000) | ((cmd_data[shade_base+5 ] >> 16) & 0x0000ffff); - int a = ((cmd_data[shade_base+1 ] << 16) & 0xffff0000) | (cmd_data[shade_base+5 ] & 0x0000ffff); - int drdx = (cmd_data[shade_base+2 ] & 0xffff0000) | ((cmd_data[shade_base+6 ] >> 16) & 0x0000ffff); - int dgdx = ((cmd_data[shade_base+2 ] << 16) & 0xffff0000) | (cmd_data[shade_base+6 ] & 0x0000ffff); - int dbdx = (cmd_data[shade_base+3 ] & 0xffff0000) | ((cmd_data[shade_base+7 ] >> 16) & 0x0000ffff); - int dadx = ((cmd_data[shade_base+3 ] << 16) & 0xffff0000) | (cmd_data[shade_base+7 ] & 0x0000ffff); - int drde = (cmd_data[shade_base+8 ] & 0xffff0000) | ((cmd_data[shade_base+12] >> 16) & 0x0000ffff); - int dgde = ((cmd_data[shade_base+8 ] << 16) & 0xffff0000) | (cmd_data[shade_base+12] & 0x0000ffff); - int dbde = (cmd_data[shade_base+9 ] & 0xffff0000) | ((cmd_data[shade_base+13] >> 16) & 0x0000ffff); - int dade = ((cmd_data[shade_base+9 ] << 16) & 0xffff0000) | (cmd_data[shade_base+13] & 0x0000ffff); - int drdy = (cmd_data[shade_base+10] & 0xffff0000) | ((cmd_data[shade_base+14] >> 16) & 0x0000ffff); - int dgdy = ((cmd_data[shade_base+10] << 16) & 0xffff0000) | (cmd_data[shade_base+14] & 0x0000ffff); - int dbdy = (cmd_data[shade_base+11] & 0xffff0000) | ((cmd_data[shade_base+15] >> 16) & 0x0000ffff); - int dady = ((cmd_data[shade_base+11] << 16) & 0xffff0000) | (cmd_data[shade_base+15] & 0x0000ffff); - int s = (cmd_data[texture_base+0 ] & 0xffff0000) | ((cmd_data[texture_base+4 ] >> 16) & 0x0000ffff); - int t = ((cmd_data[texture_base+0 ] << 16) & 0xffff0000) | (cmd_data[texture_base+4 ] & 0x0000ffff); - int w = (cmd_data[texture_base+1 ] & 0xffff0000) | ((cmd_data[texture_base+5 ] >> 16) & 0x0000ffff); - int dsdx = (cmd_data[texture_base+2 ] & 0xffff0000) | ((cmd_data[texture_base+6 ] >> 16) & 0x0000ffff); - int dtdx = ((cmd_data[texture_base+2 ] << 16) & 0xffff0000) | (cmd_data[texture_base+6 ] & 0x0000ffff); - int dwdx = (cmd_data[texture_base+3 ] & 0xffff0000) | ((cmd_data[texture_base+7 ] >> 16) & 0x0000ffff); - int dsde = (cmd_data[texture_base+8 ] & 0xffff0000) | ((cmd_data[texture_base+12] >> 16) & 0x0000ffff); - int dtde = ((cmd_data[texture_base+8 ] << 16) & 0xffff0000) | (cmd_data[texture_base+12] & 0x0000ffff); - int dwde = (cmd_data[texture_base+9 ] & 0xffff0000) | ((cmd_data[texture_base+13] >> 16) & 0x0000ffff); - int dsdy = (cmd_data[texture_base+10] & 0xffff0000) | ((cmd_data[texture_base+14] >> 16) & 0x0000ffff); - int dtdy = ((cmd_data[texture_base+10] << 16) & 0xffff0000) | (cmd_data[texture_base+14] & 0x0000ffff); - int dwdy = (cmd_data[texture_base+11] & 0xffff0000) | ((cmd_data[texture_base+15] >> 16) & 0x0000ffff); - int z = cmd_data[zbuffer_base+0]; - int dzdx = cmd_data[zbuffer_base+1]; - int dzde = cmd_data[zbuffer_base+2]; - int dzdy = cmd_data[zbuffer_base+3]; - - int dzdy_dz = (dzdy >> 16) & 0xffff; - int dzdx_dz = (dzdx >> 16) & 0xffff; - - extent_t Spans[2048]; + INT32 r = (cmd_data[shade_base+0 ] & 0xffff0000) | ((cmd_data[shade_base+4 ] >> 16) & 0x0000ffff); + INT32 g = ((cmd_data[shade_base+0 ] << 16) & 0xffff0000) | (cmd_data[shade_base+4 ] & 0x0000ffff); + INT32 b = (cmd_data[shade_base+1 ] & 0xffff0000) | ((cmd_data[shade_base+5 ] >> 16) & 0x0000ffff); + INT32 a = ((cmd_data[shade_base+1 ] << 16) & 0xffff0000) | (cmd_data[shade_base+5 ] & 0x0000ffff); + const INT32 drdx = (cmd_data[shade_base+2 ] & 0xffff0000) | ((cmd_data[shade_base+6 ] >> 16) & 0x0000ffff); + const INT32 dgdx = ((cmd_data[shade_base+2 ] << 16) & 0xffff0000) | (cmd_data[shade_base+6 ] & 0x0000ffff); + const INT32 dbdx = (cmd_data[shade_base+3 ] & 0xffff0000) | ((cmd_data[shade_base+7 ] >> 16) & 0x0000ffff); + const INT32 dadx = ((cmd_data[shade_base+3 ] << 16) & 0xffff0000) | (cmd_data[shade_base+7 ] & 0x0000ffff); + const INT32 drde = (cmd_data[shade_base+8 ] & 0xffff0000) | ((cmd_data[shade_base+12] >> 16) & 0x0000ffff); + const INT32 dgde = ((cmd_data[shade_base+8 ] << 16) & 0xffff0000) | (cmd_data[shade_base+12] & 0x0000ffff); + const INT32 dbde = (cmd_data[shade_base+9 ] & 0xffff0000) | ((cmd_data[shade_base+13] >> 16) & 0x0000ffff); + const INT32 dade = ((cmd_data[shade_base+9 ] << 16) & 0xffff0000) | (cmd_data[shade_base+13] & 0x0000ffff); + const INT32 drdy = (cmd_data[shade_base+10] & 0xffff0000) | ((cmd_data[shade_base+14] >> 16) & 0x0000ffff); + const INT32 dgdy = ((cmd_data[shade_base+10] << 16) & 0xffff0000) | (cmd_data[shade_base+14] & 0x0000ffff); + const INT32 dbdy = (cmd_data[shade_base+11] & 0xffff0000) | ((cmd_data[shade_base+15] >> 16) & 0x0000ffff); + const INT32 dady = ((cmd_data[shade_base+11] << 16) & 0xffff0000) | (cmd_data[shade_base+15] & 0x0000ffff); + INT32 s = (cmd_data[texture_base+0 ] & 0xffff0000) | ((cmd_data[texture_base+4 ] >> 16) & 0x0000ffff); + INT32 t = ((cmd_data[texture_base+0 ] << 16) & 0xffff0000) | (cmd_data[texture_base+4 ] & 0x0000ffff); + INT32 w = (cmd_data[texture_base+1 ] & 0xffff0000) | ((cmd_data[texture_base+5 ] >> 16) & 0x0000ffff); + const INT32 dsdx = (cmd_data[texture_base+2 ] & 0xffff0000) | ((cmd_data[texture_base+6 ] >> 16) & 0x0000ffff); + const INT32 dtdx = ((cmd_data[texture_base+2 ] << 16) & 0xffff0000) | (cmd_data[texture_base+6 ] & 0x0000ffff); + const INT32 dwdx = (cmd_data[texture_base+3 ] & 0xffff0000) | ((cmd_data[texture_base+7 ] >> 16) & 0x0000ffff); + const INT32 dsde = (cmd_data[texture_base+8 ] & 0xffff0000) | ((cmd_data[texture_base+12] >> 16) & 0x0000ffff); + const INT32 dtde = ((cmd_data[texture_base+8 ] << 16) & 0xffff0000) | (cmd_data[texture_base+12] & 0x0000ffff); + const INT32 dwde = (cmd_data[texture_base+9 ] & 0xffff0000) | ((cmd_data[texture_base+13] >> 16) & 0x0000ffff); + const INT32 dsdy = (cmd_data[texture_base+10] & 0xffff0000) | ((cmd_data[texture_base+14] >> 16) & 0x0000ffff); + const INT32 dtdy = ((cmd_data[texture_base+10] << 16) & 0xffff0000) | (cmd_data[texture_base+14] & 0x0000ffff); + const INT32 dwdy = (cmd_data[texture_base+11] & 0xffff0000) | ((cmd_data[texture_base+15] >> 16) & 0x0000ffff); + INT32 z = cmd_data[zbuffer_base+0]; + const INT32 dzdx = cmd_data[zbuffer_base+1]; + const INT32 dzde = cmd_data[zbuffer_base+2]; + const INT32 dzdy = cmd_data[zbuffer_base+3]; + + const INT32 dzdy_dz = (dzdy >> 16) & 0xffff; + const INT32 dzdx_dz = (dzdx >> 16) & 0xffff; + + extent_t spans[2048]; #ifdef MAME_DEBUG - memset(Spans, 0xcc, sizeof(Spans)); + memset(spans, 0xcc, sizeof(spans)); #endif - SpanBase.m_span_drdy = drdy; - SpanBase.m_span_dgdy = dgdy; - SpanBase.m_span_dbdy = dbdy; - SpanBase.m_span_dady = dady; - SpanBase.m_span_dzdy = OtherModes.z_source_sel ? 0 : dzdy; + m_span_base.m_span_drdy = drdy; + m_span_base.m_span_dgdy = dgdy; + m_span_base.m_span_dbdy = dbdy; + m_span_base.m_span_dady = dady; + m_span_base.m_span_dzdy = m_other_modes.z_source_sel ? 0 : dzdy; UINT32 temp_dzpix = ((dzdy_dz & 0x8000) ? ((~dzdy_dz) & 0x7fff) : dzdy_dz) + ((dzdx_dz & 0x8000) ? ((~dzdx_dz) & 0x7fff) : dzdx_dz); - SpanBase.m_span_dr = drdx & ~0x1f; - SpanBase.m_span_dg = dgdx & ~0x1f; - SpanBase.m_span_db = dbdx & ~0x1f; - SpanBase.m_span_da = dadx & ~0x1f; - SpanBase.m_span_ds = dsdx; - SpanBase.m_span_dt = dtdx; - SpanBase.m_span_dw = dwdx; - SpanBase.m_span_dz = OtherModes.z_source_sel ? 0 : dzdx; - SpanBase.m_span_dymax = 0; - SpanBase.m_span_dzpix = NormalizeDZPix(temp_dzpix & 0xffff) & 0xffff; - - int xleft_inc = (dxmdy >> 2) & ~1; - int xright_inc = (dxhdy >> 2) & ~1; - - int xright = xh & ~1; - int xleft = xm & ~1; - - int sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0; - int do_offset = !(sign_dxhdy ^ (flip)); + m_span_base.m_span_dr = drdx & ~0x1f; + m_span_base.m_span_dg = dgdx & ~0x1f; + m_span_base.m_span_db = dbdx & ~0x1f; + m_span_base.m_span_da = dadx & ~0x1f; + m_span_base.m_span_ds = dsdx; + m_span_base.m_span_dt = dtdx; + m_span_base.m_span_dw = dwdx; + m_span_base.m_span_dz = m_other_modes.z_source_sel ? 0 : dzdx; + m_span_base.m_span_dymax = 0; + m_span_base.m_span_dzpix = m_dzpix_normalize[temp_dzpix & 0xffff]; + + INT32 xleft_inc = (dxmdy >> 2) & ~1; + INT32 xright_inc = (dxhdy >> 2) & ~1; + + INT32 xright = xh & ~1; + INT32 xleft = xm & ~1; + + const INT32 sign_dxhdy = (dxhdy & 0x80000000) ? 1 : 0; + const INT32 do_offset = !(sign_dxhdy ^ (flip)); if (do_offset) { @@ -2050,19 +2040,18 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) dadxh = dadx >> 8; dzdxh = dzdx >> 8; - INT32 ycur = yh & ~3; - INT32 ylfar = yl | 3; - INT32 ldflag = (sign_dxhdy ^ flip) ? 0 : 3; + const INT32 ycur = yh & ~3; + const INT32 ylfar = yl | 3; + const INT32 ldflag = (sign_dxhdy ^ flip) ? 0 : 3; INT32 majorx[4]; INT32 minorx[4]; INT32 majorxint[4]; INT32 minorxint[4]; - bool valid_y = true; - int xfrac = ((xright >> 8) & 0xff); + INT32 xfrac = ((xright >> 8) & 0xff); - int clipy1 = Scissor.m_yh; - int clipy2 = Scissor.m_yl; + const INT32 clipy1 = m_scissor.m_yh; + const INT32 clipy2 = m_scissor.m_yl; // Trivial reject if((ycur >> 2) >= clipy2 && (ylfar >> 2) >= clipy2) @@ -2075,12 +2064,12 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) } bool new_object = true; - rdp_poly_state *object = NULL; + rdp_poly_state* object = NULL; bool valid = false; if(flip) { - for (int k = ycur; k <= ylfar; k++) + for (INT32 k = ycur; k <= ylfar; k++) { if (k == ym) { @@ -2088,12 +2077,12 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) xleft_inc = (dxldy >> 2) & ~1; } - int xstart = xleft >> 16; // 319 - int xend = xright >> 16; // 0 - int j = k >> 2; - int spanidx = (k - ycur) >> 2; - int spix = k & 3; - valid_y = !(k < yh || k >= yl); + const INT32 xstart = xleft >> 16; // 319 + const INT32 xend = xright >> 16; // 0 + const INT32 j = k >> 2; + const INT32 spanidx = (k - ycur) >> 2; + const INT32 spix = k & 3; + const bool valid_y = !(k < yh || k >= yl); if (spanidx >= 0 && spanidx < 2048) { @@ -2123,110 +2112,84 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) new_object = false; } - Spans[spanidx].userdata = (void*)((UINT8*)AuxBuf + AuxBufPtr); - AuxBufPtr += sizeof(rdp_span_aux); + spans[spanidx].userdata = (void*)((UINT8*)m_aux_buf + m_aux_buf_ptr); + m_aux_buf_ptr += sizeof(rdp_span_aux); - if(AuxBufPtr >= EXTENT_AUX_COUNT) + if(m_aux_buf_ptr >= EXTENT_AUX_COUNT) { - fatalerror("n64_rdp::DrawTriangle: span aux buffer overflow\n"); + fatalerror("n64_rdp::draw_triangle: span aux buffer overflow\n"); } - rdp_span_aux *userdata = (rdp_span_aux*)Spans[spanidx].userdata; + rdp_span_aux* userdata = (rdp_span_aux*)spans[spanidx].userdata; valid = true; userdata->m_tmem = object->m_tmem; - userdata->BlendColor = BlendColor; - userdata->PrimColor = PrimColor; - userdata->EnvColor = EnvColor; - userdata->FogColor = FogColor; - userdata->KeyScale = KeyScale; - userdata->LODFraction = LODFraction; - userdata->PrimLODFraction = PrimLODFraction; - - userdata->ColorInputs.combiner_rgbsub_a_r[0] = userdata->ColorInputs.combiner_rgbsub_a_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbsub_a_g[0] = userdata->ColorInputs.combiner_rgbsub_a_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbsub_a_b[0] = userdata->ColorInputs.combiner_rgbsub_a_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_rgbsub_b_r[0] = userdata->ColorInputs.combiner_rgbsub_b_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbsub_b_g[0] = userdata->ColorInputs.combiner_rgbsub_b_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbsub_b_b[0] = userdata->ColorInputs.combiner_rgbsub_b_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_rgbmul_r[0] = userdata->ColorInputs.combiner_rgbmul_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbmul_g[0] = userdata->ColorInputs.combiner_rgbmul_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbmul_b[0] = userdata->ColorInputs.combiner_rgbmul_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_rgbadd_r[0] = userdata->ColorInputs.combiner_rgbadd_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbadd_g[0] = userdata->ColorInputs.combiner_rgbadd_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbadd_b[0] = userdata->ColorInputs.combiner_rgbadd_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_alphasub_a[0] = userdata->ColorInputs.combiner_alphasub_a[1] = &OneColor.i.a; - userdata->ColorInputs.combiner_alphasub_b[0] = userdata->ColorInputs.combiner_alphasub_b[1] = &OneColor.i.a; - userdata->ColorInputs.combiner_alphamul[0] = userdata->ColorInputs.combiner_alphamul[1] = &OneColor.i.a; - userdata->ColorInputs.combiner_alphaadd[0] = userdata->ColorInputs.combiner_alphaadd[1] = &OneColor.i.a; - - userdata->ColorInputs.blender1a_r[0] = userdata->ColorInputs.blender1a_r[1] = &userdata->PixelColor.i.r; - userdata->ColorInputs.blender1a_g[0] = userdata->ColorInputs.blender1a_g[1] = &userdata->PixelColor.i.g; - userdata->ColorInputs.blender1a_b[0] = userdata->ColorInputs.blender1a_b[1] = &userdata->PixelColor.i.b; - userdata->ColorInputs.blender1b_a[0] = userdata->ColorInputs.blender1b_a[1] = &userdata->PixelColor.i.a; - userdata->ColorInputs.blender2a_r[0] = userdata->ColorInputs.blender2a_r[1] = &userdata->PixelColor.i.r; - userdata->ColorInputs.blender2a_g[0] = userdata->ColorInputs.blender2a_g[1] = &userdata->PixelColor.i.g; - userdata->ColorInputs.blender2a_b[0] = userdata->ColorInputs.blender2a_b[1] = &userdata->PixelColor.i.b; - userdata->ColorInputs.blender2b_a[0] = userdata->ColorInputs.blender2b_a[1] = &userdata->PixelColor.i.a; + userdata->m_blend_color = m_blend_color; + userdata->m_prim_color = m_prim_color; + userdata->m_env_color = m_env_color; + userdata->m_fog_color = m_fog_color; + userdata->m_key_scale = m_key_scale; + userdata->m_lod_fraction = m_lod_fraction; + userdata->m_prim_lod_fraction = m_prim_lod_fraction; // Setup blender data for this scanline - SetBlenderInput(0, 0, &userdata->ColorInputs.blender1a_r[0], - &userdata->ColorInputs.blender1a_g[0], - &userdata->ColorInputs.blender1a_b[0], - &userdata->ColorInputs.blender1b_a[0], OtherModes.blend_m1a_0, OtherModes.blend_m1b_0, userdata); - SetBlenderInput(0, 1, &userdata->ColorInputs.blender2a_r[0], - &userdata->ColorInputs.blender2a_g[0], - &userdata->ColorInputs.blender2a_b[0], - &userdata->ColorInputs.blender2b_a[0], OtherModes.blend_m2a_0, OtherModes.blend_m2b_0, userdata); - SetBlenderInput(1, 0, &userdata->ColorInputs.blender1a_r[1], - &userdata->ColorInputs.blender1a_g[1], - &userdata->ColorInputs.blender1a_b[1], - &userdata->ColorInputs.blender1b_a[1], OtherModes.blend_m1a_1, OtherModes.blend_m1b_1, userdata); - SetBlenderInput(1, 1, &userdata->ColorInputs.blender2a_r[1], - &userdata->ColorInputs.blender2a_g[1], - &userdata->ColorInputs.blender2a_b[1], - &userdata->ColorInputs.blender2b_a[1], OtherModes.blend_m2a_1, OtherModes.blend_m2b_1, userdata); + set_blender_input(0, 0, &userdata->m_color_inputs.blender1a_r[0], + &userdata->m_color_inputs.blender1a_g[0], + &userdata->m_color_inputs.blender1a_b[0], + &userdata->m_color_inputs.blender1b_a[0], m_other_modes.blend_m1a_0, m_other_modes.blend_m1b_0, userdata); + set_blender_input(0, 1, &userdata->m_color_inputs.blender2a_r[0], + &userdata->m_color_inputs.blender2a_g[0], + &userdata->m_color_inputs.blender2a_b[0], + &userdata->m_color_inputs.blender2b_a[0], m_other_modes.blend_m2a_0, m_other_modes.blend_m2b_0, userdata); + set_blender_input(1, 0, &userdata->m_color_inputs.blender1a_r[1], + &userdata->m_color_inputs.blender1a_g[1], + &userdata->m_color_inputs.blender1a_b[1], + &userdata->m_color_inputs.blender1b_a[1], m_other_modes.blend_m1a_1, m_other_modes.blend_m1b_1, userdata); + set_blender_input(1, 1, &userdata->m_color_inputs.blender2a_r[1], + &userdata->m_color_inputs.blender2a_g[1], + &userdata->m_color_inputs.blender2a_b[1], + &userdata->m_color_inputs.blender2b_a[1], m_other_modes.blend_m2a_1, m_other_modes.blend_m2b_1, userdata); // Setup color combiner data for this scanline - SetSubAInputRGB(&userdata->ColorInputs.combiner_rgbsub_a_r[0], &userdata->ColorInputs.combiner_rgbsub_a_g[0], &userdata->ColorInputs.combiner_rgbsub_a_b[0], m_combine.sub_a_rgb0, userdata); - SetSubBInputRGB(&userdata->ColorInputs.combiner_rgbsub_b_r[0], &userdata->ColorInputs.combiner_rgbsub_b_g[0], &userdata->ColorInputs.combiner_rgbsub_b_b[0], m_combine.sub_b_rgb0, userdata); - SetMulInputRGB(&userdata->ColorInputs.combiner_rgbmul_r[0], &userdata->ColorInputs.combiner_rgbmul_g[0], &userdata->ColorInputs.combiner_rgbmul_b[0], m_combine.mul_rgb0, userdata); - SetAddInputRGB(&userdata->ColorInputs.combiner_rgbadd_r[0], &userdata->ColorInputs.combiner_rgbadd_g[0], &userdata->ColorInputs.combiner_rgbadd_b[0], m_combine.add_rgb0, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_a[0], m_combine.sub_a_a0, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_b[0], m_combine.sub_b_a0, userdata); - SetMulInputAlpha(&userdata->ColorInputs.combiner_alphamul[0], m_combine.mul_a0, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphaadd[0], m_combine.add_a0, userdata); - - SetSubAInputRGB(&userdata->ColorInputs.combiner_rgbsub_a_r[1], &userdata->ColorInputs.combiner_rgbsub_a_g[1], &userdata->ColorInputs.combiner_rgbsub_a_b[1], m_combine.sub_a_rgb1, userdata); - SetSubBInputRGB(&userdata->ColorInputs.combiner_rgbsub_b_r[1], &userdata->ColorInputs.combiner_rgbsub_b_g[1], &userdata->ColorInputs.combiner_rgbsub_b_b[1], m_combine.sub_b_rgb1, userdata); - SetMulInputRGB(&userdata->ColorInputs.combiner_rgbmul_r[1], &userdata->ColorInputs.combiner_rgbmul_g[1], &userdata->ColorInputs.combiner_rgbmul_b[1], m_combine.mul_rgb1, userdata); - SetAddInputRGB(&userdata->ColorInputs.combiner_rgbadd_r[1], &userdata->ColorInputs.combiner_rgbadd_g[1], &userdata->ColorInputs.combiner_rgbadd_b[1], m_combine.add_rgb1, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_a[1], m_combine.sub_a_a1, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_b[1], m_combine.sub_b_a1, userdata); - SetMulInputAlpha(&userdata->ColorInputs.combiner_alphamul[1], m_combine.mul_a1, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphaadd[1], m_combine.add_a1, userdata); + set_suba_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_a_r[0], &userdata->m_color_inputs.combiner_rgbsub_a_g[0], &userdata->m_color_inputs.combiner_rgbsub_a_b[0], m_combine.sub_a_rgb0, userdata); + set_subb_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_b_r[0], &userdata->m_color_inputs.combiner_rgbsub_b_g[0], &userdata->m_color_inputs.combiner_rgbsub_b_b[0], m_combine.sub_b_rgb0, userdata); + set_mul_input_rgb(&userdata->m_color_inputs.combiner_rgbmul_r[0], &userdata->m_color_inputs.combiner_rgbmul_g[0], &userdata->m_color_inputs.combiner_rgbmul_b[0], m_combine.mul_rgb0, userdata); + set_add_input_rgb(&userdata->m_color_inputs.combiner_rgbadd_r[0], &userdata->m_color_inputs.combiner_rgbadd_g[0], &userdata->m_color_inputs.combiner_rgbadd_b[0], m_combine.add_rgb0, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_a[0], m_combine.sub_a_a0, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_b[0], m_combine.sub_b_a0, userdata); + set_mul_input_alpha(&userdata->m_color_inputs.combiner_alphamul[0], m_combine.mul_a0, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphaadd[0], m_combine.add_a0, userdata); + + set_suba_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_a_r[1], &userdata->m_color_inputs.combiner_rgbsub_a_g[1], &userdata->m_color_inputs.combiner_rgbsub_a_b[1], m_combine.sub_a_rgb1, userdata); + set_subb_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_b_r[1], &userdata->m_color_inputs.combiner_rgbsub_b_g[1], &userdata->m_color_inputs.combiner_rgbsub_b_b[1], m_combine.sub_b_rgb1, userdata); + set_mul_input_rgb(&userdata->m_color_inputs.combiner_rgbmul_r[1], &userdata->m_color_inputs.combiner_rgbmul_g[1], &userdata->m_color_inputs.combiner_rgbmul_b[1], m_combine.mul_rgb1, userdata); + set_add_input_rgb(&userdata->m_color_inputs.combiner_rgbadd_r[1], &userdata->m_color_inputs.combiner_rgbadd_g[1], &userdata->m_color_inputs.combiner_rgbadd_b[1], m_combine.add_rgb1, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_a[1], m_combine.sub_a_a1, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_b[1], m_combine.sub_b_a1, userdata); + set_mul_input_alpha(&userdata->m_color_inputs.combiner_alphamul[1], m_combine.mul_a1, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphaadd[1], m_combine.add_a1, userdata); } if (spix == 3) { - Spans[spanidx].startx = maxxmx; - Spans[spanidx].stopx = minxhx; - compute_cvg_flip(Spans, majorx, minorx, majorxint, minorxint, j, yh, yl, ycur >> 2); + spans[spanidx].startx = maxxmx; + spans[spanidx].stopx = minxhx; + compute_cvg_flip(spans, majorx, minorx, majorxint, minorxint, j, yh, yl, ycur >> 2); } if (spix == ldflag) { - ((rdp_span_aux*)Spans[spanidx].userdata)->m_unscissored_rx = xend; + ((rdp_span_aux*)spans[spanidx].userdata)->m_unscissored_rx = xend; xfrac = ((xright >> 8) & 0xff); - Spans[spanidx].param[SPAN_R].start = ((r >> 9) << 9) + drdiff - (xfrac * drdxh); - Spans[spanidx].param[SPAN_G].start = ((g >> 9) << 9) + dgdiff - (xfrac * dgdxh); - Spans[spanidx].param[SPAN_B].start = ((b >> 9) << 9) + dbdiff - (xfrac * dbdxh); - Spans[spanidx].param[SPAN_A].start = ((a >> 9) << 9) + dadiff - (xfrac * dadxh); - Spans[spanidx].param[SPAN_S].start = (((s >> 9) << 9) + dsdiff - (xfrac * dsdxh)) & ~0x1f; - Spans[spanidx].param[SPAN_T].start = (((t >> 9) << 9) + dtdiff - (xfrac * dtdxh)) & ~0x1f; - Spans[spanidx].param[SPAN_W].start = (((w >> 9) << 9) + dwdiff - (xfrac * dwdxh)) & ~0x1f; - Spans[spanidx].param[SPAN_Z].start = ((z >> 9) << 9) + dzdiff - (xfrac * dzdxh); + spans[spanidx].param[SPAN_R].start = ((r >> 9) << 9) + drdiff - (xfrac * drdxh); + spans[spanidx].param[SPAN_G].start = ((g >> 9) << 9) + dgdiff - (xfrac * dgdxh); + spans[spanidx].param[SPAN_B].start = ((b >> 9) << 9) + dbdiff - (xfrac * dbdxh); + spans[spanidx].param[SPAN_A].start = ((a >> 9) << 9) + dadiff - (xfrac * dadxh); + spans[spanidx].param[SPAN_S].start = (((s >> 9) << 9) + dsdiff - (xfrac * dsdxh)) & ~0x1f; + spans[spanidx].param[SPAN_T].start = (((t >> 9) << 9) + dtdiff - (xfrac * dtdxh)) & ~0x1f; + spans[spanidx].param[SPAN_W].start = (((w >> 9) << 9) + dwdiff - (xfrac * dwdxh)) & ~0x1f; + spans[spanidx].param[SPAN_Z].start = ((z >> 9) << 9) + dzdiff - (xfrac * dzdxh); } } @@ -2248,7 +2211,7 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) } else { - for (int k = ycur; k <= ylfar; k++) + for (INT32 k = ycur; k <= ylfar; k++) { if (k == ym) { @@ -2256,12 +2219,12 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) xleft_inc = (dxldy >> 2) & ~1; } - int xstart = xleft >> 16; - int xend = xright >> 16; - int j = k >> 2; - int spanidx = j - (ycur >> 2); - int spix = k & 3; - valid_y = !(k < yh || k >= yl); + const INT32 xstart = xleft >> 16; + const INT32 xend = xright >> 16; + const INT32 j = k >> 2; + const INT32 spanidx = j - (ycur >> 2); + const INT32 spix = k & 3; + bool valid_y = !(k < yh || k >= yl); if (k >= 0 && k < 0x1000) { @@ -2291,109 +2254,83 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) new_object = false; } - Spans[spanidx].userdata = (void*)((UINT8*)AuxBuf + AuxBufPtr); + spans[spanidx].userdata = (void*)((UINT8*)m_aux_buf + m_aux_buf_ptr); valid = true; - AuxBufPtr += sizeof(rdp_span_aux); + m_aux_buf_ptr += sizeof(rdp_span_aux); - if(AuxBufPtr >= EXTENT_AUX_COUNT) + if(m_aux_buf_ptr >= EXTENT_AUX_COUNT) { - fatalerror("n64_rdp::DrawTriangle: span aux buffer overflow\n"); + fatalerror("n64_rdp::draw_triangle: span aux buffer overflow\n"); } - rdp_span_aux *userdata = (rdp_span_aux*)Spans[spanidx].userdata; + rdp_span_aux* userdata = (rdp_span_aux*)spans[spanidx].userdata; userdata->m_tmem = object->m_tmem; - userdata->BlendColor = BlendColor; - userdata->PrimColor = PrimColor; - userdata->EnvColor = EnvColor; - userdata->FogColor = FogColor; - userdata->KeyScale = KeyScale; - userdata->LODFraction = LODFraction; - userdata->PrimLODFraction = PrimLODFraction; - - userdata->ColorInputs.combiner_rgbsub_a_r[0] = userdata->ColorInputs.combiner_rgbsub_a_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbsub_a_g[0] = userdata->ColorInputs.combiner_rgbsub_a_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbsub_a_b[0] = userdata->ColorInputs.combiner_rgbsub_a_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_rgbsub_b_r[0] = userdata->ColorInputs.combiner_rgbsub_b_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbsub_b_g[0] = userdata->ColorInputs.combiner_rgbsub_b_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbsub_b_b[0] = userdata->ColorInputs.combiner_rgbsub_b_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_rgbmul_r[0] = userdata->ColorInputs.combiner_rgbmul_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbmul_g[0] = userdata->ColorInputs.combiner_rgbmul_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbmul_b[0] = userdata->ColorInputs.combiner_rgbmul_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_rgbadd_r[0] = userdata->ColorInputs.combiner_rgbadd_r[1] = &OneColor.i.r; - userdata->ColorInputs.combiner_rgbadd_g[0] = userdata->ColorInputs.combiner_rgbadd_g[1] = &OneColor.i.g; - userdata->ColorInputs.combiner_rgbadd_b[0] = userdata->ColorInputs.combiner_rgbadd_b[1] = &OneColor.i.b; - userdata->ColorInputs.combiner_alphasub_a[0] = userdata->ColorInputs.combiner_alphasub_a[1] = &OneColor.i.a; - userdata->ColorInputs.combiner_alphasub_b[0] = userdata->ColorInputs.combiner_alphasub_b[1] = &OneColor.i.a; - userdata->ColorInputs.combiner_alphamul[0] = userdata->ColorInputs.combiner_alphamul[1] = &OneColor.i.a; - userdata->ColorInputs.combiner_alphaadd[0] = userdata->ColorInputs.combiner_alphaadd[1] = &OneColor.i.a; - - userdata->ColorInputs.blender1a_r[0] = userdata->ColorInputs.blender1a_r[1] = &userdata->PixelColor.i.r; - userdata->ColorInputs.blender1a_g[0] = userdata->ColorInputs.blender1a_g[1] = &userdata->PixelColor.i.g; - userdata->ColorInputs.blender1a_b[0] = userdata->ColorInputs.blender1a_b[1] = &userdata->PixelColor.i.b; - userdata->ColorInputs.blender1b_a[0] = userdata->ColorInputs.blender1b_a[1] = &userdata->PixelColor.i.a; - userdata->ColorInputs.blender2a_r[0] = userdata->ColorInputs.blender2a_r[1] = &userdata->PixelColor.i.r; - userdata->ColorInputs.blender2a_g[0] = userdata->ColorInputs.blender2a_g[1] = &userdata->PixelColor.i.g; - userdata->ColorInputs.blender2a_b[0] = userdata->ColorInputs.blender2a_b[1] = &userdata->PixelColor.i.b; - userdata->ColorInputs.blender2b_a[0] = userdata->ColorInputs.blender2b_a[1] = &userdata->PixelColor.i.a; + userdata->m_blend_color = m_blend_color; + userdata->m_prim_color = m_prim_color; + userdata->m_env_color = m_env_color; + userdata->m_fog_color = m_fog_color; + userdata->m_key_scale = m_key_scale; + userdata->m_lod_fraction = m_lod_fraction; + userdata->m_prim_lod_fraction = m_prim_lod_fraction; // Setup blender data for this scanline - SetBlenderInput(0, 0, &userdata->ColorInputs.blender1a_r[0], - &userdata->ColorInputs.blender1a_g[0], - &userdata->ColorInputs.blender1a_b[0], - &userdata->ColorInputs.blender1b_a[0], OtherModes.blend_m1a_0, OtherModes.blend_m1b_0, userdata); - SetBlenderInput(0, 1, &userdata->ColorInputs.blender2a_r[0], - &userdata->ColorInputs.blender2a_g[0], - &userdata->ColorInputs.blender2a_b[0], - &userdata->ColorInputs.blender2b_a[0], OtherModes.blend_m2a_0, OtherModes.blend_m2b_0, userdata); - SetBlenderInput(1, 0, &userdata->ColorInputs.blender1a_r[1], - &userdata->ColorInputs.blender1a_g[1], - &userdata->ColorInputs.blender1a_b[1], - &userdata->ColorInputs.blender1b_a[1], OtherModes.blend_m1a_1, OtherModes.blend_m1b_1, userdata); - SetBlenderInput(1, 1, &userdata->ColorInputs.blender2a_r[1], - &userdata->ColorInputs.blender2a_g[1], - &userdata->ColorInputs.blender2a_b[1], - &userdata->ColorInputs.blender2b_a[1], OtherModes.blend_m2a_1, OtherModes.blend_m2b_1, userdata); + set_blender_input(0, 0, &userdata->m_color_inputs.blender1a_r[0], + &userdata->m_color_inputs.blender1a_g[0], + &userdata->m_color_inputs.blender1a_b[0], + &userdata->m_color_inputs.blender1b_a[0], m_other_modes.blend_m1a_0, m_other_modes.blend_m1b_0, userdata); + set_blender_input(0, 1, &userdata->m_color_inputs.blender2a_r[0], + &userdata->m_color_inputs.blender2a_g[0], + &userdata->m_color_inputs.blender2a_b[0], + &userdata->m_color_inputs.blender2b_a[0], m_other_modes.blend_m2a_0, m_other_modes.blend_m2b_0, userdata); + set_blender_input(1, 0, &userdata->m_color_inputs.blender1a_r[1], + &userdata->m_color_inputs.blender1a_g[1], + &userdata->m_color_inputs.blender1a_b[1], + &userdata->m_color_inputs.blender1b_a[1], m_other_modes.blend_m1a_1, m_other_modes.blend_m1b_1, userdata); + set_blender_input(1, 1, &userdata->m_color_inputs.blender2a_r[1], + &userdata->m_color_inputs.blender2a_g[1], + &userdata->m_color_inputs.blender2a_b[1], + &userdata->m_color_inputs.blender2b_a[1], m_other_modes.blend_m2a_1, m_other_modes.blend_m2b_1, userdata); // Setup color combiner data for this scanline - SetSubAInputRGB(&userdata->ColorInputs.combiner_rgbsub_a_r[0], &userdata->ColorInputs.combiner_rgbsub_a_g[0], &userdata->ColorInputs.combiner_rgbsub_a_b[0], m_combine.sub_a_rgb0, userdata); - SetSubBInputRGB(&userdata->ColorInputs.combiner_rgbsub_b_r[0], &userdata->ColorInputs.combiner_rgbsub_b_g[0], &userdata->ColorInputs.combiner_rgbsub_b_b[0], m_combine.sub_b_rgb0, userdata); - SetMulInputRGB(&userdata->ColorInputs.combiner_rgbmul_r[0], &userdata->ColorInputs.combiner_rgbmul_g[0], &userdata->ColorInputs.combiner_rgbmul_b[0], m_combine.mul_rgb0, userdata); - SetAddInputRGB(&userdata->ColorInputs.combiner_rgbadd_r[0], &userdata->ColorInputs.combiner_rgbadd_g[0], &userdata->ColorInputs.combiner_rgbadd_b[0], m_combine.add_rgb0, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_a[0], m_combine.sub_a_a0, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_b[0], m_combine.sub_b_a0, userdata); - SetMulInputAlpha(&userdata->ColorInputs.combiner_alphamul[0], m_combine.mul_a0, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphaadd[0], m_combine.add_a0, userdata); - - SetSubAInputRGB(&userdata->ColorInputs.combiner_rgbsub_a_r[1], &userdata->ColorInputs.combiner_rgbsub_a_g[1], &userdata->ColorInputs.combiner_rgbsub_a_b[1], m_combine.sub_a_rgb1, userdata); - SetSubBInputRGB(&userdata->ColorInputs.combiner_rgbsub_b_r[1], &userdata->ColorInputs.combiner_rgbsub_b_g[1], &userdata->ColorInputs.combiner_rgbsub_b_b[1], m_combine.sub_b_rgb1, userdata); - SetMulInputRGB(&userdata->ColorInputs.combiner_rgbmul_r[1], &userdata->ColorInputs.combiner_rgbmul_g[1], &userdata->ColorInputs.combiner_rgbmul_b[1], m_combine.mul_rgb1, userdata); - SetAddInputRGB(&userdata->ColorInputs.combiner_rgbadd_r[1], &userdata->ColorInputs.combiner_rgbadd_g[1], &userdata->ColorInputs.combiner_rgbadd_b[1], m_combine.add_rgb1, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_a[1], m_combine.sub_a_a1, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphasub_b[1], m_combine.sub_b_a1, userdata); - SetMulInputAlpha(&userdata->ColorInputs.combiner_alphamul[1], m_combine.mul_a1, userdata); - SetSubInputAlpha(&userdata->ColorInputs.combiner_alphaadd[1], m_combine.add_a1, userdata); + set_suba_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_a_r[0], &userdata->m_color_inputs.combiner_rgbsub_a_g[0], &userdata->m_color_inputs.combiner_rgbsub_a_b[0], m_combine.sub_a_rgb0, userdata); + set_subb_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_b_r[0], &userdata->m_color_inputs.combiner_rgbsub_b_g[0], &userdata->m_color_inputs.combiner_rgbsub_b_b[0], m_combine.sub_b_rgb0, userdata); + set_mul_input_rgb(&userdata->m_color_inputs.combiner_rgbmul_r[0], &userdata->m_color_inputs.combiner_rgbmul_g[0], &userdata->m_color_inputs.combiner_rgbmul_b[0], m_combine.mul_rgb0, userdata); + set_add_input_rgb(&userdata->m_color_inputs.combiner_rgbadd_r[0], &userdata->m_color_inputs.combiner_rgbadd_g[0], &userdata->m_color_inputs.combiner_rgbadd_b[0], m_combine.add_rgb0, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_a[0], m_combine.sub_a_a0, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_b[0], m_combine.sub_b_a0, userdata); + set_mul_input_alpha(&userdata->m_color_inputs.combiner_alphamul[0], m_combine.mul_a0, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphaadd[0], m_combine.add_a0, userdata); + + set_suba_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_a_r[1], &userdata->m_color_inputs.combiner_rgbsub_a_g[1], &userdata->m_color_inputs.combiner_rgbsub_a_b[1], m_combine.sub_a_rgb1, userdata); + set_subb_input_rgb(&userdata->m_color_inputs.combiner_rgbsub_b_r[1], &userdata->m_color_inputs.combiner_rgbsub_b_g[1], &userdata->m_color_inputs.combiner_rgbsub_b_b[1], m_combine.sub_b_rgb1, userdata); + set_mul_input_rgb(&userdata->m_color_inputs.combiner_rgbmul_r[1], &userdata->m_color_inputs.combiner_rgbmul_g[1], &userdata->m_color_inputs.combiner_rgbmul_b[1], m_combine.mul_rgb1, userdata); + set_add_input_rgb(&userdata->m_color_inputs.combiner_rgbadd_r[1], &userdata->m_color_inputs.combiner_rgbadd_g[1], &userdata->m_color_inputs.combiner_rgbadd_b[1], m_combine.add_rgb1, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_a[1], m_combine.sub_a_a1, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphasub_b[1], m_combine.sub_b_a1, userdata); + set_mul_input_alpha(&userdata->m_color_inputs.combiner_alphamul[1], m_combine.mul_a1, userdata); + set_sub_input_alpha(&userdata->m_color_inputs.combiner_alphaadd[1], m_combine.add_a1, userdata); } if (spix == 3) { - Spans[spanidx].startx = minxmx; - Spans[spanidx].stopx = maxxhx; - compute_cvg_noflip(Spans, majorx, minorx, majorxint, minorxint, j, yh, yl, ycur >> 2); + spans[spanidx].startx = minxmx; + spans[spanidx].stopx = maxxhx; + compute_cvg_noflip(spans, majorx, minorx, majorxint, minorxint, j, yh, yl, ycur >> 2); } if (spix == ldflag) { - ((rdp_span_aux*)Spans[spanidx].userdata)->m_unscissored_rx = xend; + ((rdp_span_aux*)spans[spanidx].userdata)->m_unscissored_rx = xend; xfrac = ((xright >> 8) & 0xff); - Spans[spanidx].param[SPAN_R].start = ((r >> 9) << 9) + drdiff - (xfrac * drdxh); - Spans[spanidx].param[SPAN_G].start = ((g >> 9) << 9) + dgdiff - (xfrac * dgdxh); - Spans[spanidx].param[SPAN_B].start = ((b >> 9) << 9) + dbdiff - (xfrac * dbdxh); - Spans[spanidx].param[SPAN_A].start = ((a >> 9) << 9) + dadiff - (xfrac * dadxh); - Spans[spanidx].param[SPAN_S].start = (((s >> 9) << 9) + dsdiff - (xfrac * dsdxh)) & ~0x1f; - Spans[spanidx].param[SPAN_T].start = (((t >> 9) << 9) + dtdiff - (xfrac * dtdxh)) & ~0x1f; - Spans[spanidx].param[SPAN_W].start = (((w >> 9) << 9) + dwdiff - (xfrac * dwdxh)) & ~0x1f; - Spans[spanidx].param[SPAN_Z].start = ((z >> 9) << 9) + dzdiff - (xfrac * dzdxh); + spans[spanidx].param[SPAN_R].start = ((r >> 9) << 9) + drdiff - (xfrac * drdxh); + spans[spanidx].param[SPAN_G].start = ((g >> 9) << 9) + dgdiff - (xfrac * dgdxh); + spans[spanidx].param[SPAN_B].start = ((b >> 9) << 9) + dbdiff - (xfrac * dbdxh); + spans[spanidx].param[SPAN_A].start = ((a >> 9) << 9) + dadiff - (xfrac * dadxh); + spans[spanidx].param[SPAN_S].start = (((s >> 9) << 9) + dsdiff - (xfrac * dsdxh)) & ~0x1f; + spans[spanidx].param[SPAN_T].start = (((t >> 9) << 9) + dtdiff - (xfrac * dtdxh)) & ~0x1f; + spans[spanidx].param[SPAN_W].start = (((w >> 9) << 9) + dwdiff - (xfrac * dwdxh)) & ~0x1f; + spans[spanidx].param[SPAN_Z].start = ((z >> 9) << 9) + dzdiff - (xfrac * dzdxh); } } @@ -2415,10 +2352,10 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) if(!new_object && valid) { - RenderSpans(yh >> 2, yl >> 2, tilenum, flip ? true : false, Spans, rect, object); + render_spans(yh >> 2, yl >> 2, tilenum, flip ? true : false, spans, rect, object); } - //wait("DrawTriangle"); + //wait("draw_triangle"); } /*****************************************************************************/ @@ -2426,82 +2363,78 @@ void n64_rdp::DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect) //////////////////////// // RDP COMMANDS //////////////////////// -void n64_rdp::Triangle(bool shade, bool texture, bool zbuffer) + +void n64_rdp::triangle(bool shade, bool texture, bool zbuffer) { - DrawTriangle(shade, texture, zbuffer, false); + draw_triangle(shade, texture, zbuffer, false); m_pipe_clean = false; - //wait(); } -void n64_rdp::CmdTriangle(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle(UINT32 w1, UINT32 w2) { - Triangle(false, false, false); + triangle(false, false, false); } -void n64_rdp::CmdTriangleZ(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_z(UINT32 w1, UINT32 w2) { - Triangle(false, false, true); + triangle(false, false, true); } -void n64_rdp::CmdTriangleT(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_t(UINT32 w1, UINT32 w2) { - Triangle(false, true, false); + triangle(false, true, false); } -void n64_rdp::CmdTriangleTZ(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_tz(UINT32 w1, UINT32 w2) { - Triangle(false, true, true); + triangle(false, true, true); } -void n64_rdp::CmdTriangleS(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_s(UINT32 w1, UINT32 w2) { - Triangle(true, false, false); + triangle(true, false, false); } -void n64_rdp::CmdTriangleSZ(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_sz(UINT32 w1, UINT32 w2) { - Triangle(true, false, true); + triangle(true, false, true); } -void n64_rdp::CmdTriangleST(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_st(UINT32 w1, UINT32 w2) { - Triangle(true, true, false); + triangle(true, true, false); } -void n64_rdp::CmdTriangleSTZ(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_triangle_stz(UINT32 w1, UINT32 w2) { - Triangle(true, true, true); + triangle(true, true, true); } -void n64_rdp::CmdTexRect(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_tex_rect(UINT32 w1, UINT32 w2) { - //if(m_pending_mode_block) { wait("Block on pending mode-change"); m_pending_mode_block = false; } + const UINT32* data = m_cmd_data + m_cmd_cur; - UINT32 *data = m_cmd_data + m_cmd_cur; + const UINT32 w3 = data[2]; + const UINT32 w4 = data[3]; - UINT32 w3 = data[2]; - UINT32 w4 = data[3]; + const INT32 tilenum = (w2 >> 24) & 0x7; + const INT32 xh = (w2 >> 12) & 0xfff; + const INT32 xl = (w1 >> 12) & 0xfff; + const INT32 yh = (w2 >> 0) & 0xfff; + INT32 yl = (w1 >> 0) & 0xfff; - UINT32 tilenum = (w2 >> 24) & 0x7; - UINT32 xl = (w1 >> 12) & 0xfff; - UINT32 yl = (w1 >> 0) & 0xfff; - UINT32 xh = (w2 >> 12) & 0xfff; - UINT32 yh = (w2 >> 0) & 0xfff; - INT32 s = (w3 >> 16) & 0xffff; - INT32 t = (w3 >> 0) & 0xffff; - INT32 dsdx = (w4 >> 16) & 0xffff; - INT32 dtdy = (w4 >> 0) & 0xffff; + const INT32 s = (w3 >> 16) & 0xffff; + const INT32 t = (w3 >> 0) & 0xffff; + const INT32 dsdx = SIGN16((w4 >> 16) & 0xffff); + const INT32 dtdy = SIGN16((w4 >> 0) & 0xffff); - dsdx = SIGN16(dsdx); - dtdy = SIGN16(dtdy); - - if (OtherModes.cycle_type == CYCLE_TYPE_FILL || OtherModes.cycle_type == CYCLE_TYPE_COPY) + if (m_other_modes.cycle_type == CYCLE_TYPE_FILL || m_other_modes.cycle_type == CYCLE_TYPE_COPY) { yl |= 3; } - UINT32 xlint = (xl >> 2) & 0x3ff; - UINT32 xhint = (xh >> 2) & 0x3ff; + const INT32 xlint = (xl >> 2) & 0x3ff; + const INT32 xhint = (xh >> 2) & 0x3ff; UINT32* ewdata = m_temp_rect_data; ewdata[0] = (0x24 << 24) | ((0x80 | tilenum) << 16) | yl; // command, flipped, tile, yl @@ -2531,38 +2464,34 @@ void n64_rdp::CmdTexRect(UINT32 w1, UINT32 w2) ewdata[39] = 0;//dwdy frac memset(&ewdata[40], 0, 4 * sizeof(UINT32));//depth - DrawTriangle(true, true, false, true); + draw_triangle(true, true, false, true); } -void n64_rdp::CmdTexRectFlip(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_tex_rect_flip(UINT32 w1, UINT32 w2) { - //if(m_pending_mode_block) { wait("Block on pending mode-change"); m_pending_mode_block = false; } + const UINT32* data = m_cmd_data + m_cmd_cur; - UINT32 *data = m_cmd_data + m_cmd_cur; + const UINT32 w3 = data[2]; + const UINT32 w4 = data[3]; - UINT32 w3 = data[2]; - UINT32 w4 = data[3]; + const INT32 tilenum = (w2 >> 24) & 0x7; + const INT32 xh = (w2 >> 12) & 0xfff; + const INT32 xl = (w1 >> 12) & 0xfff; + const INT32 yh = (w2 >> 0) & 0xfff; + INT32 yl = (w1 >> 0) & 0xfff; - UINT32 tilenum = (w2 >> 24) & 0x7; - UINT32 xl = (w1 >> 12) & 0xfff; - UINT32 yl = (w1 >> 0) & 0xfff; - UINT32 xh = (w2 >> 12) & 0xfff; - UINT32 yh = (w2 >> 0) & 0xfff; - INT32 s = (w3 >> 16) & 0xffff; - INT32 t = (w3 >> 0) & 0xffff; - INT32 dsdx = (w4 >> 16) & 0xffff; - INT32 dtdy = (w4 >> 0) & 0xffff; + const INT32 s = (w3 >> 16) & 0xffff; + const INT32 t = (w3 >> 0) & 0xffff; + const INT32 dsdx = SIGN16((w4 >> 16) & 0xffff); + const INT32 dtdy = SIGN16((w4 >> 0) & 0xffff); - dsdx = SIGN16(dsdx); - dtdy = SIGN16(dtdy); - - if (OtherModes.cycle_type == CYCLE_TYPE_FILL || OtherModes.cycle_type == CYCLE_TYPE_COPY) + if (m_other_modes.cycle_type == CYCLE_TYPE_FILL || m_other_modes.cycle_type == CYCLE_TYPE_COPY) { yl |= 3; } - UINT32 xlint = (xl >> 2) & 0x3ff; - UINT32 xhint = (xh >> 2) & 0x3ff; + const INT32 xlint = (xl >> 2) & 0x3ff; + const INT32 xhint = (xh >> 2) & 0x3ff; UINT32* ewdata = m_temp_rect_data; ewdata[0] = (0x25 << 24) | ((0x80 | tilenum) << 16) | yl;//command, flipped, tile, yl @@ -2592,48 +2521,48 @@ void n64_rdp::CmdTexRectFlip(UINT32 w1, UINT32 w2) ewdata[39] = 0;//dwdy frac memset(&ewdata[40], 0, 4 * sizeof(UINT32));//depth - DrawTriangle(true, true, false, true); + draw_triangle(true, true, false, true); } -void n64_rdp::CmdSyncLoad(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_sync_load(UINT32 w1, UINT32 w2) { //wait("SyncLoad"); } -void n64_rdp::CmdSyncPipe(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_sync_pipe(UINT32 w1, UINT32 w2) { //wait("SyncPipe"); } -void n64_rdp::CmdSyncTile(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_sync_tile(UINT32 w1, UINT32 w2) { //wait("SyncTile"); } -void n64_rdp::CmdSyncFull(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_sync_full(UINT32 w1, UINT32 w2) { //wait("SyncFull"); dp_full_sync(*m_machine); } -void n64_rdp::CmdSetKeyGB(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_key_gb(UINT32 w1, UINT32 w2) { - KeyScale.i.b = w2 & 0xff; - KeyScale.i.g = (w2 >> 16) & 0xff; + m_key_scale.i.b = w2 & 0xff; + m_key_scale.i.g = (w2 >> 16) & 0xff; } -void n64_rdp::CmdSetKeyR(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_key_r(UINT32 w1, UINT32 w2) { - KeyScale.i.r = w2 & 0xff; + m_key_scale.i.r = w2 & 0xff; } -void n64_rdp::CmdSetFillColor32(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_fill_color32(UINT32 w1, UINT32 w2) { //wait("SetFillColor"); - FillColor = w2; + m_fill_color = w2; } -void n64_rdp::CmdSetConvert(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_convert(UINT32 w1, UINT32 w2) { if(!m_pipe_clean) { m_pipe_clean = true; wait("SetConvert"); } INT32 k0 = (w1 >> 13) & 0xff; @@ -2648,86 +2577,87 @@ void n64_rdp::CmdSetConvert(UINT32 w1, UINT32 w2) k3 = ((w2 >> 26) & 1) ? (-(0x100 - k3)) : k3; k4 = ((w2 >> 17) & 1) ? (-(0x100 - k4)) : k4; k5 = ((w2 >> 8) & 1) ? (-(0x100 - k5)) : k5; - SetYUVFactors(k0, k1, k2, k3, k4, k5); + set_yuv_factors(k0, k1, k2, k3, k4, k5); } -void n64_rdp::CmdSetScissor(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_scissor(UINT32 w1, UINT32 w2) { - Scissor.m_xh = ((w1 >> 12) & 0xfff) >> 2; - Scissor.m_yh = ((w1 >> 0) & 0xfff) >> 2; - Scissor.m_xl = ((w2 >> 12) & 0xfff) >> 2; - Scissor.m_yl = ((w2 >> 0) & 0xfff) >> 2; + m_scissor.m_xh = ((w1 >> 12) & 0xfff) >> 2; + m_scissor.m_yh = ((w1 >> 0) & 0xfff) >> 2; + m_scissor.m_xl = ((w2 >> 12) & 0xfff) >> 2; + m_scissor.m_yl = ((w2 >> 0) & 0xfff) >> 2; // TODO: handle f & o? } -void n64_rdp::CmdSetPrimDepth(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_prim_depth(UINT32 w1, UINT32 w2) { - MiscState.PrimitiveZ = (UINT16)(w2 >> 16) & 0x7fff; - MiscState.PrimitiveDZ = (UINT16)(w1); + m_misc_state.m_primitive_z = w2 & 0x7fff0000; + m_misc_state.m_primitive_dz = (UINT16)(w1); } -void n64_rdp::CmdSetOtherModes(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_other_modes(UINT32 w1, UINT32 w2) { //wait("SetOtherModes"); - OtherModes.cycle_type = (w1 >> 20) & 0x3; // 01 - OtherModes.persp_tex_en = (w1 & 0x80000) ? 1 : 0; // 1 - OtherModes.detail_tex_en = (w1 & 0x40000) ? 1 : 0; // 0 - OtherModes.sharpen_tex_en = (w1 & 0x20000) ? 1 : 0; // 0 - OtherModes.tex_lod_en = (w1 & 0x10000) ? 1 : 0; // 0 - OtherModes.en_tlut = (w1 & 0x08000) ? 1 : 0; // 0 - OtherModes.tlut_type = (w1 & 0x04000) ? 1 : 0; // 0 - OtherModes.sample_type = (w1 & 0x02000) ? 1 : 0; // 1 - OtherModes.mid_texel = (w1 & 0x01000) ? 1 : 0; // 0 - OtherModes.bi_lerp0 = (w1 & 0x00800) ? 1 : 0; // 1 - OtherModes.bi_lerp1 = (w1 & 0x00400) ? 1 : 0; // 1 - OtherModes.convert_one = (w1 & 0x00200) ? 1 : 0; // 0 - OtherModes.key_en = (w1 & 0x00100) ? 1 : 0; // 0 - OtherModes.rgb_dither_sel = (w1 >> 6) & 0x3; // 00 - OtherModes.alpha_dither_sel = (w1 >> 4) & 0x3; // 01 - OtherModes.blend_m1a_0 = (w2 >> 30) & 0x3; // 11 - OtherModes.blend_m1a_1 = (w2 >> 28) & 0x3; // 00 - OtherModes.blend_m1b_0 = (w2 >> 26) & 0x3; // 10 - OtherModes.blend_m1b_1 = (w2 >> 24) & 0x3; // 00 - OtherModes.blend_m2a_0 = (w2 >> 22) & 0x3; // 00 - OtherModes.blend_m2a_1 = (w2 >> 20) & 0x3; // 01 - OtherModes.blend_m2b_0 = (w2 >> 18) & 0x3; // 00 - OtherModes.blend_m2b_1 = (w2 >> 16) & 0x3; // 01 - OtherModes.force_blend = (w2 >> 14) & 1; // 0 - OtherModes.alpha_cvg_select = (w2 >> 13) & 1; // 1 - OtherModes.cvg_times_alpha = (w2 >> 12) & 1; // 0 - OtherModes.z_mode = (w2 >> 10) & 0x3; // 00 - OtherModes.cvg_dest = (w2 >> 8) & 0x3; // 00 - OtherModes.color_on_cvg = (w2 >> 7) & 1; // 0 - OtherModes.image_read_en = (w2 >> 6) & 1; // 1 - OtherModes.z_update_en = (w2 >> 5) & 1; // 1 - OtherModes.z_compare_en = (w2 >> 4) & 1; // 1 - OtherModes.antialias_en = (w2 >> 3) & 1; // 1 - OtherModes.z_source_sel = (w2 >> 2) & 1; // 0 - OtherModes.dither_alpha_en = (w2 >> 1) & 1; // 0 - OtherModes.alpha_compare_en = (w2) & 1; // 0 -} - -void n64_rdp::CmdLoadTLUT(UINT32 w1, UINT32 w2) + m_other_modes.cycle_type = (w1 >> 20) & 0x3; // 01 + m_other_modes.persp_tex_en = (w1 & 0x80000) ? 1 : 0; // 1 + m_other_modes.detail_tex_en = (w1 & 0x40000) ? 1 : 0; // 0 + m_other_modes.sharpen_tex_en = (w1 & 0x20000) ? 1 : 0; // 0 + m_other_modes.tex_lod_en = (w1 & 0x10000) ? 1 : 0; // 0 + m_other_modes.en_tlut = (w1 & 0x08000) ? 1 : 0; // 0 + m_other_modes.tlut_type = (w1 & 0x04000) ? 1 : 0; // 0 + m_other_modes.sample_type = (w1 & 0x02000) ? 1 : 0; // 1 + m_other_modes.mid_texel = (w1 & 0x01000) ? 1 : 0; // 0 + m_other_modes.bi_lerp0 = (w1 & 0x00800) ? 1 : 0; // 1 + m_other_modes.bi_lerp1 = (w1 & 0x00400) ? 1 : 0; // 1 + m_other_modes.convert_one = (w1 & 0x00200) ? 1 : 0; // 0 + m_other_modes.key_en = (w1 & 0x00100) ? 1 : 0; // 0 + m_other_modes.rgb_dither_sel = (w1 >> 6) & 0x3; // 00 + m_other_modes.alpha_dither_sel = (w1 >> 4) & 0x3; // 01 + m_other_modes.blend_m1a_0 = (w2 >> 30) & 0x3; // 11 + m_other_modes.blend_m1a_1 = (w2 >> 28) & 0x3; // 00 + m_other_modes.blend_m1b_0 = (w2 >> 26) & 0x3; // 10 + m_other_modes.blend_m1b_1 = (w2 >> 24) & 0x3; // 00 + m_other_modes.blend_m2a_0 = (w2 >> 22) & 0x3; // 00 + m_other_modes.blend_m2a_1 = (w2 >> 20) & 0x3; // 01 + m_other_modes.blend_m2b_0 = (w2 >> 18) & 0x3; // 00 + m_other_modes.blend_m2b_1 = (w2 >> 16) & 0x3; // 01 + m_other_modes.force_blend = (w2 >> 14) & 1; // 0 + m_other_modes.blend_shift = m_other_modes.force_blend ? 5 : 2; + m_other_modes.alpha_cvg_select = (w2 >> 13) & 1; // 1 + m_other_modes.cvg_times_alpha = (w2 >> 12) & 1; // 0 + m_other_modes.z_mode = (w2 >> 10) & 0x3; // 00 + m_other_modes.cvg_dest = (w2 >> 8) & 0x3; // 00 + m_other_modes.color_on_cvg = (w2 >> 7) & 1; // 0 + m_other_modes.image_read_en = (w2 >> 6) & 1; // 1 + m_other_modes.z_update_en = (w2 >> 5) & 1; // 1 + m_other_modes.z_compare_en = (w2 >> 4) & 1; // 1 + m_other_modes.antialias_en = (w2 >> 3) & 1; // 1 + m_other_modes.z_source_sel = (w2 >> 2) & 1; // 0 + m_other_modes.dither_alpha_en = (w2 >> 1) & 1; // 0 + m_other_modes.alpha_compare_en = (w2) & 1; // 0 + m_other_modes.alpha_dither_mode = (m_other_modes.alpha_compare_en << 1) | m_other_modes.dither_alpha_en; +} + +void n64_rdp::cmd_load_tlut(UINT32 w1, UINT32 w2) { //wait("LoadTLUT"); - N64Tile* tile = m_tiles; + n64_tile_t* tile = m_tiles; - int tilenum = (w2 >> 24) & 0x7; - int sl = tile[tilenum].sl = ((w1 >> 12) & 0xfff); - int tl = tile[tilenum].tl = w1 & 0xfff; - int sh = tile[tilenum].sh = ((w2 >> 12) & 0xfff); - int th = tile[tilenum].th = w2 & 0xfff; + const INT32 tilenum = (w2 >> 24) & 0x7; + const INT32 sl = tile[tilenum].sl = ((w1 >> 12) & 0xfff); + const INT32 tl = tile[tilenum].tl = w1 & 0xfff; + const INT32 sh = tile[tilenum].sh = ((w2 >> 12) & 0xfff); + const INT32 th = tile[tilenum].th = w2 & 0xfff; if (tl != th) { fatalerror("Load tlut: tl=%d, th=%d\n",tl,th); } - int count = (sh >> 2) - (sl >> 2) + 1; - count <<= 2; + const INT32 count = ((sh >> 2) - (sl >> 2) + 1) << 2; - switch (MiscState.TISize) + switch (m_misc_state.m_ti_size) { case PIXEL_SIZE_16BIT: { @@ -2735,11 +2665,11 @@ void n64_rdp::CmdLoadTLUT(UINT32 w1, UINT32 w2) { fatalerror("rdp_load_tlut: loading tlut into low half at %d qwords\n",tile[tilenum].tmem); } - UINT32 srcstart = (MiscState.TIAddress + (tl >> 2) * (MiscState.TIWidth << 1) + (sl >> 1)) >> 1; - UINT16 *dst = GetTMEM16(); - UINT32 dststart = tile[tilenum].tmem << 2; + INT32 srcstart = (m_misc_state.m_ti_address + (tl >> 2) * (m_misc_state.m_ti_width << 1) + (sl >> 1)) >> 1; + INT32 dststart = tile[tilenum].tmem << 2; + UINT16* dst = get_tmem16(); - for (int i = 0; i < count; i += 4) + for (INT32 i = 0; i < count; i += 4) { if (dststart < 2048) { @@ -2753,15 +2683,15 @@ void n64_rdp::CmdLoadTLUT(UINT32 w1, UINT32 w2) } break; } - default: fatalerror("RDP: load_tlut: size = %d\n", MiscState.TISize); + default: fatalerror("RDP: load_tlut: size = %d\n", m_misc_state.m_ti_size); } } -void n64_rdp::CmdSetTileSize(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_tile_size(UINT32 w1, UINT32 w2) { //wait("SetTileSize"); - const int tilenum = (w2 >> 24) & 0x7; + const INT32 tilenum = (w2 >> 24) & 0x7; m_tiles[tilenum].sl = (w1 >> 12) & 0xfff; m_tiles[tilenum].tl = (w1 >> 0) & 0xfff; @@ -2769,19 +2699,18 @@ void n64_rdp::CmdSetTileSize(UINT32 w1, UINT32 w2) m_tiles[tilenum].th = (w2 >> 0) & 0xfff; } -void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_load_block(UINT32 w1, UINT32 w2) { //wait("LoadBlock"); - N64Tile* tile = m_tiles; + n64_tile_t* tile = m_tiles; - int tilenum = (w2 >> 24) & 0x7; - UINT16* tc = GetTMEM16(); + const INT32 tilenum = (w2 >> 24) & 0x7; + UINT16* tc = get_tmem16(); - UINT16 sl, sh, tl; - tile[tilenum].sl = sl = ((w1 >> 12) & 0xfff); - tile[tilenum].tl = tl = ((w1 >> 0) & 0xfff); - tile[tilenum].sh = sh = ((w2 >> 12) & 0xfff); - UINT16 dxt = ((w2 >> 0) & 0xfff); + INT32 sl = tile[tilenum].sl = ((w1 >> 12) & 0xfff); + INT32 tl = tile[tilenum].tl = ((w1 >> 0) & 0xfff); + INT32 sh = tile[tilenum].sh = ((w2 >> 12) & 0xfff); + const INT32 dxt = ((w2 >> 0) & 0xfff); if (sh < sl) { @@ -2790,34 +2719,29 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) INT32 width = (sh - sl) + 1; - width = (width << MiscState.TISize) >> 1; + width = (width << m_misc_state.m_ti_size) >> 1; if (width & 7) { width = (width & ~7) + 8; } width >>= 3; - UINT32 tb = tile[tilenum].tmem << 2; - - int tiwinwords = MiscState.TIWidth; - UINT32 slinwords = sl; + const INT32 tb = tile[tilenum].tmem << 2; - tiwinwords = (tiwinwords << MiscState.TISize) >> 2; - slinwords = (slinwords << MiscState.TISize) >> 2; + const INT32 tiwinwords = (m_misc_state.m_ti_width << m_misc_state.m_ti_size) >> 2; + const INT32 slinwords = (sl << m_misc_state.m_ti_size) >> 2; - int ptr = 0, srcptr = 0; - UINT16 first, sec; - UINT32 src = (MiscState.TIAddress >> 1) + (tl * tiwinwords) + slinwords; + const UINT32 src = (m_misc_state.m_ti_address >> 1) + (tl * tiwinwords) + slinwords; if (dxt != 0) { - int j = 0; - int t = 0; - int oldt = 0; + INT32 j = 0; + INT32 t = 0; + INT32 oldt = 0; if (tile[tilenum].size != PIXEL_SIZE_32BIT && tile[tilenum].format != FORMAT_YUV) { - for (int i = 0; i < width; i ++) + for (INT32 i = 0; i < width; i ++) { oldt = t; t = ((j >> 11) & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; @@ -2826,8 +2750,8 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) i += tile[tilenum].line; } - ptr = tb + (i << 2); - srcptr = src + (i << 2); + INT32 ptr = tb + (i << 2); + INT32 srcptr = src + (i << 2); tc[(ptr ^ t) & 0x7ff] = U_RREADIDX16(srcptr); tc[((ptr + 1) ^ t) & 0x7ff] = U_RREADIDX16(srcptr + 1); @@ -2838,7 +2762,7 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) } else if (tile[tilenum].format == FORMAT_YUV) { - for (int i = 0; i < width; i ++) + for (INT32 i = 0; i < width; i ++) { oldt = t; t = ((j >> 11) & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; @@ -2847,11 +2771,11 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) i += tile[tilenum].line; } - ptr = ((tb + (i << 1)) ^ t) & 0x3ff; - srcptr = src + (i << 2); + INT32 ptr = ((tb + (i << 1)) ^ t) & 0x3ff; + INT32 srcptr = src + (i << 2); - first = U_RREADIDX16(srcptr); - sec = U_RREADIDX16(srcptr + 1); + INT32 first = U_RREADIDX16(srcptr); + INT32 sec = U_RREADIDX16(srcptr + 1); tc[ptr] = ((first >> 8) << 8) | (sec >> 8); tc[ptr | 0x400] = ((first & 0xff) << 8) | (sec & 0xff); @@ -2866,15 +2790,15 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) } else { - for (int i = 0; i < width; i ++) + for (INT32 i = 0; i < width; i ++) { oldt = t; t = ((j >> 11) & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; if (t != oldt) i += tile[tilenum].line; - ptr = ((tb + (i << 1)) ^ t) & 0x3ff; - srcptr = src + (i << 2); + INT32 ptr = ((tb + (i << 1)) ^ t) & 0x3ff; + INT32 srcptr = src + (i << 2); tc[ptr] = U_RREADIDX16(srcptr); tc[ptr | 0x400] = U_RREADIDX16(srcptr + 1); @@ -2891,10 +2815,10 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) { if (tile[tilenum].size != PIXEL_SIZE_32BIT && tile[tilenum].format != FORMAT_YUV) { - for (int i = 0; i < width; i ++) + for (INT32 i = 0; i < width; i ++) { - ptr = tb + (i << 2); - srcptr = src + (i << 2); + INT32 ptr = tb + (i << 2); + INT32 srcptr = src + (i << 2); tc[(ptr ^ WORD_ADDR_XOR) & 0x7ff] = U_RREADIDX16(srcptr); tc[((ptr + 1) ^ WORD_ADDR_XOR) & 0x7ff] = U_RREADIDX16(srcptr + 1); tc[((ptr + 2) ^ WORD_ADDR_XOR) & 0x7ff] = U_RREADIDX16(srcptr + 2); @@ -2903,12 +2827,12 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) } else if (tile[tilenum].format == FORMAT_YUV) { - for (int i = 0; i < width; i ++) + for (INT32 i = 0; i < width; i ++) { - ptr = ((tb + (i << 1)) ^ WORD_ADDR_XOR) & 0x3ff; - srcptr = src + (i << 2); - first = U_RREADIDX16(srcptr); - sec = U_RREADIDX16(srcptr + 1); + INT32 ptr = ((tb + (i << 1)) ^ WORD_ADDR_XOR) & 0x3ff; + INT32 srcptr = src + (i << 2); + INT32 first = U_RREADIDX16(srcptr); + INT32 sec = U_RREADIDX16(srcptr + 1); tc[ptr] = ((first >> 8) << 8) | (sec >> 8);//UV pair tc[ptr | 0x400] = ((first & 0xff) << 8) | (sec & 0xff); @@ -2921,10 +2845,10 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) } else { - for (int i = 0; i < width; i ++) + for (INT32 i = 0; i < width; i ++) { - ptr = ((tb + (i << 1)) ^ WORD_ADDR_XOR) & 0x3ff; - srcptr = src + (i << 2); + INT32 ptr = ((tb + (i << 1)) ^ WORD_ADDR_XOR) & 0x3ff; + INT32 srcptr = src + (i << 2); tc[ptr] = U_RREADIDX16(srcptr); tc[ptr | 0x400] = U_RREADIDX16(srcptr + 1); @@ -2937,29 +2861,29 @@ void n64_rdp::CmdLoadBlock(UINT32 w1, UINT32 w2) } } -void n64_rdp::CmdLoadTile(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_load_tile(UINT32 w1, UINT32 w2) { //wait("LoadTile"); - N64Tile* tile = m_tiles; - int tilenum = (w2 >> 24) & 0x7; + n64_tile_t* tile = m_tiles; + const INT32 tilenum = (w2 >> 24) & 0x7; tile[tilenum].sl = ((w1 >> 12) & 0xfff); tile[tilenum].tl = ((w1 >> 0) & 0xfff); tile[tilenum].sh = ((w2 >> 12) & 0xfff); tile[tilenum].th = ((w2 >> 0) & 0xfff); - UINT16 sl = tile[tilenum].sl >> 2; - UINT16 tl = tile[tilenum].tl >> 2; - UINT16 sh = tile[tilenum].sh >> 2; - UINT16 th = tile[tilenum].th >> 2; + const INT32 sl = tile[tilenum].sl >> 2; + const INT32 tl = tile[tilenum].tl >> 2; + const INT32 sh = tile[tilenum].sh >> 2; + const INT32 th = tile[tilenum].th >> 2; - INT32 width = (sh - sl) + 1; - INT32 height = (th - tl) + 1; + const INT32 width = (sh - sl) + 1; + const INT32 height = (th - tl) + 1; /* - int topad; - if (MiscState.TISize < 3) + INT32 topad; + if (m_misc_state.m_ti_size < 3) { - topad = (width * MiscState.TISize) & 0x7; + topad = (width * m_misc_state.m_ti_size) & 0x7; } else { @@ -2967,21 +2891,21 @@ void n64_rdp::CmdLoadTile(UINT32 w1, UINT32 w2) } topad = 0; // ???? */ - switch (MiscState.TISize) + switch (m_misc_state.m_ti_size) { case PIXEL_SIZE_8BIT: { - UINT32 src = MiscState.TIAddress; - UINT8 *tc = GetTMEM(); - int tb = tile[tilenum].tmem << 3; + const UINT32 src = m_misc_state.m_ti_address; + const INT32 tb = tile[tilenum].tmem << 3; + UINT8* tc = get_tmem8(); - for (int j = 0; j < height; j++) + for (INT32 j = 0; j < height; j++) { - int tline = tb + ((tile[tilenum].line << 3) * j); - int s = ((j + tl) * MiscState.TIWidth) + sl; + const INT32 tline = tb + ((tile[tilenum].line << 3) * j); + const INT32 s = ((j + tl) * m_misc_state.m_ti_width) + sl; + const INT32 xorval8 = ((j & 1) ? BYTE_XOR_DWORD_SWAP : BYTE_ADDR_XOR); - int xorval8 = ((j & 1) ? BYTE_XOR_DWORD_SWAP : BYTE_ADDR_XOR); - for (int i = 0; i < width; i++) + for (INT32 i = 0; i < width; i++) { tc[((tline + i) ^ xorval8) & 0xfff] = U_RREADADDR8(src + s + i); } @@ -2990,20 +2914,19 @@ void n64_rdp::CmdLoadTile(UINT32 w1, UINT32 w2) } case PIXEL_SIZE_16BIT: { - UINT32 src = MiscState.TIAddress >> 1; - UINT16 *tc = GetTMEM16(); - UINT16 yuvword; + const UINT32 src = m_misc_state.m_ti_address >> 1; + UINT16* tc = get_tmem16(); if (tile[tilenum].format != FORMAT_YUV) { - for (int j = 0; j < height; j++) + for (INT32 j = 0; j < height; j++) { - int tb = tile[tilenum].tmem << 2; - int tline = tb + ((tile[tilenum].line << 2) * j); - int s = ((j + tl) * MiscState.TIWidth) + sl; - int xorval16 = (j & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; + const INT32 tb = tile[tilenum].tmem << 2; + const INT32 tline = tb + ((tile[tilenum].line << 2) * j); + const INT32 s = ((j + tl) * m_misc_state.m_ti_width) + sl; + const INT32 xorval16 = (j & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; - for (int i = 0; i < width; i++) + for (INT32 i = 0; i < width; i++) { UINT32 taddr = (tline + i) ^ xorval16; tc[taddr & 0x7ff] = U_RREADIDX16(src + s + i); @@ -3012,19 +2935,19 @@ void n64_rdp::CmdLoadTile(UINT32 w1, UINT32 w2) } else { - for (int j = 0; j < height; j++) + for (INT32 j = 0; j < height; j++) { - int tb = tile[tilenum].tmem << 3; - int tline = tb + ((tile[tilenum].line << 3) * j); - int s = ((j + tl) * MiscState.TIWidth) + sl; - int xorval8 = (j & 1) ? BYTE_XOR_DWORD_SWAP : BYTE_ADDR_XOR; + const INT32 tb = tile[tilenum].tmem << 3; + const INT32 tline = tb + ((tile[tilenum].line << 3) * j); + const INT32 s = ((j + tl) * m_misc_state.m_ti_width) + sl; + const INT32 xorval8 = (j & 1) ? BYTE_XOR_DWORD_SWAP : BYTE_ADDR_XOR; - for (int i = 0; i < width; i++) + for (INT32 i = 0; i < width; i++) { UINT32 taddr = ((tline + i) ^ xorval8) & 0x7ff; - yuvword = U_RREADIDX16(src + s + i); - GetTMEM()[taddr] = yuvword >> 8; - GetTMEM()[taddr | 0x800] = yuvword & 0xff; + UINT16 yuvword = U_RREADIDX16(src + s + i); + get_tmem8()[taddr] = yuvword >> 8; + get_tmem8()[taddr | 0x800] = yuvword & 0xff; } } } @@ -3032,17 +2955,17 @@ void n64_rdp::CmdLoadTile(UINT32 w1, UINT32 w2) } case PIXEL_SIZE_32BIT: { - UINT32 src = MiscState.TIAddress >> 2; - UINT16 *tc16 = GetTMEM16(); - int tb = (tile[tilenum].tmem << 2); + const UINT32 src = m_misc_state.m_ti_address >> 2; + const INT32 tb = (tile[tilenum].tmem << 2); + UINT16* tc16 = get_tmem16(); - for (int j = 0; j < height; j++) + for (INT32 j = 0; j < height; j++) { - int tline = tb + ((tile[tilenum].line << 2) * j); + const INT32 tline = tb + ((tile[tilenum].line << 2) * j); - int s = ((j + tl) * MiscState.TIWidth) + sl; - int xorval32cur = (j & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; - for (int i = 0; i < width; i++) + const INT32 s = ((j + tl) * m_misc_state.m_ti_width) + sl; + const INT32 xorval32cur = (j & 1) ? WORD_XOR_DWORD_SWAP : WORD_ADDR_XOR; + for (INT32 i = 0; i < width; i++) { UINT32 c = U_RREADIDX32(src + s + i); UINT32 ptr = ((tline + i) ^ xorval32cur) & 0x3ff; @@ -3053,16 +2976,16 @@ void n64_rdp::CmdLoadTile(UINT32 w1, UINT32 w2) break; } - default: fatalerror("RDP: load_tile: size = %d\n", MiscState.TISize); + default: fatalerror("RDP: load_tile: size = %d\n", m_misc_state.m_ti_size); } } -void n64_rdp::CmdSetTile(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_tile(UINT32 w1, UINT32 w2) { //wait("SetTile"); - int tilenum = (w2 >> 24) & 0x7; - N64Tile* tex_tile = &m_tiles[tilenum]; + const INT32 tilenum = (w2 >> 24) & 0x7; + n64_tile_t* tex_tile = &m_tiles[tilenum]; tex_tile->format = (w1 >> 21) & 0x7; tex_tile->size = (w1 >> 19) & 0x3; @@ -3095,22 +3018,22 @@ void n64_rdp::CmdSetTile(UINT32 w1, UINT32 w2) //m_pending_mode_block = true; } -void n64_rdp::CmdFillRect(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_fill_rect(UINT32 w1, UINT32 w2) { //if(m_pending_mode_block) { wait("Block on pending mode-change"); m_pending_mode_block = false; } - UINT32 xl = (w1 >> 12) & 0xfff; + const UINT32 xh = (w2 >> 12) & 0xfff; + const UINT32 xl = (w1 >> 12) & 0xfff; + const UINT32 yh = (w2 >> 0) & 0xfff; UINT32 yl = (w1 >> 0) & 0xfff; - UINT32 xh = (w2 >> 12) & 0xfff; - UINT32 yh = (w2 >> 0) & 0xfff; - if (OtherModes.cycle_type == CYCLE_TYPE_FILL || OtherModes.cycle_type == CYCLE_TYPE_COPY) + if (m_other_modes.cycle_type == CYCLE_TYPE_FILL || m_other_modes.cycle_type == CYCLE_TYPE_COPY) { yl |= 3; } - UINT32 xlint = (xl >> 2) & 0x3ff; - UINT32 xhint = (xh >> 2) & 0x3ff; + const UINT32 xlint = (xl >> 2) & 0x3ff; + const UINT32 xhint = (xh >> 2) & 0x3ff; UINT32* ewdata = m_temp_rect_data; ewdata[0] = (0x3680 << 16) | yl;//command, flipped, tile, yl @@ -3123,32 +3046,32 @@ void n64_rdp::CmdFillRect(UINT32 w1, UINT32 w2) ewdata[7] = 0;//dxmdy, dxmdy frac memset(&ewdata[8], 0, 36 * sizeof(UINT32));//shade, texture, depth - DrawTriangle(false, false, false, true); + draw_triangle(false, false, false, true); } -void n64_rdp::CmdSetFogColor(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_fog_color(UINT32 w1, UINT32 w2) { - FogColor.c = w2; + m_fog_color.c = w2; } -void n64_rdp::CmdSetBlendColor(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_blend_color(UINT32 w1, UINT32 w2) { - BlendColor.c = w2; + m_blend_color.c = w2; } -void n64_rdp::CmdSetPrimColor(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_prim_color(UINT32 w1, UINT32 w2) { - MiscState.MinLevel = (w1 >> 8) & 0x1f; - PrimLODFraction = w1 & 0xff; - PrimColor.c = w2; + m_misc_state.m_min_level = (w1 >> 8) & 0x1f; + m_prim_lod_fraction = w1 & 0xff; + m_prim_color.c = w2; } -void n64_rdp::CmdSetEnvColor(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_env_color(UINT32 w1, UINT32 w2) { - EnvColor.c = w2; + m_env_color.c = w2; } -void n64_rdp::CmdSetCombine(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_combine(UINT32 w1, UINT32 w2) { m_combine.sub_a_rgb0 = (w1 >> 20) & 0xf; m_combine.mul_rgb0 = (w1 >> 15) & 0x1f; @@ -3169,136 +3092,50 @@ void n64_rdp::CmdSetCombine(UINT32 w1, UINT32 w2) m_combine.add_a1 = (w2 >> 0) & 0x7; } -void n64_rdp::CmdSetTextureImage(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_texture_image(UINT32 w1, UINT32 w2) { - MiscState.TIFormat = (w1 >> 21) & 0x7; - MiscState.TISize = (w1 >> 19) & 0x3; - MiscState.TIWidth = (w1 & 0x3ff) + 1; - MiscState.TIAddress = w2 & 0x01ffffff; + m_misc_state.m_ti_format = (w1 >> 21) & 0x7; + m_misc_state.m_ti_size = (w1 >> 19) & 0x3; + m_misc_state.m_ti_width = (w1 & 0x3ff) + 1; + m_misc_state.m_ti_address = w2 & 0x01ffffff; } -void n64_rdp::CmdSetMaskImage(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_mask_image(UINT32 w1, UINT32 w2) { //wait("SetMaskImage"); - MiscState.ZBAddress = w2 & 0x01ffffff; + m_misc_state.m_zb_address = w2 & 0x01ffffff; } -void n64_rdp::CmdSetColorImage(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_set_color_image(UINT32 w1, UINT32 w2) { //wait("SetColorImage"); - MiscState.FBFormat = (w1 >> 21) & 0x7; - MiscState.FBSize = (w1 >> 19) & 0x3; - MiscState.FBWidth = (w1 & 0x3ff) + 1; - MiscState.FBAddress = w2 & 0x01ffffff; - - if (MiscState.FBFormat < 2 || MiscState.FBFormat > 32) // Jet Force Gemini sets the format to 4, Intensity. Protection? - { - MiscState.FBFormat = 2; - } -} - -UINT32 n64_rdp::AddRightCvg(UINT32 x, UINT32 k) -{ -//#undef FULL_SUBPIXELS -#define FULL_SUBPIXELS - UINT32 coveredsubpixels=((x >> 14) & 3); - if (!(x & 0xffff)) - { - return 0; - } -#ifdef FULL_SUBPIXELS - if (!coveredsubpixels) - { - return 0; - } - if (!(k & 1)) - { - return (coveredsubpixels<3) ? 1 : 2; - } - else - { - return (coveredsubpixels<2) ? 0 : 1; - } -#endif - if (!(k & 1)) - { - return (coveredsubpixels<2) ? 1 : 2; - } - else - { - if (coveredsubpixels<1) - { - return 0; - } - else if (coveredsubpixels<3) - { - return 1; - } - else - { - return 2; - } - } -} + m_misc_state.m_fb_format = (w1 >> 21) & 0x7; + m_misc_state.m_fb_size = (w1 >> 19) & 0x3; + m_misc_state.m_fb_width = (w1 & 0x3ff) + 1; + m_misc_state.m_fb_address = w2 & 0x01ffffff; -UINT32 n64_rdp::AddLeftCvg(UINT32 x, UINT32 k) -{ - UINT32 coveredsubpixels = 3 - ((x >> 14) & 3); - if (!(x & 0xffff)) - { - return 2; - } -#ifdef FULL_SUBPIXELS - if (!coveredsubpixels) - { - return 0; - } - if (!(k & 1)) + if (m_misc_state.m_fb_format < 2 || m_misc_state.m_fb_format > 32) // Jet Force Gemini sets the format to 4, Intensity. Protection? { - return (coveredsubpixels<2) ? 0 : 1; - } - else - { - return (coveredsubpixels<3) ? 1 : 2; - } -#endif - if (k & 1) - { - return (coveredsubpixels<2) ? 1 : 2; - } - else - { - if (coveredsubpixels < 1) - { - return 0; - } - else if (coveredsubpixels < 3) - { - return 1; - } - else - { - return 2; - } + m_misc_state.m_fb_format = 2; } } /*****************************************************************************/ -void n64_rdp::CmdInvalid(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_invalid(UINT32 w1, UINT32 w2) { fatalerror("n64_rdp::Invalid: %d, %08x %08x\n", (w1 >> 24) & 0x3f, w1, w2); } -void n64_rdp::CmdNoOp(UINT32 w1, UINT32 w2) +void n64_rdp::cmd_noop(UINT32 w1, UINT32 w2) { // Do nothing } -void n64_rdp::ProcessList() +void n64_rdp::process_command_list() { INT32 length = m_end - m_current; @@ -3309,9 +3146,9 @@ void n64_rdp::ProcessList() } // load command data - for(int i = 0; i < length; i += 4) + for(INT32 i = 0; i < length; i += 4) { - m_cmd_data[m_cmd_ptr++] = ReadData((m_current & 0x1fffffff) + i); + m_cmd_data[m_cmd_ptr++] = read_data((m_current & 0x1fffffff) + i); } m_current = m_end; @@ -3319,10 +3156,10 @@ void n64_rdp::ProcessList() UINT32 cmd = (m_cmd_data[0] >> 24) & 0x3f; UINT32 cmd_length = (m_cmd_ptr + 1) * 4; - SetStatusReg(GetStatusReg() &~ DP_STATUS_FREEZE); + set_status(get_status() &~ DP_STATUS_FREEZE); // check if more data is needed - if (cmd_length < rdp_command_length[cmd]) + if (cmd_length < s_rdp_command_length[cmd]) { return; } @@ -3331,16 +3168,16 @@ void n64_rdp::ProcessList() { cmd = (m_cmd_data[m_cmd_cur] >> 24) & 0x3f; - if (((m_cmd_ptr - m_cmd_cur) * 4) < rdp_command_length[cmd]) + if (((m_cmd_ptr - m_cmd_cur) * 4) < s_rdp_command_length[cmd]) { return; - //fatalerror("rdp_process_list: not enough rdp command data: cur = %d, ptr = %d, expected = %d\n", m_cmd_cur, m_cmd_ptr, rdp_command_length[cmd]); + //fatalerror("rdp_process_list: not enough rdp command data: cur = %d, ptr = %d, expected = %d\n", m_cmd_cur, m_cmd_ptr, s_rdp_command_length[cmd]); } if (LOG_RDP_EXECUTION) { char string[4000]; - Dasm(string); + disassemble(string); fprintf(rdp_exec, "%08X: %08X %08X %s\n", m_start+(m_cmd_cur * 4), m_cmd_data[m_cmd_cur+0], m_cmd_data[m_cmd_cur+1], string); fflush(rdp_exec); @@ -3352,55 +3189,55 @@ void n64_rdp::ProcessList() switch(cmd) { - case 0x00: CmdNoOp(w1, w2); break; - - case 0x08: CmdTriangle(w1, w2); break; - case 0x09: CmdTriangleZ(w1, w2); break; - case 0x0a: CmdTriangleT(w1, w2); break; - case 0x0b: CmdTriangleTZ(w1, w2); break; - case 0x0c: CmdTriangleS(w1, w2); break; - case 0x0d: CmdTriangleSZ(w1, w2); break; - case 0x0e: CmdTriangleST(w1, w2); break; - case 0x0f: CmdTriangleSTZ(w1, w2); break; - - case 0x24: CmdTexRect(w1, w2); break; - case 0x25: CmdTexRectFlip(w1, w2); break; - - case 0x26: CmdSyncLoad(w1, w2); break; - case 0x27: CmdSyncPipe(w1, w2); break; - case 0x28: CmdSyncTile(w1, w2); break; - case 0x29: CmdSyncFull(w1, w2); break; - - case 0x2a: CmdSetKeyGB(w1, w2); break; - case 0x2b: CmdSetKeyR(w1, w2); break; - - case 0x2c: CmdSetConvert(w1, w2); break; - case 0x3c: CmdSetCombine(w1, w2); break; - case 0x2d: CmdSetScissor(w1, w2); break; - case 0x2e: CmdSetPrimDepth(w1, w2); break; - case 0x2f: CmdSetOtherModes(w1, w2); break; - - case 0x30: CmdLoadTLUT(w1, w2); break; - case 0x33: CmdLoadBlock(w1, w2); break; - case 0x34: CmdLoadTile(w1, w2); break; - - case 0x32: CmdSetTileSize(w1, w2); break; - case 0x35: CmdSetTile(w1, w2); break; - - case 0x36: CmdFillRect(w1, w2); break; - - case 0x37: CmdSetFillColor32(w1, w2); break; - case 0x38: CmdSetFogColor(w1, w2); break; - case 0x39: CmdSetBlendColor(w1, w2); break; - case 0x3a: CmdSetPrimColor(w1, w2); break; - case 0x3b: CmdSetEnvColor(w1, w2); break; - - case 0x3d: CmdSetTextureImage(w1, w2); break; - case 0x3e: CmdSetMaskImage(w1, w2); break; - case 0x3f: CmdSetColorImage(w1, w2); break; + case 0x00: cmd_noop(w1, w2); break; + + case 0x08: cmd_triangle(w1, w2); break; + case 0x09: cmd_triangle_z(w1, w2); break; + case 0x0a: cmd_triangle_t(w1, w2); break; + case 0x0b: cmd_triangle_tz(w1, w2); break; + case 0x0c: cmd_triangle_s(w1, w2); break; + case 0x0d: cmd_triangle_sz(w1, w2); break; + case 0x0e: cmd_triangle_st(w1, w2); break; + case 0x0f: cmd_triangle_stz(w1, w2); break; + + case 0x24: cmd_tex_rect(w1, w2); break; + case 0x25: cmd_tex_rect_flip(w1, w2); break; + + case 0x26: cmd_sync_load(w1, w2); break; + case 0x27: cmd_sync_pipe(w1, w2); break; + case 0x28: cmd_sync_tile(w1, w2); break; + case 0x29: cmd_sync_full(w1, w2); break; + + case 0x2a: cmd_set_key_gb(w1, w2); break; + case 0x2b: cmd_set_key_r(w1, w2); break; + + case 0x2c: cmd_set_convert(w1, w2); break; + case 0x3c: cmd_set_combine(w1, w2); break; + case 0x2d: cmd_set_scissor(w1, w2); break; + case 0x2e: cmd_set_prim_depth(w1, w2); break; + case 0x2f: cmd_set_other_modes(w1, w2); break; + + case 0x30: cmd_load_tlut(w1, w2); break; + case 0x33: cmd_load_block(w1, w2); break; + case 0x34: cmd_load_tile(w1, w2); break; + + case 0x32: cmd_set_tile_size(w1, w2); break; + case 0x35: cmd_set_tile(w1, w2); break; + + case 0x36: cmd_fill_rect(w1, w2); break; + + case 0x37: cmd_set_fill_color32(w1, w2); break; + case 0x38: cmd_set_fog_color(w1, w2); break; + case 0x39: cmd_set_blend_color(w1, w2); break; + case 0x3a: cmd_set_prim_color(w1, w2); break; + case 0x3b: cmd_set_env_color(w1, w2); break; + + case 0x3d: cmd_set_texture_image(w1, w2); break; + case 0x3e: cmd_set_mask_image(w1, w2); break; + case 0x3f: cmd_set_color_image(w1, w2); break; } - m_cmd_cur += rdp_command_length[cmd] / 4; + m_cmd_cur += s_rdp_command_length[cmd] / 4; }; m_cmd_ptr = 0; m_cmd_cur = 0; @@ -3412,8 +3249,8 @@ void n64_rdp::ProcessList() n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 32000>(state.machine()) { - AuxBufPtr = 0; - AuxBuf = NULL; + m_aux_buf_ptr = 0; + m_aux_buf = NULL; m_pipe_clean = true; m_pending_mode_block = false; @@ -3426,13 +3263,13 @@ n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 320 m_current = 0; m_status = 0x88; - for (int i = 0; i < 8; i++) + for (INT32 i = 0; i < 8; i++) { m_tiles[i].num = i; } - OneColor.c = 0xffffffff; - ZeroColor.c = 0x00000000; + m_one.c = 0xffffffff; + m_zero.c = 0x00000000; m_tmem = NULL; @@ -3440,15 +3277,15 @@ n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 320 //memset(m_hidden_bits, 3, 8388608); - PrimLODFraction = 0; + m_prim_lod_fraction = 0; - for (int i = 0; i < 256; i++) + for (INT32 i = 0; i < 256; i++) { m_gamma_table[i] = sqrt((float)(i << 6)); m_gamma_table[i] <<= 1; } - for (int i = 0; i < 0x4000; i++) + for (INT32 i = 0; i < 0x4000; i++) { m_gamma_dither_table[i] = sqrt((float)i); m_gamma_dither_table[i] <<= 1; @@ -3456,16 +3293,16 @@ n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 320 z_build_com_table(); - for (int i = 0; i < 0x4000; i++) + for (INT32 i = 0; i < 0x4000; i++) { UINT32 exponent = (i >> 11) & 7; UINT32 mantissa = i & 0x7ff; - z_complete_dec_table[i] = ((mantissa << z_dec_table[exponent].shift) + z_dec_table[exponent].add) & 0x3fffff; + m_z_complete_dec_table[i] = ((mantissa << m_z_dec_table[exponent].shift) + m_z_dec_table[exponent].add) & 0x3fffff; } precalc_cvmask_derivatives(); - for(int i = 0; i < 0x200; i++) + for(INT32 i = 0; i < 0x200; i++) { switch((i >> 7) & 3) { @@ -3482,9 +3319,14 @@ n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 320 } } - for(int i = 0; i < 32; i++) + for(INT32 i = 0; i < 32; i++) + { + m_replicated_rgba[i] = (i << 3) | ((i >> 2) & 7); + } + + for(INT32 i = 0; i < 0x10000; i++) { - ReplicatedRGBA[i] = (i << 3) | ((i >> 2) & 7); + m_dzpix_normalize[i] = (UINT16)normalize_dzpix(i & 0xffff); } } @@ -3492,15 +3334,15 @@ void n64_state::video_start() { m_rdp = auto_alloc(machine(), n64_rdp(*this)); - m_rdp->SetMachine(machine()); - m_rdp->InitInternalState(); + m_rdp->set_machine(machine()); + m_rdp->init_internal_state(); - m_rdp->Blender.SetMachine(machine()); - m_rdp->Blender.SetProcessor(m_rdp); + m_rdp->m_blender.set_machine(machine()); + m_rdp->m_blender.set_processor(m_rdp); - m_rdp->TexPipe.SetMachine(machine()); + m_rdp->m_tex_pipe.set_machine(machine()); - m_rdp->AuxBuf = auto_alloc_array_clear(machine(), UINT8, EXTENT_AUX_COUNT); + m_rdp->m_aux_buf = auto_alloc_array_clear(machine(), UINT8, EXTENT_AUX_COUNT); if (LOG_RDP_EXECUTION) { @@ -3510,12 +3352,12 @@ void n64_state::video_start() UINT32 n64_state::screen_update_n64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - n64_periphs *n64 = machine().device<n64_periphs>("rcp"); - m_rdp->visarea = screen.visible_area(); + n64_periphs* n64 = machine().device<n64_periphs>("rcp"); + m_rdp->m_visarea = screen.visible_area(); - //UINT16 *frame_buffer = (UINT16*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; - //UINT8 *cvg_buffer = &m_rdp.HiddenBits[((n64->vi_origin & 0xffffff) >> 2) >> 1]; - //int vibuffering = ((n64->vi_control & 2) && fsaa && divot); + //UINT16* frame_buffer = (UINT16*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; + //UINT8* cvg_buffer = &m_rdp.m_hidden_bits[((n64->vi_origin & 0xffffff) >> 2) >> 1]; + //INT32 vibuffering = ((n64->vi_control & 2) && fsaa && divot); //vibuffering = 0; // Disabled for now @@ -3552,15 +3394,15 @@ UINT32 n64_state::screen_update_n64(screen_device &screen, bitmap_rgb32 &bitmap, */ m_rdp->wait(); - m_rdp->AuxBufPtr = 0; + m_rdp->m_aux_buf_ptr = 0; if (n64->vi_blank) { - bitmap.fill(0, m_rdp->visarea); + bitmap.fill(0, m_rdp->m_visarea); return 0; } - m_rdp->VideoUpdate(n64, bitmap); + m_rdp->video_update(n64, bitmap); return 0; } diff --git a/src/mame/video/n64.h b/src/mame/video/n64.h index 555fec2f303..b670ac8e7cd 100644 --- a/src/mame/video/n64.h +++ b/src/mame/video/n64.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #ifndef _VIDEO_N64_H_ #define _VIDEO_N64_H_ @@ -50,9 +50,9 @@ #endif #define DWORD_XOR_DWORD_SWAP 1 -#define GET_LOW_RGBA16_TMEM(x) (m_rdp->ReplicatedRGBA[((x) >> 1) & 0x1f]) -#define GET_MED_RGBA16_TMEM(x) (m_rdp->ReplicatedRGBA[((x) >> 6) & 0x1f]) -#define GET_HI_RGBA16_TMEM(x) (m_rdp->ReplicatedRGBA[((x) >> 11) & 0x1f]) +#define GET_LOW_RGBA16_TMEM(x) (m_rdp->m_replicated_rgba[((x) >> 1) & 0x1f]) +#define GET_MED_RGBA16_TMEM(x) (m_rdp->m_replicated_rgba[((x) >> 6) & 0x1f]) +#define GET_HI_RGBA16_TMEM(x) (m_rdp->m_replicated_rgba[((x) >> 11) & 0x1f]) #define MEM8_LIMIT 0x7fffff #define MEM16_LIMIT 0x3fffff @@ -76,7 +76,7 @@ #define RREADIDX32(in) ((rdp_range_check((in) << 2)) ? 0 : rdram[(in)]) #define RWRITEADDR8(in, val) if(rdp_range_check((in))) { printf("Write8: Address %08x out of range!\n", (in)); fflush(stdout); fatalerror("Address %08x out of range!\n", (in)); } else { ((UINT8*)rdram)[(in) ^ BYTE_ADDR_XOR] = val;} -#define RWRITEIDX16(in, val) if(rdp_range_check((in) << 1)) { printf("Write16: Address %08x out of range!\n", ((object.MiscState.FBAddress >> 1) + curpixel) << 1); fflush(stdout); fatalerror("Address out of range\n"); } else { ((UINT16*)rdram)[(in) ^ WORD_ADDR_XOR] = val;} +#define RWRITEIDX16(in, val) if(rdp_range_check((in) << 1)) { printf("Write16: Address %08x out of range!\n", ((object.m_misc_state.m_fb_address >> 1) + curpixel) << 1); fflush(stdout); fatalerror("Address out of range\n"); } else { ((UINT16*)rdram)[(in) ^ WORD_ADDR_XOR] = val;} #define RWRITEIDX32(in, val) if(rdp_range_check((in) << 2)) { printf("Write32: Address %08x out of range!\n", (in) << 2); fflush(stdout); fatalerror("Address %08x out of range!\n", (in) << 2); } else { rdram[(in)] = val;} #else #define RREADADDR8(in) (((UINT8*)rdram)[(in) ^ BYTE_ADDR_XOR]) @@ -96,17 +96,17 @@ #define GETMEDCOL(x) (((x) & 0x7c0) >> 3) #define GETHICOL(x) (((x) & 0xf800) >> 8) -#define HREADADDR8(in) /*(((in) <= MEM8_LIMIT) ? */(HiddenBits[(in) ^ BYTE_ADDR_XOR])/* : 0)*/ -#define HWRITEADDR8(in, val) /*{if ((in) <= MEM8_LIMIT) */HiddenBits[(in) ^ BYTE_ADDR_XOR] = val;/*}*/ +#define HREADADDR8(in) /*(((in) <= MEM8_LIMIT) ? */(m_hidden_bits[(in) ^ BYTE_ADDR_XOR])/* : 0)*/ +#define HWRITEADDR8(in, val) /*{if ((in) <= MEM8_LIMIT) */m_hidden_bits[(in) ^ BYTE_ADDR_XOR] = val;/*}*/ //sign-extension macros -#define SIGN22(x) (((x) & 0x200000) ? ((x) | ~0x3fffff) : ((x) & 0x3fffff)) -#define SIGN17(x) (((x) & 0x10000) ? ((x) | ~0x1ffff) : ((x) & 0x1ffff)) -#define SIGN16(x) (((x) & 0x8000) ? ((x) | ~0xffff) : ((x) & 0xffff)) -#define SIGN13(x) (((x) & 0x1000) ? ((x) | ~0x1fff) : ((x) & 0x1fff)) -#define SIGN11(x) (((x) & 0x400) ? ((x) | ~0x7ff) : ((x) & 0x7ff)) -#define SIGN9(x) (((x) & 0x100) ? ((x) | ~0x1ff) : ((x) & 0x1ff)) -#define SIGN8(x) (((x) & 0x80) ? ((x) | ~0xff) : ((x) & 0xff)) +#define SIGN22(x) (((x & 0x00200000) * 0x7ff) | (x & 0x1fffff)) +#define SIGN17(x) (((x & 0x00010000) * 0xffff) | (x & 0xffff)) +#define SIGN16(x) (((x & 0x00008000) * 0x1ffff) | (x & 0x7fff)) +#define SIGN13(x) (((x & 0x00001000) * 0xfffff) | (x & 0xfff)) +#define SIGN11(x) (((x & 0x00000400) * 0x3fffff) | (x & 0x3ff)) +#define SIGN9(x) (((x & 0x00000100) * 0xffffff) | (x & 0xff)) +#define SIGN8(x) (((x & 0x00000080) * 0x1ffffff) | (x & 0x7f)) #define KURT_AKELEY_SIGN9(x) ((((x) & 0x180) == 0x180) ? ((x) | ~0x1ff) : ((x) & 0x1ff)) @@ -128,17 +128,17 @@ class n64_periphs; class n64_rdp; -struct MiscStateT; -struct OtherModesT; -struct CombineModesT; -struct ColorInputsT; -struct SpanBaseT; -struct Rectangle; +struct misc_state_t; +struct other_modes_t; +struct combine_mdoes_t; +struct color_inputs_t; +struct span_base_t; +struct rectangle_t; -class Color +class color_t { public: - Color() + color_t() { c = 0; } @@ -176,95 +176,92 @@ class SpanParam }; }; -struct N64Tile +struct n64_tile_t { - int format; // Image data format: RGBA, YUV, CI, IA, I - int size; // Size of texel element: 4b, 8b, 16b, 32b - int line; // Size of tile line in bytes - int tmem; // Starting tmem address for this tile in bytes - int palette; // Palette number for 4b CI texels - int ct, mt, cs, ms; // Clamp / mirror enable bits for S / T direction - int mask_t, shift_t, mask_s, shift_s; // Mask values / LOD shifts + INT32 format; // Image data format: RGBA, YUV, CI, IA, I + INT32 size; // Size of texel element: 4b, 8b, 16b, 32b + INT32 line; // Size of tile line in bytes + INT32 tmem; // Starting tmem address for this tile in bytes + INT32 palette; // Palette number for 4b CI texels + INT32 ct, mt, cs, ms; // Clamp / mirror enable bits for S / T direction + INT32 mask_t, shift_t, mask_s, shift_s; // Mask values / LOD shifts UINT16 sl, tl, sh, th; // 10.2 fixed-point, starting and ending texel row / column - int num; + INT32 num; }; -struct SpanBaseT +struct span_base_t { - int m_span_dr; - int m_span_dg; - int m_span_db; - int m_span_da; - int m_span_ds; - int m_span_dt; - int m_span_dw; - int m_span_dz; - int m_span_dymax; - int m_span_dzpix; - int m_span_drdy; - int m_span_dgdy; - int m_span_dbdy; - int m_span_dady; - int m_span_dzdy; + INT32 m_span_dr; + INT32 m_span_dg; + INT32 m_span_db; + INT32 m_span_da; + INT32 m_span_ds; + INT32 m_span_dt; + INT32 m_span_dw; + INT32 m_span_dz; + INT32 m_span_dymax; + INT32 m_span_dzpix; + INT32 m_span_drdy; + INT32 m_span_dgdy; + INT32 m_span_dbdy; + INT32 m_span_dady; + INT32 m_span_dzdy; }; -struct MiscStateT +struct misc_state_t { - MiscStateT() + misc_state_t() { - MaxLevel = 0; - MinLevel = 0; + m_max_level = 0; + m_min_level = 0; } - int FBFormat; // Framebuffer pixel format index (0 - I, 1 - IA, 2 - CI, 3 - RGBA) - int FBSize; // Framebuffer pixel size index (0 - 4bpp, 1 - 8bpp, 2 - 16bpp, 3 - 32bpp) - int FBWidth; // Framebuffer width, in pixels - int FBHeight; // Framebuffer height, in scanlines - UINT32 FBAddress; // Framebuffer source address offset (in bytes) from start of RDRAM + INT32 m_fb_format; // Framebuffer pixel format index (0 - I, 1 - IA, 2 - CI, 3 - RGBA) + INT32 m_fb_size; // Framebuffer pixel size index (0 - 4bpp, 1 - 8bpp, 2 - 16bpp, 3 - 32bpp) + INT32 m_fb_width; // Framebuffer width, in pixels + INT32 m_fb_height; // Framebuffer height, in pixels + UINT32 m_fb_address; // Framebuffer source address offset (in bytes) from start of RDRAM - UINT32 ZBAddress; // Z-buffer source address offset (in bytes) from start of RDRAM + UINT32 m_zb_address; // Z-buffer source address offset (in bytes) from start of RDRAM - int TIFormat; // Format for Texture Interface (TI) transfers - int TISize; // Size (in bytes) of TI transfers - int TIWidth; // Width (in pixels) of TI transfers - UINT32 TIAddress; // Destination address for TI transfers + INT32 m_ti_format; // Format for Texture Interface (TI) transfers + INT32 m_ti_size; // Size (in bytes) of TI transfers + INT32 m_ti_width; // Width (in pixels) of TI transfers + UINT32 m_ti_address; // Destination address for TI transfers - UINT8 RandomSeed; // %HACK%, adds 19 each time it's read and is more or less random + UINT8 m_random_seed; // %HACK%, adds 19 each time it's read and is more or less random - int SpecialBlendSelect0; // Special blend-mode select for cycle 0 - int SpecialBlendSelect1; // Special blend-mode select for cycle 1 + UINT32 m_max_level; // Maximum LOD level for texture filtering + UINT32 m_min_level; // Minimum LOD level for texture filtering - UINT32 MaxLevel; // Maximum LOD level for texture filtering - UINT32 MinLevel; // Minimum LOD level for texture filtering - - UINT16 PrimitiveZ; // Forced Z value for current primitive, if applicable - UINT16 PrimitiveDZ; // Forced Delta-Z value for current primitive, if applicable + UINT16 m_primitive_z; // Forced Z value for current primitive, if applicable + UINT16 m_primitive_dz; // Forced Delta-Z value for current primitive, if applicable }; -struct CombineModesT +struct combine_modes_t { - int sub_a_rgb0; - int sub_b_rgb0; - int mul_rgb0; - int add_rgb0; - int sub_a_a0; - int sub_b_a0; - int mul_a0; - int add_a0; - - int sub_a_rgb1; - int sub_b_rgb1; - int mul_rgb1; - int add_rgb1; - int sub_a_a1; - int sub_b_a1; - int mul_a1; - int add_a1; + INT32 sub_a_rgb0; + INT32 sub_b_rgb0; + INT32 mul_rgb0; + INT32 add_rgb0; + INT32 sub_a_a0; + INT32 sub_b_a0; + INT32 mul_a0; + INT32 add_a0; + + INT32 sub_a_rgb1; + INT32 sub_b_rgb1; + INT32 mul_rgb1; + INT32 add_rgb1; + INT32 sub_a_a1; + INT32 sub_b_a1; + INT32 mul_a1; + INT32 add_a1; }; -struct OtherModesT +struct other_modes_t { - int cycle_type; + INT32 cycle_type; bool persp_tex_en; bool detail_tex_en; bool sharpen_tex_en; @@ -277,62 +274,64 @@ struct OtherModesT bool bi_lerp1; bool convert_one; bool key_en; - int rgb_dither_sel; - int alpha_dither_sel; - int blend_m1a_0; - int blend_m1a_1; - int blend_m1b_0; - int blend_m1b_1; - int blend_m2a_0; - int blend_m2a_1; - int blend_m2b_0; - int blend_m2b_1; - int tex_edge; - bool force_blend; + INT32 rgb_dither_sel; + INT32 alpha_dither_sel; + INT32 blend_m1a_0; + INT32 blend_m1a_1; + INT32 blend_m1b_0; + INT32 blend_m1b_1; + INT32 blend_m2a_0; + INT32 blend_m2a_1; + INT32 blend_m2b_0; + INT32 blend_m2b_1; + INT32 tex_edge; + INT32 force_blend; + INT32 blend_shift; bool alpha_cvg_select; bool cvg_times_alpha; - int z_mode; - int cvg_dest; + INT32 z_mode; + INT32 cvg_dest; bool color_on_cvg; UINT8 image_read_en; bool z_update_en; bool z_compare_en; bool antialias_en; bool z_source_sel; - bool dither_alpha_en; - bool alpha_compare_en; + INT32 dither_alpha_en; + INT32 alpha_compare_en; + INT32 alpha_dither_mode; }; -struct ColorInputsT +struct color_inputs_t { // combiner inputs - UINT8 *combiner_rgbsub_a_r[2]; - UINT8 *combiner_rgbsub_a_g[2]; - UINT8 *combiner_rgbsub_a_b[2]; - UINT8 *combiner_rgbsub_b_r[2]; - UINT8 *combiner_rgbsub_b_g[2]; - UINT8 *combiner_rgbsub_b_b[2]; - UINT8 *combiner_rgbmul_r[2]; - UINT8 *combiner_rgbmul_g[2]; - UINT8 *combiner_rgbmul_b[2]; - UINT8 *combiner_rgbadd_r[2]; - UINT8 *combiner_rgbadd_g[2]; - UINT8 *combiner_rgbadd_b[2]; - - UINT8 *combiner_alphasub_a[2]; - UINT8 *combiner_alphasub_b[2]; - UINT8 *combiner_alphamul[2]; - UINT8 *combiner_alphaadd[2]; + UINT8* combiner_rgbsub_a_r[2]; + UINT8* combiner_rgbsub_a_g[2]; + UINT8* combiner_rgbsub_a_b[2]; + UINT8* combiner_rgbsub_b_r[2]; + UINT8* combiner_rgbsub_b_g[2]; + UINT8* combiner_rgbsub_b_b[2]; + UINT8* combiner_rgbmul_r[2]; + UINT8* combiner_rgbmul_g[2]; + UINT8* combiner_rgbmul_b[2]; + UINT8* combiner_rgbadd_r[2]; + UINT8* combiner_rgbadd_g[2]; + UINT8* combiner_rgbadd_b[2]; + + UINT8* combiner_alphasub_a[2]; + UINT8* combiner_alphasub_b[2]; + UINT8* combiner_alphamul[2]; + UINT8* combiner_alphaadd[2]; // blender input - UINT8 *blender1a_r[2]; - UINT8 *blender1a_g[2]; - UINT8 *blender1a_b[2]; - UINT8 *blender1b_a[2]; - UINT8 *blender2a_r[2]; - UINT8 *blender2a_g[2]; - UINT8 *blender2a_b[2]; - UINT8 *blender2b_a[2]; + UINT8* blender1a_r[2]; + UINT8* blender1a_g[2]; + UINT8* blender1a_b[2]; + UINT8* blender1b_a[2]; + UINT8* blender2a_r[2]; + UINT8* blender2a_g[2]; + UINT8* blender2a_b[2]; + UINT8* blender2b_a[2]; }; // This is enormous and horrible @@ -340,40 +339,39 @@ struct rdp_span_aux { UINT32 m_unscissored_rx; UINT16 m_cvg[RDP_CVG_SPAN_MAX]; - Color MemoryColor; - Color PixelColor; - Color InvPixelColor; - Color BlendedPixelColor; - Color CombinedColor; - Color Texel0Color; - Color Texel1Color; - Color NextTexelColor; - Color BlendColor; /* constant blend color */ - Color PrimColor; /* flat primitive color */ - Color EnvColor; /* generic color constant ('environment') */ - Color FogColor; /* generic color constant ('fog') */ - Color ShadeColor; /* gouraud-shaded color */ - Color KeyScale; /* color-keying constant */ - Color NoiseColor; /* noise */ - UINT8 LODFraction; /* Z-based LOD fraction for this poly */ - UINT8 PrimLODFraction; /* fixed LOD fraction for this poly */ - ColorInputsT ColorInputs; - UINT32 CurrentPixCvg; - UINT32 CurrentMemCvg; - UINT32 CurrentCvgBit; - UINT32 CurrentPixOverlap; - INT32 ShiftA; - INT32 ShiftB; + color_t m_memory_color; + color_t m_pixel_color; + color_t m_inv_pixel_color; + color_t m_blended_pixel_color; + color_t m_combined_color; + color_t m_texel0_color; + color_t m_texel1_color; + color_t m_next_texel_color; + color_t m_blend_color; /* constant blend color */ + color_t m_prim_color; /* flat primitive color */ + color_t m_env_color; /* generic color constant ('environment') */ + color_t m_fog_color; /* generic color constant ('fog') */ + color_t m_shade_color; /* gouraud-shaded color */ + color_t m_key_scale; /* color-keying constant */ + color_t m_noise_color; /* noise */ + UINT8 m_lod_fraction; /* Z-based LOD fraction for this poly */ + UINT8 m_prim_lod_fraction; /* fixed LOD fraction for this poly */ + color_inputs_t m_color_inputs; + UINT32 m_current_pix_cvg; + UINT32 m_current_mem_cvg; + UINT32 m_current_cvg_bit; + INT32 m_shift_a; + INT32 m_shift_b; INT32 m_precomp_s; INT32 m_precomp_t; - UINT8 BlendEnable; - bool PreWrap; + INT32 m_blend_enable; + bool m_pre_wrap; INT32 m_dzpix_enc; - UINT8 *m_tmem; /* pointer to texture cache for this polygon */ + UINT8* m_tmem; /* pointer to texture cache for this polygon */ bool m_start_span; }; -struct Rectangle +struct rectangle_t { UINT16 m_xl; // 10.2 fixed-point UINT16 m_yl; // 10.2 fixed-point @@ -381,316 +379,289 @@ struct Rectangle UINT16 m_yh; // 10.2 fixed-point }; +struct z_decompress_entry_t +{ + UINT32 shift; + UINT32 add; +}; + +struct cv_mask_derivative_t +{ + UINT8 cvg; + UINT8 cvbit; + UINT8 xoff; + UINT8 yoff; +}; + struct rdp_poly_state { - n64_rdp * m_rdp; /* pointer back to the RDP state */ - - MiscStateT MiscState; /* miscellaneous rasterizer bits */ - OtherModesT OtherModes; /* miscellaneous rasterizer bits (2) */ - SpanBaseT SpanBase; /* span initial values for triangle rasterization */ - Rectangle Scissor; /* screen-space scissor bounds */ - UINT32 FillColor; /* poly fill color */ - N64Tile m_tiles[8]; /* texture tile state */ + n64_rdp* m_rdp; /* pointer back to the RDP state */ + + misc_state_t m_misc_state; /* miscellaneous rasterizer bits */ + other_modes_t m_other_modes; /* miscellaneous rasterizer bits (2) */ + span_base_t m_span_base; /* span initial values for triangle rasterization */ + rectangle_t m_scissor; /* screen-space scissor bounds */ + UINT32 m_fill_color; /* poly fill color */ + n64_tile_t m_tiles[8]; /* texture tile state */ UINT8 m_tmem[0x1000]; /* texture cache */ - int tilenum; /* texture tile index */ + INT32 tilenum; /* texture tile index */ bool flip; /* left-major / right-major flip */ bool rect; /* primitive is rectangle (vs. triangle) */ }; -//class n64_state; +typedef void (*rdp_command_t)(UINT32 w1, UINT32 w2); class n64_rdp : public poly_manager<UINT32, rdp_poly_state, 8, 32000> { - public: - typedef void (n64_rdp::*Writer) (UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, rdp_span_aux *userdata, const rdp_poly_state &object); - typedef void (n64_rdp::*Reader) (UINT32 curpixel, rdp_span_aux *userdata, const rdp_poly_state &object); - typedef void (n64_rdp::*Copier) (UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, int CurrentPixCvg, const rdp_poly_state &object); - typedef void (n64_rdp::*Filler) (UINT32 curpixel, const rdp_poly_state &object); +public: + n64_rdp(n64_state &state); - n64_rdp(n64_state &state); - - running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } - - void InitInternalState() - { - m_tmem = auto_alloc_array(machine(), UINT8, 0x1000); - memset(m_tmem, 0, 0x1000); - - UINT8 *normpoint = machine().root_device().memregion("normpoint")->base(); - UINT8 *normslope = machine().root_device().memregion("normslope")->base(); - - for(INT32 i = 0; i < 64; i++) - { - m_norm_point_rom[i] = (normpoint[(i << 1) + 1] << 8) | normpoint[i << 1]; - m_norm_slope_rom[i] = (normslope[(i << 1) + 1] << 8) | normslope[i << 1]; - } - - memset(m_tiles, 0, 8 * sizeof(N64Tile)); - memset(m_cmd_data, 0, sizeof(m_cmd_data)); - } + running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } - void ProcessList(); - UINT32 ReadData(UINT32 address); - void Dasm(char *buffer); - - void SetMachine(running_machine& machine) { m_machine = &machine; } + void init_internal_state() + { + m_tmem = auto_alloc_array(machine(), UINT8, 0x1000); + memset(m_tmem, 0, 0x1000); - // CPU-visible registers - void SetStartReg(UINT32 val) - { - m_start = val; - } - UINT32 GetStartReg() const { return m_start; } + UINT8* normpoint = machine().root_device().memregion("normpoint")->base(); + UINT8* normslope = machine().root_device().memregion("normslope")->base(); - void SetEndReg(UINT32 val) + for(INT32 i = 0; i < 64; i++) { - m_end = val; + m_norm_point_rom[i] = (normpoint[(i << 1) + 1] << 8) | normpoint[i << 1]; + m_norm_slope_rom[i] = (normslope[(i << 1) + 1] << 8) | normslope[i << 1]; } - UINT32 GetEndReg() const { return m_end; } - - void SetCurrentReg(UINT32 val) { m_current = val; } - UINT32 GetCurrentReg() const { return m_current; } - - void SetStatusReg(UINT32 val) { m_status = val; } - UINT32 GetStatusReg() const { return m_status; } - - // Internal state - CombineModesT* GetCombine() { return &m_combine; } - - // Color Combiner - INT32 ColorCombinerEquation(INT32 a, INT32 b, INT32 c, INT32 d); - INT32 AlphaCombinerEquation(INT32 a, INT32 b, INT32 c, INT32 d); - void SetSubAInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata); - void SetSubBInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata); - void SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata); - void SetAddInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code, rdp_span_aux *userdata); - void SetSubInputAlpha(UINT8 **input, int code, rdp_span_aux *userdata); - void SetMulInputAlpha(UINT8 **input, int code, rdp_span_aux *userdata); - - // Texture memory - UINT8* GetTMEM() { return m_tmem; } - UINT16* GetTMEM16() { return (UINT16*)m_tmem; } - UINT32* GetTMEM32() { return (UINT32*)m_tmem; } - UINT16* GetTLUT() { return (UINT16*)(m_tmem + 0x800); } - - // Emulation Accelerators - UINT8 GetRandom() { return MiscState.RandomSeed += 0x13; } - - // YUV Factors - void SetYUVFactors(INT32 k0, INT32 k1, INT32 k2, INT32 k3, INT32 k4, INT32 k5) { m_k0 = k0; m_k1 = k1; m_k2 = k2; m_k3 = k3; m_k4 = k4; m_k5 = k5; } - INT32 GetK0() const { return m_k0; } - INT32 GetK1() const { return m_k1; } - INT32 GetK2() const { return m_k2; } - INT32 GetK3() const { return m_k3; } - INT32* GetK4() { return &m_k4; } - INT32* GetK5() { return &m_k5; } - - // Blender-related (move into RDP::Blender) - void SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, UINT8 **input_a, int a, int b, rdp_span_aux *userdata); - - // Span rasterization - void SpanDraw1Cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid); - void SpanDraw2Cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid); - void SpanDrawCopy(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid); - void SpanDrawFill(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid); - - // Render-related (move into eventual drawing-related classes?) - void TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst); - void TCDivNoPersp(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst); - UINT32 GetLog2(UINT32 lod_clamp); - void RenderSpans(int start, int end, int tilenum, bool flip, extent_t *Spans, bool rect, rdp_poly_state *object); - void GetAlphaCvg(UINT8 *comb_alpha, rdp_span_aux *userdata, const rdp_poly_state &object); - const UINT8* GetBayerMatrix() const { return s_bayer_matrix; } - const UINT8* GetMagicMatrix() const { return s_magic_matrix; } - int GetCurrFIFOIndex() const { return m_cmd_cur; } - - void ZStore(const rdp_poly_state &object, UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 z, UINT32 enc); - UINT32 ZDecompress(UINT32 zcurpixel); - UINT32 DZDecompress(UINT32 zcurpixel, UINT32 dzcurpixel); - UINT32 DZCompress(UINT32 value); - INT32 NormalizeDZPix(INT32 sum); - bool ZCompare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dzpix, rdp_span_aux *userdata, const rdp_poly_state &object); - - // Fullscreen update-related - void VideoUpdate(n64_periphs *n64, bitmap_rgb32 &bitmap); - - // Commands - void CmdInvalid(UINT32 w1, UINT32 w2); - void CmdNoOp(UINT32 w1, UINT32 w2); - void CmdTriangle(UINT32 w1, UINT32 w2); - void CmdTriangleZ(UINT32 w1, UINT32 w2); - void CmdTriangleT(UINT32 w1, UINT32 w2); - void CmdTriangleTZ(UINT32 w1, UINT32 w2); - void CmdTriangleS(UINT32 w1, UINT32 w2); - void CmdTriangleSZ(UINT32 w1, UINT32 w2); - void CmdTriangleST(UINT32 w1, UINT32 w2); - void CmdTriangleSTZ(UINT32 w1, UINT32 w2); - void CmdTexRect(UINT32 w1, UINT32 w2); - void CmdTexRectFlip(UINT32 w1, UINT32 w2); - void CmdSyncLoad(UINT32 w1, UINT32 w2); - void CmdSyncPipe(UINT32 w1, UINT32 w2); - void CmdSyncTile(UINT32 w1, UINT32 w2); - void CmdSyncFull(UINT32 w1, UINT32 w2); - void CmdSetKeyGB(UINT32 w1, UINT32 w2); - void CmdSetKeyR(UINT32 w1, UINT32 w2); - void CmdSetFillColor32(UINT32 w1, UINT32 w2); - void CmdSetConvert(UINT32 w1, UINT32 w2); - void CmdSetScissor(UINT32 w1, UINT32 w2); - void CmdSetPrimDepth(UINT32 w1, UINT32 w2); - void CmdSetOtherModes(UINT32 w1, UINT32 w2); - void CmdLoadTLUT(UINT32 w1, UINT32 w2); - void CmdSetTileSize(UINT32 w1, UINT32 w2); - void CmdLoadBlock(UINT32 w1, UINT32 w2); - void CmdLoadTile(UINT32 w1, UINT32 w2); - void CmdFillRect(UINT32 w1, UINT32 w2); - void CmdSetTile(UINT32 w1, UINT32 w2); - void CmdSetFogColor(UINT32 w1, UINT32 w2); - void CmdSetBlendColor(UINT32 w1, UINT32 w2); - void CmdSetPrimColor(UINT32 w1, UINT32 w2); - void CmdSetEnvColor(UINT32 w1, UINT32 w2); - void CmdSetCombine(UINT32 w1, UINT32 w2); - void CmdSetTextureImage(UINT32 w1, UINT32 w2); - void CmdSetMaskImage(UINT32 w1, UINT32 w2); - void CmdSetColorImage(UINT32 w1, UINT32 w2); - - void RGBAZClip(int sr, int sg, int sb, int sa, int *sz, rdp_span_aux *userdata); - void RGBAZCorrectTriangle(INT32 offx, INT32 offy, INT32* r, INT32* g, INT32* b, INT32* a, INT32* z, rdp_span_aux *userdata, const rdp_poly_state &object); - - void Triangle(bool shade, bool texture, bool zbuffer); - UINT32 AddRightCvg(UINT32 x, UINT32 k); - UINT32 AddLeftCvg(UINT32 x, UINT32 k); - - void GetDitherValues(int x, int y, int* cdith, int* adith, const rdp_poly_state &object); - - UINT16 decompress_cvmask_frombyte(UINT8 x); - void lookup_cvmask_derivatives(UINT32 mask, UINT8* offx, UINT8* offy, rdp_span_aux *userdata); - - MiscStateT MiscState; - - // Color constants - Color BlendColor; /* constant blend color */ - Color PrimColor; /* flat primitive color */ - Color EnvColor; /* generic color constant ('environment') */ - Color FogColor; /* generic color constant ('fog') */ - Color KeyScale; /* color-keying constant */ - UINT8 LODFraction; /* Z-based LOD fraction for this poly */ - UINT8 PrimLODFraction; /* fixed LOD fraction for this poly */ - - Color OneColor; - Color ZeroColor; - - UINT32 FillColor; - - OtherModesT OtherModes; - - N64BlenderT Blender; - - N64TexturePipeT TexPipe; - - UINT8 HiddenBits[0x800000]; - - UINT8 ReplicatedRGBA[32]; - - Rectangle Scissor; - SpanBaseT SpanBase; - - rectangle visarea; - - void DrawTriangle(bool shade, bool texture, bool zbuffer, bool rect); - void compute_cvg_noflip(extent_t *Spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base); - void compute_cvg_flip(extent_t *Spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base); - - void* AuxBuf; - UINT32 AuxBufPtr; - UINT32 AuxBufIndex; - - void* ExtentBuf[2]; - UINT32 ExtentBufPtr[2]; - UINT32 ExtentBufIndex; - - bool rdp_range_check(UINT32 addr); - - N64Tile m_tiles[8]; - - protected: - CombineModesT m_combine; - bool m_pending_mode_block; - bool m_pipe_clean; - - struct CVMASKDERIVATIVE - { - UINT8 cvg; - UINT8 cvbit; - UINT8 xoff; - UINT8 yoff; - }; - CVMASKDERIVATIVE cvarray[(1 << 8)]; - - UINT16 z_com_table[0x40000]; //precalced table of compressed z values, 18b: 512 KB array! - UINT32 z_complete_dec_table[0x4000]; //the same for decompressed z values, 14b - UINT8 compressed_cvmasks[0x10000]; //16bit cvmask -> to byte - UINT32 m_cmd_data[0x1000]; - UINT32 m_temp_rect_data[0x1000]; - - int m_cmd_ptr; - int m_cmd_cur; - - UINT32 m_start; - UINT32 m_end; - UINT32 m_current; - UINT32 m_status; - - UINT8* m_tmem; - - running_machine* m_machine; + memset(m_tiles, 0, 8 * sizeof(n64_tile_t)); + memset(m_cmd_data, 0, sizeof(m_cmd_data)); + } - // YUV factors - INT32 m_k0; - INT32 m_k1; - INT32 m_k2; - INT32 m_k3; - INT32 m_k4; - INT32 m_k5; + void process_command_list(); + UINT32 read_data(UINT32 address); + void disassemble(char* buffer); + + void set_machine(running_machine& machine) { m_machine = &machine; } + + // CPU-visible registers + void set_start(UINT32 val) { m_start = val; } + UINT32 get_start() const { return m_start; } + + void set_end(UINT32 val) { m_end = val; } + UINT32 get_end() const { return m_end; } + + void set_current(UINT32 val) { m_current = val; } + UINT32 get_current() const { return m_current; } + + void set_status(UINT32 val) { m_status = val; } + UINT32 get_status() const { return m_status; } + + // Color Combiner + INT32 color_combiner_equation(INT32 a, INT32 b, INT32 c, INT32 d); + INT32 alpha_combiner_equation(INT32 a, INT32 b, INT32 c, INT32 d); + void set_suba_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata); + void set_subb_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata); + void set_mul_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata); + void set_add_input_rgb(UINT8** input_r, UINT8** input_g, UINT8** input_b, INT32 code, rdp_span_aux* userdata); + void set_sub_input_alpha(UINT8** input, INT32 code, rdp_span_aux* userdata); + void set_mul_input_alpha(UINT8** input, INT32 code, rdp_span_aux* userdata); + + // Texture memory + UINT8* get_tmem8() { return m_tmem; } + UINT16* get_tmem16() { return (UINT16*)m_tmem; } + + // Emulation Accelerators + UINT8 get_random() { return m_misc_state.m_random_seed += 0x13; } + + // YUV Factors + void set_yuv_factors(INT32 k0, INT32 k1, INT32 k2, INT32 k3, INT32 k4, INT32 k5) { m_k0 = k0; m_k1 = k1; m_k2 = k2; m_k3 = k3; m_k4 = k4; m_k5 = k5; } + INT32 get_k0() const { return m_k0; } + INT32 get_k1() const { return m_k1; } + INT32 get_k2() const { return m_k2; } + INT32 get_k3() const { return m_k3; } + INT32* get_k4() { return &m_k4; } + INT32* get_k5() { return &m_k5; } + + // Blender-related (move into RDP::Blender) + void set_blender_input(INT32 cycle, INT32 which, UINT8** input_r, UINT8** input_g, UINT8** input_b, UINT8** input_a, INT32 a, INT32 b, rdp_span_aux* userdata); + + // Span rasterization + void span_draw_1cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid); + void span_draw_2cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid); + void span_draw_copy(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid); + void span_draw_fill(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid); + + // Render-related (move into eventual drawing-related classes?) + void tc_div(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst); + void tc_div_no_perspective(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst); + UINT32 get_log2(UINT32 lod_clamp); + void render_spans(INT32 start, INT32 end, INT32 tilenum, bool flip, extent_t* spans, bool rect, rdp_poly_state* object); + void get_alpha_cvg(UINT8* comb_alpha, rdp_span_aux* userdata, const rdp_poly_state &object); + + void z_store(const rdp_poly_state &object, UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 z, UINT32 enc); + UINT32 z_decompress(UINT32 zcurpixel); + UINT32 dz_decompress(UINT32 zcurpixel, UINT32 dzcurpixel); + UINT32 dz_compress(UINT32 value); + INT32 normalize_dzpix(INT32 sum); + bool z_compare(UINT32 zcurpixel, UINT32 dzcurpixel, UINT32 sz, UINT16 dzpix, rdp_span_aux* userdata, const rdp_poly_state &object); + + // Fullscreen update-related + void video_update(n64_periphs* n64, bitmap_rgb32 &bitmap); + + // Commands + void cmd_invalid(UINT32 w1, UINT32 w2); + void cmd_noop(UINT32 w1, UINT32 w2); + void cmd_triangle(UINT32 w1, UINT32 w2); + void cmd_triangle_z(UINT32 w1, UINT32 w2); + void cmd_triangle_t(UINT32 w1, UINT32 w2); + void cmd_triangle_tz(UINT32 w1, UINT32 w2); + void cmd_triangle_s(UINT32 w1, UINT32 w2); + void cmd_triangle_sz(UINT32 w1, UINT32 w2); + void cmd_triangle_st(UINT32 w1, UINT32 w2); + void cmd_triangle_stz(UINT32 w1, UINT32 w2); + void cmd_tex_rect(UINT32 w1, UINT32 w2); + void cmd_tex_rect_flip(UINT32 w1, UINT32 w2); + void cmd_sync_load(UINT32 w1, UINT32 w2); + void cmd_sync_pipe(UINT32 w1, UINT32 w2); + void cmd_sync_tile(UINT32 w1, UINT32 w2); + void cmd_sync_full(UINT32 w1, UINT32 w2); + void cmd_set_key_gb(UINT32 w1, UINT32 w2); + void cmd_set_key_r(UINT32 w1, UINT32 w2); + void cmd_set_fill_color32(UINT32 w1, UINT32 w2); + void cmd_set_convert(UINT32 w1, UINT32 w2); + void cmd_set_scissor(UINT32 w1, UINT32 w2); + void cmd_set_prim_depth(UINT32 w1, UINT32 w2); + void cmd_set_other_modes(UINT32 w1, UINT32 w2); + void cmd_load_tlut(UINT32 w1, UINT32 w2); + void cmd_set_tile_size(UINT32 w1, UINT32 w2); + void cmd_load_block(UINT32 w1, UINT32 w2); + void cmd_load_tile(UINT32 w1, UINT32 w2); + void cmd_fill_rect(UINT32 w1, UINT32 w2); + void cmd_set_tile(UINT32 w1, UINT32 w2); + void cmd_set_fog_color(UINT32 w1, UINT32 w2); + void cmd_set_blend_color(UINT32 w1, UINT32 w2); + void cmd_set_prim_color(UINT32 w1, UINT32 w2); + void cmd_set_env_color(UINT32 w1, UINT32 w2); + void cmd_set_combine(UINT32 w1, UINT32 w2); + void cmd_set_texture_image(UINT32 w1, UINT32 w2); + void cmd_set_mask_image(UINT32 w1, UINT32 w2); + void cmd_set_color_image(UINT32 w1, UINT32 w2); + + void rgbaz_clip(INT32 sr, INT32 sg, INT32 sb, INT32 sa, INT32* sz, rdp_span_aux* userdata); + void rgbaz_correct_triangle(INT32 offx, INT32 offy, INT32* r, INT32* g, INT32* b, INT32* a, INT32* z, rdp_span_aux* userdata, const rdp_poly_state &object); + + void triangle(bool shade, bool texture, bool zbuffer); + + void get_dither_values(INT32 x, INT32 y, INT32* cdith, INT32* adith, const rdp_poly_state &object); + + UINT16 decompress_cvmask_frombyte(UINT8 x); + void lookup_cvmask_derivatives(UINT32 mask, UINT8* offx, UINT8* offy, rdp_span_aux* userdata); + + misc_state_t m_misc_state; + + // Color constants + color_t m_blend_color; /* constant blend color */ + color_t m_prim_color; /* flat primitive color */ + color_t m_env_color; /* generic color constant ('environment') */ + color_t m_fog_color; /* generic color constant ('fog') */ + color_t m_key_scale; /* color-keying constant */ + UINT8 m_lod_fraction; /* Z-based LOD fraction for this poly */ + UINT8 m_prim_lod_fraction; /* fixed LOD fraction for this poly */ + + color_t m_one; + color_t m_zero; + + UINT32 m_fill_color; + + other_modes_t m_other_modes; + + n64_blender_t m_blender; + + n64_texture_pipe_t m_tex_pipe; + + UINT8 m_hidden_bits[0x800000]; + + UINT8 m_replicated_rgba[32]; + + UINT16 m_dzpix_normalize[0x10000]; + + rectangle_t m_scissor; + span_base_t m_span_base; + + rectangle m_visarea; + + void draw_triangle(bool shade, bool texture, bool zbuffer, bool rect); + void compute_cvg_noflip(extent_t* spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base); + void compute_cvg_flip(extent_t* spans, INT32* majorx, INT32* minorx, INT32* majorxint, INT32* minorxint, INT32 scanline, INT32 yh, INT32 yl, INT32 base); + + void* m_aux_buf; + UINT32 m_aux_buf_ptr; + UINT32 m_aux_buf_index; + + bool rdp_range_check(UINT32 addr); + + n64_tile_t m_tiles[8]; + +private: + void write_pixel(UINT32 curpixel, INT32 r, INT32 g, INT32 b, rdp_span_aux* userdata, const rdp_poly_state &object); + void read_pixel(UINT32 curpixel, rdp_span_aux* userdata, const rdp_poly_state &object); + void copy_pixel(UINT32 curpixel, INT32 r, INT32 g, INT32 b, INT32 m_current_pix_cvg, const rdp_poly_state &object); + void fill_pixel(UINT32 curpixel, const rdp_poly_state &object); + + void precalc_cvmask_derivatives(void); + void z_build_com_table(void); + + void video_update16(n64_periphs* n64, bitmap_rgb32 &bitmap); + void video_update32(n64_periphs* n64, bitmap_rgb32 &bitmap); + + running_machine* m_machine; + + combine_modes_t m_combine; + bool m_pending_mode_block; + bool m_pipe_clean; - // Texture perspective division - INT32 m_norm_point_rom[64]; - INT32 m_norm_slope_rom[64]; + cv_mask_derivative_t cvarray[(1 << 8)]; - static const UINT8 s_bayer_matrix[16]; - static const UINT8 s_magic_matrix[16]; + UINT16 m_z_com_table[0x40000]; //precalced table of compressed z values, 18b: 512 KB array! + UINT32 m_z_complete_dec_table[0x4000]; //the same for decompressed z values, 14b + UINT8 m_compressed_cvmasks[0x10000]; //16bit cvmask -> to byte - INT32 m_gamma_table[256]; - INT32 m_gamma_dither_table[0x4000]; + UINT32 m_cmd_data[0x1000]; + UINT32 m_temp_rect_data[0x1000]; - static UINT32 s_special_9bit_clamptable[512]; + INT32 m_cmd_ptr; + INT32 m_cmd_cur; - Copier _Copy[2]; - Filler _Fill[2]; + UINT32 m_start; + UINT32 m_end; + UINT32 m_current; + UINT32 m_status; - void write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, rdp_span_aux *userdata, const rdp_poly_state &object); - void read_pixel(UINT32 curpixel, rdp_span_aux *userdata, const rdp_poly_state &object); - void copy_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, int CurrentPixCvg, const rdp_poly_state &object); - void fill_pixel(UINT32 curpixel, const rdp_poly_state &object); + UINT8* m_tmem; - class ZDecompressEntry - { - public: - UINT32 shift; - UINT32 add; - }; + // YUV factors + INT32 m_k0; + INT32 m_k1; + INT32 m_k2; + INT32 m_k3; + INT32 m_k4; + INT32 m_k5; - void precalc_cvmask_derivatives(void); - void z_build_com_table(void); - static const ZDecompressEntry z_dec_table[8]; + // Texture perspective division + INT32 m_norm_point_rom[64]; + INT32 m_norm_slope_rom[64]; - // Internal screen-update functions - void VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap); - void VideoUpdate32(n64_periphs *n64, bitmap_rgb32 &bitmap); + INT32 m_gamma_table[256]; + INT32 m_gamma_dither_table[0x4000]; - typedef void (*Command)(UINT32 w1, UINT32 w2); + static UINT32 s_special_9bit_clamptable[512]; + static const z_decompress_entry_t m_z_dec_table[8]; - static const Command m_commands[0x40]; + static const UINT8 s_bayer_matrix[16]; + static const UINT8 s_magic_matrix[16]; + static const rdp_command_t m_commands[0x40]; + static const INT32 s_rdp_command_length[]; + static const char* s_image_format[]; + static const char* s_image_size[]; }; #endif // _VIDEO_N64_H_ diff --git a/src/mame/video/n8080.c b/src/mame/video/n8080.c index 09f53df689e..2ff1586875e 100644 --- a/src/mame/video/n8080.c +++ b/src/mame/video/n8080.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli /*************************************************************************** Nintendo 8080 video emulation diff --git a/src/mame/video/namcona1.c b/src/mame/video/namcona1.c index c029db0fc6f..55bbe484d54 100644 --- a/src/mame/video/namcona1.c +++ b/src/mame/video/namcona1.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* Namco System NA1/2 Video Hardware */ /* diff --git a/src/mame/video/namconb1.c b/src/mame/video/namconb1.c index b651263dde2..1703be9f7e1 100644 --- a/src/mame/video/namconb1.c +++ b/src/mame/video/namconb1.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* video/namconb1.c */ #include "emu.h" diff --git a/src/mame/video/namcos21.c b/src/mame/video/namcos21.c index 5979e8dec62..62e67fd0230 100644 --- a/src/mame/video/namcos21.c +++ b/src/mame/video/namcos21.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /*************************************************************************** Namco System 21 Video Hardware diff --git a/src/mame/video/namcos86.c b/src/mame/video/namcos86.c index a8785ed13d4..0f59c3245c9 100644 --- a/src/mame/video/namcos86.c +++ b/src/mame/video/namcos86.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /******************************************************************* Namco System 86 Video Hardware diff --git a/src/mame/video/neogeo_spr.c b/src/mame/video/neogeo_spr.c index 629c34f0c63..495c1d6716c 100644 --- a/src/mame/video/neogeo_spr.c +++ b/src/mame/video/neogeo_spr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari /* NeoGeo sprites (and fixed text layer) */ #include "emu.h" diff --git a/src/mame/video/neogeo_spr.h b/src/mame/video/neogeo_spr.h index 46035aea39e..b4bbf8f39e7 100644 --- a/src/mame/video/neogeo_spr.h +++ b/src/mame/video/neogeo_spr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail,Fuzz,Ernesto Corvi,Andrew Prime,Zsolt Vasvari #define VERBOSE (0) diff --git a/src/mame/video/news.c b/src/mame/video/news.c index 9bbe07e05ba..abdb4e608ac 100644 --- a/src/mame/video/news.c +++ b/src/mame/video/news.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "emu.h" #include "includes/news.h" diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c index e9607cc7dd4..55383d4ea02 100644 --- a/src/mame/video/nmk16.c +++ b/src/mame/video/nmk16.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,trap15,Angelo Salese +// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,trap15,Angelo Salese,Luca Elia /* notes... drawing sprites in a single pass with pdrawgfx breaks Thunder Dragon 2, diff --git a/src/mame/video/nova2001.c b/src/mame/video/nova2001.c index 2471bd59cf9..740b0127294 100644 --- a/src/mame/video/nova2001.c +++ b/src/mame/video/nova2001.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Howie Cohen, Frank Palazzolo, Alex Pasadyn, David Haywood, Steph, Phil Stroffolino, Uki #include "emu.h" #include "includes/nova2001.h" diff --git a/src/mame/video/oneshot.c b/src/mame/video/oneshot.c index 76a1dd781d2..e870bffd65c 100644 --- a/src/mame/video/oneshot.c +++ b/src/mame/video/oneshot.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /* One Shot One Kill Video Hardware */ diff --git a/src/mame/video/orbit.c b/src/mame/video/orbit.c index 03721d3d390..d04d17020c0 100644 --- a/src/mame/video/orbit.c +++ b/src/mame/video/orbit.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /*************************************************************************** Atari Orbit video emulation diff --git a/src/mame/video/pass.c b/src/mame/video/pass.c index b9127320711..b3668d24e7e 100644 --- a/src/mame/video/pass.c +++ b/src/mame/video/pass.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* video/pass.c - see drivers/pass.c for more info */ diff --git a/src/mame/video/pc080sn.c b/src/mame/video/pc080sn.c index 80e3e8e3868..4332cfcc8a2 100644 --- a/src/mame/video/pc080sn.c +++ b/src/mame/video/pc080sn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito PC080SN ------- diff --git a/src/mame/video/pc080sn.h b/src/mame/video/pc080sn.h index bdc07e52019..30c09ff04d4 100644 --- a/src/mame/video/pc080sn.h +++ b/src/mame/video/pc080sn.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __PC080SN_H__ #define __PC080SN_H__ diff --git a/src/mame/video/pc090oj.c b/src/mame/video/pc090oj.c index 4995caa144e..21341da6c0c 100644 --- a/src/mame/video/pc090oj.c +++ b/src/mame/video/pc090oj.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito pc090oj ------- diff --git a/src/mame/video/pc090oj.h b/src/mame/video/pc090oj.h index 1dea506c6d1..a31b401e95a 100644 --- a/src/mame/video/pc090oj.h +++ b/src/mame/video/pc090oj.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __PC090OJ_H__ #define __PC090OJ_H__ diff --git a/src/mame/video/pingpong.c b/src/mame/video/pingpong.c index 77176359bd0..397cc05de34 100644 --- a/src/mame/video/pingpong.c +++ b/src/mame/video/pingpong.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Jarek Parchanski /*************************************************************************** video.c diff --git a/src/mame/video/pirates.c b/src/mame/video/pirates.c index ea2039da300..6b99393ba9a 100644 --- a/src/mame/video/pirates.c +++ b/src/mame/video/pirates.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood,Nicola Salmoria #include "emu.h" #include "includes/pirates.h" diff --git a/src/mame/video/pk8000.c b/src/mame/video/pk8000.c index 0a2d262e4d5..2746cda3d66 100644 --- a/src/mame/video/pk8000.c +++ b/src/mame/video/pk8000.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic #include "emu.h" #include "includes/pk8000.h" diff --git a/src/mame/video/pktgaldx.c b/src/mame/video/pktgaldx.c index 9b1e06454ba..4a56ddef6aa 100644 --- a/src/mame/video/pktgaldx.c +++ b/src/mame/video/pktgaldx.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Bryan McPhail #include "emu.h" #include "includes/pktgaldx.h" diff --git a/src/mame/video/playmark.c b/src/mame/video/playmark.c index 578900a8d8e..7639338e75d 100644 --- a/src/mame/video/playmark.c +++ b/src/mame/video/playmark.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Pierpaolo Prazzoli +// copyright-holders:Nicola Salmoria, Pierpaolo Prazzoli, Quench #include "emu.h" #include "includes/playmark.h" diff --git a/src/mame/video/plygonet.c b/src/mame/video/plygonet.c index 8fa62c6929e..ca66f22a76f 100644 --- a/src/mame/video/plygonet.c +++ b/src/mame/video/plygonet.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont, Andrew Gardner /* Polygonet Commanders (Konami, 1993) diff --git a/src/mame/video/pokechmp.c b/src/mame/video/pokechmp.c index 0600dc92d2a..68e17d70edb 100644 --- a/src/mame/video/pokechmp.c +++ b/src/mame/video/pokechmp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Poke Champ */ diff --git a/src/mame/video/poolshrk.c b/src/mame/video/poolshrk.c index 08127e409d0..939380ff7f1 100644 --- a/src/mame/video/poolshrk.c +++ b/src/mame/video/poolshrk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Poolshark video emulation diff --git a/src/mame/video/popper.c b/src/mame/video/popper.c index 3cfc2c5348a..660969c7550 100644 --- a/src/mame/video/popper.c +++ b/src/mame/video/popper.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli /*************************************************************************** Popper diff --git a/src/mame/video/powervr2.c b/src/mame/video/powervr2.c index 3584a7f25df..fb5319ff8c6 100644 --- a/src/mame/video/powervr2.c +++ b/src/mame/video/powervr2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Dreamcast video emulation */ @@ -119,8 +119,8 @@ inline INT32 powervr2_device::clamp(INT32 in, INT32 min, INT32 max) // Perform a standard bilinear filter across four pixels inline UINT32 powervr2_device::bilinear_filter(UINT32 c0, UINT32 c1, UINT32 c2, UINT32 c3, float u, float v) { - UINT32 ui = (u * 256.0); - UINT32 vi = (v * 256.0); + UINT32 ui = (u * 256.0f); + UINT32 vi = (v * 256.0f); return rgba_bilinear_filter(c0, c1, c3, c2, ui, vi); } @@ -677,10 +677,10 @@ void powervr2_device::tex_get_info(texinfo *t) break; case 1: // floating color /* TODO: might be converted even earlier I believe */ - t->nontextured_fpal_a = (UINT8)(nontextured_fpal_a * 255.0); - t->nontextured_fpal_r = (UINT8)(nontextured_fpal_r * 255.0); - t->nontextured_fpal_g = (UINT8)(nontextured_fpal_g * 255.0); - t->nontextured_fpal_b = (UINT8)(nontextured_fpal_b * 255.0); + t->nontextured_fpal_a = (UINT8)(nontextured_fpal_a * 255.0f); + t->nontextured_fpal_r = (UINT8)(nontextured_fpal_r * 255.0f); + t->nontextured_fpal_g = (UINT8)(nontextured_fpal_g * 255.0f); + t->nontextured_fpal_b = (UINT8)(nontextured_fpal_b * 255.0f); t->r = &powervr2_device::tex_r_nt_palfloat; break; } @@ -2197,7 +2197,7 @@ void powervr2_device::render_hline(bitmap_rgb32 &bitmap, texinfo *ti, int y, flo xxr = 640; // Target the pixel center - ddx = xxl + 0.5 - xl; + ddx = xxl + 0.5f - xl; ul += ddx*dudx; vl += ddx*dvdx; wl += ddx*dwdx; @@ -2230,9 +2230,9 @@ void powervr2_device::render_hline(bitmap_rgb32 &bitmap, texinfo *ti, int y, flo { if(ti->filter_mode >= TEX_FILTER_BILINEAR) { - UINT32 c1 = (this->*(ti->r))(ti, u+1.0, v); - UINT32 c2 = (this->*(ti->r))(ti, u+1.0, v+1.0); - UINT32 c3 = (this->*(ti->r))(ti, u, v+1.0); + UINT32 c1 = (this->*(ti->r))(ti, u+1.0f, v); + UINT32 c2 = (this->*(ti->r))(ti, u+1.0f, v+1.0f); + UINT32 c3 = (this->*(ti->r))(ti, u, v+1.0f); c = bilinear_filter(c, c1, c2, c3, u, v); } } @@ -2289,13 +2289,13 @@ void powervr2_device::render_span(bitmap_rgb32 &bitmap, texinfo *ti, if((yy0 < 0 && y0 > 0) || (yy1 < 0 && y1 > 0)) //temp handling of int32 overflow, needed by hotd2/totd return; - dy = yy0+0.5-y0; + dy = yy0+0.5f-y0; if(0) fprintf(stderr, "%f %f %f %f -> %f %f | %f %f -> %f %f\n", - y0, - dy, dxldy, dxrdy, dy*dxldy, dy*dxrdy, - xl, xr, xl + dy*dxldy, xr + dy*dxrdy); + (double) y0, + (double) dy, (double) dxldy, (double) dxrdy, (double) (dy*dxldy), (double) (dy*dxrdy), + (double) xl, (double) xr, (double) (xl + dy*dxldy), (double) (xr + dy*dxrdy)); xl += dy*dxldy; xr += dy*dxrdy; ul += dy*duldy; diff --git a/src/mame/video/powervr2.h b/src/mame/video/powervr2.h index 2afd08e8f5a..deea328c858 100644 --- a/src/mame/video/powervr2.h +++ b/src/mame/video/powervr2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #ifndef __POWERVR2_H__ #define __POWERVR2_H__ diff --git a/src/mame/video/psikyo4.c b/src/mame/video/psikyo4.c index 25ec6e8def4..f6a70de1ebd 100644 --- a/src/mame/video/psikyo4.c +++ b/src/mame/video/psikyo4.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /* diff --git a/src/mame/video/psikyosh.c b/src/mame/video/psikyosh.c index 0597402e86f..0eb703853cd 100644 --- a/src/mame/video/psikyosh.c +++ b/src/mame/video/psikyosh.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest /* Psikyo PS6406B (PS3v1/PS5/PS5v2): diff --git a/src/mame/video/quasar.c b/src/mame/video/quasar.c index 21658cdeeda..f3d5e89577c 100644 --- a/src/mame/video/quasar.c +++ b/src/mame/video/quasar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates, Pierpaolo Prazzoli /*************************************************************************** diff --git a/src/mame/video/quizpani.c b/src/mame/video/quizpani.c index 853c2a366c7..21e8fcc46b1 100644 --- a/src/mame/video/quizpani.c +++ b/src/mame/video/quizpani.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Pierpaolo Prazzoli /************************************************************************ diff --git a/src/mame/video/rainbow.c b/src/mame/video/rainbow.c index 6405b360e4a..e51a1f3cdd1 100644 --- a/src/mame/video/rainbow.c +++ b/src/mame/video/rainbow.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /*************************************************************************** Functions to emulate video hardware on these Taito games: diff --git a/src/mame/video/rdpbhelp.h b/src/mame/video/rdpbhelp.h index 277c6535aa6..1725d01398a 100644 --- a/src/mame/video/rdpbhelp.h +++ b/src/mame/video/rdpbhelp.h @@ -11,161 +11,3 @@ ******************************************************************************/ - -#ifndef _VIDEO_RDPBHELP_H_ -#define _VIDEO_RDPBHELP_H_ - -#include "emu.h" -#include "includes/n64.h" -#include "video/n64.h" - -#define DITHER_A(val, dith) \ - if ((val + dith) >= 0x100) \ - { \ - val = 0xff; \ - } \ - else \ - { \ - val += dith; \ - } - -#define DITHER_CHAN(chan, dith) \ - if ((chan & 7) > dith) \ - { \ - chan = (chan & 0xf8) + 8; \ - if (chan > 247) \ - { \ - chan = 255; \ - } \ - } - -#define DITHER_RGB(dith) \ - DITHER_CHAN(r, dith) \ - DITHER_CHAN(g, dith) \ - DITHER_CHAN(b, dith) - -#define ALPHA_COMPARE() \ - if (((this)->*(compare[acmode]))(userdata->PixelColor.i.a, userdata, object)) \ - { \ - return false; \ - } - -#define CVG_COMPARE() \ - if (object.OtherModes.antialias_en ? (!userdata->CurrentPixCvg) : (!userdata->CurrentCvgBit)) \ - { \ - return false; \ - } - -#define TEST_REJECT() \ - ALPHA_COMPARE(); \ - CVG_COMPARE(); - -#define WRITE_OUT_NB_ND(cycle) \ - *fr = *userdata->ColorInputs.blender1a_r[cycle]; \ - *fg = *userdata->ColorInputs.blender1a_g[cycle]; \ - *fb = *userdata->ColorInputs.blender1a_b[cycle]; - -#define WRITE_OUT() \ - *fr = r; \ - *fg = g; \ - *fb = b; - -#define WRITE_BLENDED_COLOR() \ - userdata->BlendedPixelColor.i.r = r; \ - userdata->BlendedPixelColor.i.g = g; \ - userdata->BlendedPixelColor.i.b = b; \ - userdata->BlendedPixelColor.i.a = userdata->PixelColor.i.a; - -#define BLEND_CYCLE0(cyc) \ - userdata->InvPixelColor.i.a = 0xff - *userdata->ColorInputs.blender1b_a[cyc]; \ - ((this)->*(cycle##cyc[sel##cyc]))(&r, &g, &b, userdata, object); -#define BLEND_CYCLE1(cyc) \ - if (partialreject && userdata->PixelColor.i.a >= 0xff) \ - { \ - ASSIGN_OUT(cyc); \ - } \ - else \ - { \ - userdata->InvPixelColor.i.a = 0xff - *userdata->ColorInputs.blender1b_a[cyc]; \ - ((this)->*(cycle##cyc[sel##cyc]))(&r, &g, &b, userdata, object); \ - } - -#define BLEND_CYCLE(cyc, check_reject) \ - BLEND_CYCLE##check_reject(cyc) - -#define BLEND_FACTORS0(cycle) \ - UINT8 blend1a = *userdata->ColorInputs.blender1b_a[cycle] >> 3; \ - UINT8 blend2a = *userdata->ColorInputs.blender2b_a[cycle] >> 3; - -#define BLEND_FACTORS1(cycle) \ - UINT8 blend1a = (*userdata->ColorInputs.blender1b_a[cycle] >> (3 + userdata->ShiftA)) & 0x1c; \ - UINT8 blend2a = (*userdata->ColorInputs.blender2b_a[cycle] >> (3 + userdata->ShiftB)) & 0x1c; - -#define BLEND_SUM0() ; - -#define BLEND_SUM1() \ - UINT32 sum = ((blend1a >> 2) + (blend2a >> 2) + 1) & 0xf; - -#define BLEND_FACTORS(cycle, special, sum) \ - BLEND_FACTORS##special(cycle); \ - BLEND_SUM##sum(); - -#define BLEND_MUL(cycle) \ - *r = (((int)(*userdata->ColorInputs.blender1a_r[cycle]) * (int)(blend1a))) + \ - (((int)(*userdata->ColorInputs.blender2a_r[cycle]) * (int)(blend2a))); \ - *g = (((int)(*userdata->ColorInputs.blender1a_g[cycle]) * (int)(blend1a))) + \ - (((int)(*userdata->ColorInputs.blender2a_g[cycle]) * (int)(blend2a))); \ - *b = (((int)(*userdata->ColorInputs.blender1a_b[cycle]) * (int)(blend1a))) + \ - (((int)(*userdata->ColorInputs.blender2a_b[cycle]) * (int)(blend2a))); - -#define BLEND_ADD1(cycle) \ - *r += (((int)*userdata->ColorInputs.blender2a_r[cycle]) << 2); \ - *g += (((int)*userdata->ColorInputs.blender2a_g[cycle]) << 2); \ - *b += (((int)*userdata->ColorInputs.blender2a_b[cycle]) << 2); - -#define BLEND_ADD0(cycle) \ - *r += (int)*userdata->ColorInputs.blender2a_r[cycle]; \ - *g += (int)*userdata->ColorInputs.blender2a_g[cycle]; \ - *b += (int)*userdata->ColorInputs.blender2a_b[cycle]; - -#define BLEND_ADD(cycle, special) \ - BLEND_ADD##special(cycle); - -#define BLEND_SHIFT(shift) \ - *r >>= shift; \ - *g >>= shift; \ - *b >>= shift; - -#define BLEND_CLAMP() \ - if (*r > 255) *r = 255; \ - if (*g > 255) *g = 255; \ - if (*b > 255) *b = 255; - -#define BLEND_SCALE() \ - if (sum) \ - { \ - *r /= sum; \ - *g /= sum; \ - *b /= sum; \ - } \ - else \ - { \ - *r = *g = *b = 0xff; \ - } - -#define BLEND_SCALE_CLAMP0() \ - BLEND_CLAMP(); - -#define BLEND_SCALE_CLAMP1() \ - BLEND_SCALE(); \ - BLEND_CLAMP(); - -#define BLEND_SCALE_CLAMP(sum) \ - BLEND_SCALE_CLAMP##sum(); - -#define ASSIGN_OUT(cycle) \ - r = *userdata->ColorInputs.blender1a_r[cycle]; \ - g = *userdata->ColorInputs.blender1a_g[cycle]; \ - b = *userdata->ColorInputs.blender1a_b[cycle]; - -#endif // _VIDEO_RDPBHELP_H_ diff --git a/src/mame/video/rdpblend.c b/src/mame/video/rdpblend.c index b4050ef9565..98030ee11fb 100644 --- a/src/mame/video/rdpblend.c +++ b/src/mame/video/rdpblend.c @@ -18,330 +18,505 @@ #include "video/n64.h" #include "video/rdpbhelp.h" -N64BlenderT::N64BlenderT() +n64_blender_t::n64_blender_t() { - blend1[0] = &N64BlenderT::Blend1CycleNoBlendNoACVGNoDither; - blend1[1] = &N64BlenderT::Blend1CycleNoBlendNoACVGDither; - blend1[2] = &N64BlenderT::Blend1CycleNoBlendACVGNoDither; - blend1[3] = &N64BlenderT::Blend1CycleNoBlendACVGDither; - blend1[4] = &N64BlenderT::Blend1CycleBlendNoACVGNoDither; - blend1[5] = &N64BlenderT::Blend1CycleBlendNoACVGDither; - blend1[6] = &N64BlenderT::Blend1CycleBlendACVGNoDither; - blend1[7] = &N64BlenderT::Blend1CycleBlendACVGDither; - - blend2[0] = &N64BlenderT::Blend2CycleNoBlendNoACVGNoDither; - blend2[1] = &N64BlenderT::Blend2CycleNoBlendNoACVGDither; - blend2[2] = &N64BlenderT::Blend2CycleNoBlendACVGNoDither; - blend2[3] = &N64BlenderT::Blend2CycleNoBlendACVGDither; - blend2[4] = &N64BlenderT::Blend2CycleBlendNoACVGNoDither; - blend2[5] = &N64BlenderT::Blend2CycleBlendNoACVGDither; - blend2[6] = &N64BlenderT::Blend2CycleBlendACVGNoDither; - blend2[7] = &N64BlenderT::Blend2CycleBlendACVGDither; - - cycle0[0] = &N64BlenderT::BlendEquationCycle0NoForceNoSpecial; - cycle0[1] = &N64BlenderT::BlendEquationCycle0NoForceSpecial; - cycle0[2] = &N64BlenderT::BlendEquationCycle0ForceNoSpecial; - cycle0[3] = &N64BlenderT::BlendEquationCycle0ForceSpecial; - - cycle1[0] = &N64BlenderT::BlendEquationCycle1NoForceNoSpecial; - cycle1[1] = &N64BlenderT::BlendEquationCycle1NoForceSpecial; - cycle1[2] = &N64BlenderT::BlendEquationCycle1ForceNoSpecial; - cycle1[3] = &N64BlenderT::BlendEquationCycle1ForceSpecial; - - compare[0] = &N64BlenderT::AlphaCompareNone; - compare[1] = &N64BlenderT::AlphaCompareNone; - compare[2] = &N64BlenderT::AlphaCompareNoDither; - compare[3] = &N64BlenderT::AlphaCompareDither; + blend1[0] = &n64_blender_t::cycle1_noblend_noacvg_nodither; + blend1[1] = &n64_blender_t::cycle1_noblend_noacvg_dither; + blend1[2] = &n64_blender_t::cycle1_noblend_acvg_nodither; + blend1[3] = &n64_blender_t::cycle1_noblend_acvg_dither; + blend1[4] = &n64_blender_t::cycle1_blend_noacvg_nodither; + blend1[5] = &n64_blender_t::cycle1_blend_noacvg_dither; + blend1[6] = &n64_blender_t::cycle1_blend_acvg_nodither; + blend1[7] = &n64_blender_t::cycle1_blend_acvg_dither; + + blend2[0] = &n64_blender_t::cycle2_noblend_noacvg_nodither; + blend2[1] = &n64_blender_t::cycle2_noblend_noacvg_dither; + blend2[2] = &n64_blender_t::cycle2_noblend_acvg_nodither; + blend2[3] = &n64_blender_t::cycle2_noblend_acvg_dither; + blend2[4] = &n64_blender_t::cycle2_blend_noacvg_nodither; + blend2[5] = &n64_blender_t::cycle2_blend_noacvg_dither; + blend2[6] = &n64_blender_t::cycle2_blend_acvg_nodither; + blend2[7] = &n64_blender_t::cycle2_blend_acvg_dither; + + for (int value = 0; value < 256; value++) + { + for (int dither = 0; dither < 8; dither++) + { + m_color_dither[(value << 3) | dither] = (UINT8)dither_color(value, dither); + m_alpha_dither[(value << 3) | dither] = (UINT8)dither_alpha(value, dither); + } + } } -bool N64BlenderT::Blend1CycleNoBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +INT32 n64_blender_t::dither_alpha(INT32 alpha, INT32 dither) { - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); - TEST_REJECT(); - WRITE_OUT_NB_ND(0); + return min(alpha + dither, 0xff); +} - return true; +INT32 n64_blender_t::dither_color(INT32 color, INT32 dither) +{ + if ((color & 7) > dither) + { + color = (color & 0xf8) + 8; + if (color > 247) + { + color = 255; + } + } + return color; } -bool N64BlenderT::Blend1CycleNoBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::test_for_reject(rdp_span_aux* userdata, const rdp_poly_state& object) { - INT32 r, g, b; + if (alpha_reject(userdata, object)) + { + return true; + } + if (object.m_other_modes.antialias_en ? !userdata->m_current_pix_cvg : !userdata->m_current_cvg_bit) + { + return true; + } + return false; +} - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); - TEST_REJECT(); - ASSIGN_OUT(0); - DITHER_RGB(dith); - WRITE_OUT(); +bool n64_blender_t::alpha_reject(rdp_span_aux* userdata, const rdp_poly_state& object) +{ + switch (object.m_other_modes.alpha_dither_mode) + { + case 0: + case 1: + return false; - return true; + case 2: + return userdata->m_pixel_color.i.a < userdata->m_blend_color.i.a; + + case 3: + return userdata->m_pixel_color.i.a < (rand() & 0xff); + + default: + return false; + } } -bool N64BlenderT::Blend1CycleNoBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_noblend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { - DITHER_A(userdata->ShadeColor.i.a, adseed); - - TEST_REJECT(); - WRITE_OUT_NB_ND(0); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + if (test_for_reject(userdata, object)) + { + return false; + } + *fr = *userdata->m_color_inputs.blender1a_r[0]; + *fg = *userdata->m_color_inputs.blender1a_g[0]; + *fb = *userdata->m_color_inputs.blender1a_b[0]; return true; } -bool N64BlenderT::Blend1CycleNoBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_noblend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { - INT32 r, g, b; + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + if (test_for_reject(userdata, object)) + { + return false; + } + *fr = m_color_dither[((*userdata->m_color_inputs.blender1a_r[0] & 0xff) << 3) | dith]; + *fg = m_color_dither[((*userdata->m_color_inputs.blender1a_g[0] & 0xff) << 3) | dith]; + *fb = m_color_dither[((*userdata->m_color_inputs.blender1a_b[0] & 0xff) << 3) | dith]; - DITHER_A(userdata->ShadeColor.i.a, adseed); + return true; +} + +bool n64_blender_t::cycle1_noblend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) +{ + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - ASSIGN_OUT(0); - DITHER_RGB(dith); - WRITE_OUT(); + if (test_for_reject(userdata, object)) + { + return false; + } + *fr = *userdata->m_color_inputs.blender1a_r[0]; + *fg = *userdata->m_color_inputs.blender1a_g[0]; + *fb = *userdata->m_color_inputs.blender1a_b[0]; return true; } -bool N64BlenderT::Blend1CycleBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_noblend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { - INT32 r, g, b; - - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - BLEND_CYCLE(0, 1); - WRITE_OUT(); + if (test_for_reject(userdata, object)) + { + return false; + } + *fr = m_color_dither[((*userdata->m_color_inputs.blender1a_r[0] & 0xff) << 3) | dith]; + *fg = m_color_dither[((*userdata->m_color_inputs.blender1a_g[0] & 0xff) << 3) | dith]; + *fb = m_color_dither[((*userdata->m_color_inputs.blender1a_b[0] & 0xff) << 3) | dith]; return true; } -bool N64BlenderT::Blend1CycleBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_blend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + + if (test_for_reject(userdata, object)) + { + return false; + } + + blend_with_partial_reject(&r, &g, &b, 0, partialreject, sel0, userdata, object); - TEST_REJECT(); - BLEND_CYCLE(0, 1); - DITHER_RGB(dith); - WRITE_OUT(); + *fr = r; + *fg = g; + *fb = b; return true; } -bool N64BlenderT::Blend1CycleBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_blend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - BLEND_CYCLE(0, 1); - WRITE_OUT(); + if (test_for_reject(userdata, object)) + { + return false; + } + + blend_with_partial_reject(&r, &g, &b, 0, partialreject, sel0, userdata, object); + + *fr = m_color_dither[((r & 0xff) << 3) | dith]; + *fg = m_color_dither[((g & 0xff) << 3) | dith]; + *fb = m_color_dither[((b & 0xff) << 3) | dith]; return true; } -bool N64BlenderT::Blend1CycleBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_blend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + + if (test_for_reject(userdata, object)) + { + return false; + } + + blend_with_partial_reject(&r, &g, &b, 0, partialreject, sel0, userdata, object); - TEST_REJECT(); - BLEND_CYCLE(0, 1); - DITHER_RGB(dith); - WRITE_OUT(); + *fr = r; + *fg = g; + *fb = b; return true; } -bool N64BlenderT::Blend2CycleNoBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle1_blend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - WRITE_OUT_NB_ND(1); + if (test_for_reject(userdata, object)) + { + return false; + } + + blend_with_partial_reject(&r, &g, &b, 0, partialreject, sel0, userdata, object); + + *fr = m_color_dither[((r & 0xff) << 3) | dith]; + *fg = m_color_dither[((g & 0xff) << 3) | dith]; + *fb = m_color_dither[((b & 0xff) << 3) | dith]; return true; } -bool N64BlenderT::Blend2CycleNoBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_noblend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + + if (test_for_reject(userdata, object)) + { + return false; + } + + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - ASSIGN_OUT(1); - DITHER_RGB(dith); - WRITE_OUT(); + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + *fr = *userdata->m_color_inputs.blender1a_r[1]; + *fg = *userdata->m_color_inputs.blender1a_g[1]; + *fb = *userdata->m_color_inputs.blender1a_b[1]; return true; } -bool N64BlenderT::Blend2CycleNoBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_noblend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - WRITE_OUT_NB_ND(1); + if (test_for_reject(userdata, object)) + { + return false; + } + + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); + + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + *fr = m_color_dither[((*userdata->m_color_inputs.blender1a_r[1] & 0xff) << 3) | dith]; + *fg = m_color_dither[((*userdata->m_color_inputs.blender1a_g[1] & 0xff) << 3) | dith]; + *fb = m_color_dither[((*userdata->m_color_inputs.blender1a_b[1] & 0xff) << 3) | dith]; return true; } -bool N64BlenderT::Blend2CycleNoBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_noblend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + + if (test_for_reject(userdata, object)) + { + return false; + } + + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - ASSIGN_OUT(1); - DITHER_RGB(dith); - WRITE_OUT(); + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + *fr = *userdata->m_color_inputs.blender1a_r[1]; + *fg = *userdata->m_color_inputs.blender1a_g[1]; + *fb = *userdata->m_color_inputs.blender1a_b[1]; return true; } -bool N64BlenderT::Blend2CycleBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_noblend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - BLEND_CYCLE(1, 1); - WRITE_OUT(); + if (test_for_reject(userdata, object)) + { + return false; + } + + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); + + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + *fr = m_color_dither[((*userdata->m_color_inputs.blender1a_r[1] & 0xff) << 3) | dith]; + *fg = m_color_dither[((*userdata->m_color_inputs.blender1a_g[1] & 0xff) << 3) | dith]; + *fb = m_color_dither[((*userdata->m_color_inputs.blender1a_b[1] & 0xff) << 3) | dith]; return true; } -bool N64BlenderT::Blend2CycleBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_blend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->PixelColor.i.a, adseed); - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + + if (test_for_reject(userdata, object)) + { + return false; + } + + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - BLEND_CYCLE(1, 1); - DITHER_RGB(dith); - WRITE_OUT(); + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + + blend_with_partial_reject(&r, &g, &b, 1, partialreject, sel1, userdata, object); + + *fr = r; + *fg = g; + *fb = b; return true; } -bool N64BlenderT::Blend2CycleBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_blend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_pixel_color.i.a = m_alpha_dither[(userdata->m_pixel_color.i.a << 3) | adseed]; + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; + + if (test_for_reject(userdata, object)) + { + return false; + } + + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - BLEND_CYCLE(1, 1); - WRITE_OUT(); + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + + blend_with_partial_reject(&r, &g, &b, 1, partialreject, sel1, userdata, object); + + *fr = m_color_dither[((r & 0xff) << 3) | dith]; + *fg = m_color_dither[((g & 0xff) << 3) | dith]; + *fb = m_color_dither[((b & 0xff) << 3) | dith]; return true; } -bool N64BlenderT::Blend2CycleBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_blend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { INT32 r, g, b; - DITHER_A(userdata->ShadeColor.i.a, adseed); + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; - TEST_REJECT(); - BLEND_CYCLE(0, 0); - WRITE_BLENDED_COLOR(); - BLEND_CYCLE(1, 1); - DITHER_RGB(dith); - WRITE_OUT(); + if (test_for_reject(userdata, object)) + { + return false; + } - return true; -} + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); -#define BLEND_PIPE(cycle, special, sum, shift) \ - BLEND_FACTORS(cycle, special, sum); \ - BLEND_MUL(cycle); \ - BLEND_ADD(cycle, special); \ - BLEND_SHIFT(shift); \ - BLEND_SCALE_CLAMP(sum); + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; -void N64BlenderT::BlendEquationCycle0NoForceNoSpecial(int* r, int* g, int* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(0, 0, 1, 2); -} + blend_with_partial_reject(&r, &g, &b, 1, partialreject, sel1, userdata, object); -void N64BlenderT::BlendEquationCycle0NoForceSpecial(int* r, int* g, int* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(0, 1, 1, 2); -} + *fr = r; + *fg = g; + *fb = b; -void N64BlenderT::BlendEquationCycle0ForceNoSpecial(int* r, int* g, int* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(0, 0, 0, 5); + return true; } -void N64BlenderT::BlendEquationCycle0ForceSpecial(int* r, int* g, int* b, rdp_span_aux *userdata, const rdp_poly_state& object) +bool n64_blender_t::cycle2_blend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object) { - BLEND_PIPE(0, 1, 0, 5); -} + INT32 r, g, b; -void N64BlenderT::BlendEquationCycle1NoForceNoSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(1, 0, 1, 2); -} + userdata->m_shade_color.i.a = m_alpha_dither[(userdata->m_shade_color.i.a << 3) | adseed]; -void N64BlenderT::BlendEquationCycle1NoForceSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(1, 1, 1, 2); -} + if (test_for_reject(userdata, object)) + { + return false; + } -void N64BlenderT::BlendEquationCycle1ForceNoSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(1, 0, 0, 5); -} + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[0]; + blend_pipe(0, sel0, &r, &g, &b, userdata, object); -void N64BlenderT::BlendEquationCycle1ForceSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object) -{ - BLEND_PIPE(1, 1, 0, 5); + userdata->m_blended_pixel_color.i.r = r; + userdata->m_blended_pixel_color.i.g = g; + userdata->m_blended_pixel_color.i.b = b; + userdata->m_blended_pixel_color.i.a = userdata->m_pixel_color.i.a; + + blend_with_partial_reject(&r, &g, &b, 1, partialreject, sel1, userdata, object); + + *fr = m_color_dither[((r & 0xff) << 3) | dith]; + *fg = m_color_dither[((g & 0xff) << 3) | dith]; + *fb = m_color_dither[((b & 0xff) << 3) | dith]; + + return true; } -bool N64BlenderT::AlphaCompareNone(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object) +void n64_blender_t::blend_with_partial_reject(INT32* r, INT32* g, INT32* b, INT32 cycle, INT32 partialreject, INT32 select, rdp_span_aux* userdata, const rdp_poly_state& object) { - return false; + if (partialreject && userdata->m_pixel_color.i.a >= 0xff) + { + *r = *userdata->m_color_inputs.blender1a_r[cycle]; + *g = *userdata->m_color_inputs.blender1a_g[cycle]; + *b = *userdata->m_color_inputs.blender1a_b[cycle]; + } + else + { + userdata->m_inv_pixel_color.i.a = 0xff - *userdata->m_color_inputs.blender1b_a[cycle]; + blend_pipe(cycle, select, r, g, b, userdata, object); + } } -bool N64BlenderT::AlphaCompareNoDither(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object) +void n64_blender_t::blend_pipe(const int cycle, const int special, int* r_out, int* g_out, int* b_out, rdp_span_aux* userdata, const rdp_poly_state& object) { - return alpha < userdata->BlendColor.i.a; + const INT32 mask = 0xff &~ (0x73 * special); + const INT32 shift_a = 3 + userdata->m_shift_a * special; + const INT32 shift_b = 3 + userdata->m_shift_b * special; + const INT32 blend1a = (*userdata->m_color_inputs.blender1b_a[cycle] >> shift_a) & mask; + const INT32 blend2a = (*userdata->m_color_inputs.blender2b_a[cycle] >> shift_b) & mask; + const INT32 special_shift = special << 1; + + INT32 r = (((int)(*userdata->m_color_inputs.blender1a_r[cycle]) * (int)(blend1a))) + (((int)(*userdata->m_color_inputs.blender2a_r[cycle]) * (int)(blend2a))); + INT32 g = (((int)(*userdata->m_color_inputs.blender1a_g[cycle]) * (int)(blend1a))) + (((int)(*userdata->m_color_inputs.blender2a_g[cycle]) * (int)(blend2a))); + INT32 b = (((int)(*userdata->m_color_inputs.blender1a_b[cycle]) * (int)(blend1a))) + (((int)(*userdata->m_color_inputs.blender2a_b[cycle]) * (int)(blend2a))); + + r += ((int)*userdata->m_color_inputs.blender2a_r[cycle]) << special_shift; + g += ((int)*userdata->m_color_inputs.blender2a_g[cycle]) << special_shift; + b += ((int)*userdata->m_color_inputs.blender2a_b[cycle]) << special_shift; + + r >>= object.m_other_modes.blend_shift; + g >>= object.m_other_modes.blend_shift; + b >>= object.m_other_modes.blend_shift; + + if (!object.m_other_modes.force_blend) + { + INT32 factor_sum = ((blend1a >> 2) + (blend2a >> 2) + 1) & 0xf; + if (factor_sum) + { + r /= factor_sum; + g /= factor_sum; + b /= factor_sum; + } + else + { + r = g = b = 0xff; + } + } + + *r_out = min(r, 255); + *g_out = min(g, 255); + *b_out = min(b, 255); } -bool N64BlenderT::AlphaCompareDither(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object) +inline INT32 n64_blender_t::min(const INT32 x, const INT32 min) { - return alpha < (rand() & 0xff); + if (x < min) + { + return x; + } + return min; } diff --git a/src/mame/video/rdpblend.h b/src/mame/video/rdpblend.h index 5628cfe8db0..4e6ab25e2b4 100644 --- a/src/mame/video/rdpblend.h +++ b/src/mame/video/rdpblend.h @@ -18,28 +18,26 @@ #include "emu.h" -struct OtherModesT; -struct MiscStateT; +struct other_modes_t; +struct misc_state_t; class n64_rdp; struct rdp_span_aux; -class Color; +class color_t; struct rdp_poly_state; -class N64BlenderT +class n64_blender_t { public: - typedef bool (N64BlenderT::*Blender1)(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - typedef bool (N64BlenderT::*Blender2)(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - typedef void (N64BlenderT::*BlendEquation)(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - typedef bool (N64BlenderT::*AlphaCompare)(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object); + typedef bool (n64_blender_t::*blender1)(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + typedef bool (n64_blender_t::*blender2)(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); - N64BlenderT(); + n64_blender_t(); - Blender1 blend1[8]; - Blender2 blend2[8]; + blender1 blend1[8]; + blender2 blend2[8]; - void SetMachine(running_machine& machine) { m_machine = &machine; } - void SetProcessor(n64_rdp* rdp) { m_rdp = rdp; } + void set_machine(running_machine& machine) { m_machine = &machine; } + void set_processor(n64_rdp* rdp) { m_rdp = rdp; } running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } @@ -47,44 +45,35 @@ class N64BlenderT running_machine* m_machine; n64_rdp* m_rdp; - bool Blend1CycleNoBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleNoBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleNoBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleNoBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend1CycleBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - - bool Blend2CycleNoBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleNoBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleNoBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleNoBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleBlendNoACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleBlendNoACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleBlendACVGNoDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - bool Blend2CycleBlendACVGDither(UINT32* fr, UINT32* fg, UINT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, int acmode, rdp_span_aux *userdata, const rdp_poly_state& object); - - void BlendEquationCycle0NoForceNoSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - void BlendEquationCycle0NoForceSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - void BlendEquationCycle0ForceNoSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - void BlendEquationCycle0ForceSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - - void BlendEquationCycle1NoForceNoSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - void BlendEquationCycle1NoForceSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - void BlendEquationCycle1ForceNoSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - void BlendEquationCycle1ForceSpecial(INT32* r, INT32* g, INT32* b, rdp_span_aux *userdata, const rdp_poly_state& object); - - BlendEquation cycle0[4]; - BlendEquation cycle1[4]; - AlphaCompare compare[4]; - - bool AlphaCompareNone(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object); - bool AlphaCompareNoDither(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object); - bool AlphaCompareDither(UINT8 alpha, const rdp_span_aux *userdata, const rdp_poly_state& object); - - void DitherRGB(INT32* r, INT32* g, INT32* b, int dith); - void DitherA(UINT8* a, int dith); + INT32 min(const INT32 x, const INT32 min); + bool alpha_reject(rdp_span_aux* userdata, const rdp_poly_state& object); + bool test_for_reject(rdp_span_aux* userdata, const rdp_poly_state& object); + void blend_pipe(const int cycle, const int special, int* r_out, int* g_out, int* b_out, rdp_span_aux* userdata, const rdp_poly_state& object); + void blend_with_partial_reject(INT32* r, INT32* g, INT32* b, INT32 cycle, INT32 partialreject, INT32 select, rdp_span_aux* userdata, const rdp_poly_state& object); + + bool cycle1_noblend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_noblend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_noblend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_noblend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_blend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_blend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_blend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle1_blend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, rdp_span_aux* userdata, const rdp_poly_state& object); + + bool cycle2_noblend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_noblend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_noblend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_noblend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_blend_noacvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_blend_noacvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_blend_acvg_nodither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + bool cycle2_blend_acvg_dither(INT32* fr, INT32* fg, INT32* fb, int dith, int adseed, int partialreject, int sel0, int sel1, rdp_span_aux* userdata, const rdp_poly_state& object); + + INT32 dither_alpha(INT32 alpha, INT32 dither); + INT32 dither_color(INT32 color, INT32 dither); + + UINT8 m_color_dither[256 * 8]; + UINT8 m_alpha_dither[256 * 8]; }; #endif // _VIDEO_RDPBLEND_H_ diff --git a/src/mame/video/rdpfiltr.inc b/src/mame/video/rdpfiltr.inc index 5b9cdddab2d..c70dfb50e19 100644 --- a/src/mame/video/rdpfiltr.inc +++ b/src/mame/video/rdpfiltr.inc @@ -1,17 +1,17 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz INLINE void video_filter16(int *out_r, int *out_g, int *out_b, UINT16* vbuff, UINT8* hbuff, const UINT32 hres); INLINE void divot_filter16(UINT8* r, UINT8* g, UINT8* b, UINT16* fbuff, UINT32 fbuff_index); INLINE void restore_filter16(INT32* r, INT32* g, INT32* b, UINT16* fbuff, UINT32 fbuff_index, UINT32 hres); -INLINE void divot_filter16_buffer(INT32* r, INT32* g, INT32* b, Color* vibuffer); -INLINE void restore_filter16_buffer(INT32* r, INT32* g, INT32* b, Color* vibuff, UINT32 hres); -INLINE void restore_two(Color* filtered, Color* neighbour); +INLINE void divot_filter16_buffer(INT32* r, INT32* g, INT32* b, color_t* vibuffer); +INLINE void restore_filter16_buffer(INT32* r, INT32* g, INT32* b, color_t* vibuff, UINT32 hres); +INLINE void restore_two(color_t* filtered, color_t* neighbour); INLINE void video_max(UINT32* Pixels, UINT8* max, UINT32* enb); INLINE UINT32 ge_two(UINT32 enb); INLINE void video_filter16(int *out_r, int *out_g, int *out_b, UINT16* vbuff, UINT8* hbuff, const UINT32 hres) { - Color penumax, penumin, max, min; + color_t penumax, penumin, max, min; UINT16 pix = *vbuff; const UINT8 centercvg = (*hbuff & 3) + ((pix & 1) << 2) + 1; UINT32 numoffull = 1; @@ -255,11 +255,11 @@ INLINE void divot_filter16(UINT8* r, UINT8* g, UINT8* b, UINT16* fbuff, UINT32 f } } -INLINE void divot_filter16_buffer(int* r, int* g, int* b, Color* vibuffer) +INLINE void divot_filter16_buffer(int* r, int* g, int* b, color_t* vibuffer) { - Color leftpix = vibuffer[-1]; - Color rightpix = vibuffer[1]; - Color filtered = *vibuffer; + color_t leftpix = vibuffer[-1]; + color_t rightpix = vibuffer[1]; + color_t filtered = *vibuffer; *r = filtered.i.r; *g = filtered.i.g; @@ -429,12 +429,12 @@ INLINE void restore_filter16(int* r, int* g, int* b, UINT16* fbuff, UINT32 fbuff } } -INLINE void restore_filter16_buffer(INT32* r, INT32* g, INT32* b, Color* vibuff, UINT32 hres) +INLINE void restore_filter16_buffer(INT32* r, INT32* g, INT32* b, color_t* vibuff, UINT32 hres) { - Color filtered; - Color leftuppix, leftdownpix, leftpix; - Color rightuppix, rightdownpix, rightpix; - Color uppix, downpix; + color_t filtered; + color_t leftuppix, leftdownpix, leftpix; + color_t rightuppix, rightdownpix, rightpix; + color_t uppix, downpix; INT32 ihres = (INT32)hres; //can't apply unary minus to unsigned leftuppix = vibuff[-ihres - 1]; @@ -473,7 +473,7 @@ INLINE void restore_filter16_buffer(INT32* r, INT32* g, INT32* b, Color* vibuff, } // This is wrong, only the 5 upper bits are compared. -INLINE void restore_two(Color* filtered, Color* neighbour) +INLINE void restore_two(color_t* filtered, color_t* neighbour) { if (neighbour->i.r > filtered->i.r) { diff --git a/src/mame/video/rdpspn16.c b/src/mame/video/rdpspn16.c index bf8bf00d859..8625f9b860b 100644 --- a/src/mame/video/rdpspn16.c +++ b/src/mame/video/rdpspn16.c @@ -17,13 +17,11 @@ #include "includes/n64.h" #include "video/n64.h" -#define LookUpCC(A, B, C, D) GetCCLUT2()[(GetCCLUT1()[(A << 16) | (B << 8) | C] << 8) | D] - -void n64_rdp::RenderSpans(int start, int end, int tilenum, bool flip, extent_t *Spans, bool rect, rdp_poly_state *object) +void n64_rdp::render_spans(INT32 start, INT32 end, INT32 tilenum, bool flip, extent_t* spans, bool rect, rdp_poly_state* object) { - int clipy1 = Scissor.m_yh; - int clipy2 = Scissor.m_yl; - int offset = 0; + const INT32 clipy1 = m_scissor.m_yh; + const INT32 clipy2 = m_scissor.m_yl; + INT32 offset = 0; if (clipy2 <= 0) { @@ -50,43 +48,43 @@ void n64_rdp::RenderSpans(int start, int end, int tilenum, bool flip, extent_t * } object->m_rdp = this; - memcpy(&object->MiscState, &MiscState, sizeof(MiscStateT)); - memcpy(&object->OtherModes, &OtherModes, sizeof(OtherModesT)); - memcpy(&object->SpanBase, &SpanBase, sizeof(SpanBaseT)); - memcpy(&object->Scissor, &Scissor, sizeof(Rectangle)); - memcpy(&object->m_tiles, &m_tiles, 8 * sizeof(N64Tile)); + memcpy(&object->m_misc_state, &m_misc_state, sizeof(misc_state_t)); + memcpy(&object->m_other_modes, &m_other_modes, sizeof(other_modes_t)); + memcpy(&object->m_span_base, &m_span_base, sizeof(span_base_t)); + memcpy(&object->m_scissor, &m_scissor, sizeof(rectangle_t)); + memcpy(&object->m_tiles, &m_tiles, 8 * sizeof(n64_tile_t)); object->tilenum = tilenum; object->flip = flip; - object->FillColor = FillColor; + object->m_fill_color = m_fill_color; object->rect = rect; - switch(OtherModes.cycle_type) + switch(m_other_modes.cycle_type) { case CYCLE_TYPE_1: - render_triangle_custom(visarea, render_delegate(FUNC(n64_rdp::SpanDraw1Cycle), this), start, (end - start) + 1, Spans + offset); + render_triangle_custom(m_visarea, render_delegate(FUNC(n64_rdp::span_draw_1cycle), this), start, (end - start) + 1, spans + offset); break; case CYCLE_TYPE_2: - render_triangle_custom(visarea, render_delegate(FUNC(n64_rdp::SpanDraw2Cycle), this), start, (end - start) + 1, Spans + offset); + render_triangle_custom(m_visarea, render_delegate(FUNC(n64_rdp::span_draw_2cycle), this), start, (end - start) + 1, spans + offset); break; case CYCLE_TYPE_COPY: - render_triangle_custom(visarea, render_delegate(FUNC(n64_rdp::SpanDrawCopy), this), start, (end - start) + 1, Spans + offset); + render_triangle_custom(m_visarea, render_delegate(FUNC(n64_rdp::span_draw_copy), this), start, (end - start) + 1, spans + offset); break; case CYCLE_TYPE_FILL: - render_triangle_custom(visarea, render_delegate(FUNC(n64_rdp::SpanDrawFill), this), start, (end - start) + 1, Spans + offset); + render_triangle_custom(m_visarea, render_delegate(FUNC(n64_rdp::span_draw_fill), this), start, (end - start) + 1, spans + offset); break; } wait(); } -void n64_rdp::RGBAZClip(int sr, int sg, int sb, int sa, int *sz, rdp_span_aux *userdata) +void n64_rdp::rgbaz_clip(INT32 sr, INT32 sg, INT32 sb, INT32 sa, INT32* sz, rdp_span_aux* userdata) { - userdata->ShadeColor.i.r = s_special_9bit_clamptable[sr & 0x1ff]; - userdata->ShadeColor.i.g = s_special_9bit_clamptable[sg & 0x1ff]; - userdata->ShadeColor.i.b = s_special_9bit_clamptable[sb & 0x1ff]; - userdata->ShadeColor.i.a = s_special_9bit_clamptable[sa & 0x1ff]; + userdata->m_shade_color.i.r = s_special_9bit_clamptable[sr & 0x1ff]; + userdata->m_shade_color.i.g = s_special_9bit_clamptable[sg & 0x1ff]; + userdata->m_shade_color.i.b = s_special_9bit_clamptable[sb & 0x1ff]; + userdata->m_shade_color.i.a = s_special_9bit_clamptable[sa & 0x1ff]; INT32 zanded = (*sz) & 0x60000; @@ -100,9 +98,9 @@ void n64_rdp::RGBAZClip(int sr, int sg, int sb, int sa, int *sz, rdp_span_aux *u } } -void n64_rdp::RGBAZCorrectTriangle(INT32 offx, INT32 offy, INT32* r, INT32* g, INT32* b, INT32* a, INT32* z, rdp_span_aux *userdata, const rdp_poly_state &object) +void n64_rdp::rgbaz_correct_triangle(INT32 offx, INT32 offy, INT32* r, INT32* g, INT32* b, INT32* a, INT32* z, rdp_span_aux* userdata, const rdp_poly_state &object) { - if (userdata->CurrentPixCvg == 8) + if (userdata->m_current_pix_cvg == 8) { *r >>= 2; *g >>= 2; @@ -112,17 +110,17 @@ void n64_rdp::RGBAZCorrectTriangle(INT32 offx, INT32 offy, INT32* r, INT32* g, I } else { - INT32 summand_xr = offx * SIGN13(object.SpanBase.m_span_dr >> 14); - INT32 summand_yr = offy * SIGN13(object.SpanBase.m_span_drdy >> 14); - INT32 summand_xb = offx * SIGN13(object.SpanBase.m_span_db >> 14); - INT32 summand_yb = offy * SIGN13(object.SpanBase.m_span_dbdy >> 14); - INT32 summand_xg = offx * SIGN13(object.SpanBase.m_span_dg >> 14); - INT32 summand_yg = offy * SIGN13(object.SpanBase.m_span_dgdy >> 14); - INT32 summand_xa = offx * SIGN13(object.SpanBase.m_span_da >> 14); - INT32 summand_ya = offy * SIGN13(object.SpanBase.m_span_dady >> 14); + INT32 summand_xr = offx * SIGN13(object.m_span_base.m_span_dr >> 14); + INT32 summand_yr = offy * SIGN13(object.m_span_base.m_span_drdy >> 14); + INT32 summand_xb = offx * SIGN13(object.m_span_base.m_span_db >> 14); + INT32 summand_yb = offy * SIGN13(object.m_span_base.m_span_dbdy >> 14); + INT32 summand_xg = offx * SIGN13(object.m_span_base.m_span_dg >> 14); + INT32 summand_yg = offy * SIGN13(object.m_span_base.m_span_dgdy >> 14); + INT32 summand_xa = offx * SIGN13(object.m_span_base.m_span_da >> 14); + INT32 summand_ya = offy * SIGN13(object.m_span_base.m_span_dady >> 14); - INT32 summand_xz = offx * SIGN22(object.SpanBase.m_span_dz >> 10); - INT32 summand_yz = offy * SIGN22(object.SpanBase.m_span_dzdy >> 10); + INT32 summand_xz = offx * SIGN22(object.m_span_base.m_span_dz >> 10); + INT32 summand_yz = offy * SIGN22(object.m_span_base.m_span_dzdy >> 10); *r = ((*r << 2) + summand_xr + summand_yr) >> 4; *g = ((*g << 2) + summand_xg + summand_yg) >> 4; @@ -132,14 +130,14 @@ void n64_rdp::RGBAZCorrectTriangle(INT32 offx, INT32 offy, INT32* r, INT32* g, I } } -inline void n64_rdp::write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, rdp_span_aux *userdata, const rdp_poly_state &object) +inline void n64_rdp::write_pixel(UINT32 curpixel, INT32 r, INT32 g, INT32 b, rdp_span_aux* userdata, const rdp_poly_state &object) { - if (object.MiscState.FBSize == 2) // 16-bit framebuffer + if (object.m_misc_state.m_fb_size == 2) // 16-bit framebuffer { - const UINT32 fb = (object.MiscState.FBAddress >> 1) + curpixel; + const UINT32 fb = (object.m_misc_state.m_fb_address >> 1) + curpixel; UINT16 finalcolor; - if (object.OtherModes.color_on_cvg && !userdata->PreWrap) + if (object.m_other_modes.color_on_cvg && !userdata->m_pre_wrap) { finalcolor = RREADIDX16(fb) & 0xfffe; } @@ -148,12 +146,12 @@ inline void n64_rdp::write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, finalcolor = ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1); } - switch (object.OtherModes.cvg_dest) + switch (object.m_other_modes.cvg_dest) { case 0: - if (userdata->BlendEnable) + if (userdata->m_blend_enable) { - UINT32 finalcvg = userdata->CurrentPixCvg + userdata->CurrentMemCvg; + UINT32 finalcvg = userdata->m_current_pix_cvg + userdata->m_current_mem_cvg; if (finalcvg & 8) { finalcvg = 7; @@ -163,14 +161,14 @@ inline void n64_rdp::write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, } else { - const UINT32 finalcvg = (userdata->CurrentPixCvg - 1) & 7; + const UINT32 finalcvg = (userdata->m_current_pix_cvg - 1) & 7; RWRITEIDX16(fb, finalcolor | (finalcvg >> 2)); HWRITEADDR8(fb, finalcvg & 3); } break; case 1: { - const UINT32 finalcvg = (userdata->CurrentPixCvg + userdata->CurrentMemCvg) & 7; + const UINT32 finalcvg = (userdata->m_current_pix_cvg + userdata->m_current_mem_cvg) & 7; RWRITEIDX16(fb, finalcolor | (finalcvg >> 2)); HWRITEADDR8(fb, finalcvg & 3); break; @@ -180,17 +178,17 @@ inline void n64_rdp::write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, HWRITEADDR8(fb, 3); break; case 3: - RWRITEIDX16(fb, finalcolor | (userdata->CurrentMemCvg >> 2)); - HWRITEADDR8(fb, userdata->CurrentMemCvg & 3); + RWRITEIDX16(fb, finalcolor | (userdata->m_current_mem_cvg >> 2)); + HWRITEADDR8(fb, userdata->m_current_mem_cvg & 3); break; } } else // 32-bit framebuffer { - const UINT32 fb = (object.MiscState.FBAddress >> 2) + curpixel; + const UINT32 fb = (object.m_misc_state.m_fb_address >> 2) + curpixel; UINT32 finalcolor; - if (object.OtherModes.color_on_cvg && !userdata->PreWrap) + if (object.m_other_modes.color_on_cvg && !userdata->m_pre_wrap) { finalcolor = RREADIDX32(fb) & 0xffffff00; } @@ -199,12 +197,12 @@ inline void n64_rdp::write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, finalcolor = (r << 24) | (g << 16) | (b << 8); } - switch (object.OtherModes.cvg_dest) + switch (object.m_other_modes.cvg_dest) { case 0: - if (userdata->BlendEnable) + if (userdata->m_blend_enable) { - UINT32 finalcvg = userdata->CurrentPixCvg + userdata->CurrentMemCvg; + UINT32 finalcvg = userdata->m_current_pix_cvg + userdata->m_current_mem_cvg; if (finalcvg & 8) { finalcvg = 7; @@ -214,113 +212,113 @@ inline void n64_rdp::write_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, } else { - RWRITEIDX32(fb, finalcolor | (((userdata->CurrentPixCvg - 1) & 7) << 5)); + RWRITEIDX32(fb, finalcolor | (((userdata->m_current_pix_cvg - 1) & 7) << 5)); } break; case 1: - RWRITEIDX32(fb, finalcolor | (((userdata->CurrentPixCvg + userdata->CurrentMemCvg) & 7) << 5)); + RWRITEIDX32(fb, finalcolor | (((userdata->m_current_pix_cvg + userdata->m_current_mem_cvg) & 7) << 5)); break; case 2: RWRITEIDX32(fb, finalcolor | 0xE0); break; case 3: - RWRITEIDX32(fb, finalcolor | (userdata->CurrentMemCvg << 5)); + RWRITEIDX32(fb, finalcolor | (userdata->m_current_mem_cvg << 5)); break; } } } -inline void n64_rdp::read_pixel(UINT32 curpixel, rdp_span_aux *userdata, const rdp_poly_state &object) +inline void n64_rdp::read_pixel(UINT32 curpixel, rdp_span_aux* userdata, const rdp_poly_state &object) { - if (object.MiscState.FBSize == 2) // 16-bit framebuffer + if (object.m_misc_state.m_fb_size == 2) // 16-bit framebuffer { UINT16 fword; - if (object.OtherModes.image_read_en) + if (object.m_other_modes.image_read_en) { - fword = RREADIDX16((object.MiscState.FBAddress >> 1) + curpixel); - UINT8 hbyte = HREADADDR8((object.MiscState.FBAddress >> 1) + curpixel); - userdata->MemoryColor.i.a = userdata->CurrentMemCvg << 5; - userdata->CurrentMemCvg = ((fword & 1) << 2) | (hbyte & 3); + fword = RREADIDX16((object.m_misc_state.m_fb_address >> 1) + curpixel); + UINT8 hbyte = HREADADDR8((object.m_misc_state.m_fb_address >> 1) + curpixel); + userdata->m_memory_color.i.a = userdata->m_current_mem_cvg << 5; + userdata->m_current_mem_cvg = ((fword & 1) << 2) | (hbyte & 3); } else { - fword = RREADIDX16((object.MiscState.FBAddress >> 1) + curpixel); - userdata->MemoryColor.i.a = 0xff; - userdata->CurrentMemCvg = 7; + fword = RREADIDX16((object.m_misc_state.m_fb_address >> 1) + curpixel); + userdata->m_memory_color.i.a = 0xff; + userdata->m_current_mem_cvg = 7; } - userdata->MemoryColor.i.r = GETHICOL(fword); - userdata->MemoryColor.i.g = GETMEDCOL(fword); - userdata->MemoryColor.i.b = GETLOWCOL(fword); + userdata->m_memory_color.i.r = GETHICOL(fword); + userdata->m_memory_color.i.g = GETMEDCOL(fword); + userdata->m_memory_color.i.b = GETLOWCOL(fword); } else // 32-bit framebuffer { UINT32 mem; - if (object.OtherModes.image_read_en) + if (object.m_other_modes.image_read_en) { - mem = RREADIDX32((object.MiscState.FBAddress >> 2) + curpixel); - userdata->MemoryColor.i.a = (mem) & 0xff; - userdata->CurrentMemCvg = (mem >> 5) & 7; + mem = RREADIDX32((object.m_misc_state.m_fb_address >> 2) + curpixel); + userdata->m_memory_color.i.a = (mem) & 0xff; + userdata->m_current_mem_cvg = (mem >> 5) & 7; } else { - mem = RREADIDX32((object.MiscState.FBAddress >> 2) + curpixel); - userdata->MemoryColor.i.a = 0xff; - userdata->CurrentMemCvg = 7; + mem = RREADIDX32((object.m_misc_state.m_fb_address >> 2) + curpixel); + userdata->m_memory_color.i.a = 0xff; + userdata->m_current_mem_cvg = 7; } - userdata->MemoryColor.i.r = (mem >> 24) & 0xff; - userdata->MemoryColor.i.g = (mem >> 16) & 0xff; - userdata->MemoryColor.i.b = (mem >> 8) & 0xff; + userdata->m_memory_color.i.r = (mem >> 24) & 0xff; + userdata->m_memory_color.i.g = (mem >> 16) & 0xff; + userdata->m_memory_color.i.b = (mem >> 8) & 0xff; } } -inline void n64_rdp::copy_pixel(UINT32 curpixel, UINT32 r, UINT32 g, UINT32 b, int CurrentPixCvg, const rdp_poly_state &object) +inline void n64_rdp::copy_pixel(UINT32 curpixel, INT32 r, INT32 g, INT32 b, INT32 m_current_pix_cvg, const rdp_poly_state &object) { - if (object.MiscState.FBSize == 2) // 16-bit framebuffer + if (object.m_misc_state.m_fb_size == 2) // 16-bit framebuffer { - RWRITEIDX16((object.MiscState.FBAddress >> 1) + curpixel, ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1) | ((CurrentPixCvg >> 2) & 1)); - HWRITEADDR8((object.MiscState.FBAddress >> 1) + curpixel, CurrentPixCvg & 3); + RWRITEIDX16((object.m_misc_state.m_fb_address >> 1) + curpixel, ((r >> 3) << 11) | ((g >> 3) << 6) | ((b >> 3) << 1) | ((m_current_pix_cvg >> 2) & 1)); + HWRITEADDR8((object.m_misc_state.m_fb_address >> 1) + curpixel, m_current_pix_cvg & 3); } else // 32-bit framebuffer { - RWRITEIDX32((object.MiscState.FBAddress >> 2) + curpixel, (r << 24) | (g << 16) | (b << 8) | (CurrentPixCvg << 5)); + RWRITEIDX32((object.m_misc_state.m_fb_address >> 2) + curpixel, (r << 24) | (g << 16) | (b << 8) | (m_current_pix_cvg << 5)); } } inline void n64_rdp::fill_pixel(UINT32 curpixel, const rdp_poly_state &object) { - if (object.MiscState.FBSize == 2) // 16-bit framebuffer + if (object.m_misc_state.m_fb_size == 2) // 16-bit framebuffer { UINT16 val; if (curpixel & 1) { - val = object.FillColor & 0xffff; + val = object.m_fill_color & 0xffff; } else { - val = (object.FillColor >> 16) & 0xffff; + val = (object.m_fill_color >> 16) & 0xffff; } - RWRITEIDX16((object.MiscState.FBAddress >> 1) + curpixel, val); - HWRITEADDR8((object.MiscState.FBAddress >> 1) + curpixel, ((val & 1) << 1) | (val & 1)); + RWRITEIDX16((object.m_misc_state.m_fb_address >> 1) + curpixel, val); + HWRITEADDR8((object.m_misc_state.m_fb_address >> 1) + curpixel, ((val & 1) << 1) | (val & 1)); } else // 32-bit framebuffer { - RWRITEIDX32((object.MiscState.FBAddress >> 2) + curpixel, object.FillColor); - HWRITEADDR8((object.MiscState.FBAddress >> 1) + (curpixel << 1), (object.FillColor & 0x10000) ? 3 : 0); - HWRITEADDR8((object.MiscState.FBAddress >> 1) + (curpixel << 1) + 1, (object.FillColor & 0x1) ? 3 : 0); + RWRITEIDX32((object.m_misc_state.m_fb_address >> 2) + curpixel, object.m_fill_color); + HWRITEADDR8((object.m_misc_state.m_fb_address >> 1) + (curpixel << 1), (object.m_fill_color & 0x10000) ? 3 : 0); + HWRITEADDR8((object.m_misc_state.m_fb_address >> 1) + (curpixel << 1) + 1, (object.m_fill_color & 0x1) ? 3 : 0); } } -void n64_rdp::SpanDraw1Cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid) +void n64_rdp::span_draw_1cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid) { - assert(object.MiscState.FBSize >= 2 && object.MiscState.FBSize < 4); + assert(object.m_misc_state.m_fb_size >= 2 && object.m_misc_state.m_fb_size < 4); - const int clipx1 = object.Scissor.m_xh; - const int clipx2 = object.Scissor.m_xl; - const int tilenum = object.tilenum; + const INT32 clipx1 = object.m_scissor.m_xh; + const INT32 clipx2 = object.m_scissor.m_xl; + const INT32 tilenum = object.tilenum; const bool flip = object.flip; SpanParam r; r.w = extent.param[SPAN_R].start; @@ -332,126 +330,125 @@ void n64_rdp::SpanDraw1Cycle(INT32 scanline, const extent_t &extent, const rdp_p SpanParam t; t.w = extent.param[SPAN_T].start; SpanParam w; w.w = extent.param[SPAN_W].start; - const UINT32 zb = object.MiscState.ZBAddress >> 1; - const UINT32 zhb = object.MiscState.ZBAddress; - UINT8 offx = 0, offy = 0; + const UINT32 zb = object.m_misc_state.m_zb_address >> 1; + const UINT32 zhb = object.m_misc_state.m_zb_address; #ifdef PTR64 assert(extent.userdata != (const void *)0xcccccccccccccccc); #else assert(extent.userdata != (const void *)0xcccccccc); #endif - rdp_span_aux *userdata = (rdp_span_aux*)extent.userdata; + rdp_span_aux* userdata = (rdp_span_aux*)extent.userdata; - INT32 m_clamp_s_diff[8]; - INT32 m_clamp_t_diff[8]; - TexPipe.CalculateClampDiffs(tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); + INT32 clamp_s_diff[8]; + INT32 clamp_t_diff[8]; + m_tex_pipe.calculate_clamp_diffs(tilenum, userdata, object, clamp_s_diff, clamp_t_diff); - const bool partialreject = (userdata->ColorInputs.blender2b_a[0] == &userdata->InvPixelColor.i.a && userdata->ColorInputs.blender1b_a[0] == &userdata->PixelColor.i.a); - const int sel0 = (OtherModes.force_blend ? 2 : 0) | ((userdata->ColorInputs.blender2b_a[0] == &userdata->MemoryColor.i.a) ? 1 : 0); + 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; - int drinc, dginc, dbinc, dainc; - int dzinc, dzpix; - int dsinc, dtinc, dwinc; - int xinc; + INT32 drinc, dginc, dbinc, dainc; + INT32 dzinc, dzpix; + INT32 dsinc, dtinc, dwinc; + INT32 xinc; if (!flip) { - drinc = -object.SpanBase.m_span_dr; - dginc = -object.SpanBase.m_span_dg; - dbinc = -object.SpanBase.m_span_db; - dainc = -object.SpanBase.m_span_da; - dzinc = -object.SpanBase.m_span_dz; - dsinc = -object.SpanBase.m_span_ds; - dtinc = -object.SpanBase.m_span_dt; - dwinc = -object.SpanBase.m_span_dw; + drinc = -object.m_span_base.m_span_dr; + dginc = -object.m_span_base.m_span_dg; + dbinc = -object.m_span_base.m_span_db; + dainc = -object.m_span_base.m_span_da; + dzinc = -object.m_span_base.m_span_dz; + dsinc = -object.m_span_base.m_span_ds; + dtinc = -object.m_span_base.m_span_dt; + dwinc = -object.m_span_base.m_span_dw; xinc = -1; } else { - drinc = object.SpanBase.m_span_dr; - dginc = object.SpanBase.m_span_dg; - dbinc = object.SpanBase.m_span_db; - dainc = object.SpanBase.m_span_da; - dzinc = object.SpanBase.m_span_dz; - dsinc = object.SpanBase.m_span_ds; - dtinc = object.SpanBase.m_span_dt; - dwinc = object.SpanBase.m_span_dw; + drinc = object.m_span_base.m_span_dr; + dginc = object.m_span_base.m_span_dg; + dbinc = object.m_span_base.m_span_db; + dainc = object.m_span_base.m_span_da; + dzinc = object.m_span_base.m_span_dz; + dsinc = object.m_span_base.m_span_ds; + dtinc = object.m_span_base.m_span_dt; + dwinc = object.m_span_base.m_span_dw; xinc = 1; } - const int fb_index = object.MiscState.FBWidth * scanline; + const INT32 fb_index = object.m_misc_state.m_fb_width * scanline; - const int xstart = extent.startx; - const int xend = userdata->m_unscissored_rx; - const int xend_scissored = extent.stopx; + const INT32 xstart = extent.startx; + const INT32 xend = userdata->m_unscissored_rx; + const INT32 xend_scissored = extent.stopx; - int x = xend; + INT32 x = xend; - const int length = flip ? (xstart - xend) : (xend - xstart); - UINT32 fir, fig, fib; + const INT32 length = flip ? (xstart - xend) : (xend - xstart); + INT32 fir, fig, fib; - if(object.OtherModes.z_source_sel) + if(object.m_other_modes.z_source_sel) { - z.w = ((UINT32)object.MiscState.PrimitiveZ) << 16; - dzpix = object.MiscState.PrimitiveDZ; + z.w = object.m_misc_state.m_primitive_z; + dzpix = object.m_misc_state.m_primitive_dz; dzinc = 0; } else { - dzpix = object.SpanBase.m_span_dzpix; + dzpix = object.m_span_base.m_span_dzpix; } - if (object.MiscState.FBSize < 2 || object.MiscState.FBSize > 4) - fatalerror("unsupported FBSize %d\n", object.MiscState.FBSize); + if (object.m_misc_state.m_fb_size < 2 || object.m_misc_state.m_fb_size > 4) + fatalerror("unsupported m_fb_size %d\n", object.m_misc_state.m_fb_size); - const int blend_index = (object.OtherModes.alpha_cvg_select ? 2 : 0) | ((object.OtherModes.rgb_dither_sel < 3) ? 1 : 0); - const int cycle0 = ((object.OtherModes.sample_type & 1) << 1) | (object.OtherModes.bi_lerp0 & 1); - const int acmode = (object.OtherModes.alpha_compare_en ? 2 : 0) | (object.OtherModes.dither_alpha_en ? 1 : 0); + const INT32 blend_index = (object.m_other_modes.alpha_cvg_select ? 2 : 0) | ((object.m_other_modes.rgb_dither_sel < 3) ? 1 : 0); + const INT32 cycle0 = ((object.m_other_modes.sample_type & 1) << 1) | (object.m_other_modes.bi_lerp0 & 1); INT32 sss = 0; INT32 sst = 0; - if (object.OtherModes.persp_tex_en) + if (object.m_other_modes.persp_tex_en) { - TCDiv(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); + tc_div(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); } else { - TCDivNoPersp(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); + tc_div_no_perspective(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); } userdata->m_start_span = true; - for (int j = 0; j <= length; j++) + for (INT32 j = 0; j <= length; j++) { - int sr = r.w >> 14; - int sg = g.w >> 14; - int sb = b.w >> 14; - int sa = a.w >> 14; - int sz = (z.w >> 10) & 0x3fffff; + INT32 sr = r.w >> 14; + INT32 sg = g.w >> 14; + INT32 sb = b.w >> 14; + INT32 sa = a.w >> 14; + INT32 sz = (z.w >> 10) & 0x3fffff; const bool valid_x = (flip) ? (x >= xend_scissored) : (x <= xend_scissored); if (x >= clipx1 && x < clipx2 && valid_x) { + UINT8 offx, offy; lookup_cvmask_derivatives(userdata->m_cvg[x], &offx, &offy, userdata); - TexPipe.LOD1Cycle(&sss, &sst, s.w, t.w, w.w, dsinc, dtinc, dwinc, userdata, object); + m_tex_pipe.lod_1cycle(&sss, &sst, s.w, t.w, w.w, dsinc, dtinc, dwinc, userdata, object); - RGBAZCorrectTriangle(offx, offy, &sr, &sg, &sb, &sa, &sz, userdata, object); - RGBAZClip(sr, sg, sb, sa, &sz, userdata); + rgbaz_correct_triangle(offx, offy, &sr, &sg, &sb, &sa, &sz, userdata, object); + rgbaz_clip(sr, sg, sb, sa, &sz, userdata); - ((TexPipe).*(TexPipe.cycle[cycle0]))(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tilenum, 0, userdata, object, m_clamp_s_diff, m_clamp_t_diff); - //TexPipe.Cycle(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tilenum, 0, userdata, object, m_clamp_s_diff, m_clamp_t_diff); + ((m_tex_pipe).*(m_tex_pipe.m_cycle[cycle0]))(&userdata->m_texel0_color, &userdata->m_texel0_color, sss, sst, tilenum, 0, userdata, object, clamp_s_diff, clamp_t_diff); + //m_tex_pipe.Cycle(&userdata->m_texel0_color, &userdata->m_texel0_color, sss, sst, tilenum, 0, userdata, object, clamp_s_diff, clamp_t_diff); - userdata->NoiseColor.i.r = userdata->NoiseColor.i.g = userdata->NoiseColor.i.b = rand() << 3; // Not accurate + userdata->m_noise_color.i.r = userdata->m_noise_color.i.g = userdata->m_noise_color.i.b = rand() << 3; // Not accurate - userdata->PixelColor.i.r = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_r[1],*userdata->ColorInputs.combiner_rgbsub_b_r[1],*userdata->ColorInputs.combiner_rgbmul_r[1],*userdata->ColorInputs.combiner_rgbadd_r[1]); - userdata->PixelColor.i.g = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_g[1],*userdata->ColorInputs.combiner_rgbsub_b_g[1],*userdata->ColorInputs.combiner_rgbmul_g[1],*userdata->ColorInputs.combiner_rgbadd_g[1]); - userdata->PixelColor.i.b = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_b[1],*userdata->ColorInputs.combiner_rgbsub_b_b[1],*userdata->ColorInputs.combiner_rgbmul_b[1],*userdata->ColorInputs.combiner_rgbadd_b[1]); - userdata->PixelColor.i.a = AlphaCombinerEquation(*userdata->ColorInputs.combiner_alphasub_a[1],*userdata->ColorInputs.combiner_alphasub_b[1],*userdata->ColorInputs.combiner_alphamul[1],*userdata->ColorInputs.combiner_alphaadd[1]); + userdata->m_pixel_color.i.r = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_r[1],*userdata->m_color_inputs.combiner_rgbsub_b_r[1],*userdata->m_color_inputs.combiner_rgbmul_r[1],*userdata->m_color_inputs.combiner_rgbadd_r[1]); + userdata->m_pixel_color.i.g = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_g[1],*userdata->m_color_inputs.combiner_rgbsub_b_g[1],*userdata->m_color_inputs.combiner_rgbmul_g[1],*userdata->m_color_inputs.combiner_rgbadd_g[1]); + userdata->m_pixel_color.i.b = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_b[1],*userdata->m_color_inputs.combiner_rgbsub_b_b[1],*userdata->m_color_inputs.combiner_rgbmul_b[1],*userdata->m_color_inputs.combiner_rgbadd_b[1]); + userdata->m_pixel_color.i.a = alpha_combiner_equation(*userdata->m_color_inputs.combiner_alphasub_a[1],*userdata->m_color_inputs.combiner_alphasub_b[1],*userdata->m_color_inputs.combiner_alphamul[1],*userdata->m_color_inputs.combiner_alphaadd[1]); //Alpha coverage combiner - GetAlphaCvg(&userdata->PixelColor.i.a, userdata, object); + get_alpha_cvg(&userdata->m_pixel_color.i.a, userdata, object); const UINT32 curpixel = fb_index + x; const UINT32 zbcur = zb + curpixel; @@ -459,20 +456,24 @@ void n64_rdp::SpanDraw1Cycle(INT32 scanline, const extent_t &extent, const rdp_p read_pixel(curpixel, userdata, object); - if(ZCompare(zbcur, zhbcur, sz, dzpix, userdata, object)) + if(z_compare(zbcur, zhbcur, sz, dzpix, userdata, object)) { - int cdith = 0; - int adith = 0; - GetDitherValues(scanline, j, &cdith, &adith, object); + INT32 cdith = 0; + INT32 adith = 0; + get_dither_values(scanline, j, &cdith, &adith, object); - bool rendered = ((&Blender)->*(Blender.blend1[(userdata->BlendEnable << 2) | blend_index]))(&fir, &fig, &fib, cdith, adith, partialreject, sel0, acmode, userdata, object); + if (((userdata->m_blend_enable << 2) | blend_index) != 5 && machine().input().code_pressed(KEYCODE_B)) + { + printf("1:%d\n", (userdata->m_blend_enable << 2) | blend_index); + } + bool rendered = ((&m_blender)->*(m_blender.blend1[(userdata->m_blend_enable << 2) | blend_index]))(&fir, &fig, &fib, cdith, adith, partialreject, sel0, userdata, object); if (rendered) { write_pixel(curpixel, fir, fig, fib, userdata, object); - if (object.OtherModes.z_update_en) + if (object.m_other_modes.z_update_en) { - ZStore(object, zbcur, zhbcur, sz, userdata->m_dzpix_enc); + z_store(object, zbcur, zhbcur, sz, userdata->m_dzpix_enc); } } } @@ -494,13 +495,13 @@ void n64_rdp::SpanDraw1Cycle(INT32 scanline, const extent_t &extent, const rdp_p } } -void n64_rdp::SpanDraw2Cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid) +void n64_rdp::span_draw_2cycle(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid) { - assert(object.MiscState.FBSize >= 2 && object.MiscState.FBSize < 4); + assert(object.m_misc_state.m_fb_size >= 2 && object.m_misc_state.m_fb_size < 4); - const int clipx1 = object.Scissor.m_xh; - const int clipx2 = object.Scissor.m_xl; - const int tilenum = object.tilenum; + const INT32 clipx1 = object.m_scissor.m_xh; + const INT32 clipx2 = object.m_scissor.m_xl; + const INT32 tilenum = object.tilenum; const bool flip = object.flip; SpanParam r; r.w = extent.param[SPAN_R].start; @@ -512,14 +513,14 @@ void n64_rdp::SpanDraw2Cycle(INT32 scanline, const extent_t &extent, const rdp_p SpanParam t; t.w = extent.param[SPAN_T].start; SpanParam w; w.w = extent.param[SPAN_W].start; - const UINT32 zb = object.MiscState.ZBAddress >> 1; - const UINT32 zhb = object.MiscState.ZBAddress; + const UINT32 zb = object.m_misc_state.m_zb_address >> 1; + const UINT32 zhb = object.m_misc_state.m_zb_address; INT32 tile2 = (tilenum + 1) & 7; INT32 tile1 = tilenum; const UINT32 prim_tile = tilenum; - int newtile1 = tile1; + INT32 newtile1 = tile1; INT32 news = 0; INT32 newt = 0; @@ -528,185 +529,188 @@ void n64_rdp::SpanDraw2Cycle(INT32 scanline, const extent_t &extent, const rdp_p #else assert(extent.userdata != (const void *)0xcccccccc); #endif - rdp_span_aux *userdata = (rdp_span_aux*)extent.userdata; + rdp_span_aux* userdata = (rdp_span_aux*)extent.userdata; - INT32 m_clamp_s_diff[8]; - INT32 m_clamp_t_diff[8]; - TexPipe.CalculateClampDiffs(tile1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); + INT32 clamp_s_diff[8]; + INT32 clamp_t_diff[8]; + m_tex_pipe.calculate_clamp_diffs(tile1, userdata, object, clamp_s_diff, clamp_t_diff); - bool partialreject = (userdata->ColorInputs.blender2b_a[1] == &userdata->InvPixelColor.i.a && userdata->ColorInputs.blender1b_a[1] == &userdata->PixelColor.i.a); - int sel0 = (OtherModes.force_blend ? 2 : 0) | ((userdata->ColorInputs.blender2b_a[0] == &userdata->MemoryColor.i.a) ? 1 : 0); - int sel1 = (OtherModes.force_blend ? 2 : 0) | ((userdata->ColorInputs.blender2b_a[1] == &userdata->MemoryColor.i.a) ? 1 : 0); + 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; + INT32 sel1 = (userdata->m_color_inputs.blender2b_a[1] == &userdata->m_memory_color.i.a) ? 1 : 0; - int drinc, dginc, dbinc, dainc; - int dzinc, dzpix; - int dsinc, dtinc, dwinc; - int xinc; + INT32 drinc, dginc, dbinc, dainc; + INT32 dzinc, dzpix; + INT32 dsinc, dtinc, dwinc; + INT32 xinc; if (!flip) { - drinc = -object.SpanBase.m_span_dr; - dginc = -object.SpanBase.m_span_dg; - dbinc = -object.SpanBase.m_span_db; - dainc = -object.SpanBase.m_span_da; - dzinc = -object.SpanBase.m_span_dz; - dsinc = -object.SpanBase.m_span_ds; - dtinc = -object.SpanBase.m_span_dt; - dwinc = -object.SpanBase.m_span_dw; + drinc = -object.m_span_base.m_span_dr; + dginc = -object.m_span_base.m_span_dg; + dbinc = -object.m_span_base.m_span_db; + dainc = -object.m_span_base.m_span_da; + dzinc = -object.m_span_base.m_span_dz; + dsinc = -object.m_span_base.m_span_ds; + dtinc = -object.m_span_base.m_span_dt; + dwinc = -object.m_span_base.m_span_dw; xinc = -1; } else { - drinc = object.SpanBase.m_span_dr; - dginc = object.SpanBase.m_span_dg; - dbinc = object.SpanBase.m_span_db; - dainc = object.SpanBase.m_span_da; - dzinc = object.SpanBase.m_span_dz; - dsinc = object.SpanBase.m_span_ds; - dtinc = object.SpanBase.m_span_dt; - dwinc = object.SpanBase.m_span_dw; + drinc = object.m_span_base.m_span_dr; + dginc = object.m_span_base.m_span_dg; + dbinc = object.m_span_base.m_span_db; + dainc = object.m_span_base.m_span_da; + dzinc = object.m_span_base.m_span_dz; + dsinc = object.m_span_base.m_span_ds; + dtinc = object.m_span_base.m_span_dt; + dwinc = object.m_span_base.m_span_dw; xinc = 1; } - const int fb_index = object.MiscState.FBWidth * scanline; + const INT32 fb_index = object.m_misc_state.m_fb_width * scanline; - int cdith = 0; - int adith = 0; + INT32 cdith = 0; + INT32 adith = 0; - const int xstart = extent.startx; - const int xend = userdata->m_unscissored_rx; - const int xend_scissored = extent.stopx; + const INT32 xstart = extent.startx; + const INT32 xend = userdata->m_unscissored_rx; + const INT32 xend_scissored = extent.stopx; - int x = xend; + INT32 x = xend; - const int length = flip ? (xstart - xend) : (xend - xstart); - UINT32 fir, fig, fib; + const INT32 length = flip ? (xstart - xend) : (xend - xstart); + INT32 fir, fig, fib; - if(object.OtherModes.z_source_sel) + if(object.m_other_modes.z_source_sel) { - z.w = ((UINT32)object.MiscState.PrimitiveZ) << 16; - dzpix = object.MiscState.PrimitiveDZ; + z.w = object.m_misc_state.m_primitive_z; + dzpix = object.m_misc_state.m_primitive_dz; dzinc = 0; } else { - dzpix = object.SpanBase.m_span_dzpix; + dzpix = object.m_span_base.m_span_dzpix; } - if (object.MiscState.FBSize < 2 || object.MiscState.FBSize > 4) - fatalerror("unsupported FBSize %d\n", object.MiscState.FBSize); + if (object.m_misc_state.m_fb_size < 2 || object.m_misc_state.m_fb_size > 4) + fatalerror("unsupported m_fb_size %d\n", object.m_misc_state.m_fb_size); - const int blend_index = (object.OtherModes.alpha_cvg_select ? 2 : 0) | ((object.OtherModes.rgb_dither_sel < 3) ? 1 : 0); - const int cycle0 = ((object.OtherModes.sample_type & 1) << 1) | (object.OtherModes.bi_lerp0 & 1); - const int cycle1 = ((object.OtherModes.sample_type & 1) << 1) | (object.OtherModes.bi_lerp1 & 1); - const int acmode = (object.OtherModes.alpha_compare_en ? 2 : 0) | (object.OtherModes.dither_alpha_en ? 1 : 0); + const INT32 blend_index = (object.m_other_modes.alpha_cvg_select ? 2 : 0) | ((object.m_other_modes.rgb_dither_sel < 3) ? 1 : 0); + const INT32 cycle0 = ((object.m_other_modes.sample_type & 1) << 1) | (object.m_other_modes.bi_lerp0 & 1); + const INT32 cycle1 = ((object.m_other_modes.sample_type & 1) << 1) | (object.m_other_modes.bi_lerp1 & 1); INT32 sss = 0; INT32 sst = 0; - if (object.OtherModes.persp_tex_en) + if (object.m_other_modes.persp_tex_en) { - TCDiv(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); + tc_div(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); } else { - TCDivNoPersp(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); + tc_div_no_perspective(s.w >> 16, t.w >> 16, w.w >> 16, &sss, &sst); } userdata->m_start_span = true; - for (int j = 0; j <= length; j++) + for (INT32 j = 0; j <= length; j++) { - int sr = r.w >> 14; - int sg = g.w >> 14; - int sb = b.w >> 14; - int sa = a.w >> 14; - int sz = (z.w >> 10) & 0x3fffff; - Color c1; - Color c2; + INT32 sr = r.w >> 14; + INT32 sg = g.w >> 14; + INT32 sb = b.w >> 14; + INT32 sa = a.w >> 14; + INT32 sz = (z.w >> 10) & 0x3fffff; + color_t c1; + color_t c2; - bool valid_x = (flip) ? (x >= xend_scissored) : (x <= xend_scissored); + const bool valid_x = (flip) ? (x >= xend_scissored) : (x <= xend_scissored); if (x >= clipx1 && x < clipx2 && valid_x) { - UINT32 compidx = compressed_cvmasks[userdata->m_cvg[x]]; - userdata->CurrentPixCvg = cvarray[compidx].cvg; - userdata->CurrentCvgBit = cvarray[compidx].cvbit; - UINT8 offx = cvarray[compidx].xoff; - UINT8 offy = cvarray[compidx].yoff; + const UINT32 compidx = m_compressed_cvmasks[userdata->m_cvg[x]]; + userdata->m_current_pix_cvg = cvarray[compidx].cvg; + userdata->m_current_cvg_bit = cvarray[compidx].cvbit; + const UINT8 offx = cvarray[compidx].xoff; + const UINT8 offy = cvarray[compidx].yoff; //lookup_cvmask_derivatives(userdata->m_cvg[x], &offx, &offy, userdata); - TexPipe.LOD2Cycle(&sss, &sst, s.w, t.w, w.w, dsinc, dtinc, dwinc, prim_tile, &tile1, &tile2, userdata, object); + m_tex_pipe.lod_2cycle(&sss, &sst, s.w, t.w, w.w, dsinc, dtinc, dwinc, prim_tile, &tile1, &tile2, userdata, object); news = userdata->m_precomp_s; newt = userdata->m_precomp_t; - TexPipe.LOD2CycleLimited(&news, &newt, s.w + dsinc, t.w + dtinc, w.w + dwinc, dsinc, dtinc, dwinc, prim_tile, &newtile1, object); - - RGBAZCorrectTriangle(offx, offy, &sr, &sg, &sb, &sa, &sz, userdata, object); - RGBAZClip(sr, sg, sb, sa, &sz, userdata); - - ((TexPipe).*(TexPipe.cycle[cycle0]))(&userdata->Texel0Color, &userdata->Texel0Color, sss, sst, tile1, 0, userdata, object, m_clamp_s_diff, m_clamp_t_diff); - ((TexPipe).*(TexPipe.cycle[cycle1]))(&userdata->Texel1Color, &userdata->Texel0Color, sss, sst, tile2, 1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); - ((TexPipe).*(TexPipe.cycle[cycle1]))(&userdata->NextTexelColor, &userdata->NextTexelColor, sss, sst, tile2, 1, userdata, object, m_clamp_s_diff, m_clamp_t_diff); - - userdata->NoiseColor.i.r = userdata->NoiseColor.i.g = userdata->NoiseColor.i.b = rand() << 3; // Not accurate - userdata->CombinedColor.i.r = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_r[0], - *userdata->ColorInputs.combiner_rgbsub_b_r[0], - *userdata->ColorInputs.combiner_rgbmul_r[0], - *userdata->ColorInputs.combiner_rgbadd_r[0]); - userdata->CombinedColor.i.g = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_g[0], - *userdata->ColorInputs.combiner_rgbsub_b_g[0], - *userdata->ColorInputs.combiner_rgbmul_g[0], - *userdata->ColorInputs.combiner_rgbadd_g[0]); - userdata->CombinedColor.i.b = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_b[0], - *userdata->ColorInputs.combiner_rgbsub_b_b[0], - *userdata->ColorInputs.combiner_rgbmul_b[0], - *userdata->ColorInputs.combiner_rgbadd_b[0]); - userdata->CombinedColor.i.a = AlphaCombinerEquation(*userdata->ColorInputs.combiner_alphasub_a[0], - *userdata->ColorInputs.combiner_alphasub_b[0], - *userdata->ColorInputs.combiner_alphamul[0], - *userdata->ColorInputs.combiner_alphaadd[0]); - - userdata->Texel0Color = userdata->Texel1Color; - userdata->Texel1Color = userdata->NextTexelColor; - - userdata->PixelColor.i.r = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_r[1], - *userdata->ColorInputs.combiner_rgbsub_b_r[1], - *userdata->ColorInputs.combiner_rgbmul_r[1], - *userdata->ColorInputs.combiner_rgbadd_r[1]); - userdata->PixelColor.i.g = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_g[1], - *userdata->ColorInputs.combiner_rgbsub_b_g[1], - *userdata->ColorInputs.combiner_rgbmul_g[1], - *userdata->ColorInputs.combiner_rgbadd_g[1]); - userdata->PixelColor.i.b = ColorCombinerEquation(*userdata->ColorInputs.combiner_rgbsub_a_b[1], - *userdata->ColorInputs.combiner_rgbsub_b_b[1], - *userdata->ColorInputs.combiner_rgbmul_b[1], - *userdata->ColorInputs.combiner_rgbadd_b[1]); - userdata->PixelColor.i.a = AlphaCombinerEquation(*userdata->ColorInputs.combiner_alphasub_a[1], - *userdata->ColorInputs.combiner_alphasub_b[1], - *userdata->ColorInputs.combiner_alphamul[1], - *userdata->ColorInputs.combiner_alphaadd[1]); + m_tex_pipe.lod_2cycle_limited(&news, &newt, s.w + dsinc, t.w + dtinc, w.w + dwinc, dsinc, dtinc, dwinc, prim_tile, &newtile1, object); + + rgbaz_correct_triangle(offx, offy, &sr, &sg, &sb, &sa, &sz, userdata, object); + rgbaz_clip(sr, sg, sb, sa, &sz, userdata); + + ((m_tex_pipe).*(m_tex_pipe.m_cycle[cycle0]))(&userdata->m_texel0_color, &userdata->m_texel0_color, sss, sst, tile1, 0, userdata, object, clamp_s_diff, clamp_t_diff); + ((m_tex_pipe).*(m_tex_pipe.m_cycle[cycle1]))(&userdata->m_texel1_color, &userdata->m_texel0_color, sss, sst, tile2, 1, userdata, object, clamp_s_diff, clamp_t_diff); + ((m_tex_pipe).*(m_tex_pipe.m_cycle[cycle1]))(&userdata->m_next_texel_color, &userdata->m_next_texel_color, sss, sst, tile2, 1, userdata, object, clamp_s_diff, clamp_t_diff); + + userdata->m_noise_color.i.r = userdata->m_noise_color.i.g = userdata->m_noise_color.i.b = rand() << 3; // Not accurate + userdata->m_combined_color.i.r = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_r[0], + *userdata->m_color_inputs.combiner_rgbsub_b_r[0], + *userdata->m_color_inputs.combiner_rgbmul_r[0], + *userdata->m_color_inputs.combiner_rgbadd_r[0]); + userdata->m_combined_color.i.g = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_g[0], + *userdata->m_color_inputs.combiner_rgbsub_b_g[0], + *userdata->m_color_inputs.combiner_rgbmul_g[0], + *userdata->m_color_inputs.combiner_rgbadd_g[0]); + userdata->m_combined_color.i.b = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_b[0], + *userdata->m_color_inputs.combiner_rgbsub_b_b[0], + *userdata->m_color_inputs.combiner_rgbmul_b[0], + *userdata->m_color_inputs.combiner_rgbadd_b[0]); + userdata->m_combined_color.i.a = alpha_combiner_equation(*userdata->m_color_inputs.combiner_alphasub_a[0], + *userdata->m_color_inputs.combiner_alphasub_b[0], + *userdata->m_color_inputs.combiner_alphamul[0], + *userdata->m_color_inputs.combiner_alphaadd[0]); + + userdata->m_texel0_color = userdata->m_texel1_color; + userdata->m_texel1_color = userdata->m_next_texel_color; + + userdata->m_pixel_color.i.r = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_r[1], + *userdata->m_color_inputs.combiner_rgbsub_b_r[1], + *userdata->m_color_inputs.combiner_rgbmul_r[1], + *userdata->m_color_inputs.combiner_rgbadd_r[1]); + userdata->m_pixel_color.i.g = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_g[1], + *userdata->m_color_inputs.combiner_rgbsub_b_g[1], + *userdata->m_color_inputs.combiner_rgbmul_g[1], + *userdata->m_color_inputs.combiner_rgbadd_g[1]); + userdata->m_pixel_color.i.b = color_combiner_equation(*userdata->m_color_inputs.combiner_rgbsub_a_b[1], + *userdata->m_color_inputs.combiner_rgbsub_b_b[1], + *userdata->m_color_inputs.combiner_rgbmul_b[1], + *userdata->m_color_inputs.combiner_rgbadd_b[1]); + userdata->m_pixel_color.i.a = alpha_combiner_equation(*userdata->m_color_inputs.combiner_alphasub_a[1], + *userdata->m_color_inputs.combiner_alphasub_b[1], + *userdata->m_color_inputs.combiner_alphamul[1], + *userdata->m_color_inputs.combiner_alphaadd[1]); //Alpha coverage combiner - GetAlphaCvg(&userdata->PixelColor.i.a, userdata, object); + get_alpha_cvg(&userdata->m_pixel_color.i.a, userdata, object); - UINT32 curpixel = fb_index + x; - UINT32 zbcur = zb + curpixel; - UINT32 zhbcur = zhb + curpixel; + const UINT32 curpixel = fb_index + x; + const UINT32 zbcur = zb + curpixel; + const UINT32 zhbcur = zhb + curpixel; read_pixel(curpixel, userdata, object); - if(ZCompare(zbcur, zhbcur, sz, dzpix, userdata, object)) + if(z_compare(zbcur, zhbcur, sz, dzpix, userdata, object)) { - GetDitherValues(scanline, j, &cdith, &adith, object); + get_dither_values(scanline, j, &cdith, &adith, object); - bool rendered = ((&Blender)->*(Blender.blend2[(userdata->BlendEnable << 2) | blend_index]))(&fir, &fig, &fib, cdith, adith, partialreject, sel0, sel1, acmode, userdata, object); + if (((userdata->m_blend_enable << 2) | blend_index) != 5 && machine().input().code_pressed(KEYCODE_B)) + { + printf("2:%d\n", (userdata->m_blend_enable << 2) | blend_index); + } + bool rendered = ((&m_blender)->*(m_blender.blend2[(userdata->m_blend_enable << 2) | blend_index]))(&fir, &fig, &fib, cdith, adith, partialreject, sel0, sel1, userdata, object); if (rendered) { write_pixel(curpixel, fir, fig, fib, userdata, object); - if (object.OtherModes.z_update_en) + if (object.m_other_modes.z_update_en) { - ZStore(object, zbcur, zhbcur, sz, userdata->m_dzpix_enc); + z_store(object, zbcur, zhbcur, sz, userdata->m_dzpix_enc); } } } @@ -727,49 +731,46 @@ void n64_rdp::SpanDraw2Cycle(INT32 scanline, const extent_t &extent, const rdp_p } } -void n64_rdp::SpanDrawCopy(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid) +void n64_rdp::span_draw_copy(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid) { - assert(object.MiscState.FBSize >= 2 && object.MiscState.FBSize < 4); + const INT32 clipx1 = object.m_scissor.m_xh; + const INT32 clipx2 = object.m_scissor.m_xl; + const INT32 tilenum = object.tilenum; + const bool flip = object.flip; - int clipx1 = object.Scissor.m_xh; - int clipx2 = object.Scissor.m_xl; - int tilenum = object.tilenum; - bool flip = object.flip; + rdp_span_aux* userdata = (rdp_span_aux*)extent.userdata; + const INT32 xstart = extent.startx; + const INT32 xend = userdata->m_unscissored_rx; + const INT32 xend_scissored = extent.stopx; + const INT32 xinc = flip ? 1 : -1; + const INT32 length = flip ? (xstart - xend) : (xend - xstart); SpanParam s; s.w = extent.param[SPAN_S].start; SpanParam t; t.w = extent.param[SPAN_T].start; - int ds = object.SpanBase.m_span_ds / 4; - int dt = object.SpanBase.m_span_dt / 4; - int dsinc = flip ? (ds) : -ds; - int dtinc = flip ? (dt) : -dt; - int xinc = flip ? 1 : -1; + const INT32 ds = object.m_span_base.m_span_ds / 4; + const INT32 dt = object.m_span_base.m_span_dt / 4; + const INT32 dsinc = flip ? (ds) : -ds; + const INT32 dtinc = flip ? (dt) : -dt; - int fb_index = object.MiscState.FBWidth * scanline; + const INT32 fb_index = object.m_misc_state.m_fb_width * scanline; - rdp_span_aux *userdata = (rdp_span_aux*)extent.userdata; - int xstart = extent.startx; - int xend = userdata->m_unscissored_rx; - int xend_scissored = extent.stopx; + INT32 x = xend; - int x = xend; - - int length = flip ? (xstart - xend) : (xend - xstart); - - for (int j = 0; j <= length; j++) + for (INT32 j = 0; j <= length; j++) { - bool valid_x = (flip) ? (x >= xend_scissored) : (x <= xend_scissored); + const bool valid_x = (flip) ? (x >= xend_scissored) : (x <= xend_scissored); if (x >= clipx1 && x < clipx2 && valid_x) { INT32 sss = s.h.h; INT32 sst = t.h.h; - TexPipe.Copy(&userdata->Texel0Color, sss, sst, tilenum, object, userdata); + m_tex_pipe.copy(&userdata->m_texel0_color, sss, sst, tilenum, object, userdata); UINT32 curpixel = fb_index + x; - if ((userdata->Texel0Color.i.a != 0) || (!object.OtherModes.alpha_compare_en)) + if ((userdata->m_texel0_color.i.a != 0) || (!object.m_other_modes.alpha_compare_en)) { - copy_pixel(curpixel, userdata->Texel0Color.i.r, userdata->Texel0Color.i.g, userdata->Texel0Color.i.b, userdata->Texel0Color.i.a ? 7 : 0, object); + copy_pixel(curpixel, userdata->m_texel0_color.i.r, userdata->m_texel0_color.i.g, userdata->m_texel0_color.i.b, userdata->m_texel0_color.i.a ? 7 : 0, object); } } @@ -779,27 +780,27 @@ void n64_rdp::SpanDrawCopy(INT32 scanline, const extent_t &extent, const rdp_pol } } -void n64_rdp::SpanDrawFill(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, int threadid) +void n64_rdp::span_draw_fill(INT32 scanline, const extent_t &extent, const rdp_poly_state &object, INT32 threadid) { - assert(object.MiscState.FBSize >= 2 && object.MiscState.FBSize < 4); + assert(object.m_misc_state.m_fb_size >= 2 && object.m_misc_state.m_fb_size < 4); const bool flip = object.flip; - const int clipx1 = object.Scissor.m_xh; - const int clipx2 = object.Scissor.m_xl; + const INT32 clipx1 = object.m_scissor.m_xh; + const INT32 clipx2 = object.m_scissor.m_xl; - const int xinc = flip ? 1 : -1; + const INT32 xinc = flip ? 1 : -1; - const int fb_index = object.MiscState.FBWidth * scanline; + const INT32 fb_index = object.m_misc_state.m_fb_width * scanline; - const int xstart = extent.startx; - const int xend_scissored = extent.stopx; + const INT32 xstart = extent.startx; + const INT32 xend_scissored = extent.stopx; - int x = xend_scissored; + INT32 x = xend_scissored; - const int length = flip ? (xstart - xend_scissored) : (xend_scissored - xstart); + const INT32 length = flip ? (xstart - xend_scissored) : (xend_scissored - xstart); - for (int j = 0; j <= length; j++) + for (INT32 j = 0; j <= length; j++) { if (x >= clipx1 && x < clipx2) { diff --git a/src/mame/video/rdptpipe.c b/src/mame/video/rdptpipe.c index 6e54267502d..1ddeb3e479d 100644 --- a/src/mame/video/rdptpipe.c +++ b/src/mame/video/rdptpipe.c @@ -19,26 +19,26 @@ #define RELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7); -void N64TexturePipeT::SetMachine(running_machine &machine) +void n64_texture_pipe_t::set_machine(running_machine &machine) { - n64_state *state = machine.driver_data<n64_state>(); + n64_state* state = machine.driver_data<n64_state>(); m_rdp = state->m_rdp; - for(int i = 0; i < 0x10000; i++) + for(INT32 i = 0; i < 0x10000; i++) { - Color c; - c.i.r = m_rdp->ReplicatedRGBA[(i >> 11) & 0x1f]; - c.i.g = m_rdp->ReplicatedRGBA[(i >> 6) & 0x1f]; - c.i.b = m_rdp->ReplicatedRGBA[(i >> 1) & 0x1f]; + color_t c; + c.i.r = m_rdp->m_replicated_rgba[(i >> 11) & 0x1f]; + c.i.g = m_rdp->m_replicated_rgba[(i >> 6) & 0x1f]; + c.i.b = m_rdp->m_replicated_rgba[(i >> 1) & 0x1f]; c.i.a = (i & 1) ? 0xff : 0x00; - Expand16To32Table[i] = c.c; + m_expand_16to32_table[i] = c.c; } } -void N64TexturePipeT::Mask(INT32* S, INT32* T, INT32 num, const rdp_poly_state& object) +void n64_texture_pipe_t::mask(INT32* S, INT32* T, INT32 num, const rdp_poly_state& object) { - const N64Tile* tiles = object.m_tiles; + const n64_tile_t* tiles = object.m_tiles; if (tiles[num].mask_s) { @@ -83,18 +83,18 @@ void N64TexturePipeT::Mask(INT32* S, INT32* T, INT32 num, const rdp_poly_state& param1 &= maskbits_##coord; \ } -void N64TexturePipeT::MaskCoupled(INT32* S, INT32* S1, INT32* T, INT32* T1, INT32 num, const rdp_poly_state& object) +void n64_texture_pipe_t::mask_coupled(INT32* S, INT32* S1, INT32* T, INT32* T1, INT32 num, const rdp_poly_state& object) { - const N64Tile* tiles = object.m_tiles; + const n64_tile_t* tiles = object.m_tiles; if (tiles[num].mask_s) { - INT32 maskbits_s = m_maskbits_table[tiles[num].mask_s]; + const INT32 maskbits_s = m_maskbits_table[tiles[num].mask_s]; if (tiles[num].ms) { - INT32 swrapthreshold = tiles[num].mask_s > 10 ? 10 : tiles[num].mask_s; - INT32 wrap = (*S >> swrapthreshold) & 1; - INT32 wrap1 = (*S1 >> swrapthreshold) & 1; + const INT32 swrapthreshold = tiles[num].mask_s > 10 ? 10 : tiles[num].mask_s; + const INT32 wrap = (*S >> swrapthreshold) & 1; + const INT32 wrap1 = (*S1 >> swrapthreshold) & 1; if (wrap) { *S = (~(*S)); @@ -110,12 +110,12 @@ void N64TexturePipeT::MaskCoupled(INT32* S, INT32* S1, INT32* T, INT32* T1, INT3 if (tiles[num].mask_t) { - INT32 maskbits_t = m_maskbits_table[tiles[num].mask_t]; + const INT32 maskbits_t = m_maskbits_table[tiles[num].mask_t]; if (tiles[num].mt) { - INT32 twrapthreshold = tiles[num].mask_t > 10 ? 10 : tiles[num].mask_t; - INT32 wrap = (*T >> twrapthreshold) & 1; - INT32 wrap1 = (*T1 >> twrapthreshold) & 1; + const INT32 twrapthreshold = tiles[num].mask_t > 10 ? 10 : tiles[num].mask_t; + const INT32 wrap = (*T >> twrapthreshold) & 1; + const INT32 wrap1 = (*T1 >> twrapthreshold) & 1; if (wrap) { *T = (~(*T)); @@ -143,9 +143,9 @@ void N64TexturePipeT::MaskCoupled(INT32* S, INT32* S1, INT32* T, INT32* T1, INT3 param = SIGN16(param); \ max = ((param >> 3) >= tiles[num].coord##h); -void N64TexturePipeT::ShiftCycle(INT32* S, INT32* T, INT32* maxs, INT32* maxt, UINT32 num, const rdp_poly_state& object) +void n64_texture_pipe_t::shift_cycle(INT32* S, INT32* T, INT32* maxs, INT32* maxt, UINT32 num, const rdp_poly_state& object) { - const N64Tile* tiles = object.m_tiles; + const n64_tile_t* tiles = object.m_tiles; *S = SIGN16(*S); if (tiles[num].shift_s < 11) { @@ -171,9 +171,9 @@ void N64TexturePipeT::ShiftCycle(INT32* S, INT32* T, INT32* maxs, INT32* maxt, U *maxt = ((*T >> 3) >= tiles[num].th); } -void N64TexturePipeT::ShiftCopy(INT32* S, INT32* T, UINT32 num, const rdp_poly_state& object) +void n64_texture_pipe_t::shift_copy(INT32* S, INT32* T, UINT32 num, const rdp_poly_state& object) { - const N64Tile* tiles = object.m_tiles; + const n64_tile_t* tiles = object.m_tiles; *S = SIGN16(*S); *T = SIGN16(*T); if (tiles[num].shift_s < 11)//?-? tcu_tile @@ -219,9 +219,9 @@ void N64TexturePipeT::ShiftCopy(INT32* S, INT32* T, UINT32 num, const rdp_poly_s param = (SIGN17(param) >> 5) & 0x1fff; \ } -void N64TexturePipeT::ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; + const n64_tile_t* tiles = object.m_tiles; if (tiles[num].cs || !tiles[num].mask_s) { @@ -268,13 +268,11 @@ void N64TexturePipeT::ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, } } -void N64TexturePipeT::ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::clamp_cycle_light(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; - int dos = tiles[num].cs || !tiles[num].mask_s; - int dot = tiles[num].ct || !tiles[num].mask_t; + const n64_tile_t* tiles = object.m_tiles; - if (dos) + if (tiles[num].cs || !tiles[num].mask_s) { if (*S & 0x10000) { @@ -294,7 +292,7 @@ void N64TexturePipeT::ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, *S = (SIGN17(*S) >> 5) & 0x1fff; } - if (dot) + if (tiles[num].ct || !tiles[num].mask_t) { if (*T & 0x10000) { @@ -315,18 +313,17 @@ void N64TexturePipeT::ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, } } -void N64TexturePipeT::CycleNearest(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::cycle_nearest(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; - const N64Tile& tile = tiles[tilenum]; - UINT32 tformat = tile.format; - UINT32 tsize = tile.size; - UINT32 tpal = tile.palette; - UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type; + const n64_tile_t* tiles = object.m_tiles; + const n64_tile_t& tile = tiles[tilenum]; + const UINT32 tformat = tile.format; + const UINT32 tsize = tile.size; + const UINT32 tpal = tile.palette; + const UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.m_other_modes.en_tlut << 1) | (UINT32) object.m_other_modes.tlut_type; #define TRELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7); - int convert = object.OtherModes.convert_one && cycle; - Color t0; + color_t t0; INT32 sss1 = SSS; INT32 maxs; @@ -338,22 +335,22 @@ void N64TexturePipeT::CycleNearest(Color* TEX, Color* prev, INT32 SSS, INT32 SST SHIFT_CYCLE(sst1, maxt, tilenum, t); sst1 = TRELATIVE(sst1, tile.tl); - ClampCycleLight(&sss1, &sst1, maxs, maxt, tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); - Mask(&sss1, &sst1, tilenum, object); + clamp_cycle_light(&sss1, &sst1, maxs, maxt, tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); + mask(&sss1, &sst1, tilenum, object); UINT32 tbase = tile.tmem + ((tile.line * sst1) & 0x1ff); - t0.c = ((this)->*(TexelFetch[index]))(sss1, sst1, tbase, tpal, userdata); + t0.c = ((this)->*(m_texel_fetch[index]))(sss1, sst1, tbase, tpal, userdata); - INT32 newk0 = SIGN9(m_rdp->GetK0()); - INT32 newk1 = SIGN9(m_rdp->GetK1()); - INT32 newk2 = SIGN9(m_rdp->GetK2()); - INT32 newk3 = SIGN9(m_rdp->GetK3()); - INT32 invk0 = ~newk0; - INT32 invk1 = ~newk1; - INT32 invk2 = ~newk2; - INT32 invk3 = ~newk3; - if (convert) + const INT32 newk0 = SIGN9(m_rdp->get_k0()); + const INT32 newk1 = SIGN9(m_rdp->get_k1()); + const INT32 newk2 = SIGN9(m_rdp->get_k2()); + const INT32 newk3 = SIGN9(m_rdp->get_k3()); + const INT32 invk0 = ~newk0; + const INT32 invk1 = ~newk1; + const INT32 invk2 = ~newk2; + const INT32 invk3 = ~newk3; + if (object.m_other_modes.convert_one && cycle) { t0 = *prev; } @@ -370,17 +367,17 @@ void N64TexturePipeT::CycleNearest(Color* TEX, Color* prev, INT32 SSS, INT32 SST TEX->i.a &= 0x1ff; } -void N64TexturePipeT::CycleNearestLerp(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::cycle_nearest_lerp(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; - const N64Tile& tile = tiles[tilenum]; - UINT32 tformat = tile.format; - UINT32 tsize = tile.size; - UINT32 tpal = tile.palette; - UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type; + const n64_tile_t* tiles = object.m_tiles; + const n64_tile_t& tile = tiles[tilenum]; + const UINT32 tformat = tile.format; + const UINT32 tsize = tile.size; + const UINT32 tpal = tile.palette; + const UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.m_other_modes.en_tlut << 1) | (UINT32) object.m_other_modes.tlut_type; #define TRELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7); - Color t0; + color_t t0; INT32 sss1 = SSS; INT32 maxs; @@ -392,23 +389,22 @@ void N64TexturePipeT::CycleNearestLerp(Color* TEX, Color* prev, INT32 SSS, INT32 SHIFT_CYCLE(sst1, maxt, tilenum, t); sst1 = TRELATIVE(sst1, tile.tl); - ClampCycleLight(&sss1, &sst1, maxs, maxt, tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); - Mask(&sss1, &sst1, tilenum, object); + clamp_cycle_light(&sss1, &sst1, maxs, maxt, tilenum, userdata, object, m_clamp_s_diff, m_clamp_t_diff); + mask(&sss1, &sst1, tilenum, object); UINT32 tbase = tile.tmem + ((tile.line * sst1) & 0x1ff); - (*TEX).c = ((this)->*(TexelFetch[index]))(sss1, sst1, tbase, tpal, userdata); + (*TEX).c = ((this)->*(m_texel_fetch[index]))(sss1, sst1, tbase, tpal, userdata); } -void N64TexturePipeT::CycleLinear(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::cycle_linear(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; - const N64Tile& tile = tiles[tilenum]; + const n64_tile_t* tiles = object.m_tiles; + const n64_tile_t& tile = tiles[tilenum]; #define TRELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7); - int convert = object.OtherModes.convert_one && cycle; - UINT32 tpal = tile.palette; - UINT32 index = (tile.format << 4) | (tile.size << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type; + const UINT32 tpal = tile.palette; + const UINT32 index = (tile.format << 4) | (tile.size << 2) | ((UINT32) object.m_other_modes.en_tlut << 1) | (UINT32) object.m_other_modes.tlut_type; INT32 invsf = 0; INT32 sss1 = SSS; @@ -446,17 +442,17 @@ void N64TexturePipeT::CycleLinear(Color* TEX, Color* prev, INT32 SSS, INT32 SST, sfrac <<= 3; tfrac <<= 3; - Color t0; - t0.c = ((this)->*(TexelFetch[index]))(sss1, sst1, tbase, tpal, userdata); - INT32 newk0 = SIGN9(m_rdp->GetK0()); - INT32 newk1 = SIGN9(m_rdp->GetK1()); - INT32 newk2 = SIGN9(m_rdp->GetK2()); - INT32 newk3 = SIGN9(m_rdp->GetK3()); - INT32 invk0 = ~newk0; - INT32 invk1 = ~newk1; - INT32 invk2 = ~newk2; - INT32 invk3 = ~newk3; - if (convert) + color_t t0; + t0.c = ((this)->*(m_texel_fetch[index]))(sss1, sst1, tbase, tpal, userdata); + const INT32 newk0 = SIGN9(m_rdp->get_k0()); + const INT32 newk1 = SIGN9(m_rdp->get_k1()); + const INT32 newk2 = SIGN9(m_rdp->get_k2()); + const INT32 newk3 = SIGN9(m_rdp->get_k3()); + const INT32 invk0 = ~newk0; + const INT32 invk1 = ~newk1; + const INT32 invk2 = ~newk2; + const INT32 invk3 = ~newk3; + if (object.m_other_modes.convert_one && cycle) { t0 = *prev; } @@ -471,16 +467,14 @@ void N64TexturePipeT::CycleLinear(Color* TEX, Color* prev, INT32 SSS, INT32 SST, TEX->i.a &= 0x1ff; } -void N64TexturePipeT::CycleLinearLerp(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::cycle_linear_lerp(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; - const N64Tile& tile = tiles[tilenum]; + const n64_tile_t* tiles = object.m_tiles; + const n64_tile_t& tile = tiles[tilenum]; #define TRELATIVE(x, y) ((((x) >> 3) - (y)) << 3) | (x & 7); UINT32 tpal = tile.palette; - UINT32 index = (tile.format << 4) | (tile.size << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type; - - int center = 0; + UINT32 index = (tile.format << 4) | (tile.size << 2) | ((UINT32) object.m_other_modes.en_tlut << 1) | (UINT32) object.m_other_modes.tlut_type; INT32 invsf = 0; INT32 sss1 = SSS; @@ -516,21 +510,21 @@ void N64TexturePipeT::CycleLinearLerp(Color* TEX, Color* prev, INT32 SSS, INT32 invtf <<= 3; } - center = (sfrac == 0x10) && (tfrac == 0x10) && object.OtherModes.mid_texel; + INT32 center = (sfrac == 0x10) && (tfrac == 0x10) && object.m_other_modes.mid_texel; sfrac <<= 3; tfrac <<= 3; - Color t1; - Color t2; - t1.c = ((this)->*(TexelFetch[index]))(sss2, sst1, tbase1, tpal, userdata); - t2.c = ((this)->*(TexelFetch[index]))(sss1, sst2, tbase2, tpal, userdata); + color_t t1; + color_t t2; + t1.c = ((this)->*(m_texel_fetch[index]))(sss2, sst1, tbase1, tpal, userdata); + t2.c = ((this)->*(m_texel_fetch[index]))(sss1, sst2, tbase2, tpal, userdata); if (!center) { if (upper) { - Color t3; - t3.c = ((this)->*(TexelFetch[index]))(sss2, sst2, tbase2, tpal, userdata); + color_t t3; + t3.c = ((this)->*(m_texel_fetch[index]))(sss2, sst2, tbase2, tpal, userdata); TEX->i.r = t3.i.r + (((invsf * (t2.i.r - t3.i.r)) + (invtf * (t1.i.r - t3.i.r)) + 0x80) >> 8); TEX->i.g = t3.i.g + (((invsf * (t2.i.g - t3.i.g)) + (invtf * (t1.i.g - t3.i.g)) + 0x80) >> 8); TEX->i.b = t3.i.b + (((invsf * (t2.i.b - t3.i.b)) + (invtf * (t1.i.b - t3.i.b)) + 0x80) >> 8); @@ -538,8 +532,8 @@ void N64TexturePipeT::CycleLinearLerp(Color* TEX, Color* prev, INT32 SSS, INT32 } else { - Color t0; - t0.c = ((this)->*(TexelFetch[index]))(sss1, sst1, tbase1, tpal, userdata); + color_t t0; + t0.c = ((this)->*(m_texel_fetch[index]))(sss1, sst1, tbase1, tpal, userdata); TEX->i.r = t0.i.r + (((sfrac * (t1.i.r - t0.i.r)) + (tfrac * (t2.i.r - t0.i.r)) + 0x80) >> 8); TEX->i.g = t0.i.g + (((sfrac * (t1.i.g - t0.i.g)) + (tfrac * (t2.i.g - t0.i.g)) + 0x80) >> 8); TEX->i.b = t0.i.b + (((sfrac * (t1.i.b - t0.i.b)) + (tfrac * (t2.i.b - t0.i.b)) + 0x80) >> 8); @@ -552,10 +546,10 @@ void N64TexturePipeT::CycleLinearLerp(Color* TEX, Color* prev, INT32 SSS, INT32 } else { - Color t0; - Color t3; - t0.c = ((this)->*(TexelFetch[index]))(sss1, sst1, 1, tpal, userdata); - t3.c = ((this)->*(TexelFetch[index]))(sss2, sst2, tbase2, tpal, userdata); + color_t t0; + color_t t3; + t0.c = ((this)->*(m_texel_fetch[index]))(sss1, sst1, 1, tpal, userdata); + t3.c = ((this)->*(m_texel_fetch[index]))(sss2, sst2, tbase2, tpal, userdata); TEX->i.r = (t0.i.r + t1.i.r + t2.i.r + t3.i.r) >> 2; TEX->i.g = (t0.i.g + t1.i.g + t2.i.g + t3.i.g) >> 2; TEX->i.b = (t0.i.b + t1.i.b + t2.i.b + t3.i.b) >> 2; @@ -563,41 +557,41 @@ void N64TexturePipeT::CycleLinearLerp(Color* TEX, Color* prev, INT32 SSS, INT32 } } -void N64TexturePipeT::Copy(Color* TEX, INT32 SSS, INT32 SST, UINT32 tilenum, const rdp_poly_state& object, rdp_span_aux *userdata) +void n64_texture_pipe_t::copy(color_t* TEX, INT32 SSS, INT32 SST, UINT32 tilenum, const rdp_poly_state& object, rdp_span_aux* userdata) { - const N64Tile* tiles = object.m_tiles; - const N64Tile& tile = tiles[tilenum]; + const n64_tile_t* tiles = object.m_tiles; + const n64_tile_t& tile = tiles[tilenum]; INT32 sss1 = SSS; INT32 sst1 = SST; - ShiftCopy(&sss1, &sst1, tilenum, object); + shift_copy(&sss1, &sst1, tilenum, object); sss1 = TRELATIVE(sss1, tile.sl); sst1 = TRELATIVE(sst1, tile.tl); sss1 = (SIGN17(sss1) >> 5) & 0x1fff; sst1 = (SIGN17(sst1) >> 5) & 0x1fff; - Mask(&sss1, &sst1, tilenum, object); - TEX->c = Fetch(sss1, sst1, tilenum, object, userdata); + mask(&sss1, &sst1, tilenum, object); + TEX->c = fetch(sss1, sst1, tilenum, object, userdata); } -void N64TexturePipeT::LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, rdp_span_aux *userdata, const rdp_poly_state& object) +void n64_texture_pipe_t::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) { - INT32 nextsw = (w + dwinc) >> 16; + const INT32 nextsw = (w + dwinc) >> 16; INT32 nexts = (s + dsinc) >> 16; INT32 nextt = (t + dtinc) >> 16; - if (object.OtherModes.persp_tex_en) + if (object.m_other_modes.persp_tex_en) { - m_rdp->TCDiv(nexts, nextt, nextsw, &nexts, &nextt); + m_rdp->tc_div(nexts, nextt, nextsw, &nexts, &nextt); } else { - m_rdp->TCDivNoPersp(nexts, nextt, nextsw, &nexts, &nextt); + m_rdp->tc_div_no_perspective(nexts, nextt, nextsw, &nexts, &nextt); } userdata->m_start_span = false; userdata->m_precomp_s = nexts; userdata->m_precomp_t = nextt; - INT32 lodclamp = (((*sst & 0x60000) > 0) | ((nextt & 0x60000) > 0)) || (((*sss & 0x60000) > 0) | ((nexts & 0x60000) > 0)); + const INT32 lodclamp = (((*sst & 0x60000) > 0) | ((nextt & 0x60000) > 0)) || (((*sss & 0x60000) > 0) | ((nexts & 0x60000) > 0)); INT32 horstep = SIGN17(nexts & 0x1ffff) - SIGN17(*sss & 0x1ffff); INT32 vertstep = SIGN17(nextt & 0x1ffff) - SIGN17(*sst & 0x1ffff); @@ -612,7 +606,6 @@ void N64TexturePipeT::LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 INT32 lod = (horstep >= vertstep) ? horstep : vertstep; - int tempanded; if (*sss & 0x40000) { *sss = 0x7fff; @@ -623,7 +616,7 @@ void N64TexturePipeT::LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 } else { - tempanded = *sss & 0x18000; + INT32 tempanded = *sss & 0x18000; if (tempanded == 0x8000) { *sss = 0x7fff; @@ -648,7 +641,7 @@ void N64TexturePipeT::LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 } else { - tempanded = *sst & 0x18000; + INT32 tempanded = *sst & 0x18000; if (tempanded == 0x8000) { *sst = 0x7fff; @@ -667,55 +660,55 @@ void N64TexturePipeT::LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 { lod = 0x7fff; } - else if (lod < object.MiscState.MinLevel) + else if (lod < object.m_misc_state.m_min_level) { - lod = object.MiscState.MinLevel; + lod = object.m_misc_state.m_min_level; } - bool magnify = (lod < 32); - INT32 l_tile = m_rdp->GetLog2((lod >> 5) & 0xff); - bool distant = ((lod & 0x6000) || (l_tile >= object.MiscState.MaxLevel)); + INT32 l_tile = m_rdp->get_log2((lod >> 5) & 0xff); + const bool magnify = (lod < 32); + const bool distant = ((lod & 0x6000) || (l_tile >= object.m_misc_state.m_max_level)); - userdata->LODFraction = ((lod << 3) >> l_tile) & 0xff; + userdata->m_lod_fraction = ((lod << 3) >> l_tile) & 0xff; - if(!object.OtherModes.sharpen_tex_en && !object.OtherModes.detail_tex_en) + if(!object.m_other_modes.sharpen_tex_en && !object.m_other_modes.detail_tex_en) { if (distant) { - userdata->LODFraction = 0xff; + userdata->m_lod_fraction = 0xff; } else if (magnify) { - userdata->LODFraction = 0; + userdata->m_lod_fraction = 0; } } - if(object.OtherModes.sharpen_tex_en && magnify) + if(object.m_other_modes.sharpen_tex_en && magnify) { - userdata->LODFraction |= 0x100; + userdata->m_lod_fraction |= 0x100; } } -void N64TexturePipeT::LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, INT32 prim_tile, INT32* t1, INT32* t2, rdp_span_aux *userdata, const rdp_poly_state& object) +void n64_texture_pipe_t::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) { - INT32 nextsw = (w + dwinc) >> 16; + const INT32 nextsw = (w + dwinc) >> 16; INT32 nexts = (s + dsinc) >> 16; INT32 nextt = (t + dtinc) >> 16; - if (object.OtherModes.persp_tex_en) + if (object.m_other_modes.persp_tex_en) { - m_rdp->TCDiv(nexts, nextt, nextsw, &nexts, &nextt); + m_rdp->tc_div(nexts, nextt, nextsw, &nexts, &nextt); } else { - m_rdp->TCDivNoPersp(nexts, nextt, nextsw, &nexts, &nextt); + m_rdp->tc_div_no_perspective(nexts, nextt, nextsw, &nexts, &nextt); } userdata->m_start_span = false; userdata->m_precomp_s = nexts; userdata->m_precomp_t = nextt; - INT32 lodclamp = (((*sst & 0x60000) > 0) | ((nextt & 0x60000) > 0)) || (((*sss & 0x60000) > 0) | ((nexts & 0x60000) > 0)); + const INT32 lodclamp = (((*sst & 0x60000) > 0) | ((nextt & 0x60000) > 0)) || (((*sss & 0x60000) > 0) | ((nexts & 0x60000) > 0)); INT32 horstep = SIGN17(nexts & 0x1ffff) - SIGN17(*sss & 0x1ffff); INT32 vertstep = SIGN17(nextt & 0x1ffff) - SIGN17(*sst & 0x1ffff); @@ -730,7 +723,6 @@ void N64TexturePipeT::LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 INT32 lod = (horstep >= vertstep) ? horstep : vertstep; - INT32 temp_anded; if (*sss & 0x40000) { *sss = 0x7fff; @@ -741,7 +733,7 @@ void N64TexturePipeT::LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 } else { - temp_anded = *sss & 0x18000; + INT32 temp_anded = *sss & 0x18000; if (temp_anded == 0x8000) { *sss = 0x7fff; @@ -766,7 +758,7 @@ void N64TexturePipeT::LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 } else { - temp_anded = *sst & 0x18000; + INT32 temp_anded = *sst & 0x18000; if (temp_anded == 0x8000) { *sst = 0x7fff; @@ -785,44 +777,44 @@ void N64TexturePipeT::LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 { lod = 0x7fff; } - else if (lod < object.MiscState.MinLevel) + else if (lod < object.m_misc_state.m_min_level) { - lod = object.MiscState.MinLevel; + lod = object.m_misc_state.m_min_level; } - bool magnify = (lod < 32); - INT32 l_tile = m_rdp->GetLog2((lod >> 5) & 0xff); - bool distant = ((lod & 0x6000) || (l_tile >= object.MiscState.MaxLevel)); + INT32 l_tile = m_rdp->get_log2((lod >> 5) & 0xff); + const bool magnify = (lod < 32); + const bool distant = ((lod & 0x6000) || (l_tile >= object.m_misc_state.m_max_level)); - userdata->LODFraction = ((lod << 3) >> l_tile) & 0xff; + userdata->m_lod_fraction = ((lod << 3) >> l_tile) & 0xff; - if(!object.OtherModes.sharpen_tex_en && !object.OtherModes.detail_tex_en) + if(!object.m_other_modes.sharpen_tex_en && !object.m_other_modes.detail_tex_en) { if (distant) { - userdata->LODFraction = 0xff; + userdata->m_lod_fraction = 0xff; } else if (magnify) { - userdata->LODFraction = 0; + userdata->m_lod_fraction = 0; } } - if(object.OtherModes.sharpen_tex_en && magnify) + if(object.m_other_modes.sharpen_tex_en && magnify) { - userdata->LODFraction |= 0x100; + userdata->m_lod_fraction |= 0x100; } - if (object.OtherModes.tex_lod_en) + if (object.m_other_modes.tex_lod_en) { if (distant) { - l_tile = object.MiscState.MaxLevel; + l_tile = object.m_misc_state.m_max_level; } - if (!object.OtherModes.detail_tex_en) + if (!object.m_other_modes.detail_tex_en) { *t1 = (prim_tile + l_tile) & 7; - if (!(distant || (!object.OtherModes.sharpen_tex_en && magnify))) + if (!(distant || (!object.m_other_modes.sharpen_tex_en && magnify))) { *t2 = (*t1 + 1) & 7; } @@ -854,22 +846,22 @@ void N64TexturePipeT::LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 } } -void N64TexturePipeT::LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, INT32 prim_tile, INT32* t1, const rdp_poly_state& object) +void n64_texture_pipe_t::lod_2cycle_limited(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, const rdp_poly_state& object) { - INT32 nextsw = (w + dwinc) >> 16; + const INT32 nextsw = (w + dwinc) >> 16; INT32 nexts = (s + dsinc) >> 16; INT32 nextt = (t + dtinc) >> 16; - if (object.OtherModes.persp_tex_en) + if (object.m_other_modes.persp_tex_en) { - m_rdp->TCDiv(nexts, nextt, nextsw, &nexts, &nextt); + m_rdp->tc_div(nexts, nextt, nextsw, &nexts, &nextt); } else { - m_rdp->TCDivNoPersp(nexts, nextt, nextsw, &nexts, &nextt); + m_rdp->tc_div_no_perspective(nexts, nextt, nextsw, &nexts, &nextt); } - INT32 lodclamp = (((*sst & 0x60000) > 0) | ((nextt & 0x60000) > 0)) || (((*sss & 0x60000) > 0) | ((nexts & 0x60000) > 0)); + const INT32 lodclamp = (((*sst & 0x60000) > 0) | ((nextt & 0x60000) > 0)) || (((*sss & 0x60000) > 0) | ((nexts & 0x60000) > 0)); INT32 horstep = SIGN17(nexts & 0x1ffff) - SIGN17(*sss & 0x1ffff); INT32 vertstep = SIGN17(nextt & 0x1ffff) - SIGN17(*sst & 0x1ffff); @@ -884,7 +876,6 @@ void N64TexturePipeT::LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 lod = (horstep >= vertstep) ? horstep : vertstep; - INT32 tempanded; if (*sss & 0x40000) { *sss = 0x7fff; @@ -895,7 +886,7 @@ void N64TexturePipeT::LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, } else { - tempanded = *sss & 0x18000; + INT32 tempanded = *sss & 0x18000; if (tempanded == 0x8000) { *sss = 0x7fff; @@ -920,7 +911,7 @@ void N64TexturePipeT::LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, } else { - tempanded = *sst & 0x18000; + INT32 tempanded = *sst & 0x18000; if (tempanded == 0x8000) { *sst = 0x7fff; @@ -939,22 +930,22 @@ void N64TexturePipeT::LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, { lod = 0x7fff; } - else if (lod < object.MiscState.MinLevel) + else if (lod < object.m_misc_state.m_min_level) { - lod = object.MiscState.MinLevel; + lod = object.m_misc_state.m_min_level; } - bool magnify = (lod < 32); - INT32 l_tile = m_rdp->GetLog2((lod >> 5) & 0xff); - bool distant = (lod & 0x6000) || (l_tile >= object.MiscState.MaxLevel); + INT32 l_tile = m_rdp->get_log2((lod >> 5) & 0xff); + const bool magnify = (lod < 32); + const bool distant = (lod & 0x6000) || (l_tile >= object.m_misc_state.m_max_level); - if (object.OtherModes.tex_lod_en) + if (object.m_other_modes.tex_lod_en) { if (distant) { - l_tile = object.MiscState.MaxLevel; + l_tile = object.m_misc_state.m_max_level; } - if (!object.OtherModes.detail_tex_en) + if (!object.m_other_modes.detail_tex_en) { *t1 = (prim_tile + l_tile) & 7; } @@ -973,16 +964,14 @@ void N64TexturePipeT::LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, } } -void N64TexturePipeT::CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff) +void n64_texture_pipe_t::calculate_clamp_diffs(UINT32 prim_tile, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff) { - const N64Tile* tiles = object.m_tiles; - if (object.OtherModes.cycle_type == CYCLE_TYPE_2) + const n64_tile_t* tiles = object.m_tiles; + if (object.m_other_modes.cycle_type == CYCLE_TYPE_2) { - if (object.OtherModes.tex_lod_en) + if (object.m_other_modes.tex_lod_en) { - int start = 0; - int end = 7; - for (; start <= end; start++) + 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); @@ -990,8 +979,8 @@ void N64TexturePipeT::CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userda } else { - int start = prim_tile; - int end = (prim_tile + 1) & 7; + 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); @@ -1010,19 +999,17 @@ void N64TexturePipeT::CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userda static INT32 sTexAddrSwap16[2] = { WORD_ADDR_XOR, WORD_XOR_DWORD_SWAP }; static INT32 sTexAddrSwap8[2] = { BYTE_ADDR_XOR, BYTE_XOR_DWORD_SWAP }; -UINT32 N64TexturePipeT::_FetchRGBA_16_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_rgba16_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - taddr &= 0x7ff; + INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x7ff; UINT16 c = ((UINT16*)userdata->m_tmem)[taddr]; c = ((UINT16*)(userdata->m_tmem + 0x800))[(c >> 8) << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1031,32 +1018,28 @@ UINT32 N64TexturePipeT::_FetchRGBA_16_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 #endif } -UINT32 N64TexturePipeT::_FetchRGBA_16_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_rgba16_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - taddr &= 0x7ff; + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x7ff; UINT16 c = ((UINT16*)userdata->m_tmem)[taddr]; c = ((UINT16*)(userdata->m_tmem + 0x800))[(c >> 8) << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchRGBA_16_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_rgba16_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - taddr &= 0x7ff; + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x7ff; #if USE_64K_LUT - return Expand16To32Table[((UINT16*)userdata->m_tmem)[taddr]]; + return m_expand_16to32_table[((UINT16*)userdata->m_tmem)[taddr]]; #else - UINT16 c = ((UINT16*)userdata->m_tmem)[taddr]; - Color color; + const UINT16 c = ((UINT16*)userdata->m_tmem)[taddr]; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1065,20 +1048,18 @@ UINT32 N64TexturePipeT::_FetchRGBA_16_RAW(INT32 s, INT32 t, INT32 tbase, INT32 t #endif } -UINT32 N64TexturePipeT::_FetchRGBA_32_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_rgba32_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT32 *tc = ((UINT32*)userdata->m_tmem); - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; + const UINT32 *tc = ((UINT32*)userdata->m_tmem); + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x3ff; - taddr &= 0x3ff; UINT32 c = tc[taddr]; c = ((UINT16*)(userdata->m_tmem + 0x800))[(c >> 24) << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1087,32 +1068,27 @@ UINT32 N64TexturePipeT::_FetchRGBA_32_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 #endif } -UINT32 N64TexturePipeT::_FetchRGBA_32_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_rgba32_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT32 *tc = ((UINT32*)userdata->m_tmem); - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; + const UINT32 *tc = ((UINT32*)userdata->m_tmem); + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x3ff; - taddr &= 0x3ff; UINT32 c = tc[taddr]; c = ((UINT16*)(userdata->m_tmem + 0x800))[(c >> 24) << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchRGBA_32_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_rgba32_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - - taddr &= 0x3ff; + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x3ff; UINT32 c = ((UINT16*)userdata->m_tmem)[taddr]; - Color color; + color_t color; color.i.r = (c >> 8) & 0xff; color.i.g = c & 0xff; c = ((UINT16*)userdata->m_tmem)[taddr | 0x400]; @@ -1122,22 +1098,16 @@ UINT32 N64TexturePipeT::_FetchRGBA_32_RAW(INT32 s, INT32 t, INT32 tbase, INT32 t return color.c; } -UINT32 N64TexturePipeT::_FetchNOP(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) { return 0; } +UINT32 n64_texture_pipe_t::fetch_nop(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { return 0; } -UINT32 N64TexturePipeT::_FetchYUV(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_yuv(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT16 *tc = ((UINT16*)userdata->m_tmem); - - int taddr = (tbase << 3) + s; - int taddrlow = taddr >> 1; + const UINT16 *tc = ((UINT16*)userdata->m_tmem); - taddr ^= sTexAddrSwap8[t & 1]; - taddrlow ^= sTexAddrSwap16[t & 1]; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; + const INT32 taddrlow = ((taddr >> 1) ^ sTexAddrSwap16[t & 1]) & 0x3ff; - taddr &= 0x7ff; - taddrlow &= 0x3ff; - - UINT16 c = tc[taddrlow]; + const UINT16 c = tc[taddrlow]; INT32 y = userdata->m_tmem[taddr | 0x800]; INT32 u = c >> 8; @@ -1147,7 +1117,7 @@ UINT32 N64TexturePipeT::_FetchYUV(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp u |= ((u & 0x80) << 1); v |= ((v & 0x80) << 1); - Color color; + color_t color; color.i.r = u; color.i.g = v; color.i.b = y; @@ -1156,21 +1126,18 @@ UINT32 N64TexturePipeT::_FetchYUV(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp return color.c; } -UINT32 N64TexturePipeT::_FetchCI_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ci4_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - taddr &= 0x7ff; - UINT8 p = (s & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; + const UINT8 p = (s & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1179,54 +1146,47 @@ UINT32 N64TexturePipeT::_FetchCI_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tp #endif } -UINT32 N64TexturePipeT::_FetchCI_4_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ci4_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - taddr &= 0x7ff; - UINT8 p = (s & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; + const UINT8 p = (s & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchCI_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ci4_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0xfff; UINT8 p = (s & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); p = (tpal << 4) | p; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = color.i.a = p; return color.c; } -UINT32 N64TexturePipeT::_FetchCI_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ci8_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 p = tc[taddr]; - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; + const UINT8 p = tc[taddr]; + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1235,52 +1195,44 @@ UINT32 N64TexturePipeT::_FetchCI_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tp #endif } -UINT32 N64TexturePipeT::_FetchCI_8_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ci8_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 p = tc[taddr]; - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; + const UINT8 p = tc[taddr]; + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchCI_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ci8_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0xfff; - UINT8 p = tc[taddr]; - - Color color; - color.i.r = color.i.g = color.i.b = color.i.a = p; + color_t color; + color.i.r = color.i.g = color.i.b = color.i.a = tc[taddr]; return color.c; } -UINT32 N64TexturePipeT::_FetchIA_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia4_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 p = ((s) & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; + const UINT8 p = ((s) & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1289,35 +1241,31 @@ UINT32 N64TexturePipeT::_FetchIA_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tp #endif } -UINT32 N64TexturePipeT::_FetchIA_4_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia4_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 p = ((s) & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; + const UINT8 p = ((s) & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | p) << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchIA_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia4_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0xfff; - UINT8 p = ((s) & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); + const UINT8 p = ((s) & 1) ? (tc[taddr] & 0xf) : (tc[taddr] >> 4); UINT8 i = p & 0xe; i = (i << 4) | (i << 1) | (i >> 2); - Color color; + color_t color; color.i.r = i; color.i.g = i; color.i.b = i; @@ -1326,20 +1274,18 @@ UINT32 N64TexturePipeT::_FetchIA_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal return color.c; } -UINT32 N64TexturePipeT::_FetchIA_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia8_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 p = tc[taddr]; - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; + const UINT8 p = tc[taddr]; + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1348,35 +1294,31 @@ UINT32 N64TexturePipeT::_FetchIA_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tp #endif } -UINT32 N64TexturePipeT::_FetchIA_8_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia8_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 p = tc[taddr]; - UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; + const UINT8 p = tc[taddr]; + const UINT16 c = ((UINT16*)(userdata->m_tmem + 0x800))[p << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchIA_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia8_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0xfff; - UINT8 p = tc[taddr]; + const UINT8 p = tc[taddr]; UINT8 i = p & 0xf0; i |= (i >> 4); - Color color; + color_t color; color.i.r = i; color.i.g = i; color.i.b = i; @@ -1385,20 +1327,18 @@ UINT32 N64TexturePipeT::_FetchIA_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal return color.c; } -UINT32 N64TexturePipeT::_FetchIA_16_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia16_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT16 *tc = ((UINT16*)userdata->m_tmem); - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - taddr &= 0x3ff; + const UINT16 *tc = ((UINT16*)userdata->m_tmem); + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x3ff; UINT16 c = tc[taddr]; c = ((UINT16*)(userdata->m_tmem + 0x800))[(c >> 8) << 2]; #if USE_64K_LUT - return Expand16To32Table[c]; + return m_expand_16to32_table[c]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(c); color.i.g = GET_MED_RGBA16_TMEM(c); color.i.b = GET_LOW_RGBA16_TMEM(c); @@ -1407,34 +1347,30 @@ UINT32 N64TexturePipeT::_FetchIA_16_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 t #endif } -UINT32 N64TexturePipeT::_FetchIA_16_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia16_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT16 *tc = ((UINT16*)userdata->m_tmem); - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - taddr &= 0x3ff; + const UINT16 *tc = ((UINT16*)userdata->m_tmem); + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x3ff; UINT16 c = tc[taddr]; c = ((UINT16*)(userdata->m_tmem + 0x800))[(c >> 8) << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (c >> 8) & 0xff; color.i.a = c & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchIA_16_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_ia16_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT16 *tc = ((UINT16*)userdata->m_tmem); - int taddr = (tbase << 2) + s; - taddr ^= sTexAddrSwap16[t & 1]; - taddr &= 0x7ff; + const UINT16 *tc = ((UINT16*)userdata->m_tmem); + const INT32 taddr = (((tbase << 2) + s) ^ sTexAddrSwap16[t & 1]) & 0x7ff; - UINT16 c = tc[taddr]; - UINT8 i = (c >> 8); + const UINT16 c = tc[taddr]; + const UINT8 i = (c >> 8); - Color color; + color_t color; color.i.r = i; color.i.g = i; color.i.b = i; @@ -1443,21 +1379,19 @@ UINT32 N64TexturePipeT::_FetchIA_16_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpa return color.c; } -UINT32 N64TexturePipeT::_FetchI_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_i4_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 byteval = tc[taddr]; - UINT8 c = ((s & 1)) ? (byteval & 0xf) : ((byteval >> 4) & 0xf); - UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | c) << 2]; + const UINT8 byteval = tc[taddr]; + const UINT8 c = ((s & 1)) ? (byteval & 0xf) : ((byteval >> 4) & 0xf); + const UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | c) << 2]; #if USE_64K_LUT - return Expand16To32Table[k]; + return m_expand_16to32_table[k]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(k); color.i.g = GET_MED_RGBA16_TMEM(k); color.i.b = GET_LOW_RGBA16_TMEM(k); @@ -1466,36 +1400,32 @@ UINT32 N64TexturePipeT::_FetchI_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpa #endif } -UINT32 N64TexturePipeT::_FetchI_4_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_i4_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 byteval = tc[taddr]; - UINT8 c = ((s & 1)) ? (byteval & 0xf) : ((byteval >> 4) & 0xf); - UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | c) << 2]; + const UINT8 byteval = tc[taddr]; + const UINT8 c = ((s & 1)) ? (byteval & 0xf) : ((byteval >> 4) & 0xf); + const UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[((tpal << 4) | c) << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (k >> 8) & 0xff; color.i.a = k & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchI_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_i4_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = ((tbase << 4) + s) >> 1; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = ((((tbase << 4) + s) >> 1) ^ sTexAddrSwap8[t & 1]) & 0xfff; - UINT8 byteval = tc[taddr]; + const UINT8 byteval = tc[taddr]; UINT8 c = ((s & 1)) ? (byteval & 0xf) : ((byteval >> 4) & 0xf); c |= (c << 4); - Color color; + color_t color; color.i.r = c; color.i.g = c; color.i.b = c; @@ -1504,20 +1434,18 @@ UINT32 N64TexturePipeT::_FetchI_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, return color.c; } -UINT32 N64TexturePipeT::_FetchI_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_i8_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 c = tc[taddr]; - UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[c << 2]; + const UINT8 c = tc[taddr]; + const UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[c << 2]; #if USE_64K_LUT - return Expand16To32Table[k]; + return m_expand_16to32_table[k]; #else - Color color; + color_t color; color.i.r = GET_HI_RGBA16_TMEM(k); color.i.g = GET_MED_RGBA16_TMEM(k); color.i.b = GET_LOW_RGBA16_TMEM(k); @@ -1526,33 +1454,29 @@ UINT32 N64TexturePipeT::_FetchI_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpa #endif } -UINT32 N64TexturePipeT::_FetchI_8_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_i8_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0x7ff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0x7ff; - UINT8 c = tc[taddr]; - UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[c << 2]; + const UINT8 c = tc[taddr]; + const UINT16 k = ((UINT16*)(userdata->m_tmem + 0x800))[c << 2]; - Color color; + color_t color; color.i.r = color.i.g = color.i.b = (k >> 8) & 0xff; color.i.a = k & 0xff; return color.c; } -UINT32 N64TexturePipeT::_FetchI_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch_i8_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata) { - UINT8 *tc = userdata->m_tmem; - int taddr = (tbase << 3) + s; - taddr ^= sTexAddrSwap8[t & 1]; - taddr &= 0xfff; + const UINT8 *tc = userdata->m_tmem; + const INT32 taddr = (((tbase << 3) + s) ^ sTexAddrSwap8[t & 1]) & 0xfff; - UINT8 c = tc[taddr]; + const UINT8 c = tc[taddr]; - Color color; + color_t color; color.i.r = c; color.i.g = c; color.i.b = c; @@ -1561,16 +1485,16 @@ UINT32 N64TexturePipeT::_FetchI_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, return color.c; } -UINT32 N64TexturePipeT::Fetch(INT32 s, INT32 t, INT32 tilenum, const rdp_poly_state& object, rdp_span_aux *userdata) +UINT32 n64_texture_pipe_t::fetch(INT32 s, INT32 t, INT32 tilenum, const rdp_poly_state& object, rdp_span_aux* userdata) { - const N64Tile* tiles = object.m_tiles; - const N64Tile& tile = tiles[tilenum]; - UINT32 tformat = tile.format; - UINT32 tsize = tile.size; - UINT32 tpal = tile.palette; - UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type; + const n64_tile_t* tiles = object.m_tiles; + const n64_tile_t& tile = tiles[tilenum]; + const UINT32 tformat = tile.format; + const UINT32 tsize = tile.size; + const UINT32 tpal = tile.palette; + const UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.m_other_modes.en_tlut << 1) | (UINT32) object.m_other_modes.tlut_type; - UINT32 tbase = tile.tmem + ((tile.line * t) & 0x1ff); + const UINT32 tbase = tile.tmem + ((tile.line * t) & 0x1ff); - return ((this)->*(TexelFetch[index]))(s, t, tbase, tpal, userdata); + return ((this)->*(m_texel_fetch[index]))(s, t, tbase, tpal, userdata); } diff --git a/src/mame/video/rdptpipe.h b/src/mame/video/rdptpipe.h index 7a8cc25ccfd..a01f44e8901 100644 --- a/src/mame/video/rdptpipe.h +++ b/src/mame/video/rdptpipe.h @@ -18,19 +18,19 @@ #include "emu.h" -struct OtherModesT; -struct MiscStateT; -class Color; +struct other_modes_t; +struct misc_state_t; +class color_t; struct rdp_span_aux; struct rdp_poly_state; -class N64TexturePipeT +class n64_texture_pipe_t { public: - typedef UINT32 (N64TexturePipeT::*TexelFetcher) (INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - typedef void (N64TexturePipeT::*Cycler) (Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); + typedef UINT32 (n64_texture_pipe_t::*texel_fetcher_t) (INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + typedef void (n64_texture_pipe_t::*texel_cycler_t) (color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); - N64TexturePipeT() + n64_texture_pipe_t() { m_maskbits_table[0] = 0x3ff; for(int i = 1; i < 16; i++) @@ -41,130 +41,129 @@ class N64TexturePipeT for (int idx = 0; idx < 80; idx++) { - TexelFetch[idx] = &N64TexturePipeT::_FetchNOP; + m_texel_fetch[idx] = &n64_texture_pipe_t::fetch_nop; } - TexelFetch[ 8] = &N64TexturePipeT::_FetchRGBA_16_RAW; - TexelFetch[ 9] = &N64TexturePipeT::_FetchRGBA_16_RAW; - TexelFetch[10] = &N64TexturePipeT::_FetchRGBA_16_TLUT0; - TexelFetch[11] = &N64TexturePipeT::_FetchRGBA_16_TLUT1; - TexelFetch[12] = &N64TexturePipeT::_FetchRGBA_32_RAW; - TexelFetch[13] = &N64TexturePipeT::_FetchRGBA_32_RAW; - TexelFetch[14] = &N64TexturePipeT::_FetchRGBA_32_TLUT0; - TexelFetch[15] = &N64TexturePipeT::_FetchRGBA_32_TLUT1; - - TexelFetch[24] = &N64TexturePipeT::_FetchYUV; - TexelFetch[25] = &N64TexturePipeT::_FetchYUV; - TexelFetch[26] = &N64TexturePipeT::_FetchYUV; - TexelFetch[27] = &N64TexturePipeT::_FetchYUV; - - TexelFetch[32] = &N64TexturePipeT::_FetchCI_4_RAW; - TexelFetch[33] = &N64TexturePipeT::_FetchCI_4_RAW; - TexelFetch[34] = &N64TexturePipeT::_FetchCI_4_TLUT0; - TexelFetch[35] = &N64TexturePipeT::_FetchCI_4_TLUT1; - TexelFetch[36] = &N64TexturePipeT::_FetchCI_8_RAW; - TexelFetch[37] = &N64TexturePipeT::_FetchCI_8_RAW; - TexelFetch[38] = &N64TexturePipeT::_FetchCI_8_TLUT0; - TexelFetch[39] = &N64TexturePipeT::_FetchCI_8_TLUT1; - - TexelFetch[48] = &N64TexturePipeT::_FetchIA_4_RAW; - TexelFetch[49] = &N64TexturePipeT::_FetchIA_4_RAW; - TexelFetch[50] = &N64TexturePipeT::_FetchIA_4_TLUT0; - TexelFetch[51] = &N64TexturePipeT::_FetchIA_4_TLUT1; - TexelFetch[52] = &N64TexturePipeT::_FetchIA_8_RAW; - TexelFetch[53] = &N64TexturePipeT::_FetchIA_8_RAW; - TexelFetch[54] = &N64TexturePipeT::_FetchIA_8_TLUT0; - TexelFetch[55] = &N64TexturePipeT::_FetchIA_8_TLUT1; - TexelFetch[56] = &N64TexturePipeT::_FetchIA_16_RAW; - TexelFetch[57] = &N64TexturePipeT::_FetchIA_16_RAW; - TexelFetch[58] = &N64TexturePipeT::_FetchIA_16_TLUT0; - TexelFetch[59] = &N64TexturePipeT::_FetchIA_16_TLUT1; - - TexelFetch[64] = &N64TexturePipeT::_FetchI_4_RAW; - TexelFetch[65] = &N64TexturePipeT::_FetchI_4_RAW; - TexelFetch[66] = &N64TexturePipeT::_FetchI_4_TLUT0; - TexelFetch[67] = &N64TexturePipeT::_FetchI_4_TLUT1; - TexelFetch[68] = &N64TexturePipeT::_FetchI_8_RAW; - TexelFetch[69] = &N64TexturePipeT::_FetchI_8_RAW; - TexelFetch[70] = &N64TexturePipeT::_FetchI_8_TLUT0; - TexelFetch[71] = &N64TexturePipeT::_FetchI_8_TLUT1; - - cycle[0] = &N64TexturePipeT::CycleNearest; - cycle[1] = &N64TexturePipeT::CycleNearestLerp; - cycle[2] = &N64TexturePipeT::CycleLinear; - cycle[3] = &N64TexturePipeT::CycleLinearLerp; + m_texel_fetch[ 8] = &n64_texture_pipe_t::fetch_rgba16_raw; + m_texel_fetch[ 9] = &n64_texture_pipe_t::fetch_rgba16_raw; + m_texel_fetch[10] = &n64_texture_pipe_t::fetch_rgba16_tlut0; + m_texel_fetch[11] = &n64_texture_pipe_t::fetch_rgba16_tlut1; + m_texel_fetch[12] = &n64_texture_pipe_t::fetch_rgba32_raw; + m_texel_fetch[13] = &n64_texture_pipe_t::fetch_rgba32_raw; + m_texel_fetch[14] = &n64_texture_pipe_t::fetch_rgba32_tlut0; + m_texel_fetch[15] = &n64_texture_pipe_t::fetch_rgba32_tlut1; + + m_texel_fetch[24] = &n64_texture_pipe_t::fetch_yuv; + m_texel_fetch[25] = &n64_texture_pipe_t::fetch_yuv; + m_texel_fetch[26] = &n64_texture_pipe_t::fetch_yuv; + m_texel_fetch[27] = &n64_texture_pipe_t::fetch_yuv; + + m_texel_fetch[32] = &n64_texture_pipe_t::fetch_ci4_raw; + m_texel_fetch[33] = &n64_texture_pipe_t::fetch_ci4_raw; + m_texel_fetch[34] = &n64_texture_pipe_t::fetch_ci4_tlut0; + m_texel_fetch[35] = &n64_texture_pipe_t::fetch_ci4_tlut1; + m_texel_fetch[36] = &n64_texture_pipe_t::fetch_ci8_raw; + m_texel_fetch[37] = &n64_texture_pipe_t::fetch_ci8_raw; + m_texel_fetch[38] = &n64_texture_pipe_t::fetch_ci8_tlut0; + m_texel_fetch[39] = &n64_texture_pipe_t::fetch_ci8_tlut1; + + m_texel_fetch[48] = &n64_texture_pipe_t::fetch_ia4_raw; + m_texel_fetch[49] = &n64_texture_pipe_t::fetch_ia4_raw; + m_texel_fetch[50] = &n64_texture_pipe_t::fetch_ia4_tlut0; + m_texel_fetch[51] = &n64_texture_pipe_t::fetch_ia4_tlut1; + m_texel_fetch[52] = &n64_texture_pipe_t::fetch_ia8_raw; + m_texel_fetch[53] = &n64_texture_pipe_t::fetch_ia8_raw; + m_texel_fetch[54] = &n64_texture_pipe_t::fetch_ia8_tlut0; + m_texel_fetch[55] = &n64_texture_pipe_t::fetch_ia8_tlut1; + m_texel_fetch[56] = &n64_texture_pipe_t::fetch_ia16_raw; + m_texel_fetch[57] = &n64_texture_pipe_t::fetch_ia16_raw; + m_texel_fetch[58] = &n64_texture_pipe_t::fetch_ia16_tlut0; + m_texel_fetch[59] = &n64_texture_pipe_t::fetch_ia16_tlut1; + + m_texel_fetch[64] = &n64_texture_pipe_t::fetch_i4_raw; + m_texel_fetch[65] = &n64_texture_pipe_t::fetch_i4_raw; + m_texel_fetch[66] = &n64_texture_pipe_t::fetch_i4_tlut0; + m_texel_fetch[67] = &n64_texture_pipe_t::fetch_i4_tlut1; + m_texel_fetch[68] = &n64_texture_pipe_t::fetch_i8_raw; + m_texel_fetch[69] = &n64_texture_pipe_t::fetch_i8_raw; + m_texel_fetch[70] = &n64_texture_pipe_t::fetch_i8_tlut0; + m_texel_fetch[71] = &n64_texture_pipe_t::fetch_i8_tlut1; + + m_cycle[0] = &n64_texture_pipe_t::cycle_nearest; + m_cycle[1] = &n64_texture_pipe_t::cycle_nearest_lerp; + m_cycle[2] = &n64_texture_pipe_t::cycle_linear; + m_cycle[3] = &n64_texture_pipe_t::cycle_linear_lerp; } - void CycleNearest(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); - void CycleNearestLerp(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); - void CycleLinear(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); - void CycleLinearLerp(Color* TEX, Color* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); + void cycle_nearest(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); + void cycle_nearest_lerp(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); + void cycle_linear(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); + void cycle_linear_lerp(color_t* TEX, color_t* prev, INT32 SSS, INT32 SST, UINT32 tilenum, UINT32 cycle, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); - Cycler cycle[4]; + texel_cycler_t m_cycle[4]; - void Copy(Color* TEX, INT32 SSS, INT32 SST, UINT32 tilenum, const rdp_poly_state& object, rdp_span_aux *userdata); - UINT32 Fetch(INT32 SSS, INT32 SST, INT32 tile, const rdp_poly_state& object, rdp_span_aux *userdata); - void CalculateClampDiffs(UINT32 prim_tile, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); - void LOD1Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, rdp_span_aux *userdata, const rdp_poly_state& object); - void LOD2Cycle(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, INT32 prim_tile, INT32* t1, INT32* t2, rdp_span_aux *userdata, const rdp_poly_state& object); - void LOD2CycleLimited(INT32* sss, INT32* sst, INT32 s, INT32 t, INT32 w, INT32 dsinc, INT32 dtinc, INT32 dwinc, INT32 prim_tile, INT32* t1, const rdp_poly_state& object); + void copy(color_t* TEX, INT32 SSS, INT32 SST, UINT32 tilenum, const rdp_poly_state& object, rdp_span_aux* userdata); + UINT32 fetch(INT32 SSS, INT32 SST, INT32 tile, const rdp_poly_state& object, rdp_span_aux* userdata); + void calculate_clamp_diffs(UINT32 prim_tile, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); + 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); - void SetMachine(running_machine& machine); + void set_machine(running_machine& machine); bool m_start_span; private: - UINT32 Expand16To32Table[0x10000]; - - void Mask(INT32* S, INT32* T, INT32 num, const rdp_poly_state& object); - void MaskCoupled(INT32* S, INT32* S1, INT32* T, INT32* T1, INT32 num, const rdp_poly_state& object); - - void ShiftCycle(INT32* S, INT32* T, INT32* maxs, INT32* maxt, UINT32 num, const rdp_poly_state& object); - void ShiftCopy(INT32* S, INT32* T, UINT32 num, const rdp_poly_state& object); - - void ClampCycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); - void ClampCycleLight(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux *userdata, const rdp_poly_state& object, INT32 *m_clamp_s_diff, INT32 *m_clamp_t_diff); - - UINT32 _FetchNOP(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - - UINT32 _FetchRGBA_16_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchRGBA_16_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchRGBA_16_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchRGBA_32_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchRGBA_32_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchRGBA_32_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - - UINT32 _FetchYUV(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - - UINT32 _FetchCI_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchCI_4_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchCI_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchCI_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchCI_8_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchCI_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - - UINT32 _FetchIA_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_4_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_8_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_16_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_16_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchIA_16_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - - UINT32 _FetchI_4_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchI_4_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchI_4_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchI_8_TLUT0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchI_8_TLUT1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - UINT32 _FetchI_8_RAW(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux *userdata); - - TexelFetcher TexelFetch[16*5]; + void mask(INT32* S, INT32* T, INT32 num, const rdp_poly_state& object); + void mask_coupled(INT32* S, INT32* S1, INT32* T, INT32* T1, INT32 num, const rdp_poly_state& object); + + void shift_cycle(INT32* S, INT32* T, INT32* maxs, INT32* maxt, UINT32 num, const rdp_poly_state& object); + void shift_copy(INT32* S, INT32* T, UINT32 num, const rdp_poly_state& object); + + void clamp_cycle(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, INT32 maxs, INT32 maxt, INT32 num, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); + void clamp_cycle_light(INT32* S, INT32* T, bool maxs, bool maxt, INT32 num, rdp_span_aux* userdata, const rdp_poly_state& object, INT32* m_clamp_s_diff, INT32* m_clamp_t_diff); + + UINT32 fetch_nop(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + + UINT32 fetch_rgba16_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_rgba16_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_rgba16_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_rgba32_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_rgba32_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_rgba32_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + + UINT32 fetch_yuv(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + + UINT32 fetch_ci4_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ci4_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ci4_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ci8_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ci8_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ci8_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + + UINT32 fetch_ia4_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia4_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia4_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia8_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia8_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia8_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia16_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia16_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_ia16_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + + UINT32 fetch_i4_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_i4_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_i4_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_i8_tlut0(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_i8_tlut1(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + UINT32 fetch_i8_raw(INT32 s, INT32 t, INT32 tbase, INT32 tpal, rdp_span_aux* userdata); + + texel_fetcher_t m_texel_fetch[16*5]; n64_rdp* m_rdp; INT32 m_maskbits_table[16]; + UINT32 m_expand_16to32_table[0x10000]; }; #endif // _VIDEO_RDPTEXPIPE_H_ diff --git a/src/mame/video/redclash.c b/src/mame/video/redclash.c index f6df17e21c0..68b6664237c 100644 --- a/src/mame/video/redclash.c +++ b/src/mame/video/redclash.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /*************************************************************************** video.c diff --git a/src/mame/video/renegade.c b/src/mame/video/renegade.c index 963fa433cc5..0fba8eb3c1f 100644 --- a/src/mame/video/renegade.c +++ b/src/mame/video/renegade.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Carlos A. Lozano, Rob Rosenbrock /*************************************************************************** diff --git a/src/mame/video/rocnrope.c b/src/mame/video/rocnrope.c index 9ae601989f7..bf64b8c0d1d 100644 --- a/src/mame/video/rocnrope.c +++ b/src/mame/video/rocnrope.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** video.c diff --git a/src/mame/video/rollrace.c b/src/mame/video/rollrace.c index 5dbbd7b1c4b..b5ea9646761 100644 --- a/src/mame/video/rollrace.c +++ b/src/mame/video/rollrace.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli #include "emu.h" #include "includes/rollrace.h" diff --git a/src/mame/video/rungun.c b/src/mame/video/rungun.c index 9bc28790734..f672a8fddf1 100644 --- a/src/mame/video/rungun.c +++ b/src/mame/video/rungun.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /************************************************************************* Run and Gun diff --git a/src/mame/video/sbugger.c b/src/mame/video/sbugger.c index f4b6215587c..5ba881ff007 100644 --- a/src/mame/video/sbugger.c +++ b/src/mame/video/sbugger.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Space Bugger - Video Hardware */ #include "emu.h" diff --git a/src/mame/video/scotrsht.c b/src/mame/video/scotrsht.c index 7450000b39d..686b676e53b 100644 --- a/src/mame/video/scotrsht.c +++ b/src/mame/video/scotrsht.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, ??? #include "emu.h" #include "includes/scotrsht.h" diff --git a/src/mame/video/sderby.c b/src/mame/video/sderby.c index db89d352058..876236ea70d 100644 --- a/src/mame/video/sderby.c +++ b/src/mame/video/sderby.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Roberto Fresca #include "emu.h" #include "includes/sderby.h" diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c index d3c82560085..833652d1d05 100644 --- a/src/mame/video/segaic16.c +++ b/src/mame/video/segaic16.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Sega 16-bit common hardware diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h index 17fbf6ba74e..4b16754ea6e 100644 --- a/src/mame/video/segaic16.h +++ b/src/mame/video/segaic16.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** Sega 16-bit common hardware diff --git a/src/mame/video/segaic16_road.c b/src/mame/video/segaic16_road.c index 245f76520c5..cb74f3178d7 100644 --- a/src/mame/video/segaic16_road.c +++ b/src/mame/video/segaic16_road.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles #include "emu.h" diff --git a/src/mame/video/segaic16_road.h b/src/mame/video/segaic16_road.h index 512b476c435..5171a8bee17 100644 --- a/src/mame/video/segaic16_road.h +++ b/src/mame/video/segaic16_road.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /* Sega Road Generators */ diff --git a/src/mame/video/segaic24.c b/src/mame/video/segaic24.c index 62c4f406042..9de160f0c4c 100644 --- a/src/mame/video/segaic24.c +++ b/src/mame/video/segaic24.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Sega system24 hardware diff --git a/src/mame/video/segaic24.h b/src/mame/video/segaic24.h index e5ae080238c..aad7aae567d 100644 --- a/src/mame/video/segaic24.h +++ b/src/mame/video/segaic24.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Sega system24 hardware diff --git a/src/mame/video/segas24.c b/src/mame/video/segas24.c index e93abae6368..3a9c0f24a6a 100644 --- a/src/mame/video/segas24.c +++ b/src/mame/video/segas24.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* * Sega System 24 * diff --git a/src/mame/video/seibuspi.c b/src/mame/video/seibuspi.c index 2b3c9b12ccc..96af09eae2d 100644 --- a/src/mame/video/seibuspi.c +++ b/src/mame/video/seibuspi.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ville Linde, hap, ??? +// copyright-holders:Ville Linde, hap, Nicola Salmoria /****************************************************************************** Seibu SPI hardware diff --git a/src/mame/video/seta001.c b/src/mame/video/seta001.c index 596cb2a3d99..f228da92924 100644 --- a/src/mame/video/seta001.c +++ b/src/mame/video/seta001.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood /* emulation of Seta sprite chips X1-001A X1-002A (SDIP64) diff --git a/src/mame/video/seta001.h b/src/mame/video/seta001.h index 577d35018f8..4b09001d56c 100644 --- a/src/mame/video/seta001.h +++ b/src/mame/video/seta001.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia, David Haywood typedef device_delegate<int (UINT16 code, UINT8 color)> gfxbank_cb_delegate; diff --git a/src/mame/video/shadfrce.c b/src/mame/video/shadfrce.c index aa5f3b00a9e..8b68a623b61 100644 --- a/src/mame/video/shadfrce.c +++ b/src/mame/video/shadfrce.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "emu.h" #include "includes/shadfrce.h" diff --git a/src/mame/video/shangkid.c b/src/mame/video/shangkid.c index 92402e9e082..d5066634fb7 100644 --- a/src/mame/video/shangkid.c +++ b/src/mame/video/shangkid.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino /* video/shangkid */ #include "emu.h" diff --git a/src/mame/video/silkroad.c b/src/mame/video/silkroad.c index 1ef10a1fac7..d063628ee24 100644 --- a/src/mame/video/silkroad.c +++ b/src/mame/video/silkroad.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, R. Belmont #include "emu.h" #include "includes/silkroad.h" diff --git a/src/mame/video/simpl156.c b/src/mame/video/simpl156.c index b2e1f67830b..3eff8431aa8 100644 --- a/src/mame/video/simpl156.c +++ b/src/mame/video/simpl156.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Simple 156 based board */ diff --git a/src/mame/video/sknsspr.c b/src/mame/video/sknsspr.c index c4226650d2f..1431edd20bb 100644 --- a/src/mame/video/sknsspr.c +++ b/src/mame/video/sknsspr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Super Kaneko Nova System Sprites "CG24173 6186" & "CG24143 4181" (always used as a pair?) diff --git a/src/mame/video/sknsspr.h b/src/mame/video/sknsspr.h index b90aa167010..0c0050b1a5b 100644 --- a/src/mame/video/sknsspr.h +++ b/src/mame/video/sknsspr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood class sknsspr_device : public device_t, public device_video_interface diff --git a/src/mame/video/skyraid.c b/src/mame/video/skyraid.c index d0fe479d9a9..15fa5102b9d 100644 --- a/src/mame/video/skyraid.c +++ b/src/mame/video/skyraid.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /*************************************************************************** Atari Sky Raider video emulation diff --git a/src/mame/video/snk6502.c b/src/mame/video/snk6502.c index ddf639fff0a..a8164c43dcf 100644 --- a/src/mame/video/snk6502.c +++ b/src/mame/video/snk6502.c @@ -1,8 +1,8 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Dan Boris /*************************************************************************** - video.c + snk6502.c Functions to emulate the video hardware of the machine. @@ -76,26 +76,26 @@ PALETTE_INIT_MEMBER(snk6502_state,snk6502) } } -WRITE8_MEMBER(snk6502_state::snk6502_videoram_w) +WRITE8_MEMBER(snk6502_state::videoram_w) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(snk6502_state::snk6502_videoram2_w) +WRITE8_MEMBER(snk6502_state::videoram2_w) { m_videoram2[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(snk6502_state::snk6502_colorram_w) +WRITE8_MEMBER(snk6502_state::colorram_w) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); m_fg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(snk6502_state::snk6502_charram_w) +WRITE8_MEMBER(snk6502_state::charram_w) { if (m_charram[offset] != data) { @@ -105,25 +105,21 @@ WRITE8_MEMBER(snk6502_state::snk6502_charram_w) } -WRITE8_MEMBER(snk6502_state::snk6502_flipscreen_w) +WRITE8_MEMBER(snk6502_state::flipscreen_w) { - int bank; - /* bits 0-2 select background color */ if (m_backcolor != (data & 7)) { - int i; - m_backcolor = data & 7; - for (i = 0;i < 32;i += 4) + for (int i = 0;i < 32;i += 4) m_palette->set_pen_color(COLOR(1, i), m_palette_val[4 * m_backcolor + 0x20]); } /* bit 3 selects char bank */ - bank = (~data & 0x08) >> 3; + int bank = (~data & 0x08) >> 3; if (m_charbank != bank) { @@ -140,12 +136,12 @@ WRITE8_MEMBER(snk6502_state::snk6502_flipscreen_w) } } -WRITE8_MEMBER(snk6502_state::snk6502_scrollx_w) +WRITE8_MEMBER(snk6502_state::scrollx_w) { m_bg_tilemap->set_scrollx(0, data); } -WRITE8_MEMBER(snk6502_state::snk6502_scrolly_w) +WRITE8_MEMBER(snk6502_state::scrolly_w) { m_bg_tilemap->set_scrolly(0, data); } @@ -175,6 +171,12 @@ VIDEO_START_MEMBER(snk6502_state,snk6502) m_fg_tilemap->set_transparent_pen(0); m_gfxdecode->gfx(0)->set_source(m_charram); + machine().save().register_postload(save_prepost_delegate(FUNC(snk6502_state::postload), this)); +} + +void snk6502_state::postload() +{ + m_gfxdecode->gfx(0)->mark_all_dirty(); } VIDEO_START_MEMBER(snk6502_state,pballoon) @@ -186,7 +188,7 @@ VIDEO_START_MEMBER(snk6502_state,pballoon) } -UINT32 snk6502_state::screen_update_snk6502(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 snk6502_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); @@ -269,11 +271,9 @@ WRITE8_MEMBER(snk6502_state::satansat_backcolor_w) if (m_backcolor != (data & 0x03)) { - int i; - m_backcolor = data & 0x03; - for (i = 0; i < 16; i += 4) + for (int i = 0; i < 16; i += 4) m_palette->set_pen_color(COLOR(1, i), m_palette_val[m_backcolor + 0x10]); } } @@ -302,4 +302,5 @@ VIDEO_START_MEMBER(snk6502_state,satansat) m_fg_tilemap->set_transparent_pen(0); m_gfxdecode->gfx(0)->set_source(m_charram); + machine().save().register_postload(save_prepost_delegate(FUNC(snk6502_state::postload), this)); } diff --git a/src/mame/video/spbactn.c b/src/mame/video/spbactn.c index 21a675d3dec..09af97f44ea 100644 --- a/src/mame/video/spbactn.c +++ b/src/mame/video/spbactn.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Stephh #include "emu.h" diff --git a/src/mame/video/speedspn.c b/src/mame/video/speedspn.c index 0e248a31785..13773039a24 100644 --- a/src/mame/video/speedspn.c +++ b/src/mame/video/speedspn.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Farfetch'd /* Speed Spin video, see driver file for notes */ diff --git a/src/mame/video/splash.c b/src/mame/video/splash.c index 36a20e04f4b..174508cbbc2 100644 --- a/src/mame/video/splash.c +++ b/src/mame/video/splash.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, David Haywood /*************************************************************************** diff --git a/src/mame/video/sprcros2.c b/src/mame/video/sprcros2.c index 4d047dfec35..c1745e0e8e1 100644 --- a/src/mame/video/sprcros2.c +++ b/src/mame/video/sprcros2.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:insideoutboy /* Super Cross II (JPN Ver.) (c)1986 GM Shoji diff --git a/src/mame/video/sprint4.c b/src/mame/video/sprint4.c index cec9f9d8c5f..c0e0745662c 100644 --- a/src/mame/video/sprint4.c +++ b/src/mame/video/sprint4.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Sprint 4 video emulation diff --git a/src/mame/video/sprint8.c b/src/mame/video/sprint8.c index 480bf263005..fdbf0b89a4e 100644 --- a/src/mame/video/sprint8.c +++ b/src/mame/video/sprint8.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Sprint 8 video emulation diff --git a/src/mame/video/sslam.c b/src/mame/video/sslam.c index 5f6fa2849d5..ee9af33bc8c 100644 --- a/src/mame/video/sslam.c +++ b/src/mame/video/sslam.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Pierpaolo Prazzoli +// copyright-holders:Pierpaolo Prazzoli, Quench /* Super Slam - Video Hardware */ #include "emu.h" diff --git a/src/mame/video/sspeedr.c b/src/mame/video/sspeedr.c index 74535f4b166..b715da2834b 100644 --- a/src/mame/video/sspeedr.c +++ b/src/mame/video/sspeedr.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Taito Super Speed Race video emulation diff --git a/src/mame/video/st0020.c b/src/mame/video/st0020.c index 889e1cd4d89..dd570f31e13 100644 --- a/src/mame/video/st0020.c +++ b/src/mame/video/st0020.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia,David Haywood /* ST0020 - Seta Zooming Sprites + Blitter (gdfs also has a tilemap, I don't know if this chip supplies that) diff --git a/src/mame/video/st0020.h b/src/mame/video/st0020.h index b04fa8c4102..af00d3e9f93 100644 --- a/src/mame/video/st0020.h +++ b/src/mame/video/st0020.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Luca Elia,David Haywood diff --git a/src/mame/video/stactics.c b/src/mame/video/stactics.c index f696b847a03..bd130040de6 100644 --- a/src/mame/video/stactics.c +++ b/src/mame/video/stactics.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /**************************************************************************** diff --git a/src/mame/video/starcrus.c b/src/mame/video/starcrus.c index 7607f746fba..ca77db7227b 100644 --- a/src/mame/video/starcrus.c +++ b/src/mame/video/starcrus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Frank Palazzolo /* Ramtek - Star Cruiser */ diff --git a/src/mame/video/starfire.c b/src/mame/video/starfire.c index bd1317f0a24..04583822a33 100644 --- a/src/mame/video/starfire.c +++ b/src/mame/video/starfire.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Daniel Boris, Olivier Galibert, Aaron Giles +// license:BSD-3-Clause +// copyright-holders:Dan Boris, Olivier Galibert, Aaron Giles /*************************************************************************** Star Fire/Fire One system - video hardware diff --git a/src/mame/video/starshp1.c b/src/mame/video/starshp1.c index b8905c3f565..8c04f4841ef 100644 --- a/src/mame/video/starshp1.c +++ b/src/mame/video/starshp1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Frank Palazzolo, Stefan Jokish /*************************************************************************** Atari Starship 1 video emulation diff --git a/src/mame/video/stfight.c b/src/mame/video/stfight.c index 4571f641f09..c5b4d715579 100644 --- a/src/mame/video/stfight.c +++ b/src/mame/video/stfight.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall /*************************************************************************** diff --git a/src/mame/video/stlforce.c b/src/mame/video/stlforce.c index 23875c59a18..b28398657cd 100644 --- a/src/mame/video/stlforce.c +++ b/src/mame/video/stlforce.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* video/stlforce.c - see main driver for other notes */ diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c index 6cca7c9d79a..76c44f2d750 100644 --- a/src/mame/video/suprnova.c +++ b/src/mame/video/suprnova.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Sylvain Glaize /* Super Kaneko Nova System video */ diff --git a/src/mame/video/suprslam.c b/src/mame/video/suprslam.c index 5917dda47a1..53985dabe60 100644 --- a/src/mame/video/suprslam.c +++ b/src/mame/video/suprslam.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Super Slams - video, see notes in driver file */ diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c index a547b1e5052..e2f5f756a46 100644 --- a/src/mame/video/system16.c +++ b/src/mame/video/system16.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Phil Stroffolino, Mirko Buffoni /*************************************************************************** System 16 / 18 bootleg video diff --git a/src/mame/video/tagteam.c b/src/mame/video/tagteam.c index 3711f51d116..6a6f7358d9a 100644 --- a/src/mame/video/tagteam.c +++ b/src/mame/video/tagteam.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Steve Ellenoff, Brad Oliver /*************************************************************************** tagteam.c diff --git a/src/mame/video/taito_helper.c b/src/mame/video/taito_helper.c index 458a82a98f5..db0de6e0b10 100644 --- a/src/mame/video/taito_helper.c +++ b/src/mame/video/taito_helper.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "taito_helper.h" /* These scanline drawing routines, currently used by the pc080sn, tc0080vco, tc0150rod and tc0480scp devices, were lifted from Taito F3: optimise / merge ? */ diff --git a/src/mame/video/taito_helper.h b/src/mame/video/taito_helper.h index cd75946f3a9..9315b0df855 100644 --- a/src/mame/video/taito_helper.h +++ b/src/mame/video/taito_helper.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #pragma once #include "emu.h" diff --git a/src/mame/video/taito_l.c b/src/mame/video/taito_l.c index aba16b91aaa..0dada6add49 100644 --- a/src/mame/video/taito_l.c +++ b/src/mame/video/taito_l.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "includes/taito_l.h" diff --git a/src/mame/video/taito_o.c b/src/mame/video/taito_o.c index 2e8e9f21cb7..2000133f300 100644 --- a/src/mame/video/taito_o.c +++ b/src/mame/video/taito_o.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:LGPL-2.1+ +// copyright-holders:Tomasz Slanina /*************************************************************************** Based on taito_h.c diff --git a/src/mame/video/taitosj.c b/src/mame/video/taitosj.c index fef7a363fe0..4f55cb71631 100644 --- a/src/mame/video/taitosj.c +++ b/src/mame/video/taitosj.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/tank8.c b/src/mame/video/tank8.c index 35849c332c0..e468dadbfd2 100644 --- a/src/mame/video/tank8.c +++ b/src/mame/video/tank8.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Tank 8 video emulation diff --git a/src/mame/video/taotaido.c b/src/mame/video/taotaido.c index 0ede9d54a6e..994174bdbb2 100644 --- a/src/mame/video/taotaido.c +++ b/src/mame/video/taotaido.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Tao Taido Video Hardware */ diff --git a/src/mame/video/tatsumi.c b/src/mame/video/tatsumi.c index b6db8dc37bf..34656f1b9b1 100644 --- a/src/mame/video/tatsumi.c +++ b/src/mame/video/tatsumi.c @@ -607,10 +607,10 @@ static void draw_sprites(running_machine &machine, _BitmapClass &bitmap, const r { double theta = rotate * ((2.0 * M_PI) / 512.0); - int incxx = (int)((float)65536.0 * cos(theta)); - int incxy = (int)((float)65536.0 * -sin(theta)); - int incyx = (int)((float)65536.0 * sin(theta)); - int incyy = (int)((float)65536.0 * cos(theta)); + int incxx = (int)(65536.0 * cos(theta)); + int incxy = (int)(65536.0 * -sin(theta)); + int incyx = (int)(65536.0 * sin(theta)); + int incyy = (int)(65536.0 * cos(theta)); extent_x = extent_x >> 16; extent_y = extent_y >> 16; diff --git a/src/mame/video/taxidriv.c b/src/mame/video/taxidriv.c index b12fe6f8b38..640b1ea530e 100644 --- a/src/mame/video/taxidriv.c +++ b/src/mame/video/taxidriv.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #include "emu.h" #include "includes/taxidriv.h" diff --git a/src/mame/video/tbowl.c b/src/mame/video/tbowl.c index e3ed7212c65..163121e41c5 100644 --- a/src/mame/video/tbowl.c +++ b/src/mame/video/tbowl.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* video/tbowl.c */ diff --git a/src/mame/video/tc0080vco.c b/src/mame/video/tc0080vco.c index 9565f6b478c..97d9e2f3000 100644 --- a/src/mame/video/tc0080vco.c +++ b/src/mame/video/tc0080vco.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito tc0080vco --------- diff --git a/src/mame/video/tc0080vco.h b/src/mame/video/tc0080vco.h index 4952a2f7bdc..f6d3976a4c9 100644 --- a/src/mame/video/tc0080vco.h +++ b/src/mame/video/tc0080vco.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __TC0080VCO_H__ #define __TC0080VCO_H__ diff --git a/src/mame/video/tc0100scn.c b/src/mame/video/tc0100scn.c index 05f2fc2eea0..c7eaaaab84d 100644 --- a/src/mame/video/tc0100scn.c +++ b/src/mame/video/tc0100scn.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0100SCN --------- @@ -446,6 +446,8 @@ void tc0100scn_device::postload() { set_layer_ptrs(); restore_scroll(); + + m_gfxdecode->gfx(m_txnum)->set_source((UINT8 *)m_char_ram); m_tilemap[0][0]->mark_all_dirty(); m_tilemap[1][0]->mark_all_dirty(); diff --git a/src/mame/video/tc0100scn.h b/src/mame/video/tc0100scn.h index 586989bf8d2..8896037752d 100644 --- a/src/mame/video/tc0100scn.h +++ b/src/mame/video/tc0100scn.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __TC0100SCN_H__ #define __TC0100SCN_H__ diff --git a/src/mame/video/tc0110pcr.c b/src/mame/video/tc0110pcr.c index f0cd62ac82d..f3044a6f5fb 100644 --- a/src/mame/video/tc0110pcr.c +++ b/src/mame/video/tc0110pcr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0110PCR --------- diff --git a/src/mame/video/tc0110pcr.h b/src/mame/video/tc0110pcr.h index 1d4b27fe0ef..b64159d6505 100644 --- a/src/mame/video/tc0110pcr.h +++ b/src/mame/video/tc0110pcr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef _TC0110PCR_H_ #define _TC0110PCR_H_ diff --git a/src/mame/video/tc0150rod.c b/src/mame/video/tc0150rod.c index 99162d5abc3..dcaa18c2742 100644 --- a/src/mame/video/tc0150rod.c +++ b/src/mame/video/tc0150rod.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0150ROD --------- diff --git a/src/mame/video/tc0150rod.h b/src/mame/video/tc0150rod.h index e05278a1bae..e5da8ba6476 100644 --- a/src/mame/video/tc0150rod.h +++ b/src/mame/video/tc0150rod.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __TC0150ROD_H__ #define __TC0150ROD_H__ diff --git a/src/mame/video/tc0180vcu.c b/src/mame/video/tc0180vcu.c index 1668793ba4e..563c313a4de 100644 --- a/src/mame/video/tc0180vcu.c +++ b/src/mame/video/tc0180vcu.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0180VCU */ #include "emu.h" diff --git a/src/mame/video/tc0180vcu.h b/src/mame/video/tc0180vcu.h index fa5b243fa3b..330102aab28 100644 --- a/src/mame/video/tc0180vcu.h +++ b/src/mame/video/tc0180vcu.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __TC0180VCU_H__ #define __TC0180VCU_H__ diff --git a/src/mame/video/tc0280grd.c b/src/mame/video/tc0280grd.c index 6204a17476c..09563ca1864 100644 --- a/src/mame/video/tc0280grd.c +++ b/src/mame/video/tc0280grd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0280GRD Taito TC0430GRW diff --git a/src/mame/video/tc0280grd.h b/src/mame/video/tc0280grd.h index 0f80d8fd9e7..bbd4ab5e8b7 100644 --- a/src/mame/video/tc0280grd.h +++ b/src/mame/video/tc0280grd.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __TC0280GRD_H__ #define __TC0280GRD_H__ diff --git a/src/mame/video/tc0360pri.c b/src/mame/video/tc0360pri.c index 8613bf835b4..14307d8a603 100644 --- a/src/mame/video/tc0360pri.c +++ b/src/mame/video/tc0360pri.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0360PRI --------- diff --git a/src/mame/video/tc0360pri.h b/src/mame/video/tc0360pri.h index 0f148c2358c..49b3c7d3e86 100644 --- a/src/mame/video/tc0360pri.h +++ b/src/mame/video/tc0360pri.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef _TC0360PRI_H_ #define _TC0360PRI_H_ diff --git a/src/mame/video/tc0480scp.c b/src/mame/video/tc0480scp.c index a8efdf70ce5..85800fbbff4 100644 --- a/src/mame/video/tc0480scp.c +++ b/src/mame/video/tc0480scp.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /* Taito TC0480SCP --------- diff --git a/src/mame/video/tc0480scp.h b/src/mame/video/tc0480scp.h index 08a3cffab70..337a6725fd8 100644 --- a/src/mame/video/tc0480scp.h +++ b/src/mame/video/tc0480scp.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria #ifndef __TC0480SCP_H__ #define __TC0480SCP_H__ diff --git a/src/mame/video/tecmo_mix.c b/src/mame/video/tecmo_mix.c index 1607e7cce17..72f35d7bdf1 100644 --- a/src/mame/video/tecmo_mix.c +++ b/src/mame/video/tecmo_mix.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood #include "emu.h" #include "tecmo_mix.h" diff --git a/src/mame/video/tecmo_mix.h b/src/mame/video/tecmo_mix.h index 3a980e0cbe7..8c70bef9df2 100644 --- a/src/mame/video/tecmo_mix.h +++ b/src/mame/video/tecmo_mix.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Tecmo Mixer */ diff --git a/src/mame/video/tecmo_spr.c b/src/mame/video/tecmo_spr.c index 20128b70244..04f27bb8252 100644 --- a/src/mame/video/tecmo_spr.c +++ b/src/mame/video/tecmo_spr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Various Tecmo Sprite implementations - the various sprite implementations here are slightly different but can clearly be refactored to use diff --git a/src/mame/video/tecmo_spr.h b/src/mame/video/tecmo_spr.h index 7bbd65805ce..5899eeaf352 100644 --- a/src/mame/video/tecmo_spr.h +++ b/src/mame/video/tecmo_spr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Tecmo Sprites */ diff --git a/src/mame/video/tecmosys.c b/src/mame/video/tecmosys.c index fdbfa7fa389..1c922b79842 100644 --- a/src/mame/video/tecmosys.c +++ b/src/mame/video/tecmosys.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Farfetch,David Haywood,Tomasz Slanina /*************************************************************************** diff --git a/src/mame/video/terracre.c b/src/mame/video/terracre.c index 2ac32612d65..f29525a6312 100644 --- a/src/mame/video/terracre.c +++ b/src/mame/video/terracre.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano /*************************************************************************** diff --git a/src/mame/video/thief.c b/src/mame/video/thief.c index a3fdafb9d36..00862465ae9 100644 --- a/src/mame/video/thief.c +++ b/src/mame/video/thief.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Victor Trucco, Mike Balfour, Phil Stroffolino /* video hardware for Pacific Novelty games: ** Thief/Nato Defense diff --git a/src/mame/video/tia.c b/src/mame/video/tia.c index 122ff311394..d6d08ecfb6d 100644 --- a/src/mame/video/tia.c +++ b/src/mame/video/tia.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:Wilbert Pol,??? +// copyright-holders:Wilbert Pol,Stefan Jokisch /*************************************************************************** Atari TIA video emulation diff --git a/src/mame/video/tia.h b/src/mame/video/tia.h index 4f619ff521c..fd58a3fb905 100644 --- a/src/mame/video/tia.h +++ b/src/mame/video/tia.h @@ -1,5 +1,5 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol,??? +// license:??? +// copyright-holders:Wilbert Pol,Stefan Jokisch #ifndef _VIDEO_TIA_H_ #define _VIDEO_TIA_H_ diff --git a/src/mame/video/tigeroad_spr.c b/src/mame/video/tigeroad_spr.c index c1c656f30f9..95c06e40e12 100644 --- a/src/mame/video/tigeroad_spr.c +++ b/src/mame/video/tigeroad_spr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood /* very simple sprite scheme, used by some Capcom games and hardware cloned from them diff --git a/src/mame/video/tigeroad_spr.h b/src/mame/video/tigeroad_spr.h index 36cffdeaf0a..ddbdb85d18d 100644 --- a/src/mame/video/tigeroad_spr.h +++ b/src/mame/video/tigeroad_spr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood class tigeroad_spr_device : public device_t { diff --git a/src/mame/video/toaplan1.c b/src/mame/video/toaplan1.c index f95232675a1..2363ed2510b 100644 --- a/src/mame/video/toaplan1.c +++ b/src/mame/video/toaplan1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Darren Olafson, Quench /*************************************************************************** diff --git a/src/mame/video/toaplan2.c b/src/mame/video/toaplan2.c index e954ed7698a..b47d98d2015 100644 --- a/src/mame/video/toaplan2.c +++ b/src/mame/video/toaplan2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Quench, Yochizo +// license:BSD-3-Clause +// copyright-holders:Quench, Yochizo, David Haywood /*************************************************************************** Functions to emulate additional video hardware on several Toaplan2 games. diff --git a/src/mame/video/toaplan_scu.c b/src/mame/video/toaplan_scu.c index 3117fb8eb00..0fe17964308 100644 --- a/src/mame/video/toaplan_scu.c +++ b/src/mame/video/toaplan_scu.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Quench /* Toaplan Sprite Controller 'SCU' used by video/twincobr.c (including wardner) and rallybik in toaplan1.c diff --git a/src/mame/video/toaplan_scu.h b/src/mame/video/toaplan_scu.h index d17c33eb306..9cdd1cbd7b6 100644 --- a/src/mame/video/toaplan_scu.h +++ b/src/mame/video/toaplan_scu.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Quench /* toaplan SCU */ diff --git a/src/mame/video/topspeed.c b/src/mame/video/topspeed.c index a1b9837a278..84f7d9d98b4 100644 --- a/src/mame/video/topspeed.c +++ b/src/mame/video/topspeed.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves #include "emu.h" #include "includes/topspeed.h" diff --git a/src/mame/video/trackfld.c b/src/mame/video/trackfld.c index 3904821fb9b..8ea6a3ac327 100644 --- a/src/mame/video/trackfld.c +++ b/src/mame/video/trackfld.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** video.c diff --git a/src/mame/video/triplhnt.c b/src/mame/video/triplhnt.c index 11c4683d919..1d263145202 100644 --- a/src/mame/video/triplhnt.c +++ b/src/mame/video/triplhnt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokish /*************************************************************************** Atari Triple Hunt video emulation diff --git a/src/mame/video/tunhunt.c b/src/mame/video/tunhunt.c index 941f9e46e6b..218849e9f6c 100644 --- a/src/mame/video/tunhunt.c +++ b/src/mame/video/tunhunt.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Owen Rubin,David Haywood /************************************************************************* Atari Tunnel Hunt hardware diff --git a/src/mame/video/turbo.c b/src/mame/video/turbo.c index f53e366b99e..618521951e9 100644 --- a/src/mame/video/turbo.c +++ b/src/mame/video/turbo.c @@ -217,7 +217,7 @@ inline UINT32 turbo_state::sprite_xscale(UINT8 dacinput, double vr1, double vr2, /* compute the control voltage to the VCO */ /* VR1 and VR2 are variable resistors on Turbo, fixed on other boards */ double iref = 5.0 / (1.5e3 + vr2); - double iout = iref * ((float)dacinput / 256.0); + double iout = iref * ((double)dacinput / 256.0); double vref = 5.0 * 1e3 / (3.8e3 + 1e3 + vr1); double vco_cv = (2.2e3 * iout) + vref; diff --git a/src/mame/video/turrett.c b/src/mame/video/turrett.c index e2e9e666906..4751d7a137a 100644 --- a/src/mame/video/turrett.c +++ b/src/mame/video/turrett.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /************************************************************************* Turrett Tower video hardware diff --git a/src/mame/video/twincobr.c b/src/mame/video/twincobr.c index 1016d7fa771..fbac8c6915c 100644 --- a/src/mame/video/twincobr.c +++ b/src/mame/video/twincobr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Quench +// license:BSD-3-Clause +// copyright-holders:Quench, Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/tx1.c b/src/mame/video/tx1.c index b2f701478fb..56a8556f2d9 100644 --- a/src/mame/video/tx1.c +++ b/src/mame/video/tx1.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Bennett +// license:BSD-3-Clause +// copyright-holders:Philip Bennett /*************************************************************************** Tatsumi TX-1/Buggy Boy video hardware diff --git a/src/mame/video/ultratnk.c b/src/mame/video/ultratnk.c index e3529c98e14..5efbf1a4677 100644 --- a/src/mame/video/ultratnk.c +++ b/src/mame/video/ultratnk.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Phil Stroffolino, Stefan Jokisch /*************************************************************************** Atari Ultra Tank video emulation diff --git a/src/mame/video/usgames.c b/src/mame/video/usgames.c index 452f06d325f..c3170d49b57 100644 --- a/src/mame/video/usgames.c +++ b/src/mame/video/usgames.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood, Nicola Salmoria #include "emu.h" #include "includes/usgames.h" diff --git a/src/mame/video/vectrex.c b/src/mame/video/vectrex.c index a1af3e15667..fd857fe8993 100644 --- a/src/mame/video/vectrex.c +++ b/src/mame/video/vectrex.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer #include <math.h> #include "emu.h" diff --git a/src/mame/video/vertigo.c b/src/mame/video/vertigo.c index 5cfe012ea6c..3064d040e2d 100644 --- a/src/mame/video/vertigo.c +++ b/src/mame/video/vertigo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mathis Rosenhauer /************************************************************************* diff --git a/src/mame/video/vicdual.c b/src/mame/video/vicdual.c index 7900dffacf6..58e38a6cd6b 100644 --- a/src/mame/video/vicdual.c +++ b/src/mame/video/vicdual.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Zsolt Vasvari /*************************************************************************** VIC Dual Game board diff --git a/src/mame/video/videopin.c b/src/mame/video/videopin.c index af125d6616f..00503d1aa5c 100644 --- a/src/mame/video/videopin.c +++ b/src/mame/video/videopin.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sebastien Monassa /************************************************************************* diff --git a/src/mame/video/volfied.c b/src/mame/video/volfied.c index b35d89a8161..3bf38ccd55f 100644 --- a/src/mame/video/volfied.c +++ b/src/mame/video/volfied.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Nicola Salmoria #include "emu.h" #include "includes/volfied.h" diff --git a/src/mame/video/vrender0.h b/src/mame/video/vrender0.h index 42c4b211d57..2b1a4028d7a 100644 --- a/src/mame/video/vrender0.h +++ b/src/mame/video/vrender0.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:ElSemi #ifndef __VR0VIDEO_H__ #define __VR0VIDEO_H__ diff --git a/src/mame/video/vs920a.c b/src/mame/video/vs920a.c index 5a1ff5b9d88..7918de69ecc 100644 --- a/src/mame/video/vs920a.c +++ b/src/mame/video/vs920a.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood // currently used by gstriker.c, apparently inufuku uses the same chip diff --git a/src/mame/video/vs920a.h b/src/mame/video/vs920a.h index 4d5d05d6c66..2605d3a0518 100644 --- a/src/mame/video/vs920a.h +++ b/src/mame/video/vs920a.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:David Haywood class vs920a_text_tilemap_device : public device_t diff --git a/src/mame/video/vsystem_spr.c b/src/mame/video/vsystem_spr.c index ccecae87037..7eb034013e6 100644 --- a/src/mame/video/vsystem_spr.c +++ b/src/mame/video/vsystem_spr.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, David Haywood // Video System Sprites // todo: // update drivers which call multiple priority passes to use the pdrawgfx version (aerofgt, gstriker) diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h index aaadf6385db..e7a098dcd41 100644 --- a/src/mame/video/vsystem_spr.h +++ b/src/mame/video/vsystem_spr.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, David Haywood // Video System Sprites diff --git a/src/mame/video/vsystem_spr2.c b/src/mame/video/vsystem_spr2.c index 789aa51f938..68d1b8ff323 100644 --- a/src/mame/video/vsystem_spr2.c +++ b/src/mame/video/vsystem_spr2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, David Haywood // Video System Sprites (type 2) // todo: // move various vsystem sprite functions here diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h index e1f7a0f1ea2..05701aec981 100644 --- a/src/mame/video/vsystem_spr2.h +++ b/src/mame/video/vsystem_spr2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, David Haywood // Video System Sprites typedef device_delegate<UINT32 (UINT32)> vsystem_tile2_indirection_delegate; diff --git a/src/mame/video/warpwarp.c b/src/mame/video/warpwarp.c index a675f9c8200..09a3b089bf0 100644 --- a/src/mame/video/warpwarp.c +++ b/src/mame/video/warpwarp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Chris Hardy /*************************************************************************** video.c diff --git a/src/mame/video/welltris.c b/src/mame/video/welltris.c index 3e4a5104194..850ce04fdda 100644 --- a/src/mame/video/welltris.c +++ b/src/mame/video/welltris.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "emu.h" #include "includes/welltris.h" diff --git a/src/mame/video/wgp.c b/src/mame/video/wgp.c index d272a4a79e3..602f2150af1 100644 --- a/src/mame/video/wgp.c +++ b/src/mame/video/wgp.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:David Graves #include "emu.h" #include "includes/wgp.h" diff --git a/src/mame/video/wolfpack.c b/src/mame/video/wolfpack.c index fd70b145787..33e26e690e4 100644 --- a/src/mame/video/wolfpack.c +++ b/src/mame/video/wolfpack.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:??? +// copyright-holders:Stefan Jokisch /*************************************************************************** Atari Wolf Pack (prototype) video emulation diff --git a/src/mame/video/wpc_dmd.c b/src/mame/video/wpc_dmd.c index 3ec978cd4e2..0383bfe7dde 100644 --- a/src/mame/video/wpc_dmd.c +++ b/src/mame/video/wpc_dmd.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "wpc_dmd.h" diff --git a/src/mame/video/wrally.c b/src/mame/video/wrally.c index 4048fe3031b..b9677cdf7b0 100644 --- a/src/mame/video/wrally.c +++ b/src/mame/video/wrally.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Manuel Abadia, Mike Coates, Nicola Salmoria, Miguel Andel Horna /*************************************************************************** diff --git a/src/mame/video/wwfsstar.c b/src/mame/video/wwfsstar.c index 848ed49379b..97d2ce891c0 100644 --- a/src/mame/video/wwfsstar.c +++ b/src/mame/video/wwfsstar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /******************************************************************************* WWF Superstars (C) 1989 Technos Japan (video/wwfsstar.c) diff --git a/src/mame/video/xain.c b/src/mame/video/xain.c index c50a729011a..21da90085f2 100644 --- a/src/mame/video/xain.c +++ b/src/mame/video/xain.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino /*************************************************************************** diff --git a/src/mame/video/xevious.c b/src/mame/video/xevious.c index fffbf440c92..1f18a4b44bd 100644 --- a/src/mame/video/xevious.c +++ b/src/mame/video/xevious.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** video.c diff --git a/src/mame/video/xexex.c b/src/mame/video/xexex.c index 509c63be9af..8ea0566d0e4 100644 --- a/src/mame/video/xexex.c +++ b/src/mame/video/xexex.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert #include "emu.h" #include "includes/xexex.h" diff --git a/src/mame/video/xyonix.c b/src/mame/video/xyonix.c index 7f0a7fbe7d1..9e994ff4dff 100644 --- a/src/mame/video/xyonix.c +++ b/src/mame/video/xyonix.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood, Stephh #include "emu.h" #include "includes/xyonix.h" diff --git a/src/mame/video/ygv608.c b/src/mame/video/ygv608.c index 3f5f7141bec..a4784c21b56 100644 --- a/src/mame/video/ygv608.c +++ b/src/mame/video/ygv608.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall /* diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h index f46e4b81aa2..54899d3e4d0 100644 --- a/src/mame/video/ygv608.h +++ b/src/mame/video/ygv608.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mark McDougall #ifndef __YGV608_H__ #define __YGV608_H__ diff --git a/src/mame/video/zac2650.c b/src/mame/video/zac2650.c index 9b65a1a40e9..2c87569b253 100644 --- a/src/mame/video/zac2650.c +++ b/src/mame/video/zac2650.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Coates /*************************************************************/ /* */ diff --git a/src/mame/video/zaxxon.c b/src/mame/video/zaxxon.c index 72b81ba47b8..13023e67b54 100644 --- a/src/mame/video/zaxxon.c +++ b/src/mame/video/zaxxon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:??? +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria /*************************************************************************** Sega Zaxxon hardware diff --git a/src/mess/audio/vboy.c b/src/mess/audio/vboy.c index 32933a5f005..b808ee8a333 100644 --- a/src/mess/audio/vboy.c +++ b/src/mess/audio/vboy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont /* vboy.c - Virtual Boy audio emulation @@ -213,11 +213,11 @@ void vboysnd_device::device_start() m_stream = machine().sound().stream_alloc(*this, 0, 2, AUDIO_FREQ); for (i=0; i<2048; i++) - waveFreq2LenTbl[i] = AUDIO_FREQ / (5000000.0/(float)((2048-i) * 32)); + waveFreq2LenTbl[i] = AUDIO_FREQ / (5000000.0f/(float)((2048-i) * 32)); for (i=0; i<32; i++) - waveTimer2LenTbl[i] = ((0.00384*(float)(i+1)) * (float)AUDIO_FREQ); + waveTimer2LenTbl[i] = ((0.00384f*(float)(i+1)) * (float)AUDIO_FREQ); for (i=0; i<8; i++) - waveEnv2LenTbl[i] = ((0.01536*(float)(i+1)) * (float)AUDIO_FREQ); + waveEnv2LenTbl[i] = ((0.01536f*(float)(i+1)) * (float)AUDIO_FREQ); for (i = 0; i < 5; i++) memset(&snd_channel[i], 0, sizeof(s_snd_channel)); @@ -279,7 +279,7 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t * snd_channel[channel].sample_len = waveFreq2LenTbl[((mgetb(m_aram+SxFQHb+i) & 0x7) << 8) | mgetb(m_aram+SxFQLb+i)]; waveAddr = (mgetb(m_aram + SxRAMb + i) & 0x3) << 7; - size = (float)snd_channel[channel].sample_len / 32.0; + size = (float)snd_channel[channel].sample_len / 32.0f; for (j=0; j<32;) { INT8 byte = mgetb(m_aram + waveAddr + (j++ << 2)) & 0x3f; diff --git a/src/mess/audio/vboy.h b/src/mess/audio/vboy.h index 0015dbbd873..8849ecf292e 100644 --- a/src/mess/audio/vboy.h +++ b/src/mess/audio/vboy.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:R. Belmont /* vboy.h - Virtual Boy audio emulation diff --git a/src/mess/drivers/abc80x.c b/src/mess/drivers/abc80x.c index 6b517180b30..75cc73a29fe 100644 --- a/src/mess/drivers/abc80x.c +++ b/src/mess/drivers/abc80x.c @@ -137,6 +137,16 @@ Notes: */ +/* + + TODO: + + - cassette + - abc806 RTC + - abc806 disks except ufd631 won't boot + +*/ + #include "includes/abc80x.h" @@ -1628,4 +1638,4 @@ DRIVER_INIT_MEMBER(abc806_state,driver_init) COMP( 1981, abc800c, 0, 0, abc800c, abc800, abc800c_state, driver_init, "Luxor Datorer AB", "ABC 800 C/HR", GAME_SUPPORTS_SAVE ) COMP( 1981, abc800m, abc800c, 0, abc800m, abc800, abc800m_state, driver_init, "Luxor Datorer AB", "ABC 800 M/HR", GAME_SUPPORTS_SAVE ) COMP( 1983, abc802, 0, 0, abc802, abc802, abc802_state, driver_init, "Luxor Datorer AB", "ABC 802", GAME_SUPPORTS_SAVE ) -COMP( 1983, abc806, 0, 0, abc806, abc806, abc806_state, driver_init, "Luxor Datorer AB", "ABC 806", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS ) +COMP( 1983, abc806, 0, 0, abc806, abc806, abc806_state, driver_init, "Luxor Datorer AB", "ABC 806", GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c index 737d727da94..1ab281a4c46 100644 --- a/src/mess/drivers/amstrad.c +++ b/src/mess/drivers/amstrad.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker, Barry Rodewald /****************************************************************************** diff --git a/src/mess/drivers/avigo.c b/src/mess/drivers/avigo.c index 0d207d32651..6f5de43c06b 100644 --- a/src/mess/drivers/avigo.c +++ b/src/mess/drivers/avigo.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /****************************************************************************** diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c index aa1ae726ac3..ca639730143 100644 --- a/src/mess/drivers/bbc.c +++ b/src/mess/drivers/bbc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Gordon Jefferyes, Nigel Barnes /****************************************************************************** BBC Model A,B diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c index 6591a35c37f..1774311a3b7 100644 --- a/src/mess/drivers/c65.c +++ b/src/mess/drivers/c65.c @@ -621,6 +621,9 @@ static MACHINE_CONFIG_START( c65, c65_state ) MCFG_SPEAKER_STANDARD_MONO("mono") // MCFG_SOUND_ADD("aysnd", AY8910, MAIN_CLOCK/4) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) + + // software list + MCFG_SOFTWARE_LIST_ADD("flop_list", "c65_flop") MACHINE_CONFIG_END diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c index 168fdb15208..23f62221c77 100644 --- a/src/mess/drivers/cgenie.c +++ b/src/mess/drivers/cgenie.c @@ -38,28 +38,19 @@ NMI #include "sound/dac.h" #include "formats/cgen_cas.h" #include "machine/ram.h" +#include "bus/cgenie/expansion.h" -static ADDRESS_MAP_START (cgenie_mem, AS_PROGRAM, 8, cgenie_state ) +static ADDRESS_MAP_START( cgenie_mem, AS_PROGRAM, 8, cgenie_state ) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x3fff) AM_ROM // AM_RANGE(0x4000, 0xbfff) AM_RAM // set up in MACHINE_START -// AM_RANGE(0xc000, 0xdfff) AM_ROM // installed in cgenie_init_machine -// AM_RANGE(0xe000, 0xefff) AM_ROM // installed in cgenie_init_machine AM_RANGE(0xf000, 0xf3ff) AM_READWRITE(cgenie_colorram_r, cgenie_colorram_w ) AM_SHARE("colorram") AM_RANGE(0xf400, 0xf7ff) AM_READWRITE(cgenie_fontram_r, cgenie_fontram_w) AM_SHARE("fontram") AM_RANGE(0xf800, 0xf8ff) AM_READ(cgenie_keyboard_r ) - AM_RANGE(0xf900, 0xffdf) AM_NOP - AM_RANGE(0xffe0, 0xffe3) AM_READWRITE(cgenie_irq_status_r, cgenie_motor_w ) - AM_RANGE(0xffe4, 0xffeb) AM_NOP - AM_RANGE(0xffec, 0xffec) AM_READWRITE(cgenie_status_r, cgenie_command_w ) - AM_RANGE(0xffe4, 0xffeb) AM_NOP - AM_RANGE(0xffec, 0xffec) AM_WRITE(cgenie_command_w ) - AM_RANGE(0xffed, 0xffed) AM_READWRITE(cgenie_track_r, cgenie_track_w ) - AM_RANGE(0xffee, 0xffee) AM_READWRITE(cgenie_sector_r, cgenie_sector_w ) - AM_RANGE(0xffef, 0xffef) AM_READWRITE(cgenie_data_r, cgenie_data_w ) - AM_RANGE(0xfff0, 0xffff) AM_NOP + AM_RANGE(0xffe0, 0xffe3) AM_READ(cgenie_irq_status_r) ADDRESS_MAP_END -static ADDRESS_MAP_START (cgenie_io, AS_IO, 8, cgenie_state ) +static ADDRESS_MAP_START( cgenie_io, AS_IO, 8, cgenie_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0xf8, 0xf8) AM_READWRITE(cgenie_sh_control_port_r, cgenie_sh_control_port_w ) AM_RANGE(0xf9, 0xf9) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) @@ -70,19 +61,10 @@ ADDRESS_MAP_END static INPUT_PORTS_START( cgenie ) PORT_START("DSW0") - PORT_DIPNAME( 0x80, 0x80, "Floppy Disc Drives") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "CG-DOS ROM C000-DFFF") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, "Extension E000-EFFF") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPNAME( 0x10, 0x10, "Video Display accuracy") PORT_CODE(KEYCODE_F5) PORT_TOGGLE PORT_DIPSETTING( 0x10, "TV set" ) PORT_DIPSETTING( 0x00, "RGB monitor" ) - PORT_BIT(0x0f, 0x0f, IPT_UNUSED) + PORT_BIT(0xef, 0xef, IPT_UNUSED) /************************************************************************** +-------------------------------+ +-------------------------------+ @@ -443,7 +425,7 @@ static const unsigned short cgenie_palette[] = 0, 41, 39, 38, /* TV set graphics colors: a bit brighter */ }; -/* Initialise the palette */ +/* Initialize the palette */ PALETTE_INIT_MEMBER(cgenie_state,cgenie) { UINT8 i, r, g, b; @@ -472,41 +454,6 @@ PALETTE_INIT_MEMBER(cgenie_state,cgenienz) palette.set_pen_indirect(i, cgenie_palette[i]); } -// This is currently broken -static LEGACY_FLOPPY_OPTIONS_START(cgenie ) - LEGACY_FLOPPY_OPTION( cgd, "cgd", "Colour Genie disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([2]) - TRACKS([40]) - SECTORS([10]) - SECTOR_LENGTH([256]) - FIRST_SECTOR_ID([1])) -LEGACY_FLOPPY_OPTIONS_END - -static const floppy_interface cgenie_floppy_interface = -{ - FLOPPY_STANDARD_5_25_DSHD, - LEGACY_FLOPPY_OPTIONS_NAME(cgenie), - NULL -}; - - -// TODO: investigate this! I think it is some sort of expansion of the DOS cart... -DEVICE_IMAGE_LOAD_MEMBER( cgenie_state, cgenie_cart ) -{ - UINT32 size = m_cart->common_get_size("rom"); - - if (size > 0x1000) - { - image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); - return IMAGE_INIT_FAIL; - } - - m_cart->rom_alloc(0x1000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); - m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); - - return IMAGE_INIT_PASS; -} - static MACHINE_CONFIG_START( cgenie_common, cgenie_state ) /* basic machine hardware */ @@ -549,22 +496,12 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state ) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) MCFG_CASSETTE_INTERFACE("cgenie_cass") - MCFG_DEVICE_ADD("wd179x", FD1793, 0) // TODO confirm type - MCFG_WD17XX_DEFAULT_DRIVE4_TAGS - MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(cgenie_state, cgenie_fdc_intrq_w)) - - MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(cgenie_floppy_interface) - - /* cartridge */ - MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cgenie_cart") - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_LOAD(cgenie_state, cgenie_cart) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list", "cgenie_cart") MCFG_SOFTWARE_LIST_ADD("cass_list", "cgenie_cass") - /* internal ram */ + MCFG_EXPANSION_SLOT_ADD("exp") + MCFG_EXPANSION_SLOT_INT_HANDLER(WRITELINE(cgenie_state, exp_intrq_w)) + + // internal ram MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("16K") MCFG_RAM_EXTRA_OPTIONS("32K") @@ -586,173 +523,31 @@ MACHINE_CONFIG_END ***************************************************************************/ -ROM_START (cgenie) - ROM_REGION(0x13000,"maincpu",0) - ROM_LOAD ("cgenie.rom", 0x00000, 0x4000, CRC(d359ead7) SHA1(d8c2fc389ad38c45fba0ed556a7d91abac5463f4)) - ROM_LOAD ("cgdos.rom", 0x10000, 0x2000, CRC(2a96cf74) SHA1(6dcac110f87897e1ee7521aefbb3d77a14815893)) +ROM_START( cgenie ) + ROM_REGION(0x4000, "maincpu", 0) + ROM_LOAD("cgenie.rom", 0x0000, 0x4000, CRC(d359ead7) SHA1(d8c2fc389ad38c45fba0ed556a7d91abac5463f4)) - ROM_REGION(0x0c00,"gfx1",0) - ROM_LOAD ("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff)) + ROM_REGION(0x0c00, "gfx1", 0) + ROM_LOAD("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff)) /* Empty memory region for the character generator */ - ROM_REGION(0x0800,"gfx2",ROMREGION_ERASEFF) - + ROM_REGION(0x0800, "gfx2", ROMREGION_ERASEFF) ROM_END -ROM_START (cgenienz) - ROM_REGION(0x13000,"maincpu",0) +ROM_START( cgenienz ) + ROM_REGION(0x4000, "maincpu", 0) ROM_SYSTEM_BIOS(0, "old", "Old ROM") - ROMX_LOAD( "cg-basic-rom-v1-pal-en.rom", 0x0000, 0x4000, CRC(844aaedd) SHA1(b7f984bc5cd979c7ad11ff909e8134f694aea7aa), ROM_BIOS(1) ) + ROMX_LOAD("cg-basic-rom-v1-pal-en.rom", 0x0000, 0x4000, CRC(844aaedd) SHA1(b7f984bc5cd979c7ad11ff909e8134f694aea7aa), ROM_BIOS(1) ) ROM_SYSTEM_BIOS(1, "new", "New ROM") - ROMX_LOAD( "cgromv2.rom", 0x0000, 0x4000, CRC(cfb84e09) SHA1(e199e4429bab6f9fca2bb05e71324538928a693a), ROM_BIOS(2) ) - ROM_LOAD ("cgdos.rom", 0x10000, 0x2000, CRC(2a96cf74) SHA1(6dcac110f87897e1ee7521aefbb3d77a14815893)) + ROMX_LOAD("cgromv2.rom", 0x0000, 0x4000, CRC(cfb84e09) SHA1(e199e4429bab6f9fca2bb05e71324538928a693a), ROM_BIOS(2) ) - ROM_REGION(0x0c00,"gfx1",0) - ROM_LOAD ("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff)) + ROM_REGION(0x0c00, "gfx1", 0) + ROM_LOAD("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff)) /* Empty memory region for the character generator */ - ROM_REGION(0x0800,"gfx2",ROMREGION_ERASEFF) - + ROM_REGION(0x0800, "gfx2", ROMREGION_ERASEFF) ROM_END -// Code below is previous non-working implementation , just for reference -#if 0 - -#define CGENIE_DRIVE_INFO - - - -// -// abbreviations used: -// GPL Granules Per Lump -// GAT Granule Allocation Table -// GATL GAT Length -// GATM GAT Mask -// DDGA Disk Directory Granule Allocation -struct PDRIVE -{ - UINT8 DDSL; // Disk Directory Start Lump (lump number of GAT) - UINT8 GATL; // # of bytes used in the Granule Allocation Table sector - UINT8 STEPRATE; // step rate and somet SD/DD flag ... - UINT8 TRK; // number of tracks - UINT8 SPT; // sectors per track (both heads counted!) - UINT8 GATM; // number of used bits per byte in the GAT sector (GAT mask) - UINT8 P7; // ???? always zero - UINT8 FLAGS; // ???? some flags (SS/DS bit 6) - UINT8 GPL; // Sectors per granule (always 5 for the Colour Genie) - UINT8 DDGA; // Disk Directory Granule allocation (number of driectory granules) -}; - -static const PDRIVE pd_list[12] = { - {0x14, 0x28, 0x07, 0x28, 0x0A, 0x02, 0x00, 0x00, 0x05, 0x02}, // CMD"<0=A" 40 tracks, SS, SD - {0x14, 0x28, 0x07, 0x28, 0x14, 0x04, 0x00, 0x40, 0x05, 0x04}, // CMD"<0=B" 40 tracks, DS, SD - {0x18, 0x30, 0x53, 0x28, 0x12, 0x03, 0x00, 0x03, 0x05, 0x03}, // CMD"<0=C" 40 tracks, SS, DD - {0x18, 0x30, 0x53, 0x28, 0x24, 0x06, 0x00, 0x43, 0x05, 0x06}, // CMD"<0=D" 40 tracks, DS, DD - {0x14, 0x28, 0x07, 0x28, 0x0A, 0x02, 0x00, 0x04, 0x05, 0x02}, // CMD"<0=E" 40 tracks, SS, SD - {0x14, 0x28, 0x07, 0x28, 0x14, 0x04, 0x00, 0x44, 0x05, 0x04}, // CMD"<0=F" 40 tracks, DS, SD - {0x18, 0x30, 0x53, 0x28, 0x12, 0x03, 0x00, 0x07, 0x05, 0x03}, // CMD"<0=G" 40 tracks, SS, DD - {0x18, 0x30, 0x53, 0x28, 0x24, 0x06, 0x00, 0x47, 0x05, 0x06}, // CMD"<0=H" 40 tracks, DS, DD - {0x28, 0x50, 0x07, 0x50, 0x0A, 0x02, 0x00, 0x00, 0x05, 0x02}, // CMD"<0=I" 80 tracks, SS, SD - {0x28, 0x50, 0x07, 0x50, 0x14, 0x04, 0x00, 0x40, 0x05, 0x04}, // CMD"<0=J" 80 tracks, DS, SD - {0x30, 0x60, 0x53, 0x50, 0x12, 0x03, 0x00, 0x03, 0x05, 0x03}, // CMD"<0=K" 80 tracks, SS, DD - {0x30, 0x60, 0x53, 0x50, 0x24, 0x06, 0x00, 0x43, 0x05, 0x06}, // CMD"<0=L" 80 tracks, DS, DD -}; - -// basic-dsk is a disk image format which has the tracks and sectors -// stored in order, no information is stored which details the number -// of tracks, number of sides, number of sectors etc, so we need to -// set that up here -// -DEVICE_IMAGE_LOAD( cgenie_floppy ) -{ - int i, j, dir_offset; - UINT8 buff[16]; - UINT8 tracks = 0; - UINT8 heads = 0; - UINT8 spt = 0; - short dir_sector = 0; - short dir_length = 0; - - // A Floppy Isnt manditory, so return if none - if (device_load_basicdsk_floppy(image) != IMAGE_INIT_PASS) - return IMAGE_INIT_FAIL; - - // determine image geometry - image.fseek(0, SEEK_SET); - - // determine geometry from disk contents - for( i = 0; i < 12; i++ ) - { - image.fseek(pd_list[i].SPT * 256, SEEK_SET); - image.fread( buff, 16); - // find an entry with matching DDSL - if (buff[0] != 0x00 || buff[1] != 0xfe || buff[2] != pd_list[i].DDSL) - continue; - logerror("cgenie: checking format #%d\n", i); - - dir_sector = pd_list[i].DDSL * pd_list[i].GATM * pd_list[i].GPL + pd_list[i].SPT; - dir_length = pd_list[i].DDGA * pd_list[i].GPL; - - // scan directory for DIR/SYS or NCW1983/JHL files - // look into sector 2 and 3 first entry relative to DDSL - for( j = 16; j < 32; j += 8 ) - { - dir_offset = dir_sector * 256 + j * 32; - if( image.fseek(dir_offset, SEEK_SET) < 0 ) - break; - if( image.fread( buff, 16) != 16 ) - break; - if( !strncmp((char*)buff + 5, "DIR SYS", 11) || - !strncmp((char*)buff + 5, "NCW1983 JHL", 11) ) - { - tracks = pd_list[i].TRK; - heads = (pd_list[i].SPT > 18) ? 2 : 1; - spt = pd_list[i].SPT / heads; - dir_sector = pd_list[i].DDSL * pd_list[i].GATM * pd_list[i].GPL + pd_list[i].SPT; - dir_length = pd_list[i].DDGA * pd_list[i].GPL; - memcpy(memregion("maincpu")->base() + 0x5A71 + floppy_get_drive(image) * sizeof(PDRIVE), &pd_list[i], sizeof(PDRIVE)); - break; - } - } - - logerror("cgenie: geometry %d tracks, %d heads, %d sec/track\n", tracks, heads, spt); - // set geometry so disk image can be read - basicdsk_set_geometry(image, tracks, heads, spt, 256, 0, 0, FALSE); - - logerror("cgenie: directory sectors %d - %d (%d sectors)\n", dir_sector, dir_sector + dir_length - 1, dir_length); - // mark directory sectors with deleted data address mark - // assumption dir_sector is a sector offset - for (j = 0; j < dir_length; j++) - { - UINT8 track; - UINT8 side; - UINT8 sector_id; - UINT16 track_offset; - UINT16 sector_offset; - - // calc sector offset - sector_offset = dir_sector + j; - - // get track offset - track_offset = sector_offset / spt; - - // calc track - track = track_offset / heads; - - // calc side - side = track_offset % heads; - - // calc sector id - first sector id is 0! - sector_id = sector_offset % spt; - - // set deleted data address mark for sector specified - basicdsk_set_ddam(image, track, side, sector_id, 1); - } - - } - return IMAGE_INIT_PASS; -} -#endif /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ COMP( 1982, cgenie, 0, 0, cgenie, cgenie, driver_device, 0, "EACA Computers Ltd", "Colour Genie EG2000" , 0) diff --git a/src/mess/drivers/coleco.c b/src/mess/drivers/coleco.c index f29909a1b9f..f6db761295a 100644 --- a/src/mess/drivers/coleco.c +++ b/src/mess/drivers/coleco.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Balfour, Ben Bruscella, Sean Young /******************************************************************************************************* diff --git a/src/mess/drivers/cybiko.c b/src/mess/drivers/cybiko.c index 600e0e42054..c7352403f5b 100644 --- a/src/mess/drivers/cybiko.c +++ b/src/mess/drivers/cybiko.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /************************************************************************************* diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c index 27af0aebf5e..1b002428d48 100644 --- a/src/mess/drivers/fmtowns.c +++ b/src/mess/drivers/fmtowns.c @@ -2035,9 +2035,9 @@ WRITE8_MEMBER(towns_state::towns_volume_w) case 2: m_towns_volume[m_towns_volume_select] = data; if(m_towns_volume_select == 4) - m_cdda->set_channel_volume(0,100.0 * (data / 64.0f)); + m_cdda->set_channel_volume(0,100.0f * (data / 64.0f)); if(m_towns_volume_select == 5) - m_cdda->set_channel_volume(1,100.0 * (data / 64.0f)); + m_cdda->set_channel_volume(1,100.0f * (data / 64.0f)); break; case 3: // select channel if(data < 8) diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index bd18dfdc7fc..031b9f05e22 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont,Ryan Holtz +// copyright-holders:R. Belmont,Ryan Holtz /*************************************************************************** gba.c diff --git a/src/mess/drivers/gizmondo.c b/src/mess/drivers/gizmondo.c index 535bc533497..09d05d3106d 100644 --- a/src/mess/drivers/gizmondo.c +++ b/src/mess/drivers/gizmondo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/mess/drivers/gp2x.c b/src/mess/drivers/gp2x.c index fbd44684bb2..bf7e93ca44a 100644 --- a/src/mess/drivers/gp2x.c +++ b/src/mess/drivers/gp2x.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /************************************************************************** * * gp2x.c - Game Park Holdings GP2X diff --git a/src/mess/drivers/gp32.c b/src/mess/drivers/gp32.c index dcd6e3c23dc..d864d490c1b 100644 --- a/src/mess/drivers/gp32.c +++ b/src/mess/drivers/gp32.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /************************************************************************** * diff --git a/src/mess/drivers/hec2hrp.c b/src/mess/drivers/hec2hrp.c index 9f79d7fcae4..0dc0547ad13 100644 --- a/src/mess/drivers/hec2hrp.c +++ b/src/mess/drivers/hec2hrp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:JJ Stacino /*************************************************************************** diff --git a/src/mess/drivers/hh_cop400.c b/src/mess/drivers/hh_cop400.c index 9efd573f13f..210b95a4db5 100644 --- a/src/mess/drivers/hh_cop400.c +++ b/src/mess/drivers/hh_cop400.c @@ -19,6 +19,7 @@ // internal artwork #include "einvaderc.lh" // test-layout(but still playable) #include "funjacks.lh" +#include "funrlgl.lh" #include "lightfgt.lh" // clickable //#include "hh_cop400_test.lh" // common test-layout - use external artwork @@ -229,6 +230,53 @@ UINT8 hh_cop400_state::read_inputs(int columns) /*************************************************************************** + Castle Toy Einstein + * COP421 MCU labeled ~/927 COP421-NEZ/N + * 4 lamps, 1bit sound + +***************************************************************************/ + +class ctstein_state : public hh_cop400_state +{ +public: + ctstein_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_cop400_state(mconfig, type, tag) + { } +}; + +// handlers + +//.. + + +// config + +static INPUT_PORTS_START( ctstein ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( ctstein, ctstein_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", COP421, 1000000) // approximation - RC osc. R=12K to +6V, C=100pf to GND + MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED) // guessed + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_DEFAULT_LAYOUT(layout_ctstein) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Entex Space Invader * COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A) * 3 7seg LEDs, LED matrix and overlay mask, 1bit sound @@ -309,7 +357,7 @@ WRITE8_MEMBER(einvaderc_state::write_l) // config static INPUT_PORTS_START( einvaderc ) - PORT_START("IN.0") + PORT_START("IN.0") // port IN PORT_CONFNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_CONFSETTING( 0x01, "Amateur" ) PORT_CONFSETTING( 0x00, "Professional" ) @@ -373,12 +421,12 @@ WRITE8_MEMBER(funjacks_state::write_d) { // D: led grid + input mux m_d = m_inp_mux = data ^ 0xf; - display_matrix(2, 4, m_l, m_d ); + display_matrix(2, 4, m_l, m_d); } WRITE8_MEMBER(funjacks_state::write_l) { - // L01: led state + // L0,L1: led state m_l = data & 3; display_matrix(2, 4, m_l, m_d); } @@ -392,14 +440,14 @@ WRITE8_MEMBER(funjacks_state::write_g) READ8_MEMBER(funjacks_state::read_l) { - // L45: multiplexed inputs + // L4,L5: multiplexed inputs return read_inputs(3) & 0x30; } READ8_MEMBER(funjacks_state::read_g) { // G1: speaker out state - // G23: inputs + // G2,G3: inputs return m_inp_matrix[3]->read() | (m_g & 2); } @@ -407,15 +455,15 @@ READ8_MEMBER(funjacks_state::read_g) // config static INPUT_PORTS_START( funjacks ) - PORT_START("IN.0") + PORT_START("IN.0") // D0 port G PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_START("IN.1") + PORT_START("IN.1") // D1 port G PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) - PORT_START("IN.2") + PORT_START("IN.2") // D2 port G PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // positioned at 1 o'clock on panel, increment clockwise PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) @@ -456,6 +504,104 @@ MACHINE_CONFIG_END /*************************************************************************** + Mattel Funtronics Red Light Green Light + * COP410L MCU bonded directly to PCB (die labeled COP410L/B NHZ) + * 14 LEDs, 1bit sound + + known releases: + - USA: Funtronics Red Light Green Light + - USA(rerelease): Funtronics Hot Wheels Drag Race + +***************************************************************************/ + +class funrlgl_state : public hh_cop400_state +{ +public: + funrlgl_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_cop400_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER(write_d); + DECLARE_WRITE8_MEMBER(write_l); + DECLARE_WRITE8_MEMBER(write_g); + DECLARE_READ8_MEMBER(read_g); + + DECLARE_INPUT_CHANGED_MEMBER(reset_button); +}; + +// handlers + +WRITE8_MEMBER(funrlgl_state::write_d) +{ + // D: led grid + m_d = data ^ 0xf; + display_matrix(4, 4, m_l, m_d); +} + +WRITE8_MEMBER(funrlgl_state::write_l) +{ + // L0-L3: led state + // L4-L7: N/C + m_l = data & 0xf; + display_matrix(4, 4, m_l, m_d); +} + +WRITE8_MEMBER(funrlgl_state::write_g) +{ + // G3: speaker out + m_speaker->level_w(data >> 3 & 1); +} + + +// config + +static INPUT_PORTS_START( funrlgl ) + PORT_START("IN.0") // port G + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_CONFNAME( 0x04, 0x04, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN.1") // fake + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, funrlgl_state, reset_button, NULL) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(funrlgl_state::reset_button) +{ + // middle button is directly tied to MCU reset pin + m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); +} + + +static MACHINE_CONFIG_START( funrlgl, funrlgl_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", COP410, 2000000) // approximation - RC osc. R=51K, C=91pf + MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED) // guessed + MCFG_COP400_WRITE_D_CB(WRITE8(funrlgl_state, write_d)) + MCFG_COP400_WRITE_L_CB(WRITE8(funrlgl_state, write_l)) + MCFG_COP400_WRITE_G_CB(WRITE8(funrlgl_state, write_g)) + MCFG_COP400_READ_G_CB(IOPORT("IN.0")) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_funrlgl) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Milton Bradley Plus One * COP410L MCU in 8-pin DIP, labeled ~/029 MM 57405 (die labeled COP410L/B NNE) * 4 sensors(1 on each die side), 1bit sound @@ -583,31 +729,31 @@ READ8_MEMBER(lightfgt_state::read_g) // config static INPUT_PORTS_START( lightfgt ) - PORT_START("IN.0") + PORT_START("IN.0") // SO port G PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) // note: button 1 is on the left side from player perspective PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_COCKTAIL - PORT_START("IN.1") + PORT_START("IN.1") // D0 port G PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_COCKTAIL - PORT_START("IN.2") + PORT_START("IN.2") // D1 port G PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_COCKTAIL - PORT_START("IN.3") + PORT_START("IN.3") // D2 port G PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_COCKTAIL - PORT_START("IN.4") + PORT_START("IN.4") // D3 port G PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL @@ -646,6 +792,12 @@ MACHINE_CONFIG_END ***************************************************************************/ +ROM_START( ctstein ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "cop421-nez_n", 0x0000, 0x0400, CRC(16148e03) SHA1(b2b74891d36813d9a1eefd56a925054997c4b7f7) ) // 2nd half empty +ROM_END + + ROM_START( einvaderc ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "copl444-hrz_n_inv_ii", 0x0000, 0x0800, CRC(76400f38) SHA1(0e92ab0517f7b7687293b189d30d57110df20fe0) ) @@ -658,6 +810,12 @@ ROM_START( funjacks ) ROM_END +ROM_START( funrlgl ) + ROM_REGION( 0x0200, "maincpu", 0 ) + ROM_LOAD( "cop410l_b_nhz", 0x0000, 0x0200, CRC(4065c3ce) SHA1(f0bc8125d922949e0d7ab1ba89c805a836d20e09) ) +ROM_END + + ROM_START( plus1 ) ROM_REGION( 0x0200, "maincpu", 0 ) ROM_LOAD( "cop410l_b_nne", 0x0000, 0x0200, BAD_DUMP CRC(8626fdb8) SHA1(fd241b6dde0e4e86b439cb2c5bb3a82fb257d7e1) ) // still need to verify @@ -672,9 +830,12 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) + CONS( 1981, einvaderc, einvader, 0, einvaderc, einvaderc, driver_device, 0, "Entex", "Space Invader (Entex, COP444)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) CONS( 1979, funjacks, 0, 0, funjacks, funjacks, driver_device, 0, "Mattel", "Funtronics Jacks", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) +CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, driver_device, 0, "Mattel", "Funtronics Red Light Green Light", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) CONS( 1980, plus1, 0, 0, plus1, plus1, driver_device, 0, "Milton Bradley", "Plus One", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, driver_device, 0, "Milton Bradley", "Lightfight", GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/hh_hmcs40.c b/src/mess/drivers/hh_hmcs40.c index dd3216e189e..5e3c1c88c1b 100644 --- a/src/mess/drivers/hh_hmcs40.c +++ b/src/mess/drivers/hh_hmcs40.c @@ -28,6 +28,7 @@ @88 HD38800A 1984, Tomy Tron (THN-02) @01 HD38800B 1982, Gakken Crazy Kong + *19 HD38800B 1982, Bandai Zaxxon @23 HD38800B 1982, Tomy Kingman (THF-01II) *24 HD38800B 1982, Actronics(Hanzawa) Wanted G-Man *29 HD38800B 1984, Tomy Portable 6000 Bombman @@ -46,9 +47,13 @@ @45 HD38820A 1982, Coleco Donkey Kong @49 HD38820A 1983, Bandai Zackman @61 HD38820A 1983, Coleco Ms. Pac-Man + *63 HD38820A 1983, Bandai Pengo + *65 HD38820A 1983, Bandai Burger Time @69 HD38820A 1983, Gakken Dig Dug @70 HD38820A 1983, Parker Brothers Q*Bert @85 HD38820A 1984, Bandai Machine Man (PT-438) + *88 HD38820A 1984, Bandai Pair Match (1/2) + *89 HD38820A 1984, Bandai Pair Match (2/2) (* denotes not yet emulated by MESS, @ denotes it's in this driver) diff --git a/src/mess/drivers/hh_melps4.c b/src/mess/drivers/hh_melps4.c new file mode 100644 index 00000000000..737f937b4f8 --- /dev/null +++ b/src/mess/drivers/hh_melps4.c @@ -0,0 +1,273 @@ +// license:BSD-3-Clause +// copyright-holders:hap, Kevin Horton +/*************************************************************************** + + Mitsubishi MELPS 4 MCU tabletops/handhelds or other simple devices, + most of them are VFD electronic games/toys. + +***************************************************************************/ + +#include "emu.h" +#include "cpu/melps4/m58846.h" +#include "sound/speaker.h" + +#include "hh_melps4_test.lh" // common test-layout - use external artwork + + +class hh_melps4_state : public driver_device +{ +public: + hh_melps4_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_inp_matrix(*this, "IN"), + m_speaker(*this, "speaker"), + m_display_wait(33), + m_display_maxy(1), + m_display_maxx(0) + { } + + // devices + required_device<cpu_device> m_maincpu; + optional_ioport_array<2> m_inp_matrix; // max 2 + optional_device<speaker_sound_device> m_speaker; + + // misc common + UINT16 m_inp_mux; // multiplexed inputs mask + + UINT8 read_inputs(int columns); + + // display common + int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) + int m_display_maxy; // display matrix number of rows + int m_display_maxx; // display matrix number of columns (max 31 for now) + + UINT32 m_grid; // VFD current row data + UINT32 m_plate; // VFD current column data + + UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) + UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments + UINT32 m_display_cache[0x20]; // (internal use) + UINT8 m_display_decay[0x20][0x20]; // (internal use) + + TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); + void display_update(); + void set_display_size(int maxx, int maxy); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + +protected: + virtual void machine_start(); + virtual void machine_reset(); +}; + + +// machine start/reset + +void hh_melps4_state::machine_start() +{ + // zerofill + memset(m_display_state, 0, sizeof(m_display_state)); + memset(m_display_cache, ~0, sizeof(m_display_cache)); + memset(m_display_decay, 0, sizeof(m_display_decay)); + memset(m_display_segmask, 0, sizeof(m_display_segmask)); + + m_inp_mux = 0; + m_grid = 0; + m_plate = 0; + + // register for savestates + save_item(NAME(m_display_maxy)); + save_item(NAME(m_display_maxx)); + save_item(NAME(m_display_wait)); + + save_item(NAME(m_display_state)); + /* save_item(NAME(m_display_cache)); */ // don't save! + save_item(NAME(m_display_decay)); + save_item(NAME(m_display_segmask)); + + save_item(NAME(m_inp_mux)); + save_item(NAME(m_grid)); + save_item(NAME(m_plate)); +} + +void hh_melps4_state::machine_reset() +{ +} + + + +/*************************************************************************** + + Helper Functions + +***************************************************************************/ + +// The device may strobe the outputs very fast, it is unnoticeable to the user. +// To prevent flickering here, we need to simulate a decay. + +void hh_melps4_state::display_update() +{ + UINT32 active_state[0x20]; + + for (int y = 0; y < m_display_maxy; y++) + { + active_state[y] = 0; + + for (int x = 0; x <= m_display_maxx; x++) + { + // turn on powered segments + if (m_display_state[y] >> x & 1) + m_display_decay[y][x] = m_display_wait; + + // determine active state + UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0; + active_state[y] |= (ds << x); + } + } + + // on difference, send to output + for (int y = 0; y < m_display_maxy; y++) + if (m_display_cache[y] != active_state[y]) + { + if (m_display_segmask[y] != 0) + output_set_digit_value(y, active_state[y] & m_display_segmask[y]); + + const int mul = (m_display_maxx <= 10) ? 10 : 100; + for (int x = 0; x <= m_display_maxx; x++) + { + int state = active_state[y] >> x & 1; + char buf1[0x10]; // lampyx + char buf2[0x10]; // y.x + + if (x == m_display_maxx) + { + // always-on if selected + sprintf(buf1, "lamp%da", y); + sprintf(buf2, "%d.a", y); + } + else + { + sprintf(buf1, "lamp%d", y * mul + x); + sprintf(buf2, "%d.%d", y, x); + } + output_set_value(buf1, state); + output_set_value(buf2, state); + } + } + + memcpy(m_display_cache, active_state, sizeof(m_display_cache)); +} + +TIMER_DEVICE_CALLBACK_MEMBER(hh_melps4_state::display_decay_tick) +{ + // slowly turn off unpowered segments + for (int y = 0; y < m_display_maxy; y++) + for (int x = 0; x <= m_display_maxx; x++) + if (m_display_decay[y][x] != 0) + m_display_decay[y][x]--; + + display_update(); +} + +void hh_melps4_state::set_display_size(int maxx, int maxy) +{ + m_display_maxx = maxx; + m_display_maxy = maxy; +} + +void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +{ + set_display_size(maxx, maxy); + + // update current state + UINT32 mask = (1 << maxx) - 1; + for (int y = 0; y < maxy; y++) + m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; + + display_update(); +} + + +UINT8 hh_melps4_state::read_inputs(int columns) +{ + UINT8 ret = 0; + + // read selected input rows + for (int i = 0; i < columns; i++) + if (m_inp_mux >> i & 1) + ret |= m_inp_matrix[i]->read(); + + return ret; +} + + + +/*************************************************************************** + + Minidrivers (subclass, I/O, Inputs, Machine Config) + +***************************************************************************/ + +/*************************************************************************** + + Coleco Frogger (manufactured in Japan) + * PCB label Coleco Frogger Code No. 01-81543, KS-003282 Japan + * Mitsubishi M58846-701P MCU + * cyan/red/green VFD display Itron CP5090GLR R1B, with partial color overlay + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class cfrogger_state : public hh_melps4_state +{ +public: + cfrogger_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_melps4_state(mconfig, type, tag) + { } + +}; + +// handlers + + +// config + +static INPUT_PORTS_START( cfrogger ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( cfrogger, cfrogger_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", M58846, XTAL_600kHz) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_melps4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_melps4_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START( cfrogger ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "m58846-701p", 0x0000, 0x1000, CRC(ba52a242) SHA1(7fa53b617f4bb54be32eb209e9b88131e11cb518) ) +ROM_END + + + +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1981, cfrogger, 0, 0, cfrogger, cfrogger, driver_device, 0, "Coleco", "Frogger (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) diff --git a/src/mess/drivers/hh_pic16.c b/src/mess/drivers/hh_pic16.c index fe5bed0aed7..a7542e6d31d 100644 --- a/src/mess/drivers/hh_pic16.c +++ b/src/mess/drivers/hh_pic16.c @@ -10,6 +10,7 @@ ----------------------------------------------------------- @036 1655A 1979, Ideal Maniac *061 1655A 1980, Lakeside Le Boom (have dump) + *094 1655A 1980, GAF Melody Madness (have dump) *110 1650A 1979, Tiger Rocket Pinball *192 1650 19??, (a phone dialer, have dump) *255 1655 19??, (a talking clock, have dump) diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index db75683def6..95544ed7bc8 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -18,16 +18,18 @@ @MP0923 TMS1000 1979, Entex Baseball 2 @MP1030 TMS1100 1980, APF Mathemagician @MP1133 TMS1470 1979, Kosmos Astro - @MP1204 TMS1100 1980, Entex Baseball 3 + @MP1204 TMS1100 1980, Entex Baseball 3 (6007) + *MP1218 TMS1100 1980, Entex Basketball 2 (6010) @MP1211 TMS1100 1980, Entex Space Invader @MP1221 TMS1100 1980, Entex Raise The Devil *MP1296 TMS1100? 1982, Entex Black Knight *MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer @MP1525 TMS1170 1980, Coleco Head to Head Baseball - *MP1604 ? 1981, Hanzawa Twinvader III/Tandy Cosmic Fire Away 3000 + *MP1604 ? 1981, Hanzawa Twinvader III/Tandy Cosmic Fire Away 3000 (? note: VFD-capable) @MP2105 TMS1370 1979, Gakken Poker *MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000 - *MP2788 ? 1980, Bandai Flight Time (? note: VFD-capable) + *MP2726 TMS1040 1979, Tomy Break Up + *MP2788 TMS1040? 1980, Bandai Flight Time (? note: VFD-capable) *MP3208 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750A or B) @MP3226 TMS1000 1978, Milton Bradley Simon (model 4850) *MP3232 TMS1000 1979, Fonas 2-Player Baseball (no "MP" on chip label) @@ -64,7 +66,8 @@ MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.c @MP7334 TMS1400 1981, Coleco Total Control 4 @MP7351 TMS1400CR 1982, Parker Brothers Master Merlin - *MP7573 ? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable) + *MP7551 TMS1670 1980, Entex Color Football 4 (6009) + *MP7573 TMS1670? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable) inconsistent: @@ -3836,7 +3839,7 @@ ROM_END ROM_START( ebball3 ) ROM_REGION( 0x0800, "maincpu", 0 ) - ROM_LOAD( "mp1204", 0x0000, 0x0800, CRC(987a29ba) SHA1(9481ae244152187d85349d1a08e439e798182938) ) + ROM_LOAD( "6007_mp1204", 0x0000, 0x0800, CRC(987a29ba) SHA1(9481ae244152187d85349d1a08e439e798182938) ) ROM_REGION( 867, "maincpu:mpla", 0 ) ROM_LOAD( "tms1100_ebball3_mpla.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) diff --git a/src/mess/drivers/hh_ucom4.c b/src/mess/drivers/hh_ucom4.c index 27fc32a89e9..d0ef6b1e105 100644 --- a/src/mess/drivers/hh_ucom4.c +++ b/src/mess/drivers/hh_ucom4.c @@ -3,7 +3,7 @@ /*************************************************************************** NEC uCOM4 MCU tabletops/handhelds or other simple devices, - most of them are VFD electronic games/toys. + most of them (emulated ones) are VFD electronic games/toys. Commonly used VFD(vacuum fluorescent display) are by NEC or Futaba. @@ -32,6 +32,7 @@ @031 uPD553C 1979, Bambino Superstar Football (ET-03) @049 uPD553C 1979, Mego Mini-Vid Break Free @055 uPD553C 1980, Bambino Space Laser Fight (ET-12) + *073 uPD553C 1980, Sony ST-J75 FM Stereo Tuner @080 uPD553C 1980, Epoch Electronic Football *102 uPD553C 1981, Bandai Block Out @153 uPD553C 1981, Epoch Galaxy II diff --git a/src/mess/drivers/hp16500.c b/src/mess/drivers/hp16500.c index 74a82c632bc..9dcefa85a6e 100644 --- a/src/mess/drivers/hp16500.c +++ b/src/mess/drivers/hp16500.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /*************************************************************************** Hewlett-Packard HP16500a/b/c Logic Analyzer diff --git a/src/mess/drivers/hp49gp.c b/src/mess/drivers/hp49gp.c index 70e5b78bf12..567325c9501 100644 --- a/src/mess/drivers/hp49gp.c +++ b/src/mess/drivers/hp49gp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/mess/drivers/hp9k.c b/src/mess/drivers/hp9k.c index 614575d5161..bfdf79bc122 100644 --- a/src/mess/drivers/hp9k.c +++ b/src/mess/drivers/hp9k.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:fulivi +// license:BSD-3-Clause +// copyright-holders:F. Ulivi /*************************************************************************** diff --git a/src/mess/drivers/imds2.c b/src/mess/drivers/imds2.c index 4e3a705983b..4db7ffd7555 100644 --- a/src/mess/drivers/imds2.c +++ b/src/mess/drivers/imds2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:fulivi +// license:BSD-3-Clause +// copyright-holders:F. Ulivi // // *************************************** // Driver for Intel Intellec MDS series-II diff --git a/src/mess/drivers/interact.c b/src/mess/drivers/interact.c index aa5935a2e1e..893bdf866ba 100644 --- a/src/mess/drivers/interact.c +++ b/src/mess/drivers/interact.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:JJ Stacino /*************************************************************************** diff --git a/src/mess/drivers/itt3030.c b/src/mess/drivers/itt3030.c index 737906c92e9..498a215cc58 100644 --- a/src/mess/drivers/itt3030.c +++ b/src/mess/drivers/itt3030.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:rfka01 +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Olivier Galibert /*************************************************************************** ITT 3030 diff --git a/src/mess/drivers/juicebox.c b/src/mess/drivers/juicebox.c index 288b28b2830..b3a7897080d 100644 --- a/src/mess/drivers/juicebox.c +++ b/src/mess/drivers/juicebox.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/mess/drivers/kc.c b/src/mess/drivers/kc.c index d291c77980e..5cf619f049a 100644 --- a/src/mess/drivers/kc.c +++ b/src/mess/drivers/kc.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /****************************************************************************** diff --git a/src/mess/drivers/macpci.c b/src/mess/drivers/macpci.c index bb8e37fff45..975a514a46b 100644 --- a/src/mess/drivers/macpci.c +++ b/src/mess/drivers/macpci.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /*************************************************************************** macpci.c: second-generation Old World PowerMacs based on PCI instead of NuBus diff --git a/src/mess/drivers/mbc55x.c b/src/mess/drivers/mbc55x.c index 7de30ccfc43..7c3017d0544 100644 --- a/src/mess/drivers/mbc55x.c +++ b/src/mess/drivers/mbc55x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith /* drivers/mbc55x.c diff --git a/src/mess/drivers/mini2440.c b/src/mess/drivers/mini2440.c index e233c8181e4..c9402e57a9c 100644 --- a/src/mess/drivers/mini2440.c +++ b/src/mess/drivers/mini2440.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/mess/drivers/minicom.c b/src/mess/drivers/minicom.c index c1008688c5e..5667e29fdcd 100644 --- a/src/mess/drivers/minicom.c +++ b/src/mess/drivers/minicom.c @@ -244,6 +244,11 @@ ROM_START( minicom ) ROM_LOAD( "ultratec_minicom_iv.rom", 0x0000, 0x2000, CRC(22881366) SHA1(fc3faea5ecc1476e5bcb7999638f3150d06c9a81) ) ROM_END +ROM_START( mcom4_02 ) + ROM_REGION( 0x2000, "maincpu", 0 ) + ROM_LOAD( "ultratec_minicom_iv_20020419.rom", 0x0000, 0x2000, CRC(99b6cc35) SHA1(32577005bf02042f893c8880f8ce5b3d8a5f55f9) ) +ROM_END + /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1997, minicom, 0, 0, minicom, 0, minicom_state, minicom, "Ultratec", "Minicom IV", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND) /* fw release data: 11th Aug 1997 */ -//COMP( 2002, minicom, 0, 0, minicom, 0, minicom_state, minicom, "Ultratec", "Minicom IV", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND) /* fw release data: 19th Apr 2002 - Seen at a subway station in S??o Paulo, Brazil (Metr?? Trianon MASP) */ +COMP( 1997, minicom, 0, 0, minicom, 0, minicom_state, minicom, "Ultratec", "Minicom IV (1997-08-11)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND) /* fw release data: 11th Aug 1997 */ +COMP( 2002, mcom4_02, 0, 0, minicom, 0, minicom_state, minicom, "Ultratec", "Minicom IV (2002-04-19)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND) /* fw release data: 19th Apr 2002 */ diff --git a/src/mess/drivers/monty.c b/src/mess/drivers/monty.c index 9e03dd79e4f..ce4b061b3f4 100644 --- a/src/mess/drivers/monty.c +++ b/src/mess/drivers/monty.c @@ -19,8 +19,8 @@ by adding chips and wires to the inside of the game. TODO: - - Everything - this is just a little better than a skeleton - - Get clock speeds from the dumper + - Input from the keyboard + - Proper SED1503F emulation (it's simulated in-driver for now) ****************************************************************************/ @@ -172,7 +172,7 @@ SED1520_UPDATE_CB(monty_screen_update) // TODO: Additional machine definition - Master Monty has a different memory layout static MACHINE_CONFIG_START( monty, monty_state ) // Basic machine hardware - MCFG_CPU_ADD("maincpu", Z80, 4000000) + MCFG_CPU_ADD("maincpu", Z80, 3580000) // Ceramic resonator labeled 3.58MT MCFG_CPU_PROGRAM_MAP(monty_mem) MCFG_CPU_IO_MAP(monty_io) diff --git a/src/mess/drivers/nascom1.c b/src/mess/drivers/nascom1.c index a0301e1d4e1..446b54fee60 100644 --- a/src/mess/drivers/nascom1.c +++ b/src/mess/drivers/nascom1.c @@ -1,119 +1,399 @@ // license:GPL-2.0+ -// copyright-holders:(Original Author?), Dirk Best -/************************************************************************ - - Nascom 1 and Nascom 2 - - Memory map - - CPU: z80 - 0000-03ff ROM (Nascom1 Monitor) - 0400-07ff ROM (Nascom2 Monitor extension) - 0800-0bff RAM (Screen) - 0c00-0c7f RAM (OS workspace) - 0c80-0cff RAM (extended OS workspace) - 0d00-0f7f RAM (Firmware workspace) - 0f80-0fff RAM (Stack space) - 1000-8fff RAM (User space) - 9000-97ff RAM (Programmable graphics RAM/User space) - 9800-afff RAM (Colour graphics RAM/User space) - b000-b7ff ROM (OS extensions) - b800-bfff ROM (WP/Naspen software) - c000-cfff ROM (Disassembler/colour graphics software) - d000-dfff ROM (Assembler/Basic extensions) - e000-ffff ROM (Nascom2 Basic) - - Interrupts: - - Ports: - OUT (00) 0: Increment keyboard scan - 1: Reset keyboard scan - 2: - 3: Read from cassette - 4: - 5: - 6: - 7: - IN (00) Read keyboard - OUT (01) Write to cassette/serial - IN (01) Read from cassette/serial - OUT (02) Unused - IN (02) ? - - Monitors: - Nasbug1 1K Original Nascom1 - Nasbug2 1K - Nasbug3 Probably non existing - Nasbug4 2K - Nassys1 2K Original Nascom2 - Nassys2 Probably non existing - Nassys3 2K - Nassys4 2K - T4 2K - -************************************************************************/ - -/* Core includes */ -#include "emu.h" -#include "includes/nascom1.h" +// copyright-holders:Dirk Best +/*************************************************************************** + + Nascom 1/2/3 + + Single board computer -/* Components */ +***************************************************************************/ + +#include "emu.h" #include "cpu/z80/z80.h" -#include "machine/wd17xx.h" +#include "machine/ram.h" #include "machine/z80pio.h" - -/* Devices */ -#include "imagedev/flopdrv.h" -#include "formats/basicdsk.h" +#include "machine/ay31015.h" #include "imagedev/cassette.h" -#include "machine/ram.h" +#include "imagedev/snapquik.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" +#include "bus/nasbus/nasbus.h" -/************************************* - * - * Memory maps - * - *************************************/ +//************************************************************************** +// CONSTANTS/MACROS +//************************************************************************** -static ADDRESS_MAP_START( nascom1_mem, AS_PROGRAM, 8, nascom1_state ) - AM_RANGE(0x0000, 0x07ff) AM_ROM - AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM - AM_RANGE(0x1000, 0x13ff) AM_RAM /* 1Kb */ - AM_RANGE(0x1400, 0x4fff) AM_RAM /* 16Kb */ - AM_RANGE(0x5000, 0x8fff) AM_RAM /* 32Kb */ - AM_RANGE(0x9000, 0xafff) AM_RAM /* 40Kb */ - AM_RANGE(0xb000, 0xffff) AM_ROM -ADDRESS_MAP_END +#define NASCOM1_KEY_RESET 0x02 +#define NASCOM1_KEY_INCR 0x01 -static ADDRESS_MAP_START( nascom1_io, AS_IO, 8, nascom1_state ) - ADDRESS_MAP_GLOBAL_MASK(0x0F) - AM_RANGE(0x00, 0x00) AM_READWRITE(nascom1_port_00_r, nascom1_port_00_w) - AM_RANGE(0x01, 0x01) AM_READWRITE(nascom1_port_01_r, nascom1_port_01_w) - AM_RANGE(0x02, 0x02) AM_READ(nascom1_port_02_r) - AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("z80pio", z80pio_device, read, write ) -ADDRESS_MAP_END +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** +struct nascom1_portstat_t +{ + UINT8 stat_flags; + UINT8 stat_count; +}; -static ADDRESS_MAP_START( nascom2_io, AS_IO, 8, nascom1_state ) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READWRITE(nascom1_port_00_r, nascom1_port_00_w) - AM_RANGE(0x01, 0x01) AM_READWRITE(nascom1_port_01_r, nascom1_port_01_w) - AM_RANGE(0x02, 0x02) AM_READ(nascom1_port_02_r) - AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("z80pio", z80pio_device, read, write ) - AM_RANGE(0xe0, 0xe3) AM_DEVREADWRITE("wd1793", fd1793_device, read, write) - AM_RANGE(0xe4, 0xe4) AM_READWRITE(nascom2_fdc_select_r, nascom2_fdc_select_w) - AM_RANGE(0xe5, 0xe5) AM_READ(nascom2_fdc_status_r) -ADDRESS_MAP_END +class nascom_state : public driver_device +{ +public: + nascom_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_hd6402(*this, "hd6402"), + m_cassette(*this, "cassette"), + m_ram(*this, RAM_TAG), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_videoram(*this, "videoram"), + m_keyboard(*this, "KEY") + { } + + required_device<cpu_device> m_maincpu; + required_device<ay31015_device> m_hd6402; + required_device<cassette_image_device> m_cassette; + required_device<ram_device> m_ram; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + required_shared_ptr<UINT8> m_videoram; + required_ioport_array<9> m_keyboard; + + int m_tape_size; + UINT8 *m_tape_image; + int m_tape_index; + nascom1_portstat_t m_portstat; + + DECLARE_READ8_MEMBER(nascom1_port_00_r); + DECLARE_WRITE8_MEMBER(nascom1_port_00_w); + DECLARE_READ8_MEMBER(nascom1_port_01_r); + DECLARE_WRITE8_MEMBER(nascom1_port_01_w); + DECLARE_READ8_MEMBER(nascom1_port_02_r); + virtual DECLARE_DRIVER_INIT(nascom); + void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height); + DECLARE_READ8_MEMBER(nascom1_hd6402_si); + DECLARE_WRITE8_MEMBER(nascom1_hd6402_so); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER( nascom1_cassette ); + DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nascom1_cassette ); + DECLARE_SNAPSHOT_LOAD_MEMBER( nascom1 ); + +protected: + virtual void machine_reset(); + +private: + +}; + +class nascom1_state : public nascom_state +{ +public: + nascom1_state(const machine_config &mconfig, device_type type, const char *tag) : + nascom_state(mconfig, type, tag) + {} + + UINT32 screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +private: +}; + +class nascom2_state : public nascom_state +{ +public: + nascom2_state(const machine_config &mconfig, device_type type, const char *tag) : + nascom_state(mconfig, type, tag), + m_nasbus(*this, "nasbus"), + m_socket1(*this, "socket1"), + m_socket2(*this, "socket2"), + m_lsw1(*this, "lsw1") + {} + + DECLARE_WRITE_LINE_MEMBER(ram_disable_w); + DECLARE_WRITE_LINE_MEMBER(ram_disable_cpm_w); + + virtual DECLARE_DRIVER_INIT(nascom); + virtual DECLARE_DRIVER_INIT(nascomc); + UINT32 screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + int load_cart(device_image_interface &image, generic_slot_device *slot, int slot_id); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket1_load) { return load_cart(image, m_socket1, 1); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket2_load) { return load_cart(image, m_socket2, 2); } + +protected: + virtual void machine_reset(); + +private: + required_device<nasbus_device> m_nasbus; + required_device<generic_slot_device> m_socket1; + required_device<generic_slot_device> m_socket2; + required_ioport m_lsw1; +}; + + +//************************************************************************** +// KEYBOARD +//************************************************************************** + +READ8_MEMBER( nascom_state::nascom1_port_00_r ) +{ + if (m_portstat.stat_count < 9) + return ((m_keyboard[m_portstat.stat_count])->read() | ~0x7f); + + return 0xff; +} + +WRITE8_MEMBER( nascom_state::nascom1_port_00_w ) +{ + m_cassette->change_state( + (data & 0x10) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR); + + if (!(data & NASCOM1_KEY_RESET)) + { + if (m_portstat.stat_flags & NASCOM1_KEY_RESET) + m_portstat.stat_count = 0; + } + else + m_portstat.stat_flags = NASCOM1_KEY_RESET; + + if (!(data & NASCOM1_KEY_INCR)) + { + if (m_portstat.stat_flags & NASCOM1_KEY_INCR) + m_portstat.stat_count++; + } + else + m_portstat.stat_flags = NASCOM1_KEY_INCR; +} + + +//************************************************************************** +// CASSETTE +//************************************************************************** + +READ8_MEMBER( nascom_state::nascom1_port_01_r ) +{ + return m_hd6402->get_received_data(); +} + + +WRITE8_MEMBER( nascom_state::nascom1_port_01_w ) +{ + m_hd6402->set_transmit_data(data); +} + +READ8_MEMBER( nascom_state::nascom1_port_02_r ) +{ + UINT8 data = 0x31; + + m_hd6402->set_input_pin(AY31015_SWE, 0); + data |= m_hd6402->get_output_pin(AY31015_OR ) ? 0x02 : 0; + data |= m_hd6402->get_output_pin(AY31015_PE ) ? 0x04 : 0; + data |= m_hd6402->get_output_pin(AY31015_FE ) ? 0x08 : 0; + data |= m_hd6402->get_output_pin(AY31015_TBMT) ? 0x40 : 0; + data |= m_hd6402->get_output_pin(AY31015_DAV ) ? 0x80 : 0; + m_hd6402->set_input_pin(AY31015_SWE, 1); + + return data; +} +READ8_MEMBER( nascom_state::nascom1_hd6402_si ) +{ + return 1; +} + +WRITE8_MEMBER( nascom_state::nascom1_hd6402_so ) +{ +} + +DEVICE_IMAGE_LOAD_MEMBER( nascom_state, nascom1_cassette ) +{ + m_tape_size = image.length(); + m_tape_image = (UINT8*)image.ptr(); + + if (!m_tape_image) + return IMAGE_INIT_FAIL; + + m_tape_index = 0; + return IMAGE_INIT_PASS; +} + +DEVICE_IMAGE_UNLOAD_MEMBER( nascom_state, nascom1_cassette ) +{ + m_tape_image = NULL; + m_tape_size = m_tape_index = 0; +} -/************************************* - * - * GFX layouts - * - *************************************/ +//************************************************************************** +// SNAPSHOTS +//************************************************************************** + +SNAPSHOT_LOAD_MEMBER( nascom_state, nascom1 ) +{ + UINT8 line[35]; + + while (image.fread( &line, sizeof(line)) == sizeof(line)) + { + int addr, b0, b1, b2, b3, b4, b5, b6, b7, dummy; + + if (sscanf((char *)line, "%x %x %x %x %x %x %x %x %x %x\010\010\n", + &addr, &b0, &b1, &b2, &b3, &b4, &b5, &b6, &b7, &dummy) == 10) + { + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b0); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b1); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b2); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b3); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b4); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b5); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b6); + m_maincpu->space(AS_PROGRAM).write_byte(addr++, b7); + } + } + + return IMAGE_INIT_PASS; +} + + +//************************************************************************** +// SOCKETS +//************************************************************************** + +int nascom2_state::load_cart(device_image_interface &image, generic_slot_device *slot, int slot_id) +{ + // loading directly from file + if (image.software_entry() == NULL) + { + if (slot->length() > 0x1000) + { + image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported file size"); + return IMAGE_INIT_FAIL; + } + + slot->rom_alloc(slot->length(), GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); + slot->fread(slot->get_rom_base(), slot->length()); + + // we just assume that socket1 should be loaded to 0xc000 and socket2 to 0xd000 + switch (slot_id) + { + case 1: + m_maincpu->space(AS_PROGRAM).install_rom(0xc000, 0xc000 + slot->length() - 1, slot->get_rom_base()); + break; + case 2: + m_maincpu->space(AS_PROGRAM).install_rom(0xd000, 0xd000 + slot->length() - 1, slot->get_rom_base()); + break; + } + } + + // loading from software list. this supports multiple regions to load to + else + { + UINT8 *region_b000 = image.get_software_region("b000"); + UINT8 *region_c000 = image.get_software_region("c000"); + UINT8 *region_d000 = image.get_software_region("d000"); + + if (region_b000 != NULL) + { + UINT32 size = image.get_software_region_length("b000"); + m_maincpu->space(AS_PROGRAM).install_rom(0xb000, 0xb000 + size - 1, region_b000); + } + + if (region_c000 != NULL) + { + UINT32 size = image.get_software_region_length("c000"); + m_maincpu->space(AS_PROGRAM).install_rom(0xc000, 0xc000 + size - 1, region_c000); + } + + if (region_d000 != NULL) + { + UINT32 size = image.get_software_region_length("d000"); + m_maincpu->space(AS_PROGRAM).install_rom(0xd000, 0xd000 + size - 1, region_d000); + } + } + + return IMAGE_INIT_PASS; +} + + +//************************************************************************** +// DRIVER INIT +//************************************************************************** + +void nascom_state::machine_reset() +{ + // Set up hd6402 pins + m_hd6402->set_input_pin(AY31015_SWE, 1); + + m_hd6402->set_input_pin(AY31015_CS, 0); + m_hd6402->set_input_pin(AY31015_NP, 1); + m_hd6402->set_input_pin(AY31015_NB1, 1); + m_hd6402->set_input_pin(AY31015_NB2, 1); + m_hd6402->set_input_pin(AY31015_EPS, 1); + m_hd6402->set_input_pin(AY31015_TSB, 1); + m_hd6402->set_input_pin(AY31015_CS, 1); +} + +DRIVER_INIT_MEMBER( nascom_state, nascom ) +{ + // install extra memory + if (m_ram->size() > 0) + { + m_maincpu->space(AS_PROGRAM).install_ram(0x1000, 0x1000 + m_ram->size() - 1, m_ram->pointer()); + } +} + +void nascom2_state::machine_reset() +{ + // base machine reset + nascom_state::machine_reset(); + + // restart address (on the real system, a12 to a15 are forced to 1 for one memory cycle) + m_maincpu->set_state_int(Z80_PC, m_lsw1->read() << 12); +} + +DRIVER_INIT_MEMBER( nascom2_state, nascom ) +{ + nascom_state::init_nascom(); + + // setup nasbus + m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM)); + m_nasbus->set_io_space(&m_maincpu->space(AS_IO)); +} + +// since we don't know for which regions we should disable ram, we just let other devices +// overwrite the region they need, and re-install our ram when they are disabled +WRITE_LINE_MEMBER( nascom2_state::ram_disable_w ) +{ + if (state) + { + // enable ram again + m_maincpu->space(AS_PROGRAM).install_ram(0x1000, 0x1000 + m_ram->size() - 1, m_ram->pointer()); + } +} + +DRIVER_INIT_MEMBER( nascom2_state, nascomc ) +{ + // install memory + m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0000 + m_ram->size() - 1, m_ram->pointer()); + + // setup nasbus + m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM)); + m_nasbus->set_io_space(&m_maincpu->space(AS_IO)); +} + +WRITE_LINE_MEMBER( nascom2_state::ram_disable_cpm_w ) +{ + if (state) + { + // enable ram again + m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0000 + m_ram->size() - 1, m_ram->pointer()); + } +} + + +//************************************************************************** +// VIDEO +//************************************************************************** static const gfx_layout nascom1_charlayout = { @@ -127,11 +407,15 @@ static const gfx_layout nascom1_charlayout = 8 * 16 }; - static GFXDECODE_START( nascom1 ) GFXDECODE_ENTRY("gfx1", 0x0000, nascom1_charlayout, 0, 1) GFXDECODE_END +UINT32 nascom1_state::screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + screen_update(bitmap, cliprect, 16); + return 0; +} static const gfx_layout nascom2_charlayout = { @@ -145,18 +429,76 @@ static const gfx_layout nascom2_charlayout = 8 * 16 }; - static GFXDECODE_START( nascom2 ) GFXDECODE_ENTRY("gfx1", 0x0000, nascom2_charlayout, 0, 1) GFXDECODE_END +UINT32 nascom2_state::screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + screen_update(bitmap, cliprect, 14); + return 0; +} + +void nascom_state::screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height) +{ + for (int sx = 0; sx < 48; sx++) + { + m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, m_videoram[0x03ca + sx], 1, 0, 0, sx * 8, 0); + } + + for (int sy = 0; sy < 15; sy++) + { + for (int sx = 0; sx < 48; sx++) + { + m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, m_videoram[0x000a + (sy * 64) + sx], 1, 0, 0, sx * 8, (sy + 1) * char_height); + } + } +} -/************************************* - * - * Input ports - * - *************************************/ +//************************************************************************** +// ADDRESS MAPS +//************************************************************************** + +static ADDRESS_MAP_START( nascom1_mem, AS_PROGRAM, 8, nascom1_state ) + AM_RANGE(0x0000, 0x07ff) AM_ROM // MONITOR + AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM // WRAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( nascom1_io, AS_IO, 8, nascom1_state ) + ADDRESS_MAP_GLOBAL_MASK(0x0f) + AM_RANGE(0x00, 0x00) AM_READWRITE(nascom1_port_00_r, nascom1_port_00_w) + AM_RANGE(0x01, 0x01) AM_READWRITE(nascom1_port_01_r, nascom1_port_01_w) + AM_RANGE(0x02, 0x02) AM_READ(nascom1_port_02_r) + AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("z80pio", z80pio_device, read, write ) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( nascom2_mem, AS_PROGRAM, 8, nascom2_state ) + AM_RANGE(0x0000, 0x07ff) AM_ROM // MONITOR + AM_RANGE(0x0800, 0x0bff) AM_RAM AM_SHARE("videoram") + AM_RANGE(0x0c00, 0x0fff) AM_RAM // WRAM + AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("basic", 0) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( nascom2_io, AS_IO, 8, nascom2_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x00, 0x00) AM_READWRITE(nascom1_port_00_r, nascom1_port_00_w) + AM_RANGE(0x01, 0x01) AM_READWRITE(nascom1_port_01_r, nascom1_port_01_w) + AM_RANGE(0x02, 0x02) AM_READ(nascom1_port_02_r) + AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("z80pio", z80pio_device, read, write ) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( nascom2c_mem, AS_PROGRAM, 8, nascom2_state ) + AM_RANGE(0xf000, 0xf7ff) AM_ROM AM_REGION("maincpu", 0) + AM_RANGE(0xf800, 0xfbff) AM_RAM AM_SHARE("videoram") + AM_RANGE(0xfc00, 0xffff) AM_RAM // WRAM +ADDRESS_MAP_END + + +//************************************************************************** +// INPUT PORTS +//************************************************************************** static INPUT_PORTS_START( nascom1 ) PORT_START("KEY.0") @@ -246,136 +588,190 @@ static INPUT_PORTS_START( nascom2 ) PORT_MODIFY("KEY.8") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back CS") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(8) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter Escape") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CHAR(27) + + // link switch on board + PORT_START("lsw1") + PORT_DIPNAME(0x0f, 0x00, "Restart address") + PORT_DIPLOCATION("LSW1:2,3,4,5") + PORT_DIPSETTING(0x00, "0000H") + PORT_DIPSETTING(0x01, "1000H") + PORT_DIPSETTING(0x02, "2000H") + PORT_DIPSETTING(0x03, "3000H") + PORT_DIPSETTING(0x04, "4000H") + PORT_DIPSETTING(0x05, "5000H") + PORT_DIPSETTING(0x06, "6000H") + PORT_DIPSETTING(0x07, "7000H") + PORT_DIPSETTING(0x08, "8000H") + PORT_DIPSETTING(0x09, "9000H") + PORT_DIPSETTING(0x0a, "A000H") + PORT_DIPSETTING(0x0b, "B000H") + PORT_DIPSETTING(0x0c, "C000H") + PORT_DIPSETTING(0x0d, "D000H") + PORT_DIPSETTING(0x0e, "E000H") + PORT_DIPSETTING(0x0f, "F000H") +INPUT_PORTS_END + +static INPUT_PORTS_START( nascom2c ) + PORT_INCLUDE(nascom2) + + PORT_MODIFY("lsw1") + PORT_DIPNAME(0x0f, 0x0f, "Restart address") + PORT_DIPLOCATION("LSW1:2,3,4,5") + PORT_DIPSETTING(0x00, "0000H") + PORT_DIPSETTING(0x01, "1000H") + PORT_DIPSETTING(0x02, "2000H") + PORT_DIPSETTING(0x03, "3000H") + PORT_DIPSETTING(0x04, "4000H") + PORT_DIPSETTING(0x05, "5000H") + PORT_DIPSETTING(0x06, "6000H") + PORT_DIPSETTING(0x07, "7000H") + PORT_DIPSETTING(0x08, "8000H") + PORT_DIPSETTING(0x09, "9000H") + PORT_DIPSETTING(0x0a, "A000H") + PORT_DIPSETTING(0x0b, "B000H") + PORT_DIPSETTING(0x0c, "C000H") + PORT_DIPSETTING(0x0d, "D000H") + PORT_DIPSETTING(0x0e, "E000H") + PORT_DIPSETTING(0x0f, "F000H") INPUT_PORTS_END -/************************************* - * - * Machine drivers - * - *************************************/ +//************************************************************************** +// MACHINE DRIVERS +//************************************************************************** static MACHINE_CONFIG_START( nascom1, nascom1_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/8) + // main cpu + MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz / 8) MCFG_CPU_PROGRAM_MAP(nascom1_mem) MCFG_CPU_IO_MAP(nascom1_io) - /* video hardware */ + // video hardware MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(48 * 8, 16 * 16) MCFG_SCREEN_VISIBLE_AREA(0, 48 * 8 - 1, 0, 16 * 16 - 1) - MCFG_SCREEN_UPDATE_DRIVER(nascom1_state, screen_update_nascom1) + MCFG_SCREEN_UPDATE_DRIVER(nascom1_state, screen_update_nascom) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", nascom1) MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + // uart MCFG_DEVICE_ADD( "hd6402", AY31015, 0 ) MCFG_AY31015_TX_CLOCK(( XTAL_16MHz / 16 ) / 256) MCFG_AY31015_RX_CLOCK(( XTAL_16MHz / 16 ) / 256) - MCFG_AY51013_READ_SI_CB(READ8(nascom1_state, nascom1_hd6402_si)) - MCFG_AY51013_WRITE_SO_CB(WRITE8(nascom1_state, nascom1_hd6402_so)) - - MCFG_DEVICE_ADD("z80pio", Z80PIO, XTAL_16MHz/8) + MCFG_AY51013_READ_SI_CB(READ8(nascom_state, nascom1_hd6402_si)) + MCFG_AY51013_WRITE_SO_CB(WRITE8(nascom_state, nascom1_hd6402_so)) - /* devices */ - MCFG_SNAPSHOT_ADD("snapshot", nascom1_state, nascom1, "nas", 0.5) + // cassette is connected to the uart + MCFG_CASSETTE_ADD("cassette") - MCFG_CASSETTE_ADD( "cassette" ) + // pio + MCFG_DEVICE_ADD("z80pio", Z80PIO, XTAL_16MHz/8) - /* internal ram */ + // internal extra ram MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("40K") - MCFG_RAM_EXTRA_OPTIONS("1K,16K,32K") -MACHINE_CONFIG_END + MCFG_RAM_DEFAULT_SIZE("48K") + MCFG_RAM_EXTRA_OPTIONS("8K,16K,32K") -static LEGACY_FLOPPY_OPTIONS_START(nascom2) - LEGACY_FLOPPY_OPTION(nascom2_ss, "dsk", "Nascom 2 SS disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([1]) - TRACKS([80]) - SECTORS([16]) - SECTOR_LENGTH([256]) - FIRST_SECTOR_ID([1])) - LEGACY_FLOPPY_OPTION(nascom2_ds, "dsk", "Nascom 2 DS disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([2]) - TRACKS([80]) - SECTORS([16]) - SECTOR_LENGTH([256]) - FIRST_SECTOR_ID([1])) -LEGACY_FLOPPY_OPTIONS_END - -static const floppy_interface nascom2_floppy_interface = -{ - FLOPPY_STANDARD_5_25_DSHD, - LEGACY_FLOPPY_OPTIONS_NAME(nascom2), - NULL -}; + // devices + MCFG_SNAPSHOT_ADD("snapshot", nascom_state, nascom1, "nas", 0.5) +MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( nascom2, nascom1 ) - MCFG_CPU_MODIFY("maincpu") +static MACHINE_CONFIG_DERIVED_CLASS( nascom2, nascom1, nascom2_state ) + MCFG_CPU_REPLACE("maincpu", Z80, XTAL_16MHz / 4) + MCFG_CPU_PROGRAM_MAP(nascom2_mem) MCFG_CPU_IO_MAP(nascom2_io) - /* video hardware */ + // video hardware MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_SIZE(48 * 8, 16 * 14) MCFG_SCREEN_VISIBLE_AREA(0, 48 * 8 - 1, 0, 16 * 14 - 1) - MCFG_SCREEN_UPDATE_DRIVER(nascom1_state, screen_update_nascom2) + MCFG_SCREEN_UPDATE_DRIVER(nascom2_state, screen_update_nascom) MCFG_GFXDECODE_MODIFY("gfxdecode", nascom2) - MCFG_DEVICE_ADD("wd1793", FD1793, 0) - MCFG_WD17XX_DEFAULT_DRIVE4_TAGS - MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(nascom1_state, nascom2_fdc_intrq_w)) - MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(nascom1_state, nascom2_fdc_drq_w)) - MCFG_WD17XX_DDEN_CALLBACK(VCC) - - MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(nascom2_floppy_interface) + // generic sockets for ram/rom (todo: support ram here) + MCFG_GENERIC_SOCKET_ADD("socket1", generic_plain_slot, "nascom_socket") + MCFG_GENERIC_EXTENSIONS("bin,rom") + MCFG_GENERIC_LOAD(nascom2_state, socket1_load) + MCFG_GENERIC_SOCKET_ADD("socket2", generic_plain_slot, "nascom_socket") + MCFG_GENERIC_EXTENSIONS("bin,rom") + MCFG_GENERIC_LOAD(nascom2_state, socket2_load) + + MCFG_SOFTWARE_LIST_ADD("socket_list", "nascom_socket") + + // nasbus expansion bus + MCFG_NASBUS_ADD(NASBUS_TAG) + MCFG_NASBUS_RAM_DISABLE_HANDLER(WRITELINE(nascom2_state, ram_disable_w)) + MCFG_NASBUS_SLOT_ADD("nasbus1", nasbus_slot_cards, NULL) + MCFG_NASBUS_SLOT_ADD("nasbus2", nasbus_slot_cards, NULL) + MCFG_NASBUS_SLOT_ADD("nasbus3", nasbus_slot_cards, NULL) + MCFG_NASBUS_SLOT_ADD("nasbus4", nasbus_slot_cards, NULL) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED_CLASS( nascom2c, nascom2, nascom2_state ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(nascom2c_mem) + + MCFG_DEVICE_REMOVE(RAM_TAG) + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("60K") + + MCFG_DEVICE_MODIFY(NASBUS_TAG) + MCFG_NASBUS_RAM_DISABLE_HANDLER(WRITELINE(nascom2_state, ram_disable_cpm_w)) +MACHINE_CONFIG_END -/************************************* - * - * ROM definitions - * - *************************************/ +//************************************************************************** +// ROM DEFINITIONS +//************************************************************************** -ROM_START(nascom1) - ROM_REGION(0x10000, "maincpu",0) +ROM_START( nascom1 ) + ROM_REGION(0x0800, "maincpu", 0) ROM_SYSTEM_BIOS(0, "T4", "NasBug T4") ROMX_LOAD("nasbugt4.rom", 0x0000, 0x0800, CRC(f391df68) SHA1(00218652927afc6360c57e77d6a4fd32d4e34566), ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "T1", "NasBug T1") ROMX_LOAD("nasbugt1.rom", 0x0000, 0x0400, CRC(8ea07054) SHA1(3f9a8632826003d6ea59d2418674d0fb09b83a4c), ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "T2", "NasBug T2") ROMX_LOAD("nasbugt2.rom", 0x0000, 0x0400, CRC(e371b58a) SHA1(485b20a560b587cf9bb4208ba203b12b3841689b), ROM_BIOS(3)) + ROM_REGION(0x0800, "gfx1", 0) ROM_LOAD("nascom1.chr", 0x0000, 0x0800, CRC(33e92a04) SHA1(be6e1cc80e7f95a032759f7df19a43c27ff93a52)) ROM_END - -ROM_START(nascom2) - ROM_REGION(0x10000, "maincpu",0) - ROM_SYSTEM_BIOS( 0, "NS3", "NasSys 3") +ROM_START( nascom2 ) + ROM_REGION(0x0800, "maincpu", 0) + ROM_SYSTEM_BIOS(0, "NS3", "NasSys 3") ROMX_LOAD("nassys3.rom", 0x0000, 0x0800, CRC(3da17373) SHA1(5fbda15765f04e4cd08cf95c8d82ce217889f240), ROM_BIOS(1)) - ROM_SYSTEM_BIOS( 1, "NS1", "NasSys 1") + ROM_SYSTEM_BIOS(1, "NS1", "NasSys 1") ROMX_LOAD("nassys1.rom", 0x0000, 0x0800, CRC(b6300716) SHA1(29da7d462ba3f569f70ed3ecd93b981f81c7adfa), ROM_BIOS(2)) - ROM_LOAD("nasdos.rom", 0xd000, 0x1000, CRC(54a36f6d) SHA1(1d063d04be5024f128bd589e6edc066e9a63fc1b)) - ROM_LOAD("basic.rom", 0xe000, 0x2000, CRC(5cb5197b) SHA1(c41669c2b6d6dea808741a2738426d97bccc9b07)) + + ROM_REGION(0x2000, "basic", 0) + ROM_LOAD("basic.rom", 0x0000, 0x2000, CRC(5cb5197b) SHA1(c41669c2b6d6dea808741a2738426d97bccc9b07)) + + ROM_REGION(0x1000, "gfx1", 0) + ROM_LOAD("nascom1.chr", 0x0000, 0x0800, CRC(33e92a04) SHA1(be6e1cc80e7f95a032759f7df19a43c27ff93a52)) + ROM_LOAD("nasgra.chr", 0x0800, 0x0800, CRC(2bc09d32) SHA1(d384297e9b02cbcb283c020da51b3032ff62b1ae)) +ROM_END + +ROM_START( nascom2c ) + ROM_REGION(0x0800, "maincpu", 0) + ROM_LOAD("cpmboot.rom", 0x0000, 0x0800, CRC(44b67ffc) SHA1(60c8335f24798f8de7ad48a4cd03e56a60d87b63)) + ROM_REGION(0x1000, "gfx1", 0) - ROM_LOAD("nascom1.chr", 0x0000, 0x0800, CRC(33e92a04) SHA1(be6e1cc80e7f95a032759f7df19a43c27ff93a52)) - ROM_LOAD("nasgra.chr", 0x0800, 0x0800, CRC(2bc09d32) SHA1(d384297e9b02cbcb283c020da51b3032ff62b1ae)) + ROM_LOAD("nascom1.chr", 0x0000, 0x0800, CRC(33e92a04) SHA1(be6e1cc80e7f95a032759f7df19a43c27ff93a52)) + ROM_LOAD("nasgra.chr", 0x0800, 0x0800, CRC(2bc09d32) SHA1(d384297e9b02cbcb283c020da51b3032ff62b1ae)) ROM_END -/************************************* - * - * Driver definitions - * - *************************************/ +//************************************************************************** +// GAME DRIVERS +//************************************************************************** -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1978, nascom1, 0, 0, nascom1, nascom1, nascom1_state, nascom1, "Nascom Microcomputers", "Nascom 1", GAME_NO_SOUND ) -COMP( 1979, nascom2, nascom1, 0, nascom2, nascom2, nascom1_state, nascom1, "Nascom Microcomputers", "Nascom 2", GAME_NO_SOUND ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +COMP( 1977, nascom1, 0, 0, nascom1, nascom1, nascom_state, nascom, "Nascom Microcomputers", "Nascom 1", GAME_NO_SOUND_HW ) +COMP( 1979, nascom2, 0, 0, nascom2, nascom2, nascom2_state, nascom, "Nascom Microcomputers", "Nascom 2", GAME_NO_SOUND_HW ) +COMP( 1980, nascom2c, nascom2, 0, nascom2c, nascom2c, nascom2_state, nascomc, "Nascom Microcomputers", "Nascom 2 (CP/M)", GAME_NO_SOUND_HW ) diff --git a/src/mess/drivers/nc.c b/src/mess/drivers/nc.c index 10586d55368..fbdbbd1f8b8 100644 --- a/src/mess/drivers/nc.c +++ b/src/mess/drivers/nc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:GPL-2.0+ // copyright-holders:Wilbert Pol, Kevin Thacker /****************************************************************************** diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c index 513a0dc7275..44a4db083d8 100644 --- a/src/mess/drivers/nes.c +++ b/src/mess/drivers/nes.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Brad Oliver,Fabio Priuli /*************************************************************************** diff --git a/src/mess/drivers/odyssey2.c b/src/mess/drivers/odyssey2.c index 7147e06a48d..eb8fa3b6ca4 100644 --- a/src/mess/drivers/odyssey2.c +++ b/src/mess/drivers/odyssey2.c @@ -9,9 +9,6 @@ Minor update to "the voice" rom names, and add comment about the older revision of "the voice" - LN, 10/03/08 - TODO: - - Reimplement the cartridge slot, and thus also the voice, as a slot device - ***************************************************************************/ #include "emu.h" diff --git a/src/mess/drivers/palmz22.c b/src/mess/drivers/palmz22.c index 679d0eff163..1e3798927a8 100644 --- a/src/mess/drivers/palmz22.c +++ b/src/mess/drivers/palmz22.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /******************************************************************************* diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c index 71bca33ec04..cb6337de5b1 100644 --- a/src/mess/drivers/pc9801.c +++ b/src/mess/drivers/pc9801.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese +// copyright-holders:Angelo Salese,Carl /*************************************************************************************************** PC-9801 (c) 1981 NEC diff --git a/src/mess/drivers/pcw.c b/src/mess/drivers/pcw.c index 781a7fea664..27ac2a0fcd4 100644 --- a/src/mess/drivers/pcw.c +++ b/src/mess/drivers/pcw.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /****************************************************************************** diff --git a/src/mess/drivers/pcw16.c b/src/mess/drivers/pcw16.c index 9cdd1a173d5..e4e5d7915c1 100644 --- a/src/mess/drivers/pcw16.c +++ b/src/mess/drivers/pcw16.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /****************************************************************************** diff --git a/src/mess/drivers/replicator.c b/src/mess/drivers/replicator.c index c55cc7ccf3c..b2bea598dd0 100644 --- a/src/mess/drivers/replicator.c +++ b/src/mess/drivers/replicator.c @@ -667,12 +667,84 @@ static MACHINE_CONFIG_START( replicator, replicator_state ) MACHINE_CONFIG_END ROM_START( replica1 ) - ROM_REGION( 0x20000, "maincpu", 0 ) /* Main program store */ - ROM_LOAD( "mighty_one_v7.5.0.bin", 0x0000, 0x1EF9A, CRC(0d36d9e7) SHA1(a53899775b4c4eea87b6903758ebb75f06710a69) ) /*Sailfish firmware image - Metamaquian build v7.5 */ - ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1F000, 0x0F16, CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) ) /*Arduino MEGA bootloader*/ - - ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF ) /* on-die 4kbyte eeprom */ - //ROM_LOAD( "eeprom.raw", 0x0000, 0x1000, CRC(c71c0011) SHA1(1ceaf73df40e531df3bfb26b4fb7cd95fb7bff1d) ) /* blank EEPROM data */ + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_DEFAULT_BIOS("v750") + + /* Version 5.1 release: + - Initial firmware release + */ + ROM_SYSTEM_BIOS( 0, "v51", "V 5.1" ) + ROMX_LOAD("mighty-mb40-v5.1.bin", 0x0000, 0x10b90, CRC(20d65cd1) SHA1(da18c3eb5a29a6bc1eecd92eaae6063fe29d0305), ROM_BIOS(1)) + + /* Version 5.2 release: + - Nozzle Tolerance added to EEPROM + - Updated onboard menus + - X,Y calibration tool added + */ + ROM_SYSTEM_BIOS( 1, "v52", "V 5.2" ) + ROMX_LOAD("mighty-mb40-v5.2.bin", 0x0000, 0x126c4, CRC(555e47cf) SHA1(9d24a3dbeddce16669bb4d29c3366220ddf15d2a), ROM_BIOS(2)) + + /* Version 5.5 release: + - Acceleration added to motor motion + - Digipot updates + */ + ROM_SYSTEM_BIOS( 2, "v55", "V 5.5" ) + ROMX_LOAD("mighty-mb40-v5.5.bin", 0x0000, 0x1a420, CRC(9327d7e4) SHA1(d734ba2bda12f50ec3ac0035ab11591909d9edde), ROM_BIOS(3)) + + /* Version 6.2.0 release: + - Bug fix release to firmware 6.0 + - Addresses wavy print issue above 1cm + - Left extruder prints with makerware. + */ + ROM_SYSTEM_BIOS( 3, "v620", "V 6.2.0" ) + ROMX_LOAD("mighty_one_v6.2.0.bin", 0x0000, 0x1cf54, CRC(00df6f48) SHA1(db05afc2e1ebc104fb04753634a911187e396556), ROM_BIOS(4)) + + /* Version 7.0.0 release: + - Major upgrade to Stepper Motor Smoothness (via Sailfish team) + - X3G format introduced + - Heaters default to leaving 'preheat' on more of the time + */ + ROM_SYSTEM_BIOS( 4, "v700", "V 7.0.0" ) + ROMX_LOAD("mighty_one_v7.0.0.bin", 0x0000, 0x1cb52, CRC(aa2a5fcf) SHA1(934e642b0b2d007689249680bad03c9255ae016a), ROM_BIOS(5)) + + /* Version 7.2.0 release: + - Removes support for S3G files + - X3G is the recognized format + - Minor bug fixes + */ + ROM_SYSTEM_BIOS( 5, "v720", "V 7.2.0" ) + ROMX_LOAD("mighty_one_v7.2.0.bin", 0x0000, 0x1cb80, CRC(5e546706) SHA1(ed4aaf7522d5a5beea7eb69bf2c85d7a89f8f188), ROM_BIOS(6)) + + /* Version 7.3.0 release: + - Pause at Z Height + - Elapsed time displays during prints + - Minor bug fixes + */ + ROM_SYSTEM_BIOS( 6, "v730", "V 7.3.0" ) + ROMX_LOAD("mighty_one_v7.3.0.bin", 0x0000, 0x1d738, CRC(71811ff5) SHA1(6728ea600ab3ff4b589adca90b0d700d9b70bd18), ROM_BIOS(7)) + + /* Version 7.4.0 (bugfix) release: + - Fixes issues with Z Pause and elapsed print time + */ + ROM_SYSTEM_BIOS( 7, "v740", "V 7.4.0" ) + ROMX_LOAD("mighty_one_v7.4.0.bin", 0x0000, 0x1b9e2, CRC(97b05a27) SHA1(76ca2c9c1db2e006e501c3177a8a1aa693dda0f9), ROM_BIOS(8)) + + /* Version 7.5.0 (bugfix) release: + - Fixes issue with Heat Hold + */ + ROM_SYSTEM_BIOS( 8, "v750", "V 7.5.0" ) + ROMX_LOAD("mighty_one_v7.5.0.bin", 0x0000, 0x1b9c4, CRC(169d6709) SHA1(62b5aacd1bc46969042aea7a50531ec467a4ff1f), ROM_BIOS(9)) + + /* Sailfish firmware image - Metamรกquina experimental build v7.5.0 */ + ROM_SYSTEM_BIOS( 9, "v750mm", "V 7.5.0 - Metamรกquina" ) + ROMX_LOAD("mighty_one_v7.5.0.mm.bin", 0x0000, 0x1ef9a, CRC(0d36d9e7) SHA1(a53899775b4c4eea87b6903758ebb75f06710a69), ROM_BIOS(10)) + + + /*Arduino MEGA bootloader */ + ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) ) + + /* on-die 4kbyte eeprom */ + ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF ) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ diff --git a/src/mess/drivers/rmnimbus.c b/src/mess/drivers/rmnimbus.c index e0a7fd7139e..c7f8b066ef5 100644 --- a/src/mess/drivers/rmnimbus.c +++ b/src/mess/drivers/rmnimbus.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith /* drivers/rmnimbus.c diff --git a/src/mess/drivers/rsc55.c b/src/mess/drivers/rsc55.c index cadad26195c..2e951714d1f 100644 --- a/src/mess/drivers/rsc55.c +++ b/src/mess/drivers/rsc55.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont +// copyright-holders:R. Belmont /************************************************************************************************* Roland Sound Canvas SC-55 diff --git a/src/mess/drivers/segapico.c b/src/mess/drivers/segapico.c index 3bdf04abd41..8c4c1c5215f 100644 --- a/src/mess/drivers/segapico.c +++ b/src/mess/drivers/segapico.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Emmanuel Vadot /****************************************** PICO emulation ****************************************/ diff --git a/src/mess/drivers/sorcerer.c b/src/mess/drivers/sorcerer.c index fed1e849123..c2e810de539 100644 --- a/src/mess/drivers/sorcerer.c +++ b/src/mess/drivers/sorcerer.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker, Robbbert /****************************************************************************** diff --git a/src/mess/drivers/spec128.c b/src/mess/drivers/spec128.c index 6cb6e9d939a..471ca40756f 100644 --- a/src/mess/drivers/spec128.c +++ b/src/mess/drivers/spec128.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** @@ -222,7 +222,7 @@ static ADDRESS_MAP_START (spectrum_128_io, AS_IO, 8, spectrum_state ) AM_RANGE(0x001f, 0x001f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) AM_RANGE(0x007f, 0x007f) AM_READ(spectrum_port_7f_r) AM_MIRROR(0xff00) AM_RANGE(0x00df, 0x00df) AM_READ(spectrum_port_df_r) AM_MIRROR(0xff00) - AM_RANGE(0x4000, 0x4000) AM_WRITE(spectrum_128_port_7ffd_w) AM_MIRROR(0x3ffd) + AM_RANGE(0x0000, 0x0000) AM_WRITE(spectrum_128_port_7ffd_w) AM_MIRROR(0x7ffd) // (A15 | A1) == 0, note: reading from this port does write to it by value from data bus AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) AM_RANGE(0x0001, 0x0001) AM_READ(spectrum_128_ula_r) AM_MIRROR(0xfffe) diff --git a/src/mess/drivers/specpls3.c b/src/mess/drivers/specpls3.c index 444a1cca35c..e7a653c2c09 100644 --- a/src/mess/drivers/specpls3.c +++ b/src/mess/drivers/specpls3.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/drivers/spectrum.c b/src/mess/drivers/spectrum.c index 8422f5593c2..762dd3bb98c 100644 --- a/src/mess/drivers/spectrum.c +++ b/src/mess/drivers/spectrum.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c index 7db4cc0d366..6b518168c46 100644 --- a/src/mess/drivers/svi318.c +++ b/src/mess/drivers/svi318.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sean Young,Tomas Karlsson /* ** svi318.c : driver for Spectravideo SVI-318 and SVI-328 diff --git a/src/mess/drivers/swtpc09.c b/src/mess/drivers/swtpc09.c index 09a78a274b8..c5f0c9868aa 100644 --- a/src/mess/drivers/swtpc09.c +++ b/src/mess/drivers/swtpc09.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Robert Justice /************************************************************************** diff --git a/src/mess/drivers/tamag1.c b/src/mess/drivers/tamag1.c index 66c857c7d43..93bc01e1905 100644 --- a/src/mess/drivers/tamag1.c +++ b/src/mess/drivers/tamag1.c @@ -27,6 +27,8 @@ public: required_device<e0c6s46_device> m_maincpu; required_device<speaker_sound_device> m_speaker; + DECLARE_WRITE8_MEMBER(speaker_w); + DECLARE_PALETTE_INIT(tama); DECLARE_INPUT_CHANGED_MEMBER(input_changed); }; @@ -59,7 +61,7 @@ static E0C6S46_PIXEL_UPDATE_CB(tama_pixel_update) // above screen: 0:meal, 1:lamp, 2:play, 3:medicine // under screen: 4:bath, 5:scales, 6:shout, 7:attention - // they are on pin SEG08(x=35) + COM00-03, pin SEG28(x=36) + COM12-15 + // they are on pin SEG8(x=35) + COM0-3, pin SEG28(x=36) + COM12-15 if (x == 35 && y < 4) output_set_lamp_value(y, state); else if (x == 36 && y >= 12) @@ -73,7 +75,7 @@ static E0C6S46_PIXEL_UPDATE_CB(tama_pixel_update) PALETTE_INIT_MEMBER(tamag1_state, tama) { - palette.set_pen_color(0, rgb_t(0xf0, 0xf2, 0xff)); // background + palette.set_pen_color(0, rgb_t(0xf1, 0xf0, 0xf9)); // background palette.set_pen_color(1, rgb_t(0x3c, 0x38, 0x38)); // lcd pixel } @@ -81,6 +83,20 @@ PALETTE_INIT_MEMBER(tamag1_state, tama) /*************************************************************************** + I/O + +***************************************************************************/ + +WRITE8_MEMBER(tamag1_state::speaker_w) +{ + // R43: speaker out + m_speaker->level_w(data >> 3 & 1); +} + + + +/*************************************************************************** + Inputs ***************************************************************************/ @@ -115,6 +131,7 @@ static MACHINE_CONFIG_START( tama, tamag1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", E0C6S46, XTAL_32_768kHz) MCFG_E0C6S46_PIXEL_UPDATE_CB(tama_pixel_update) + MCFG_E0C6S46_WRITE_R_CB(4, WRITE8(tamag1_state, speaker_w)) /* video hardware */ MCFG_SCREEN_ADD("screen", LCD) @@ -150,4 +167,4 @@ ROM_START( tama ) ROM_END -CONS( 1997, tama, 0, 0, tama, tama, driver_device, 0, "Bandai", "Tamagotchi (USA)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) +CONS( 1997, tama, 0, 0, tama, tama, driver_device, 0, "Bandai", "Tamagotchi (USA)", GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/timex.c b/src/mess/drivers/timex.c index 5ac7d90b46d..806b6887571 100644 --- a/src/mess/drivers/timex.c +++ b/src/mess/drivers/timex.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/drivers/x68k.c b/src/mess/drivers/x68k.c index d1bc71853c7..6a52fd400c5 100644 --- a/src/mess/drivers/x68k.c +++ b/src/mess/drivers/x68k.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Barry Rodewald +// copyright-holders:Barry Rodewald,Carl // Preliminary X68000 driver for MESS // Started 18/11/2006 diff --git a/src/mess/drivers/ymmu100.c b/src/mess/drivers/ymmu100.c index 2ee7688bfb3..f3aa9176906 100644 --- a/src/mess/drivers/ymmu100.c +++ b/src/mess/drivers/ymmu100.c @@ -225,7 +225,7 @@ float mu100_state::lightlevel(const UINT8 *src, const UINT8 *render) int bit = slot & 7; int adr = (slot >> 3); if(render[adr] & (1 << bit)) - return 1-(1-(255-l)/255.0)*contrast; + return 1-(1-(255-l)/255.0f)*contrast; return 0.95f; } diff --git a/src/mess/drivers/z88.c b/src/mess/drivers/z88.c index 41cf8c673be..2a057e1d2e5 100644 --- a/src/mess/drivers/z88.c +++ b/src/mess/drivers/z88.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /****************************************************************************** diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h index 42434aa905b..ca2fbb3b9a1 100644 --- a/src/mess/includes/amstrad.h +++ b/src/mess/includes/amstrad.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker, Barry Rodewald /***************************************************************************** * diff --git a/src/mess/includes/avigo.h b/src/mess/includes/avigo.h index 3fbafa843d2..b06dab92c65 100644 --- a/src/mess/includes/avigo.h +++ b/src/mess/includes/avigo.h @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /***************************************************************************** * diff --git a/src/mess/includes/bbc.h b/src/mess/includes/bbc.h index d86172860b9..98e1c9b5a6c 100644 --- a/src/mess/includes/bbc.h +++ b/src/mess/includes/bbc.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Gordon Jefferyes, Nigel Barnes /***************************************************************************** * diff --git a/src/mess/includes/cgenie.h b/src/mess/includes/cgenie.h index 5d213808045..07c72e2b57e 100644 --- a/src/mess/includes/cgenie.h +++ b/src/mess/includes/cgenie.h @@ -9,12 +9,10 @@ #ifndef CGENIE_H_ #define CGENIE_H_ -#include "machine/wd17xx.h" #include "imagedev/cassette.h" #include "machine/ram.h" #include "sound/ay8910.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" +#include "bus/cgenie/expansion.h" // CRTC 6845 struct CRTC6845 @@ -50,12 +48,12 @@ public: m_fontram(*this, "fontram"), m_maincpu(*this, "maincpu"), m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), m_ram(*this, RAM_TAG), m_ay8910(*this, "ay8910"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_screen(*this, "screen") + m_screen(*this, "screen"), + m_exp(*this, "exp") { } @@ -67,8 +65,6 @@ public: int m_font_offset[4]; int m_port_ff; UINT8 m_irq_status; - UINT8 m_motor_drive; - UINT8 m_head; UINT8 m_cass_level; UINT8 m_cass_bit; UINT8 m_psg_a_out; @@ -91,17 +87,19 @@ public: INTERRUPT_GEN_MEMBER(cgenie_timer_interrupt); INTERRUPT_GEN_MEMBER(cgenie_frame_interrupt); TIMER_CALLBACK_MEMBER(handle_cassette_input); - DECLARE_WRITE_LINE_MEMBER(cgenie_fdc_intrq_w); + + DECLARE_WRITE_LINE_MEMBER(exp_intrq_w); + DECLARE_READ8_MEMBER(cgenie_sh_control_port_r); DECLARE_WRITE8_MEMBER(cgenie_sh_control_port_w); required_device<cpu_device> m_maincpu; required_device<cassette_image_device> m_cassette; - required_device<generic_slot_device> m_cart; required_device<ram_device> m_ram; required_device<ay8910_device> m_ay8910; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; required_device<screen_device> m_screen; + required_device<expansion_slot_device> m_exp; void cgenie_offset_xy(); int cgenie_get_register(int indx); @@ -125,20 +123,8 @@ public: DECLARE_WRITE8_MEMBER( cgenie_port_ff_w ); DECLARE_READ8_MEMBER( cgenie_port_ff_r ); - DECLARE_READ8_MEMBER( cgenie_status_r ); - DECLARE_READ8_MEMBER( cgenie_track_r ); - DECLARE_READ8_MEMBER( cgenie_sector_r ); - DECLARE_READ8_MEMBER( cgenie_data_r ); - - DECLARE_WRITE8_MEMBER( cgenie_command_w ); - DECLARE_WRITE8_MEMBER( cgenie_track_w ); - DECLARE_WRITE8_MEMBER( cgenie_sector_w ); - DECLARE_WRITE8_MEMBER( cgenie_data_w ); - DECLARE_READ8_MEMBER( cgenie_irq_status_r ); - DECLARE_WRITE8_MEMBER( cgenie_motor_w ); - DECLARE_READ8_MEMBER( cgenie_keyboard_r ); DECLARE_WRITE8_MEMBER( cgenie_videoram_w ); @@ -148,8 +134,6 @@ public: DECLARE_WRITE8_MEMBER( cgenie_index_w ); DECLARE_WRITE8_MEMBER( cgenie_register_w ); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cgenie_cart); }; #endif /* CGENIE_H_ */ diff --git a/src/mess/includes/coleco.h b/src/mess/includes/coleco.h index c8739c75446..7b91445e8e1 100644 --- a/src/mess/includes/coleco.h +++ b/src/mess/includes/coleco.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Balfour, Ben Bruscella, Sean Young #pragma once diff --git a/src/mess/includes/cybiko.h b/src/mess/includes/cybiko.h index fd401cbca09..f7ac742808f 100644 --- a/src/mess/includes/cybiko.h +++ b/src/mess/includes/cybiko.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /***************************************************************************** * diff --git a/src/mess/includes/fidelz80.h b/src/mess/includes/fidelz80.h index 1052607ecf6..64f47809e4c 100644 --- a/src/mess/includes/fidelz80.h +++ b/src/mess/includes/fidelz80.h @@ -1,4 +1,4 @@ -// license:? +// license:BSD-3-Clause // copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco /*************************************************************************** diff --git a/src/mess/includes/gba.h b/src/mess/includes/gba.h index aa32ca75e4c..58637b0275f 100644 --- a/src/mess/includes/gba.h +++ b/src/mess/includes/gba.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont,Ryan Holtz +// copyright-holders:R. Belmont,Ryan Holtz #ifndef _GBA_H_ #define _GBA_H_ diff --git a/src/mess/includes/gp32.h b/src/mess/includes/gp32.h index f0e0d59ae8a..a3754f5b9aa 100644 --- a/src/mess/includes/gp32.h +++ b/src/mess/includes/gp32.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen #ifndef _GP32_H_ #define _GP32_H_ diff --git a/src/mess/includes/hec2hrp.h b/src/mess/includes/hec2hrp.h index 36f53c04153..36b3d93530e 100644 --- a/src/mess/includes/hec2hrp.h +++ b/src/mess/includes/hec2hrp.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:JJ Stacino ///////////////////////////////////////////////////////////////////// ////// HECTOR HEADER FILE ///////////////////////////////////////// diff --git a/src/mess/includes/imds2.h b/src/mess/includes/imds2.h index 4a5d966fac6..2b7b20de074 100644 --- a/src/mess/includes/imds2.h +++ b/src/mess/includes/imds2.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:fulivi +// license:BSD-3-Clause +// copyright-holders:F. Ulivi // Driver for Intel Intellec MDS series-II #ifndef _IMDS2_H_ diff --git a/src/mess/includes/kc.h b/src/mess/includes/kc.h index 649f6d1d991..46f1cd93d1e 100644 --- a/src/mess/includes/kc.h +++ b/src/mess/includes/kc.h @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /***************************************************************************** * diff --git a/src/mess/includes/macpci.h b/src/mess/includes/macpci.h index ee4c35a1a5b..5468b2ad428 100644 --- a/src/mess/includes/macpci.h +++ b/src/mess/includes/macpci.h @@ -1,5 +1,5 @@ -// license:? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /***************************************************************************** * * includes/macpci.h diff --git a/src/mess/includes/mbc55x.h b/src/mess/includes/mbc55x.h index 3560616b7bb..fc308aeaf3e 100644 --- a/src/mess/includes/mbc55x.h +++ b/src/mess/includes/mbc55x.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith /* mbc55x.h diff --git a/src/mess/includes/nascom1.h b/src/mess/includes/nascom1.h deleted file mode 100644 index 403c13b775b..00000000000 --- a/src/mess/includes/nascom1.h +++ /dev/null @@ -1,87 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:(Original Author?), Dirk Best -/*************************************************************************** - - Nascom 1 and Nascom 2 - - license: MAME - copyright-holders: (Original Author?), Dirk Best - -***************************************************************************/ - -#ifndef NASCOM1_H_ -#define NASCOM1_H_ - -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "machine/wd17xx.h" -#include "machine/ram.h" -#include "machine/ay31015.h" - -struct nascom1_portstat_t -{ - UINT8 stat_flags; - UINT8 stat_count; -}; - -struct nascom2_fdc_t -{ - UINT8 select; - UINT8 irq; - UINT8 drq; -}; - - -class nascom1_state : public driver_device -{ -public: - nascom1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_hd6402(*this, "hd6402"), - m_cassette(*this, "cassette"), - m_fdc(*this, "wd1793"), - m_ram(*this, RAM_TAG), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_videoram(*this, "videoram"), - m_keyboard(*this, "KEY") - { } - - required_device<cpu_device> m_maincpu; - required_device<ay31015_device> m_hd6402; - required_device<cassette_image_device> m_cassette; - optional_device<fd1793_device> m_fdc; - required_device<ram_device> m_ram; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; - required_shared_ptr<UINT8> m_videoram; - required_ioport_array<9> m_keyboard; - int m_tape_size; - UINT8 *m_tape_image; - int m_tape_index; - nascom1_portstat_t m_portstat; - nascom2_fdc_t m_nascom2_fdc; - DECLARE_READ8_MEMBER(nascom2_fdc_select_r); - DECLARE_WRITE8_MEMBER(nascom2_fdc_select_w); - DECLARE_READ8_MEMBER(nascom2_fdc_status_r); - DECLARE_READ8_MEMBER(nascom1_port_00_r); - DECLARE_WRITE8_MEMBER(nascom1_port_00_w); - DECLARE_READ8_MEMBER(nascom1_port_01_r); - DECLARE_WRITE8_MEMBER(nascom1_port_01_w); - DECLARE_READ8_MEMBER(nascom1_port_02_r); - DECLARE_DRIVER_INIT(nascom1); - virtual void machine_reset(); - UINT32 screen_update_nascom1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_nascom2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(nascom2_fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(nascom2_fdc_drq_w); - DECLARE_READ8_MEMBER(nascom1_hd6402_si); - DECLARE_WRITE8_MEMBER(nascom1_hd6402_so); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( nascom1_cassette ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nascom1_cassette ); - DECLARE_SNAPSHOT_LOAD_MEMBER( nascom1 ); -}; - - -#endif /* NASCOM1_H_ */ diff --git a/src/mess/includes/nc.h b/src/mess/includes/nc.h index 12a9044cf7d..e640ee3927d 100644 --- a/src/mess/includes/nc.h +++ b/src/mess/includes/nc.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:GPL-2.0+ // copyright-holders:Wilbert Pol, Kevin Thacker /***************************************************************************** * diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index 41efd7115c1..49d8b51df12 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Brad Oliver,Fabio Priuli /***************************************************************************** diff --git a/src/mess/includes/pcw.h b/src/mess/includes/pcw.h index 2da077142f8..ef81c98bc82 100644 --- a/src/mess/includes/pcw.h +++ b/src/mess/includes/pcw.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /***************************************************************************** * diff --git a/src/mess/includes/pcw16.h b/src/mess/includes/pcw16.h index b9f9c3789c9..2321267578c 100644 --- a/src/mess/includes/pcw16.h +++ b/src/mess/includes/pcw16.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /***************************************************************************** * diff --git a/src/mess/includes/rmnimbus.h b/src/mess/includes/rmnimbus.h index d110ab22dcf..60d2bb5abfe 100644 --- a/src/mess/includes/rmnimbus.h +++ b/src/mess/includes/rmnimbus.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phill Harvey-Smith +// license:BSD-3-Clause +// copyright-holders:Phill Harvey-Smith,Carl /* rmnimbus.c Machine driver for the Research Machines Nimbus. diff --git a/src/mess/includes/sorcerer.h b/src/mess/includes/sorcerer.h index bd584f70252..1a66cdd2afb 100644 --- a/src/mess/includes/sorcerer.h +++ b/src/mess/includes/sorcerer.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker, Robbbert /***************************************************************************** * diff --git a/src/mess/includes/spectrum.h b/src/mess/includes/spectrum.h index 216829dfeec..d5dbae057b8 100644 --- a/src/mess/includes/spectrum.h +++ b/src/mess/includes/spectrum.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /***************************************************************************** * diff --git a/src/mess/includes/svi318.h b/src/mess/includes/svi318.h index 411f2f3a8a4..e55d91109e4 100644 --- a/src/mess/includes/svi318.h +++ b/src/mess/includes/svi318.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sean Young,Tomas Karlsson /***************************************************************************** * diff --git a/src/mess/includes/swtpc09.h b/src/mess/includes/swtpc09.h index 2580f686fa1..f1c8a0895d4 100644 --- a/src/mess/includes/swtpc09.h +++ b/src/mess/includes/swtpc09.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Robert Justice /*************************************************************************** swtpc09 include file diff --git a/src/mess/includes/z88.h b/src/mess/includes/z88.h index edc6f9a737d..99a26354f5a 100644 --- a/src/mess/includes/z88.h +++ b/src/mess/includes/z88.h @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /***************************************************************************** * diff --git a/src/mess/layout/acrnsys1.lay b/src/mess/layout/acrnsys1.lay index e0b04b5ca58..84afbd9321e 100644 --- a/src/mess/layout/acrnsys1.lay +++ b/src/mess/layout/acrnsys1.lay @@ -2,9 +2,6 @@ <!-- 2007-10-21: Initial version. [Dirk Best] --> -<!-- license: MAME, GPL-2.0+ --> -<!-- copyright-holders: Dirk Best --> - <mamelayout version="2"> <element name="digit" defstate="0"> diff --git a/src/mess/layout/aim65.lay b/src/mess/layout/aim65.lay index 2a9bcd724ee..1ab154fe1b5 100644 --- a/src/mess/layout/aim65.lay +++ b/src/mess/layout/aim65.lay @@ -2,9 +2,6 @@ <!-- 2007-07-30: Initial version. [Dirk Best] --> -<!-- license: MAME, GPL-2.0+ --> -<!-- copyright-holders: Dirk Best --> - <mamelayout version="2"> <element name="digit" defstate="0"> diff --git a/src/mess/layout/aim65_40.lay b/src/mess/layout/aim65_40.lay index 30d57155135..1d9aa5b0421 100644 --- a/src/mess/layout/aim65_40.lay +++ b/src/mess/layout/aim65_40.lay @@ -1,6 +1,4 @@ -<!-- license: MAME, GPL-2.0+ --> -<!-- copyright-holders: Dirk Best --> - +<!-- Initial version. [Dirk Best] --> <mamelayout version="2"> <element name="digit" defstate="0"> diff --git a/src/mess/layout/funrlgl.lay b/src/mess/layout/funrlgl.lay new file mode 100644 index 00000000000..7af9fb61ce8 --- /dev/null +++ b/src/mess/layout/funrlgl.lay @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="ledr" defstate="0"> + <disk state="0"><color red="0.2" green="0.05" blue="0.06" /></disk> + <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + </element> + <element name="ledg" defstate="0"> + <disk state="0"><color red="0.05" green="0.2" blue="0.06" /></disk> + <disk state="1"><color red="0.23" green="1.0" blue="0.2" /></disk> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-1" right="12" top="-0.2" bottom="12" /> + <bezel element="static_black"> + <bounds left="-1" right="12" top="-0.2" bottom="12" /> + </bezel> + + <bezel name="lamp0" element="ledr"><bounds x="0" y="0" width="1" height="1" /></bezel> + <bezel name="lamp10" element="ledr"><bounds x="0" y="2" width="1" height="1" /></bezel> + <bezel name="lamp20" element="ledr"><bounds x="0" y="4" width="1" height="1" /></bezel> + <bezel name="lamp30" element="ledr"><bounds x="0" y="6" width="1" height="1" /></bezel> + <bezel name="lamp2" element="ledr"><bounds x="0" y="8" width="1" height="1" /></bezel> + <bezel name="lamp12" element="ledr"><bounds x="0" y="10" width="1" height="1" /></bezel> + + <bezel name="lamp22" element="ledr"><bounds x="5" y="2" width="1" height="1" /></bezel> + <bezel name="lamp33" element="ledg"><bounds x="5" y="4" width="1" height="1" /></bezel> + + <bezel name="lamp1" element="ledr"><bounds x="10" y="0" width="1" height="1" /></bezel> + <bezel name="lamp11" element="ledr"><bounds x="10" y="2" width="1" height="1" /></bezel> + <bezel name="lamp21" element="ledr"><bounds x="10" y="4" width="1" height="1" /></bezel> + <bezel name="lamp31" element="ledr"><bounds x="10" y="6" width="1" height="1" /></bezel> + <bezel name="lamp3" element="ledr"><bounds x="10" y="8" width="1" height="1" /></bezel> + <bezel name="lamp13" element="ledr"><bounds x="10" y="10" width="1" height="1" /></bezel> + + </view> +</mamelayout> diff --git a/src/mess/layout/hh_melps4_test.lay b/src/mess/layout/hh_melps4_test.lay new file mode 100644 index 00000000000..8471c1c4989 --- /dev/null +++ b/src/mess/layout/hh_melps4_test.lay @@ -0,0 +1,556 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="led" defstate="2"> + <disk state="0"><color red="0.2" green="0.1" blue="0.06" /></disk> + <disk state="1"><color red="1.0" green="0.5" blue="0.3" /></disk> + + <disk state="2"><color red="0" green="0" blue="0" /></disk> + </element> + + +<!-- build screen --> + + <view name="Test Layout"> + <bounds left="0" right="64" top="0" bottom="64" /> + <bezel element="static_black"> + <bounds left="0" right="64" top="0" bottom="64" /> + </bezel> + + <!-- max 16*32 matrix --> + + <bezel name="0.0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel> + <bezel name="0.1" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel> + <bezel name="0.2" element="led"><bounds x="0" y="4" width="1" height="1" /></bezel> + <bezel name="0.3" element="led"><bounds x="0" y="6" width="1" height="1" /></bezel> + <bezel name="0.4" element="led"><bounds x="0" y="8" width="1" height="1" /></bezel> + <bezel name="0.5" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> + <bezel name="0.6" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> + <bezel name="0.7" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> + <bezel name="0.8" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> + <bezel name="0.9" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> + <bezel name="0.10" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> + <bezel name="0.11" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel> + <bezel name="0.12" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> + <bezel name="0.13" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel> + <bezel name="0.14" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel> + <bezel name="0.15" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel> + <bezel name="0.16" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel> + <bezel name="0.17" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel> + <bezel name="0.18" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel> + <bezel name="0.19" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel> + <bezel name="0.20" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel> + <bezel name="0.21" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel> + <bezel name="0.22" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel> + <bezel name="0.23" element="led"><bounds x="0" y="46" width="1" height="1" /></bezel> + <bezel name="0.24" element="led"><bounds x="0" y="48" width="1" height="1" /></bezel> + <bezel name="0.25" element="led"><bounds x="0" y="50" width="1" height="1" /></bezel> + <bezel name="0.26" element="led"><bounds x="0" y="52" width="1" height="1" /></bezel> + <bezel name="0.27" element="led"><bounds x="0" y="54" width="1" height="1" /></bezel> + <bezel name="0.28" element="led"><bounds x="0" y="56" width="1" height="1" /></bezel> + <bezel name="0.29" element="led"><bounds x="0" y="58" width="1" height="1" /></bezel> + <bezel name="0.30" element="led"><bounds x="0" y="60" width="1" height="1" /></bezel> + <bezel name="0.31" element="led"><bounds x="0" y="62" width="1" height="1" /></bezel> + + <bezel name="1.0" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel> + <bezel name="1.1" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel> + <bezel name="1.2" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel> + <bezel name="1.3" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel> + <bezel name="1.4" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel> + <bezel name="1.5" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> + <bezel name="1.6" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> + <bezel name="1.7" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> + <bezel name="1.8" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> + <bezel name="1.9" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> + <bezel name="1.10" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> + <bezel name="1.11" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> + <bezel name="1.12" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> + <bezel name="1.13" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel> + <bezel name="1.14" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel> + <bezel name="1.15" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel> + <bezel name="1.16" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel> + <bezel name="1.17" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel> + <bezel name="1.18" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel> + <bezel name="1.19" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel> + <bezel name="1.20" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel> + <bezel name="1.21" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel> + <bezel name="1.22" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel> + <bezel name="1.23" element="led"><bounds x="2" y="46" width="1" height="1" /></bezel> + <bezel name="1.24" element="led"><bounds x="2" y="48" width="1" height="1" /></bezel> + <bezel name="1.25" element="led"><bounds x="2" y="50" width="1" height="1" /></bezel> + <bezel name="1.26" element="led"><bounds x="2" y="52" width="1" height="1" /></bezel> + <bezel name="1.27" element="led"><bounds x="2" y="54" width="1" height="1" /></bezel> + <bezel name="1.28" element="led"><bounds x="2" y="56" width="1" height="1" /></bezel> + <bezel name="1.29" element="led"><bounds x="2" y="58" width="1" height="1" /></bezel> + <bezel name="1.30" element="led"><bounds x="2" y="60" width="1" height="1" /></bezel> + <bezel name="1.31" element="led"><bounds x="2" y="62" width="1" height="1" /></bezel> + + <bezel name="2.0" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel> + <bezel name="2.1" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel> + <bezel name="2.2" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel> + <bezel name="2.3" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> + <bezel name="2.4" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel> + <bezel name="2.5" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> + <bezel name="2.6" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> + <bezel name="2.7" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> + <bezel name="2.8" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> + <bezel name="2.9" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> + <bezel name="2.10" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> + <bezel name="2.11" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel> + <bezel name="2.12" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> + <bezel name="2.13" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel> + <bezel name="2.14" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel> + <bezel name="2.15" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel> + <bezel name="2.16" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel> + <bezel name="2.17" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel> + <bezel name="2.18" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel> + <bezel name="2.19" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel> + <bezel name="2.20" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel> + <bezel name="2.21" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel> + <bezel name="2.22" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel> + <bezel name="2.23" element="led"><bounds x="4" y="46" width="1" height="1" /></bezel> + <bezel name="2.24" element="led"><bounds x="4" y="48" width="1" height="1" /></bezel> + <bezel name="2.25" element="led"><bounds x="4" y="50" width="1" height="1" /></bezel> + <bezel name="2.26" element="led"><bounds x="4" y="52" width="1" height="1" /></bezel> + <bezel name="2.27" element="led"><bounds x="4" y="54" width="1" height="1" /></bezel> + <bezel name="2.28" element="led"><bounds x="4" y="56" width="1" height="1" /></bezel> + <bezel name="2.29" element="led"><bounds x="4" y="58" width="1" height="1" /></bezel> + <bezel name="2.30" element="led"><bounds x="4" y="60" width="1" height="1" /></bezel> + <bezel name="2.31" element="led"><bounds x="4" y="62" width="1" height="1" /></bezel> + + <bezel name="3.0" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel> + <bezel name="3.1" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel> + <bezel name="3.2" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel> + <bezel name="3.3" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel> + <bezel name="3.4" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel> + <bezel name="3.5" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> + <bezel name="3.6" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> + <bezel name="3.7" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> + <bezel name="3.8" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> + <bezel name="3.9" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> + <bezel name="3.10" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> + <bezel name="3.11" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel> + <bezel name="3.12" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> + <bezel name="3.13" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel> + <bezel name="3.14" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel> + <bezel name="3.15" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel> + <bezel name="3.16" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel> + <bezel name="3.17" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel> + <bezel name="3.18" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel> + <bezel name="3.19" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel> + <bezel name="3.20" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel> + <bezel name="3.21" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel> + <bezel name="3.22" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel> + <bezel name="3.23" element="led"><bounds x="6" y="46" width="1" height="1" /></bezel> + <bezel name="3.24" element="led"><bounds x="6" y="48" width="1" height="1" /></bezel> + <bezel name="3.25" element="led"><bounds x="6" y="50" width="1" height="1" /></bezel> + <bezel name="3.26" element="led"><bounds x="6" y="52" width="1" height="1" /></bezel> + <bezel name="3.27" element="led"><bounds x="6" y="54" width="1" height="1" /></bezel> + <bezel name="3.28" element="led"><bounds x="6" y="56" width="1" height="1" /></bezel> + <bezel name="3.29" element="led"><bounds x="6" y="58" width="1" height="1" /></bezel> + <bezel name="3.30" element="led"><bounds x="6" y="60" width="1" height="1" /></bezel> + <bezel name="3.31" element="led"><bounds x="6" y="62" width="1" height="1" /></bezel> + + <bezel name="4.0" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel> + <bezel name="4.1" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel> + <bezel name="4.2" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel> + <bezel name="4.3" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> + <bezel name="4.4" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel> + <bezel name="4.5" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> + <bezel name="4.6" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> + <bezel name="4.7" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> + <bezel name="4.8" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> + <bezel name="4.9" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> + <bezel name="4.10" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> + <bezel name="4.11" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> + <bezel name="4.12" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> + <bezel name="4.13" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel> + <bezel name="4.14" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel> + <bezel name="4.15" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel> + <bezel name="4.16" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel> + <bezel name="4.17" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel> + <bezel name="4.18" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel> + <bezel name="4.19" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel> + <bezel name="4.20" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel> + <bezel name="4.21" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel> + <bezel name="4.22" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel> + <bezel name="4.23" element="led"><bounds x="8" y="46" width="1" height="1" /></bezel> + <bezel name="4.24" element="led"><bounds x="8" y="48" width="1" height="1" /></bezel> + <bezel name="4.25" element="led"><bounds x="8" y="50" width="1" height="1" /></bezel> + <bezel name="4.26" element="led"><bounds x="8" y="52" width="1" height="1" /></bezel> + <bezel name="4.27" element="led"><bounds x="8" y="54" width="1" height="1" /></bezel> + <bezel name="4.28" element="led"><bounds x="8" y="56" width="1" height="1" /></bezel> + <bezel name="4.29" element="led"><bounds x="8" y="58" width="1" height="1" /></bezel> + <bezel name="4.30" element="led"><bounds x="8" y="60" width="1" height="1" /></bezel> + <bezel name="4.31" element="led"><bounds x="8" y="62" width="1" height="1" /></bezel> + + <bezel name="5.0" element="led"><bounds x="10" y="0" width="1" height="1" /></bezel> + <bezel name="5.1" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> + <bezel name="5.2" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel> + <bezel name="5.3" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel> + <bezel name="5.4" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel> + <bezel name="5.5" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> + <bezel name="5.6" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> + <bezel name="5.7" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> + <bezel name="5.8" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> + <bezel name="5.9" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> + <bezel name="5.10" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> + <bezel name="5.11" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel> + <bezel name="5.12" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> + <bezel name="5.13" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel> + <bezel name="5.14" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel> + <bezel name="5.15" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel> + <bezel name="5.16" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel> + <bezel name="5.17" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel> + <bezel name="5.18" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel> + <bezel name="5.19" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel> + <bezel name="5.20" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel> + <bezel name="5.21" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel> + <bezel name="5.22" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel> + <bezel name="5.23" element="led"><bounds x="10" y="46" width="1" height="1" /></bezel> + <bezel name="5.24" element="led"><bounds x="10" y="48" width="1" height="1" /></bezel> + <bezel name="5.25" element="led"><bounds x="10" y="50" width="1" height="1" /></bezel> + <bezel name="5.26" element="led"><bounds x="10" y="52" width="1" height="1" /></bezel> + <bezel name="5.27" element="led"><bounds x="10" y="54" width="1" height="1" /></bezel> + <bezel name="5.28" element="led"><bounds x="10" y="56" width="1" height="1" /></bezel> + <bezel name="5.29" element="led"><bounds x="10" y="58" width="1" height="1" /></bezel> + <bezel name="5.30" element="led"><bounds x="10" y="60" width="1" height="1" /></bezel> + <bezel name="5.31" element="led"><bounds x="10" y="62" width="1" height="1" /></bezel> + + <bezel name="6.0" element="led"><bounds x="12" y="0" width="1" height="1" /></bezel> + <bezel name="6.1" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel> + <bezel name="6.2" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel> + <bezel name="6.3" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> + <bezel name="6.4" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel> + <bezel name="6.5" element="led"><bounds x="12" y="10" width="1" height="1" /></bezel> + <bezel name="6.6" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> + <bezel name="6.7" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> + <bezel name="6.8" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> + <bezel name="6.9" element="led"><bounds x="12" y="18" width="1" height="1" /></bezel> + <bezel name="6.10" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel> + <bezel name="6.11" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel> + <bezel name="6.12" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel> + <bezel name="6.13" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel> + <bezel name="6.14" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel> + <bezel name="6.15" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel> + <bezel name="6.16" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel> + <bezel name="6.17" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel> + <bezel name="6.18" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel> + <bezel name="6.19" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel> + <bezel name="6.20" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel> + <bezel name="6.21" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel> + <bezel name="6.22" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel> + <bezel name="6.23" element="led"><bounds x="12" y="46" width="1" height="1" /></bezel> + <bezel name="6.24" element="led"><bounds x="12" y="48" width="1" height="1" /></bezel> + <bezel name="6.25" element="led"><bounds x="12" y="50" width="1" height="1" /></bezel> + <bezel name="6.26" element="led"><bounds x="12" y="52" width="1" height="1" /></bezel> + <bezel name="6.27" element="led"><bounds x="12" y="54" width="1" height="1" /></bezel> + <bezel name="6.28" element="led"><bounds x="12" y="56" width="1" height="1" /></bezel> + <bezel name="6.29" element="led"><bounds x="12" y="58" width="1" height="1" /></bezel> + <bezel name="6.30" element="led"><bounds x="12" y="60" width="1" height="1" /></bezel> + <bezel name="6.31" element="led"><bounds x="12" y="62" width="1" height="1" /></bezel> + + <bezel name="7.0" element="led"><bounds x="14" y="0" width="1" height="1" /></bezel> + <bezel name="7.1" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel> + <bezel name="7.2" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel> + <bezel name="7.3" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel> + <bezel name="7.4" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel> + <bezel name="7.5" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> + <bezel name="7.6" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> + <bezel name="7.7" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> + <bezel name="7.8" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> + <bezel name="7.9" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> + <bezel name="7.10" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel> + <bezel name="7.11" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel> + <bezel name="7.12" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel> + <bezel name="7.13" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel> + <bezel name="7.14" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel> + <bezel name="7.15" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel> + <bezel name="7.16" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel> + <bezel name="7.17" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel> + <bezel name="7.18" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel> + <bezel name="7.19" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel> + <bezel name="7.20" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel> + <bezel name="7.21" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel> + <bezel name="7.22" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel> + <bezel name="7.23" element="led"><bounds x="14" y="46" width="1" height="1" /></bezel> + <bezel name="7.24" element="led"><bounds x="14" y="48" width="1" height="1" /></bezel> + <bezel name="7.25" element="led"><bounds x="14" y="50" width="1" height="1" /></bezel> + <bezel name="7.26" element="led"><bounds x="14" y="52" width="1" height="1" /></bezel> + <bezel name="7.27" element="led"><bounds x="14" y="54" width="1" height="1" /></bezel> + <bezel name="7.28" element="led"><bounds x="14" y="56" width="1" height="1" /></bezel> + <bezel name="7.29" element="led"><bounds x="14" y="58" width="1" height="1" /></bezel> + <bezel name="7.30" element="led"><bounds x="14" y="60" width="1" height="1" /></bezel> + <bezel name="7.31" element="led"><bounds x="14" y="62" width="1" height="1" /></bezel> + + <bezel name="8.0" element="led"><bounds x="16" y="0" width="1" height="1" /></bezel> + <bezel name="8.1" element="led"><bounds x="16" y="2" width="1" height="1" /></bezel> + <bezel name="8.2" element="led"><bounds x="16" y="4" width="1" height="1" /></bezel> + <bezel name="8.3" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> + <bezel name="8.4" element="led"><bounds x="16" y="8" width="1" height="1" /></bezel> + <bezel name="8.5" element="led"><bounds x="16" y="10" width="1" height="1" /></bezel> + <bezel name="8.6" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> + <bezel name="8.7" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> + <bezel name="8.8" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> + <bezel name="8.9" element="led"><bounds x="16" y="18" width="1" height="1" /></bezel> + <bezel name="8.10" element="led"><bounds x="16" y="20" width="1" height="1" /></bezel> + <bezel name="8.11" element="led"><bounds x="16" y="22" width="1" height="1" /></bezel> + <bezel name="8.12" element="led"><bounds x="16" y="24" width="1" height="1" /></bezel> + <bezel name="8.13" element="led"><bounds x="16" y="26" width="1" height="1" /></bezel> + <bezel name="8.14" element="led"><bounds x="16" y="28" width="1" height="1" /></bezel> + <bezel name="8.15" element="led"><bounds x="16" y="30" width="1" height="1" /></bezel> + <bezel name="8.16" element="led"><bounds x="16" y="32" width="1" height="1" /></bezel> + <bezel name="8.17" element="led"><bounds x="16" y="34" width="1" height="1" /></bezel> + <bezel name="8.18" element="led"><bounds x="16" y="36" width="1" height="1" /></bezel> + <bezel name="8.19" element="led"><bounds x="16" y="38" width="1" height="1" /></bezel> + <bezel name="8.20" element="led"><bounds x="16" y="40" width="1" height="1" /></bezel> + <bezel name="8.21" element="led"><bounds x="16" y="42" width="1" height="1" /></bezel> + <bezel name="8.22" element="led"><bounds x="16" y="44" width="1" height="1" /></bezel> + <bezel name="8.23" element="led"><bounds x="16" y="46" width="1" height="1" /></bezel> + <bezel name="8.24" element="led"><bounds x="16" y="48" width="1" height="1" /></bezel> + <bezel name="8.25" element="led"><bounds x="16" y="50" width="1" height="1" /></bezel> + <bezel name="8.26" element="led"><bounds x="16" y="52" width="1" height="1" /></bezel> + <bezel name="8.27" element="led"><bounds x="16" y="54" width="1" height="1" /></bezel> + <bezel name="8.28" element="led"><bounds x="16" y="56" width="1" height="1" /></bezel> + <bezel name="8.29" element="led"><bounds x="16" y="58" width="1" height="1" /></bezel> + <bezel name="8.30" element="led"><bounds x="16" y="60" width="1" height="1" /></bezel> + <bezel name="8.31" element="led"><bounds x="16" y="62" width="1" height="1" /></bezel> + + <bezel name="9.0" element="led"><bounds x="18" y="0" width="1" height="1" /></bezel> + <bezel name="9.1" element="led"><bounds x="18" y="2" width="1" height="1" /></bezel> + <bezel name="9.2" element="led"><bounds x="18" y="4" width="1" height="1" /></bezel> + <bezel name="9.3" element="led"><bounds x="18" y="6" width="1" height="1" /></bezel> + <bezel name="9.4" element="led"><bounds x="18" y="8" width="1" height="1" /></bezel> + <bezel name="9.5" element="led"><bounds x="18" y="10" width="1" height="1" /></bezel> + <bezel name="9.6" element="led"><bounds x="18" y="12" width="1" height="1" /></bezel> + <bezel name="9.7" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> + <bezel name="9.8" element="led"><bounds x="18" y="16" width="1" height="1" /></bezel> + <bezel name="9.9" element="led"><bounds x="18" y="18" width="1" height="1" /></bezel> + <bezel name="9.10" element="led"><bounds x="18" y="20" width="1" height="1" /></bezel> + <bezel name="9.11" element="led"><bounds x="18" y="22" width="1" height="1" /></bezel> + <bezel name="9.12" element="led"><bounds x="18" y="24" width="1" height="1" /></bezel> + <bezel name="9.13" element="led"><bounds x="18" y="26" width="1" height="1" /></bezel> + <bezel name="9.14" element="led"><bounds x="18" y="28" width="1" height="1" /></bezel> + <bezel name="9.15" element="led"><bounds x="18" y="30" width="1" height="1" /></bezel> + <bezel name="9.16" element="led"><bounds x="18" y="32" width="1" height="1" /></bezel> + <bezel name="9.17" element="led"><bounds x="18" y="34" width="1" height="1" /></bezel> + <bezel name="9.18" element="led"><bounds x="18" y="36" width="1" height="1" /></bezel> + <bezel name="9.19" element="led"><bounds x="18" y="38" width="1" height="1" /></bezel> + <bezel name="9.20" element="led"><bounds x="18" y="40" width="1" height="1" /></bezel> + <bezel name="9.21" element="led"><bounds x="18" y="42" width="1" height="1" /></bezel> + <bezel name="9.22" element="led"><bounds x="18" y="44" width="1" height="1" /></bezel> + <bezel name="9.23" element="led"><bounds x="18" y="46" width="1" height="1" /></bezel> + <bezel name="9.24" element="led"><bounds x="18" y="48" width="1" height="1" /></bezel> + <bezel name="9.25" element="led"><bounds x="18" y="50" width="1" height="1" /></bezel> + <bezel name="9.26" element="led"><bounds x="18" y="52" width="1" height="1" /></bezel> + <bezel name="9.27" element="led"><bounds x="18" y="54" width="1" height="1" /></bezel> + <bezel name="9.28" element="led"><bounds x="18" y="56" width="1" height="1" /></bezel> + <bezel name="9.29" element="led"><bounds x="18" y="58" width="1" height="1" /></bezel> + <bezel name="9.30" element="led"><bounds x="18" y="60" width="1" height="1" /></bezel> + <bezel name="9.31" element="led"><bounds x="18" y="62" width="1" height="1" /></bezel> + + <bezel name="10.0" element="led"><bounds x="20" y="0" width="1" height="1" /></bezel> + <bezel name="10.1" element="led"><bounds x="20" y="2" width="1" height="1" /></bezel> + <bezel name="10.2" element="led"><bounds x="20" y="4" width="1" height="1" /></bezel> + <bezel name="10.3" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> + <bezel name="10.4" element="led"><bounds x="20" y="8" width="1" height="1" /></bezel> + <bezel name="10.5" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel> + <bezel name="10.6" element="led"><bounds x="20" y="12" width="1" height="1" /></bezel> + <bezel name="10.7" element="led"><bounds x="20" y="14" width="1" height="1" /></bezel> + <bezel name="10.8" element="led"><bounds x="20" y="16" width="1" height="1" /></bezel> + <bezel name="10.9" element="led"><bounds x="20" y="18" width="1" height="1" /></bezel> + <bezel name="10.10" element="led"><bounds x="20" y="20" width="1" height="1" /></bezel> + <bezel name="10.11" element="led"><bounds x="20" y="22" width="1" height="1" /></bezel> + <bezel name="10.12" element="led"><bounds x="20" y="24" width="1" height="1" /></bezel> + <bezel name="10.13" element="led"><bounds x="20" y="26" width="1" height="1" /></bezel> + <bezel name="10.14" element="led"><bounds x="20" y="28" width="1" height="1" /></bezel> + <bezel name="10.15" element="led"><bounds x="20" y="30" width="1" height="1" /></bezel> + <bezel name="10.16" element="led"><bounds x="20" y="32" width="1" height="1" /></bezel> + <bezel name="10.17" element="led"><bounds x="20" y="34" width="1" height="1" /></bezel> + <bezel name="10.18" element="led"><bounds x="20" y="36" width="1" height="1" /></bezel> + <bezel name="10.19" element="led"><bounds x="20" y="38" width="1" height="1" /></bezel> + <bezel name="10.20" element="led"><bounds x="20" y="40" width="1" height="1" /></bezel> + <bezel name="10.21" element="led"><bounds x="20" y="42" width="1" height="1" /></bezel> + <bezel name="10.22" element="led"><bounds x="20" y="44" width="1" height="1" /></bezel> + <bezel name="10.23" element="led"><bounds x="20" y="46" width="1" height="1" /></bezel> + <bezel name="10.24" element="led"><bounds x="20" y="48" width="1" height="1" /></bezel> + <bezel name="10.25" element="led"><bounds x="20" y="50" width="1" height="1" /></bezel> + <bezel name="10.26" element="led"><bounds x="20" y="52" width="1" height="1" /></bezel> + <bezel name="10.27" element="led"><bounds x="20" y="54" width="1" height="1" /></bezel> + <bezel name="10.28" element="led"><bounds x="20" y="56" width="1" height="1" /></bezel> + <bezel name="10.29" element="led"><bounds x="20" y="58" width="1" height="1" /></bezel> + <bezel name="10.30" element="led"><bounds x="20" y="60" width="1" height="1" /></bezel> + <bezel name="10.31" element="led"><bounds x="20" y="62" width="1" height="1" /></bezel> + + <bezel name="11.0" element="led"><bounds x="22" y="0" width="1" height="1" /></bezel> + <bezel name="11.1" element="led"><bounds x="22" y="2" width="1" height="1" /></bezel> + <bezel name="11.2" element="led"><bounds x="22" y="4" width="1" height="1" /></bezel> + <bezel name="11.3" element="led"><bounds x="22" y="6" width="1" height="1" /></bezel> + <bezel name="11.4" element="led"><bounds x="22" y="8" width="1" height="1" /></bezel> + <bezel name="11.5" element="led"><bounds x="22" y="10" width="1" height="1" /></bezel> + <bezel name="11.6" element="led"><bounds x="22" y="12" width="1" height="1" /></bezel> + <bezel name="11.7" element="led"><bounds x="22" y="14" width="1" height="1" /></bezel> + <bezel name="11.8" element="led"><bounds x="22" y="16" width="1" height="1" /></bezel> + <bezel name="11.9" element="led"><bounds x="22" y="18" width="1" height="1" /></bezel> + <bezel name="11.10" element="led"><bounds x="22" y="20" width="1" height="1" /></bezel> + <bezel name="11.11" element="led"><bounds x="22" y="22" width="1" height="1" /></bezel> + <bezel name="11.12" element="led"><bounds x="22" y="24" width="1" height="1" /></bezel> + <bezel name="11.13" element="led"><bounds x="22" y="26" width="1" height="1" /></bezel> + <bezel name="11.14" element="led"><bounds x="22" y="28" width="1" height="1" /></bezel> + <bezel name="11.15" element="led"><bounds x="22" y="30" width="1" height="1" /></bezel> + <bezel name="11.16" element="led"><bounds x="22" y="32" width="1" height="1" /></bezel> + <bezel name="11.17" element="led"><bounds x="22" y="34" width="1" height="1" /></bezel> + <bezel name="11.18" element="led"><bounds x="22" y="36" width="1" height="1" /></bezel> + <bezel name="11.19" element="led"><bounds x="22" y="38" width="1" height="1" /></bezel> + <bezel name="11.20" element="led"><bounds x="22" y="40" width="1" height="1" /></bezel> + <bezel name="11.21" element="led"><bounds x="22" y="42" width="1" height="1" /></bezel> + <bezel name="11.22" element="led"><bounds x="22" y="44" width="1" height="1" /></bezel> + <bezel name="11.23" element="led"><bounds x="22" y="46" width="1" height="1" /></bezel> + <bezel name="11.24" element="led"><bounds x="22" y="48" width="1" height="1" /></bezel> + <bezel name="11.25" element="led"><bounds x="22" y="50" width="1" height="1" /></bezel> + <bezel name="11.26" element="led"><bounds x="22" y="52" width="1" height="1" /></bezel> + <bezel name="11.27" element="led"><bounds x="22" y="54" width="1" height="1" /></bezel> + <bezel name="11.28" element="led"><bounds x="22" y="56" width="1" height="1" /></bezel> + <bezel name="11.29" element="led"><bounds x="22" y="58" width="1" height="1" /></bezel> + <bezel name="11.30" element="led"><bounds x="22" y="60" width="1" height="1" /></bezel> + <bezel name="11.31" element="led"><bounds x="22" y="62" width="1" height="1" /></bezel> + + <bezel name="12.0" element="led"><bounds x="24" y="0" width="1" height="1" /></bezel> + <bezel name="12.1" element="led"><bounds x="24" y="2" width="1" height="1" /></bezel> + <bezel name="12.2" element="led"><bounds x="24" y="4" width="1" height="1" /></bezel> + <bezel name="12.3" element="led"><bounds x="24" y="6" width="1" height="1" /></bezel> + <bezel name="12.4" element="led"><bounds x="24" y="8" width="1" height="1" /></bezel> + <bezel name="12.5" element="led"><bounds x="24" y="10" width="1" height="1" /></bezel> + <bezel name="12.6" element="led"><bounds x="24" y="12" width="1" height="1" /></bezel> + <bezel name="12.7" element="led"><bounds x="24" y="14" width="1" height="1" /></bezel> + <bezel name="12.8" element="led"><bounds x="24" y="16" width="1" height="1" /></bezel> + <bezel name="12.9" element="led"><bounds x="24" y="18" width="1" height="1" /></bezel> + <bezel name="12.10" element="led"><bounds x="24" y="20" width="1" height="1" /></bezel> + <bezel name="12.11" element="led"><bounds x="24" y="22" width="1" height="1" /></bezel> + <bezel name="12.12" element="led"><bounds x="24" y="24" width="1" height="1" /></bezel> + <bezel name="12.13" element="led"><bounds x="24" y="26" width="1" height="1" /></bezel> + <bezel name="12.14" element="led"><bounds x="24" y="28" width="1" height="1" /></bezel> + <bezel name="12.15" element="led"><bounds x="24" y="30" width="1" height="1" /></bezel> + <bezel name="12.16" element="led"><bounds x="24" y="32" width="1" height="1" /></bezel> + <bezel name="12.17" element="led"><bounds x="24" y="34" width="1" height="1" /></bezel> + <bezel name="12.18" element="led"><bounds x="24" y="36" width="1" height="1" /></bezel> + <bezel name="12.19" element="led"><bounds x="24" y="38" width="1" height="1" /></bezel> + <bezel name="12.20" element="led"><bounds x="24" y="40" width="1" height="1" /></bezel> + <bezel name="12.21" element="led"><bounds x="24" y="42" width="1" height="1" /></bezel> + <bezel name="12.22" element="led"><bounds x="24" y="44" width="1" height="1" /></bezel> + <bezel name="12.23" element="led"><bounds x="24" y="46" width="1" height="1" /></bezel> + <bezel name="12.24" element="led"><bounds x="24" y="48" width="1" height="1" /></bezel> + <bezel name="12.25" element="led"><bounds x="24" y="50" width="1" height="1" /></bezel> + <bezel name="12.26" element="led"><bounds x="24" y="52" width="1" height="1" /></bezel> + <bezel name="12.27" element="led"><bounds x="24" y="54" width="1" height="1" /></bezel> + <bezel name="12.28" element="led"><bounds x="24" y="56" width="1" height="1" /></bezel> + <bezel name="12.29" element="led"><bounds x="24" y="58" width="1" height="1" /></bezel> + <bezel name="12.30" element="led"><bounds x="24" y="60" width="1" height="1" /></bezel> + <bezel name="12.31" element="led"><bounds x="24" y="62" width="1" height="1" /></bezel> + + <bezel name="13.0" element="led"><bounds x="26" y="0" width="1" height="1" /></bezel> + <bezel name="13.1" element="led"><bounds x="26" y="2" width="1" height="1" /></bezel> + <bezel name="13.2" element="led"><bounds x="26" y="4" width="1" height="1" /></bezel> + <bezel name="13.3" element="led"><bounds x="26" y="6" width="1" height="1" /></bezel> + <bezel name="13.4" element="led"><bounds x="26" y="8" width="1" height="1" /></bezel> + <bezel name="13.5" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel> + <bezel name="13.6" element="led"><bounds x="26" y="12" width="1" height="1" /></bezel> + <bezel name="13.7" element="led"><bounds x="26" y="14" width="1" height="1" /></bezel> + <bezel name="13.8" element="led"><bounds x="26" y="16" width="1" height="1" /></bezel> + <bezel name="13.9" element="led"><bounds x="26" y="18" width="1" height="1" /></bezel> + <bezel name="13.10" element="led"><bounds x="26" y="20" width="1" height="1" /></bezel> + <bezel name="13.11" element="led"><bounds x="26" y="22" width="1" height="1" /></bezel> + <bezel name="13.12" element="led"><bounds x="26" y="24" width="1" height="1" /></bezel> + <bezel name="13.13" element="led"><bounds x="26" y="26" width="1" height="1" /></bezel> + <bezel name="13.14" element="led"><bounds x="26" y="28" width="1" height="1" /></bezel> + <bezel name="13.15" element="led"><bounds x="26" y="30" width="1" height="1" /></bezel> + <bezel name="13.16" element="led"><bounds x="26" y="32" width="1" height="1" /></bezel> + <bezel name="13.17" element="led"><bounds x="26" y="34" width="1" height="1" /></bezel> + <bezel name="13.18" element="led"><bounds x="26" y="36" width="1" height="1" /></bezel> + <bezel name="13.19" element="led"><bounds x="26" y="38" width="1" height="1" /></bezel> + <bezel name="13.20" element="led"><bounds x="26" y="40" width="1" height="1" /></bezel> + <bezel name="13.21" element="led"><bounds x="26" y="42" width="1" height="1" /></bezel> + <bezel name="13.22" element="led"><bounds x="26" y="44" width="1" height="1" /></bezel> + <bezel name="13.23" element="led"><bounds x="26" y="46" width="1" height="1" /></bezel> + <bezel name="13.24" element="led"><bounds x="26" y="48" width="1" height="1" /></bezel> + <bezel name="13.25" element="led"><bounds x="26" y="50" width="1" height="1" /></bezel> + <bezel name="13.26" element="led"><bounds x="26" y="52" width="1" height="1" /></bezel> + <bezel name="13.27" element="led"><bounds x="26" y="54" width="1" height="1" /></bezel> + <bezel name="13.28" element="led"><bounds x="26" y="56" width="1" height="1" /></bezel> + <bezel name="13.29" element="led"><bounds x="26" y="58" width="1" height="1" /></bezel> + <bezel name="13.30" element="led"><bounds x="26" y="60" width="1" height="1" /></bezel> + <bezel name="13.31" element="led"><bounds x="26" y="62" width="1" height="1" /></bezel> + + <bezel name="14.0" element="led"><bounds x="28" y="0" width="1" height="1" /></bezel> + <bezel name="14.1" element="led"><bounds x="28" y="2" width="1" height="1" /></bezel> + <bezel name="14.2" element="led"><bounds x="28" y="4" width="1" height="1" /></bezel> + <bezel name="14.3" element="led"><bounds x="28" y="6" width="1" height="1" /></bezel> + <bezel name="14.4" element="led"><bounds x="28" y="8" width="1" height="1" /></bezel> + <bezel name="14.5" element="led"><bounds x="28" y="10" width="1" height="1" /></bezel> + <bezel name="14.6" element="led"><bounds x="28" y="12" width="1" height="1" /></bezel> + <bezel name="14.7" element="led"><bounds x="28" y="14" width="1" height="1" /></bezel> + <bezel name="14.8" element="led"><bounds x="28" y="16" width="1" height="1" /></bezel> + <bezel name="14.9" element="led"><bounds x="28" y="18" width="1" height="1" /></bezel> + <bezel name="14.10" element="led"><bounds x="28" y="20" width="1" height="1" /></bezel> + <bezel name="14.11" element="led"><bounds x="28" y="22" width="1" height="1" /></bezel> + <bezel name="14.12" element="led"><bounds x="28" y="24" width="1" height="1" /></bezel> + <bezel name="14.13" element="led"><bounds x="28" y="26" width="1" height="1" /></bezel> + <bezel name="14.14" element="led"><bounds x="28" y="28" width="1" height="1" /></bezel> + <bezel name="14.15" element="led"><bounds x="28" y="30" width="1" height="1" /></bezel> + <bezel name="14.16" element="led"><bounds x="28" y="32" width="1" height="1" /></bezel> + <bezel name="14.17" element="led"><bounds x="28" y="34" width="1" height="1" /></bezel> + <bezel name="14.18" element="led"><bounds x="28" y="36" width="1" height="1" /></bezel> + <bezel name="14.19" element="led"><bounds x="28" y="38" width="1" height="1" /></bezel> + <bezel name="14.20" element="led"><bounds x="28" y="40" width="1" height="1" /></bezel> + <bezel name="14.21" element="led"><bounds x="28" y="42" width="1" height="1" /></bezel> + <bezel name="14.22" element="led"><bounds x="28" y="44" width="1" height="1" /></bezel> + <bezel name="14.23" element="led"><bounds x="28" y="46" width="1" height="1" /></bezel> + <bezel name="14.24" element="led"><bounds x="28" y="48" width="1" height="1" /></bezel> + <bezel name="14.25" element="led"><bounds x="28" y="50" width="1" height="1" /></bezel> + <bezel name="14.26" element="led"><bounds x="28" y="52" width="1" height="1" /></bezel> + <bezel name="14.27" element="led"><bounds x="28" y="54" width="1" height="1" /></bezel> + <bezel name="14.28" element="led"><bounds x="28" y="56" width="1" height="1" /></bezel> + <bezel name="14.29" element="led"><bounds x="28" y="58" width="1" height="1" /></bezel> + <bezel name="14.30" element="led"><bounds x="28" y="60" width="1" height="1" /></bezel> + <bezel name="14.31" element="led"><bounds x="28" y="62" width="1" height="1" /></bezel> + + <bezel name="15.0" element="led"><bounds x="30" y="0" width="1" height="1" /></bezel> + <bezel name="15.1" element="led"><bounds x="30" y="2" width="1" height="1" /></bezel> + <bezel name="15.2" element="led"><bounds x="30" y="4" width="1" height="1" /></bezel> + <bezel name="15.3" element="led"><bounds x="30" y="6" width="1" height="1" /></bezel> + <bezel name="15.4" element="led"><bounds x="30" y="8" width="1" height="1" /></bezel> + <bezel name="15.5" element="led"><bounds x="30" y="10" width="1" height="1" /></bezel> + <bezel name="15.6" element="led"><bounds x="30" y="12" width="1" height="1" /></bezel> + <bezel name="15.7" element="led"><bounds x="30" y="14" width="1" height="1" /></bezel> + <bezel name="15.8" element="led"><bounds x="30" y="16" width="1" height="1" /></bezel> + <bezel name="15.9" element="led"><bounds x="30" y="18" width="1" height="1" /></bezel> + <bezel name="15.10" element="led"><bounds x="30" y="20" width="1" height="1" /></bezel> + <bezel name="15.11" element="led"><bounds x="30" y="22" width="1" height="1" /></bezel> + <bezel name="15.12" element="led"><bounds x="30" y="24" width="1" height="1" /></bezel> + <bezel name="15.13" element="led"><bounds x="30" y="26" width="1" height="1" /></bezel> + <bezel name="15.14" element="led"><bounds x="30" y="28" width="1" height="1" /></bezel> + <bezel name="15.15" element="led"><bounds x="30" y="30" width="1" height="1" /></bezel> + <bezel name="15.16" element="led"><bounds x="30" y="32" width="1" height="1" /></bezel> + <bezel name="15.17" element="led"><bounds x="30" y="34" width="1" height="1" /></bezel> + <bezel name="15.18" element="led"><bounds x="30" y="36" width="1" height="1" /></bezel> + <bezel name="15.19" element="led"><bounds x="30" y="38" width="1" height="1" /></bezel> + <bezel name="15.20" element="led"><bounds x="30" y="40" width="1" height="1" /></bezel> + <bezel name="15.21" element="led"><bounds x="30" y="42" width="1" height="1" /></bezel> + <bezel name="15.22" element="led"><bounds x="30" y="44" width="1" height="1" /></bezel> + <bezel name="15.23" element="led"><bounds x="30" y="46" width="1" height="1" /></bezel> + <bezel name="15.24" element="led"><bounds x="30" y="48" width="1" height="1" /></bezel> + <bezel name="15.25" element="led"><bounds x="30" y="50" width="1" height="1" /></bezel> + <bezel name="15.26" element="led"><bounds x="30" y="52" width="1" height="1" /></bezel> + <bezel name="15.27" element="led"><bounds x="30" y="54" width="1" height="1" /></bezel> + <bezel name="15.28" element="led"><bounds x="30" y="56" width="1" height="1" /></bezel> + <bezel name="15.29" element="led"><bounds x="30" y="58" width="1" height="1" /></bezel> + <bezel name="15.30" element="led"><bounds x="30" y="60" width="1" height="1" /></bezel> + <bezel name="15.31" element="led"><bounds x="30" y="62" width="1" height="1" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/px4.lay b/src/mess/layout/px4.lay index 5a22b4a9928..3f4f3324e24 100644 --- a/src/mess/layout/px4.lay +++ b/src/mess/layout/px4.lay @@ -1,7 +1,6 @@ <?xml version="1.0"?> -<!-- license: MAME, GPL-2.0+ --> -<!-- copyright-holders: Dirk Best --> +<!-- Initial version. [Dirk Best] --> <mamelayout version="2"> <element name="background"> diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 258ef8c83f2..032babb486f 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker, Barry Rodewald /*************************************************************************** @@ -1658,10 +1658,14 @@ Bit 4 controls the interrupt generation. It can be used to delay interrupts.*/ } /* b3b2 != 0 then change the state of upper or lower rom area and rethink memory */ - if((dataToGateArray & 0x0c) != 0) - m_exp->romen_w(0); // active low - else - m_exp->romen_w(1); + if (m_exp) + { + if((dataToGateArray & 0x0c) != 0) + m_exp->romen_w(0); // active low + else + m_exp->romen_w(1); + } + amstrad_setLowerRom(); amstrad_setUpperRom(); @@ -2385,7 +2389,8 @@ void amstrad_state::amstrad_rethinkMemory() } /* mappings for other expansion devices */ - m_exp->set_mapping(); + if (m_exp) + m_exp->set_mapping(); } diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c index cbfef40e40b..efc9da1102e 100644 --- a/src/mess/machine/bbc.c +++ b/src/mess/machine/bbc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Gordon Jefferyes, Nigel Barnes /****************************************************************************** BBC Model B diff --git a/src/mess/machine/cgenie.c b/src/mess/machine/cgenie.c index a3f13bb3b7b..a71d5cbec00 100644 --- a/src/mess/machine/cgenie.c +++ b/src/mess/machine/cgenie.c @@ -12,10 +12,8 @@ #include "emu.h" #include "cpu/z80/z80.h" #include "includes/cgenie.h" -#include "machine/wd17xx.h" #include "imagedev/cassette.h" #include "sound/dac.h" -#include "imagedev/flopdrv.h" #include "machine/ram.h" #define AYWriteReg(chip,port,value) \ @@ -68,51 +66,6 @@ void cgenie_state::machine_reset() /* wipe out font RAM */ memset(&ROM[0x0f400], 0xff, 0x0400); - if( ioport("DSW0")->read() & 0x80 ) - { - logerror("cgenie floppy discs enabled\n"); - } - else - { - logerror("cgenie floppy discs disabled\n"); - } - - /* copy DOS ROM, if enabled or wipe out that memory area */ - if( ioport("DSW0")->read() & 0x40 ) - { - if ( ioport("DSW0")->read() & 0x80 ) - { - space.install_read_bank(0xc000, 0xdfff, "bank10"); - space.nop_write(0xc000, 0xdfff); - membank("bank10")->set_base(&ROM[0x0c000]); - logerror("cgenie DOS enabled\n"); - memcpy(&ROM[0x0c000],&ROM[0x10000], 0x2000); - } - else - { - space.nop_readwrite(0xc000, 0xdfff); - logerror("cgenie DOS disabled (no floppy image given)\n"); - } - } - else - { - space.nop_readwrite(0xc000, 0xdfff); - logerror("cgenie DOS disabled\n"); - memset(&memregion("maincpu")->base()[0x0c000], 0x00, 0x2000); - } - - /* copy EXT ROM, if enabled or wipe out that memory area */ - if (ioport("DSW0")->read() & 0x20 && m_cart->exists()) - { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000, 0xefff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); - logerror("cgenie EXT enabled\n"); - } - else - { - space.nop_readwrite(0xe000, 0xefff); - logerror("cgenie EXT disabled\n"); - } - m_cass_level = 0; m_cass_bit = 1; } @@ -125,8 +78,6 @@ void cgenie_state::machine_start() /* initialize static variables */ m_irq_status = 0; - m_motor_drive = 0; - m_head = 0; m_tv_mode = -1; m_port_ff = 0xff; @@ -147,6 +98,10 @@ void cgenie_state::machine_start() m_videoram = m_ram->pointer(); membank("bank1")->set_base(m_ram->pointer()); machine().scheduler().timer_pulse(attotime::from_hz(11025), timer_expired_delegate(FUNC(cgenie_state::handle_cassette_input),this)); + + // setup expansion bus + m_exp->set_program_space(&m_maincpu->space(AS_PROGRAM)); + m_exp->set_io_space(&m_maincpu->space(AS_IO)); } /************************************* @@ -319,83 +274,11 @@ WRITE8_MEMBER( cgenie_state::cgenie_psg_port_b_w ) m_psg_b_out = data; } -READ8_MEMBER( cgenie_state::cgenie_status_r ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, return 0 */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return 0; - return fdc->status_r(space, offset); -} - -READ8_MEMBER( cgenie_state::cgenie_track_r ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, return 0xff */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return 0xff; - return fdc->track_r(space, offset); -} - -READ8_MEMBER( cgenie_state::cgenie_sector_r ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, return 0xff */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return 0xff; - return fdc->sector_r(space, offset); -} - -READ8_MEMBER( cgenie_state::cgenie_data_r ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, return 0xff */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return 0xff; - return fdc->data_r(space, offset); -} - -WRITE8_MEMBER( cgenie_state::cgenie_command_w ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, return immediately */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return; - fdc->command_w(space, offset, data); -} - -WRITE8_MEMBER( cgenie_state::cgenie_track_w ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, ignore the write */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return; - fdc->track_w(space, offset, data); -} - -WRITE8_MEMBER( cgenie_state::cgenie_sector_w ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, ignore the write */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return; - fdc->sector_w(space, offset, data); -} - -WRITE8_MEMBER( cgenie_state::cgenie_data_w ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - /* If the floppy isn't emulated, ignore the write */ - if( (ioport("DSW0")->read() & 0x80) == 0 ) - return; - fdc->data_w(space, offset, data); -} - READ8_MEMBER( cgenie_state::cgenie_irq_status_r ) { int result = m_irq_status; - m_irq_status &= ~(IRQ_TIMER | IRQ_FDC); + m_irq_status &= ~(IRQ_TIMER); return result; } @@ -408,54 +291,17 @@ INTERRUPT_GEN_MEMBER(cgenie_state::cgenie_timer_interrupt) } } -WRITE_LINE_MEMBER(cgenie_state::cgenie_fdc_intrq_w) +WRITE_LINE_MEMBER( cgenie_state::exp_intrq_w ) { - /* if disc hardware is not enabled, do not cause an int */ - if (!( ioport("DSW0")->read() & 0x80 )) - return; + m_irq_status &= ~IRQ_FDC; + m_irq_status |= state << 6; - if (state) - { - if( (m_irq_status & IRQ_FDC) == 0 ) - { - m_irq_status |= IRQ_FDC; - m_maincpu->set_input_line(0, HOLD_LINE); - } - } + if (m_irq_status) + m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); else - { - m_irq_status &= ~IRQ_FDC; - } + m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } -WRITE8_MEMBER( cgenie_state::cgenie_motor_w ) -{ - fd1793_device *fdc = machine().device<fd1793_device>("wd179x"); - UINT8 drive = 255; - - logerror("cgenie motor_w $%02X\n", data); - - if( data & 1 ) - drive = 0; - if( data & 2 ) - drive = 1; - if( data & 4 ) - drive = 2; - if( data & 8 ) - drive = 3; - - if( drive > 3 ) - return; - - /* mask head select bit */ - m_head = (data >> 4) & 1; - - /* currently selected drive */ - m_motor_drive = drive; - - fdc->set_drive(drive); - fdc->set_side(m_head); -} /************************************* * Keyboard * diff --git a/src/mess/machine/coleco.c b/src/mess/machine/coleco.c index 07854612368..82deef9aa8e 100644 --- a/src/mess/machine/coleco.c +++ b/src/mess/machine/coleco.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Balfour, Ben Bruscella, Sean Young #include "emu.h" #include "machine/coleco.h" diff --git a/src/mess/machine/coleco.h b/src/mess/machine/coleco.h index 4ba4ecd67e5..b7874b9c576 100644 --- a/src/mess/machine/coleco.h +++ b/src/mess/machine/coleco.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Mike Balfour, Ben Bruscella, Sean Young #pragma once diff --git a/src/mess/machine/cybiko.c b/src/mess/machine/cybiko.c index 36fe8b3f3db..be0991bf4fe 100644 --- a/src/mess/machine/cybiko.c +++ b/src/mess/machine/cybiko.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/mess/machine/docg3.c b/src/mess/machine/docg3.c index 90ccbaef0b3..e0701987b7b 100644 --- a/src/mess/machine/docg3.c +++ b/src/mess/machine/docg3.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/mess/machine/docg3.h b/src/mess/machine/docg3.h index e06b3c97a9b..0a00b446500 100644 --- a/src/mess/machine/docg3.h +++ b/src/mess/machine/docg3.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/mess/machine/hec2hrp.c b/src/mess/machine/hec2hrp.c index 20cd30acc6d..a6ebb75c64c 100644 --- a/src/mess/machine/hec2hrp.c +++ b/src/mess/machine/hec2hrp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:JJ Stacino ///////////////////////////////////////////////////////////////////////// // HEC2HRP.C in machine diff --git a/src/mess/machine/hecdisk2.c b/src/mess/machine/hecdisk2.c index 3102da76ea2..16cc67300c9 100644 --- a/src/mess/machine/hecdisk2.c +++ b/src/mess/machine/hecdisk2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:JJ Stacino /*******************************************************/ /************ HECDISK2.C in machine ******************/ diff --git a/src/mess/machine/kc.c b/src/mess/machine/kc.c index a5e84f2d4ef..ad707f9dbc6 100644 --- a/src/mess/machine/kc.c +++ b/src/mess/machine/kc.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /* Core includes */ #include "emu.h" diff --git a/src/mess/machine/kc_keyb.c b/src/mess/machine/kc_keyb.c index 1e96a81be1e..740d0dc7fce 100644 --- a/src/mess/machine/kc_keyb.c +++ b/src/mess/machine/kc_keyb.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /********************************************************************* diff --git a/src/mess/machine/kc_keyb.h b/src/mess/machine/kc_keyb.h index 6e3a6c54b93..9114e65ae96 100644 --- a/src/mess/machine/kc_keyb.h +++ b/src/mess/machine/kc_keyb.h @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /********************************************************************* diff --git a/src/mess/machine/macpci.c b/src/mess/machine/macpci.c index bbb036d247c..705f686f056 100644 --- a/src/mess/machine/macpci.c +++ b/src/mess/machine/macpci.c @@ -1,5 +1,5 @@ -// license:? -// copyright-holders:R.Belmont +// license:BSD-3-Clause +// copyright-holders:R. Belmont /**************************************************************************** machine/pcimac.c diff --git a/src/mess/machine/mbc55x.c b/src/mess/machine/mbc55x.c index c74d27d5774..f2e341d5f9c 100644 --- a/src/mess/machine/mbc55x.c +++ b/src/mess/machine/mbc55x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith /* machine/mbc55x.c diff --git a/src/mess/machine/mega32x.c b/src/mess/machine/mega32x.c index 90df32646e5..be3c572b53d 100644 --- a/src/mess/machine/mega32x.c +++ b/src/mess/machine/mega32x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Megadrive / Genesis 32X emulation */ diff --git a/src/mess/machine/mega32x.h b/src/mess/machine/mega32x.h index 2246d565d9b..fd9ed2131a8 100644 --- a/src/mess/machine/mega32x.h +++ b/src/mess/machine/mega32x.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* 32X */ diff --git a/src/mess/machine/megacd.c b/src/mess/machine/megacd.c index 97dfec86db2..c416bf73d89 100644 --- a/src/mess/machine/megacd.c +++ b/src/mess/machine/megacd.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "emu.h" #include "machine/megacd.h" diff --git a/src/mess/machine/megacd.h b/src/mess/machine/megacd.h index 83d66fd5b2f..84ed0b399c5 100644 --- a/src/mess/machine/megacd.h +++ b/src/mess/machine/megacd.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* Sega CD / Mega CD */ diff --git a/src/mess/machine/megacdcd.c b/src/mess/machine/megacdcd.c index c3ebc57770a..617d3615393 100644 --- a/src/mess/machine/megacdcd.c +++ b/src/mess/machine/megacdcd.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood /* CD controller code from megacd.c, used by Sega CD / Mega CD */ diff --git a/src/mess/machine/megacdcd.h b/src/mess/machine/megacdcd.h index 4c4abc5a6ff..9804c372031 100644 --- a/src/mess/machine/megacdcd.h +++ b/src/mess/machine/megacdcd.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:David Haywood #include "sound/cdda.h" diff --git a/src/mess/machine/nascom1.c b/src/mess/machine/nascom1.c deleted file mode 100644 index 74183d6163d..00000000000 --- a/src/mess/machine/nascom1.c +++ /dev/null @@ -1,261 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:(Original Author?), Dirk Best -/********************************************************************** - - Nascom 1 and Nascom 2 - -**********************************************************************/ - -#include "emu.h" -#include "includes/nascom1.h" -#include "cpu/z80/z80.h" -#include "machine/ay31015.h" -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "imagedev/flopdrv.h" -#include "machine/ram.h" - -#define NASCOM1_KEY_RESET 0x02 -#define NASCOM1_KEY_INCR 0x01 - - -/************************************* - * - * Floppy - * - *************************************/ - -WRITE_LINE_MEMBER(nascom1_state::nascom2_fdc_intrq_w) -{ - m_nascom2_fdc.irq = state; -} - -WRITE_LINE_MEMBER(nascom1_state::nascom2_fdc_drq_w) -{ - m_nascom2_fdc.drq = state; -} - -READ8_MEMBER(nascom1_state::nascom2_fdc_select_r) -{ - return m_nascom2_fdc.select | 0xa0; -} - - -WRITE8_MEMBER(nascom1_state::nascom2_fdc_select_w) -{ - m_nascom2_fdc.select = data; - - logerror("nascom2_fdc_select_w: %02x\n", data); - - if (data & 0x01) m_fdc->set_drive(0); - if (data & 0x02) m_fdc->set_drive(1); - if (data & 0x04) m_fdc->set_drive(2); - if (data & 0x08) m_fdc->set_drive(3); - if (data & 0x10) m_fdc->set_side((data & 0x10) >> 4); -} - - -/* - * D0 -- WD1793 IRQ - * D1 -- NOT READY - * D2 to D6 -- 0 - * D7 -- WD1793 DRQ - * - */ -READ8_MEMBER(nascom1_state::nascom2_fdc_status_r) -{ - return (m_nascom2_fdc.drq << 7) | m_nascom2_fdc.irq; -} - -/************************************* - * - * Keyboard - * - *************************************/ - -READ8_MEMBER(nascom1_state::nascom1_port_00_r) -{ - if (m_portstat.stat_count < 9) - return ((m_keyboard[m_portstat.stat_count])->read() | ~0x7f); - - return (0xff); -} - - -WRITE8_MEMBER(nascom1_state::nascom1_port_00_w) -{ - m_cassette->change_state( - ( data & 0x10 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR ); - - if (!(data & NASCOM1_KEY_RESET)) - { - if (m_portstat.stat_flags & NASCOM1_KEY_RESET) - m_portstat.stat_count = 0; - } - else - m_portstat.stat_flags = NASCOM1_KEY_RESET; - - if (!(data & NASCOM1_KEY_INCR)) - { - if (m_portstat.stat_flags & NASCOM1_KEY_INCR) - m_portstat.stat_count++; - } - else - m_portstat.stat_flags = NASCOM1_KEY_INCR; -} - - - - -/************************************* - * - * Cassette - * - *************************************/ - - -READ8_MEMBER(nascom1_state::nascom1_port_01_r) -{ - return m_hd6402->get_received_data(); -} - - -WRITE8_MEMBER(nascom1_state::nascom1_port_01_w) -{ - m_hd6402->set_transmit_data(data); -} - -READ8_MEMBER(nascom1_state::nascom1_port_02_r) -{ - UINT8 data = 0x31; - - m_hd6402->set_input_pin(AY31015_SWE, 0); - data |= m_hd6402->get_output_pin(AY31015_OR ) ? 0x02 : 0; - data |= m_hd6402->get_output_pin(AY31015_PE ) ? 0x04 : 0; - data |= m_hd6402->get_output_pin(AY31015_FE ) ? 0x08 : 0; - data |= m_hd6402->get_output_pin(AY31015_TBMT) ? 0x40 : 0; - data |= m_hd6402->get_output_pin(AY31015_DAV ) ? 0x80 : 0; - m_hd6402->set_input_pin(AY31015_SWE, 1); - - return data; -} - - -READ8_MEMBER(nascom1_state::nascom1_hd6402_si) -{ - return 1; -} - - -WRITE8_MEMBER(nascom1_state::nascom1_hd6402_so) -{ -} - - -DEVICE_IMAGE_LOAD_MEMBER( nascom1_state,nascom1_cassette ) -{ - m_tape_size = image.length(); - m_tape_image = (UINT8*)image.ptr(); - if (!m_tape_image) - return IMAGE_INIT_FAIL; - - m_tape_index = 0; - return IMAGE_INIT_PASS; -} - - -DEVICE_IMAGE_UNLOAD_MEMBER( nascom1_state,nascom1_cassette ) -{ - m_tape_image = NULL; - m_tape_size = m_tape_index = 0; -} - - - -/************************************* - * - * Snapshots - * - * ASCII .nas format - * - *************************************/ - -SNAPSHOT_LOAD_MEMBER( nascom1_state, nascom1 ) -{ - UINT8 line[35]; - - while (image.fread( &line, sizeof(line)) == sizeof(line)) - { - int addr, b0, b1, b2, b3, b4, b5, b6, b7, dummy; - - if (sscanf((char *)line, "%x %x %x %x %x %x %x %x %x %x\010\010\n", - &addr, &b0, &b1, &b2, &b3, &b4, &b5, &b6, &b7, &dummy) == 10) - { - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b0); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b1); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b2); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b3); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b4); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b5); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b6); - m_maincpu->space(AS_PROGRAM).write_byte(addr++, b7); - } - } - - return IMAGE_INIT_PASS; -} - - - -/************************************* - * - * Initialization - * - *************************************/ - -void nascom1_state::machine_reset() -{ - /* Set up hd6402 pins */ - m_hd6402->set_input_pin(AY31015_SWE, 1); - - m_hd6402->set_input_pin(AY31015_CS, 0); - m_hd6402->set_input_pin(AY31015_NP, 1); - m_hd6402->set_input_pin(AY31015_NB1, 1); - m_hd6402->set_input_pin(AY31015_NB2, 1); - m_hd6402->set_input_pin(AY31015_EPS, 1); - m_hd6402->set_input_pin(AY31015_TSB, 1); - m_hd6402->set_input_pin(AY31015_CS, 1); -} - -DRIVER_INIT_MEMBER(nascom1_state,nascom1) -{ - switch (m_ram->size()) - { - case 1 * 1024: - m_maincpu->space(AS_PROGRAM).nop_readwrite( - 0x1400, 0x9000); - break; - - case 16 * 1024: - m_maincpu->space(AS_PROGRAM).install_readwrite_bank( - 0x1400, 0x4fff, "bank1"); - m_maincpu->space(AS_PROGRAM).nop_readwrite( - 0x5000, 0xafff); - membank("bank1")->set_base(m_ram->pointer()); - break; - - case 32 * 1024: - m_maincpu->space(AS_PROGRAM).install_readwrite_bank( - 0x1400, 0x8fff, "bank1"); - m_maincpu->space(AS_PROGRAM).nop_readwrite( - 0x9000, 0xafff); - membank("bank1")->set_base(m_ram->pointer()); - break; - - case 40 * 1024: - m_maincpu->space(AS_PROGRAM).install_readwrite_bank( - 0x1400, 0xafff, "bank1"); - membank("bank1")->set_base(m_ram->pointer()); - break; - } -} diff --git a/src/mess/machine/nc.c b/src/mess/machine/nc.c index 8d058a93cf4..07041c5c787 100644 --- a/src/mess/machine/nc.c +++ b/src/mess/machine/nc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:GPL-2.0+ // copyright-holders:Wilbert Pol, Kevin Thacker /*************************************************************************** diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c index a95ca75f4cc..c5cd79575ee 100644 --- a/src/mess/machine/nes.c +++ b/src/mess/machine/nes.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Brad Oliver,Fabio Priuli /***************************************************************************** diff --git a/src/mess/machine/psxcd.c b/src/mess/machine/psxcd.c index bdc47851ef6..c105cdebd5e 100644 --- a/src/mess/machine/psxcd.c +++ b/src/mess/machine/psxcd.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:smf +// copyright-holders:smf,R.Belmont,pSXAuthor,Carl #include "emu.h" #include "psxcd.h" #include "debugger.h" diff --git a/src/mess/machine/psxcd.h b/src/mess/machine/psxcd.h index b8459448d68..5949ea7367a 100644 --- a/src/mess/machine/psxcd.h +++ b/src/mess/machine/psxcd.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:smf +// copyright-holders:smf,R.Belmont,pSXAuthor,Carl #ifndef _included_psxcdrom_ #define _included_psxcdrom_ diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c index 720499761b4..fae0d92944a 100644 --- a/src/mess/machine/rmnimbus.c +++ b/src/mess/machine/rmnimbus.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phill Harvey-Smith +// license:BSD-3-Clause +// copyright-holders:Phill Harvey-Smith,Carl /* machine/rmnimbus.c diff --git a/src/mess/machine/sorcerer.c b/src/mess/machine/sorcerer.c index e7d42dc52fd..ea3d70dfbc5 100644 --- a/src/mess/machine/sorcerer.c +++ b/src/mess/machine/sorcerer.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker, Robbbert /****************************************************************************** diff --git a/src/mess/machine/spec_snqk.c b/src/mess/machine/spec_snqk.c index a000c7dccff..5a2bbcc8917 100644 --- a/src/mess/machine/spec_snqk.c +++ b/src/mess/machine/spec_snqk.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/machine/spec_snqk.h b/src/mess/machine/spec_snqk.h index 86a058f38b8..6eec8f90ade 100644 --- a/src/mess/machine/spec_snqk.h +++ b/src/mess/machine/spec_snqk.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /***************************************************************************** * diff --git a/src/mess/machine/svi318.c b/src/mess/machine/svi318.c index aa2525d365b..2e22cd034d8 100644 --- a/src/mess/machine/svi318.c +++ b/src/mess/machine/svi318.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Sean Young,Tomas Karlsson /* ** Spectravideo SVI-318 and SVI-328 diff --git a/src/mess/machine/swtpc09.c b/src/mess/machine/swtpc09.c index 12a93d584f5..719eb29ce0c 100644 --- a/src/mess/machine/swtpc09.c +++ b/src/mess/machine/swtpc09.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Robert Justice /*************************************************************************** swtpc09 machine file diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c index 8d4fc0abd4a..42073599b14 100644 --- a/src/mess/machine/ti85.c +++ b/src/mess/machine/ti85.c @@ -900,15 +900,15 @@ void ti85_state::ti83pse_count( UINT8 timer, UINT8 data) switch (timer) { case CRYSTAL_TIMER1: - m_crystal_timer1->adjust(attotime::zero, 0, attotime::from_hz( 32768.0/m_ctimer[timer].divsor)); + m_crystal_timer1->adjust(attotime::zero, 0, attotime::from_hz( 32768.0f/m_ctimer[timer].divsor)); m_crystal_timer1->enable(true); break; case CRYSTAL_TIMER2: - m_crystal_timer2->adjust(attotime::zero, 0, attotime::from_hz( 32768.0/m_ctimer[timer].divsor)); + m_crystal_timer2->adjust(attotime::zero, 0, attotime::from_hz( 32768.0f/m_ctimer[timer].divsor)); m_crystal_timer2->enable(true); break; case CRYSTAL_TIMER3: - m_crystal_timer3->adjust(attotime::zero, 0, attotime::from_hz( 32768.0/m_ctimer[timer].divsor)); + m_crystal_timer3->adjust(attotime::zero, 0, attotime::from_hz( 32768.0f/m_ctimer[timer].divsor)); m_crystal_timer3->enable(true); break; diff --git a/src/mess/machine/victor9k_fdc.c b/src/mess/machine/victor9k_fdc.c index 2fb6c617983..9fdf6f7c083 100644 --- a/src/mess/machine/victor9k_fdc.c +++ b/src/mess/machine/victor9k_fdc.c @@ -577,7 +577,7 @@ void victor_9000_fdc_t::update_spindle_motor(floppy_image_device *floppy, emu_ti if (!floppy->mon_r()) { float tach = rpm[da] / 60 * SPINDLE_RATIO * MOTOR_POLES; - if (LOG_SCP) logerror("%s: motor speed %u rpm / tach %0.1f hz (DA %02x)\n", floppy->tag(), rpm[da], tach, da); + if (LOG_SCP) logerror("%s: motor speed %u rpm / tach %0.1f hz (DA %02x)\n", floppy->tag(), rpm[da], (double) tach, da); t_tach->adjust(attotime::from_hz(tach*2), 0, attotime::from_hz(tach*2)); floppy->set_rpm(rpm[da]); diff --git a/src/mess/tools/imgtool/imgtool.c b/src/mess/tools/imgtool/imgtool.c index f5ca6467921..df44a9bbff2 100644 --- a/src/mess/tools/imgtool/imgtool.c +++ b/src/mess/tools/imgtool/imgtool.c @@ -343,9 +343,9 @@ static imgtoolerr_t evaluate_module(const char *fname, goto done; if (ent.corrupt) - current_result = (current_result * 99 + 1.00) / 100; + current_result = (current_result * 99 + 1.00f) / 100; else - current_result = (current_result + 1.00) / 2; + current_result = (current_result + 1.00f) / 2; } while(!ent.eof); @@ -429,7 +429,7 @@ imgtoolerr_t imgtool_identify_file(const char *fname, imgtool_module **modules, goto done; insert_module = module; - for (i = 0; (val > 0.0) && (i < count); i++) + for (i = 0; (val > 0.0f) && (i < count); i++) { if (val > values[i]) { diff --git a/src/mess/tools/imgtool/modules/cybiko.c b/src/mess/tools/imgtool/modules/cybiko.c index 9b8eada792a..1fc2afd319b 100644 --- a/src/mess/tools/imgtool/modules/cybiko.c +++ b/src/mess/tools/imgtool/modules/cybiko.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/mess/tools/imgtool/modules/cybikoxt.c b/src/mess/tools/imgtool/modules/cybikoxt.c index f44191e620e..a1908dc9c76 100644 --- a/src/mess/tools/imgtool/modules/cybikoxt.c +++ b/src/mess/tools/imgtool/modules/cybikoxt.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Tim Schuerewegen /* diff --git a/src/mess/tools/imgtool/modules/os9.c b/src/mess/tools/imgtool/modules/os9.c index a6971836ec5..2a9e2fb0292 100644 --- a/src/mess/tools/imgtool/modules/os9.c +++ b/src/mess/tools/imgtool/modules/os9.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Nathan Woods /**************************************************************************** diff --git a/src/mess/video/abc806.c b/src/mess/video/abc806.c index 9d3f3944adb..f958b025b1c 100644 --- a/src/mess/video/abc806.c +++ b/src/mess/video/abc806.c @@ -6,17 +6,6 @@ * ****************************************************************************/ -/* - - TODO: - - - hook up RAD prom - - flashing - - double height - - underline - -*/ - #include "includes/abc80x.h" @@ -227,7 +216,6 @@ MC6845_UPDATE_ROW( abc806_state::abc806_update_row ) { const pen_t *pen = m_palette->pens(); -// UINT8 old_data = 0xff; int fg_color = 7; int bg_color = 0; int underline = 0; @@ -242,21 +230,21 @@ MC6845_UPDATE_ROW( abc806_state::abc806_update_row ) { UINT8 data = m_char_ram[(ma + column) & 0x7ff]; UINT8 attr = m_attr_ram[(ma + column) & 0x7ff]; - UINT16 rad_addr; UINT8 rad_data; if ((attr & 0x07) == ((attr >> 3) & 0x07)) { // special case - switch (attr >> 6) { case 0: // use previously selected attributes break; + case 1: // reserved for future use break; + case 2: // blank fg_color = 0; @@ -264,6 +252,7 @@ MC6845_UPDATE_ROW( abc806_state::abc806_update_row ) underline = 0; flash = 0; break; + case 3: // double width e5 = BIT(attr, 0); @@ -299,10 +288,8 @@ MC6845_UPDATE_ROW( abc806_state::abc806_update_row ) } else { - rad_addr = (e6 << 8) | (e5 << 7) | (flash << 6) | (underline << 5) | (m_flshclk << 4) | ra; + UINT16 rad_addr = (e6 << 8) | (e5 << 7) | (flash << 6) | (underline << 4) | (m_flshclk << 5) | (ra & 0x0f); rad_data = m_rad_prom->base()[rad_addr] & 0x0f; - - rad_data = ra; // HACK because the RAD prom is not dumped yet } UINT16 chargen_addr = (th << 12) | (data << 4) | rad_data; @@ -328,8 +315,6 @@ MC6845_UPDATE_ROW( abc806_state::abc806_update_row ) { column++; } - -// old_data = data; } } diff --git a/src/mess/video/avigo.c b/src/mess/video/avigo.c index 802e3c8de3d..0177023fe9f 100644 --- a/src/mess/video/avigo.c +++ b/src/mess/video/avigo.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /*************************************************************************** diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c index 06400a45ed8..8297f4cacaf 100644 --- a/src/mess/video/bbc.c +++ b/src/mess/video/bbc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Gordon Jefferyes, Nigel Barnes /****************************************************************************** BBC Model B diff --git a/src/mess/video/gba.c b/src/mess/video/gba.c index 3feb060c195..4745141e504 100644 --- a/src/mess/video/gba.c +++ b/src/mess/video/gba.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:R.Belmont,Ryan Holtz +// copyright-holders:R. Belmont,Ryan Holtz /*************************************************************************** gba.c diff --git a/src/mess/video/hec2video.c b/src/mess/video/hec2video.c index f82fbcc2b97..f16f23b8363 100644 --- a/src/mess/video/hec2video.c +++ b/src/mess/video/hec2video.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:JJ Stacino ///////////////////////////////////////////////////////////////////////////////// ///// Hector video diff --git a/src/mess/video/kc.c b/src/mess/video/kc.c index dc87b4599e4..9a9dcbce29b 100644 --- a/src/mess/video/kc.c +++ b/src/mess/video/kc.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /*************************************************************************** diff --git a/src/mess/video/mbc55x.c b/src/mess/video/mbc55x.c index acc7ee37cc8..165c0979903 100644 --- a/src/mess/video/mbc55x.c +++ b/src/mess/video/mbc55x.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phill Harvey-Smith /* video/mbc55x.c diff --git a/src/mess/video/nascom1.c b/src/mess/video/nascom1.c deleted file mode 100644 index 56bed3a9aa9..00000000000 --- a/src/mess/video/nascom1.c +++ /dev/null @@ -1,56 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:(Original Author?), Dirk Best -/*************************************************************************** - - nascom1.c - - Functions to emulate the video hardware of the nascom1. - -***************************************************************************/ - -#include "emu.h" -#include "includes/nascom1.h" - -UINT32 nascom1_state::screen_update_nascom1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 *videoram = m_videoram; - int sy, sx; - - for (sx = 0; sx < 48; sx++) - { - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, videoram[0x03ca + sx], - 1, 0, 0, sx * 8, 0); - } - - for (sy = 0; sy < 15; sy++) - { - for (sx = 0; sx < 48; sx++) - { - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, videoram[0x000a + (sy * 64) + sx], - 1, 0, 0, sx * 8, (sy + 1) * 16); - } - } - return 0; -} - -UINT32 nascom1_state::screen_update_nascom2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 *videoram = m_videoram; - int sy, sx; - - for (sx = 0; sx < 48; sx++) - { - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, videoram[0x03ca + sx], - 1, 0, 0, sx * 8, 0); - } - - for (sy = 0; sy < 15; sy++) - { - for (sx = 0; sx < 48; sx++) - { - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, videoram[0x000a + (sy * 64) + sx], - 1, 0, 0, sx * 8, (sy + 1) * 14); - } - } - return 0; -} diff --git a/src/mess/video/nc.c b/src/mess/video/nc.c index cd3c5e0d2f5..934bfbfd3a3 100644 --- a/src/mess/video/nc.c +++ b/src/mess/video/nc.c @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:GPL-2.0+ // copyright-holders:Wilbert Pol, Kevin Thacker /*************************************************************************** diff --git a/src/mess/video/nes.c b/src/mess/video/nes.c index 656858f46cf..3c898d58b1b 100644 --- a/src/mess/video/nes.c +++ b/src/mess/video/nes.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Brad Oliver,Fabio Priuli /*************************************************************************** diff --git a/src/mess/video/pcw.c b/src/mess/video/pcw.c index 18ebb58cefe..f4d18761636 100644 --- a/src/mess/video/pcw.c +++ b/src/mess/video/pcw.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/video/pcw16.c b/src/mess/video/pcw16.c index 15931a1e203..40324af4e7e 100644 --- a/src/mess/video/pcw16.c +++ b/src/mess/video/pcw16.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker #include "emu.h" #include "includes/pcw16.h" diff --git a/src/mess/video/rmnimbus.c b/src/mess/video/rmnimbus.c index 0d21cda143a..91bcc364c60 100644 --- a/src/mess/video/rmnimbus.c +++ b/src/mess/video/rmnimbus.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phill Harvey-Smith +// license:BSD-3-Clause +// copyright-holders:Phill Harvey-Smith, Carl /* video/rmnimbus.c diff --git a/src/mess/video/spectrum.c b/src/mess/video/spectrum.c index 6f2a95bd090..9eaed423e6f 100644 --- a/src/mess/video/spectrum.c +++ b/src/mess/video/spectrum.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/video/timex.c b/src/mess/video/timex.c index 9719b81ebfd..6b7bd460366 100644 --- a/src/mess/video/timex.c +++ b/src/mess/video/timex.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker /*************************************************************************** diff --git a/src/mess/video/x68k.c b/src/mess/video/x68k.c index fd8b69b5989..fce9998286a 100644 --- a/src/mess/video/x68k.c +++ b/src/mess/video/x68k.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Barry Rodewald +// copyright-holders:Barry Rodewald,Carl /* Sharp X68000 video functions diff --git a/src/mess/video/z88.c b/src/mess/video/z88.c index cb5ddb455d8..4b9a0b07f88 100644 --- a/src/mess/video/z88.c +++ b/src/mess/video/z88.c @@ -1,4 +1,4 @@ -// license:? +// license:GPL-2.0+ // copyright-holders:Kevin Thacker,Sandro Ronco /*************************************************************************** diff --git a/src/osd/modules/debugger/debugint.c b/src/osd/modules/debugger/debugint.c index 690dd1bd03e..41620def623 100644 --- a/src/osd/modules/debugger/debugint.c +++ b/src/osd/modules/debugger/debugint.c @@ -1115,7 +1115,7 @@ static void render_editor(DView_edit *editor) editor->container->manager().machine().ui().draw_text_full(editor->container, editor->str.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, NULL); width += 2 * UI_BOX_LR_BORDER; - maxwidth = MAX(width, 0.5); + maxwidth = MAX(width, 0.5f); /* compute our bounds */ x1 = 0.5f - 0.5f * maxwidth; diff --git a/src/osd/modules/opengl/SDL1211_opengl.h b/src/osd/modules/opengl/SDL1211_opengl.h index 3467c24c899..b068ebe6452 100644 --- a/src/osd/modules/opengl/SDL1211_opengl.h +++ b/src/osd/modules/opengl/SDL1211_opengl.h @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:GPL-2.0+ // copyright-holders:Sam Lantinga /* SDL - Simple DirectMedia Layer diff --git a/src/osd/modules/opengl/gl_shader_mgr.c b/src/osd/modules/opengl/gl_shader_mgr.c index 599bfd61ada..21ee7f9fc54 100644 --- a/src/osd/modules/opengl/gl_shader_mgr.c +++ b/src/osd/modules/opengl/gl_shader_mgr.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel #include <stdio.h> /* snprintf */ #include <stdlib.h> /* malloc */ diff --git a/src/osd/modules/opengl/gl_shader_mgr.h b/src/osd/modules/opengl/gl_shader_mgr.h index 7ba333c5c0c..ebb45e2ba7a 100644 --- a/src/osd/modules/opengl/gl_shader_mgr.h +++ b/src/osd/modules/opengl/gl_shader_mgr.h @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel #ifndef GL_SHADER_MGR_H diff --git a/src/osd/modules/opengl/gl_shader_tool.c b/src/osd/modules/opengl/gl_shader_tool.c index 4ca92c29a31..abf1420f77a 100644 --- a/src/osd/modules/opengl/gl_shader_tool.c +++ b/src/osd/modules/opengl/gl_shader_tool.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel /*** * diff --git a/src/osd/modules/opengl/gl_shader_tool.h b/src/osd/modules/opengl/gl_shader_tool.h index ecde4ce589e..921a68d96df 100644 --- a/src/osd/modules/opengl/gl_shader_tool.h +++ b/src/osd/modules/opengl/gl_shader_tool.h @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel /*** * diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh.c b/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh.c index 8d42c7b6d55..c900fc3bfc5 100644 --- a/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh.c +++ b/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_bilinear_idx16_lut_fsh_src[] = "\n" diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh.c b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh.c index 175eee19fb0..839daf76d5b 100644 --- a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh.c +++ b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_bilinear_rgb32_dir_fsh_src[] = "\n" diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh.c b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh.c index 9e0690fe552..da137f12cd5 100644 --- a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh.c +++ b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_bilinear_rgb32_lut_fsh_src[] = "\n" diff --git a/src/osd/modules/opengl/shader/glsl_general.vsh.c b/src/osd/modules/opengl/shader/glsl_general.vsh.c index 98520712392..2d63c43f57e 100644 --- a/src/osd/modules/opengl/shader/glsl_general.vsh.c +++ b/src/osd/modules/opengl/shader/glsl_general.vsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_general_vsh_src[] = "\n" diff --git a/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh.c b/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh.c index a3e9d61f565..163331764f5 100644 --- a/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh.c +++ b/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_plain_idx16_lut_fsh_src[] = "\n" diff --git a/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh.c b/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh.c index 6e5ac23c3b5..c2658aa164a 100644 --- a/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh.c +++ b/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_plain_rgb32_dir_fsh_src[] = "\n" diff --git a/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh.c b/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh.c index e8465f2a117..9c9be21b35b 100644 --- a/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh.c +++ b/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh.c @@ -1,4 +1,4 @@ -// license:GPL2.0+ +// license:BSD-3-Clause // copyright-holders:Sven Gothel const char glsl_plain_rgb32_lut_fsh_src[] = "\n" diff --git a/src/osd/modules/render/draw13.c b/src/osd/modules/render/draw13.c index 822de807861..95248dfc205 100644 --- a/src/osd/modules/render/draw13.c +++ b/src/osd/modules/render/draw13.c @@ -110,10 +110,10 @@ public: const render_texinfo &texinfo() const { return m_texinfo; } render_texinfo &texinfo() { return m_texinfo; } - const HashT hash() const { return m_hash; } - const UINT32 flags() const { return m_flags; } + HashT hash() const { return m_hash; } + UINT32 flags() const { return m_flags; } // FIXME: - const bool is_pixels_owned() const; + bool is_pixels_owned() const; private: Uint32 m_sdl_access; @@ -901,7 +901,7 @@ copy_info_t *texture_info::compute_size_type() } // FIXME: -const bool texture_info::is_pixels_owned() const +bool texture_info::is_pixels_owned() const { // do we own / allocated it ? return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC) && (m_copyinfo->blitter->m_is_passthrough)); @@ -1079,8 +1079,8 @@ void quad_setup_data::compute(const render_primitive &prim, const int prescale) fdudy = (texcoords->bl.u - texcoords->tl.u); // b a12 fdvdy = (texcoords->bl.v - texcoords->tl.v); // d a22 - width = fabs(( fdudx * (float) (texwidth) + fdvdx * (float) (texheight)) ) * fscale; - height = fabs((fdudy * (float) (texwidth) + fdvdy * (float) (texheight)) ) * fscale; + width = fabsf(( fdudx * (float) (texwidth) + fdvdx * (float) (texheight)) ) * fscale; + height = fabsf((fdudy * (float) (texwidth) + fdvdy * (float) (texheight)) ) * fscale; fdudx = signf(fdudx) / fscale; fdvdy = signf(fdvdy) / fscale; diff --git a/src/osd/modules/sound/sdl_sound.c b/src/osd/modules/sound/sdl_sound.c index 9bce69907cb..4506057f675 100644 --- a/src/osd/modules/sound/sdl_sound.c +++ b/src/osd/modules/sound/sdl_sound.c @@ -184,7 +184,7 @@ void sound_sdl::unlock_buffer(void) void sound_sdl::att_memcpy(void *dest, const INT16 *data, int bytes_to_copy) { - int level= (int) (pow(10.0, (float) attenuation / 20.0) * 128.0); + int level= (int) (pow(10.0, (double) attenuation / 20.0) * 128.0); INT16 *d = (INT16 *) dest; int count = bytes_to_copy/2; while (count>0) diff --git a/src/osd/sdl/man/castool.1 b/src/osd/sdl/man/castool.1 index 88e6ab7d9ad..81a3cbdad5e 100644 --- a/src/osd/sdl/man/castool.1 +++ b/src/osd/sdl/man/castool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco <c.falco@ubuntu.com>, February 2011 .\" .\" -.TH CASTOOL 1 2015-04-25 0.161 "MESS Generic cassette manipulation tool" +.TH CASTOOL 1 2015-05-20 0.162 "MESS Generic cassette manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/chdman.1 b/src/osd/sdl/man/chdman.1 index 592854200d8..99b45645515 100644 --- a/src/osd/sdl/man/chdman.1 +++ b/src/osd/sdl/man/chdman.1 @@ -6,7 +6,7 @@ .\" Ashley T. Howes <debiandev@ashleyhowes.com>, February 2005 .\" updated by Cesare Falco <c.falco@ubuntu.com>, February 2007 .\" -.TH CHDMAN 1 2015-04-25 0.161 "MAME Compressed Hunks of Data (CHD) manager" +.TH CHDMAN 1 2015-05-20 0.162 "MAME Compressed Hunks of Data (CHD) manager" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/floptool.1 b/src/osd/sdl/man/floptool.1 index 4ff8f44c27e..6b17f52cbf6 100644 --- a/src/osd/sdl/man/floptool.1 +++ b/src/osd/sdl/man/floptool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco <c.falco@ubuntu.com>, April 2014 .\" .\" -.TH FLOPTOOL 1 2015-04-25 0.161 "MESS Generic floppy manipulation tool" +.TH FLOPTOOL 1 2015-05-20 0.162 "MESS Generic floppy manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/imgtool.1 b/src/osd/sdl/man/imgtool.1 index 544e56af6c9..4f80ecb5414 100644 --- a/src/osd/sdl/man/imgtool.1 +++ b/src/osd/sdl/man/imgtool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco <c.falco@ubuntu.com>, February 2011 .\" .\" -.TH IMGTOOL 1 2015-04-25 0.161 "MESS media image manipulation tool" +.TH IMGTOOL 1 2015-05-20 0.162 "MESS media image manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/jedutil.1 b/src/osd/sdl/man/jedutil.1 index 4c5f094efcf..23b48b280e1 100644 --- a/src/osd/sdl/man/jedutil.1 +++ b/src/osd/sdl/man/jedutil.1 @@ -8,7 +8,7 @@ .\" References .\" http://aarongiles.com/?p=159 .\" -.TH JEDUTIL 1 2015-04-25 0.161 "MAME JEDEC file utilities" +.TH JEDUTIL 1 2015-05-20 0.162 "MAME JEDEC file utilities" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/ldresample.1 b/src/osd/sdl/man/ldresample.1 index 4a15b8d8416..79c6b7ef391 100644 --- a/src/osd/sdl/man/ldresample.1 +++ b/src/osd/sdl/man/ldresample.1 @@ -3,7 +3,7 @@ .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .\" -.TH LDRESAMPLE 1 2015-04-25 0.161 "MAME laserdisc audio manipulation tool" +.TH LDRESAMPLE 1 2015-05-20 0.162 "MAME laserdisc audio manipulation tool" .\" .\" Please adjust this date whenever revising the manpage. .\" diff --git a/src/osd/sdl/man/ldverify.1 b/src/osd/sdl/man/ldverify.1 index d08ad4b0be9..3fc2b471cee 100644 --- a/src/osd/sdl/man/ldverify.1 +++ b/src/osd/sdl/man/ldverify.1 @@ -5,7 +5,7 @@ .\" Man page created from source and usage information by .\" Cesare Falco <c.falco@ubuntu.com>, August 2008 .\" -.TH LDVERIFY 1 2015-04-25 0.161 "MAME laserdisc data checker" +.TH LDVERIFY 1 2015-05-20 0.162 "MAME laserdisc data checker" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/mame.6 b/src/osd/sdl/man/mame.6 index f85ddf66fd5..736b0a2f8d4 100644 --- a/src/osd/sdl/man/mame.6 +++ b/src/osd/sdl/man/mame.6 @@ -13,7 +13,7 @@ .\" and updated by Andrew Burton <burtona@gol.com>, July 2003 .\" .\" -.TH MAME 6 2015-04-25 0.161 "MAME \- The Multiple Arcade Machine Emulator" +.TH MAME 6 2015-05-20 0.162 "MAME \- The Multiple Arcade Machine Emulator" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/mess.6 b/src/osd/sdl/man/mess.6 index 3de152071d5..f1932d48f03 100644 --- a/src/osd/sdl/man/mess.6 +++ b/src/osd/sdl/man/mess.6 @@ -16,7 +16,7 @@ .\" http://www.mess.org/ .\" .\" -.TH MESS 6 2015-04-25 0.161 "The Multiple Emulator Super System (MESS)" +.TH MESS 6 2015-05-20 0.162 "The Multiple Emulator Super System (MESS)" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/romcmp.1 b/src/osd/sdl/man/romcmp.1 index 848c0caefc8..16328e2086c 100644 --- a/src/osd/sdl/man/romcmp.1 +++ b/src/osd/sdl/man/romcmp.1 @@ -9,7 +9,7 @@ .\" References .\" http://www.mame.net/mamefaq.html .\" -.TH ROMCMP 1 2015-04-25 0.161 "MAME romset checking tool" +.TH ROMCMP 1 2015-05-20 0.162 "MAME romset checking tool" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/testkeys.1 b/src/osd/sdl/man/testkeys.1 index 00016e22952..a357e81cfd0 100644 --- a/src/osd/sdl/man/testkeys.1 +++ b/src/osd/sdl/man/testkeys.1 @@ -5,7 +5,7 @@ .\" Man page created from source and usage information .\" Cesare Falco <c.falco@ubuntu.com>, February 2007 .\" -.TH TESTKEYS 1 2015-04-25 0.161 "MAME SDL keycode scanner" +.TH TESTKEYS 1 2015-05-20 0.162 "MAME SDL keycode scanner" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c index 77cd81732fb..d63df91b912 100644 --- a/src/osd/sdl/window.c +++ b/src/osd/sdl/window.c @@ -909,7 +909,7 @@ osd_dim sdl_window_info::pick_best_mode() if (m_win_config.refresh) size_score *= 1.0f / (1.0f + fabsf(m_win_config.refresh - mode.refresh_rate) / 10.0f); - osd_printf_verbose("%4dx%4d@%2d -> %f\n", (int)mode.w, (int)mode.h, (int) mode.refresh_rate, size_score); + osd_printf_verbose("%4dx%4d@%2d -> %f\n", (int)mode.w, (int)mode.h, (int) mode.refresh_rate, (double) size_score); // best so far? if (size_score > best_score) diff --git a/src/tools/nltool.c b/src/tools/nltool.c index e88618d3997..317f3b285fa 100644 --- a/src/tools/nltool.c +++ b/src/tools/nltool.c @@ -83,10 +83,11 @@ struct options_entry oplist[] = { { "time_to_run;t", "1.0", OPTION_FLOAT, "time to run the emulation (seconds)" }, { "logs;l", "", OPTION_STRING, "colon separated list of terminals to log" }, - { "f", "-", OPTION_STRING, "file to process (default is stdin)" }, - { "listdevices;ld", "", OPTION_BOOLEAN, "list all devices available for use" }, + { "file;f", "-", OPTION_STRING, "file to process (default is stdin)" }, + { "cmd;c", "run", OPTION_STRING, "run|convert|listdevices" }, + { "verbose;v", "0", OPTION_BOOLEAN, "be verbose - this produces lots of output" }, { "help;h", "0", OPTION_BOOLEAN, "display help" }, - { NULL } + { NULL, NULL, 0, NULL } }; NETLIST_START(dummy) @@ -101,9 +102,9 @@ NETLIST_END() CORE IMPLEMENTATION ***************************************************************************/ -const char *filetobuf(pstring fname) +pstring filetobuf(pstring fname) { - static pstring pbuf = ""; + pstring pbuf = ""; if (fname == "-") { @@ -114,7 +115,7 @@ const char *filetobuf(pstring fname) pbuf += lbuf; } printf("%d\n",*(pbuf.right(1).cstr()+1)); - return pbuf.cstr(); + return pbuf; } else { @@ -128,7 +129,9 @@ const char *filetobuf(pstring fname) fread(buf, fsize, 1, f); buf[fsize] = 0; fclose(f); - return buf; + pbuf = buf; + free(buf); + return pbuf; } } @@ -137,7 +140,7 @@ class netlist_tool_t : public netlist_base_t public: netlist_tool_t() - : netlist_base_t(), m_logs(""), m_setup(NULL) + : netlist_base_t(), m_logs(""), m_verbose(false), m_setup(NULL) { } @@ -145,7 +148,7 @@ public: void init() { - m_setup = new netlist_setup_t(*this); + m_setup = nl_alloc(netlist_setup_t, *this); this->init_object(*this, "netlist"); m_setup->init(); } @@ -181,6 +184,9 @@ public: } pstring m_logs; + + bool m_verbose; + protected: void verror(const loglevel_e level, const char *format, va_list ap) const @@ -188,6 +194,12 @@ protected: switch (level) { case NL_LOG: + if (m_verbose) + { + vprintf(format, ap); + printf("\n"); + } + break; case NL_WARNING: vprintf(format, ap); printf("\n"); @@ -224,6 +236,7 @@ static void run(core_options &opts) nt.init(); nt.m_logs = opts.value("l"); + nt.m_verbose = opts.bool_value("v"); nt.read_netlist(filetobuf(opts.value("f"))); double ttr = opts.float_value("t"); @@ -232,11 +245,16 @@ static void run(core_options &opts) t = osd_ticks(); nt.process_queue(netlist_time::from_double(ttr)); + nt.stop(); double emutime = (double) (osd_ticks() - t) / (double) osd_ticks_per_second(); printf("%f seconds emulation took %f real time ==> %5.2f%%\n", ttr, emutime, ttr/emutime*100.0); } +/*------------------------------------------------- + listdevices - list all known devices +-------------------------------------------------*/ + static void listdevices() { netlist_tool_t nt; @@ -292,6 +310,304 @@ static void listdevices() } /*------------------------------------------------- + convert - convert a spice netlist +-------------------------------------------------*/ + +class convert_t +{ +public: + void convert(pstring contents) + { + nl_util::pstring_list spnl = nl_util::split(contents, "\n"); + + // Add gnd net + + nets.add(nl_alloc(sp_net_t, "0"), false); + nets[0]->terminals().add("GND"); + + pstring line = ""; + + for (int i=0; i < spnl.count(); i++) + { + // Basic preprocessing + pstring inl = spnl[i].trim().ucase(); + if (inl.startsWith("+")) + line = line + inl.substr(1); + else + { + process_line(line); + line = inl; + } + } + process_line(line); + dump_nl(); + } + +protected: + struct sp_net_t + { + public: + sp_net_t(const pstring &aname) + : m_name(aname), m_no_export(false) {} + + const pstring &name() { return m_name;} + nl_util::pstring_list &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; + }; + + struct sp_dev_t + { + public: + sp_dev_t(const pstring atype, const pstring aname, const pstring amodel) + : m_type(atype), m_name(aname), m_model(amodel), m_val(0), m_has_val(false) + {} + + sp_dev_t(const pstring atype, const pstring aname, double aval) + : m_type(atype), m_name(aname), m_model(""), m_val(aval), m_has_val(true) + {} + + sp_dev_t(const pstring atype, const pstring aname) + : m_type(atype), m_name(aname), m_model(""), m_val(0.0), m_has_val(false) + {} + + const pstring &name() { return m_name;} + const pstring &type() { return m_type;} + const pstring &model() { return m_model;} + const double &value() { return m_val;} + + bool has_model() { return m_model != ""; } + bool has_value() { return m_has_val; } + + private: + pstring m_type; + pstring m_name; + pstring m_model; + double m_val; + bool m_has_val; + }; + + struct sp_unit { + pstring sp_unit; + pstring nl_func; + double mult; + }; + + + void add_term(pstring netname, pstring termname) + { + sp_net_t * net = nets.find(netname); + if (net == NULL) + { + net = nl_alloc(sp_net_t, netname); + nets.add(net, false); + } + net->terminals().add(termname); + } + + const pstring get_nl_val(const double val) + { + { + int i = 0; + while (m_sp_units[i].sp_unit != "-" ) + { + if (m_sp_units[i].mult <= nl_math::abs(val)) + break; + i++; + } + return pstring::sprintf(m_sp_units[i].nl_func.cstr(), val / m_sp_units[i].mult); + } + } + double get_sp_unit(const pstring &unit) + { + int i = 0; + while (m_sp_units[i].sp_unit != "-") + { + if (m_sp_units[i].sp_unit == unit) + return m_sp_units[i].mult; + i++; + } + fprintf(stderr, "Unit %s unknown\n", unit.cstr()); + return 0.0; + } + + double get_sp_val(const pstring &sin) + { + int p = sin.len() - 1; + while (p>=0 && (sin.substr(p,1) < "0" || sin.substr(p,1) > "9")) + p--; + pstring val = sin.substr(0,p + 1); + pstring unit = sin.substr(p + 1); + + double ret = get_sp_unit(unit) * val.as_double(); + //printf("<%s> %s %d ==> %f\n", sin.cstr(), unit.cstr(), p, ret); + return ret; + } + + void dump_nl() + { + for (int i=0; i<alias.count(); i++) + { + sp_net_t *net = nets.find(alias[i]); + // use the first terminal ... + printf("ALIAS(%s, %s)\n", alias[i].cstr(), net->terminals()[0].cstr()); + // if the aliased net only has this one terminal connected ==> don't dump + if (net->terminals().count() == 1) + net->set_no_export(); + } + for (int i=0; i<devs.count(); i++) + { + if (devs[i]->has_value()) + printf("%s(%s, %s)\n", devs[i]->type().cstr(), + devs[i]->name().cstr(), get_nl_val(devs[i]->value()).cstr()); + else if (devs[i]->has_model()) + printf("%s(%s, \"%s\")\n", devs[i]->type().cstr(), + devs[i]->name().cstr(), devs[i]->model().cstr()); + else + printf("%s(%s)\n", devs[i]->type().cstr(), + devs[i]->name().cstr()); + } + // print nets + for (int i=0; i<nets.count(); i++) + { + sp_net_t * net = nets[i]; + if (!net->is_no_export()) + { + //printf("Net %s\n", net->name().cstr()); + printf("NET_C(%s", net->terminals()[0].cstr() ); + for (int j=1; j<net->terminals().count(); j++) + { + printf(", %s", net->terminals()[j].cstr() ); + } + printf(")\n"); + } + } + devs.clear_and_free(); + nets.clear_and_free(); + alias.clear(); + } + + void process_line(const pstring &line) + { + if (line != "") + { + nl_util::pstring_list tt = nl_util::split(line, " ", true); + switch (tt[0].cstr()[0]) + { + case ';': + printf("// %s\n", line.substr(1).cstr()); + break; + case '*': + printf("// %s\n", line.substr(1).cstr()); + break; + case '.': + if (tt[0].equals(".SUBCKT")) + { + printf("NETLIST_START(%s)\n", tt[1].cstr()); + for (int i=2; i<tt.count(); i++) + alias.add(tt[i]); + } + else if (tt[0].equals(".ENDS")) + { + dump_nl(); + printf("NETLIST_END()\n"); + } + else + printf("// %s\n", line.cstr()); + break; + case 'Q': + { + bool cerr = false; + /* check for fourth terminal ... should be numeric net + * including "0" or start with "N" (ltspice) + */ + int nval =tt[4].as_long(&cerr); + if ((!cerr || tt[4].startsWith("N")) && tt.count() > 5) + devs.add(nl_alloc(sp_dev_t, "QBJT", tt[0], tt[5]), false); + else + devs.add(nl_alloc(sp_dev_t, "QBJT", tt[0], tt[4]), false); + add_term(tt[1], tt[0] + ".C"); + add_term(tt[2], tt[0] + ".B"); + add_term(tt[3], tt[0] + ".E"); + } + break; + case 'R': + devs.add(nl_alloc(sp_dev_t, "RES", tt[0], get_sp_val(tt[3])), false); + add_term(tt[1], tt[0] + ".1"); + add_term(tt[2], tt[0] + ".2"); + break; + case 'C': + devs.add(nl_alloc(sp_dev_t, "CAP", tt[0], get_sp_val(tt[3])), false); + add_term(tt[1], tt[0] + ".1"); + add_term(tt[2], tt[0] + ".2"); + break; + case 'V': + // just simple Voltage sources .... + if (tt[2].equals("0")) + { + devs.add(nl_alloc(sp_dev_t, "ANALOG_INPUT", tt[0], get_sp_val(tt[3])), false); + add_term(tt[1], tt[0] + ".Q"); + //add_term(tt[2], tt[0] + ".2"); + } + else + fprintf(stderr, "Voltage Source %s not connected to GND\n", tt[0].cstr()); + break; + case 'D': + // FIXME: Rewrite resistor value + devs.add(nl_alloc(sp_dev_t, "DIODE", tt[0], tt[3]), false); + add_term(tt[1], tt[0] + ".A"); + add_term(tt[2], tt[0] + ".K"); + break; + case 'X': + // FIXME: specific code for KICAD exports + // last element is component type + devs.add(nl_alloc(sp_dev_t, "TTL_" + tt[tt.count()-1] + "_DIP", tt[0]), false); + for (int i=1; i < tt.count() - 1; i++) + { + pstring term = pstring::sprintf("%s.%d", tt[0].cstr(), i); + add_term(tt[i], term); + } + break; + default: + printf("// IGNORED %s: %s\n", tt[0].cstr(), line.cstr()); + } + } + } + + +private: + pnamedlist_t<sp_net_t *> nets; + pnamedlist_t<sp_dev_t *> devs; + plist_t<pstring> alias; + + static sp_unit m_sp_units[]; +}; + +convert_t::sp_unit convert_t::m_sp_units[] = { + {"T", "", 1.0e12 }, + {"G", "", 1.0e9 }, + {"MEG", "RES_M(%g)", 1.0e6 }, + {"K", "RES_K(%g)", 1.0e3 }, + {"", "%g", 1.0e0 }, + {"M", "CAP_M(%g)", 1.0e-3 }, + {"U", "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}, + + {"MIL", "%e", 25.4e-6}, + + {"-", "%g", 1.0 } +}; + + +/*------------------------------------------------- main - primary entry point -------------------------------------------------*/ @@ -315,13 +631,22 @@ int main(int argc, char *argv[]) return 1; } - if (opts.bool_value("ld")) - { + pstring cmd = opts.value("c"); + if (cmd == "listdevices") listdevices(); + else if (cmd == "run") + run(opts); + else if (cmd == "convert") + { + pstring contents = filetobuf(opts.value("f")); + convert_t converter; + converter.convert(contents); } else { - run(opts); + fprintf(stderr, "Unknown command %s\n", cmd.cstr()); + usage(opts); + return 1; } return 0; diff --git a/src/tools/unidasm.c b/src/tools/unidasm.c index a6e516b239d..55d27130631 100644 --- a/src/tools/unidasm.c +++ b/src/tools/unidasm.c @@ -113,6 +113,7 @@ CPU_DISASSEMBLE( jaguargpu ); CPU_DISASSEMBLE( konami ); CPU_DISASSEMBLE( lh5801 ); CPU_DISASSEMBLE( lr35902 ); +CPU_DISASSEMBLE( m58846 ); CPU_DISASSEMBLE( m37710_generic ); CPU_DISASSEMBLE( m6800 ); CPU_DISASSEMBLE( m68000 ); @@ -264,6 +265,7 @@ static const dasm_table_entry dasm_table[] = { "konami", _8bit, 0, CPU_DISASSEMBLE_NAME(konami) }, { "lh5801", _8bit, 0, CPU_DISASSEMBLE_NAME(lh5801) }, { "lr35902", _8bit, 0, CPU_DISASSEMBLE_NAME(lr35902) }, + { "m58846", _16le, -1, CPU_DISASSEMBLE_NAME(m58846) }, { "m37710", _8bit, 0, CPU_DISASSEMBLE_NAME(m37710_generic) }, { "m6800", _8bit, 0, CPU_DISASSEMBLE_NAME(m6800) }, { "m68000", _16be, 0, CPU_DISASSEMBLE_NAME(m68000) }, |