diff options
author | 2015-05-25 09:34:50 -0500 | |
---|---|---|
committer | 2015-05-25 09:34:50 -0500 | |
commit | afac3bc469213df3b0d20688ed58a5f882ef0dde (patch) | |
tree | d74c3ec82ea97fae22926cad206c56d6da844f55 | |
parent | 9bfa4397575fc3059bb4615901dba3183d894a3f (diff) | |
parent | dd4d6717959243998b96cb944936950ac8f7e212 (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
595 files changed, 2971 insertions, 3051 deletions
diff --git a/README.md b/README.md index 1fc7ca7a9b4..2dc5dd6892c 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,14 @@ 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. +License +======= + +MAME is in the process of becoming an Open Source project. We are still in process of contacting all developers from the past. We have received approval for the vast majority of contributions. + +Going forward, we will be using the 3-Clause BSD license for the core, and the LGPL version 2.1 or later, and the GPL version 2.0 or later, for certain drivers. As a whole, MAME will be delivered under the GPL version 2.0 or later. +As we are still contacting developers, MAME is still distributed under the [MAME license](docs/mamelicense.txt) as of this time. If you have not been contacted yet, and believe you have contributed code to MAME in the past, please [contact us](mailto:mamedev@mamedev.org). + How to compile? ============= @@ -64,3 +72,5 @@ Contributing 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. + +All contributors need to either add standard header for license info (on new files) or send us their wish under which of licenses they would like their code to be published under :[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), or for new files in mame/ or mess/, either the [BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause) license, the [LGPL-2.1+](http://spdx.org/licenses/LGPL-2.1+), or the [GPL-2.0+](http://spdx.org/licenses/GPL-2.0+). diff --git a/docs/licenseinfo.txt b/docs/licenseinfo.txt deleted file mode 100644 index 91ae09434f6..00000000000 --- a/docs/licenseinfo.txt +++ /dev/null @@ -1,4 +0,0 @@ -BSD-3-Clause: http://spdx.org/licenses/BSD-3-Clause -GPL-2.0+: http://spdx.org/licenses/GPL-2.0+ -LGPL-2.1+: http://spdx.org/licenses/LGPL-2.1+ -MAME: see docs/license.txt diff --git a/docs/license.txt b/docs/mamelicense.txt index 33267a54cb1..31f5d897dd3 100644 --- a/docs/license.txt +++ b/docs/mamelicense.txt @@ -1,5 +1,10 @@ -Unless otherwise explicitly stated, all code in MAME is released under the -following license: +The MAME project, as a whole, is currently released under the following +license, known as the MAME License. + +Most code in MAME is under a more permissive license, or dual-licensed. +This is noted in per-file headers which specify the alternate license. + +The text of the MAME License follows. Copyright Nicola Salmoria and the MAME team All rights reserved. diff --git a/hash/megadriv.xml b/hash/megadriv.xml index 10082ed16d6..91e4691498c 100644 --- a/hash/megadriv.xml +++ b/hash/megadriv.xml @@ -30073,6 +30073,19 @@ Notice that these are not working on real hardware due to bugged code with VDP i </part> </software> + <software name="suppoker"> + <description>Super Poker (Chi)</description> + <year>199?</year> + <publisher><unlicensed></publisher> + <info name="alt_title" value="Cha Oji Pu Ke"/> + <part name="cart" interface="megadriv_cart"> + <feature name="slot" value="rom_smouse"/> + <dataarea name="rom" width="16" endianness="big" size="4194304"> + <rom name="cha oji pu ke - super poker (ch).bin" size="4194304" crc="c37e6858" sha1="2aa4f27b2be3d98016fcff3709176682169da6c2" offset="0x000000"/> + </dataarea> + </part> + </software> + <!-- Are these unprotected versions legit? or were they hacked to work with emus? --> <software name="chinf3a" cloneof="chinf3"> diff --git a/hlsl/bloom.fx b/hlsl/bloom.fx index c01b3521442..f6a0c9d57d1 100644 --- a/hlsl/bloom.fx +++ b/hlsl/bloom.fx @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- // Effect File Variables diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx index 8d6eaa60c74..b7579fc24ed 100644 --- a/hlsl/downsample.fx +++ b/hlsl/downsample.fx @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- // Effect File Variables diff --git a/hlsl/focus.fx b/hlsl/focus.fx index f19a8a01eae..a7c6c7ae8f2 100644 --- a/hlsl/focus.fx +++ b/hlsl/focus.fx @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- // Effect File Variables diff --git a/hlsl/post.fx b/hlsl/post.fx index a5a6cccf164..48722f07399 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- // Scanline & Shadowmask Effect diff --git a/hlsl/simple.fx b/hlsl/simple.fx index bb58f37469f..e26ca3fbb36 100644 --- a/hlsl/simple.fx +++ b/hlsl/simple.fx @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- // Effect File Variables diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index d499aabbef4..74ee8ac027e 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -2440,11 +2440,29 @@ end 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", + MAME_DIR .. "src/emu/bus/cgenie/expansion/expansion.c", + MAME_DIR .. "src/emu/bus/cgenie/expansion/expansion.h", + MAME_DIR .. "src/emu/bus/cgenie/expansion/carts.c", + MAME_DIR .. "src/emu/bus/cgenie/expansion/carts.h", + MAME_DIR .. "src/emu/bus/cgenie/expansion/floppy.c", + MAME_DIR .. "src/emu/bus/cgenie/expansion/floppy.h", + } +end + +--------------------------------------------------- +-- +--@src/emu/bus/cgenie/parallel.h,BUSES += CGENIE_PARALLEL +--------------------------------------------------- + +if (BUSES["CGENIE_PARALLEL"]~=null) then + files { + MAME_DIR .. "src/emu/bus/cgenie/parallel/parallel.c", + MAME_DIR .. "src/emu/bus/cgenie/parallel/parallel.h", + MAME_DIR .. "src/emu/bus/cgenie/parallel/carts.c", + MAME_DIR .. "src/emu/bus/cgenie/parallel/carts.h", + MAME_DIR .. "src/emu/bus/cgenie/parallel/joystick.c", + MAME_DIR .. "src/emu/bus/cgenie/parallel/joystick.h", + MAME_DIR .. "src/emu/bus/cgenie/parallel/printer.c", + MAME_DIR .. "src/emu/bus/cgenie/parallel/printer.h", } end diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index d4738644375..54540f0f630 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -168,6 +168,8 @@ project "formats" MAME_DIR .. "src/lib/formats/c4040_dsk.h", MAME_DIR .. "src/lib/formats/c8280_dsk.c", MAME_DIR .. "src/lib/formats/c8280_dsk.h", + MAME_DIR .. "src/lib/formats/camplynx_cas.c", + MAME_DIR .. "src/lib/formats/camplynx_cas.h", MAME_DIR .. "src/lib/formats/cbm_crt.c", MAME_DIR .. "src/lib/formats/cbm_crt.h", MAME_DIR .. "src/lib/formats/cbm_tap.c", diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 6c79eb1b463..96d81688fc3 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -7,7 +7,6 @@ files { MAME_DIR .. "src/emu/netlist/nl_lists.h", MAME_DIR .. "src/emu/netlist/nl_time.h", MAME_DIR .. "src/emu/netlist/nl_util.h", - MAME_DIR .. "src/emu/netlist/plists.h", MAME_DIR .. "src/emu/netlist/nl_base.c", MAME_DIR .. "src/emu/netlist/nl_base.h", MAME_DIR .. "src/emu/netlist/nl_parser.c", @@ -16,8 +15,12 @@ files { MAME_DIR .. "src/emu/netlist/nl_setup.h", MAME_DIR .. "src/emu/netlist/nl_factory.c", MAME_DIR .. "src/emu/netlist/nl_factory.h", + MAME_DIR .. "src/emu/netlist/pconfig.h", + MAME_DIR .. "src/emu/netlist/palloc.c", + MAME_DIR .. "src/emu/netlist/palloc.h", MAME_DIR .. "src/emu/netlist/pstring.c", MAME_DIR .. "src/emu/netlist/pstring.h", + MAME_DIR .. "src/emu/netlist/plists.h", MAME_DIR .. "src/emu/netlist/pstate.c", MAME_DIR .. "src/emu/netlist/pstate.h", MAME_DIR .. "src/emu/netlist/analog/nld_bjt.c", diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 867fb0fcdb1..2d027f05677 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -580,6 +580,7 @@ BUSES["CBM2"] = true BUSES["CBMIEC"] = true BUSES["CENTRONICS"] = true BUSES["CGENIE_EXPANSION"] = true +BUSES["CGENIE_PARALLEL"] = true BUSES["CHANNELF"] = true BUSES["COCO"] = true BUSES["COLECO"] = true @@ -1405,8 +1406,6 @@ files { createMESSProjects(_target, _subtarget, "eaca") files { MAME_DIR .. "src/mess/drivers/cgenie.c", - MAME_DIR .. "src/mess/machine/cgenie.c", - MAME_DIR .. "src/mess/video/cgenie.c", } createMESSProjects(_target, _subtarget, "einis") diff --git a/src/emu/bus/abcbus/abc890.c b/src/emu/bus/abcbus/abc890.c index be5254cca6f..ecfc1abf4d2 100644 --- a/src/emu/bus/abcbus/abc890.c +++ b/src/emu/bus/abcbus/abc890.c @@ -53,7 +53,7 @@ machine_config_constructor abc890_t::device_mconfig_additions() const //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( abc_expansion_unit ) - MCFG_ABCBUS_SLOT_ADD("io1", abc80_cards, "slow") + MCFG_ABCBUS_SLOT_ADD("io1", abc80_cards, "abc830") MCFG_ABCBUS_SLOT_ADD("io2", abc80_cards, NULL) MCFG_ABCBUS_SLOT_ADD("io3", abc80_cards, NULL) MCFG_ABCBUS_SLOT_ADD("io4", abc80_cards, NULL) diff --git a/src/emu/bus/abcbus/abcbus.c b/src/emu/bus/abcbus/abcbus.c index fd801b8ebbc..b5491e4e101 100644 --- a/src/emu/bus/abcbus/abcbus.c +++ b/src/emu/bus/abcbus/abcbus.c @@ -104,6 +104,7 @@ SLOT_INTERFACE_START( abc80_cards ) SLOT_INTERFACE("abcexp", ABC_EXPANSION_UNIT) SLOT_INTERFACE("16k", ABC80_16KB_RAM_CARD) SLOT_INTERFACE("slow", LUXOR_55_10828) + SLOT_INTERFACE("abc830", ABC830) SLOT_INTERFACE_END diff --git a/src/emu/bus/cgenie/carts.c b/src/emu/bus/cgenie/expansion/carts.c index f4b23a5cf9d..f4b23a5cf9d 100644 --- a/src/emu/bus/cgenie/carts.c +++ b/src/emu/bus/cgenie/expansion/carts.c diff --git a/src/emu/bus/cgenie/carts.h b/src/emu/bus/cgenie/expansion/carts.h index 5dd3b67e172..45bf66a4c90 100644 --- a/src/emu/bus/cgenie/carts.h +++ b/src/emu/bus/cgenie/expansion/carts.h @@ -8,8 +8,8 @@ #pragma once -#ifndef __CGENIE_CARTS_H__ -#define __CGENIE_CARTS_H__ +#ifndef __CGENIE_EXPANSION_CARTS_H__ +#define __CGENIE_EXPANSION_CARTS_H__ #include "emu.h" @@ -17,4 +17,4 @@ SLOT_INTERFACE_EXTERN( expansion_slot_carts ); -#endif // __CGENIE_CARTS_H__ +#endif // __CGENIE_EXPANSION_CARTS_H__ diff --git a/src/emu/bus/cgenie/expansion.c b/src/emu/bus/cgenie/expansion/expansion.c index 88a89a32cce..88a89a32cce 100644 --- a/src/emu/bus/cgenie/expansion.c +++ b/src/emu/bus/cgenie/expansion/expansion.c diff --git a/src/emu/bus/cgenie/expansion.h b/src/emu/bus/cgenie/expansion/expansion.h index 79cbc1430b5..79cbc1430b5 100644 --- a/src/emu/bus/cgenie/expansion.h +++ b/src/emu/bus/cgenie/expansion/expansion.h diff --git a/src/emu/bus/cgenie/floppy.c b/src/emu/bus/cgenie/expansion/floppy.c index efb53807774..4101ae22040 100644 --- a/src/emu/bus/cgenie/floppy.c +++ b/src/emu/bus/cgenie/expansion/floppy.c @@ -5,9 +5,11 @@ EACA Colour Genie Floppy Disc Controller TODO: + - Only native MESS .mfi files load - What's the exact FD1793 model? - How does it turn off the motor? - How does it switch between FM/MFM? + - What's the source of the timer and the exact timings? ***************************************************************************/ @@ -65,7 +67,9 @@ const rom_entry *cgenie_fdc_device::device_rom_region() const //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( cgenie_fdc ) - MCFG_FD1793x_ADD("fd1793", XTAL_16MHz / 4 / 4) + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer", cgenie_fdc_device, timer_callback, attotime::from_msec(25)) + + MCFG_FD1793x_ADD("fd1793", XTAL_1MHz) 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) @@ -97,7 +101,7 @@ machine_config_constructor cgenie_fdc_device::device_mconfig_additions() const //------------------------------------------------- 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_t(mconfig, CGENIE_FDC, "Floppy Disc Controller", tag, owner, clock, "cgenie_fdc", __FILE__), device_expansion_interface(mconfig, *this), m_fdc(*this, "fd1793"), m_floppy0(*this, "fd1793:0"), @@ -105,7 +109,8 @@ cgenie_fdc_device::cgenie_fdc_device(const machine_config &mconfig, const char * m_floppy2(*this, "fd1793:2"), m_floppy3(*this, "fd1793:3"), m_socket(*this, "socket"), - m_floppy(NULL) + m_floppy(NULL), + m_irq_status(0) { } @@ -127,8 +132,9 @@ void cgenie_fdc_device::device_reset() m_slot->m_program->install_rom(0xc000, 0xdfff, memregion("software")->base()); // memory mapped i/o + m_slot->m_program->install_read_handler(0xffe0, 0xffe3, 0, 0x10, read8_delegate(FUNC(cgenie_fdc_device::irq_r), this)); 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_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 @@ -143,6 +149,22 @@ void cgenie_fdc_device::device_reset() // IMPLEMENTATION //************************************************************************** +READ8_MEMBER( cgenie_fdc_device::irq_r ) +{ + UINT8 data = m_irq_status; + + m_irq_status &= ~IRQ_TIMER; + m_slot->int_w(m_irq_status ? ASSERT_LINE : CLEAR_LINE); + + return data; +} + +TIMER_DEVICE_CALLBACK_MEMBER( cgenie_fdc_device::timer_callback ) +{ + m_irq_status |= IRQ_TIMER; + m_slot->int_w(ASSERT_LINE); +} + DEVICE_IMAGE_LOAD_MEMBER( cgenie_fdc_device, socket_load ) { UINT32 size = m_socket->common_get_size("rom"); @@ -164,8 +186,12 @@ 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); + if (state) + m_irq_status |= IRQ_WDC; + else + m_irq_status &= ~IRQ_WDC; + + m_slot->int_w(m_irq_status ? ASSERT_LINE : CLEAR_LINE); } WRITE8_MEMBER( cgenie_fdc_device::select_w ) diff --git a/src/emu/bus/cgenie/floppy.h b/src/emu/bus/cgenie/expansion/floppy.h index 6911358763d..ed51dd22efe 100644 --- a/src/emu/bus/cgenie/floppy.h +++ b/src/emu/bus/cgenie/expansion/floppy.h @@ -29,12 +29,16 @@ public: // construction/destruction cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + TIMER_DEVICE_CALLBACK_MEMBER(timer_callback); + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket_load); + DECLARE_WRITE_LINE_MEMBER(intrq_w); + DECLARE_READ8_MEMBER(irq_r); 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; @@ -43,6 +47,8 @@ protected: virtual void device_reset(); private: + void update_irq(); + required_device<fd1793_t> m_fdc; required_device<floppy_connector> m_floppy0; required_device<floppy_connector> m_floppy1; @@ -50,7 +56,15 @@ private: required_device<floppy_connector> m_floppy3; required_device<generic_slot_device> m_socket; + enum + { + IRQ_WDC = 0x40, + IRQ_TIMER = 0x80 + }; + floppy_image_device *m_floppy; + + UINT8 m_irq_status; }; // device type definition diff --git a/src/emu/bus/cgenie/parallel/carts.c b/src/emu/bus/cgenie/parallel/carts.c new file mode 100644 index 00000000000..61a6380117f --- /dev/null +++ b/src/emu/bus/cgenie/parallel/carts.c @@ -0,0 +1,14 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Parallel Carts + +***************************************************************************/ + +#include "carts.h" + +SLOT_INTERFACE_START( parallel_slot_carts ) + SLOT_INTERFACE("joystick", CGENIE_JOYSTICK) + SLOT_INTERFACE("printer", CGENIE_PRINTER) +SLOT_INTERFACE_END diff --git a/src/emu/bus/cgenie/parallel/carts.h b/src/emu/bus/cgenie/parallel/carts.h new file mode 100644 index 00000000000..29c092b9d0a --- /dev/null +++ b/src/emu/bus/cgenie/parallel/carts.h @@ -0,0 +1,21 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Parallel Carts + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_PARALLEL_CARTS_H__ +#define __CGENIE_PARALLEL_CARTS_H__ + +#include "emu.h" + +#include "joystick.h" +#include "printer.h" + +SLOT_INTERFACE_EXTERN( parallel_slot_carts ); + +#endif // __CGENIE_PARALLEL_CARTS_H__ diff --git a/src/emu/bus/cgenie/parallel/joystick.c b/src/emu/bus/cgenie/parallel/joystick.c new file mode 100644 index 00000000000..de520ba0669 --- /dev/null +++ b/src/emu/bus/cgenie/parallel/joystick.c @@ -0,0 +1,153 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Joystick Interface EG2013 + + Keypads are organized as 3x4 matrix. + +***************************************************************************/ + +#include "joystick.h" + + +//************************************************************************** +// CONSTANTS/MACROS +//************************************************************************** + +#define VERBOSE 0 + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type CGENIE_JOYSTICK = &device_creator<cgenie_joystick_device>; + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +static INPUT_PORTS_START( cgenie_joystick ) + PORT_START("JOY.0") + PORT_BIT(0x3f, 0x00, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_PLAYER(1) + + PORT_START("JOY.1") + PORT_BIT(0x3f, 0x00, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_PLAYER(1) PORT_REVERSE + + PORT_START("JOY.2") + PORT_BIT(0x3f, 0x00, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_PLAYER(2) + + PORT_START("JOY.3") + PORT_BIT(0x3f, 0x00, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_PLAYER(2) PORT_REVERSE + + PORT_START("KEYPAD.0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Keypad 1 Button 3") PORT_PLAYER(1) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Keypad 1 Button 6") PORT_PLAYER(1) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Keypad 1 Button 9") PORT_PLAYER(1) PORT_CODE(KEYCODE_9_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Keypad 1 Button #") PORT_PLAYER(1) PORT_CODE(KEYCODE_SLASH_PAD) + + PORT_START("KEYPAD.1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Keypad 1 Button 2") PORT_PLAYER(1) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON6) PORT_NAME("Keypad 1 Button 5") PORT_PLAYER(1) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON7) PORT_NAME("Keypad 1 Button 8") PORT_PLAYER(1) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON8) PORT_NAME("Keypad 1 Button 0") PORT_PLAYER(1) PORT_CODE(KEYCODE_0_PAD) + + PORT_START("KEYPAD.2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON9) PORT_NAME("Keypad 1 Button 1") PORT_PLAYER(1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON10) PORT_NAME("Keypad 1 Button 4") PORT_PLAYER(1) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON11) PORT_NAME("Keypad 1 Button 7") PORT_PLAYER(1) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON12) PORT_NAME("Keypad 1 Button *") PORT_PLAYER(1) PORT_CODE(KEYCODE_ASTERISK) + + PORT_START("KEYPAD.3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Keypad 2 Button 3") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON2) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Keypad 2 Button 6") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON5) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Keypad 2 Button 9") PORT_PLAYER(2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Keypad 2 Button #") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON1) + + PORT_START("KEYPAD.4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Keypad 2 Button 2") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON2) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON6) PORT_NAME("Keypad 2 Button 5") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON5) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON7) PORT_NAME("Keypad 2 Button 8") PORT_PLAYER(2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON8) PORT_NAME("Keypad 2 Button 0") PORT_PLAYER(2) + + PORT_START("KEYPAD.5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON9) PORT_NAME("Keypad 2 Button 1") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON10) PORT_NAME("Keypad 2 Button 4") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON4) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON11) PORT_NAME("Keypad 2 Button 7") PORT_PLAYER(2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON12) PORT_NAME("Keypad 2 Button *") PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON1) +INPUT_PORTS_END + +ioport_constructor cgenie_joystick_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( cgenie_joystick ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// cgenie_joystick_device - constructor +//------------------------------------------------- + +cgenie_joystick_device::cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, CGENIE_JOYSTICK, "Joystick Interface EG2013", tag, owner, clock, "cgenie_joystick", __FILE__), + device_parallel_interface(mconfig, *this), + m_joy(*this, "JOY"), + m_keypad(*this, "KEYPAD"), + m_select(0) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void cgenie_joystick_device::device_start() +{ +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void cgenie_joystick_device::device_reset() +{ +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +void cgenie_joystick_device::pa_w(UINT8 data) +{ + if (VERBOSE) + logerror("%s: pa_w %02x\n", tag(), data); + + // d0 to d5 connected + m_select = data & 0x3f; +} + +UINT8 cgenie_joystick_device::pb_r() +{ + UINT8 data = 0x0f; + + // read button state + for (int i = 0; i < 4; i++) + if (!BIT(m_select, i)) + data &= m_keypad[i]->read(); + + // and joystick state + data |= m_joy[3]->read() > m_select ? 0x10 : 0x00; + data |= m_joy[2]->read() > m_select ? 0x20 : 0x00; + data |= m_joy[1]->read() > m_select ? 0x40 : 0x00; + data |= m_joy[0]->read() > m_select ? 0x80 : 0x00; + + if (VERBOSE) + logerror("%s: pb_r %02x\n", tag(), data); + + return data; +} diff --git a/src/emu/bus/cgenie/parallel/joystick.h b/src/emu/bus/cgenie/parallel/joystick.h new file mode 100644 index 00000000000..28be43b00e6 --- /dev/null +++ b/src/emu/bus/cgenie/parallel/joystick.h @@ -0,0 +1,48 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Joystick Interface EG2013 + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_PARALLEL_JOYSTICK_H__ +#define __CGENIE_PARALLEL_JOYSTICK_H__ + +#include "emu.h" +#include "parallel.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> cgenie_joystick_device + +class cgenie_joystick_device : public device_t, public device_parallel_interface +{ +public: + // construction/destruction + cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + virtual void device_start(); + virtual void device_reset(); + virtual ioport_constructor device_input_ports() const; + + virtual void pa_w(UINT8 data); + virtual UINT8 pb_r(); + +private: + required_ioport_array<4> m_joy; + required_ioport_array<6> m_keypad; + + UINT8 m_select; +}; + +// device type definition +extern const device_type CGENIE_JOYSTICK; + +#endif // __CGENIE_PARALLEL_JOYSTICK_H__ diff --git a/src/emu/bus/cgenie/parallel/parallel.c b/src/emu/bus/cgenie/parallel/parallel.c new file mode 100644 index 00000000000..e948af9c00a --- /dev/null +++ b/src/emu/bus/cgenie/parallel/parallel.c @@ -0,0 +1,115 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Parallel Slot + + 20-pin slot + +***************************************************************************/ + +#include "parallel.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type PARALLEL_SLOT = &device_creator<parallel_slot_device>; + + +//************************************************************************** +// SLOT DEVICE +//************************************************************************** + +//------------------------------------------------- +// parallel_slot_device - constructor +//------------------------------------------------- + +parallel_slot_device::parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, PARALLEL_SLOT, "Parallel Slot", tag, owner, clock, "parallel_slot", __FILE__), + device_slot_interface(mconfig, *this), + m_cart(NULL) +{ +} + +//------------------------------------------------- +// parallel_slot_device - destructor +//------------------------------------------------- + +parallel_slot_device::~parallel_slot_device() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void parallel_slot_device::device_start() +{ + m_cart = dynamic_cast<device_parallel_interface *>(get_card_device()); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void parallel_slot_device::device_reset() +{ +} + + +//************************************************************************** +// I/O PORTS +//************************************************************************** + +READ8_MEMBER( parallel_slot_device::pa_r ) +{ + if (m_cart) + return m_cart->pa_r(); + else + return 0xff; +} + +WRITE8_MEMBER( parallel_slot_device::pa_w ) +{ + if (m_cart) + m_cart->pa_w(data); +} + +READ8_MEMBER( parallel_slot_device::pb_r ) +{ + if (m_cart) + return m_cart->pb_r(); + else + return 0xff; +} + +WRITE8_MEMBER( parallel_slot_device::pb_w ) +{ + if (m_cart) + m_cart->pb_w(data); +} + + +//************************************************************************** +// CARTRIDGE INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_parallel_interface - constructor +//------------------------------------------------- + +device_parallel_interface::device_parallel_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device) +{ + m_slot = dynamic_cast<parallel_slot_device *>(device.owner()); +} + +//------------------------------------------------- +// ~device_parallel_interface - destructor +//------------------------------------------------- + +device_parallel_interface::~device_parallel_interface() +{ +} diff --git a/src/emu/bus/cgenie/parallel/parallel.h b/src/emu/bus/cgenie/parallel/parallel.h new file mode 100644 index 00000000000..a7f5c8bbb77 --- /dev/null +++ b/src/emu/bus/cgenie/parallel/parallel.h @@ -0,0 +1,94 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Parallel Slot + + 20-pin slot + + 1 GND 11 IOB2 + 2 +12V 12 IOB1 + 3 IOA3 13 IOB0 + 4 IOA4 14 IOB3 + 5 IOA0 15 IOB4 + 6 IOA5 16 IOB5 + 7 IOA1 17 IOB7 + 8 IOA2 18 IOB6 + 9 IOA7 19 +5V + 10 IOA6 20 -12V + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_PARALLEL_H__ +#define __CGENIE_PARALLEL_H__ + +#include "emu.h" + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_PARALLEL_SLOT_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, PARALLEL_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(parallel_slot_carts, NULL, false) + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class device_parallel_interface; + +class parallel_slot_device : public device_t, public device_slot_interface +{ +public: + // construction/destruction + parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~parallel_slot_device(); + + // IOA + DECLARE_READ8_MEMBER(pa_r); + DECLARE_WRITE8_MEMBER(pa_w); + + // IOB + DECLARE_READ8_MEMBER(pb_r); + DECLARE_WRITE8_MEMBER(pb_w); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + device_parallel_interface *m_cart; + +private: +}; + +// class representing interface-specific live parallel device +class device_parallel_interface : public device_slot_card_interface +{ +public: + // construction/destruction + device_parallel_interface(const machine_config &mconfig, device_t &device); + virtual ~device_parallel_interface(); + + virtual UINT8 pa_r() { return 0xff; }; + virtual void pa_w(UINT8 data) {}; + + virtual UINT8 pb_r() { return 0xff; }; + virtual void pb_w(UINT8 data) {}; + +protected: + parallel_slot_device *m_slot; +}; + +// device type definition +extern const device_type PARALLEL_SLOT; + +// include here so drivers don't need to +#include "carts.h" + +#endif // __CGENIE_PARALLEL_H__ diff --git a/src/emu/bus/cgenie/parallel/printer.c b/src/emu/bus/cgenie/parallel/printer.c new file mode 100644 index 00000000000..f9963844dd5 --- /dev/null +++ b/src/emu/bus/cgenie/parallel/printer.c @@ -0,0 +1,132 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Printer Interface EG2012 + +***************************************************************************/ + +#include "printer.h" + + +//************************************************************************** +// CONSTANTS/MACROS +//************************************************************************** + +#define VERBOSE 0 + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type CGENIE_PRINTER = &device_creator<cgenie_printer_device>; + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( cgenie_printer ) + MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(cgenie_printer_device, busy_w)) + MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(cgenie_printer_device, perror_w)) + MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(cgenie_printer_device, select_w)) + MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(cgenie_printer_device, fault_w)) + MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics") +MACHINE_CONFIG_END + +machine_config_constructor cgenie_printer_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( cgenie_printer ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// cgenie_printer_device - constructor +//------------------------------------------------- + +cgenie_printer_device::cgenie_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, CGENIE_PRINTER, "Printer Interface EG2012", tag, owner, clock, "cgenie_printer", __FILE__), + device_parallel_interface(mconfig, *this), + m_centronics(*this, "centronics"), + m_latch(*this, "latch"), + m_centronics_busy(0), + m_centronics_out_of_paper(0), + m_centronics_unit_sel(1), + m_centronics_ready(1) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void cgenie_printer_device::device_start() +{ +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void cgenie_printer_device::device_reset() +{ +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +WRITE_LINE_MEMBER( cgenie_printer_device::busy_w ) +{ + m_centronics_busy = state; +} + +WRITE_LINE_MEMBER( cgenie_printer_device::perror_w ) +{ + m_centronics_out_of_paper = state; +} + +WRITE_LINE_MEMBER( cgenie_printer_device::select_w ) +{ + m_centronics_unit_sel = state; +} + +WRITE_LINE_MEMBER( cgenie_printer_device::fault_w ) +{ + m_centronics_ready = state; +} + +void cgenie_printer_device::pa_w(UINT8 data) +{ + if (VERBOSE) + logerror("%s: pa_w %02x\n", tag(), data); + + m_latch->write(data); +} + +UINT8 cgenie_printer_device::pb_r() +{ + UINT8 data = 0x0f; + + data |= m_centronics_ready << 4; + data |= m_centronics_unit_sel << 5; + data |= m_centronics_out_of_paper << 6; + data |= m_centronics_busy << 7; + + return data; +} + +void cgenie_printer_device::pb_w(UINT8 data) +{ + if (VERBOSE) + logerror("%s: pa_w %02x\n", tag(), data); + + m_centronics->write_strobe(BIT(data, 0)); +} diff --git a/src/emu/bus/cgenie/parallel/printer.h b/src/emu/bus/cgenie/parallel/printer.h new file mode 100644 index 00000000000..52479c73d5c --- /dev/null +++ b/src/emu/bus/cgenie/parallel/printer.h @@ -0,0 +1,58 @@ +// license:GPL-2.0+ +// copyright-holders:Dirk Best +/*************************************************************************** + + EACA Colour Genie Printer Interface EG2012 + +***************************************************************************/ + +#pragma once + +#ifndef __CGENIE_PARALLEL_PRINTER_H__ +#define __CGENIE_PARALLEL_PRINTER_H__ + +#include "emu.h" +#include "parallel.h" +#include "bus/centronics/ctronics.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> cgenie_printer_device + +class cgenie_printer_device : public device_t, public device_parallel_interface +{ +public: + // construction/destruction + cgenie_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_WRITE_LINE_MEMBER(busy_w); + DECLARE_WRITE_LINE_MEMBER(perror_w); + DECLARE_WRITE_LINE_MEMBER(select_w); + DECLARE_WRITE_LINE_MEMBER(fault_w); + +protected: + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + + virtual void pa_w(UINT8 data); + virtual UINT8 pb_r(); + virtual void pb_w(UINT8 data); + +private: + required_device<centronics_device> m_centronics; + required_device<output_latch_device> m_latch; + + int m_centronics_busy; + int m_centronics_out_of_paper; + int m_centronics_unit_sel; + int m_centronics_ready; +}; + +// device type definition +extern const device_type CGENIE_PRINTER; + +#endif // __CGENIE_PARALLEL_PRINTER_H__ diff --git a/src/emu/bus/megadrive/md_slot.c b/src/emu/bus/megadrive/md_slot.c index ff703b6e618..b53419b5528 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:Fabio Priuli +// copyright-holders:Fabio Priuli,Cowering /*********************************************************************************************************** diff --git a/src/emu/bus/snes/rom.c b/src/emu/bus/snes/rom.c index 23b32c28fb9..9e77da8dda5 100644 --- a/src/emu/bus/snes/rom.c +++ b/src/emu/bus/snes/rom.c @@ -199,9 +199,6 @@ READ8_MEMBER(sns_rom_device::read_h) Byuu's code is released under GNU General Public License version 2 as published by the Free Software Foundation. - The implementation below is released under the MAME license - for use in MAME, MESS and derivatives by permission of Byuu - ***********************************************************************************************************/ diff --git a/src/emu/bus/snes/rom21.c b/src/emu/bus/snes/rom21.c index c9c9c55d48b..09630b7e393 100644 --- a/src/emu/bus/snes/rom21.c +++ b/src/emu/bus/snes/rom21.c @@ -92,9 +92,6 @@ READ8_MEMBER(sns_rom21_device::read_h) Byuu's code is released under GNU General Public License version 2 as published by the Free Software Foundation. - The implementation below is released under the MAME license - for use in MAME, MESS and derivatives by permission of Byuu - ***************************************************************************/ static const UINT8 srtc_months[12] = diff --git a/src/emu/bus/snes/snes_slot.c b/src/emu/bus/snes/snes_slot.c index 848decd708d..d44325d728f 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:Fabio Priuli +// copyright-holders:Fabio Priuli,Cowering /*********************************************************************************************************** diff --git a/src/emu/bus/vcs/vcs_slot.c b/src/emu/bus/vcs/vcs_slot.c index c2db7d684f8..d04f45a195e 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:Fabio Priuli +// copyright-holders:Fabio Priuli,Cowering /*********************************************************************************************************** diff --git a/src/emu/cpu/cop400/cop400.h b/src/emu/cpu/cop400/cop400.h index 99c76f81c48..aba03516d39 100644 --- a/src/emu/cpu/cop400/cop400.h +++ b/src/emu/cpu/cop400/cop400.h @@ -6,9 +6,6 @@ National Semiconductor COPS Emulator. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index f510afc5dd9..904c4d3771d 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Juergen Buchmueller +// copyright-holders:Juergen Buchmueller, hap /***************************************************************************** * * i8085.c diff --git a/src/emu/cpu/i8085/i8085.h b/src/emu/cpu/i8085/i8085.h index 8ce29d7bd12..a0e8f5d8d3a 100644 --- a/src/emu/cpu/i8085/i8085.h +++ b/src/emu/cpu/i8085/i8085.h @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:Juergen Buchmueller +// copyright-holders:Juergen Buchmueller, hap + #ifndef __I8085_H__ #define __I8085_H__ diff --git a/src/emu/cpu/i8085/i8085cpu.h b/src/emu/cpu/i8085/i8085cpu.h index 17bfecfdd59..5ccecf3cd95 100644 --- a/src/emu/cpu/i8085/i8085cpu.h +++ b/src/emu/cpu/i8085/i8085cpu.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Juergen Buchmueller +// copyright-holders:Juergen Buchmueller, hap /******************************************************* * * Portable (hopefully ;-) 8085A emulator @@ -41,26 +41,26 @@ #define M_MVI(R) R=ARG() /* rotate */ -#define M_RLC { \ - m_AF.b.h = (m_AF.b.h << 1) | (m_AF.b.h >> 7); \ - m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \ +#define M_RLC { \ + m_AF.b.h = (m_AF.b.h << 1) | (m_AF.b.h >> 7); \ + m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \ } -#define M_RRC { \ - m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \ - m_AF.b.h = (m_AF.b.h >> 1) | (m_AF.b.h << 7); \ +#define M_RRC { \ + m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \ + m_AF.b.h = (m_AF.b.h >> 1) | (m_AF.b.h << 7); \ } -#define M_RAL { \ - int c = m_AF.b.l&CF; \ - m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h >> 7); \ - m_AF.b.h = (m_AF.b.h << 1) | c; \ +#define M_RAL { \ + int c = m_AF.b.l&CF; \ + m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h >> 7); \ + m_AF.b.h = (m_AF.b.h << 1) | c; \ } -#define M_RAR { \ - int c = (m_AF.b.l&CF) << 7; \ - m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \ - m_AF.b.h = (m_AF.b.h >> 1) | c; \ +#define M_RAR { \ + int c = (m_AF.b.l&CF) << 7; \ + m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \ + m_AF.b.h = (m_AF.b.h >> 1) | c; \ } /* logical */ @@ -73,116 +73,116 @@ #define M_DCR(R) {UINT8 hc = ((R & 0x0f) != 0x00) ? HF : 0; --R; m_AF.b.l= (m_AF.b.l & CF ) | ZSP[R] | hc | VF; } /* arithmetic */ -#define M_ADD(R) { \ - int q = m_AF.b.h+R; \ - m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \ - m_AF.b.h=q; \ +#define M_ADD(R) { \ + int q = m_AF.b.h+R; \ + m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \ + m_AF.b.h=q; \ } -#define M_ADC(R) { \ - int q = m_AF.b.h+R+(m_AF.b.l&CF); \ - m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \ - m_AF.b.h=q; \ +#define M_ADC(R) { \ + int q = m_AF.b.h+R+(m_AF.b.l&CF); \ + m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \ + m_AF.b.h=q; \ } -#define M_SUB(R) { \ - int q = m_AF.b.h-R; \ - m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \ - m_AF.b.h=q; \ +#define M_SUB(R) { \ + int q = m_AF.b.h-R; \ + m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \ + m_AF.b.h=q; \ } -#define M_SBB(R) { \ - int q = m_AF.b.h-R-(m_AF.b.l&CF); \ - m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \ - m_AF.b.h=q; \ +#define M_SBB(R) { \ + int q = m_AF.b.h-R-(m_AF.b.l&CF); \ + m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \ + m_AF.b.h=q; \ } -#define M_CMP(R) { \ - int q = m_AF.b.h-R; \ - m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \ +#define M_CMP(R) { \ + int q = m_AF.b.h-R; \ + m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \ } -#define M_DAD(R) { \ - int q = m_HL.d + m_##R.d; \ - m_AF.b.l = (m_AF.b.l & ~CF) | (q>>16 & CF ); \ - m_HL.w.l = q; \ +#define M_DAD(R) { \ + int q = m_HL.d + m_##R.d; \ + m_AF.b.l = (m_AF.b.l & ~CF) | (q>>16 & CF ); \ + m_HL.w.l = q; \ } // DSUB is 8085-only, not sure if H flag handling is correct -#define M_DSUB() { \ - int q = m_HL.b.l-m_BC.b.l; \ - m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \ - ((m_HL.b.l^q^m_BC.b.l)&HF)| \ - (((m_BC.b.l^m_HL.b.l)&(m_HL.b.l^q)&SF)>>5); \ - m_HL.b.l=q; \ - q = m_HL.b.h-m_BC.b.h-(m_AF.b.l&CF); \ - m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \ - ((m_HL.b.h^q^m_BC.b.h)&HF)| \ - (((m_BC.b.h^m_HL.b.h)&(m_HL.b.h^q)&SF)>>5); \ - if (m_HL.b.l!=0) m_AF.b.l&=~ZF; \ +#define M_DSUB() { \ + int q = m_HL.b.l-m_BC.b.l; \ + m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \ + ((m_HL.b.l^q^m_BC.b.l)&HF)| \ + (((m_BC.b.l^m_HL.b.l)&(m_HL.b.l^q)&SF)>>5); \ + m_HL.b.l=q; \ + q = m_HL.b.h-m_BC.b.h-(m_AF.b.l&CF); \ + m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \ + ((m_HL.b.h^q^m_BC.b.h)&HF)| \ + (((m_BC.b.h^m_HL.b.h)&(m_HL.b.h^q)&SF)>>5); \ + if (m_HL.b.l!=0) m_AF.b.l&=~ZF; \ } /* i/o */ -#define M_IN \ - m_STATUS = 0x42; \ - m_WZ.d=ARG(); \ +#define M_IN \ + m_STATUS = 0x42; \ + m_WZ.d=ARG(); \ m_AF.b.h=m_io->read_byte(m_WZ.d); -#define M_OUT \ - m_STATUS = 0x10; \ - m_WZ.d=ARG(); \ +#define M_OUT \ + m_STATUS = 0x10; \ + m_WZ.d=ARG(); \ m_io->write_byte(m_WZ.d,m_AF.b.h) /* stack */ -#define M_PUSH(R) { \ - m_STATUS = 0x04; \ +#define M_PUSH(R) { \ + m_STATUS = 0x04; \ m_program->write_byte(--m_SP.w.l, m_##R.b.h); \ m_program->write_byte(--m_SP.w.l, m_##R.b.l); \ } -#define M_POP(R) { \ - m_STATUS = 0x86; \ +#define M_POP(R) { \ + m_STATUS = 0x86; \ m_##R.b.l = m_program->read_byte(m_SP.w.l++); \ m_##R.b.h = m_program->read_byte(m_SP.w.l++); \ } /* jumps */ // On 8085 jump if condition is not satisfied is shorter -#define M_JMP(cc) { \ - if (cc) { \ - m_PC.w.l = ARG16(); \ - } else { \ - m_PC.w.l += 2; \ - m_icount += (IS_8085()) ? 3 : 0; \ - } \ +#define M_JMP(cc) { \ + if (cc) { \ + m_PC.w.l = ARG16(); \ + } else { \ + m_PC.w.l += 2; \ + m_icount += (IS_8085()) ? 3 : 0; \ + } \ } // On 8085 call if condition is not satisfied is 9 ticks -#define M_CALL(cc) \ -{ \ - if (cc) \ - { \ - UINT16 a = ARG16(); \ - m_icount -= (IS_8085()) ? 7 : 6 ; \ - M_PUSH(PC); \ - m_PC.d = a; \ - } else { \ - m_PC.w.l += 2; \ - m_icount += (IS_8085()) ? 2 : 0; \ - } \ +#define M_CALL(cc) \ +{ \ + if (cc) \ + { \ + UINT16 a = ARG16(); \ + m_icount -= (IS_8085()) ? 7 : 6 ; \ + M_PUSH(PC); \ + m_PC.d = a; \ + } else { \ + m_PC.w.l += 2; \ + m_icount += (IS_8085()) ? 2 : 0; \ + } \ } // conditional RET only -#define M_RET(cc) \ -{ \ - if (cc) \ - { \ - m_icount -= 6; \ - M_POP(PC); \ - } \ -} - -#define M_RST(nn) { \ - M_PUSH(PC); \ - m_PC.d = 8 * nn; \ +#define M_RET(cc) \ +{ \ + if (cc) \ + { \ + m_icount -= 6; \ + M_POP(PC); \ + } \ +} + +#define M_RST(nn) { \ + M_PUSH(PC); \ + m_PC.d = 8 * nn; \ } diff --git a/src/emu/cpu/m6809/konami.c b/src/emu/cpu/m6809/konami.c index 16895a79e31..d86f44651d2 100644 --- a/src/emu/cpu/m6809/konami.c +++ b/src/emu/cpu/m6809/konami.c @@ -6,8 +6,6 @@ Portable Konami cpu emulator - Copyright Nicola Salmoria and the MAME Team - Based on M6809 cpu core copyright John Butler References: diff --git a/src/emu/cpu/tms34010/34010dsm.c b/src/emu/cpu/tms34010/34010dsm.c index 2fc3168cc45..15136885da4 100644 --- a/src/emu/cpu/tms34010/34010dsm.c +++ b/src/emu/cpu/tms34010/34010dsm.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /* * A TMS34010 disassembler diff --git a/src/emu/cpu/tms34010/dis34010.c b/src/emu/cpu/tms34010/dis34010.c index a17d9e14816..19e3338a7d2 100644 --- a/src/emu/cpu/tms34010/dis34010.c +++ b/src/emu/cpu/tms34010/dis34010.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /* This program is based on DIS68k by Aaron Giles */ diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c index 97488f7381b..bcff4b44145 100644 --- a/src/emu/cpu/z8/z8.c +++ b/src/emu/cpu/z8/z8.c @@ -4,9 +4,6 @@ Zilog Z8 Single-Chip MCU emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ /* diff --git a/src/emu/cpu/z8/z8.h b/src/emu/cpu/z8/z8.h index c1061fcccdb..79c64c268b2 100644 --- a/src/emu/cpu/z8/z8.h +++ b/src/emu/cpu/z8/z8.h @@ -4,9 +4,6 @@ Zilog Z8 Single-Chip MCU emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/emu/cpu/z8/z8ops.inc b/src/emu/cpu/z8/z8ops.inc index 2249ddfdd7d..79621ed1512 100644 --- a/src/emu/cpu/z8/z8ops.inc +++ b/src/emu/cpu/z8/z8ops.inc @@ -4,9 +4,6 @@ Zilog Z8 Single-Chip MCU emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ /*************************************************************************** diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h index 77f06f1d9bf..89a048f6316 100644 --- a/src/emu/drivers/xtal.h +++ b/src/emu/drivers/xtal.h @@ -6,9 +6,6 @@ Documentation and consistent naming for known existing crystals. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - *************************************************************************** PCB Crystal Reference diff --git a/src/emu/info.c b/src/emu/info.c index 462b94ab652..4b5adfab3b1 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles,Paul Priest /*************************************************************************** info.c diff --git a/src/emu/machine/7200fifo.h b/src/emu/machine/7200fifo.h index 65256fc0e33..0f5c28e7048 100644 --- a/src/emu/machine/7200fifo.h +++ b/src/emu/machine/7200fifo.h @@ -4,9 +4,6 @@ IDT7200 series 9-bit Asynchronous FIFO Emulation - Copyright MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ _W 1 |* \_/ | 28 Vcc diff --git a/src/emu/machine/74123.c b/src/emu/machine/74123.c index ca36a3c5f84..f88b71dfab8 100644 --- a/src/emu/machine/74123.c +++ b/src/emu/machine/74123.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /***************************************************************************** diff --git a/src/emu/machine/74123.h b/src/emu/machine/74123.h index 74d83337f05..93325bdbeb1 100644 --- a/src/emu/machine/74123.h +++ b/src/emu/machine/74123.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /***************************************************************************** diff --git a/src/emu/machine/am9517a.c b/src/emu/machine/am9517a.c index 15dafeb0362..469da3d167f 100644 --- a/src/emu/machine/am9517a.c +++ b/src/emu/machine/am9517a.c @@ -13,9 +13,6 @@ Multimode DMA Controller emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ /* diff --git a/src/emu/machine/am9517a.h b/src/emu/machine/am9517a.h index 3ba47c35f96..817cf5ce9df 100644 --- a/src/emu/machine/am9517a.h +++ b/src/emu/machine/am9517a.h @@ -4,9 +4,6 @@ AMD AM9517A/8237A Multimode DMA Controller emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ _IOR 1 |* \_/ | 40 A7 diff --git a/src/emu/machine/atadev.h b/src/emu/machine/atadev.h index 7616c06223b..3b96a6b580c 100644 --- a/src/emu/machine/atadev.h +++ b/src/emu/machine/atadev.h @@ -6,9 +6,6 @@ ATA Device implementation. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/atahle.h b/src/emu/machine/atahle.h index edd946b4733..a1efe0d00dd 100644 --- a/src/emu/machine/atahle.h +++ b/src/emu/machine/atahle.h @@ -6,9 +6,6 @@ ATA Device HLE - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/ataintf.c b/src/emu/machine/ataintf.c index e57a4ca25d1..56c2031bd56 100644 --- a/src/emu/machine/ataintf.c +++ b/src/emu/machine/ataintf.c @@ -6,9 +6,6 @@ ATA Interface implementation. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "emu.h" diff --git a/src/emu/machine/ataintf.h b/src/emu/machine/ataintf.h index 7095997a6b6..01ee67e159f 100644 --- a/src/emu/machine/ataintf.h +++ b/src/emu/machine/ataintf.h @@ -6,9 +6,6 @@ ATA Interface implementation. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/atapicdr.h b/src/emu/machine/atapicdr.h index 74a2426cc62..535a5b801b1 100644 --- a/src/emu/machine/atapicdr.h +++ b/src/emu/machine/atapicdr.h @@ -6,9 +6,6 @@ ATAPI CDROM - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/atapihle.h b/src/emu/machine/atapihle.h index c766087f972..4d33e60a378 100644 --- a/src/emu/machine/atapihle.h +++ b/src/emu/machine/atapihle.h @@ -6,9 +6,6 @@ ATAPI High Level Emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/cdp1852.c b/src/emu/machine/cdp1852.c index 73d0da6e20a..7a91e4060c3 100644 --- a/src/emu/machine/cdp1852.c +++ b/src/emu/machine/cdp1852.c @@ -4,9 +4,6 @@ RCA CDP1852 Byte-Wide Input/Output Port emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "cdp1852.h" diff --git a/src/emu/machine/cr589.h b/src/emu/machine/cr589.h index e06f10a409e..87fe1c16641 100644 --- a/src/emu/machine/cr589.h +++ b/src/emu/machine/cr589.h @@ -6,9 +6,6 @@ Matsushita CR589 - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/i8257.c b/src/emu/machine/i8257.c index db9bfe9bad5..f6616de3a61 100644 --- a/src/emu/machine/i8257.c +++ b/src/emu/machine/i8257.c @@ -4,9 +4,6 @@ Intel 8257 DMA Controller emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "i8257.h" diff --git a/src/emu/machine/i8257.h b/src/emu/machine/i8257.h index c735fb65b2e..9ab509d38e7 100644 --- a/src/emu/machine/i8257.h +++ b/src/emu/machine/i8257.h @@ -4,9 +4,6 @@ Intel 8257 DMA Controller emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ _I/OR 1 |* \_/ | 40 A7 diff --git a/src/emu/machine/i8279.h b/src/emu/machine/i8279.h index a445f7f0912..42a77d7634f 100644 --- a/src/emu/machine/i8279.h +++ b/src/emu/machine/i8279.h @@ -4,9 +4,6 @@ Intel 8279 Programmable Keyboard/Display Interface emulation - Copyright the MESS Team 2012. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ RL2 1 |* \_/ | 40 Vcc diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index b69fcdee328..403364d57c1 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -6,9 +6,6 @@ Generic (PC-style) IDE controller implementation. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "idectrl.h" diff --git a/src/emu/machine/idectrl.h b/src/emu/machine/idectrl.h index 90e4b391d4c..d31490e2385 100644 --- a/src/emu/machine/idectrl.h +++ b/src/emu/machine/idectrl.h @@ -6,9 +6,6 @@ Generic (PC-style) IDE controller implementation. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/idehd.h b/src/emu/machine/idehd.h index 1a1a107bc6b..0c999a76fd2 100644 --- a/src/emu/machine/idehd.h +++ b/src/emu/machine/idehd.h @@ -6,9 +6,6 @@ IDE Harddisk - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/im6402.h b/src/emu/machine/im6402.h index d843ad374a1..46ac592b7ac 100644 --- a/src/emu/machine/im6402.h +++ b/src/emu/machine/im6402.h @@ -4,9 +4,6 @@ Intersil IM6402 Universal Asynchronous Receiver/Transmitter emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ Vcc 1 |* \_/ | 40 NOTE diff --git a/src/emu/machine/kb3600.c b/src/emu/machine/kb3600.c index 7fe8cba8d72..f83ba9c46d8 100644 --- a/src/emu/machine/kb3600.c +++ b/src/emu/machine/kb3600.c @@ -4,9 +4,6 @@ General Instruments AY-5-3600 Keyboard Encoder emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ /* diff --git a/src/emu/machine/kb3600.h b/src/emu/machine/kb3600.h index 4bf2fb23dd0..57a42c906fb 100644 --- a/src/emu/machine/kb3600.h +++ b/src/emu/machine/kb3600.h @@ -4,9 +4,6 @@ General Instruments AY-5-3600 Keyboard Encoder emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ 1 |* \_/ | 40 X0 diff --git a/src/emu/machine/kr2376.c b/src/emu/machine/kr2376.c index 62da56d2781..d818c52ce68 100644 --- a/src/emu/machine/kr2376.c +++ b/src/emu/machine/kr2376.c @@ -4,9 +4,6 @@ SMC KR2376 Keyboard Encoder emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "emu.h" diff --git a/src/emu/machine/kr2376.h b/src/emu/machine/kr2376.h index c745fa26246..e282362d761 100644 --- a/src/emu/machine/kr2376.h +++ b/src/emu/machine/kr2376.h @@ -4,9 +4,6 @@ SMC KR2376 Keyboard Encoder emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ Vcc 1 |* \_/ | 40 Frequency Control A diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index 0beddaed0b9..9213f8e50c6 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /********************************************************************** diff --git a/src/emu/machine/latch8.h b/src/emu/machine/latch8.h index 7edaed3ae45..6c82bd0689d 100644 --- a/src/emu/machine/latch8.h +++ b/src/emu/machine/latch8.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /********************************************************************** diff --git a/src/emu/machine/mos6530.h b/src/emu/machine/mos6530.h index 11fa4c2240e..d63fdd95a12 100644 --- a/src/emu/machine/mos6530.h +++ b/src/emu/machine/mos6530.h @@ -4,9 +4,6 @@ MOS Technology 6530 Memory, I/O, Timer Array emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ Vss 1 |* \_/ | 40 PA1 diff --git a/src/emu/machine/mos6530n.c b/src/emu/machine/mos6530n.c index 52f9266d595..76e1b9de263 100644 --- a/src/emu/machine/mos6530n.c +++ b/src/emu/machine/mos6530n.c @@ -716,7 +716,7 @@ WRITE8_MEMBER( mos6530_base_t::edge_w ) void mos6530_base_t::live_start() { cur_live.period = attotime::from_hz(clock() / m_shift); - cur_live.tm = machine().time() + cur_live.period; + cur_live.tm = machine().time() + attotime::from_hz(clock()); cur_live.state = RUNNING; cur_live.next_state = -1; diff --git a/src/emu/machine/mos6551.h b/src/emu/machine/mos6551.h index b15bde9074a..7ba7d6bc7f3 100644 --- a/src/emu/machine/mos6551.h +++ b/src/emu/machine/mos6551.h @@ -4,9 +4,6 @@ MOS Technology 6551 Asynchronous Communication Interface Adapter - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ GND 1 |* \_/ | 28 R/_W diff --git a/src/emu/machine/msm6242.h b/src/emu/machine/msm6242.h index e1ea4325e8f..4d44fd1b860 100644 --- a/src/emu/machine/msm6242.h +++ b/src/emu/machine/msm6242.h @@ -4,9 +4,6 @@ MSM6242 Real Time Clock - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/r10696.c b/src/emu/machine/r10696.c index 0562001a627..ab20caed731 100644 --- a/src/emu/machine/r10696.c +++ b/src/emu/machine/r10696.c @@ -4,10 +4,6 @@ Rockwell 10696 General Purpose Input/Output (I/O) - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - - REGISTER DESCRIPTION HEX Address Select Names diff --git a/src/emu/machine/r10788.c b/src/emu/machine/r10788.c index 357740b4019..f6e9d65ecbf 100644 --- a/src/emu/machine/r10788.c +++ b/src/emu/machine/r10788.c @@ -4,10 +4,6 @@ Rockwell 10788 General Purpose Keyboard and Display circuit - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - - REGISTER DESCRIPTION diff --git a/src/emu/machine/ra17xx.c b/src/emu/machine/ra17xx.c index 9c1e3d53842..c1252181c7d 100644 --- a/src/emu/machine/ra17xx.c +++ b/src/emu/machine/ra17xx.c @@ -4,9 +4,6 @@ Rockwell A17XX ROM, RAM and I/O chip - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - A ROM of 2048 x 8 bits is addressed whenever the RRSEL line (ROM/RAM select) is 0. A RAM of 128 x 4 bit is addressed when RRSEL is 1. The 16 I/O ports are addressed when the WI/O line diff --git a/src/emu/machine/s2636.c b/src/emu/machine/s2636.c index 706c4195f7c..174be0a765a 100644 --- a/src/emu/machine/s2636.c +++ b/src/emu/machine/s2636.c @@ -4,10 +4,6 @@ Signetics 2636 video chip - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - - PVI REGISTER DESCRIPTION ------------------------ diff --git a/src/emu/machine/serflash.c b/src/emu/machine/serflash.c index 82b159892a4..60ff6712a2b 100644 --- a/src/emu/machine/serflash.c +++ b/src/emu/machine/serflash.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, Luca Elia /* Serial Flash Device */ /* todo: cleanup, refactor etc. */ diff --git a/src/emu/machine/serflash.h b/src/emu/machine/serflash.h index 7f7f9bb0163..fdda31e3912 100644 --- a/src/emu/machine/serflash.h +++ b/src/emu/machine/serflash.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, Luca Elia /* Serial Flash */ #pragma once diff --git a/src/emu/machine/tms6100.c b/src/emu/machine/tms6100.c index 048e2377b99..d37771f4fd2 100644 --- a/src/emu/machine/tms6100.c +++ b/src/emu/machine/tms6100.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /********************************************************************************************** diff --git a/src/emu/machine/tms6100.h b/src/emu/machine/tms6100.h index 7baaad7203e..2259ac27585 100644 --- a/src/emu/machine/tms6100.h +++ b/src/emu/machine/tms6100.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud #pragma once diff --git a/src/emu/machine/vt83c461.h b/src/emu/machine/vt83c461.h index 88942b20b89..18e737ed29b 100644 --- a/src/emu/machine/vt83c461.h +++ b/src/emu/machine/vt83c461.h @@ -6,9 +6,6 @@ VIA VT83C461 (IDE Hard Drive controller). - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #pragma once diff --git a/src/emu/machine/wd2010.c b/src/emu/machine/wd2010.c index 909b08b0243..7a8b679297e 100644 --- a/src/emu/machine/wd2010.c +++ b/src/emu/machine/wd2010.c @@ -4,9 +4,6 @@ Western Digital WD2010 Winchester Disk Controller -Copyright MESS Team. -Visit http://mamedev.org for licensing and usage restrictions. - Portions (2015) : Karl-Ludwig Deisenhofer ********************************************************************** diff --git a/src/emu/machine/z80ctc.c b/src/emu/machine/z80ctc.c index cff4ec67a05..aee057c2c1a 100644 --- a/src/emu/machine/z80ctc.c +++ b/src/emu/machine/z80ctc.c @@ -6,9 +6,6 @@ based on original version (c) 1997, Tatsuyuki Satoh - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "emu.h" diff --git a/src/emu/machine/z80ctc.h b/src/emu/machine/z80ctc.h index d41a1b9a458..b5191d21104 100644 --- a/src/emu/machine/z80ctc.h +++ b/src/emu/machine/z80ctc.h @@ -4,9 +4,6 @@ Z80 CTC (Z8430) implementation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ D4 1 |* \_/ | 28 D3 diff --git a/src/emu/machine/z80dart.c b/src/emu/machine/z80dart.c index 49a80046686..6254d1d81f1 100644 --- a/src/emu/machine/z80dart.c +++ b/src/emu/machine/z80dart.c @@ -7,9 +7,6 @@ Z80-DART Dual Asynchronous Receiver/Transmitter emulation Z80-SIO/0/1/2/3/4 Serial Input/Output Controller emulation - Copyright (c) 2008, The MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - The z80dart/z80sio itself is based on an older intel serial chip, the i8274 MPSC (see http://doc.chipfind.ru/pdf/intel/8274.pdf), which also has almost identical behavior, except lacks the interrupt daisy chaining and has its own interrupt/dma diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c index b8dedbbfedd..745d22877f0 100644 --- a/src/emu/machine/z80dma.c +++ b/src/emu/machine/z80dma.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /********************************************************************** diff --git a/src/emu/machine/z80dma.h b/src/emu/machine/z80dma.h index cf5ef537225..389112e6f19 100644 --- a/src/emu/machine/z80dma.h +++ b/src/emu/machine/z80dma.h @@ -1,12 +1,9 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /*************************************************************************** Zilog Z80 DMA Direct Memory Access Controller emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ A5 1 |* \_/ | 40 A6 diff --git a/src/emu/netlist/analog/nld_bjt.h b/src/emu/netlist/analog/nld_bjt.h index 0ad5b6ab916..68b1576b030 100644 --- a/src/emu/netlist/analog/nld_bjt.h +++ b/src/emu/netlist/analog/nld_bjt.h @@ -48,7 +48,7 @@ public: protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); netlist_param_model_t m_model; private: @@ -99,7 +99,7 @@ public: m_gB(NETLIST_GMIN_DEFAULT), m_gC(NETLIST_GMIN_DEFAULT), m_V(0.0), m_state_on(0) { } - ATTR_HOT ATTR_ALIGN void virtual update(); + ATTR_HOT void virtual update(); nld_twoterm m_RB; nld_twoterm m_RC; @@ -145,7 +145,7 @@ protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); ATTR_HOT void update_param(); - ATTR_HOT ATTR_ALIGN void virtual update(); + ATTR_HOT void virtual update(); NETLIB_UPDATE_TERMINALSI(); netlist_generic_diode m_gD_BC; diff --git a/src/emu/netlist/analog/nld_fourterm.h b/src/emu/netlist/analog/nld_fourterm.h index a17d30e3782..a829b9c814e 100644 --- a/src/emu/netlist/analog/nld_fourterm.h +++ b/src/emu/netlist/analog/nld_fourterm.h @@ -59,7 +59,7 @@ protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); ATTR_COLD void start_internal(const nl_double def_RI); @@ -115,7 +115,7 @@ protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); nl_double m_gfac; }; @@ -159,7 +159,7 @@ protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); ATTR_COLD virtual void update_param(); - //ATTR_HOT ATTR_ALIGN void update(); + //ATTR_HOT void update(); netlist_terminal_t m_OP2; netlist_terminal_t m_ON2; diff --git a/src/emu/netlist/analog/nld_ms_direct.h b/src/emu/netlist/analog/nld_ms_direct.h index a57dcfc0869..58dbdf6c613 100644 --- a/src/emu/netlist/analog/nld_ms_direct.h +++ b/src/emu/netlist/analog/nld_ms_direct.h @@ -36,9 +36,9 @@ protected: ATTR_HOT void build_LE_A(); ATTR_HOT void build_LE_RHS(); ATTR_HOT void LE_solve(); - ATTR_HOT void LE_back_subst(nl_double (* RESTRICT x)); - ATTR_HOT nl_double delta(const nl_double (* RESTRICT V)); - ATTR_HOT void store(const nl_double (* RESTRICT V), const bool store_RHS); + ATTR_HOT void LE_back_subst(nl_double * RESTRICT x); + ATTR_HOT nl_double delta(const nl_double * RESTRICT V); + ATTR_HOT void store(const nl_double * RESTRICT V, const bool store_RHS); /* bring the whole system to the current time * Don't schedule a new calculation time. The recalculation has to be @@ -46,10 +46,10 @@ protected: */ ATTR_HOT nl_double compute_next_timestep(); - nl_double m_A[_storage_N][((_storage_N + 7) / 8) * 8]; - nl_double m_RHS[_storage_N]; - nl_double m_last_RHS[_storage_N]; // right hand side - contains currents - nl_double m_last_V[_storage_N]; + ATTR_ALIGN nl_double m_A[_storage_N][((_storage_N + 7) / 8) * 8]; + ATTR_ALIGN nl_double m_RHS[_storage_N]; + ATTR_ALIGN nl_double m_last_RHS[_storage_N]; // right hand side - contains currents + ATTR_ALIGN nl_double m_last_V[_storage_N]; terms_t **m_terms; terms_t *m_rails_temp; @@ -67,20 +67,12 @@ private: template <int m_N, int _storage_N> netlist_matrix_solver_direct_t<m_N, _storage_N>::~netlist_matrix_solver_direct_t() { - for (int k=0; k<_storage_N; k++) - { - //delete[] m_A[k]; - } for (int k = 0; k < N(); k++) { - nl_free(m_terms[k]); + pfree(m_terms[k]); } - //delete[] m_last_RHS; - //delete[] m_RHS; - nl_free_array(m_terms); - nl_free_array(m_rails_temp); - //delete[] m_row_ops; - + pfree_array(m_terms); + pfree_array(m_rails_temp); } template <int m_N, int _storage_N> @@ -324,7 +316,7 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_solve() template <int m_N, int _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_back_subst( - nl_double (* RESTRICT x)) + nl_double * RESTRICT x) { const int kN = N(); @@ -353,7 +345,7 @@ ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::LE_back_subst( template <int m_N, int _storage_N> ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::delta( - const nl_double (* RESTRICT V)) + const nl_double * RESTRICT V) { nl_double cerr = 0; nl_double cerr2 = 0; @@ -370,7 +362,7 @@ ATTR_HOT nl_double netlist_matrix_solver_direct_t<m_N, _storage_N>::delta( template <int m_N, int _storage_N> ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::store( - const nl_double (* RESTRICT V), const bool store_RHS) + const nl_double * RESTRICT V, const bool store_RHS) { for (int i = 0; i < this->N(); i++) { @@ -394,7 +386,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(const bool newton_raphson) +ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson) { nl_double new_v[_storage_N]; // = { 0.0 }; @@ -431,12 +423,12 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t( , m_dim(size) , m_lp_fact(0) { - m_terms = nl_alloc_array(terms_t *, N()); - m_rails_temp = nl_alloc_array(terms_t, N()); + m_terms = palloc_array(terms_t *, N()); + m_rails_temp = palloc_array(terms_t, N()); for (int k = 0; k < N(); k++) { - m_terms[k] = nl_alloc(terms_t); + m_terms[k] = palloc(terms_t); } } @@ -446,12 +438,12 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t( , m_dim(size) , m_lp_fact(0) { - m_terms = nl_alloc_array(terms_t *, N()); - m_rails_temp = nl_alloc_array(terms_t, N()); + m_terms = palloc_array(terms_t *, N()); + m_rails_temp = palloc_array(terms_t, N()); for (int k = 0; k < N(); k++) { - m_terms[k] = nl_alloc(terms_t); + m_terms[k] = palloc(terms_t); } } diff --git a/src/emu/netlist/analog/nld_ms_direct1.h b/src/emu/netlist/analog/nld_ms_direct1.h index c62eec033f2..6b901417a0a 100644 --- a/src/emu/netlist/analog/nld_ms_direct1.h +++ b/src/emu/netlist/analog/nld_ms_direct1.h @@ -11,7 +11,7 @@ #include "nld_solver.h" #include "nld_ms_direct.h" -class ATTR_ALIGNED(64) netlist_matrix_solver_direct1_t: public netlist_matrix_solver_direct_t<1,1> +class netlist_matrix_solver_direct1_t: public netlist_matrix_solver_direct_t<1,1> { public: @@ -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(const bool newton_raphson) +ATTR_HOT inline int netlist_matrix_solver_direct1_t::vsolve_non_dynamic(ATTR_UNUSED 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 273821f3482..2aa8d749aaa 100644 --- a/src/emu/netlist/analog/nld_ms_direct2.h +++ b/src/emu/netlist/analog/nld_ms_direct2.h @@ -13,7 +13,7 @@ -class ATTR_ALIGNED(64) netlist_matrix_solver_direct2_t: public netlist_matrix_solver_direct_t<2,2> +class netlist_matrix_solver_direct2_t: public netlist_matrix_solver_direct_t<2,2> { public: @@ -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(const bool newton_raphson) +ATTR_HOT inline int netlist_matrix_solver_direct2_t::vsolve_non_dynamic(ATTR_UNUSED 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 e64e28f6f41..e83cfff3975 100644 --- a/src/emu/netlist/analog/nld_ms_jakobi.h +++ b/src/emu/netlist/analog/nld_ms_jakobi.h @@ -8,13 +8,11 @@ #ifndef NLD_MS_GAUSS_SEIDEL_H_ #define NLD_MS_GAUSS_SEIDEL_H_ -#include <cmath> - #include "nld_solver.h" #include "nld_ms_direct.h" template <int m_N, int _storage_N> -class ATTR_ALIGNED(64) netlist_matrix_solver_SOR_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> +class netlist_matrix_solver_SOR_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> { public: diff --git a/src/emu/netlist/analog/nld_ms_sor.h b/src/emu/netlist/analog/nld_ms_sor.h index fe9ee0366a6..6d9bf5f8cc2 100644 --- a/src/emu/netlist/analog/nld_ms_sor.h +++ b/src/emu/netlist/analog/nld_ms_sor.h @@ -12,13 +12,11 @@ #ifndef NLD_MS_SOR_H_ #define NLD_MS_SOR_H_ -#include <cmath> - #include "nld_solver.h" #include "nld_ms_direct.h" template <int m_N, int _storage_N> -class ATTR_ALIGNED(64) netlist_matrix_solver_SOR_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> +class netlist_matrix_solver_SOR_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> { public: diff --git a/src/emu/netlist/analog/nld_ms_sor_mat.h b/src/emu/netlist/analog/nld_ms_sor_mat.h index 52bbe8e5743..c49a15e3d8e 100644 --- a/src/emu/netlist/analog/nld_ms_sor_mat.h +++ b/src/emu/netlist/analog/nld_ms_sor_mat.h @@ -12,13 +12,11 @@ #ifndef NLD_MS_SOR_MAT_H_ #define NLD_MS_SOR_MAT_H_ -#include <cmath> - #include "nld_solver.h" #include "nld_ms_direct.h" template <int m_N, int _storage_N> -class ATTR_ALIGNED(64) netlist_matrix_solver_SOR_mat_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> +class netlist_matrix_solver_SOR_mat_t: public netlist_matrix_solver_direct_t<m_N, _storage_N> { public: @@ -64,13 +62,13 @@ void netlist_matrix_solver_SOR_mat_t<m_N, _storage_N>::log_stats() { if (this->m_stat_calculations != 0 && 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("==============================================\n"); + this->netlist().log("Solver %s\n", this->name().cstr()); + this->netlist().log(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr()); + this->netlist().log(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic"); + this->netlist().log(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep"); + this->netlist().log(" %6.3f average newton raphson loops\n", (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\n", this->m_stat_calculations, this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0), this->m_gs_fail, diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c index 4b734f30fa8..3b0bf32149a 100644 --- a/src/emu/netlist/analog/nld_solver.c +++ b/src/emu/netlist/analog/nld_solver.c @@ -79,8 +79,7 @@ ATTR_COLD netlist_matrix_solver_t::netlist_matrix_solver_t(const eSolverType typ ATTR_COLD netlist_matrix_solver_t::~netlist_matrix_solver_t() { - for (int i = 0; i < m_inps.count(); i++) - global_free(m_inps[i]); + m_inps.clear_and_free(); } ATTR_COLD void netlist_matrix_solver_t::setup(netlist_analog_net_t::list_t &nets) @@ -144,7 +143,7 @@ ATTR_COLD void netlist_matrix_solver_t::setup(netlist_analog_net_t::list_t &nets if (net_proxy_output == NULL) { - net_proxy_output = nl_alloc(netlist_analog_output_t); + net_proxy_output = palloc(netlist_analog_output_t); net_proxy_output->init_object(*this, this->name() + "." + pstring::sprintf("m%d", m_inps.count())); m_inps.add(net_proxy_output); net_proxy_output->m_proxied_net = &p->net().as_analog(); @@ -352,7 +351,7 @@ NETLIB_NAME(solver)::~NETLIB_NAME(solver)() while (e != NULL) { netlist_matrix_solver_t * const *en = m_mat_solvers.next(e); - global_free(*e); + pfree(*e); e = en; } @@ -410,9 +409,9 @@ template <int m_N, int _storage_N> netlist_matrix_solver_t * NETLIB_NAME(solver)::create_solver(int size, const int gs_threshold, const bool use_specific) { if (use_specific && m_N == 1) - return nl_alloc(netlist_matrix_solver_direct1_t, m_params); + return palloc(netlist_matrix_solver_direct1_t, m_params); else if (use_specific && m_N == 2) - return nl_alloc(netlist_matrix_solver_direct2_t, m_params); + return palloc(netlist_matrix_solver_direct2_t, m_params); else { if (size >= gs_threshold) @@ -420,18 +419,18 @@ netlist_matrix_solver_t * NETLIB_NAME(solver)::create_solver(int size, const int if (USE_MATRIX_GS) { typedef netlist_matrix_solver_SOR_mat_t<m_N,_storage_N> solver_mat; - return nl_alloc(solver_mat, m_params, size); + return palloc(solver_mat, m_params, size); } else { typedef netlist_matrix_solver_SOR_t<m_N,_storage_N> solver_GS; - return nl_alloc(solver_GS, m_params, size); + return palloc(solver_GS, m_params, size); } } else { typedef netlist_matrix_solver_direct_t<m_N,_storage_N> solver_D; - return nl_alloc(solver_D, m_params, size); + return palloc(solver_D, m_params, size); } } } diff --git a/src/emu/netlist/analog/nld_solver.h b/src/emu/netlist/analog/nld_solver.h index 79f3c4af9d4..bc0a9f095aa 100644 --- a/src/emu/netlist/analog/nld_solver.h +++ b/src/emu/netlist/analog/nld_solver.h @@ -45,7 +45,7 @@ struct netlist_solver_parameters_t }; -class ATTR_ALIGNED(64) terms_t +class terms_t { NETLIST_PREVENT_COPYING(terms_t) @@ -164,7 +164,7 @@ private: -class ATTR_ALIGNED(64) NETLIB_NAME(solver) : public netlist_device_t +class NETLIB_NAME(solver) : public netlist_device_t { public: NETLIB_NAME(solver)() diff --git a/src/emu/netlist/analog/nld_twoterm.c b/src/emu/netlist/analog/nld_twoterm.c index 6e92bc9d8c9..02ec7fa9c29 100644 --- a/src/emu/netlist/analog/nld_twoterm.c +++ b/src/emu/netlist/analog/nld_twoterm.c @@ -171,8 +171,8 @@ NETLIB_UPDATE_PARAM(POT) m_R1.update_dev(); m_R2.update_dev(); - m_R1.set_R(MAX(m_R.Value() * v, netlist().gmin())); - m_R2.set_R(MAX(m_R.Value() * (1.0 - v), netlist().gmin())); + m_R1.set_R(std::max(m_R.Value() * v, netlist().gmin())); + m_R2.set_R(std::max(m_R.Value() * (1.0 - v), netlist().gmin())); } @@ -218,7 +218,7 @@ NETLIB_UPDATE_PARAM(POT2) m_R1.update_dev(); - m_R1.set_R(MAX(m_R.Value() * v, netlist().gmin())); + m_R1.set_R(std::max(m_R.Value() * v, netlist().gmin())); } // ---------------------------------------------------------------------------------------- diff --git a/src/emu/netlist/analog/nld_twoterm.h b/src/emu/netlist/analog/nld_twoterm.h index de112bfee18..976742793dd 100644 --- a/src/emu/netlist/analog/nld_twoterm.h +++ b/src/emu/netlist/analog/nld_twoterm.h @@ -124,7 +124,7 @@ public: protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); private: }; @@ -146,7 +146,7 @@ public: protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); }; NETLIB_DEVICE_WITH_PARAMS_DERIVED(R, R_base, @@ -196,7 +196,7 @@ protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void reset(); ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); netlist_param_double_t m_C; @@ -284,7 +284,7 @@ public: protected: ATTR_COLD virtual void start(); ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); netlist_param_model_t m_model; diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index 07d87556e9c..f17b638c6e1 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -6,45 +6,6 @@ Discrete netlist implementation. -**************************************************************************** - - Couriersud reserves the right to license the code under a less restrictive - license going forward. - - Copyright Nicola Salmoria and the MAME team - All rights reserved. - - Redistribution and use of this code or any derivative works are permitted - provided that the following conditions are met: - - * Redistributions may not be sold, nor may they be used in a commercial - product or activity. - - * Redistributions that are modified from the original source must include the - complete source code, including the source code for all components used by a - binary built from the modified sources. However, as a special exception, the - source code distributed need not include anything that is normally distributed - (in either source or binary form) with the major components (compiler, kernel, - and so on) of the operating system on which the executable runs, unless that - component itself accompanies the executable. - - * Redistributions must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other - materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - ****************************************************************************/ #include "net_lib.h" diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index 42efb0f19dd..c6ab75fe522 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -6,45 +6,6 @@ Discrete netlist implementation. -**************************************************************************** - - Couriersud reserves the right to license the code under a less restrictive - license going forward. - - Copyright Nicola Salmoria and the MAME team - All rights reserved. - - Redistribution and use of this code or any derivative works are permitted - provided that the following conditions are met: - - * Redistributions may not be sold, nor may they be used in a commercial - product or activity. - - * Redistributions that are modified from the original source must include the - complete source code, including the source code for all components used by a - binary built from the modified sources. However, as a special exception, the - source code distributed need not include anything that is normally distributed - (in either source or binary form) with the major components (compiler, kernel, - and so on) of the operating system on which the executable runs, unless that - component itself accompanies the executable. - - * Redistributions must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other - materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - ****************************************************************************/ #ifndef NET_LIB_H diff --git a/src/emu/netlist/devices/nld_4020.h b/src/emu/netlist/devices/nld_4020.h index 34d6ee69fe1..0b9a06364d8 100644 --- a/src/emu/netlist/devices/nld_4020.h +++ b/src/emu/netlist/devices/nld_4020.h @@ -59,7 +59,6 @@ NETLIB_DEVICE(4020, netlist_logic_input_t m_RESET; ); -NETLIB_DEVICE_DERIVED(4020_dip, 4020, -); +NETLIB_DEVICE_DERIVED_PURE(4020_dip, 4020); #endif /* NLD_4020_H_ */ diff --git a/src/emu/netlist/devices/nld_4066.h b/src/emu/netlist/devices/nld_4066.h index d70b4047803..39209f386b6 100644 --- a/src/emu/netlist/devices/nld_4066.h +++ b/src/emu/netlist/devices/nld_4066.h @@ -54,7 +54,6 @@ NETLIB_DEVICE(4066_dip, NETLIB_NAME(vdd_vss) m_supply; ); -NETLIB_DEVICE_DERIVED(4016_dip, 4066_dip, -); +NETLIB_DEVICE_DERIVED_PURE(4016_dip, 4066_dip); #endif /* NLD_4066_H_ */ diff --git a/src/emu/netlist/devices/nld_74175.h b/src/emu/netlist/devices/nld_74175.h index e7719d33a9e..70951ac4d42 100644 --- a/src/emu/netlist/devices/nld_74175.h +++ b/src/emu/netlist/devices/nld_74175.h @@ -61,8 +61,6 @@ NETLIB_DEVICE(74175, netlist_logic_input_t m_CLRQ; ); -NETLIB_DEVICE_DERIVED(74175_dip, 74175, - -); +NETLIB_DEVICE_DERIVED_PURE(74175_dip, 74175); #endif /* NLD_74175_H_ */ diff --git a/src/emu/netlist/devices/nld_74192.h b/src/emu/netlist/devices/nld_74192.h index f616421811d..10db69d775e 100644 --- a/src/emu/netlist/devices/nld_74192.h +++ b/src/emu/netlist/devices/nld_74192.h @@ -56,7 +56,6 @@ NETLIB_DEVICE(74192, netlist_logic_output_t m_CARRYQ; ); -NETLIB_DEVICE_DERIVED(74192_dip, 74192, -); +NETLIB_DEVICE_DERIVED_PURE(74192_dip, 74192); #endif /* NLD_74192_H_ */ diff --git a/src/emu/netlist/devices/nld_74193.h b/src/emu/netlist/devices/nld_74193.h index 6a3eefe60ba..eaa22a06ea1 100644 --- a/src/emu/netlist/devices/nld_74193.h +++ b/src/emu/netlist/devices/nld_74193.h @@ -55,7 +55,6 @@ NETLIB_DEVICE(74193, netlist_logic_output_t m_CARRYQ; ); -NETLIB_DEVICE_DERIVED(74193_dip, 74193, -); +NETLIB_DEVICE_DERIVED_PURE(74193_dip, 74193); #endif /* NLD_74193_H_ */ diff --git a/src/emu/netlist/devices/nld_7448.h b/src/emu/netlist/devices/nld_7448.h index 951c7716cdd..676da1ac184 100644 --- a/src/emu/netlist/devices/nld_7448.h +++ b/src/emu/netlist/devices/nld_7448.h @@ -73,7 +73,6 @@ public: netlist_logic_input_t m_BIQ; ); #endif -NETLIB_DEVICE_DERIVED(7448_dip, 7448, -); +NETLIB_DEVICE_DERIVED_PURE(7448_dip, 7448); #endif /* NLD_7448_H_ */ diff --git a/src/emu/netlist/devices/nld_7483.h b/src/emu/netlist/devices/nld_7483.h index d9730d9f94e..d887c72f0a9 100644 --- a/src/emu/netlist/devices/nld_7483.h +++ b/src/emu/netlist/devices/nld_7483.h @@ -65,7 +65,6 @@ NETLIB_DEVICE(7483, ); -NETLIB_DEVICE_DERIVED(7483_dip, 7483, -); +NETLIB_DEVICE_DERIVED_PURE(7483_dip, 7483); #endif /* NLD_7483_H_ */ diff --git a/src/emu/netlist/devices/nld_7490.h b/src/emu/netlist/devices/nld_7490.h index 7dccdf01bda..81398d69bd8 100644 --- a/src/emu/netlist/devices/nld_7490.h +++ b/src/emu/netlist/devices/nld_7490.h @@ -87,7 +87,6 @@ NETLIB_DEVICE(7490, netlist_logic_output_t m_Q[4]; ); -NETLIB_DEVICE_DERIVED(7490_dip, 7490, -); +NETLIB_DEVICE_DERIVED_PURE(7490_dip, 7490); #endif /* NLD_7490_H_ */ diff --git a/src/emu/netlist/devices/nld_7493.h b/src/emu/netlist/devices/nld_7493.h index d18374e3e5c..1cdb1594076 100644 --- a/src/emu/netlist/devices/nld_7493.h +++ b/src/emu/netlist/devices/nld_7493.h @@ -86,8 +86,7 @@ NETLIB_DEVICE(7493, NETLIB_NAME(7493ff) D; ); -NETLIB_DEVICE_DERIVED(7493_dip, 7493, -); +NETLIB_DEVICE_DERIVED_PURE(7493_dip, 7493); #endif /* NLD_7493_H_ */ diff --git a/src/emu/netlist/devices/nld_82S16.c b/src/emu/netlist/devices/nld_82S16.c index 8e459f60681..a9f7b7c9072 100644 --- a/src/emu/netlist/devices/nld_82S16.c +++ b/src/emu/netlist/devices/nld_82S16.c @@ -7,7 +7,7 @@ #include "nld_82S16.h" -static const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; +//static const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; // FIXME: timing! // FIXME: optimize device (separate address decoder!) diff --git a/src/emu/netlist/devices/nld_82S16.h b/src/emu/netlist/devices/nld_82S16.h index e834094f09d..1f4b443c991 100644 --- a/src/emu/netlist/devices/nld_82S16.h +++ b/src/emu/netlist/devices/nld_82S16.h @@ -45,8 +45,6 @@ NETLIB_DEVICE(82S16, UINT8 m_ram[256]; ); -NETLIB_DEVICE_DERIVED(82S16_dip, 82S16, - -); +NETLIB_DEVICE_DERIVED_PURE(82S16_dip, 82S16); #endif /* NLD_82S16_H_ */ diff --git a/src/emu/netlist/devices/nld_9310.h b/src/emu/netlist/devices/nld_9310.h index 9f555060030..a485749588f 100644 --- a/src/emu/netlist/devices/nld_9310.h +++ b/src/emu/netlist/devices/nld_9310.h @@ -102,7 +102,6 @@ NETLIB_DEVICE(9310, netlist_logic_input_t m_LOADQ; ); -NETLIB_DEVICE_DERIVED(9310_dip, 9310, -); +NETLIB_DEVICE_DERIVED_PURE(9310_dip, 9310); #endif /* NLD_9310_H_ */ diff --git a/src/emu/netlist/devices/nld_9316.h b/src/emu/netlist/devices/nld_9316.h index ed1e1d4d5c3..88c53b44ae0 100644 --- a/src/emu/netlist/devices/nld_9316.h +++ b/src/emu/netlist/devices/nld_9316.h @@ -107,7 +107,6 @@ NETLIB_DEVICE(9316, netlist_logic_input_t m_LOADQ; ); -NETLIB_DEVICE_DERIVED(9316_dip, 9316, -); +NETLIB_DEVICE_DERIVED_PURE(9316_dip, 9316); #endif /* NLD_9316_H_ */ diff --git a/src/emu/netlist/devices/nld_log.c b/src/emu/netlist/devices/nld_log.c index 51bbad790ab..a57301df744 100644 --- a/src/emu/netlist/devices/nld_log.c +++ b/src/emu/netlist/devices/nld_log.c @@ -5,6 +5,8 @@ * */ +#include <cstdio> + #include "nld_log.h" //#include "sound/wavwrite.h" @@ -24,12 +26,12 @@ NETLIB_RESET(log) NETLIB_UPDATE(log) { - fprintf(m_file, "%20.9e %e\n", netlist().time().as_double(), (nl_double) INPANALOG(m_I)); + std::fprintf(static_cast<FILE *>(m_file), "%20.9e %e\n", netlist().time().as_double(), (nl_double) INPANALOG(m_I)); } NETLIB_NAME(log)::~NETLIB_NAME(log)() { - fclose(m_file); + std::fclose(static_cast<FILE *>(m_file)); } NETLIB_START(logD) @@ -44,7 +46,7 @@ NETLIB_RESET(logD) NETLIB_UPDATE(logD) { - fprintf(m_file, "%e %e\n", netlist().time().as_double(), (nl_double) (INPANALOG(m_I) - INPANALOG(m_I2))); + std::fprintf(static_cast<FILE *>(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_log.h b/src/emu/netlist/devices/nld_log.h index bf0bbe31a0d..99fd9541602 100644 --- a/src/emu/netlist/devices/nld_log.h +++ b/src/emu/netlist/devices/nld_log.h @@ -28,7 +28,7 @@ NETLIB_DEVICE(log, ~NETLIB_NAME(log)(); netlist_analog_input_t m_I; protected: - FILE * m_file; + void * m_file; ); #define LOGD(_name, _I, _I2) \ diff --git a/src/emu/netlist/devices/nld_ne555.h b/src/emu/netlist/devices/nld_ne555.h index 2d42675a386..cb433732c48 100644 --- a/src/emu/netlist/devices/nld_ne555.h +++ b/src/emu/netlist/devices/nld_ne555.h @@ -47,8 +47,7 @@ NETLIB_DEVICE(NE555, #define NE555_DIP(_name) \ NET_REGISTER_DEV(NE555_dip, _name) -NETLIB_DEVICE_DERIVED(NE555_dip, NE555, -); +NETLIB_DEVICE_DERIVED_PURE(NE555_dip, NE555); #endif /* NLD_NE555_H_ */ diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c index 6a22a633eba..1f839a5a1aa 100644 --- a/src/emu/netlist/devices/nld_system.c +++ b/src/emu/netlist/devices/nld_system.c @@ -198,7 +198,7 @@ ATTR_COLD void nld_d_to_a_proxy::reset() m_is_timestep = m_RV.m_P.net().as_analog().solver()->is_timestep(); } -ATTR_HOT ATTR_ALIGN void nld_d_to_a_proxy::update() +ATTR_HOT void nld_d_to_a_proxy::update() { const int state = INPLOGIC(m_I); if (state != m_last_state) diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h index 1392c6aa12e..936b1013792 100644 --- a/src/emu/netlist/devices/nld_system.h +++ b/src/emu/netlist/devices/nld_system.h @@ -151,7 +151,7 @@ protected: { } - ATTR_HOT ATTR_ALIGN void update() + ATTR_HOT void update() { OUTANALOG(m_Q, 0.0); } @@ -184,7 +184,7 @@ protected: { } - ATTR_HOT ATTR_ALIGN void update() + ATTR_HOT void update() { } @@ -217,7 +217,7 @@ protected: { } - ATTR_HOT ATTR_ALIGN void update() + ATTR_HOT void update() { OUTANALOG(m_Q, INPANALOG(m_I)); } @@ -249,8 +249,8 @@ protected: ATTR_COLD void start(); ATTR_COLD void reset(); - ATTR_HOT ATTR_ALIGN void update(); - ATTR_HOT ATTR_ALIGN void update_param(); + ATTR_HOT void update(); + ATTR_HOT void update_param(); private: UINT8 m_last_state; @@ -317,7 +317,7 @@ protected: { } - ATTR_HOT ATTR_ALIGN void update() + ATTR_HOT void update() { if (m_I.Q_Analog() > logic_family().m_high_thresh_V) OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(1)); @@ -376,7 +376,7 @@ protected: ATTR_COLD virtual void reset(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT void update(); private: netlist_analog_output_t m_Q; diff --git a/src/emu/netlist/devices/nld_truthtable.h b/src/emu/netlist/devices/nld_truthtable.h index 12ecb255aaf..2ba5082b086 100644 --- a/src/emu/netlist/devices/nld_truthtable.h +++ b/src/emu/netlist/devices/nld_truthtable.h @@ -23,7 +23,7 @@ static const char *m_desc[]; \ } - +#if 0 static inline UINT32 remove_first_bit(UINT32 v) { for (int i=0; i<32; i++) @@ -31,6 +31,7 @@ static inline UINT32 remove_first_bit(UINT32 v) return v & ~(1<<i); return v; } +#endif struct truthtable_desc_t { @@ -206,7 +207,7 @@ public: } - ATTR_HOT ATTR_ALIGN void update() + ATTR_HOT void update() { process<true>(); } diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c index e61cb65a09c..090b9fe1a7d 100644 --- a/src/emu/netlist/nl_base.c +++ b/src/emu/netlist/nl_base.c @@ -5,6 +5,10 @@ * */ +#include <cstring> + +#include "palloc.h" + #include "nl_base.h" #include "devices/nld_system.h" #include "analog/nld_solver.h" @@ -13,6 +17,28 @@ const netlist_time netlist_time::zero = netlist_time::from_raw(0); +//============================================================ +// Exceptions +//============================================================ + +// emu_fatalerror is a generic fatal exception that provides an error string +nl_fatalerror::nl_fatalerror(const char *format, ...) +{ + va_list ap; + va_start(ap, format); + m_text = pstring(format).vprintf(ap); + va_end(ap); +} + +nl_fatalerror::nl_fatalerror(const char *format, va_list ap) +{ + m_text = pstring(format).vprintf(ap); +} + +// ---------------------------------------------------------------------------------------- +// netlist_logic_family_ttl_t +// ---------------------------------------------------------------------------------------- + class netlist_logic_family_ttl_t : public netlist_logic_family_desc_t { public: @@ -28,7 +54,7 @@ public: } virtual nld_base_d_to_a_proxy *create_d_a_proxy(netlist_logic_output_t &proxied) const { - return nl_alloc(nld_d_to_a_proxy , proxied); + return palloc(nld_d_to_a_proxy , proxied); } }; @@ -48,7 +74,7 @@ public: } virtual nld_base_d_to_a_proxy *create_d_a_proxy(netlist_logic_output_t &proxied) const { - return nl_alloc(nld_d_to_a_proxy , proxied); + return palloc(nld_d_to_a_proxy , proxied); } }; @@ -84,9 +110,10 @@ void netlist_queue_t::on_pre_save() for (int i = 0; i < m_qsize; i++ ) { m_times[i] = this->listptr()[i].exec_time().as_raw(); - const char *p = this->listptr()[i].object()->name().cstr(); - int n = MIN(63, strlen(p)); - strncpy(&(m_name[i][0]), p, n); + pstring p = this->listptr()[i].object()->name(); + int n = p.len(); + n = std::min(63, n); + std::strncpy(&(m_name[i][0]), p, n); m_name[i][n] = 0; } } @@ -117,7 +144,7 @@ ATTR_COLD netlist_object_t::netlist_object_t(const type_t atype, const family_t ATTR_COLD netlist_object_t::~netlist_object_t() { - //delete m_name; + } ATTR_COLD void netlist_object_t::init_object(netlist_base_t &nl, const pstring &aname) @@ -161,10 +188,10 @@ netlist_base_t::netlist_base_t() m_stop(netlist_time::zero), m_time(netlist_time::zero), m_queue(*this), - m_use_deactivate(0), m_mainclock(NULL), m_solver(NULL), m_gnd(NULL), + m_use_deactivate(0), m_setup(NULL) { } @@ -175,7 +202,7 @@ netlist_base_t::~netlist_base_t() { if (!m_nets[i]->isRailNet()) { - global_free(m_nets[i]); + pfree(m_nets[i]); } } @@ -295,7 +322,7 @@ ATTR_COLD void netlist_base_t::reset() } -ATTR_HOT ATTR_ALIGN void netlist_base_t::process_queue(const netlist_time &delta) +ATTR_HOT void netlist_base_t::process_queue(const netlist_time &delta) { m_stop = m_time + delta; @@ -424,7 +451,7 @@ ATTR_COLD void netlist_core_device_t::stop_dev() stop(); } -ATTR_HOT ATTR_ALIGN netlist_sig_t netlist_core_device_t::INPLOGIC_PASSIVE(netlist_logic_input_t &inp) +ATTR_HOT 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(); @@ -562,7 +589,7 @@ ATTR_COLD netlist_net_t::netlist_net_t(const family_t afamily) , m_in_queue(2) , m_cur_Analog(0.0) { -}; +} ATTR_COLD netlist_net_t::~netlist_net_t() { @@ -649,7 +676,7 @@ ATTR_HOT inline void netlist_core_terminal_t::update_dev(const UINT32 mask) } } -ATTR_HOT /*ATTR_ALIGN*/ inline void netlist_net_t::update_devs() +ATTR_HOT inline void netlist_net_t::update_devs() { //assert(m_num_cons != 0); nl_assert(this->isRailNet()); @@ -747,7 +774,7 @@ ATTR_COLD void netlist_net_t::merge_net(netlist_net_t *othernet) ATTR_COLD netlist_logic_net_t::netlist_logic_net_t() : netlist_net_t(LOGIC) { -}; +} ATTR_COLD void netlist_logic_net_t::reset() @@ -770,7 +797,7 @@ ATTR_COLD netlist_analog_net_t::netlist_analog_net_t() , m_h_n_m_1(1e-6) , m_solver(NULL) { -}; +} ATTR_COLD void netlist_analog_net_t::reset() { diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h index a5f471f5f5a..1eef0b71181 100644 --- a/src/emu/netlist/nl_base.h +++ b/src/emu/netlist/nl_base.h @@ -155,7 +155,6 @@ #ifndef NLBASE_H_ #define NLBASE_H_ -#include "nl_config.h" #include "nl_lists.h" #include "nl_time.h" #include "nl_util.h" @@ -189,19 +188,19 @@ typedef void (*net_update_delegate)(netlist_core_device_t *); #define NETLIB_NAME_STR_S(_s) # _s #define NETLIB_NAME_STR(_chip) NETLIB_NAME_STR_S(nld_ ## _chip) -#define NETLIB_UPDATE(_chip) ATTR_HOT ATTR_ALIGN void NETLIB_NAME(_chip) :: update(void) +#define NETLIB_UPDATE(_chip) ATTR_HOT void NETLIB_NAME(_chip) :: update(void) #define NETLIB_START(_chip) ATTR_COLD void NETLIB_NAME(_chip) :: start(void) #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 +#define NETLIB_UPDATE_PARAM(_chip) ATTR_HOT void NETLIB_NAME(_chip) :: update_param(void) +#define NETLIB_FUNC_VOID(_chip, _name, _params) ATTR_HOT void NETLIB_NAME(_chip) :: _name _params -#define NETLIB_UPDATE_TERMINALS(_chip) ATTR_HOT ATTR_ALIGN void NETLIB_NAME(_chip) :: update_terminals(void) -#define NETLIB_UPDATE_TERMINALSI() ATTR_HOT ATTR_ALIGN void update_terminals(void) -#define NETLIB_UPDATEI() ATTR_HOT ATTR_ALIGN void update(void) +#define NETLIB_UPDATE_TERMINALS(_chip) ATTR_HOT void NETLIB_NAME(_chip) :: update_terminals(void) +#define NETLIB_UPDATE_TERMINALSI() ATTR_HOT void update_terminals(void) +#define NETLIB_UPDATEI() ATTR_HOT void update(void) #define NETLIB_DEVICE_BASE(_name, _pclass, _extra, _priv) \ class _name : public _pclass \ @@ -217,11 +216,14 @@ typedef void (*net_update_delegate)(netlist_core_device_t *); _priv \ } +#define NETLIB_DEVICE_DERIVED_PURE(_name, _pclass) \ + NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), protected:, private:) + #define NETLIB_DEVICE_DERIVED(_name, _pclass, _priv) \ - NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), , _priv) + NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), protected:, _priv) #define NETLIB_DEVICE(_name, _priv) \ - NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, , _priv) + NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, protected:, _priv) #define NETLIB_SUBDEVICE(_name, _priv) \ class NETLIB_NAME(_name) : public netlist_device_t \ @@ -254,6 +256,32 @@ ATTR_COLD virtual const netlist_logic_family_desc_t *default_logic_family() return &netlist_family_ ## _fam; \ } +//============================================================ +// Exceptions +//============================================================ + +class nl_fatalerror : public std::exception +{ +public: + nl_fatalerror(const char *format, ...) ATTR_PRINTF(2,3); + nl_fatalerror(const char *format, va_list ap); + virtual ~nl_fatalerror() throw() {} + + inline const pstring &text() { return m_text; } +private: + pstring m_text; +}; + +//============================================================ +// Asserts +//============================================================ + +#ifdef MAME_DEBUG +#define nl_assert(x) do { if (!(x)) throw nl_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0) +#else +#define nl_assert(x) do { if (0) if (!(x)) throw nl_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0) +#endif +#define nl_assert_always(x, msg) do { if (!(x)) throw nl_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0) // ----------------------------------------------------------------------------- @@ -335,7 +363,7 @@ public: NET = 4, DEVICE = 5, NETLIST = 6, - QUEUE = 7, + QUEUE = 7 }; enum family_t { // Terminal families @@ -354,7 +382,7 @@ public: VCVS, // Voltage controlled voltage source VCCS, // Voltage controlled current source CCCS, // Current controlled current source - GND, // GND device + GND // GND device }; ATTR_COLD netlist_object_t(const type_t atype, const family_t afamily); @@ -374,8 +402,8 @@ public: 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; } + ATTR_HOT inline netlist_base_t & netlist() { return *m_netlist; } + ATTR_HOT inline const netlist_base_t & netlist() const { return *m_netlist; } ATTR_COLD void inline do_reset() { @@ -392,7 +420,7 @@ private: pstring m_name; const type_t m_objtype; const family_t m_family; - netlist_base_t * RESTRICT m_netlist; + netlist_base_t * m_netlist; }; // ----------------------------------------------------------------------------- @@ -407,9 +435,9 @@ public: ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); - ATTR_HOT inline netlist_core_device_t & RESTRICT netdev() const { return *m_netdev; } + ATTR_HOT inline netlist_core_device_t &netdev() const { return *m_netdev; } private: - netlist_core_device_t * RESTRICT m_netdev; + netlist_core_device_t * m_netdev; }; // ----------------------------------------------------------------------------- @@ -443,8 +471,8 @@ public: ATTR_COLD inline void clear_net() { m_net = NULL; } ATTR_HOT inline bool has_net() const { return (m_net != NULL); } - 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 netlist_net_t & net() const { return *m_net;} + ATTR_HOT inline netlist_net_t & net() { return *m_net;} 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; } @@ -465,19 +493,19 @@ protected: } private: - netlist_net_t * RESTRICT m_net; + netlist_net_t * m_net; state_e m_state; }; NETLIST_SAVE_TYPE(netlist_core_terminal_t::state_e, DT_INT); -class ATTR_ALIGN netlist_terminal_t : public netlist_core_terminal_t +class netlist_terminal_t : public netlist_core_terminal_t { NETLIST_PREVENT_COPYING(netlist_terminal_t) public: - typedef plist_t<netlist_terminal_t * RESTRICT> list_t; + typedef plist_t<netlist_terminal_t *> list_t; ATTR_COLD netlist_terminal_t(); @@ -619,8 +647,6 @@ protected: } }; -//#define INPVAL(_x) (_x).Q() - // ----------------------------------------------------------------------------- // net_net_t // ----------------------------------------------------------------------------- @@ -641,11 +667,11 @@ public: ATTR_COLD void merge_net(netlist_net_t *othernet); 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; + ATTR_HOT inline netlist_logic_net_t & as_logic(); + ATTR_HOT inline const netlist_logic_net_t & as_logic() const; - ATTR_HOT inline netlist_analog_net_t & RESTRICT as_analog(); - ATTR_HOT inline const netlist_analog_net_t & RESTRICT as_analog() const; + ATTR_HOT inline netlist_analog_net_t & as_analog(); + ATTR_HOT inline const netlist_analog_net_t & as_analog() const; ATTR_HOT void update_devs(); @@ -690,7 +716,7 @@ protected: //FIXME: needed by current solver code private: - netlist_core_terminal_t * RESTRICT m_railterminal; + netlist_core_terminal_t * m_railterminal; plinkedlist_t<netlist_core_terminal_t> m_list_active; netlist_time m_time; @@ -1031,7 +1057,7 @@ public: ATTR_HOT virtual void dec_active() { } - ATTR_HOT virtual void step_time(const nl_double st) { } + ATTR_HOT virtual void step_time(ATTR_UNUSED const nl_double st) { } ATTR_HOT virtual void update_terminals() { } @@ -1222,7 +1248,7 @@ protected: { NL_ERROR, NL_WARNING, - NL_LOG, + NL_LOG }; // any derived netlist must override this ... @@ -1246,12 +1272,12 @@ private: netlist_time m_time; netlist_queue_t m_queue; - bool m_use_deactivate; - NETLIB_NAME(mainclock) * m_mainclock; NETLIB_NAME(solver) * m_solver; NETLIB_NAME(gnd) * m_gnd; + bool m_use_deactivate; + NETLIB_NAME(netlistparams) *m_params; netlist_setup_t *m_setup; }; @@ -1286,25 +1312,25 @@ ATTR_HOT inline void netlist_param_double_t::setTo(const nl_double param) } } -ATTR_HOT inline netlist_logic_net_t & RESTRICT netlist_net_t::as_logic() +ATTR_HOT inline netlist_logic_net_t & netlist_net_t::as_logic() { nl_assert(family() == LOGIC); return static_cast<netlist_logic_net_t &>(*this); } -ATTR_HOT inline const netlist_logic_net_t & RESTRICT netlist_net_t::as_logic() const +ATTR_HOT inline const netlist_logic_net_t & netlist_net_t::as_logic() const { nl_assert(family() == LOGIC); return static_cast<const netlist_logic_net_t &>(*this); } -ATTR_HOT inline netlist_analog_net_t & RESTRICT netlist_net_t::as_analog() +ATTR_HOT inline netlist_analog_net_t & netlist_net_t::as_analog() { nl_assert(family() == ANALOG); return static_cast<netlist_analog_net_t &>(*this); } -ATTR_HOT inline const netlist_analog_net_t & RESTRICT netlist_net_t::as_analog() const +ATTR_HOT inline const netlist_analog_net_t & netlist_net_t::as_analog() const { nl_assert(family() == ANALOG); return static_cast<const netlist_analog_net_t &>(*this); diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h index 5baf097d352..b4c08feafcb 100644 --- a/src/emu/netlist/nl_config.h +++ b/src/emu/netlist/nl_config.h @@ -8,14 +8,7 @@ #ifndef NLCONFIG_H_ #define NLCONFIG_H_ -/* FIXME: at some time, make it compile on its own */ - -#include "osdcore.h" -#include "corealloc.h" -#include "eminline.h" -#include <math.h> -#include <exception> -#include <typeinfo> +#include "pconfig.h" //============================================================ // SETUP @@ -102,8 +95,6 @@ // DEBUGGING //============================================================ -//#define fatalerror xxbreakme - #define NL_VERBOSE (0) #define NL_KEEP_STATISTICS (0) @@ -129,16 +120,6 @@ _name(const _name &); \ _name &operator=(const _name &); -#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) -#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) -#define ATTR_ALIGN __attribute__ ((aligned(64))) -#else -#define ATTR_ALIGN -#endif -#else -#define ATTR_ALIGN -#endif - //============================================================ // Performance tracking //============================================================ @@ -159,128 +140,6 @@ #define NLNAME(x) x, #x //============================================================ -// Exceptions -//============================================================ - -// emu_fatalerror is a generic fatal exception that provides an error string -class nl_fatalerror : public std::exception -{ -public: - nl_fatalerror(const char *format, ...) ATTR_PRINTF(2,3) - { - char text[1024]; - va_list ap; - va_start(ap, format); - vsprintf(text, format, ap); - va_end(ap); - osd_printf_error("%s\n", text); - } - nl_fatalerror(const char *format, va_list ap) - { - char text[1024]; - vsprintf(text, format, ap); - osd_printf_error("%s\n", text); - } -}; - -//============================================================ -// Memory allocation -//============================================================ - -#define nl_alloc(T, ...) global_alloc(T(__VA_ARGS__)) -#define nl_alloc_array(T, N) global_alloc_array(T, N) - -#define nl_free(_ptr) global_free(_ptr) -#define nl_free_array(_ptr) global_free_array(_ptr) - - -//============================================================ -// Asserts -//============================================================ - -#ifdef MAME_DEBUG -#define nl_assert(x) do { if (!(x)) throw nl_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0) -#else -#define nl_assert(x) do { if (0) if (!(x)) throw nl_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0) -//#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s (%s:%d)", msg, __FILE__, __LINE__); } while (0) -#endif -#define nl_assert_always(x, msg) do { if (!(x)) throw nl_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0) - -//============================================================ -// Compiling standalone -//============================================================ - -// Compiling without mame ? - -#ifndef ATTR_HOT -#warning ATTR_HOT not defined - -// standard C includes -#include <math.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <stdarg.h> - -// standard C++ includes -#include <exception> -#include <typeinfo> -#include <new> - -#define ATTR_HOT -#define ATTR_COLD -#define ATTR_PRINTF(n1,n2) -#define RESTRICT -#define EXPECTED -#define UNEXPECTED -#define ATTR_UNUSED __attribute__((__unused__)) - -/* 8-bit values */ -typedef unsigned char UINT8; -typedef signed char INT8; - -/* 16-bit values */ -typedef unsigned short UINT16; -typedef signed short INT16; - -/* 32-bit values */ -#ifndef _WINDOWS_H -typedef unsigned int UINT32; -typedef signed int INT32; -#endif - -/* 64-bit values */ -#ifndef _WINDOWS_H -#ifdef _MSC_VER -typedef signed __int64 INT64; -typedef unsigned __int64 UINT64; -#else -__extension__ typedef unsigned long long UINT64; -__extension__ typedef signed long long INT64; -#endif -#endif - -/* U64 and S64 are used to wrap long integer constants. */ -#if defined(__GNUC__) || defined(_MSC_VER) -#define U64(val) val##ULL -#define S64(val) val##LL -#else -#define U64(val) val -#define S64(val) val -#endif - -/* Standard MIN/MAX macros */ -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - - -#endif - -//============================================================ // WARNINGS //============================================================ diff --git a/src/emu/netlist/nl_dice_compat.h b/src/emu/netlist/nl_dice_compat.h index 45a20f1b533..f67a7895658 100644 --- a/src/emu/netlist/nl_dice_compat.h +++ b/src/emu/netlist/nl_dice_compat.h @@ -41,7 +41,7 @@ sed -e 's/#define \(.*\)"\(.*\)"[ \t]*,[ \t]*\(.*\)/NET_ALIAS(\1,\2.\3)/' src/ma #ifndef NL_CONVERT_CPP #ifdef NETLIST_DEVELOPMENT -#define CHIP(_n, _t) setup.register_dev( nl_alloc(nld_ ## _t ## _dip), _n); +#define CHIP(_n, _t) setup.register_dev( palloc(nld_ ## _t ## _dip), _n); #else #define CHIP(_n, _t) setup.register_dev(NETLIB_NAME_STR(_t ## _dip), _n); #endif diff --git a/src/emu/netlist/nl_factory.c b/src/emu/netlist/nl_factory.c index 7c6f38dcac4..0bce8389f79 100644 --- a/src/emu/netlist/nl_factory.c +++ b/src/emu/netlist/nl_factory.c @@ -6,45 +6,6 @@ Discrete netlist implementation. -**************************************************************************** - - Couriersud reserves the right to license the code under a less restrictive - license going forward. - - Copyright Nicola Salmoria and the MAME team - All rights reserved. - - Redistribution and use of this code or any derivative works are permitted - provided that the following conditions are met: - - * Redistributions may not be sold, nor may they be used in a commercial - product or activity. - - * Redistributions that are modified from the original source must include the - complete source code, including the source code for all components used by a - binary built from the modified sources. However, as a special exception, the - source code distributed need not include anything that is normally distributed - (in either source or binary form) with the major components (compiler, kernel, - and so on) of the operating system on which the executable runs, unless that - component itself accompanies the executable. - - * Redistributions must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other - materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - ****************************************************************************/ #include "nl_factory.h" @@ -80,7 +41,7 @@ netlist_factory_t::~netlist_factory_t() for (net_device_t_base_factory * const *e = m_list.first(); e != NULL; e = m_list.next(e)) { net_device_t_base_factory *p = *e; - global_free(p); + pfree(p); } m_list.clear(); } @@ -90,7 +51,7 @@ netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &clas for (net_device_t_base_factory * const *e = m_list.first(); e != NULL; e = m_list.next(e)) { net_device_t_base_factory *p = *e; - if (strcmp(p->classname(), classname) == 0) + if (p->classname() == classname) { netlist_device_t *ret = p->Create(); return ret; @@ -111,7 +72,7 @@ net_device_t_base_factory * netlist_factory_t::factory_by_name(const pstring &na for (net_device_t_base_factory * const *e = m_list.first(); e != NULL; e = m_list.next(e)) { net_device_t_base_factory *p = *e; - if (strcmp(p->name(), name) == 0) + if (p->name() == name) { return p; } diff --git a/src/emu/netlist/nl_factory.h b/src/emu/netlist/nl_factory.h index 421bdfefdad..1998dbd07d2 100644 --- a/src/emu/netlist/nl_factory.h +++ b/src/emu/netlist/nl_factory.h @@ -10,6 +10,7 @@ #define NLFACTORY_H_ #include "nl_config.h" +#include "palloc.h" #include "plists.h" #include "nl_base.h" #include "pstring.h" @@ -54,7 +55,7 @@ public: ATTR_COLD netlist_device_t *Create() const { - netlist_device_t *r = nl_alloc(C); + netlist_device_t *r = palloc(C); //r->init(setup, name); return r; } @@ -72,7 +73,7 @@ public: ATTR_COLD void register_device(const pstring &name, const pstring &classname, const pstring &def_param) { - m_list.add(nl_alloc(net_device_t_factory< _C >, name, classname, def_param)); + m_list.add(palloc(net_device_t_factory< _C >, name, classname, def_param)); } ATTR_COLD netlist_device_t *new_device_by_classname(const pstring &classname) const; diff --git a/src/emu/netlist/nl_lists.h b/src/emu/netlist/nl_lists.h index b0bfdd9b517..c1825bff3cf 100644 --- a/src/emu/netlist/nl_lists.h +++ b/src/emu/netlist/nl_lists.h @@ -45,7 +45,6 @@ public: netlist_timed_queue() { - //m_list = global_alloc_array(entry_t, SIZE); clear(); } @@ -53,7 +52,7 @@ public: 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) + ATTR_HOT void push(const entry_t &e) { entry_t * i = m_end++; while ((i > &m_list[0]) && (e.exec_time() > (i - 1)->exec_time()) ) @@ -64,7 +63,7 @@ public: } *i = e; inc_stat(m_prof_sort); - nl_assert(m_end - m_list < _Size); + //nl_assert(m_end - m_list < _Size); } ATTR_HOT inline const entry_t *pop() diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c index fb939ed6ebd..fe0bfad28eb 100644 --- a/src/emu/netlist/nl_parser.c +++ b/src/emu/netlist/nl_parser.c @@ -283,7 +283,7 @@ bool netlist_parser::parse(const char *buf, const pstring nlname) } } -void netlist_parser::parse_netlist(const pstring &nlname) +void netlist_parser::parse_netlist(ATTR_UNUSED const pstring &nlname) { while (true) { diff --git a/src/emu/netlist/nl_parser.h b/src/emu/netlist/nl_parser.h index d93bf7585d4..d8fb07b555e 100644 --- a/src/emu/netlist/nl_parser.h +++ b/src/emu/netlist/nl_parser.h @@ -28,7 +28,7 @@ public: STRING, COMMENT, UNKNOWN, - ENDOFFILE, + ENDOFFILE }; struct token_id_t diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c index ba69d6bd47c..bab76e657cd 100644 --- a/src/emu/netlist/nl_setup.c +++ b/src/emu/netlist/nl_setup.c @@ -5,6 +5,9 @@ * */ +#include <cstdio> + +#include "palloc.h" #include "nl_base.h" #include "nl_setup.h" #include "nl_parser.h" @@ -36,7 +39,7 @@ netlist_setup_t::netlist_setup_t(netlist_base_t &netlist) , m_proxy_cnt(0) { netlist.set_setup(this); - m_factory = nl_alloc(netlist_factory_t); + m_factory = palloc(netlist_factory_t); } void netlist_setup_t::init() @@ -55,7 +58,7 @@ netlist_setup_t::~netlist_setup_t() m_params_temp.clear(); netlist().set_setup(NULL); - nl_free(m_factory); + pfree(m_factory); pstring::resetmem(); } @@ -221,7 +224,7 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name { NL_VERBOSE_OUT(("Found parameter ... %s : %s\n", name.cstr(), val.cstr())); double vald = 0; - if (sscanf(val.cstr(), "%lf", &vald) != 1) + if (std::sscanf(val.cstr(), "%lf", &vald) != 1) netlist().error("Invalid number conversion %s : %s\n", name.cstr(), val.cstr()); dynamic_cast<netlist_param_double_t &>(param).initial(vald); } @@ -231,7 +234,7 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name { NL_VERBOSE_OUT(("Found parameter ... %s : %s\n", name.cstr(), val.cstr())); double vald = 0; - if (sscanf(val.cstr(), "%lf", &vald) != 1) + if (std::sscanf(val.cstr(), "%lf", &vald) != 1) netlist().error("Invalid number conversion %s : %s\n", name.cstr(), val.cstr()); dynamic_cast<netlist_param_int_t &>(param).initial((int) vald); } @@ -436,7 +439,7 @@ void netlist_setup_t::connect_input_output(netlist_core_terminal_t &in, netlist_ 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); + nld_a_to_d_proxy *proxy = palloc(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++; @@ -475,7 +478,7 @@ void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_c { 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); + nld_a_to_d_proxy *proxy = palloc(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++; @@ -544,7 +547,7 @@ void netlist_setup_t::connect_terminals(netlist_core_terminal_t &t1, netlist_cor else { NL_VERBOSE_OUT(("adding net ...\n")); - netlist_analog_net_t *anet = nl_alloc(netlist_analog_net_t); + netlist_analog_net_t *anet = palloc(netlist_analog_net_t); t1.set_net(*anet); //m_netlist.solver()->m_nets.add(anet); // FIXME: Nets should have a unique name @@ -721,7 +724,7 @@ void netlist_setup_t::resolve_inputs() netlist().log("Deleting net %s ...", todelete[i]->name().cstr()); netlist().m_nets.remove(todelete[i]); if (!todelete[i]->isRailNet()) - delete todelete[i]; + pfree(todelete[i]); } pstring errstr(""); diff --git a/src/emu/netlist/nl_setup.h b/src/emu/netlist/nl_setup.h index d58893ca6af..311ca0bfa63 100644 --- a/src/emu/netlist/nl_setup.h +++ b/src/emu/netlist/nl_setup.h @@ -9,7 +9,6 @@ #define NLSETUP_H_ #include "nl_base.h" -//#include "nl_factory.h" //============================================================ // MACROS / inline netlist definitions @@ -23,8 +22,6 @@ #define ALIAS(_alias, _name) \ setup.register_alias(# _alias, # _name); -//#define NET_NEW(_type) setup.factory().new_device_by_classname(NETLIB_NAME_STR(_type), setup) - #define NET_REGISTER_DEV(_type, _name) \ setup.register_dev(NETLIB_NAME_STR(_type), # _name); diff --git a/src/emu/netlist/nl_time.h b/src/emu/netlist/nl_time.h index 457f7622307..8e759f2cf1b 100644 --- a/src/emu/netlist/nl_time.h +++ b/src/emu/netlist/nl_time.h @@ -7,7 +7,6 @@ #ifndef NLTIME_H_ #define NLTIME_H_ -#include "nl_config.h" #include "pstate.h" //============================================================ diff --git a/src/emu/netlist/palloc.c b/src/emu/netlist/palloc.c new file mode 100644 index 00000000000..176a1968a9e --- /dev/null +++ b/src/emu/netlist/palloc.c @@ -0,0 +1,26 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * palloc.c + * + */ + +#include "pconfig.h" + +#if (PSTANDALONE) +#include <stdlib.h> +#include <xmmintrin.h> + +void *palloc_raw(const size_t size) +{ + //size_t asize = ((size + 63) / 64) * 64; + //return aligned_alloc(64, asize); + return _mm_malloc(size, 64); +} + +void pfree_raw(void *p) +{ + //free(p); + _mm_free(p); +} +#endif diff --git a/src/emu/netlist/palloc.h b/src/emu/netlist/palloc.h new file mode 100644 index 00000000000..7b6106aa73e --- /dev/null +++ b/src/emu/netlist/palloc.h @@ -0,0 +1,107 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * palloc.h + * + */ + +#ifndef PALLOC_H_ +#define PALLOC_H_ + +#include "pconfig.h" + +//============================================================ +// Memory allocation +//============================================================ + +#if (PSTANDALONE) +#include <cstddef> +#include <new> + +#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) +#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) +#define ATTR_ALIGN __attribute__ ((aligned(64))) +#else +#define ATTR_ALIGN +#endif +#else +#define ATTR_ALIGN +#endif + + +void *palloc_raw(const size_t size); +void pfree_raw(void *p); + +template<typename T> +inline T *palloc_t() +{ + void *p = palloc_raw(sizeof(T)); + return new (p) T(); +} + +template<typename T, typename P1> +inline T *palloc_t(P1 &p1) +{ + void *p = palloc_raw(sizeof(T)); + return new (p) T(p1); +} + +template<typename T, typename P1, typename P2> +inline T *palloc_t(P1 &p1, P2 &p2) +{ + void *p = palloc_raw(sizeof(T)); + return new (p) T(p1, p2); +} + +template<typename T, typename P1, typename P2, typename P3> +inline T *palloc_t(P1 &p1, P2 &p2, P3 &p3) +{ + void *p = palloc_raw(sizeof(T)); + return new (p) T(p1, p2, p3); +} + +template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7> +inline T *palloc_t(P1 &p1, P2 &p2, P3 &p3, P4 &p4, P5 &p5, P6 &p6, P7 &p7) +{ + void *p = palloc_raw(sizeof(T)); + return new (p) T(p1, p2, p3, p4, p5, p6, p7); +} + +template<typename T> +inline void pfree_t(T *p) +{ + p->~T(); + pfree_raw(p); + //delete p; +} + +template <typename T> +inline T *palloc_array_t(size_t N) +{ + return new T[N]; +} + +template <typename T> +inline void pfree_array_t(T *p) +{ + delete[] p; +} + +#define palloc(T, ...) palloc_t<T>(__VA_ARGS__) +#define pfree(_ptr) pfree_t(_ptr) + +#define palloc_array(T, N) palloc_array_t<T>(N) +#define pfree_array(_ptr) pfree_array_t(_ptr) + +#else + +#define ATTR_ALIGN + +#include "corealloc.h" +#define palloc(T, ...) global_alloc(T(__VA_ARGS__)) +#define pfree(_ptr) global_free(_ptr) +#define palloc_array(T, N) global_alloc_array(T, N) +#define pfree_array(_ptr) global_free_array(_ptr) +#endif + +#endif /* NLCONFIG_H_ */ diff --git a/src/emu/netlist/pconfig.h b/src/emu/netlist/pconfig.h new file mode 100644 index 00000000000..0760bc4adfa --- /dev/null +++ b/src/emu/netlist/pconfig.h @@ -0,0 +1,82 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * pconfig.h + * + */ + +#ifndef PCONFIG_H_ +#define PCONFIG_H_ + +#ifndef PSTANDALONE + #define PSTANDALONE (0) +#endif + +//============================================================ +// Compiling standalone +//============================================================ + +// Compiling without mame ? + +#include <algorithm> +#include <cstdarg> + +#if !(PSTANDALONE) +#include "osdcore.h" + +#undef ATTR_COLD +#define ATTR_COLD + +#else +#include <stdint.h> + +/* not supported in GCC prior to 4.4.x */ +/* ATTR_HOT and ATTR_COLD cause performance degration in 5.1 */ +//#define ATTR_HOT +#define ATTR_COLD +#define ATTR_HOT __attribute__((hot)) +//#define ATTR_COLD __attribute__((cold)) + +#define RESTRICT +#define EXPECTED(x) (x) +#define UNEXPECTED(x) (x) +#define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y))) +#define ATTR_UNUSED __attribute__((__unused__)) + +/* 8-bit values */ +typedef unsigned char UINT8; +typedef signed char INT8; + +/* 16-bit values */ +typedef unsigned short UINT16; +typedef signed short INT16; + +/* 32-bit values */ +#ifndef _WINDOWS_H +typedef unsigned int UINT32; +typedef signed int INT32; +#endif + +/* 64-bit values */ +#ifndef _WINDOWS_H +#ifdef _MSC_VER +typedef signed __int64 INT64; +typedef unsigned __int64 UINT64; +#else +typedef uint64_t UINT64; +typedef int64_t INT64; +#endif +#endif + +/* U64 and S64 are used to wrap long integer constants. */ +#if defined(__GNUC__) || defined(_MSC_VER) +#define U64(val) val##ULL +#define S64(val) val##LL +#else +#define U64(val) val +#define S64(val) val +#endif + +#endif + +#endif /* PCONFIG_H_ */ diff --git a/src/emu/netlist/plists.h b/src/emu/netlist/plists.h index c9c54f5d54f..3f422653367 100644 --- a/src/emu/netlist/plists.h +++ b/src/emu/netlist/plists.h @@ -10,7 +10,7 @@ #ifndef PLISTS_H_ #define PLISTS_H_ -#include "nl_config.h" +#include "palloc.h" #include "pstring.h" // ---------------------------------------------------------------------------------------- @@ -47,7 +47,7 @@ public: ATTR_COLD ~parray_t() { if (m_list != NULL) - nl_free_array(m_list); + pfree_array(m_list); m_list = NULL; } @@ -70,9 +70,9 @@ protected: ATTR_COLD void set_capacity(const int new_capacity) { if (m_list != NULL) - nl_free_array(m_list); + pfree_array(m_list); if (new_capacity > 0) - m_list = nl_alloc_array(_ListClass, new_capacity); + m_list = palloc_array(_ListClass, new_capacity); else m_list = NULL; m_capacity = new_capacity; @@ -98,7 +98,7 @@ public: if (m_capacity == 0) m_list = NULL; else - m_list = nl_alloc_array(_ListClass, m_capacity); + m_list = palloc_array(_ListClass, m_capacity); m_count = 0; } @@ -108,7 +108,7 @@ public: if (m_capacity == 0) m_list = NULL; else - m_list = nl_alloc_array(_ListClass, m_capacity); + m_list = palloc_array(_ListClass, m_capacity); m_count = 0; for (int i=0; i<rhs.count(); i++) { @@ -130,7 +130,7 @@ public: ATTR_COLD ~plist_t() { if (m_list != NULL) - nl_free_array(m_list); + pfree_array(m_list); m_list = NULL; } @@ -178,7 +178,7 @@ public: ATTR_HOT inline void remove_at(const int pos) { - nl_assert((pos>=0) && (pos<m_count)); + //nl_assert((pos>=0) && (pos<m_count)); m_count--; for (int i = pos; i < m_count; i++) { @@ -188,8 +188,8 @@ public: ATTR_HOT inline void swap(const int pos1, const int pos2) { - nl_assert((pos1>=0) && (pos1<m_count)); - nl_assert((pos2>=0) && (pos2<m_count)); + //nl_assert((pos1>=0) && (pos1<m_count)); + //nl_assert((pos2>=0) && (pos2<m_count)); _ListClass tmp = m_list[pos1]; m_list[pos1] = m_list[pos2]; m_list[pos2] =tmp; @@ -227,7 +227,7 @@ public: { for (_ListClass *i = m_list; i < m_list + m_count; i++) { - nl_free(*i); + pfree(*i); } clear(); } @@ -238,7 +238,7 @@ private: int cnt = count(); if (new_capacity > 0) { - _ListClass *m_new = nl_alloc_array(_ListClass, new_capacity); + _ListClass *m_new = palloc_array(_ListClass, new_capacity); _ListClass *pd = m_new; if (cnt > new_capacity) @@ -246,14 +246,14 @@ private: for (_ListClass *ps = m_list; ps < m_list + cnt; ps++, pd++) *pd = *ps; if (m_list != NULL) - nl_free_array(m_list); + pfree_array(m_list); m_list = m_new; m_count = cnt; } else { if (m_list != NULL) - nl_free_array(m_list); + pfree_array(m_list); m_list = NULL; m_count = 0; } @@ -261,7 +261,7 @@ private: } int m_count; - _ListClass * m_list /* ATTR_ALIGN */; + _ListClass * m_list; int m_capacity; }; @@ -402,7 +402,8 @@ public: } p = p->m_next; } - nl_assert_always(false, "element not found"); + //FXIME: throw a standard exception + //nl_assert_always(false, "element not found"); } } @@ -428,7 +429,7 @@ public: _ListClass **p = &m_head; while (*p != &elem) { - nl_assert(*p != NULL); + //nl_assert(*p != NULL); p = &((*p)->m_next); } (*p) = elem.m_next; diff --git a/src/emu/netlist/poptions.h b/src/emu/netlist/poptions.h new file mode 100644 index 00000000000..475bef2a719 --- /dev/null +++ b/src/emu/netlist/poptions.h @@ -0,0 +1,209 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * poptions.h + * + */ + +#pragma once + +#ifndef POPTIONS_H_ +#define POPTIONS_H_ + +#include <cstddef> + +#include "pstring.h" +#include "plists.h" + +/*************************************************************************** + Options +***************************************************************************/ + +class poptions; + +class poption +{ +public: + poption() + : m_short(""), m_long(""), m_help(""), m_has_argument(false) + {} + + poption(pstring ashort, pstring along, pstring help, bool has_argument, poptions *parent = NULL); + + virtual ~poption() + { + + } + + /* no_argument options will be called with "" argument */ + + virtual int parse(ATTR_UNUSED pstring argument) { return 0; } + + pstring m_short; + pstring m_long; + pstring m_help; + bool m_has_argument; +private: +}; + +class poption_str : public poption +{ +public: + poption_str(pstring ashort, pstring along, pstring defval, pstring help, poptions *parent = NULL) + : poption(ashort, along, help, true, parent), m_val(defval) + {} + + virtual int parse(pstring argument) { m_val = argument; return 0; } + + pstring operator ()() { return m_val; } +private: + pstring m_val; +}; + +class poption_bool : public poption +{ +public: + poption_bool(pstring ashort, pstring along, pstring help, poptions *parent = NULL) + : poption(ashort, along, help, false, parent), m_val(false) + {} + + virtual int parse(ATTR_UNUSED pstring argument) { m_val = true; return 0; } + + bool operator ()() { return m_val; } +private: + bool m_val; +}; + +class poption_double : public poption +{ +public: + poption_double(pstring ashort, pstring along, double defval, pstring help, poptions *parent = NULL) + : poption(ashort, along, help, true, parent), m_val(defval) + {} + + virtual int parse(pstring argument) + { + bool err = false; + m_val = argument.as_double(&err); + return (err ? 1 : 0); + } + + double operator ()() { return m_val; } +private: + double m_val; +}; + +class poptions +{ +public: + + poptions() {} + + poptions(poption *o[]) + { + int i=0; + while (o[i] != NULL) + { + m_opts.add(o[i]); + i++; + } + } + + void register_option(poption *opt) + { + m_opts.add(opt); + } + + int parse(int argc, char *argv[]) + { + m_app = argv[0]; + + for (int i=1; i<argc; ) + { + pstring arg(argv[i]); + poption *opt = NULL; + + if (arg.startsWith("--")) + { + opt = getopt_long(arg.substr(2)); + } + else if (arg.startsWith("-")) + { + opt = getopt_short(arg.substr(1)); + } + else + return i; + if (opt == NULL) + return i; + if (opt->m_has_argument) + { + i++; // FIXME: are there more arguments? + if (opt->parse(argv[i]) != 0) + return i - 1; + } + else + opt->parse(""); + i++; + } + return argc; + } + + pstring help() + { + pstring ret; + + for (int i=0; i<m_opts.count(); i++ ) + { + poption *opt = m_opts[i]; + pstring line = ""; + if (opt->m_short != "") + line += " -" + opt->m_short; + if (opt->m_long != "") + { + if (line != "") + line += ", "; + else + line = " "; + line += "--" + opt->m_long; + } + line = line.rpad(" ", 20).cat(opt->m_help); + ret = ret + line + "\n"; + } + return ret; + } + pstring app() { return m_app; } + +private: + + poption *getopt_short(pstring arg) + { + for (int i=0; i < m_opts.count(); i++) + { + if (m_opts[i]->m_short == arg) + return m_opts[i]; + } + return NULL; + } + poption *getopt_long(pstring arg) + { + for (int i=0; i < m_opts.count(); i++) + { + if (m_opts[i]->m_long == arg) + return m_opts[i]; + } + return NULL; + } + + plist_t<poption *> m_opts; + pstring m_app; +}; + +poption::poption(pstring ashort, pstring along, pstring help, bool has_argument, poptions *parent) +: m_short(ashort), m_long(along), m_help(help), m_has_argument(has_argument) +{ + if (parent != NULL) + parent->register_option(this); +} + + +#endif /* POPTIONS_H_ */ diff --git a/src/emu/netlist/pstate.c b/src/emu/netlist/pstate.c index 15cc27561be..84beaf7d622 100644 --- a/src/emu/netlist/pstate.c +++ b/src/emu/netlist/pstate.c @@ -29,8 +29,7 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst "DT_FLOAT" }; - NL_VERBOSE_OUT(("SAVE: <%s> %s(%d) %p\n", fullname.cstr(), ts[dt].cstr(), size, ptr)); - pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, dt, owner, size, count, ptr, is_ptr); + pstate_entry_t *p = palloc(pstate_entry_t, stname, dt, owner, size, count, ptr, is_ptr); m_save.add(p); } @@ -67,7 +66,8 @@ ATTR_COLD void pstate_manager_t::post_load() template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname) { //save_state_ptr(stname, DT_CUSTOM, 0, 1, &state); - pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, owner, &state); + pstate_callback_t *state_p = &state; + pstate_entry_t *p = palloc(pstate_entry_t, stname, owner, state_p); m_save.add(p); state.register_state(*this, stname); } diff --git a/src/emu/netlist/pstate.h b/src/emu/netlist/pstate.h index 3e8cbcd3a15..6b07ef40e72 100644 --- a/src/emu/netlist/pstate.h +++ b/src/emu/netlist/pstate.h @@ -8,8 +8,6 @@ #ifndef PSTATE_H_ #define PSTATE_H_ -//#include "nl_config.h" -//#include "nl_time.h" #include "plists.h" #include "pstring.h" @@ -58,7 +56,7 @@ template<typename _ItemType> struct nl_datatype<_ItemType *> #define NETLIST_SAVE_TYPE(TYPE, TYPEDESC) \ template<> struct nl_datatype<TYPE>{ static const pstate_data_type_e type = pstate_data_type_e(TYPEDESC); static const bool is_ptr = false;}; \ - template<> struct nl_datatype<TYPE *>{ static const pstate_data_type_e type = pstate_data_type_e(TYPEDESC); static const bool is_ptr = true;}; + template<> struct nl_datatype<TYPE *>{ static const pstate_data_type_e type = pstate_data_type_e(TYPEDESC); static const bool is_ptr = true;} NETLIST_SAVE_TYPE(char, DT_INT8); NETLIST_SAVE_TYPE(double, DT_DOUBLE); diff --git a/src/emu/netlist/pstring.c b/src/emu/netlist/pstring.c index de44e1571d9..bf49bb689ec 100644 --- a/src/emu/netlist/pstring.c +++ b/src/emu/netlist/pstring.c @@ -5,10 +5,14 @@ * */ -#include "pstring.h" +#include <new> #include <cstdio> -#include <stdlib.h> +#include <cstring> +//FIXME:: pstring should be locale free +#include <cctype> +#include <cstdlib> +#include "pstring.h" // The following will work on linux, however not on Windows .... @@ -51,9 +55,9 @@ void pstring::pcat(const char *s) int slen = strlen(s); str_t *n = salloc(m_ptr->len() + slen); if (m_ptr->len() > 0) - memcpy(n->str(), m_ptr->str(), m_ptr->len()); + std::memcpy(n->str(), m_ptr->str(), m_ptr->len()); if (slen > 0) - memcpy(n->str() + m_ptr->len(), s, slen); + std::memcpy(n->str() + m_ptr->len(), s, slen); *(n->str() + n->len()) = 0; sfree(m_ptr); m_ptr = n; @@ -63,7 +67,7 @@ void pstring::pcopy(const char *from, int size) { str_t *n = salloc(size); if (size > 0) - memcpy(n->str(), from, size); + std::memcpy(n->str(), from, size); *(n->str() + size) = 0; sfree(m_ptr); m_ptr = n; @@ -118,7 +122,7 @@ int pstring::find_last_not_of(const pstring no) const return -1; } -pstring pstring::replace(const pstring &search, const pstring &replace) +pstring pstring::replace(const pstring &search, const pstring &replace) const { pstring ret = ""; @@ -158,6 +162,11 @@ pstring pstring::rtrim(const pstring ws) const return ""; } +void pstring::pcopy(const char *from) +{ + pcopy(from, strlen(from)); +} + //------------------------------------------------- // pcmpi - compare a character array to an nstring //------------------------------------------------- @@ -167,20 +176,20 @@ int pstring::pcmpi(const char *lhs, const char *rhs, int count) const // loop while equal until we hit the end of strings int index; for (index = 0; index < count; index++) - if (lhs[index] == 0 || tolower(lhs[index]) != tolower(rhs[index])) + if (lhs[index] == 0 || std::tolower(lhs[index]) != std::tolower(rhs[index])) break; // determine the final result if (index < count) - return tolower(lhs[index]) - tolower(rhs[index]); + return std::tolower(lhs[index]) - std::tolower(rhs[index]); if (lhs[index] == 0) return 0; return 1; } -nl_double pstring::as_double(bool *error) const +double pstring::as_double(bool *error) const { - nl_double ret; + double ret; char *e = NULL; if (error != NULL) @@ -194,7 +203,7 @@ nl_double pstring::as_double(bool *error) const long pstring::as_long(bool *error) const { - nl_double ret; + long ret; char *e = NULL; if (error != NULL) @@ -213,7 +222,7 @@ pstring pstring::vprintf(va_list args) const { // sprintf into the temporary buffer char tempbuf[4096]; - vsprintf(tempbuf, cstr(), args); + std::vsprintf(tempbuf, cstr(), args); return pstring(tempbuf); } @@ -235,6 +244,17 @@ pstring::str_t *pstring::salloc(int n) return ret; } +void pstring::resetmem() +{ + // Release the 0 string + m_pool.m_shutdown = true; + m_pool.resetmem(); +} + +// ---------------------------------------------------------------------------------------- +// pstring ... +// ---------------------------------------------------------------------------------------- + pstring pstring::sprintf(const char *format, ...) { va_list ap; @@ -245,11 +265,31 @@ pstring pstring::sprintf(const char *format, ...) } -void pstring::resetmem() +int pstring::find(const char *search, int start) const { - // Release the 0 string - m_pool.m_shutdown = true; - m_pool.resetmem(); + int alen = len(); + const char *result = std::strstr(cstr() + std::min(start, alen), search); + return (result != NULL) ? (result - cstr()) : -1; +} + +int pstring::find(const char search, int start) const +{ + int alen = len(); + const char *result = std::strchr(cstr() + std::min(start, alen), search); + return (result != NULL) ? (result - cstr()) : -1; +} + +bool pstring::startsWith(const char *arg) const +{ + return (pcmp(cstr(), arg, std::strlen(arg)) == 0); +} + +int pstring::pcmp(const char *left, const char *right, int count) const +{ + if (count < 0) + return std::strcmp(left, right); + else + return std::strncmp(left, right, count); } // ---------------------------------------------------------------------------------------- @@ -276,8 +316,8 @@ void *pblockpool::alloc(const std::size_t n) return (char *) malloc(n); else { - int memsize = ((n + m_align - 1) / m_align) * m_align; - int min_alloc = MAX(m_blocksize, memsize+sizeof(memblock)-MINDATASIZE); + std::size_t memsize = ((n + m_align - 1) / m_align) * m_align; + std::size_t min_alloc = std::max(m_blocksize, memsize+sizeof(memblock)-MINDATASIZE); char *ret = NULL; //std::printf("m_first %p\n", m_first); for (memblock *p = m_first; p != NULL && ret == NULL; p = p->next) @@ -374,3 +414,4 @@ void pblockpool::resetmem() std::printf("Freed %d out of total %d blocks\n", freedblocks, totalblocks); } } + diff --git a/src/emu/netlist/pstring.h b/src/emu/netlist/pstring.h index 2bf3a0f9877..c17251c575c 100644 --- a/src/emu/netlist/pstring.h +++ b/src/emu/netlist/pstring.h @@ -7,16 +7,14 @@ #ifndef _PSTRING_H_ #define _PSTRING_H_ -#include "nl_config.h" -#include <cstdio> -#include <ctype.h> +#include "pconfig.h" // ---------------------------------------------------------------------------------------- // pblockbool: allocate small memory more efficiently at the expense of some overhead // ---------------------------------------------------------------------------------------- struct pblockpool { - NETLIST_PREVENT_COPYING(pblockpool) + public: static const int MINDATASIZE = 8; @@ -48,7 +46,7 @@ private: }; memblock *m_first; - int m_blocksize; + std::size_t m_blocksize; int m_align; }; @@ -128,26 +126,16 @@ public: inline int cmp(const pstring &string) const { return pcmp(string.cstr()); } inline int cmpi(const pstring &string) const { return pcmpi(cstr(), string.cstr()); } - inline int find(const char *search, int start = 0) const - { - int alen = len(); - const char *result = strstr(cstr() + MIN(start, alen), search); - return (result != NULL) ? (result - cstr()) : -1; - } + int find(const char *search, int start = 0) const; - inline int find(const char search, int start = 0) const - { - int alen = len(); - const char *result = strchr(cstr() + MIN(start, alen), search); - return (result != NULL) ? (result - cstr()) : -1; - } + int find(const char search, int start = 0) const; // various 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); } + bool startsWith(const char *arg) const; - pstring replace(const pstring &search, const pstring &replace); + pstring replace(const pstring &search, const pstring &replace) const; // these return nstring ... inline pstring cat(const pstring &s) const { return *this + s; } @@ -163,15 +151,22 @@ public: pstring ltrim(const pstring ws = " \t\n\r") const; pstring rtrim(const pstring ws = " \t\n\r") const; - - inline pstring trim(const pstring ws = " \t\n\r") const { return this->ltrim(ws).rtrim(ws); } + pstring rpad(const pstring ws, const int cnt) const + { + // FIXME: slow! + pstring ret = *this; + while (ret.len() < cnt) + ret += ws; + return ret.substr(0, cnt); + } + pstring ucase() const; // conversions - nl_double as_double(bool *error = NULL) const; + double as_double(bool *error = NULL) const; long as_long(bool *error = NULL) const; @@ -214,22 +209,13 @@ private: return pcmp(m_ptr->str(), right); } - inline int pcmp(const char *left, const char *right, int count = -1) const - { - if (count < 0) - return strcmp(left, right); - else - return strncmp(left, right, count); - } + int pcmp(const char *left, const char *right, int count = -1) const; int pcmpi(const char *lhs, const char *rhs, int count = -1) const; void pcopy(const char *from, int size); - inline void pcopy(const char *from) - { - pcopy(from, strlen(from)); - } + void pcopy(const char *from); inline void pcopy(const pstring &from) { diff --git a/src/emu/romload.c b/src/emu/romload.c index b4431d34d4e..11abf46ae8e 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria +// copyright-holders:Nicola Salmoria,Paul Priest /********************************************************************* romload.c diff --git a/src/emu/sound/c6280.c b/src/emu/sound/c6280.c index 099224f78be..d484b8281c0 100644 --- a/src/emu/sound/c6280.c +++ b/src/emu/sound/c6280.c @@ -36,23 +36,6 @@ - http://www.hudsonsoft.net/ww/about/about.html - http://www.hudson.co.jp/corp/eng/coinfo/history.html - Legal information: - - Copyright Charles MacDonald - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "emu.h" diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c index 5cdbf6f6ef9..fd2d52c4545 100644 --- a/src/emu/sound/es5503.c +++ b/src/emu/sound/es5503.c @@ -7,12 +7,6 @@ Copyright R. Belmont. - This software is dual-licensed: it may be used in MAME and properly licensed - MAME derivatives under the terms of the MAME license. For use outside of - MAME and properly licensed derivatives, it is available under the - terms of the GNU Lesser General Public License (LGPL), version 2.1. - You may read the LGPL at http://www.gnu.org/licenses/lgpl.html - History: the ES5503 was the next design after the famous C64 "SID" by Bob Yannes. It powered the legendary Mirage sampler (the first affordable pro sampler) as well as the ESQ-1 synth/sequencer. The ES5505 (used in Taito's F3 System) and 5506 diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index f5ddf3cdf55..cbfe2501a5e 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:Jarek Burczynski +// copyright-holders:Jarek Burczynski,Tatsuyuki Satoh #define YM2610B_WARNING /* diff --git a/src/emu/sound/fm2612.c b/src/emu/sound/fm2612.c index d845c5ea40b..51c374ef391 100644 --- a/src/emu/sound/fm2612.c +++ b/src/emu/sound/fm2612.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:Jarek Burczynski +// copyright-holders:Jarek Burczynski,Tatsuyuki Satoh /* ** ** File: fm2612.c -- software implementation of Yamaha YM2612 FM sound generator diff --git a/src/emu/sound/hc55516.c b/src/emu/sound/hc55516.c index 7165fd28158..9d8a191bdba 100644 --- a/src/emu/sound/hc55516.c +++ b/src/emu/sound/hc55516.c @@ -4,8 +4,6 @@ Harris HC-55516 (and related) emulator - Copyright Nicola Salmoria and the MAME Team - *****************************************************************************/ #include "emu.h" diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c index fc9dbe72481..d4eb0886c05 100644 --- a/src/emu/sound/ics2115.c +++ b/src/emu/sound/ics2115.c @@ -1,7 +1,7 @@ // license:??? -// copyright-holders:trap15,nimitz,austere +// copyright-holders:Alex Marshal,nimitz,austere //ICS2115 by Raiden II team (c) 2010 -//members: austere, nimitz, trap15 +//members: austere, nimitz, Alex Marshal // //Original driver by O. Galibert, ElSemi // diff --git a/src/emu/sound/ics2115.h b/src/emu/sound/ics2115.h index b5bf8b9b32f..0883f2a43c9 100644 --- a/src/emu/sound/ics2115.h +++ b/src/emu/sound/ics2115.h @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:trap15,nimitz,austere +// copyright-holders:Alex Marshal,nimitz,austere #pragma once #ifndef __ICS2115_H__ diff --git a/src/emu/sound/k007232.c b/src/emu/sound/k007232.c index 989a9693ee3..6f5286b951f 100644 --- a/src/emu/sound/k007232.c +++ b/src/emu/sound/k007232.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria +// copyright-holders:Nicola Salmoria,Hiromitsu Shioya /*********************************************************/ /* Konami PCM controller */ /*********************************************************/ diff --git a/src/emu/sound/lmc1992.c b/src/emu/sound/lmc1992.c index c15b7aa025c..f4007ea875d 100644 --- a/src/emu/sound/lmc1992.c +++ b/src/emu/sound/lmc1992.c @@ -5,9 +5,6 @@ LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with Four-Channel Input-Selector emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ /* diff --git a/src/emu/sound/lmc1992.h b/src/emu/sound/lmc1992.h index b47d1e0c9bb..0f76e38544e 100644 --- a/src/emu/sound/lmc1992.h +++ b/src/emu/sound/lmc1992.h @@ -5,9 +5,6 @@ LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with Four-Channel Input-Selector emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ Data 1 |* \_/ | 28 V+ diff --git a/src/emu/sound/mos6560.h b/src/emu/sound/mos6560.h index fa206f66b97..05768815bf0 100644 --- a/src/emu/sound/mos6560.h +++ b/src/emu/sound/mos6560.h @@ -4,9 +4,6 @@ MOS 6560/6561 Video Interface Chip (VIC) emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ N/C 1 |* \_/ | 40 Vdd diff --git a/src/emu/sound/mos6581.c b/src/emu/sound/mos6581.c index 8a98a373683..73115c79f83 100644 --- a/src/emu/sound/mos6581.c +++ b/src/emu/sound/mos6581.c @@ -4,9 +4,6 @@ MOS 6581/8580 Sound Interface Device emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "mos6581.h" diff --git a/src/emu/sound/mos6581.h b/src/emu/sound/mos6581.h index 998577f8e9d..4699bdc51d7 100644 --- a/src/emu/sound/mos6581.h +++ b/src/emu/sound/mos6581.h @@ -4,9 +4,6 @@ MOS 6581/8580 Sound Interface Device emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ CAP1A 1 |* \_/ | 28 Vdd diff --git a/src/emu/sound/mos7360.c b/src/emu/sound/mos7360.c index 453306e2376..fe8631cfee2 100644 --- a/src/emu/sound/mos7360.c +++ b/src/emu/sound/mos7360.c @@ -4,9 +4,6 @@ MOS 7360/8360 Text Edit Device (TED) emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "emu.h" diff --git a/src/emu/sound/mos7360.h b/src/emu/sound/mos7360.h index 61e464df399..aea96b42bd9 100644 --- a/src/emu/sound/mos7360.h +++ b/src/emu/sound/mos7360.h @@ -4,9 +4,6 @@ MOS 7360/8360 Text Edit Device (TED) emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ DB6 1 |* \_/ | 40 Vcc diff --git a/src/emu/sound/pokey.h b/src/emu/sound/pokey.h index df2a8a75782..96c9f672246 100644 --- a/src/emu/sound/pokey.h +++ b/src/emu/sound/pokey.h @@ -9,10 +9,6 @@ * paddle (a/d conversion) details from the Atari 400/800 Hardware Manual. * Polynome algorithms according to info supplied by Perry McFarlane. * - * This code is subject to the MAME license, which besides other - * things means it is distributed as is, no warranties whatsoever. - * For more details read mame.txt that comes with MAME. - * *****************************************************************************/ #pragma once diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c index 90ddf18a927..b54aaec1859 100644 --- a/src/emu/sound/s14001a.c +++ b/src/emu/sound/s14001a.c @@ -9,26 +9,6 @@ Other fixes by AtariAce Copyright (C) 2006-2013 Jonathan Gevaryahu aka Lord Nightmare - This source file is dual-licensed under the following licenses: - 1. The MAME license as of September 2013 - 2. The GNU LGPLv2.1: - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - Please contact the author if you require other licensing. - Version history: 0.8 initial version - LN diff --git a/src/emu/sound/s14001a.h b/src/emu/sound/s14001a.h index 5ce4a6cca33..4427a59f8b7 100644 --- a/src/emu/sound/s14001a.h +++ b/src/emu/sound/s14001a.h @@ -4,9 +4,6 @@ /* Copyright (C) 2006-2013 Jonathan Gevaryahu AKA Lord Nightmare - This source file is dual-licensed under the following licenses: - 1. The MAME license as of September 2013 - 2. The GNU LGPLv2.1 */ #ifndef __S14001A_H__ #define __S14001A_H__ diff --git a/src/emu/sound/segapcm.c b/src/emu/sound/segapcm.c index 9e2ece97935..50e875bc474 100644 --- a/src/emu/sound/segapcm.c +++ b/src/emu/sound/segapcm.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Hiromitsu Shioya +// license:BSD-3-Clause +// copyright-holders:Hiromitsu Shioya, Olivier Galibert /*********************************************************/ /* SEGA 16ch 8bit PCM */ /*********************************************************/ @@ -47,7 +47,6 @@ void segapcm_device::device_start() mask = BANK_MASK7 >> 16; for(rom_mask = 1; rom_mask < m_rom.length(); rom_mask *= 2); - rom_mask--; m_bankmask = mask & (rom_mask >> m_bankshift); diff --git a/src/emu/sound/segapcm.h b/src/emu/sound/segapcm.h index 7be02f3c249..df7110bb7b2 100644 --- a/src/emu/sound/segapcm.h +++ b/src/emu/sound/segapcm.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Hiromitsu Shioya +// license:BSD-3-Clause +// copyright-holders:Hiromitsu Shioya, Olivier Galibert /*********************************************************/ /* SEGA 8bit PCM */ /*********************************************************/ @@ -12,9 +12,9 @@ #define BANK_256 (11) #define BANK_512 (12) #define BANK_12M (13) -#define BANK_MASK7 (0x70<<16) -#define BANK_MASKF (0xf0<<16) -#define BANK_MASKF8 (0xf8<<16) +#define BANK_MASK7 (0x70<<16) +#define BANK_MASKF (0xf0<<16) +#define BANK_MASKF8 (0xf8<<16) //************************************************************************** diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c index 7f30aa9fcff..ea90e03b185 100644 --- a/src/emu/sound/sn76477.c +++ b/src/emu/sound/sn76477.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /***************************************************************************** diff --git a/src/emu/sound/sn76477.h b/src/emu/sound/sn76477.h index cc0cea9b23f..392beb13489 100644 --- a/src/emu/sound/sn76477.h +++ b/src/emu/sound/sn76477.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /***************************************************************************** diff --git a/src/emu/sound/sp0256.h b/src/emu/sound/sp0256.h index 96bd997f1be..f4ceb61bb68 100644 --- a/src/emu/sound/sp0256.h +++ b/src/emu/sound/sp0256.h @@ -4,9 +4,6 @@ SP0256 Narrator Speech Processor emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ********************************************************************** _____ _____ Vss 1 |* \_/ | 28 OSC 2 diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index 214d6dfb83e..c10420af8a4 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -7,12 +7,6 @@ 12June04 update by Toshiaki Nijiura Copyright R. Belmont. - This software is dual-licensed: it may be used in MAME and properly licensed - MAME derivatives under the terms of the MAME license. For use outside of - MAME and properly licensed derivatives, it is available under the - terms of the GNU Lesser General Public License (LGPL), version 2.1. - You may read the LGPL at http://www.gnu.org/licenses/lgpl.html - TODO: - A/L bit (alternate loop) - EN and EXT Out bits diff --git a/src/emu/validity.c b/src/emu/validity.c index 2c5e08cb40b..8ed4f1e7fe2 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles,Paul Priest /*************************************************************************** validity.c diff --git a/src/emu/video/ef9345.c b/src/emu/video/ef9345.c index 1568da9baf1..22ade42300c 100644 --- a/src/emu/video/ef9345.c +++ b/src/emu/video/ef9345.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Daniel Coulom,Sandro Ronco /********************************************************************* @@ -9,9 +9,6 @@ This code is based on Daniel Coulom's implementation in DCVG5k and DCAlice released by Daniel Coulom under GPL license - The implementation below is released under the MAME license for use - in MAME, MESS and derivatives by permission of the author. - *********************************************************************/ #include "emu.h" diff --git a/src/emu/video/ef9345.h b/src/emu/video/ef9345.h index 610e889091c..332b037a223 100644 --- a/src/emu/video/ef9345.h +++ b/src/emu/video/ef9345.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Daniel Coulom,Sandro Ronco /********************************************************************* diff --git a/src/emu/video/epic12.c b/src/emu/video/epic12.c index 7abb334cfa4..a22100e5543 100644 --- a/src/emu/video/epic12.c +++ b/src/emu/video/epic12.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, Luca Elia, MetalliC /* emulation of Altera Cyclone EPIC12 FPGA programmed as a blitter */ #include "emu.h" diff --git a/src/emu/video/epic12.h b/src/emu/video/epic12.h index 2391e4fef8c..42d4d3d2172 100644 --- a/src/emu/video/epic12.h +++ b/src/emu/video/epic12.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, Luca Elia, MetalliC /* emulation of Altera Cyclone EPIC12 FPGA programmed as a blitter */ #define MCFG_EPIC12_ADD(_tag) \ diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index 2824c90a834..033bcb5b301 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /*************************************************************************** diff --git a/src/emu/video/fixfreq.h b/src/emu/video/fixfreq.h index 2c9979d5bad..833829fbc3b 100644 --- a/src/emu/video/fixfreq.h +++ b/src/emu/video/fixfreq.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /*************************************************************************** diff --git a/src/emu/video/hd44102.c b/src/emu/video/hd44102.c index 883213f2ccd..e9a1a9d014d 100644 --- a/src/emu/video/hd44102.c +++ b/src/emu/video/hd44102.c @@ -4,9 +4,6 @@ HD44102 Dot Matrix Liquid Crystal Graphic Display Column Driver emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "emu.h" diff --git a/src/emu/video/hd44102.h b/src/emu/video/hd44102.h index dd234cf69f4..2ba39282e9e 100644 --- a/src/emu/video/hd44102.h +++ b/src/emu/video/hd44102.h @@ -4,9 +4,6 @@ HD44102 Dot Matrix Liquid Crystal Graphic Display Column Driver emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c index 9f22e2cfeb1..2b72a57b47d 100644 --- a/src/emu/video/mc6845.c +++ b/src/emu/video/mc6845.c @@ -4,9 +4,6 @@ Motorola MC6845 and compatible CRT controller emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - The following variations exist that are different in functionality and not just in speed rating(1): * Motorola 6845, 6845-1 diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h index 6111b6a5818..db7e80f84a5 100644 --- a/src/emu/video/mc6845.h +++ b/src/emu/video/mc6845.h @@ -4,9 +4,6 @@ Motorola MC6845 and compatible CRT controller emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #ifndef __MC6845__ diff --git a/src/emu/video/mos6566.c b/src/emu/video/mos6566.c index 35f6befe867..64b061c3107 100644 --- a/src/emu/video/mos6566.c +++ b/src/emu/video/mos6566.c @@ -13,9 +13,6 @@ Permission to use it for non-commercial purposes is hereby granted als long as my copyright notice remains in the program. You are not allowed to use the source to create and distribute a modified version of Frodo. - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ /* diff --git a/src/emu/video/mos6566.h b/src/emu/video/mos6566.h index 9788f65e6c4..e14c00140e9 100644 --- a/src/emu/video/mos6566.h +++ b/src/emu/video/mos6566.h @@ -4,9 +4,6 @@ MOS 6566/6567/6569 Video Interface Chip II (VIC-II) emulation - Copyright the MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **************************************************************************** _____ _____ DB6 1 |* \_/ | 40 Vcc diff --git a/src/emu/video/resnet.c b/src/emu/video/resnet.c index 2e9ef33ab02..0245aba6161 100644 --- a/src/emu/video/resnet.c +++ b/src/emu/video/resnet.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /***************************************************************************** @@ -6,9 +6,6 @@ Compute weights for resistors networks. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ****************************************************************************** Function can evaluate from one to three networks at a time. diff --git a/src/emu/video/resnet.h b/src/emu/video/resnet.h index e16d1c4e9d4..1b1c933cf8f 100644 --- a/src/emu/video/resnet.h +++ b/src/emu/video/resnet.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /***************************************************************************** @@ -6,9 +6,6 @@ Compute weights for resistors networks. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - *****************************************************************************/ #pragma once diff --git a/src/emu/video/rgbgen.h b/src/emu/video/rgbgen.h index f80ce3c8451..9eda032f361 100644 --- a/src/emu/video/rgbgen.h +++ b/src/emu/video/rgbgen.h @@ -6,9 +6,6 @@ General RGB utilities. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #ifndef __RGBGEN__ diff --git a/src/emu/video/rgbsse.h b/src/emu/video/rgbsse.h index 5b23dce7563..4822d5519f0 100644 --- a/src/emu/video/rgbsse.h +++ b/src/emu/video/rgbsse.h @@ -8,9 +8,6 @@ WARNING: This code assumes SSE2 or greater capability. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #ifndef __RGBSSE__ diff --git a/src/emu/video/rgbutil.c b/src/emu/video/rgbutil.c index e6ad746e8d6..b0815c754c8 100644 --- a/src/emu/video/rgbutil.c +++ b/src/emu/video/rgbutil.c @@ -7,9 +7,6 @@ Utility definitions for RGB manipulation. Allows RGB handling to be performed in an abstracted fashion and optimized with SIMD. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "emu.h" diff --git a/src/emu/video/rgbutil.h b/src/emu/video/rgbutil.h index a578bcb4d9d..15def4da2c0 100644 --- a/src/emu/video/rgbutil.h +++ b/src/emu/video/rgbutil.h @@ -7,9 +7,6 @@ Utility definitions for RGB manipulation. Allows RGB handling to be performed in an abstracted fashion and optimized with SIMD. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #ifndef __RGBUTIL__ diff --git a/src/emu/video/rgbvmx.h b/src/emu/video/rgbvmx.h index b3d96a4124a..a0f40eee330 100644 --- a/src/emu/video/rgbvmx.h +++ b/src/emu/video/rgbvmx.h @@ -6,9 +6,6 @@ VMX/Altivec optimised RGB utilities. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #ifndef __RGBVMX__ diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c index 1be2f88302d..02720cda66a 100644 --- a/src/emu/video/tms34061.c +++ b/src/emu/video/tms34061.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari, Aaron Giles /**************************************************************************** * * diff --git a/src/emu/video/tms34061.h b/src/emu/video/tms34061.h index 0ad3143cd53..fa8d6a98601 100644 --- a/src/emu/video/tms34061.h +++ b/src/emu/video/tms34061.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari, Aaron Giles /**************************************************************************** * * diff --git a/src/emu/video/tms9927.c b/src/emu/video/tms9927.c index e0b878d8d32..85c6a178243 100644 --- a/src/emu/video/tms9927.c +++ b/src/emu/video/tms9927.c @@ -4,9 +4,6 @@ TI TMS9927 and compatible CRT controller emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "emu.h" diff --git a/src/emu/video/tms9927.h b/src/emu/video/tms9927.h index cc6460bf245..adadf8945cb 100644 --- a/src/emu/video/tms9927.h +++ b/src/emu/video/tms9927.h @@ -4,9 +4,6 @@ TI TMS9927 and compatible CRT controller emulation - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #ifndef __TMS9927__ diff --git a/src/emu/video/upd7227.c b/src/emu/video/upd7227.c index d11061faf9b..037dd037610 100644 --- a/src/emu/video/upd7227.c +++ b/src/emu/video/upd7227.c @@ -4,9 +4,6 @@ uPD7227 Intelligent Dot-Matrix LCD Controller/Driver emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "emu.h" diff --git a/src/emu/video/upd7227.h b/src/emu/video/upd7227.h index 43d9a960a26..19d04224d1c 100644 --- a/src/emu/video/upd7227.h +++ b/src/emu/video/upd7227.h @@ -4,9 +4,6 @@ uPD7227 Intelligent Dot-Matrix LCD Controller/Driver emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c index 79dc174d229..5e88ad286d9 100644 --- a/src/emu/video/vector.c +++ b/src/emu/video/vector.c @@ -4,9 +4,6 @@ * * vector.c * - * - * Copyright Nicola Salmoria and the MAME Team - * * anti-alias code by Andrew Caldwell * (still more to add) * diff --git a/src/lib/formats/ap2_dsk.c b/src/lib/formats/ap2_dsk.c index b601934e4a0..4425d3fae99 100644 --- a/src/lib/formats/ap2_dsk.c +++ b/src/lib/formats/ap2_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:Olivier Galibert, R. Belmont /********************************************************************* ap2_dsk.c diff --git a/src/lib/formats/ap2_dsk.h b/src/lib/formats/ap2_dsk.h index caab85a72ee..a5bd53f0926 100644 --- a/src/lib/formats/ap2_dsk.h +++ b/src/lib/formats/ap2_dsk.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:Olivier Galibert, R. Belmont /********************************************************************* ap2_dsk.h diff --git a/src/lib/formats/ap_dsk35.c b/src/lib/formats/ap_dsk35.c index 5e1c696626b..a9633ba7624 100644 --- a/src/lib/formats/ap_dsk35.c +++ b/src/lib/formats/ap_dsk35.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:Nathan Woods, R. Belmont /********************************************************************* ap_dsk35.c diff --git a/src/lib/formats/ap_dsk35.h b/src/lib/formats/ap_dsk35.h index 38cfb36013e..432eed42d8e 100644 --- a/src/lib/formats/ap_dsk35.h +++ b/src/lib/formats/ap_dsk35.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:Nathan Woods, R. Belmont /********************************************************************* ap_dsk35.h diff --git a/src/lib/formats/camplynx_cas.c b/src/lib/formats/camplynx_cas.c new file mode 100644 index 00000000000..9da4d856dbf --- /dev/null +++ b/src/lib/formats/camplynx_cas.c @@ -0,0 +1,205 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/******************************************************************** + +Support for Camputers Lynx cassette images + + +We support TAP files used by the Pale and Jynx emulators. + +Tape format: +- about 7 seconds of zeroes +- A5 byte +- 22 byte +- program name +- 22 byte +- about 7 seconds of zeroes +- A5 byte +- header +- main program +- checksum + +Each byte is 8 bits (MSB first) with no start or stop bits. + +********************************************************************/ + +#include <assert.h> + +#include "camplynx_cas.h" + +#define WAVEENTRY_LOW -32768 +#define WAVEENTRY_HIGH 32767 + +#define LYNX48K_WAV_FREQUENCY 4000 +#define LYNX128K_WAV_FREQUENCY 8000 + + +// image size +static int camplynx_image_size; + +static int camplynx_put_samples(INT16 *buffer, int sample_pos, int count, int level) +{ + if (buffer) + { + for (int i=0; i<count; i++) + buffer[sample_pos + i] = level; + } + + return count; +} + +static int camplynx_output_bit(INT16 *buffer, int sample_pos, bool bit) +{ + int samples = 0; + + if (bit) + { + samples += camplynx_put_samples(buffer, sample_pos + samples, 4, WAVEENTRY_HIGH); + samples += camplynx_put_samples(buffer, sample_pos + samples, 4, WAVEENTRY_LOW); + } + else + { + samples += camplynx_put_samples(buffer, sample_pos + samples, 2, WAVEENTRY_HIGH); + samples += camplynx_put_samples(buffer, sample_pos + samples, 2, WAVEENTRY_LOW); + } + + return samples; +} + +static int camplynx_output_byte(INT16 *buffer, int sample_pos, UINT8 byte) +{ + int samples = 0; + UINT8 i; + + /* data */ + for (i = 0; i<8; i++) + samples += camplynx_output_bit (buffer, sample_pos + samples, (byte >> (7-i)) & 1); + + return samples; +} + +static int camplynx_handle_cassette(INT16 *buffer, const UINT8 *bytes) +{ + UINT32 sample_count = 0; + UINT32 byte_count = 1; + UINT32 i; + + + /* header zeroes */ + for (i=0; i<555; i++) + sample_count += camplynx_output_byte(buffer, sample_count, 0); + + sample_count += camplynx_output_byte(buffer, sample_count, 0xA5); + sample_count += camplynx_output_byte(buffer, sample_count, bytes[0]); // should be 0x22 + + /* program name - include protection in case tape is corrupt */ + for (int i=1; bytes[i]!=0x22; i++) + { + if (i < camplynx_image_size) + sample_count += camplynx_output_byte(buffer, sample_count, bytes[i]); + else + return sample_count; + byte_count++; + } + + sample_count += camplynx_output_byte(buffer, sample_count, bytes[byte_count++]); // should be 0x22 + + /* data zeroes */ + for (i=0; i<555; i++) + sample_count += camplynx_output_byte(buffer, sample_count, 0); + + sample_count += camplynx_output_byte(buffer, sample_count, 0xA5); + + /* data */ + for (i=byte_count; i<camplynx_image_size; i++) + sample_count += camplynx_output_byte(buffer, sample_count, bytes[i]); + + return sample_count; +} + + +/******************************************************************* + Generate samples for the tape image +********************************************************************/ + +static int camplynx_cassette_fill_wave(INT16 *buffer, int length, UINT8 *bytes) +{ + return camplynx_handle_cassette(buffer, bytes); +} + +/******************************************************************* + Calculate the number of samples needed for this tape image +********************************************************************/ + +static int camplynx_cassette_calculate_size_in_samples(const UINT8 *bytes, int length) +{ + camplynx_image_size = length; + + return camplynx_handle_cassette(NULL, bytes); +} + +static const struct CassetteLegacyWaveFiller lynx48k_legacy_fill_wave = +{ + camplynx_cassette_fill_wave, /* fill_wave */ + -1, /* chunk_size */ + 0, /* chunk_samples */ + camplynx_cassette_calculate_size_in_samples, /* chunk_sample_calc */ + LYNX48K_WAV_FREQUENCY, /* sample_frequency */ + 0, /* header_samples */ + 0 /* trailer_samples */ +}; + +static const struct CassetteLegacyWaveFiller lynx128k_legacy_fill_wave = +{ + camplynx_cassette_fill_wave, /* fill_wave */ + -1, /* chunk_size */ + 0, /* chunk_samples */ + camplynx_cassette_calculate_size_in_samples, /* chunk_sample_calc */ + LYNX128K_WAV_FREQUENCY, /* sample_frequency */ + 0, /* header_samples */ + 0 /* trailer_samples */ +}; + +static casserr_t lynx48k_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts) +{ + return cassette_legacy_identify(cassette, opts, &lynx48k_legacy_fill_wave); +} + +static casserr_t lynx128k_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts) +{ + return cassette_legacy_identify(cassette, opts, &lynx128k_legacy_fill_wave); +} + +static casserr_t lynx48k_cassette_load(cassette_image *cassette) +{ + return cassette_legacy_construct(cassette, &lynx48k_legacy_fill_wave); +} + +static casserr_t lynx128k_cassette_load(cassette_image *cassette) +{ + return cassette_legacy_construct(cassette, &lynx128k_legacy_fill_wave); +} + +static const struct CassetteFormat lynx48k_cassette_image_format = +{ + "tap", + lynx48k_cassette_identify, + lynx48k_cassette_load, + NULL +}; + +static const struct CassetteFormat lynx128k_cassette_image_format = +{ + "tap", + lynx128k_cassette_identify, + lynx128k_cassette_load, + NULL +}; + +CASSETTE_FORMATLIST_START(lynx48k_cassette_formats) + CASSETTE_FORMAT(lynx48k_cassette_image_format) +CASSETTE_FORMATLIST_END + +CASSETTE_FORMATLIST_START(lynx128k_cassette_formats) + CASSETTE_FORMAT(lynx128k_cassette_image_format) +CASSETTE_FORMATLIST_END diff --git a/src/lib/formats/camplynx_cas.h b/src/lib/formats/camplynx_cas.h new file mode 100644 index 00000000000..d8148682edf --- /dev/null +++ b/src/lib/formats/camplynx_cas.h @@ -0,0 +1,15 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/********************************************************************* + + camplynx_cas.h + + Format code for Camputers Lynx cassette images (TAP format) + +*********************************************************************/ + + +#include "cassimg.h" + +CASSETTE_FORMATLIST_EXTERN(lynx48k_cassette_formats); +CASSETTE_FORMATLIST_EXTERN(lynx128k_cassette_formats); diff --git a/src/lib/formats/esq16_dsk.c b/src/lib/formats/esq16_dsk.c index bf676f18460..517bb756577 100644 --- a/src/lib/formats/esq16_dsk.c +++ b/src/lib/formats/esq16_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont, Olivier Galibert /********************************************************************* formats/esq16_dsk.c diff --git a/src/lib/formats/esq16_dsk.h b/src/lib/formats/esq16_dsk.h index 57088110cf5..caf02f7995d 100644 --- a/src/lib/formats/esq16_dsk.h +++ b/src/lib/formats/esq16_dsk.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont, Olivier Galibert /********************************************************************* formats/esq16_dsk.h diff --git a/src/lib/formats/esq8_dsk.c b/src/lib/formats/esq8_dsk.c index d95c6119636..f887cba8951 100644 --- a/src/lib/formats/esq8_dsk.c +++ b/src/lib/formats/esq8_dsk.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont, Olivier Galibert /********************************************************************* formats/esq8_dsk.c diff --git a/src/lib/formats/esq8_dsk.h b/src/lib/formats/esq8_dsk.h index f2f19419016..4646fcc225c 100644 --- a/src/lib/formats/esq8_dsk.h +++ b/src/lib/formats/esq8_dsk.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont, Olivier Galibert /********************************************************************* formats/esq8_dsk.h diff --git a/src/lib/formats/lviv_lvt.c b/src/lib/formats/lviv_lvt.c index b78e931e2a1..ecb1940eb6e 100644 --- a/src/lib/formats/lviv_lvt.c +++ b/src/lib/formats/lviv_lvt.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // 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 78b7a885713..e34e3eb207c 100644 --- a/src/lib/formats/lviv_lvt.h +++ b/src/lib/formats/lviv_lvt.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /********************************************************************* diff --git a/src/lib/formats/primoptp.c b/src/lib/formats/primoptp.c index fc02d0b6cd3..635f66d25ac 100644 --- a/src/lib/formats/primoptp.c +++ b/src/lib/formats/primoptp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /* .PTP Microkey Primo tape images */ diff --git a/src/lib/formats/primoptp.h b/src/lib/formats/primoptp.h index 006dd61a20c..d32343dddc6 100644 --- a/src/lib/formats/primoptp.h +++ b/src/lib/formats/primoptp.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /********************************************************************* diff --git a/src/mame/audio/copsnrob.c b/src/mame/audio/copsnrob.c index 4a3d17cc1c0..162e263da91 100644 --- a/src/mame/audio/copsnrob.c +++ b/src/mame/audio/copsnrob.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************ * copsnrob Sound System Analog emulation diff --git a/src/mame/audio/depthch.c b/src/mame/audio/depthch.c index d08d208866f..55623b38d0c 100644 --- a/src/mame/audio/depthch.c +++ b/src/mame/audio/depthch.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /* * Depth Charge audio routines diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c index 5d175496cb0..7fd6794b2fb 100644 --- a/src/mame/audio/dkong.c +++ b/src/mame/audio/dkong.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud #include "emu.h" #include "cpu/mcs48/mcs48.h" diff --git a/src/mame/audio/firetrk.c b/src/mame/audio/firetrk.c index cb84a9e065c..71f7dc7d960 100644 --- a/src/mame/audio/firetrk.c +++ b/src/mame/audio/firetrk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /************************************************************************* diff --git a/src/mame/audio/gotya.c b/src/mame/audio/gotya.c index 5859b953390..c878808ebe0 100644 --- a/src/mame/audio/gotya.c +++ b/src/mame/audio/gotya.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "emu.h" #include "sound/samples.h" diff --git a/src/mame/audio/hyprolyb.c b/src/mame/audio/hyprolyb.c index 18bc9ea5bdc..c816e4bb603 100644 --- a/src/mame/audio/hyprolyb.c +++ b/src/mame/audio/hyprolyb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy #include "emu.h" #include "cpu/m6800/m6800.h" diff --git a/src/mame/audio/hyprolyb.h b/src/mame/audio/hyprolyb.h index 88ecbd9ccde..1e835492278 100644 --- a/src/mame/audio/hyprolyb.h +++ b/src/mame/audio/hyprolyb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy #include "sound/msm5205.h" diff --git a/src/mame/audio/invinco.c b/src/mame/audio/invinco.c index 81f3e7b8012..3181ddf8048 100644 --- a/src/mame/audio/invinco.c +++ b/src/mame/audio/invinco.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /* * Invinco sound routines diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index 3e0b8117f3f..f9ae63c07bd 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /*************************************************************************** diff --git a/src/mame/audio/irem.h b/src/mame/audio/irem.h index a5d578dbfc9..863fc992c6d 100644 --- a/src/mame/audio/irem.h +++ b/src/mame/audio/irem.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud #include "sound/ay8910.h" #include "sound/msm5205.h" diff --git a/src/mame/audio/madalien.c b/src/mame/audio/madalien.c index d613d187dbd..0db147f4b3b 100644 --- a/src/mame/audio/madalien.c +++ b/src/mame/audio/madalien.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Norbert Kehrer /************************************************************************ * madalien Sound System Analog emulation diff --git a/src/mame/audio/pulsar.c b/src/mame/audio/pulsar.c index 343879e4f7f..ee5e25260d6 100644 --- a/src/mame/audio/pulsar.c +++ b/src/mame/audio/pulsar.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /* * Pulsar sound routines diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c index 4ea7448d317..97fdf3a1f41 100644 --- a/src/mame/audio/segasnd.c +++ b/src/mame/audio/segasnd.c @@ -6,9 +6,6 @@ Sound boards for early Sega G-80 based games. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "emu.h" diff --git a/src/mame/audio/spacefb.c b/src/mame/audio/spacefb.c index 81eb47edffa..12cff3cbf78 100644 --- a/src/mame/audio/spacefb.c +++ b/src/mame/audio/spacefb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/audio/spiders.c b/src/mame/audio/spiders.c index 988fcfbc3bf..75b62f642e3 100644 --- a/src/mame/audio/spiders.c +++ b/src/mame/audio/spiders.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/audio/tiamc1.c b/src/mame/audio/tiamc1.c index 3fcf78d6a2e..6c7f2555623 100644 --- a/src/mame/audio/tiamc1.c +++ b/src/mame/audio/tiamc1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Eugene Sandulenko /*************************************************************************** diff --git a/src/mame/audio/trackfld.c b/src/mame/audio/trackfld.c index 0ad6853f5bf..b73a5d708fe 100644 --- a/src/mame/audio/trackfld.c +++ b/src/mame/audio/trackfld.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy #include "emu.h" #include "sound/sn76496.h" diff --git a/src/mame/audio/trackfld.h b/src/mame/audio/trackfld.h index 4b7260e48b7..9aabced1c22 100644 --- a/src/mame/audio/trackfld.h +++ b/src/mame/audio/trackfld.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy #include "sound/vlm5030.h" #include "cpu/m6800/m6800.h" diff --git a/src/mame/audio/vicdual.c b/src/mame/audio/vicdual.c index 48bc54b4b7a..f11638e7fc7 100644 --- a/src/mame/audio/vicdual.c +++ b/src/mame/audio/vicdual.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c index f1d6e837b80..5f5de0b18b8 100644 --- a/src/mame/drivers/aeroboto.c +++ b/src/mame/drivers/aeroboto.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Carlos A. Lozano +// copyright-holders:Carlos A. Lozano, Uki /**************************************************************************** Formation Z / Aeroboto diff --git a/src/mame/drivers/ambush.c b/src/mame/drivers/ambush.c index 6a82b3c598d..0e3e4a8ab33 100644 --- a/src/mame/drivers/ambush.c +++ b/src/mame/drivers/ambush.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c index f9bc881ff90..b7511aedd0b 100644 --- a/src/mame/drivers/atetris.c +++ b/src/mame/drivers/atetris.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c index d86c478ddac..6674f67287e 100644 --- a/src/mame/drivers/beaminv.c +++ b/src/mame/drivers/beaminv.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c index c09e28ca8b0..c336528f923 100644 --- a/src/mame/drivers/berzerk.c +++ b/src/mame/drivers/berzerk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari, Aaron Giles, R. Belmont, Jonathan Gevaryahu /*************************************************************************** diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c index 196c217979e..ce4f3f85a90 100644 --- a/src/mame/drivers/bionicc.c +++ b/src/mame/drivers/bionicc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /****************************************************************************************** diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c index fe85103d4c9..1bb13c59bec 100644 --- a/src/mame/drivers/brkthru.c +++ b/src/mame/drivers/brkthru.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c index c0086aa1510..3fba1295ce9 100644 --- a/src/mame/drivers/btime.c +++ b/src/mame/drivers/btime.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index b7a6f4da2a5..37b837e1768 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/carpolo.c b/src/mame/drivers/carpolo.c index 6206b6b597b..d49ee8ba039 100644 --- a/src/mame/drivers/carpolo.c +++ b/src/mame/drivers/carpolo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c index 206390febf0..b5717ac6f71 100644 --- a/src/mame/drivers/changela.c +++ b/src/mame/drivers/changela.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jarek Burczynski, Phil Stroffolino, Tomasz Slanina /************************************************************************** Change Lanes diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c index c916468e265..f6daecd0be8 100644 --- a/src/mame/drivers/clayshoo.c +++ b/src/mame/drivers/clayshoo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/copsnrob.c b/src/mame/drivers/copsnrob.c index 3cf6591e80d..6e0192697f8 100644 --- a/src/mame/drivers/copsnrob.c +++ b/src/mame/drivers/copsnrob.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/crbaloon.c b/src/mame/drivers/crbaloon.c index 00fc3e43b14..618dd94e89b 100644 --- a/src/mame/drivers/crbaloon.c +++ b/src/mame/drivers/crbaloon.c @@ -4,8 +4,6 @@ Taito Crazy Balloon hardware - Copyright Nicola Salmoria and the MAME Team. - To-Do: * Video timing from schematics * Watchdog length from schematics diff --git a/src/mame/drivers/cv1k.c b/src/mame/drivers/cv1k.c index c08d9ad83ff..f107fe809eb 100644 --- a/src/mame/drivers/cv1k.c +++ b/src/mame/drivers/cv1k.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, Luca Elia, MetalliC /* U2 flash rom note diff --git a/src/mame/drivers/dambustr.c b/src/mame/drivers/dambustr.c index c1e4383597a..13626af687b 100644 --- a/src/mame/drivers/dambustr.c +++ b/src/mame/drivers/dambustr.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Norbert Kehrer /*************************************************************************** diff --git a/src/mame/drivers/dday.c b/src/mame/drivers/dday.c index 0efc5e4d895..25678d27bbb 100644 --- a/src/mame/drivers/dday.c +++ b/src/mame/drivers/dday.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c index 13bb90da863..3d03f1727af 100644 --- a/src/mame/drivers/djboy.c +++ b/src/mame/drivers/djboy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* DJ Boy (c)1989 Kaneko diff --git a/src/mame/drivers/dotrikun.c b/src/mame/drivers/dotrikun.c index 4699227c5d8..ce2356d49da 100644 --- a/src/mame/drivers/dotrikun.c +++ b/src/mame/drivers/dotrikun.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c index a9d028f4e25..361c283df98 100644 --- a/src/mame/drivers/drmicro.c +++ b/src/mame/drivers/drmicro.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/epos.c b/src/mame/drivers/epos.c index e944e54d719..42841368c3d 100644 --- a/src/mame/drivers/epos.c +++ b/src/mame/drivers/epos.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/fastfred.c b/src/mame/drivers/fastfred.c index ba1c7f78f92..8e548f3068c 100644 --- a/src/mame/drivers/fastfred.c +++ b/src/mame/drivers/fastfred.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c index 93afdaf7f09..2eabe912933 100644 --- a/src/mame/drivers/firetrk.c +++ b/src/mame/drivers/firetrk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c index 6a2d47cb487..a3f337ea164 100644 --- a/src/mame/drivers/fromanc2.c +++ b/src/mame/drivers/fromanc2.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Takahiro Nogi +// license:BSD-3-Clause +// copyright-holders:Takahiro Nogi, Uki /****************************************************************************** Game Driver for Video System Mahjong series. diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c index 6d69d11f316..8df60f0d4de 100644 --- a/src/mame/drivers/fromance.c +++ b/src/mame/drivers/fromance.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Takahiro Nogi, Nicola Salmoria, Aaron Giles +// license:BSD-3-Clause +// copyright-holders:Takahiro Nogi. Bryan McPhail, Nicola Salmoria, Aaron Giles /****************************************************************************** Game Driver for Video System Mahjong series. diff --git a/src/mame/drivers/funkybee.c b/src/mame/drivers/funkybee.c index ea02268b57a..87f915474cc 100644 --- a/src/mame/drivers/funkybee.c +++ b/src/mame/drivers/funkybee.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c index bcd38d67646..234cf91aee1 100644 --- a/src/mame/drivers/fuukifg2.c +++ b/src/mame/drivers/fuukifg2.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia +// copyright-holders:Luca Elia,Paul Priest /*************************************************************************** -= Fuuki 16 Bit Games =- diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c index f847df3b44a..927fdf02a7b 100644 --- a/src/mame/drivers/gaiden.c +++ b/src/mame/drivers/gaiden.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c index 815e92bd643..8687e54c2a3 100644 --- a/src/mame/drivers/galpani3.c +++ b/src/mame/drivers/galpani3.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, Uki /* Gals Panic 3 (c) Kaneko 1995 diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c index 9c93bbbb93f..45a6492a064 100644 --- a/src/mame/drivers/goldstar.c +++ b/src/mame/drivers/goldstar.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood, Roberto Fresca +// copyright-holders:David Haywood, Roberto Fresca, Vas Crabb /*************************************************************************** Golden Star diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c index 8e96ae7b36f..8906d78ffac 100644 --- a/src/mame/drivers/gomoku.c +++ b/src/mame/drivers/gomoku.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:Takahiro Nogi, David Haywood /****************************************************************************** Gomoku Narabe Renju diff --git a/src/mame/drivers/gotya.c b/src/mame/drivers/gotya.c index 4744f3d696b..ae2ca946780 100644 --- a/src/mame/drivers/gotya.c +++ b/src/mame/drivers/gotya.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /**************************************************************************** diff --git a/src/mame/drivers/hanaawas.c b/src/mame/drivers/hanaawas.c index c16b508b2fb..2cb0c7acbff 100644 --- a/src/mame/drivers/hanaawas.c +++ b/src/mame/drivers/hanaawas.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/himesiki.c b/src/mame/drivers/himesiki.c index 6969c88ff29..bcc4f532a6c 100644 --- a/src/mame/drivers/himesiki.c +++ b/src/mame/drivers/himesiki.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c index 2996be9bac3..3738e18bef5 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Nicola Salmoria /*************************************************************************** diff --git a/src/mame/drivers/hyhoo.c b/src/mame/drivers/hyhoo.c index 3a7799acc26..b45ed15f3a4 100644 --- a/src/mame/drivers/hyhoo.c +++ b/src/mame/drivers/hyhoo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 2150dc9c0ef..826e5e278c0 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/drivers/ikki.c b/src/mame/drivers/ikki.c index e4498ab97fd..74fa1178c05 100644 --- a/src/mame/drivers/ikki.c +++ b/src/mame/drivers/ikki.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index 13595ba1ef9..4a735828a8c 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c index 1aec5934294..d93795c8591 100644 --- a/src/mame/drivers/inufuku.c +++ b/src/mame/drivers/inufuku.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c index 1ad10e8e930..aa15d9c10eb 100644 --- a/src/mame/drivers/jalmah.c +++ b/src/mame/drivers/jalmah.c @@ -1,5 +1,5 @@ // license:LGPL-2.1+ -// copyright-holders:Angelo Salese +// copyright-holders:Angelo Salese, Uki /******************************************************************************************* MJ-8956 HW games (c) 1989 Jaleco / NMK / UPL diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index ce1a3dff1ff..a5f0180aefd 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c index 9f41d960595..317922994d9 100644 --- a/src/mame/drivers/lkage.c +++ b/src/mame/drivers/lkage.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 6887ccded5d..91a0aa274bf 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* To Do: diff --git a/src/mame/drivers/lvcards.c b/src/mame/drivers/lvcards.c index 5755d955443..48225a4cc78 100644 --- a/src/mame/drivers/lvcards.c +++ b/src/mame/drivers/lvcards.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari, Curt Coder /*************************************************************************** Lovely Cards/Poker/Pontoon driver, updated by El Condor from work by Uki and diff --git a/src/mame/drivers/m57.c b/src/mame/drivers/m57.c index 40c08af5528..10213ff93bb 100644 --- a/src/mame/drivers/m57.c +++ b/src/mame/drivers/m57.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /**************************************************************************** diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c index c2f8abb02f2..944bfd00d13 100644 --- a/src/mame/drivers/madalien.c +++ b/src/mame/drivers/madalien.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Norbert Kehrer /*************************************************************************** diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c index 3932922265c..4c5b31e177f 100644 --- a/src/mame/drivers/magmax.c +++ b/src/mame/drivers/magmax.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/marineb.c b/src/mame/drivers/marineb.c index 2a44cd1aebe..80abd5149c1 100644 --- a/src/mame/drivers/marineb.c +++ b/src/mame/drivers/marineb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/markham.c b/src/mame/drivers/markham.c index 63d97f1f3fc..b17e115784c 100644 --- a/src/mame/drivers/markham.c +++ b/src/mame/drivers/markham.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/mayumi.c b/src/mame/drivers/mayumi.c index bb477db6059..3d10951e610 100644 --- a/src/mame/drivers/mayumi.c +++ b/src/mame/drivers/mayumi.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index 20b592a7482..5a82b24de3a 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /************************************************************************** diff --git a/src/mame/drivers/mermaid.c b/src/mame/drivers/mermaid.c index 0737627896d..a611ad76e7a 100644 --- a/src/mame/drivers/mermaid.c +++ b/src/mame/drivers/mermaid.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/minivadr.c b/src/mame/drivers/minivadr.c index af284cf3c90..924e5958fff 100644 --- a/src/mame/drivers/minivadr.c +++ b/src/mame/drivers/minivadr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c index 9084d70fb7a..c1adaf0bc87 100644 --- a/src/mame/drivers/mjsister.c +++ b/src/mame/drivers/mjsister.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/mole.c b/src/mame/drivers/mole.c index 3710e73e06c..da22065ae40 100644 --- a/src/mame/drivers/mole.c +++ b/src/mame/drivers/mole.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jason Nelson, Phil Stroffolino /***************************************************************************** diff --git a/src/mame/drivers/momoko.c b/src/mame/drivers/momoko.c index a8d684580a9..6b3f0b02651 100644 --- a/src/mame/drivers/momoko.c +++ b/src/mame/drivers/momoko.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/monzagp.c b/src/mame/drivers/monzagp.c index fa37c6ef75d..57e8566b62a 100644 --- a/src/mame/drivers/monzagp.c +++ b/src/mame/drivers/monzagp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/mrflea.c b/src/mame/drivers/mrflea.c index 1d5559b5051..6928ba33cc7 100644 --- a/src/mame/drivers/mrflea.c +++ b/src/mame/drivers/mrflea.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /****************************************************************** diff --git a/src/mame/drivers/mrjong.c b/src/mame/drivers/mrjong.c index 4aa53c3b2f6..68e1a849171 100644 --- a/src/mame/drivers/mrjong.c +++ b/src/mame/drivers/mrjong.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c index ff41c6c5a93..c50ace35f42 100644 --- a/src/mame/drivers/ms32.c +++ b/src/mame/drivers/ms32.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood,Paul Priest /* Jaleco MegaSystem 32 (Preliminary Driver) - hardware tests are needed to establish how the mixing really works (and interrupt source etc.) diff --git a/src/mame/drivers/munchmo.c b/src/mame/drivers/munchmo.c index 494e5c45cd9..9467604394f 100644 --- a/src/mame/drivers/munchmo.c +++ b/src/mame/drivers/munchmo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** Munch Mobile diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c index 4ced250ac44..422756fb48f 100644 --- a/src/mame/drivers/namcoic.c +++ b/src/mame/drivers/namcoic.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino #include "emu.h" #include "includes/namcos2.h" /* for game-specific hacks */ diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c index 0c0f1d75c48..1d1f2fdb006 100644 --- a/src/mame/drivers/namcona1.c +++ b/src/mame/drivers/namcona1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index 16052b9c6ae..1d4eaad65ed 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* Namco System NB-1 diff --git a/src/mame/drivers/namcops2.c b/src/mame/drivers/namcops2.c index 2e793312c56..3aaeff225ad 100644 --- a/src/mame/drivers/namcops2.c +++ b/src/mame/drivers/namcops2.c @@ -17,10 +17,6 @@ with 2 MB of wave RAM, a 48 kHz sample rate (vs. 44.1 on PS1), and 2 stereo DMADACs. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - - List of Namco System 246 games: * Battle Gear 3 (Taito, 2002) * Battle Gear 3 Tuned (Taito, 2003) diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c index 03b70f0a0ca..db38523c096 100644 --- a/src/mame/drivers/namcos21.c +++ b/src/mame/drivers/namcos21.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /** 2008/06/11, by Naibo(translated to English by Mameplus team): diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index 3ca109b065b..b15a3941e83 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, hap, R. Belmont /** * This driver describes Namco's System22 and Super System 22 hardware. diff --git a/src/mame/drivers/naughtyb.c b/src/mame/drivers/naughtyb.c index 7aa650e139f..adad3aeae95 100644 --- a/src/mame/drivers/naughtyb.c +++ b/src/mame/drivers/naughtyb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Sal,John Bugliarisi +// license:BSD-3-Clause +// copyright-holders:Brad Oliver,Sal,John Bugliarisi,Paul Priest /*************************************************************************** Naughty Boy driver by Sal and John Bugliarisi. diff --git a/src/mame/drivers/nbmj8688.c b/src/mame/drivers/nbmj8688.c index 243778abf9b..c9eda230f1d 100644 --- a/src/mame/drivers/nbmj8688.c +++ b/src/mame/drivers/nbmj8688.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/nbmj8891.c b/src/mame/drivers/nbmj8891.c index e3ae3ad3f72..8ac6f6ab57e 100644 --- a/src/mame/drivers/nbmj8891.c +++ b/src/mame/drivers/nbmj8891.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/nbmj8900.c b/src/mame/drivers/nbmj8900.c index 4902df4f9e1..9bcf53ad70b 100644 --- a/src/mame/drivers/nbmj8900.c +++ b/src/mame/drivers/nbmj8900.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/nbmj8991.c b/src/mame/drivers/nbmj8991.c index 8c8d1f38cc7..cf83c2ac81b 100644 --- a/src/mame/drivers/nbmj8991.c +++ b/src/mame/drivers/nbmj8991.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/nbmj9195.c b/src/mame/drivers/nbmj9195.c index 8cc7ef01d9e..840b74492f6 100644 --- a/src/mame/drivers/nbmj9195.c +++ b/src/mame/drivers/nbmj9195.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/niyanpai.c b/src/mame/drivers/niyanpai.c index 18c497dbc73..87d04f072f5 100644 --- a/src/mame/drivers/niyanpai.c +++ b/src/mame/drivers/niyanpai.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/nl_breakout.c b/src/mame/drivers/nl_breakout.c index 71330d092b8..ae2ea977d48 100644 --- a/src/mame/drivers/nl_breakout.c +++ b/src/mame/drivers/nl_breakout.c @@ -1,12 +1,12 @@ // license:GPL-2.0+ -// copyright-holders:DICE Team,couriersud +// copyright-holders:DICE Team,Couriersud /* * Changelog: * - * - Added led and lamp components (couriersud) - * - Start2 works (couriersud) - * - Added discrete paddle potentiometers (couriersud) - * - Changes made to run in MAME (couriersud) + * - Added led and lamp components (Couriersud) + * - Start2 works (Couriersud) + * - Added discrete paddle potentiometers (Couriersud) + * - Changes made to run in MAME (Couriersud) * - Original version imported from DICE * * TODO: @@ -14,20 +14,7 @@ * - implement bonus game dip switch * * The MAME team has asked for and received written confirmation from the - * author of DICE to use, modify and redistribute code under - * a dual licensing scheme: - * - * * The licensing terms of MAME apply to this piece of code for the MAME - * project and derivative works, as defined by the MAME license. You - * may opt to make modifications, improvements or derivative works under - * that same conditions, and the MAME project may opt to keep - * modifications, improvements or derivatives under their terms exclusively. - * - * - Alternatively you can choose to apply the terms of the "GPL" (see - * below) to this - and only this - piece of code or your derivative works. - * Note that in no case your choice can have any impact on any other - * source code of the MAME project, or binary, or executable, be it closely - * or losely related to this piece of code. + * author of DICE to use, modify and redistribute code under: * * - GPL (GNU General Public License) * This program is free software; you can redistribute it and/or diff --git a/src/mame/drivers/nl_pong.c b/src/mame/drivers/nl_pong.c index 2c89fcb7ebe..253cd23c0b9 100644 --- a/src/mame/drivers/nl_pong.c +++ b/src/mame/drivers/nl_pong.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:DICE Team,couriersud +// copyright-holders: Couriersud /*************************************************************************** diff --git a/src/mame/drivers/nl_pongd.c b/src/mame/drivers/nl_pongd.c index e9355b5c8a0..545b7a1c5f5 100644 --- a/src/mame/drivers/nl_pongd.c +++ b/src/mame/drivers/nl_pongd.c @@ -10,21 +10,7 @@ * - implement trimmers * * The MAME team has asked for and received written confirmation from the - * author of DICE to use, modify and redistribute code under - * a dual licensing scheme: - * - * * The licensing terms of MAME apply to this piece of code for the MAME - * project and derivative works, as defined by the MAME license. You - * may opt to make modifications, improvements or derivative works under - * that same conditions, and the MAME project may opt to keep - * modifications, improvements or derivatives under their terms exclusively. - * - * - Alternatively you can choose to apply the terms of the "GPL" (see - * below) to this - and only this - piece of code or your derivative works. - * Note that in no case your choice can have any impact on any other - * source code of the MAME project, or binary, or executable, be it closely - * or losely related to this piece of code. - * + * author of DICE to use, modify and redistribute code under: * - GPL (GNU General Public License) * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index 6f95a82d39a..680d0e574b0 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,Luca Elia +// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshal,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, trap15 and Luca Elia. + David Haywood, R. Belmont, Alex Marshal 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/ojankohs.c b/src/mame/drivers/ojankohs.c index d28b56845c2..0f3ddc16da2 100644 --- a/src/mame/drivers/ojankohs.c +++ b/src/mame/drivers/ojankohs.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi, Uki /****************************************************************************** diff --git a/src/mame/drivers/pastelg.c b/src/mame/drivers/pastelg.c index a6c257b8899..13620d59f5d 100644 --- a/src/mame/drivers/pastelg.c +++ b/src/mame/drivers/pastelg.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/drivers/pirates.c b/src/mame/drivers/pirates.c index 7b1f63d51f2..95b96c7dcac 100644 --- a/src/mame/drivers/pirates.c +++ b/src/mame/drivers/pirates.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood,Nicola Salmoria +// copyright-holders:David Haywood,Nicola Salmoria,Paul Priest /*--- Pirates (c)1994 NIX (DEC 14 1994 17:32:29) displayed in cabinet test mode diff --git a/src/mame/drivers/pong.c b/src/mame/drivers/pong.c index 34b8ea3b11d..3f855cd247c 100644 --- a/src/mame/drivers/pong.c +++ b/src/mame/drivers/pong.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Couriersud /*************************************************************************** diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c index b6c76d2b70a..6e1a6698924 100644 --- a/src/mame/drivers/psikyo.c +++ b/src/mame/drivers/psikyo.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia +// copyright-holders:Luca Elia,Olivier Galibert,Paul Priest /*************************************************************************** -= Psikyo Games =- diff --git a/src/mame/drivers/quantum.c b/src/mame/drivers/quantum.c index 1c34bf220dc..09abe250239 100644 --- a/src/mame/drivers/quantum.c +++ b/src/mame/drivers/quantum.c @@ -1,5 +1,5 @@ // license:??? -// copyright-holders:Paul Forgey +// copyright-holders:Paul Forgey, Hedley Rainnie, Aaron Giles /*************************************************************************** Atari Quantum hardware diff --git a/src/mame/drivers/quizdna.c b/src/mame/drivers/quizdna.c index 082b6cd3813..c760cdd0976 100644 --- a/src/mame/drivers/quizdna.c +++ b/src/mame/drivers/quizdna.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/rocnrope.c b/src/mame/drivers/rocnrope.c index 28b436fa72c..16c5fd25116 100644 --- a/src/mame/drivers/rocnrope.c +++ b/src/mame/drivers/rocnrope.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/drivers/route16.c b/src/mame/drivers/route16.c index c8d95525610..6398361ae81 100644 --- a/src/mame/drivers/route16.c +++ b/src/mame/drivers/route16.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/safarir.c b/src/mame/drivers/safarir.c index 46e0be82c39..e2290583c3a 100644 --- a/src/mame/drivers/safarir.c +++ b/src/mame/drivers/safarir.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /**************************************************************************** diff --git a/src/mame/drivers/sauro.c b/src/mame/drivers/sauro.c index a42b148029b..cea50455739 100644 --- a/src/mame/drivers/sauro.c +++ b/src/mame/drivers/sauro.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/savquest.c b/src/mame/drivers/savquest.c index e33f81a5bd9..49684b6f523 100644 --- a/src/mame/drivers/savquest.c +++ b/src/mame/drivers/savquest.c @@ -34,9 +34,6 @@ On boot it reports: S3 86C775/86C705 Video BIOS. Version 2.04.11 Copyright 1996 S3 Incorporated. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - - update by Peter Ferrie: - split BIOS region into 16kb blocks and implement missing PAM registers diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index 9cf864073ed..b59065aec78 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c index b307779705b..90e82122da0 100644 --- a/src/mame/drivers/shangkid.c +++ b/src/mame/drivers/shangkid.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* Dynamic Ski diff --git a/src/mame/drivers/spacefb.c b/src/mame/drivers/spacefb.c index d2001956aa3..e71440f1164 100644 --- a/src/mame/drivers/spacefb.c +++ b/src/mame/drivers/spacefb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c index 4a657768348..ec746d2f97b 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/speedbal.c b/src/mame/drivers/speedbal.c index 92395346baa..e68b4c847b9 100644 --- a/src/mame/drivers/speedbal.c +++ b/src/mame/drivers/speedbal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Joseba Epalza /*************************************************************************** diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c index a7825cb49c7..3099ac1a1f7 100644 --- a/src/mame/drivers/spiders.c +++ b/src/mame/drivers/spiders.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c index b1fe1c166eb..f3fb40cdd0d 100644 --- a/src/mame/drivers/srmp2.c +++ b/src/mame/drivers/srmp2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Yochizo, Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/ssozumo.c b/src/mame/drivers/ssozumo.c index 97f26d73aae..85e56d284d2 100644 --- a/src/mame/drivers/ssozumo.c +++ b/src/mame/drivers/ssozumo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index f96b592b59a..bb3f265b9f3 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*******************************************************/ /* */ diff --git a/src/mame/drivers/strnskil.c b/src/mame/drivers/strnskil.c index 501139bfe6c..9a4becfbef8 100644 --- a/src/mame/drivers/strnskil.c +++ b/src/mame/drivers/strnskil.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c index 3a0e1edd4ae..031f0d37048 100644 --- a/src/mame/drivers/supertnk.c +++ b/src/mame/drivers/supertnk.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Norbert Kehrer /*************************************************************************** diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index d98b15db4a8..587fdb4e004 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /****************************************************************************** diff --git a/src/mame/drivers/thepit.c b/src/mame/drivers/thepit.c index 63562977dc8..3c97b080057 100644 --- a/src/mame/drivers/thepit.c +++ b/src/mame/drivers/thepit.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/tiamc1.c b/src/mame/drivers/tiamc1.c index be727ba9b8c..4dca20a1e68 100644 --- a/src/mame/drivers/tiamc1.c +++ b/src/mame/drivers/tiamc1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Eugene Sandulenko /***************************************************************************** diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c index 54842724592..5e812b3fe1d 100644 --- a/src/mame/drivers/tigeroad.c +++ b/src/mame/drivers/tigeroad.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c index 43913905cf5..7ff93fb34ca 100644 --- a/src/mame/drivers/trackfld.c +++ b/src/mame/drivers/trackfld.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /* diff --git a/src/mame/drivers/tsamurai.c b/src/mame/drivers/tsamurai.c index 956ef342ecf..d0073fdc784 100644 --- a/src/mame/drivers/tsamurai.c +++ b/src/mame/drivers/tsamurai.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /**************************************************************************** diff --git a/src/mame/drivers/tunhunt.c b/src/mame/drivers/tunhunt.c index 7d995584ec1..c242aa21258 100644 --- a/src/mame/drivers/tunhunt.c +++ b/src/mame/drivers/tunhunt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Stroffolino, Owen Rubin,David Haywood +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino, David Haywood /*************************************************************************** Atari Tunnel Hunt hardware diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index e2f9a21a171..82522648a12 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* Konami "Twin16" diff --git a/src/mame/drivers/ultratnk.c b/src/mame/drivers/ultratnk.c index ccb8e1b4858..9bba1fab3c1 100644 --- a/src/mame/drivers/ultratnk.c +++ b/src/mame/drivers/ultratnk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Stefan Jokisch /*************************************************************************** diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c index e7ae9926454..bbbbe302140 100644 --- a/src/mame/drivers/vicdual.c +++ b/src/mame/drivers/vicdual.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/warpwarp.c b/src/mame/drivers/warpwarp.c index 7669ea5ca56..4e868343715 100644 --- a/src/mame/drivers/warpwarp.c +++ b/src/mame/drivers/warpwarp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/drivers/wiz.c b/src/mame/drivers/wiz.c index 88e2fe51f8c..a0490bbd343 100644 --- a/src/mame/drivers/wiz.c +++ b/src/mame/drivers/wiz.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/drivers/xxmissio.c b/src/mame/drivers/xxmissio.c index f7c64d2461f..934dec46bbc 100644 --- a/src/mame/drivers/xxmissio.c +++ b/src/mame/drivers/xxmissio.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /***************************************************************************** diff --git a/src/mame/drivers/zodiack.c b/src/mame/drivers/zodiack.c index 6e31da52a1d..f4c30deb252 100644 --- a/src/mame/drivers/zodiack.c +++ b/src/mame/drivers/zodiack.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/etc/jrcrypt.c b/src/mame/etc/jrcrypt.c index 399c16d7722..b1244151243 100644 --- a/src/mame/etc/jrcrypt.c +++ b/src/mame/etc/jrcrypt.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:David Caldwell /*************************************************************************** diff --git a/src/mame/includes/ambush.h b/src/mame/includes/ambush.h index 392e198857d..bb67a139dda 100644 --- a/src/mame/includes/ambush.h +++ b/src/mame/includes/ambush.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/atetris.h b/src/mame/includes/atetris.h index 85ce4ce02d1..6c6b65f1ec8 100644 --- a/src/mame/includes/atetris.h +++ b/src/mame/includes/atetris.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/bionicc.h b/src/mame/includes/bionicc.h index 1fd57dd5e7c..15c6ab531f5 100644 --- a/src/mame/includes/bionicc.h +++ b/src/mame/includes/bionicc.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /*************************************************************************** diff --git a/src/mame/includes/brkthru.h b/src/mame/includes/brkthru.h index 951287151ce..e8f4e826daa 100644 --- a/src/mame/includes/brkthru.h +++ b/src/mame/includes/brkthru.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index e19f8de408a..6278b68ea51 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/capbowl.h b/src/mame/includes/capbowl.h index 585d43d69f0..6021c95d9be 100644 --- a/src/mame/includes/capbowl.h +++ b/src/mame/includes/capbowl.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/carpolo.h b/src/mame/includes/carpolo.h index 42b3335cdfa..a85c6dacd41 100644 --- a/src/mame/includes/carpolo.h +++ b/src/mame/includes/carpolo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/changela.h b/src/mame/includes/changela.h index 23c7952bc85..a88731d32dc 100644 --- a/src/mame/includes/changela.h +++ b/src/mame/includes/changela.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jarek Burczynski, Phil Stroffolino, Tomasz Slanina diff --git a/src/mame/includes/copsnrob.h b/src/mame/includes/copsnrob.h index b29a6d46e87..8a9f0fb32fd 100644 --- a/src/mame/includes/copsnrob.h +++ b/src/mame/includes/copsnrob.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/dday.h b/src/mame/includes/dday.h index 3e74323e8b2..a83633daf06 100644 --- a/src/mame/includes/dday.h +++ b/src/mame/includes/dday.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index bff657388ed..e2616116637 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /************************************************************************* diff --git a/src/mame/includes/drmicro.h b/src/mame/includes/drmicro.h index 413364ebf06..adb57b7477f 100644 --- a/src/mame/includes/drmicro.h +++ b/src/mame/includes/drmicro.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /************************************************************************* diff --git a/src/mame/includes/epos.h b/src/mame/includes/epos.h index 2e9d9ba4387..810a6145734 100644 --- a/src/mame/includes/epos.h +++ b/src/mame/includes/epos.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/fastfred.h b/src/mame/includes/fastfred.h index d29b3c4a754..0ad0425c48d 100644 --- a/src/mame/includes/fastfred.h +++ b/src/mame/includes/fastfred.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index cb5795f5fd7..ad9ed54c55e 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /************************************************************************* diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index 932a713a217..566749b822e 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "machine/eepromser.h" diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h index 82d9cc37ad9..e71682ca514 100644 --- a/src/mame/includes/fromance.h +++ b/src/mame/includes/fromance.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Takahiro Nogi. Bryan McPhail, Nicola Salmoria, Aaron Giles /*************************************************************************** Game Driver for Video System Mahjong series and Pipe Dream. diff --git a/src/mame/includes/funkybee.h b/src/mame/includes/funkybee.h index ffeed59b63f..e9ee4c2b634 100644 --- a/src/mame/includes/funkybee.h +++ b/src/mame/includes/funkybee.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index bb42a5dfaf1..d96d1e27826 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h index be89c7791a4..a15241c3df3 100644 --- a/src/mame/includes/goldstar.h +++ b/src/mame/includes/goldstar.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood, Roberto Fresca +// copyright-holders:David Haywood, Roberto Fresca, Vas Crabb #include "emu.h" #include "machine/ticket.h" diff --git a/src/mame/includes/gotya.h b/src/mame/includes/gotya.h index c2d31b3f086..d762d9a8daf 100644 --- a/src/mame/includes/gotya.h +++ b/src/mame/includes/gotya.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "sound/samples.h" diff --git a/src/mame/includes/hanaawas.h b/src/mame/includes/hanaawas.h index 675a726c64e..6ba7387ddcb 100644 --- a/src/mame/includes/hanaawas.h +++ b/src/mame/includes/hanaawas.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/himesiki.h b/src/mame/includes/himesiki.h index c23bb961502..5fbfcf6ecd5 100644 --- a/src/mame/includes/himesiki.h +++ b/src/mame/includes/himesiki.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /************************************************************************* diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index 7c143d5b089..084bdecb8cb 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Nicola Salmoria #include "sound/dac.h" #include "sound/sn76496.h" diff --git a/src/mame/includes/hyhoo.h b/src/mame/includes/hyhoo.h index d9dacf5f257..3f18e86f3c6 100644 --- a/src/mame/includes/hyhoo.h +++ b/src/mame/includes/hyhoo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "includes/nb1413m3.h" diff --git a/src/mame/includes/hyperspt.h b/src/mame/includes/hyperspt.h index 7e6464f6bab..2beec42840d 100644 --- a/src/mame/includes/hyperspt.h +++ b/src/mame/includes/hyperspt.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy #include "sound/sn76496.h" diff --git a/src/mame/includes/ikki.h b/src/mame/includes/ikki.h index 86b8526e388..636c47fbe91 100644 --- a/src/mame/includes/ikki.h +++ b/src/mame/includes/ikki.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /************************************************************************* diff --git a/src/mame/includes/inufuku.h b/src/mame/includes/inufuku.h index 81539db2b29..c751434fa2b 100644 --- a/src/mame/includes/inufuku.h +++ b/src/mame/includes/inufuku.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi class inufuku_state : public driver_device diff --git a/src/mame/includes/lkage.h b/src/mame/includes/lkage.h index 4635f04f4cf..27bacd92fde 100644 --- a/src/mame/includes/lkage.h +++ b/src/mame/includes/lkage.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino class lkage_state : public driver_device diff --git a/src/mame/includes/lvcards.h b/src/mame/includes/lvcards.h index 3d27a06c870..9becf3c4520 100644 --- a/src/mame/includes/lvcards.h +++ b/src/mame/includes/lvcards.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari, Curt Coder class lvcards_state : public driver_device { diff --git a/src/mame/includes/m57.h b/src/mame/includes/m57.h index bdb902cbd7c..226db7c5b96 100644 --- a/src/mame/includes/m57.h +++ b/src/mame/includes/m57.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino class m57_state : public driver_device { diff --git a/src/mame/includes/madalien.h b/src/mame/includes/madalien.h index 715cabf2536..b0fbb2a6a15 100644 --- a/src/mame/includes/madalien.h +++ b/src/mame/includes/madalien.h @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Norbert Kehrer /*************************************************************************** diff --git a/src/mame/includes/magmax.h b/src/mame/includes/magmax.h index bbcac734970..085c3799cec 100644 --- a/src/mame/includes/magmax.h +++ b/src/mame/includes/magmax.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi class magmax_state : public driver_device { diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 44c0b39e8fd..556dbdf179a 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari class marineb_state : public driver_device { diff --git a/src/mame/includes/markham.h b/src/mame/includes/markham.h index 009d6895891..573fd93dc5b 100644 --- a/src/mame/includes/markham.h +++ b/src/mame/includes/markham.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /************************************************************************* diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h index 2fc4d1f7649..baa670b8762 100644 --- a/src/mame/includes/megazone.h +++ b/src/mame/includes/megazone.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /************************************************************************* diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index f774dd03cb6..8273db9b053 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/momoko.h b/src/mame/includes/momoko.h index f92374891d8..93542aa3d7a 100644 --- a/src/mame/includes/momoko.h +++ b/src/mame/includes/momoko.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /************************************************************************* diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index d8e8ee40698..527d52b01e1 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /************************************************************************* diff --git a/src/mame/includes/mrjong.h b/src/mame/includes/mrjong.h index 87f56aba920..877100e22a1 100644 --- a/src/mame/includes/mrjong.h +++ b/src/mame/includes/mrjong.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /************************************************************************* diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index 1b4a83d044c..3efae8e5442 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /************************************************************************* diff --git a/src/mame/includes/namcoic.h b/src/mame/includes/namcoic.h index 0b0274ccb56..cf8e50e9948 100644 --- a/src/mame/includes/namcoic.h +++ b/src/mame/includes/namcoic.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* namcoic.h diff --git a/src/mame/includes/namcona1.h b/src/mame/includes/namcona1.h index d529db09569..94d99cffefb 100644 --- a/src/mame/includes/namcona1.h +++ b/src/mame/includes/namcona1.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 7066c90f630..02930edb0e0 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/includes/namcos21.h b/src/mame/includes/namcos21.h index 5f8ff0b3e16..f34916def5b 100644 --- a/src/mame/includes/namcos21.h +++ b/src/mame/includes/namcos21.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /** * @file namcos21.h diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index 1dc2d48ac3f..5534a95dcf7 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, hap, R. Belmont /*************************************************************************** diff --git a/src/mame/includes/naughtyb.h b/src/mame/includes/naughtyb.h index 8c12478632b..dfd6d2b94df 100644 --- a/src/mame/includes/naughtyb.h +++ b/src/mame/includes/naughtyb.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Sal,John Bugliarisi +// license:BSD-3-Clause +// copyright-holders:Brad Oliver,Sal,John Bugliarisi #include "audio/pleiads.h" class naughtyb_state : public driver_device diff --git a/src/mame/includes/nb1413m3.h b/src/mame/includes/nb1413m3.h index 9dcafe709b9..fc13db06705 100644 --- a/src/mame/includes/nb1413m3.h +++ b/src/mame/includes/nb1413m3.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/includes/nbmj8688.h b/src/mame/includes/nbmj8688.h index 20a880d7620..7abf89cca7e 100644 --- a/src/mame/includes/nbmj8688.h +++ b/src/mame/includes/nbmj8688.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "video/hd61830.h" #include "includes/nb1413m3.h" diff --git a/src/mame/includes/nbmj8891.h b/src/mame/includes/nbmj8891.h index 63595f8bf7c..fcb8e4e50d6 100644 --- a/src/mame/includes/nbmj8891.h +++ b/src/mame/includes/nbmj8891.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "includes/nb1413m3.h" diff --git a/src/mame/includes/nbmj8900.h b/src/mame/includes/nbmj8900.h index 04843620410..8e4d6345851 100644 --- a/src/mame/includes/nbmj8900.h +++ b/src/mame/includes/nbmj8900.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "includes/nb1413m3.h" diff --git a/src/mame/includes/nbmj8991.h b/src/mame/includes/nbmj8991.h index ed90462b42e..580e171f66c 100644 --- a/src/mame/includes/nbmj8991.h +++ b/src/mame/includes/nbmj8991.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "includes/nb1413m3.h" diff --git a/src/mame/includes/nbmj9195.h b/src/mame/includes/nbmj9195.h index f537cf1c642..70380d2ab49 100644 --- a/src/mame/includes/nbmj9195.h +++ b/src/mame/includes/nbmj9195.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/includes/niyanpai.h b/src/mame/includes/niyanpai.h index 5ca48ce4568..58fe4694f5e 100644 --- a/src/mame/includes/niyanpai.h +++ b/src/mame/includes/niyanpai.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "sound/dac.h" #include "machine/tmp68301.h" diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h index 16ea6bedd0c..99dc21b5df1 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,Luca Elia +// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshal,Angelo Salese,Luca Elia #include "machine/nmk112.h" #include "sound/okim6295.h" #include "machine/nmk004.h" diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index 46b04f67247..56e3d542773 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi, Uki /************************************************************************* diff --git a/src/mame/includes/pastelg.h b/src/mame/includes/pastelg.h index 813fdb2e913..25f33abfd19 100644 --- a/src/mame/includes/pastelg.h +++ b/src/mame/includes/pastelg.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi #include "includes/nb1413m3.h" diff --git a/src/mame/includes/quizdna.h b/src/mame/includes/quizdna.h index d6a08d65e0b..befbea52a8e 100644 --- a/src/mame/includes/quizdna.h +++ b/src/mame/includes/quizdna.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki class quizdna_state : public driver_device { diff --git a/src/mame/includes/rocnrope.h b/src/mame/includes/rocnrope.h index 76bf00401e0..9345b69eeef 100644 --- a/src/mame/includes/rocnrope.h +++ b/src/mame/includes/rocnrope.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy class rocnrope_state : public driver_device { diff --git a/src/mame/includes/route16.h b/src/mame/includes/route16.h index 8caf3e6a31a..3651614638f 100644 --- a/src/mame/includes/route16.h +++ b/src/mame/includes/route16.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "sound/sn76477.h" diff --git a/src/mame/includes/sauro.h b/src/mame/includes/sauro.h index ae46c4b40d7..dfa69ed44f2 100644 --- a/src/mame/includes/sauro.h +++ b/src/mame/includes/sauro.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "sound/sp0256.h" diff --git a/src/mame/includes/sbasketb.h b/src/mame/includes/sbasketb.h index 8f9be6bcf39..1c452c3ea07 100644 --- a/src/mame/includes/sbasketb.h +++ b/src/mame/includes/sbasketb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "sound/sn76496.h" diff --git a/src/mame/includes/shangkid.h b/src/mame/includes/shangkid.h index 4ec57042a72..6680c6c1748 100644 --- a/src/mame/includes/shangkid.h +++ b/src/mame/includes/shangkid.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino class shangkid_state : public driver_device { diff --git a/src/mame/includes/spacefb.h b/src/mame/includes/spacefb.h index ccabe72623e..8476eb7a917 100644 --- a/src/mame/includes/spacefb.h +++ b/src/mame/includes/spacefb.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h index d341b30ab54..13d0a1f9578 100644 --- a/src/mame/includes/spcforce.h +++ b/src/mame/includes/spcforce.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "sound/sn76496.h" diff --git a/src/mame/includes/speedbal.h b/src/mame/includes/speedbal.h index e4cd90898d5..2451a2828c1 100644 --- a/src/mame/includes/speedbal.h +++ b/src/mame/includes/speedbal.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Joseba Epalza class speedbal_state : public driver_device { diff --git a/src/mame/includes/spiders.h b/src/mame/includes/spiders.h index 0eb00ffdd07..bbac41c4d5a 100644 --- a/src/mame/includes/spiders.h +++ b/src/mame/includes/spiders.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/srmp2.h b/src/mame/includes/srmp2.h index e4d48edd5e1..6162c62b584 100644 --- a/src/mame/includes/srmp2.h +++ b/src/mame/includes/srmp2.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Yochizo, Takahiro Nogi #include "sound/msm5205.h" #include "video/seta001.h" diff --git a/src/mame/includes/ssozumo.h b/src/mame/includes/ssozumo.h index 9be337b1cc3..e846a597762 100644 --- a/src/mame/includes/ssozumo.h +++ b/src/mame/includes/ssozumo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi class ssozumo_state : public driver_device { diff --git a/src/mame/includes/strnskil.h b/src/mame/includes/strnskil.h index 49e6281cc6b..3e5374fbe08 100644 --- a/src/mame/includes/strnskil.h +++ b/src/mame/includes/strnskil.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki class strnskil_state : public driver_device { diff --git a/src/mame/includes/suprloco.h b/src/mame/includes/suprloco.h index 86aea98adec..2b3e99190dd 100644 --- a/src/mame/includes/suprloco.h +++ b/src/mame/includes/suprloco.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari class suprloco_state : public driver_device { diff --git a/src/mame/includes/thepit.h b/src/mame/includes/thepit.h index d48182c94c4..364502974c9 100644 --- a/src/mame/includes/thepit.h +++ b/src/mame/includes/thepit.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari class thepit_state : public driver_device { diff --git a/src/mame/includes/tiamc1.h b/src/mame/includes/tiamc1.h index 66ff91b68f5..917601b6bc0 100644 --- a/src/mame/includes/tiamc1.h +++ b/src/mame/includes/tiamc1.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Eugene Sandulenko class tiamc1_state : public driver_device diff --git a/src/mame/includes/tigeroad.h b/src/mame/includes/tigeroad.h index 6d577e482e3..af55bb9a7d8 100644 --- a/src/mame/includes/tigeroad.h +++ b/src/mame/includes/tigeroad.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino #include "video/bufsprite.h" #include "sound/msm5205.h" diff --git a/src/mame/includes/trackfld.h b/src/mame/includes/trackfld.h index ad631d1e457..93df7e95d2f 100644 --- a/src/mame/includes/trackfld.h +++ b/src/mame/includes/trackfld.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/includes/tsamurai.h b/src/mame/includes/tsamurai.h index 1677ff18760..ca2d635b91d 100644 --- a/src/mame/includes/tsamurai.h +++ b/src/mame/includes/tsamurai.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino class tsamurai_state : public driver_device { diff --git a/src/mame/includes/tunhunt.h b/src/mame/includes/tunhunt.h index 7dc6bb5be26..285a3549733 100644 --- a/src/mame/includes/tunhunt.h +++ b/src/mame/includes/tunhunt.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Stroffolino, Owen Rubin,David Haywood +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino, David Haywood class tunhunt_state : public driver_device { public: diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index 001dfa00e50..3d5157089d2 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino #include "video/bufsprite.h" #include "sound/upd7759.h" diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h index b347ecf7b89..cfa01811967 100644 --- a/src/mame/includes/ultratnk.h +++ b/src/mame/includes/ultratnk.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Stefan Jokisch /************************************************************************* diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h index 7eeba314307..f183d8c72a7 100644 --- a/src/mame/includes/vicdual.h +++ b/src/mame/includes/vicdual.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /************************************************************************* diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index 8f9b9895bdf..da3eb75ac29 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy #include "audio/warpwarp.h" diff --git a/src/mame/includes/wiz.h b/src/mame/includes/wiz.h index a93f4b67e2c..4b132a697c5 100644 --- a/src/mame/includes/wiz.h +++ b/src/mame/includes/wiz.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/xxmissio.h b/src/mame/includes/xxmissio.h index d16a9650e5b..1082e830cd3 100644 --- a/src/mame/includes/xxmissio.h +++ b/src/mame/includes/xxmissio.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki class xxmissio_state : public driver_device { diff --git a/src/mame/includes/zodiack.h b/src/mame/includes/zodiack.h index 66fc7c3f188..e40cdcff824 100644 --- a/src/mame/includes/zodiack.h +++ b/src/mame/includes/zodiack.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "emu.h" #include "cpu/z80/z80.h" diff --git a/src/mame/machine/315_5296.c b/src/mame/machine/315_5296.c index e87744d159b..18551b95f23 100644 --- a/src/mame/machine/315_5296.c +++ b/src/mame/machine/315_5296.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:hap +// copyright-holders:hap, Charles MacDonald /********************************************************************** Sega 315-5296 I/O chip diff --git a/src/mame/machine/315_5296.h b/src/mame/machine/315_5296.h index 8a07b7f1d1a..7f846c9615c 100644 --- a/src/mame/machine/315_5296.h +++ b/src/mame/machine/315_5296.h @@ -1,12 +1,9 @@ // license:BSD-3-Clause -// copyright-holders:hap +// copyright-holders:hap, Charles MacDonald /********************************************************************** Sega 315-5296 I/O chip - Copyright MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/mame/machine/btime.c b/src/mame/machine/btime.c index 24812d60481..8279f2e52ac 100644 --- a/src/mame/machine/btime.c +++ b/src/mame/machine/btime.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "emu.h" #include "includes/btime.h" diff --git a/src/mame/machine/carpolo.c b/src/mame/machine/carpolo.c index ab85015582a..a1ae3466f6e 100644 --- a/src/mame/machine/carpolo.c +++ b/src/mame/machine/carpolo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/machine/konami1.c b/src/mame/machine/konami1.c index bdd17b7ed35..75d4a2b01b4 100644 --- a/src/mame/machine/konami1.c +++ b/src/mame/machine/konami1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Nicola Salmoria, Chris Hardy /*************************************************************************** diff --git a/src/mame/machine/konami1.h b/src/mame/machine/konami1.h index e66bbd33442..00697959658 100644 --- a/src/mame/machine/konami1.h +++ b/src/mame/machine/konami1.h @@ -1,3 +1,3 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Nicola Salmoria, Chris Hardy UINT8 *konami1_decode(running_machine &machine, const char *cpu); diff --git a/src/mame/machine/lkage.c b/src/mame/machine/lkage.c index 7796674ea67..3235f08e72c 100644 --- a/src/mame/machine/lkage.c +++ b/src/mame/machine/lkage.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/machine/nb1413m3.c b/src/mame/machine/nb1413m3.c index e574b41f78e..29985053e02 100644 --- a/src/mame/machine/nb1413m3.c +++ b/src/mame/machine/nb1413m3.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/machine/ng_memcard.h b/src/mame/machine/ng_memcard.h index 5ca9dbd3bb3..9d457ddaa59 100644 --- a/src/mame/machine/ng_memcard.h +++ b/src/mame/machine/ng_memcard.h @@ -6,9 +6,6 @@ NEOGEO Memory card functions. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #pragma once diff --git a/src/mame/machine/nmk004.c b/src/mame/machine/nmk004.c index eaeaaf5944f..fea5e689f77 100644 --- a/src/mame/machine/nmk004.c +++ b/src/mame/machine/nmk004.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood,trap15 +// copyright-holders:David Haywood,Alex Marshal /*************************************************************************** NMK004 emulation diff --git a/src/mame/machine/nmk004.h b/src/mame/machine/nmk004.h index c5c80a5429d..3f07266bd62 100644 --- a/src/mame/machine/nmk004.h +++ b/src/mame/machine/nmk004.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood,trap15 +// copyright-holders:David Haywood,Alex Marshal /*************************************************************************** NMK004 emulation diff --git a/src/mame/machine/tigeroad.c b/src/mame/machine/tigeroad.c index 2b899cfdc94..f142cf3c523 100644 --- a/src/mame/machine/tigeroad.c +++ b/src/mame/machine/tigeroad.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino #include "emu.h" #include "includes/tigeroad.h" diff --git a/src/mame/video/ambush.c b/src/mame/video/ambush.c index c29568ebf6d..85ab981d86b 100644 --- a/src/mame/video/ambush.c +++ b/src/mame/video/ambush.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/atetris.c b/src/mame/video/atetris.c index 7e97fd1d21e..635076c0209 100644 --- a/src/mame/video/atetris.c +++ b/src/mame/video/atetris.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/awpvid.c b/src/mame/video/awpvid.c index a804c9953ee..55dcdfde240 100644 --- a/src/mame/video/awpvid.c +++ b/src/mame/video/awpvid.c @@ -5,8 +5,6 @@ AWP Hardware video simulation system originally written for AGEMAME by J.Wallace, enhanced by D.Haywood - M.A.M.E Core Copyright Nicola Salmoria and the MAME Team. - This is a primitive handler for generating reels with multiple symbols visible hanging off steppers.c . diff --git a/src/mame/video/bionicc.c b/src/mame/video/bionicc.c index 6f61d0ff32b..8379cd0b78c 100644 --- a/src/mame/video/bionicc.c +++ b/src/mame/video/bionicc.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Steven Frew, Phil Stroffolino, Paul Leaman /*************************************************************************** diff --git a/src/mame/video/brkthru.c b/src/mame/video/brkthru.c index 9e4400d5952..80895af8115 100644 --- a/src/mame/video/brkthru.c +++ b/src/mame/video/brkthru.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/video/btime.c b/src/mame/video/btime.c index 34fa7bfc48e..ecfe432a5d2 100644 --- a/src/mame/video/btime.c +++ b/src/mame/video/btime.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/c45.c b/src/mame/video/c45.c index 7221f13d9fa..6df7edd2331 100644 --- a/src/mame/video/c45.c +++ b/src/mame/video/c45.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson /**************************************************************************************************************/ /* diff --git a/src/mame/video/c45.h b/src/mame/video/c45.h index 210009d8a23..662c3df8c58 100644 --- a/src/mame/video/c45.h +++ b/src/mame/video/c45.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson #pragma once diff --git a/src/mame/video/capbowl.c b/src/mame/video/capbowl.c index fd98a57f3ba..b37c86793fd 100644 --- a/src/mame/video/capbowl.c +++ b/src/mame/video/capbowl.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/carpolo.c b/src/mame/video/carpolo.c index e0d5fbdb115..793cb4941f6 100644 --- a/src/mame/video/carpolo.c +++ b/src/mame/video/carpolo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/changela.c b/src/mame/video/changela.c index 11de0e5269a..5e5a119997f 100644 --- a/src/mame/video/changela.c +++ b/src/mame/video/changela.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Jarek Burczynski, Phil Stroffolino, Tomasz Slanina /************************************************************************** Change Lanes - Video Hardware diff --git a/src/mame/video/copsnrob.c b/src/mame/video/copsnrob.c index 68cd98823cf..196a8fcf558 100644 --- a/src/mame/video/copsnrob.c +++ b/src/mame/video/copsnrob.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c index e7bf45c90f2..738a5662a5b 100644 --- a/src/mame/video/dday.c +++ b/src/mame/video/dday.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/djboy.c b/src/mame/video/djboy.c index 77938e8ac83..859d79335ed 100644 --- a/src/mame/video/djboy.c +++ b/src/mame/video/djboy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /** * @file video/djboy.c diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index 4cec2937812..1f8e700a2f1 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Couriersud /*************************************************************************** diff --git a/src/mame/video/drmicro.c b/src/mame/video/drmicro.c index b90bc3d29a6..446dbc49b32 100644 --- a/src/mame/video/drmicro.c +++ b/src/mame/video/drmicro.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /******************************************************************************* diff --git a/src/mame/video/epos.c b/src/mame/video/epos.c index cf04b702fae..5c2f2b70ab8 100644 --- a/src/mame/video/epos.c +++ b/src/mame/video/epos.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c index cb79dad6328..69be4f87d40 100644 --- a/src/mame/video/fastfred.c +++ b/src/mame/video/fastfred.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/firetrk.c b/src/mame/video/firetrk.c index c0686d95620..ab6fb710857 100644 --- a/src/mame/video/firetrk.c +++ b/src/mame/video/firetrk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/video/fromanc2.c b/src/mame/video/fromanc2.c index f9577f7a45a..02d6d0b5191 100644 --- a/src/mame/video/fromanc2.c +++ b/src/mame/video/fromanc2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c index 96984206960..b5f5d6ca659 100644 --- a/src/mame/video/fromance.c +++ b/src/mame/video/fromance.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Bryan McPhail +// copyright-holders:Takahiro Nogi. Bryan McPhail, Nicola Salmoria, Aaron Giles /****************************************************************************** Video Hardware for Video System Mahjong series and Pipe Dream. diff --git a/src/mame/video/funkybee.c b/src/mame/video/funkybee.c index 6b7920818cc..5e80dad8aff 100644 --- a/src/mame/video/funkybee.c +++ b/src/mame/video/funkybee.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/gaiden.c b/src/mame/video/gaiden.c index 0170c3e56f3..f8f1f951e26 100644 --- a/src/mame/video/gaiden.c +++ b/src/mame/video/gaiden.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/video/goldstar.c b/src/mame/video/goldstar.c index 3cfdf5f7960..c03a2df9397 100644 --- a/src/mame/video/goldstar.c +++ b/src/mame/video/goldstar.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood, Roberto Fresca +// copyright-holders:David Haywood, Roberto Fresca, Vas Crabb /*************************************************************************** video.c diff --git a/src/mame/video/gomoku.c b/src/mame/video/gomoku.c index 46487d30ab5..dfcb4a6d46e 100644 --- a/src/mame/video/gomoku.c +++ b/src/mame/video/gomoku.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:Takahiro Nogi, David Haywood /****************************************************************************** Gomoku Narabe Renju diff --git a/src/mame/video/gotya.c b/src/mame/video/gotya.c index 40034b90b64..3f2eace21f2 100644 --- a/src/mame/video/gotya.c +++ b/src/mame/video/gotya.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "emu.h" #include "video/resnet.h" diff --git a/src/mame/video/hanaawas.c b/src/mame/video/hanaawas.c index 05733fe241a..2b9081228e3 100644 --- a/src/mame/video/hanaawas.c +++ b/src/mame/video/hanaawas.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/himesiki.c b/src/mame/video/himesiki.c index 2c2e7659d8e..d41f38ae49f 100644 --- a/src/mame/video/himesiki.c +++ b/src/mame/video/himesiki.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /****************************************************************************** diff --git a/src/mame/video/homedata.c b/src/mame/video/homedata.c index 1954f241369..4ca9e496cf2 100644 --- a/src/mame/video/homedata.c +++ b/src/mame/video/homedata.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Nicola Salmoria #include "emu.h" #include "cpu/m6809/m6809.h" diff --git a/src/mame/video/hyhoo.c b/src/mame/video/hyhoo.c index b0c5f37908f..258ab9fd80c 100644 --- a/src/mame/video/hyhoo.c +++ b/src/mame/video/hyhoo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/hyperspt.c b/src/mame/video/hyperspt.c index b339a2c39b5..8b5a1502781 100644 --- a/src/mame/video/hyperspt.c +++ b/src/mame/video/hyperspt.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/video/ikki.c b/src/mame/video/ikki.c index 3b67d4b42b3..c2065daedaa 100644 --- a/src/mame/video/ikki.c +++ b/src/mame/video/ikki.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /****************************************************************************** diff --git a/src/mame/video/inufuku.c b/src/mame/video/inufuku.c index df2a75f4264..d9f896c9e95 100644 --- a/src/mame/video/inufuku.c +++ b/src/mame/video/inufuku.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/lkage.c b/src/mame/video/lkage.c index 783fcefa473..c08811266f4 100644 --- a/src/mame/video/lkage.c +++ b/src/mame/video/lkage.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** diff --git a/src/mame/video/lvcards.c b/src/mame/video/lvcards.c index c81e89d127e..04a9e30647b 100644 --- a/src/mame/video/lvcards.c +++ b/src/mame/video/lvcards.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari, Curt Coder /*************************************************************************** diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c index a433a2ae9ee..60826394ff0 100644 --- a/src/mame/video/m57.c +++ b/src/mame/video/m57.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /**************************************************************************** diff --git a/src/mame/video/madalien.c b/src/mame/video/madalien.c index aeddac15b55..7d1822ad5b7 100644 --- a/src/mame/video/madalien.c +++ b/src/mame/video/madalien.c @@ -1,4 +1,4 @@ -// license:??? +// license:GPL-2.0+ // copyright-holders:Norbert Kehrer /*************************************************************************** diff --git a/src/mame/video/magmax.c b/src/mame/video/magmax.c index 233f2a89542..1683199b40d 100644 --- a/src/mame/video/magmax.c +++ b/src/mame/video/magmax.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/video/marineb.c b/src/mame/video/marineb.c index 6b6226efa0b..401749719ae 100644 --- a/src/mame/video/marineb.c +++ b/src/mame/video/marineb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/markham.c b/src/mame/video/markham.c index 8dfa80addf8..e2fd9cb437a 100644 --- a/src/mame/video/markham.c +++ b/src/mame/video/markham.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /****************************************************************************** diff --git a/src/mame/video/megazone.c b/src/mame/video/megazone.c index f85fa158b17..8eb713a6fe5 100644 --- a/src/mame/video/megazone.c +++ b/src/mame/video/megazone.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/video/mermaid.c b/src/mame/video/mermaid.c index 815cf791d6e..c9e4a189cba 100644 --- a/src/mame/video/mermaid.c +++ b/src/mame/video/mermaid.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari #include "emu.h" #include "includes/mermaid.h" diff --git a/src/mame/video/momoko.c b/src/mame/video/momoko.c index 3258ac44d6e..a1add58c781 100644 --- a/src/mame/video/momoko.c +++ b/src/mame/video/momoko.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /******************************************************************************* diff --git a/src/mame/video/mrflea.c b/src/mame/video/mrflea.c index 0c4f398411e..56260a50da3 100644 --- a/src/mame/video/mrflea.c +++ b/src/mame/video/mrflea.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /****************************************************************** diff --git a/src/mame/video/mrjong.c b/src/mame/video/mrjong.c index b3cd7e862d0..91567cff2b9 100644 --- a/src/mame/video/mrjong.c +++ b/src/mame/video/mrjong.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/video/ms32.c b/src/mame/video/ms32.c index c9d7fade01c..53a44ed5bc0 100644 --- a/src/mame/video/ms32.c +++ b/src/mame/video/ms32.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood,Paul Priest /* Jaleco MegaSystem 32 Video Hardware */ /* The Video Hardware is Similar to the Non-MS32 Version of Tetris Plus 2 */ diff --git a/src/mame/video/munchmo.c b/src/mame/video/munchmo.c index afd986d0f68..86febc95642 100644 --- a/src/mame/video/munchmo.c +++ b/src/mame/video/munchmo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino #include "emu.h" #include "includes/munchmo.h" diff --git a/src/mame/video/namcona1.c b/src/mame/video/namcona1.c index 55bbe484d54..db20eadddf6 100644 --- a/src/mame/video/namcona1.c +++ b/src/mame/video/namcona1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // 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 1703be9f7e1..cc38da66c8a 100644 --- a/src/mame/video/namconb1.c +++ b/src/mame/video/namconb1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* video/namconb1.c */ diff --git a/src/mame/video/namcos21.c b/src/mame/video/namcos21.c index f27083fc317..2baae7d69c3 100644 --- a/src/mame/video/namcos21.c +++ b/src/mame/video/namcos21.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /*************************************************************************** Namco System 21 Video Hardware diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c index 1a59f8a3d12..83e13a33a80 100644 --- a/src/mame/video/namcos22.c +++ b/src/mame/video/namcos22.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, hap, R. Belmont /** * video hardware for Namco System22 diff --git a/src/mame/video/naughtyb.c b/src/mame/video/naughtyb.c index ba9673de84d..ff3771a5255 100644 --- a/src/mame/video/naughtyb.c +++ b/src/mame/video/naughtyb.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Sal,John Bugliarisi +// license:BSD-3-Clause +// copyright-holders:Brad Oliver,Sal,John Bugliarisi /*************************************************************************** video.c diff --git a/src/mame/video/nbmj8688.c b/src/mame/video/nbmj8688.c index 92049ca635f..bf47bfed3c2 100644 --- a/src/mame/video/nbmj8688.c +++ b/src/mame/video/nbmj8688.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/nbmj8891.c b/src/mame/video/nbmj8891.c index a724c9695c3..9bb83f6a44e 100644 --- a/src/mame/video/nbmj8891.c +++ b/src/mame/video/nbmj8891.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/nbmj8900.c b/src/mame/video/nbmj8900.c index 5e88795c391..232ef9b5b01 100644 --- a/src/mame/video/nbmj8900.c +++ b/src/mame/video/nbmj8900.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/nbmj8991.c b/src/mame/video/nbmj8991.c index ecb7b0b6358..05250aea3b2 100644 --- a/src/mame/video/nbmj8991.c +++ b/src/mame/video/nbmj8991.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/nbmj9195.c b/src/mame/video/nbmj9195.c index 89a2d9a1059..9008644153a 100644 --- a/src/mame/video/nbmj9195.c +++ b/src/mame/video/nbmj9195.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/niyanpai.c b/src/mame/video/niyanpai.c index 54a9d3bc49a..a84f1c40f80 100644 --- a/src/mame/video/niyanpai.c +++ b/src/mame/video/niyanpai.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c index 55383d4ea02..fe57ffe18e4 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,Luca Elia +// copyright-holders:Mirko Buffoni,Richard Bush,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshal,Angelo Salese,Luca Elia /* notes... drawing sprites in a single pass with pdrawgfx breaks Thunder Dragon 2, diff --git a/src/mame/video/ojankohs.c b/src/mame/video/ojankohs.c index c96693fa15e..af39290097e 100644 --- a/src/mame/video/ojankohs.c +++ b/src/mame/video/ojankohs.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi, Uki /****************************************************************************** diff --git a/src/mame/video/pastelg.c b/src/mame/video/pastelg.c index bfad6e950d5..a783696bdce 100644 --- a/src/mame/video/pastelg.c +++ b/src/mame/video/pastelg.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /****************************************************************************** diff --git a/src/mame/video/psikyo.c b/src/mame/video/psikyo.c index d1463a4f665..10e486789c3 100644 --- a/src/mame/video/psikyo.c +++ b/src/mame/video/psikyo.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia +// copyright-holders:Luca Elia,Paul Priest /*************************************************************************** -= Psikyo Games =- diff --git a/src/mame/video/quizdna.c b/src/mame/video/quizdna.c index 3f3fd7692bc..0a9378abc32 100644 --- a/src/mame/video/quizdna.c +++ b/src/mame/video/quizdna.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /****************************************************************************** diff --git a/src/mame/video/rocnrope.c b/src/mame/video/rocnrope.c index bf64b8c0d1d..ddbafdea494 100644 --- a/src/mame/video/rocnrope.c +++ b/src/mame/video/rocnrope.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/video/route16.c b/src/mame/video/route16.c index 8258d4e8790..1ac141e6f86 100644 --- a/src/mame/video/route16.c +++ b/src/mame/video/route16.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/sauro.c b/src/mame/video/sauro.c index 144d6a4031e..20ad1566bcd 100644 --- a/src/mame/video/sauro.c +++ b/src/mame/video/sauro.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/sbasketb.c b/src/mame/video/sbasketb.c index 42f317f4f3b..de4a57cf476 100644 --- a/src/mame/video/sbasketb.c +++ b/src/mame/video/sbasketb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/shangkid.c b/src/mame/video/shangkid.c index d5066634fb7..9b6525f4e30 100644 --- a/src/mame/video/shangkid.c +++ b/src/mame/video/shangkid.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* video/shangkid */ diff --git a/src/mame/video/spacefb.c b/src/mame/video/spacefb.c index 90ed9bfecf5..d5a829aaee2 100644 --- a/src/mame/video/spacefb.c +++ b/src/mame/video/spacefb.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/video/spcforce.c b/src/mame/video/spcforce.c index a263cc4caf6..55089a0f9e7 100644 --- a/src/mame/video/spcforce.c +++ b/src/mame/video/spcforce.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/speedbal.c b/src/mame/video/speedbal.c index 133f6ce7093..e47bedd2f70 100644 --- a/src/mame/video/speedbal.c +++ b/src/mame/video/speedbal.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Joseba Epalza /**************************************************************************** * * diff --git a/src/mame/video/srmp2.c b/src/mame/video/srmp2.c index 0b1d8252fb4..8970d15dd3c 100644 --- a/src/mame/video/srmp2.c +++ b/src/mame/video/srmp2.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Yochizo, Takahiro Nogi /*************************************************************************** diff --git a/src/mame/video/ssozumo.c b/src/mame/video/ssozumo.c index 251010d986e..7bb94e0629e 100644 --- a/src/mame/video/ssozumo.c +++ b/src/mame/video/ssozumo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Takahiro Nogi /*************************************************************************** diff --git a/src/mame/video/strnskil.c b/src/mame/video/strnskil.c index 83d66ec76a1..20d7e3e2ee5 100644 --- a/src/mame/video/strnskil.c +++ b/src/mame/video/strnskil.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /****************************************************************************** diff --git a/src/mame/video/suprloco.c b/src/mame/video/suprloco.c index ac7284a89a8..bb6496f07d8 100644 --- a/src/mame/video/suprloco.c +++ b/src/mame/video/suprloco.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/thepit.c b/src/mame/video/thepit.c index b88fe3de529..be3cdcade76 100644 --- a/src/mame/video/thepit.c +++ b/src/mame/video/thepit.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/tiamc1.c b/src/mame/video/tiamc1.c index e9c1d533a91..460917a90d4 100644 --- a/src/mame/video/tiamc1.c +++ b/src/mame/video/tiamc1.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Eugene Sandulenko /*************************************************************************** diff --git a/src/mame/video/tigeroad.c b/src/mame/video/tigeroad.c index a7e181b94af..0b7f36c66d7 100644 --- a/src/mame/video/tigeroad.c +++ b/src/mame/video/tigeroad.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino #include "emu.h" #include "includes/tigeroad.h" diff --git a/src/mame/video/trackfld.c b/src/mame/video/trackfld.c index 8ea6a3ac327..789009e5f5b 100644 --- a/src/mame/video/trackfld.c +++ b/src/mame/video/trackfld.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/video/tsamurai.c b/src/mame/video/tsamurai.c index 3b34fc4bece..8cc38f9d8f3 100644 --- a/src/mame/video/tsamurai.c +++ b/src/mame/video/tsamurai.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* ** Video Driver for Taito Samurai (1985) diff --git a/src/mame/video/tunhunt.c b/src/mame/video/tunhunt.c index 218849e9f6c..595edd7d277 100644 --- a/src/mame/video/tunhunt.c +++ b/src/mame/video/tunhunt.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Phil Stroffolino, Owen Rubin,David Haywood +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino, David Haywood /************************************************************************* Atari Tunnel Hunt hardware diff --git a/src/mame/video/twin16.c b/src/mame/video/twin16.c index 9c9d903ebde..464bf85d8cd 100644 --- a/src/mame/video/twin16.c +++ b/src/mame/video/twin16.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino /* diff --git a/src/mame/video/ultratnk.c b/src/mame/video/ultratnk.c index 5efbf1a4677..bf552ecce03 100644 --- a/src/mame/video/ultratnk.c +++ b/src/mame/video/ultratnk.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Stefan Jokisch /*************************************************************************** diff --git a/src/mame/video/vicdual.c b/src/mame/video/vicdual.c index 58e38a6cd6b..1f955565e1b 100644 --- a/src/mame/video/vicdual.c +++ b/src/mame/video/vicdual.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/warpwarp.c b/src/mame/video/warpwarp.c index 09a3b089bf0..ada74e22dab 100644 --- a/src/mame/video/warpwarp.c +++ b/src/mame/video/warpwarp.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Chris Hardy /*************************************************************************** diff --git a/src/mame/video/wiz.c b/src/mame/video/wiz.c index 79d8b426ede..8758bb609fc 100644 --- a/src/mame/video/wiz.c +++ b/src/mame/video/wiz.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/video/xxmissio.c b/src/mame/video/xxmissio.c index 0ddf6813887..5633c7dc40f 100644 --- a/src/mame/video/xxmissio.c +++ b/src/mame/video/xxmissio.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Uki /******************************************************************************* diff --git a/src/mame/video/zodiack.c b/src/mame/video/zodiack.c index 989405a9c2d..4727597f3db 100644 --- a/src/mame/video/zodiack.c +++ b/src/mame/video/zodiack.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Zsolt Vasvari /*************************************************************************** diff --git a/src/mess/audio/dai_snd.c b/src/mess/audio/dai_snd.c index 0b9775765a1..ae0bf3c79c3 100644 --- a/src/mess/audio/dai_snd.c +++ b/src/mess/audio/dai_snd.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /*************************************************************************** diff --git a/src/mess/audio/dai_snd.h b/src/mess/audio/dai_snd.h index b7c9d5e89b6..c1e5ae598e7 100644 --- a/src/mess/audio/dai_snd.h +++ b/src/mess/audio/dai_snd.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /***************************************************************************** * diff --git a/src/mess/audio/dave.c b/src/mess/audio/dave.c index bf3c2745016..4adae892e16 100644 --- a/src/mess/audio/dave.c +++ b/src/mess/audio/dave.c @@ -4,9 +4,6 @@ Intelligent Designs DAVE emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "dave.h" diff --git a/src/mess/audio/dave.h b/src/mess/audio/dave.h index 6c3dc24db4f..9bab709bd62 100644 --- a/src/mess/audio/dave.h +++ b/src/mess/audio/dave.h @@ -4,9 +4,6 @@ Intelligent Designs DAVE emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/mess/drivers/ace.c b/src/mess/drivers/ace.c index cf956d69801..b1416ff675b 100644 --- a/src/mess/drivers/ace.c +++ b/src/mess/drivers/ace.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder, Robbbert, and unknown others +// copyright-holders:Curt Coder, Robbbert /*************************************************************************** Jupiter Ace memory map diff --git a/src/mess/drivers/camplynx.c b/src/mess/drivers/camplynx.c index 144c45d8c3b..84822d66fd0 100644 --- a/src/mess/drivers/camplynx.c +++ b/src/mess/drivers/camplynx.c @@ -95,6 +95,7 @@ #include "sound/dac.h" #include "imagedev/cassette.h" #include "sound/wave.h" +#include "formats/camplynx_cas.h" class camplynx_state : public driver_device { @@ -573,6 +574,7 @@ static MACHINE_CONFIG_START( lynx48k, camplynx_state ) MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx48k_update_row) MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(lynx48k_cassette_formats) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED) //MCFG_CASSETTE_INTERFACE("camplynx_cass") MACHINE_CONFIG_END @@ -611,6 +613,7 @@ static MACHINE_CONFIG_START( lynx128k, camplynx_state ) MCFG_MC6845_OUT_HSYNC_CB(WRITE8(camplynx_state, lynx128k_irq)) MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(lynx128k_cassette_formats) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED) //MCFG_CASSETTE_INTERFACE("camplynx_cass") MACHINE_CONFIG_END diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c index 23f62221c77..9771f744502 100644 --- a/src/mess/drivers/cgenie.c +++ b/src/mess/drivers/cgenie.c @@ -1,505 +1,480 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods +// license:GPL-2.0+ +// copyright-holders:Dirk Best /*************************************************************************** -HAD to change the PORT_ANALOG defs in this file... please check ;-) - -Colour Genie memory map - -CPU #1: -0000-3fff ROM basic & bios R D0-D7 - -4000-bfff RAM -c000-dfff ROM dos R D0-D7 -e000-efff ROM extra R D0-D7 -f000-f3ff color ram W/R D0-D3 -f400-f7ff font ram W/R D0-D7 -f800-f8ff keyboard matrix R D0-D7 -ffe0-ffe3 floppy motor W D0-D2 - floppy head select W D3 -ffec-ffef FDC WD179x R/W D0-D7 - ffec command W - ffec status R - ffed track R/W - ffee sector R/W - ffef data R/W - -Interrupts: -IRQ mode 1 -NMI + + EACA Colour Genie EG2000 + + TODO: + - System is too fast, there should be one wait cycle every five cycles? + - What's the exact MC6845 type? It can't be H46505 + - Adjust visible area so that the borders aren't that large (needs + MC6845 changes) + - Verify BASIC and character set versions + ***************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" -#include "includes/cgenie.h" -#include "imagedev/flopdrv.h" -#include "formats/basicdsk.h" -#include "imagedev/cassette.h" +#include "machine/ram.h" +#include "video/mc6845.h" #include "sound/ay8910.h" -#include "sound/dac.h" +#include "imagedev/cassette.h" #include "formats/cgen_cas.h" -#include "machine/ram.h" -#include "bus/cgenie/expansion.h" +#include "bus/rs232/rs232.h" +#include "bus/cgenie/expansion/expansion.h" +#include "bus/cgenie/parallel/parallel.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class cgenie_state : public driver_device +{ +public: + cgenie_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_cassette(*this, "cassette"), + m_ram(*this, RAM_TAG), + m_crtc(*this, "crtc"), + m_rs232(*this, "rs232"), + m_exp(*this, "exp"), + m_char_rom(*this, "gfx1"), + m_color_ram(*this, "colorram"), + m_font_ram(*this, "fontram"), + m_keyboard(*this, "KEY"), + m_palette(NULL), + m_control(0xff), + m_rs232_rx(1), + m_rs232_dcd(1) + {} + + DECLARE_DRIVER_INIT(cgenie_eu); + DECLARE_DRIVER_INIT(cgenie_nz); + + MC6845_BEGIN_UPDATE(crtc_begin_update); + MC6845_UPDATE_ROW(crtc_update_row); + + // 4-bit color ram + DECLARE_READ8_MEMBER(colorram_r); + DECLARE_WRITE8_MEMBER(colorram_w); + + // control port + DECLARE_WRITE8_MEMBER(control_w); + DECLARE_READ8_MEMBER(control_r); + + DECLARE_READ8_MEMBER(keyboard_r); + DECLARE_INPUT_CHANGED_MEMBER(rst_callback); + + DECLARE_WRITE_LINE_MEMBER(rs232_rx_w); + DECLARE_WRITE_LINE_MEMBER(rs232_dcd_w); + +protected: + virtual void machine_start(); + +private: + required_device<cpu_device> m_maincpu; + required_device<cassette_image_device> m_cassette; + required_device<ram_device> m_ram; + required_device<mc6845_1_device> m_crtc; + required_device<rs232_port_device> m_rs232; + required_device<expansion_slot_device> m_exp; + required_memory_region m_char_rom; + required_shared_ptr<UINT8> m_color_ram; + required_shared_ptr<UINT8> m_font_ram; + required_ioport_array<8> m_keyboard; + + static const rgb_t m_palette_bg[]; + static const rgb_t m_palette_eu[]; + static const rgb_t m_palette_nz[]; + + const rgb_t *m_palette; + rgb_t m_background_color; + + UINT8 m_control; + + int m_rs232_rx; + int m_rs232_dcd; +}; + + +//************************************************************************** +// ADDRESS MAPS +//************************************************************************** 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(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(0xffe0, 0xffe3) AM_READ(cgenie_irq_status_r) +// AM_RANGE(0x4000, 0xbfff) AM_RAM // set up in machine_start + AM_RANGE(0xc000, 0xefff) AM_NOP // cartridge space + AM_RANGE(0xf000, 0xf3ff) AM_READWRITE(colorram_r, colorram_w ) AM_SHARE("colorram") + AM_RANGE(0xf400, 0xf7ff) AM_RAM AM_SHARE("fontram") + AM_RANGE(0xf800, 0xf8ff) AM_MIRROR(0x300) AM_READ(keyboard_r) + AM_RANGE(0xfc00, 0xffff) AM_NOP // cartridge space ADDRESS_MAP_END 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(0xf8, 0xf8) AM_DEVWRITE("ay8910", ay8910_device, address_w) AM_RANGE(0xf9, 0xf9) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) - AM_RANGE(0xfa, 0xfa) AM_READWRITE(cgenie_index_r, cgenie_index_w ) - AM_RANGE(0xfb, 0xfb) AM_READWRITE(cgenie_register_r, cgenie_register_w ) - AM_RANGE(0xff, 0xff) AM_READWRITE(cgenie_port_ff_r, cgenie_port_ff_w ) + AM_RANGE(0xfa, 0xfa) AM_DEVWRITE("crtc", mc6845_1_device, address_w) + AM_RANGE(0xfb, 0xfb) AM_DEVREADWRITE("crtc", mc6845_1_device, register_r, register_w) + AM_RANGE(0xff, 0xff) AM_READWRITE(control_r, control_w) ADDRESS_MAP_END -static INPUT_PORTS_START( cgenie ) - PORT_START("DSW0") - 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(0xef, 0xef, IPT_UNUSED) - -/************************************************************************** - +-------------------------------+ +-------------------------------+ - | 0 1 2 3 4 5 6 7 | | 0 1 2 3 4 5 6 7 | -+--+---+---+---+---+---+---+---+---+ +--+---+---+---+---+---+---+---+---+ -|0 | @ | A | B | C | D | E | F | G | |0 | ` | a | b | c | d | e | f | g | -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|1 | H | I | J | K | L | M | N | O | |1 | h | i | j | k | l | m | n | o | -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|2 | P | Q | R | S | T | U | V | W | |2 | p | q | r | s | t | u | v | w | -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|3 | X | Y | Z | [ |F-1|F-2|F-3|F-4| |3 | x | y | z | { |F-5|F-6|F-7|F-8| -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|5 | 8 | 9 | : | ; | , | - | . | / | |5 | 8 | 9 | * | + | < | = | > | ? | -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|6 |ENT|CLR|BRK|UP |DN |LFT|RGT|SPC| |6 |ENT|CLR|BRK|UP |DN |LFT|RGT|SPC| -| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ -|7 |SHF|ALT|PUP|PDN|INS|DEL|CTL|END| |7 |SHF|ALT|PUP|PDN|INS|DEL|CTL|END| -+--+---+---+---+---+---+---+---+---+ +--+---+---+---+---+---+---+---+---+ -***************************************************************************/ - PORT_START("ROW0") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') - - PORT_START("ROW1") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') - - PORT_START("ROW2") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') - - PORT_START("ROW3") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("[ { (Not Connected)") PORT_CHAR('[') PORT_CHAR('{') - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR(UCHAR_MAMEKEY(F5)) - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CHAR(UCHAR_MAMEKEY(F6)) - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHAR(UCHAR_MAMEKEY(F7)) - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CHAR(UCHAR_MAMEKEY(F8)) - - PORT_START("ROW4") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') - - PORT_START("ROW5") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*') - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('-') PORT_CHAR('=') - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - - PORT_START("ROW6") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(UCHAR_MAMEKEY(F10)) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(UCHAR_MAMEKEY(ESC)) - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - - /* 2008-05 FP: Below we still miss a 'Lock' key, two 'Rst' keys (used in pair, they should restart the - system) and, I guess, two unused inputs (according to the user manual, there are no other keys on the - keyboard) */ - PORT_START("ROW7") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Mod Sel") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(F9)) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Unknown 1") - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Rpt") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F11)) - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(F12)) - PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("Unknown 2") - PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("Unknown 3") - PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("Unknown 4") - - PORT_START("JOY0") - PORT_BIT( 0xff, 0x60, IPT_AD_STICK_X) PORT_SENSITIVITY(40) PORT_KEYDELTA(0) PORT_MINMAX(0x00,0xcf ) PORT_PLAYER(1) - - PORT_START("JOY1") - PORT_BIT( 0xff, 0x60, IPT_AD_STICK_Y) PORT_SENSITIVITY(40) PORT_KEYDELTA(0) PORT_MINMAX(0x00,0xcf ) PORT_PLAYER(1) PORT_REVERSE - - PORT_START("JOY2") - PORT_BIT( 0xff, 0x60, IPT_AD_STICK_X) PORT_SENSITIVITY(40) PORT_KEYDELTA(0) PORT_MINMAX(0x00,0xcf ) PORT_PLAYER(2) - - PORT_START("JOY3") - PORT_BIT( 0xff, 0x60, IPT_AD_STICK_Y) PORT_SENSITIVITY(40) PORT_KEYDELTA(0) PORT_MINMAX(0x00,0xcf ) PORT_PLAYER(2) PORT_REVERSE - - /* Joystick Keypad */ - /* keypads were organized a 3 x 4 matrix and it looked */ - /* exactly like a our northern telephone numerical pads */ - /* The addressing was done with a single clear bit 0..6 */ - /* on i/o port A, while all other bits were set. */ - /* (e.g. 0xFE addresses keypad1 row 0, 0xEF keypad2 row 1) */ - - /* bit 0 1 2 3 */ - /* FE/F7 0 [3] [6] [9] [#] */ - /* FD/EF 1 [2] [5] [8] [0] */ - /* FB/DF 2 [1] [4] [7] [*] */ - - /* 2008-05 FP: temporarily I mapped these as follows: - - Joy 1 at Keypad - - Joy 2 at a Joystick buttons - A better mapping would be needed... - */ - - PORT_START("KP0") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [3]") PORT_CODE(KEYCODE_3_PAD) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [6]") PORT_CODE(KEYCODE_6_PAD) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [9]") PORT_CODE(KEYCODE_9_PAD) - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [#]") PORT_CODE(KEYCODE_SLASH_PAD) - - PORT_START("KP1") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [2]") PORT_CODE(KEYCODE_2_PAD) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [5]") PORT_CODE(KEYCODE_5_PAD) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [8]") PORT_CODE(KEYCODE_8_PAD) - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [0]") PORT_CODE(KEYCODE_0_PAD) - - PORT_START("KP2") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [1]") PORT_CODE(KEYCODE_1_PAD) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [4]") PORT_CODE(KEYCODE_4_PAD) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [7]") PORT_CODE(KEYCODE_7_PAD) - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 1 [*]") PORT_CODE(KEYCODE_ASTERISK) - - PORT_START("KP3") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [3]") PORT_CODE(JOYCODE_BUTTON2) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [6]") PORT_CODE(JOYCODE_BUTTON5) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [9]") - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [#]") PORT_CODE(JOYCODE_BUTTON1) - - PORT_START("KP4") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [2]") PORT_CODE(JOYCODE_BUTTON2) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [5]") PORT_CODE(JOYCODE_BUTTON5) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [8]") - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [0]") - - PORT_START("KP5") - PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [1]") PORT_CODE(JOYCODE_BUTTON1) - PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [4]") PORT_CODE(JOYCODE_BUTTON4) - PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [7]") - PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("Joy 2 [*]") PORT_CODE(JOYCODE_BUTTON1) +//************************************************************************** +// INPUTS +//************************************************************************** + +static INPUT_PORTS_START( cgenie ) + PORT_START("KEY.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + + PORT_START("KEY.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + + PORT_START("KEY.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + + PORT_START("KEY.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) // produces [ and { when pressed, not on keyboard + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR(UCHAR_MAMEKEY(F5)) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CHAR(UCHAR_MAMEKEY(F6)) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHAR(UCHAR_MAMEKEY(F7)) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CHAR(UCHAR_MAMEKEY(F8)) + + PORT_START("KEY.4") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') + + PORT_START("KEY.5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*') + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('-') PORT_CHAR('=') + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("KEY.6") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(UCHAR_MAMEKEY(F10)) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(UCHAR_MAMEKEY(ESC)) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + + PORT_START("KEY.7") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Mod Sel") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Rpt") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F11)) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(F12)) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L.P.") // marked as "L.P." in the manual, lightpen? + + PORT_START("RST") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_TAB) PORT_NAME("Rst") PORT_CHAR(9) PORT_CHANGED_MEMBER(DEVICE_SELF, cgenie_state, rst_callback, NULL) INPUT_PORTS_END -static const gfx_layout cgenie_charlayout = + +//************************************************************************** +// KEYBOARD +//************************************************************************** + +READ8_MEMBER( cgenie_state::keyboard_r ) { - 8,8, /* 8*8 characters */ - 384, /* 256 fixed + 128 defineable characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes; 1 bit per pixel */ - { 0, 1, 2, 3, 4, 5, 6, 7 }, /* x offsets */ - { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, - 8*8 /* every char takes 8 bytes */ -}; + int data = 0; -static const gfx_layout cgenie_gfxlayout = + for (int i = 0; i < 8; i++) + if (BIT(offset, i)) + data |= m_keyboard[i]->read(); + + return data; +} + +INPUT_CHANGED_MEMBER( cgenie_state::rst_callback ) { - 8,8, /* 4*8 characters */ - 256, /* 256 graphics patterns */ - 2, /* 2 bits per pixel */ - { 0, 1 }, /* two bitplanes; 2 bit per pixel */ - { 0, 0, 2, 2, 4, 4, 6, 6}, /* x offsets */ - { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, - 8*8 /* every char takes 8 bytes */ -}; + m_maincpu->set_input_line(INPUT_LINE_NMI, newval); +} -static GFXDECODE_START( cgenie ) - GFXDECODE_ENTRY( "gfx1", 0, cgenie_charlayout, 0, 3*16 ) - GFXDECODE_ENTRY( "gfx2", 0, cgenie_gfxlayout, 3*16*2, 3*4 ) -GFXDECODE_END - -static const unsigned char cgenie_colors[] = { - 0x00,0x00,0x00, /* background */ - 0x5e,0x5e,0x5e, /* gray */ - 0x11,0xff,0xea, /* cyan */ - 0xff,0x00,0x5e, /* red */ - 0xea,0xea,0xea, /* white */ - 0xff,0xf9,0x00, /* yellow */ - 0x6e,0xff,0x00, /* green */ - 0xff,0x52,0x00, /* orange */ - 0xea,0xff,0x00, /* light yellow */ - 0x02,0x48,0xff, /* blue */ - 0x8e,0xd4,0xff, /* light blue */ - 0xff,0x12,0xff, /* pink */ - 0x88,0x43,0xff, /* purple */ - 0x8c,0x8c,0x8c, /* light gray */ - 0x00,0xfb,0x8c, /* turquoise */ - 0xd2,0x00,0xff, /* magenta */ - 0xff,0xff,0xff, /* bright white */ - - -#if 0 - 0*4, 0*4, 0*4, /* background */ - -/* this is the 'RGB monitor' version, strong and clean */ - 15*4, 15*4, 15*4, /* gray */ - 0*4, 48*4, 48*4, /* cyan */ - 60*4, 0*4, 0*4, /* red */ - 47*4, 47*4, 47*4, /* white */ - 55*4, 55*4, 0*4, /* yellow */ - 0*4, 56*4, 0*4, /* green */ - 42*4, 32*4, 0*4, /* orange */ - 63*4, 63*4, 0*4, /* light yellow */ - 0*4, 0*4, 48*4, /* blue */ - 0*4, 24*4, 63*4, /* light blue */ - 60*4, 0*4, 38*4, /* pink */ - 38*4, 0*4, 60*4, /* purple */ - 31*4, 31*4, 31*4, /* light gray */ - 0*4, 63*4, 63*4, /* light cyan */ - 58*4, 0*4, 58*4, /* magenta */ - 63*4, 63*4, 63*4, /* bright white */ -#endif - -/* this is the 'TV screen' version, weak and blurred by repeating pixels */ - 15*2+80, 15*2+80, 15*2+80, /* gray */ - 0*2+80, 48*2+80, 48*2+80, /* cyan */ - 60*2+80, 0*2+80, 0*2+80, /* red */ - 47*2+80, 47*2+80, 47*2+80, /* white */ - 55*2+80, 55*2+80, 0*2+80, /* yellow */ - 0*2+80, 56*2+80, 0*2+80, /* green */ - 42*2+80, 32*2+80, 0*2+80, /* orange */ - 63*2+80, 63*2+80, 0*2+80, /* light yellow */ - 0*2+80, 0*2+80, 48*2+80, /* blue */ - 0*2+80, 24*2+80, 63*2+80, /* light blue */ - 60*2+80, 0*2+80, 38*2+80, /* pink */ - 38*2+80, 0*2+80, 60*2+80, /* purple */ - 31*2+80, 31*2+80, 31*2+80, /* light gray */ - 0*2+80, 63*2+80, 63*2+80, /* light cyan */ - 58*2+80, 0*2+80, 58*2+80, /* magenta */ - 63*2+80, 63*2+80, 63*2+80, /* bright white */ - - 15*2+96, 15*2+96, 15*2+96, /* gray */ - 0*2+96, 48*2+96, 48*2+96, /* cyan */ - 60*2+96, 0*2+96, 0*2+96, /* red */ - 47*2+96, 47*2+96, 47*2+96, /* white */ - 55*2+96, 55*2+96, 0*2+96, /* yellow */ - 0*2+96, 56*2+96, 0*2+96, /* green */ - 42*2+96, 32*2+96, 0*2+96, /* orange */ - 63*2+96, 63*2+96, 0*2+96, /* light yellow */ - 0*2+96, 0*2+96, 48*2+96, /* blue */ - 0*2+96, 24*2+96, 63*2+96, /* light blue */ - 60*2+96, 0*2+96, 38*2+96, /* pink */ - 38*2+96, 0*2+96, 60*2+96, /* purple */ - 31*2+96, 31*2+96, 31*2+96, /* light gray */ - 0*2+96, 63*2+96, 63*2+96, /* light cyan */ - 58*2+96, 0*2+96, 58*2+96, /* magenta */ - 63*2+96, 63*2+96, 63*2+96, /* bright white */ +//************************************************************************** +// CONTROL PORT & RS232 +//************************************************************************** -}; +WRITE8_MEMBER( cgenie_state::control_w ) +{ + // cassette output + m_cassette->output(BIT(data, 0) ? -1.0 : 1.0); -static const unsigned char cgenienz_colors[] = { - 0x00,0x00,0x00, /* background */ - 0xff,0xff,0xff, /* gray */ - 0x12,0xff,0xff, /* cyan */ - 0xff,0x6f,0xff, /* red */ - 0x31,0x77,0xff, /* white */ - 0xff,0xcb,0x00, /* yellow */ - 0x6e,0xff,0x00, /* green */ - 0xff,0x52,0x00, /* orange */ - 0x5e,0x5e,0x5e, /* light yellow */ - 0xea,0xea,0xea, /* blue */ - 0x00,0xff,0xdd, /* light blue */ - 0xd2,0x00,0xff, /* pink */ - 0x02,0x48,0xff, /* purple */ - 0xff,0xf9,0x00, /* light gray */ - 0x00,0xda,0x00, /* light cyan */ - 0xff,0x22,0x00, /* magenta */ - 0x00,0x00,0x00, /* bright white */ - - -/* this is the 'TV screen' version, weak and blurred by repeating pixels */ - 15*2+80, 15*2+80, 15*2+80, /* gray */ - 0*2+80, 48*2+80, 48*2+80, /* cyan */ - 60*2+80, 0*2+80, 0*2+80, /* red */ - 47*2+80, 47*2+80, 47*2+80, /* white */ - 55*2+80, 55*2+80, 0*2+80, /* yellow */ - 0*2+80, 56*2+80, 0*2+80, /* green */ - 42*2+80, 32*2+80, 0*2+80, /* orange */ - 63*2+80, 63*2+80, 0*2+80, /* light yellow */ - 0*2+80, 0*2+80, 48*2+80, /* blue */ - 0*2+80, 24*2+80, 63*2+80, /* light blue */ - 60*2+80, 0*2+80, 38*2+80, /* pink */ - 38*2+80, 0*2+80, 60*2+80, /* purple */ - 31*2+80, 31*2+80, 31*2+80, /* light gray */ - 0*2+80, 63*2+80, 63*2+80, /* light cyan */ - 58*2+80, 0*2+80, 58*2+80, /* magenta */ - 63*2+80, 63*2+80, 63*2+80, /* bright white */ - - 15*2+96, 15*2+96, 15*2+96, /* gray */ - 0*2+96, 48*2+96, 48*2+96, /* cyan */ - 60*2+96, 0*2+96, 0*2+96, /* red */ - 47*2+96, 47*2+96, 47*2+96, /* white */ - 55*2+96, 55*2+96, 0*2+96, /* yellow */ - 0*2+96, 56*2+96, 0*2+96, /* green */ - 42*2+96, 32*2+96, 0*2+96, /* orange */ - 63*2+96, 63*2+96, 0*2+96, /* light yellow */ - 0*2+96, 0*2+96, 48*2+96, /* blue */ - 0*2+96, 24*2+96, 63*2+96, /* light blue */ - 60*2+96, 0*2+96, 38*2+96, /* pink */ - 38*2+96, 0*2+96, 60*2+96, /* purple */ - 31*2+96, 31*2+96, 31*2+96, /* light gray */ - 0*2+96, 63*2+96, 63*2+96, /* light cyan */ - 58*2+96, 0*2+96, 58*2+96, /* magenta */ - 63*2+96, 63*2+96, 63*2+96, /* bright white */ + // serial output + m_rs232->write_txd(BIT(data, 1)); + // background color selection + if (BIT(data, 2)) + m_background_color = m_palette_bg[4]; + else + m_background_color = m_palette_bg[data >> 6 & 0x03]; -}; + // graphics/text mode switch + m_crtc->set_hpixels_per_column(BIT(data, 5) ? 4 : 8); -static const unsigned short cgenie_palette[] = + m_control = data; +} + +READ8_MEMBER( cgenie_state::control_r ) { - 0, 1, 0, 2, 0, 3, 0, 4, /* RGB monitor set of text colors */ - 0, 5, 0, 6, 0, 7, 0, 8, - 0, 9, 0,10, 0,11, 0,12, - 0,13, 0,14, 0,15, 0,16, - - 0,17, 0,18, 0,19, 0,20, /* TV set text colors: darker */ - 0,21, 0,22, 0,23, 0,24, - 0,25, 0,26, 0,27, 0,28, - 0,29, 0,30, 0,31, 0,32, - - 0,33, 0,34, 0,35, 0,36, /* TV set text colors: a bit brighter */ - 0,37, 0,38, 0,39, 0,40, - 0,41, 0,42, 0,43, 0,44, - 0,45, 0,46, 0,47, 0,48, - - 0, 9, 7, 6, /* RGB monitor graphics colors */ - 0, 25, 23, 22, /* TV set graphics colors: darker */ - 0, 41, 39, 38, /* TV set graphics colors: a bit brighter */ -}; + UINT8 data = 0; + + data |= m_cassette->input() > 0 ? 1 : 0; + data |= m_rs232_rx << 1; + data |= m_rs232_dcd << 2; + + return data; +} -/* Initialize the palette */ -PALETTE_INIT_MEMBER(cgenie_state,cgenie) +WRITE_LINE_MEMBER( cgenie_state::rs232_rx_w ) { - UINT8 i, r, g, b; + m_rs232_rx = state; +} - for ( i = 0; i < 49; i++ ) - { - r = cgenie_colors[i*3]; g = cgenie_colors[i*3+1]; b = cgenie_colors[i*3+2]; - palette.set_indirect_color(i, rgb_t(r, g, b)); - } +WRITE_LINE_MEMBER( cgenie_state::rs232_dcd_w ) +{ + m_rs232_dcd = state; +} - for(i=0; i<108; i++) - palette.set_pen_indirect(i, cgenie_palette[i]); + +//************************************************************************** +// DRIVER INIT +//************************************************************************** + +DRIVER_INIT_MEMBER( cgenie_state, cgenie_eu ) +{ + m_palette = &m_palette_eu[0]; } -PALETTE_INIT_MEMBER(cgenie_state,cgenienz) +DRIVER_INIT_MEMBER( cgenie_state, cgenie_nz ) { - UINT8 i, r, g, b; + m_palette = &m_palette_nz[0]; +} - for ( i = 0; i < 49; i++ ) +void cgenie_state::machine_start() +{ + // setup ram + m_maincpu->space(AS_PROGRAM).install_ram(0x4000, 0x4000 + m_ram->size() - 1, m_ram->pointer()); + + // setup expansion bus + m_exp->set_program_space(&m_maincpu->space(AS_PROGRAM)); + m_exp->set_io_space(&m_maincpu->space(AS_IO)); +} + + +//************************************************************************** +// VIDEO EMULATION +//************************************************************************** + +READ8_MEMBER( cgenie_state::colorram_r ) +{ + return m_color_ram[offset] | 0xf0; +} + +WRITE8_MEMBER( cgenie_state::colorram_w ) +{ + m_color_ram[offset] = data & 0x0f; +} + +MC6845_BEGIN_UPDATE( cgenie_state::crtc_begin_update ) +{ + bitmap.fill(m_background_color, cliprect); +} + +MC6845_UPDATE_ROW( cgenie_state::crtc_update_row ) +{ + // don't need to do anything in vblank + if (!de) + return; + + for (int column = 0; column < x_count; column++) { - r = cgenienz_colors[i*3]; g = cgenienz_colors[i*3+1]; b = cgenienz_colors[i*3+2]; - palette.set_indirect_color(i, rgb_t(r, g, b)); + UINT8 code = m_ram->pointer()[ma + column]; + UINT8 color = m_color_ram[(ma & 0xbff) + column]; + + // gfx mode? + if (BIT(m_control, 5)) + { + const rgb_t map[] = { m_background_color, m_palette[8], m_palette[6], m_palette[5] }; + + bitmap.pix32(y + vbp, column * 4 + hbp + 0) = map[code >> 6 & 0x03]; + bitmap.pix32(y + vbp, column * 4 + hbp + 1) = map[code >> 4 & 0x03]; + bitmap.pix32(y + vbp, column * 4 + hbp + 2) = map[code >> 2 & 0x03]; + bitmap.pix32(y + vbp, column * 4 + hbp + 3) = map[code >> 0 & 0x03]; + } + else + { + UINT8 gfx = 0; + + // cursor visible? + if (cursor_x == column) + gfx = 0xff; + + // or use character rom? + else if ((code < 128) || (code < 192 && BIT(m_control, 4)) || (code > 192 && BIT(m_control, 3))) + gfx = m_char_rom->base()[(code << 3) | ra]; + + // or the programmable characters? + else + gfx = m_font_ram[((code << 3) | ra) & 0x3ff]; + + // 8 pixel chars + for (int p = 0; p < 8; p++) + bitmap.pix32(y + vbp, column * 8 + hbp + p) = BIT(gfx, 7 - p) ? m_palette[color] : m_background_color; + } } - - for(i=0; i<108; i++) - palette.set_pen_indirect(i, cgenie_palette[i]); } -static MACHINE_CONFIG_START( cgenie_common, cgenie_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, XTAL_17_73447MHz/8) /* 2,2168 MHz */ +//************************************************************************** +// PALETTE +//************************************************************************** + +// how accurate are these colors? +const rgb_t cgenie_state::m_palette_bg[] = +{ + rgb_t::black, + rgb_t(0x70, 0x28, 0x20), // dark orange + rgb_t(0x28, 0x70, 0x20), // dark green + rgb_t(0x48, 0x48, 0x48), // dark gray + rgb_t(0x70, 0x00, 0x70) // dark purple +}; + +// european palette +const rgb_t cgenie_state::m_palette_eu[] = +{ + rgb_t(0x5e, 0x5e, 0x5e), // gray + rgb_t(0x11, 0xff, 0xea), // cyan + rgb_t(0xff, 0x00, 0x5e), // red + rgb_t(0xea, 0xea, 0xea), // white + rgb_t(0xff, 0xf9, 0x00), // yellow + rgb_t(0x6e, 0xff, 0x00), // green + rgb_t(0xff, 0x52, 0x00), // orange + rgb_t(0xea, 0xff, 0x00), // light yellow + rgb_t(0x02, 0x48, 0xff), // blue + rgb_t(0x8e, 0xd4, 0xff), // light blue + rgb_t(0xff, 0x12, 0xff), // pink + rgb_t(0x88, 0x43, 0xff), // purple + rgb_t(0x8c, 0x8c, 0x8c), // light gray + rgb_t(0x00, 0xfb, 0x8c), // turquoise + rgb_t(0xd2, 0x00, 0xff), // magenta + rgb_t::white // bright white +}; + +// new zealand palette +const rgb_t cgenie_state::m_palette_nz[] = +{ + rgb_t::white, + rgb_t(0x12, 0xff, 0xff), + rgb_t(0xff, 0x6f, 0xff), + rgb_t(0x31, 0x77, 0xff), + rgb_t(0xff, 0xcb, 0x00), + rgb_t(0x6e, 0xff, 0x00), + rgb_t(0xff, 0x52, 0x00), + rgb_t(0x5e, 0x5e, 0x5e), + rgb_t(0xea, 0xea, 0xea), + rgb_t(0x00, 0xff, 0xdd), + rgb_t(0xd2, 0x00, 0xff), + rgb_t(0x02, 0x48, 0xff), + rgb_t(0xff, 0xf9, 0x00), + rgb_t(0x00, 0xda, 0x00), + rgb_t(0xff, 0x22, 0x00), + rgb_t::black +}; + + +//************************************************************************** +// MACHINE DEFINTIONS +//************************************************************************** + +static MACHINE_CONFIG_START( cgenie, cgenie_state ) + // basic machine hardware + MCFG_CPU_ADD("maincpu", Z80, XTAL_17_73447MHz / 8) // 2.2168 MHz MCFG_CPU_PROGRAM_MAP(cgenie_mem) MCFG_CPU_IO_MAP(cgenie_io) - MCFG_CPU_VBLANK_INT_DRIVER("screen", cgenie_state, cgenie_frame_interrupt) - MCFG_CPU_PERIODIC_INT_DRIVER(cgenie_state, cgenie_timer_interrupt, 40) - MCFG_QUANTUM_TIME(attotime::from_hz(240)) - - /* 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, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1,0*8,32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(cgenie_state, screen_update_cgenie) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", cgenie ) - MCFG_PALETTE_ADD("palette", 108) - MCFG_PALETTE_INDIRECT_ENTRIES(49) + MCFG_SCREEN_RAW_PARAMS(XTAL_17_73447MHz / 2, 568, 32, 416, 312, 28, 284) + MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - // Actually the video is driven by an HD46505 clocked at XTAL_17_73447MHz/16 + MCFG_MC6845_ADD("crtc", MC6845_1, "screen", XTAL_17_73447MHz / 16) + MCFG_MC6845_SHOW_BORDER_AREA(true) + MCFG_MC6845_CHAR_WIDTH(8) + MCFG_MC6845_BEGIN_UPDATE_CB(cgenie_state, crtc_begin_update) + MCFG_MC6845_UPDATE_ROW_CB(cgenie_state, crtc_update_row) - /* sound hardware */ + // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("dac", DAC, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_ADD("ay8910", AY8910, XTAL_17_73447MHz/8) - MCFG_AY8910_PORT_A_READ_CB(READ8(cgenie_state, cgenie_psg_port_a_r)) - MCFG_AY8910_PORT_B_READ_CB(READ8(cgenie_state, cgenie_psg_port_b_r)) - MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(cgenie_state, cgenie_psg_port_a_w)) - MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(cgenie_state, cgenie_psg_port_b_w)) + MCFG_SOUND_ADD("ay8910", AY8910, XTAL_17_73447MHz / 8) + MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("par", parallel_slot_device, pa_r)) + MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("par", parallel_slot_device, pa_w)) + MCFG_AY8910_PORT_B_READ_CB(DEVREAD8("par", parallel_slot_device, pb_r)) + MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("par", parallel_slot_device, pb_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_FORMATS(cgenie_cassette_formats) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) MCFG_CASSETTE_INTERFACE("cgenie_cass") MCFG_SOFTWARE_LIST_ADD("cass_list", "cgenie_cass") + // serial port + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL) + MCFG_RS232_RXD_HANDLER(WRITELINE(cgenie_state, rs232_rx_w)) + MCFG_RS232_DCD_HANDLER(WRITELINE(cgenie_state, rs232_dcd_w)) + + // cartridge expansion slot MCFG_EXPANSION_SLOT_ADD("exp") - MCFG_EXPANSION_SLOT_INT_HANDLER(WRITELINE(cgenie_state, exp_intrq_w)) + MCFG_EXPANSION_SLOT_INT_HANDLER(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) + + // parallel slot + MCFG_PARALLEL_SLOT_ADD("par") // internal ram MCFG_RAM_ADD(RAM_TAG) @@ -507,48 +482,41 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state ) MCFG_RAM_EXTRA_OPTIONS("32K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( cgenie, cgenie_common ) - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_INIT_OWNER(cgenie_state, cgenie ) -MACHINE_CONFIG_END - -static MACHINE_CONFIG_DERIVED( cgenienz, cgenie_common ) - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_INIT_OWNER(cgenie_state, cgenienz ) -MACHINE_CONFIG_END -/*************************************************************************** - - Game driver(s) - -***************************************************************************/ +//************************************************************************** +// ROM DEFINITIONS +//************************************************************************** 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("cg_rom1.z1", 0x0000, 0x1000, CRC(d3369420) SHA1(fe7f06f8e2b648d695d4787d00a374d3e4ac5d39)) + ROM_LOAD("cg_rom2.z2", 0x1000, 0x1000, CRC(73d2c9ea) SHA1(343d595b4eeaea627f9c36d5cef3827c79593425)) + ROM_LOAD("cg_rom3.z3", 0x2000, 0x1000, CRC(3f358811) SHA1(6ba151759fd8fd367806cf2dd5f1dfc33ee9521f)) + ROM_LOAD("cg_rom4.z4", 0x3000, 0x1000, CRC(be235782) SHA1(d7d61208a9855ffd09ecb051618f5ed6a8816f3f)) + + ROM_REGION(0x0800, "gfx1", 0) + // this is a "german" character set with umlauts, is this official? + ROM_LOAD("cgenieg.fnt", 0x0000, 0x0800, CRC(c3e60d57) SHA1(fb96f608fdb47391145fdcd614a9c7a79756e6a4)) + // default character set ROM_LOAD("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff)) - - /* Empty memory region for the character generator */ - ROM_REGION(0x0800, "gfx2", ROMREGION_ERASEFF) ROM_END 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) ) + ROMX_LOAD("cgromv2.rom", 0x0000, 0x4000, CRC(cfb84e09) SHA1(e199e4429bab6f9fca2bb05e71324538928a693a), ROM_BIOS(2)) - ROM_REGION(0x0c00, "gfx1", 0) + ROM_REGION(0x0800, "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_END -/* 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) -COMP( 1982, cgenienz, cgenie, 0, cgenienz, cgenie, driver_device, 0, "EACA Computers Ltd", "Colour Genie EG2000 (New Zealand)" , 0) +//************************************************************************** +// SYSTEM DRIVERS +//************************************************************************** + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1982, cgenie, 0, 0, cgenie, cgenie, cgenie_state, cgenie_eu, "EACA", "Colour Genie EG2000", 0) +COMP( 1982, cgenienz, cgenie, 0, cgenie, cgenie, cgenie_state, cgenie_nz, "EACA", "Colour Genie EG2000 (New Zealand)", 0) diff --git a/src/mess/drivers/galaxy.c b/src/mess/drivers/galaxy.c index 07d22bc30f3..a8be2d524e0 100644 --- a/src/mess/drivers/galaxy.c +++ b/src/mess/drivers/galaxy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha, Miodrag Milanovic /*************************************************************************** Galaksija driver by Krzysztof Strzecha and Miodrag Milanovic diff --git a/src/mess/drivers/glasgow.c b/src/mess/drivers/glasgow.c index ffb39f95131..37a7ef3c792 100644 --- a/src/mess/drivers/glasgow.c +++ b/src/mess/drivers/glasgow.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Dirk V. +// license:BSD-3-Clause +// copyright-holders:Dirk V., Robbbert, Ralf Schaefer, Cowering /*************************************************************************** Mephisto Glasgow 3 S chess computer Dirk V. diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index f84077cb388..20c3ce7f42b 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -944,8 +944,8 @@ public: void tc4_state::prepare_display() { // R5,R7-R9 are 7segs - for (int y = 0; y < 10; y++) - if (y >= 5 && y <= 9 && y != 6) + for (int y = 5; y < 10; y++) + if (y != 6) m_display_segmask[y] = 0x7f; // update current state (note: R6 as extra column!) @@ -1140,9 +1140,9 @@ static INPUT_PORTS_START( ebball ) PORT_START("IN.0") // R1 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Change Up") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Change Sides") - PORT_CONFNAME( 0x04, 0x04, "Pitcher" ) - PORT_CONFSETTING( 0x04, "Auto" ) - PORT_CONFSETTING( 0x00, "Manual" ) + PORT_CONFNAME( 0x04, 0x04, "Players" ) + PORT_CONFSETTING( 0x04, "1" ) // Auto + PORT_CONFSETTING( 0x00, "2" ) // Manual PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.1") // R2 @@ -1272,9 +1272,9 @@ READ8_MEMBER(ebball2_state::read_k) static INPUT_PORTS_START( ebball2 ) PORT_START("IN.0") // R3 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_CONFNAME( 0x02, 0x02, "Pitcher" ) - PORT_CONFSETTING( 0x02, "Auto" ) - PORT_CONFSETTING( 0x00, "Manual" ) + PORT_CONFNAME( 0x02, 0x02, "Players" ) + PORT_CONFSETTING( 0x02, "1" ) // Auto + PORT_CONFSETTING( 0x00, "2" ) // Manual PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Fast Ball") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Batter") @@ -1361,7 +1361,7 @@ public: DECLARE_READ8_MEMBER(read_k); void set_clock(); - DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch); + DECLARE_INPUT_CHANGED_MEMBER(skill_switch); protected: virtual void machine_reset(); @@ -1444,19 +1444,19 @@ static INPUT_PORTS_START( ebball3 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("P2 Steal Defense") PORT_START("IN.2") // R2 - PORT_CONFNAME( 0x01, 0x01, "Pitcher" ) - PORT_CONFSETTING( 0x01, "Auto" ) - PORT_CONFSETTING( 0x00, "Manual" ) + PORT_CONFNAME( 0x01, 0x01, "Players" ) + PORT_CONFSETTING( 0x01, "1" ) // Auto + PORT_CONFSETTING( 0x00, "2" ) // Manual PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Bunt") PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.3") // fake - PORT_CONFNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, ebball3_state, difficulty_switch, NULL) + PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, ebball3_state, skill_switch, NULL) PORT_CONFSETTING( 0x00, "Amateur" ) PORT_CONFSETTING( 0x01, "Professional" ) INPUT_PORTS_END -INPUT_CHANGED_MEMBER(ebball3_state::difficulty_switch) +INPUT_CHANGED_MEMBER(ebball3_state::skill_switch) { set_clock(); } @@ -1525,7 +1525,7 @@ public: DECLARE_WRITE16_MEMBER(write_o); void set_clock(); - DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch); + DECLARE_INPUT_CHANGED_MEMBER(skill_switch); protected: virtual void machine_reset(); @@ -1567,12 +1567,12 @@ static INPUT_PORTS_START( einvader ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY - PORT_CONFNAME( 0x08, 0x00, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, einvader_state, difficulty_switch, NULL) + PORT_CONFNAME( 0x08, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, einvader_state, skill_switch, NULL) PORT_CONFSETTING( 0x00, "Amateur" ) PORT_CONFSETTING( 0x08, "Professional" ) INPUT_PORTS_END -INPUT_CHANGED_MEMBER(einvader_state::difficulty_switch) +INPUT_CHANGED_MEMBER(einvader_state::skill_switch) { set_clock(); } @@ -1619,7 +1619,7 @@ MACHINE_CONFIG_END Entex Color Football 4 * TMS1670 6009 MP7551 (die also labeled MP7551) - * 4 7seg LEDs, 60 red and green LEDs behind bezel, 1bit sound + * * 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1bit sound ***************************************************************************/ @@ -1640,10 +1640,21 @@ public: void efootb4_state::prepare_display() { + // R10-R15 are 7segs + for (int y = 10; y < 16; y++) + m_display_segmask[y] = 0x7f; + + display_matrix(7, 16, m_o, m_r); } WRITE16_MEMBER(efootb4_state::write_r) { + // R0-R4: input mux + m_inp_mux = data & 0x1f; + + // R0-R9: led select + m_r = data; + prepare_display(); } WRITE16_MEMBER(efootb4_state::write_o) @@ -1652,25 +1663,58 @@ WRITE16_MEMBER(efootb4_state::write_o) m_speaker->level_w(data >> 7 & 1); // O0-O6: led state - m_o = data & 0x7f; + m_o = data; prepare_display(); } READ8_MEMBER(efootb4_state::read_k) { - return 0; + return read_inputs(5); } // config static INPUT_PORTS_START( efootb4 ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Run") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pass") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Kick") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Run") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Pass") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Kick") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.4") // R4 + PORT_CONFNAME( 0x01, 0x01, "Players" ) + PORT_CONFSETTING( 0x01, "1" ) // Auto + PORT_CONFSETTING( 0x00, "2" ) // Manual + PORT_CONFNAME( 0x02, 0x00, "Skill Level" ) + PORT_CONFSETTING( 0x00, "Amateur" ) + PORT_CONFSETTING( 0x02, "Professional" ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Status") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END static MACHINE_CONFIG_START( efootb4, efootb4_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1670, 400000) // RC osc. R=42K, C=47pf -> ~000kHz + MCFG_CPU_ADD("maincpu", TMS1670, 475000) // approximation - RC osc. R=42K, C=47pf, but unknown RC curve MCFG_TMS1XXX_READ_K_CB(READ8(efootb4_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(efootb4_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(efootb4_state, write_o)) @@ -1716,35 +1760,75 @@ public: void ebaskb2_state::prepare_display() { + // R0-R3 are 7segs + for (int y = 0; y < 4; y++) + m_display_segmask[y] = 0x7f; + + display_matrix(7, 10, m_o, m_r); } WRITE16_MEMBER(ebaskb2_state::write_r) { + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); + + // R6-R9: input mux + m_inp_mux = data >> 6 & 0xf; + + // R0-R9: led select + m_r = data; + prepare_display(); } WRITE16_MEMBER(ebaskb2_state::write_o) { // O0-O6: led state // O7: N/C - m_o = data & 0x7f; + m_o = data; prepare_display(); } READ8_MEMBER(ebaskb2_state::read_k) { - return 0; + return read_inputs(4); } // config static INPUT_PORTS_START( ebaskb2 ) + PORT_START("IN.0") // R6 + PORT_CONFNAME( 0x01, 0x01, "Skill Level" ) + PORT_CONFSETTING( 0x01, "Amateur" ) + PORT_CONFSETTING( 0x00, "Professional" ) + PORT_CONFNAME( 0x02, 0x02, "Players" ) + PORT_CONFSETTING( 0x02, "1" ) // Auto + PORT_CONFSETTING( 0x00, "2" ) // Manual + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Shoot") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pass") + + PORT_START("IN.1") // R7 + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Pass") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Shoot") + + PORT_START("IN.2") // R8 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY + + PORT_START("IN.3") // R9 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY INPUT_PORTS_END static MACHINE_CONFIG_START( ebaskb2, ebaskb2_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 400000) // RC osc. R=33K, C=82pf -> ~000kHz + MCFG_CPU_ADD("maincpu", TMS1100, 360000) // RC osc. R=33K, C=82pf -> ~360kHz MCFG_TMS1XXX_READ_K_CB(READ8(ebaskb2_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebaskb2_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebaskb2_state, write_o)) diff --git a/src/mess/drivers/hp9k.c b/src/mess/drivers/hp9k.c index dcf426150dd..bb504315408 100644 --- a/src/mess/drivers/hp9k.c +++ b/src/mess/drivers/hp9k.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:friol, F. Ulivi +// copyright-holders:Gabriele D'Antona, F. Ulivi /*************************************************************************** diff --git a/src/mess/drivers/lviv.c b/src/mess/drivers/lviv.c index ad3643c4e63..1861e026e71 100644 --- a/src/mess/drivers/lviv.c +++ b/src/mess/drivers/lviv.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /******************************************************************************* diff --git a/src/mess/drivers/mephisto.c b/src/mess/drivers/mephisto.c index 65c42df57a6..55418ce1503 100644 --- a/src/mess/drivers/mephisto.c +++ b/src/mess/drivers/mephisto.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Dirk V. +// license:BSD-3-Clause +// copyright-holders:Dirk V., Cowering /****************************************************************************** Mephisto 4 + 5 Chess Computer 2007 Dirk V. diff --git a/src/mess/drivers/mmodular.c b/src/mess/drivers/mmodular.c index 5fbc273ac6b..518f8d741a0 100644 --- a/src/mess/drivers/mmodular.c +++ b/src/mess/drivers/mmodular.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ralf Schaefer +// license:BSD-3-Clause +// copyright-holders:Ralf Schaefer, Cowering /****************************************************************************** Mephisto Chess Computers using plugin modules diff --git a/src/mess/drivers/pmd85.c b/src/mess/drivers/pmd85.c index 42dc77abab2..a41910f5067 100644 --- a/src/mess/drivers/pmd85.c +++ b/src/mess/drivers/pmd85.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /******************************************************************************* diff --git a/src/mess/drivers/primo.c b/src/mess/drivers/primo.c index 09341398c78..506ddd91264 100644 --- a/src/mess/drivers/primo.c +++ b/src/mess/drivers/primo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /******************************************************************************* diff --git a/src/mess/drivers/rm380z.c b/src/mess/drivers/rm380z.c index 5ec4ba53d21..2765039f172 100644 --- a/src/mess/drivers/rm380z.c +++ b/src/mess/drivers/rm380z.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol,friol +// copyright-holders:Wilbert Pol,Gabriele D'Antona /* Research Machines 380Z (aka "RML 380Z" or "RM 380Z") diff --git a/src/mess/drivers/socrates.c b/src/mess/drivers/socrates.c index 725635e955d..fbc619e5023 100644 --- a/src/mess/drivers/socrates.c +++ b/src/mess/drivers/socrates.c @@ -7,27 +7,6 @@ * with dumping help from Kevin 'kevtris' Horton * * -* This source file is dual-licensed under the following licenses: -* 1. The MAME license as of September 2013 -* 2. The GNU LGPLv2.1: -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2.1 of the License, or (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Please contact the author if you require other licensing. -* -* TODO: * The speech chip is a Toshiba tc8802AF (which is pin and speech compatible with the older Toshiba t6803, but adds vsm rom read mode and diff --git a/src/mess/drivers/supercon.c b/src/mess/drivers/supercon.c index afafe137924..7dfc8d01319 100644 --- a/src/mess/drivers/supercon.c +++ b/src/mess/drivers/supercon.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ralf Schaefer +// license:BSD-3-Clause +// copyright-holders:Ralf Schaefer, Robbbert /****************************************************************************** Novag SuperConstellation Chess Computer 2010 R. Schaefer diff --git a/src/mess/drivers/ti85.c b/src/mess/drivers/ti85.c index 6f6a7e98e1c..aec5b91ce18 100644 --- a/src/mess/drivers/ti85.c +++ b/src/mess/drivers/ti85.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha,Jon Sturm /*************************************************************************** TI-85 and TI-86 drivers by Krzysztof Strzecha diff --git a/src/mess/includes/ace.h b/src/mess/includes/ace.h index af458d7fe8c..8e8d77cf683 100644 --- a/src/mess/includes/ace.h +++ b/src/mess/includes/ace.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder, Robbbert, and unknown others +// copyright-holders:Curt Coder, Robbbert /***************************************************************************** * * includes/ace.h diff --git a/src/mess/includes/apollo.h b/src/mess/includes/apollo.h index 683e3017e7b..41b0f04e6ff 100644 --- a/src/mess/includes/apollo.h +++ b/src/mess/includes/apollo.h @@ -6,9 +6,6 @@ * Created on: May 12, 2010 * Author: Hans Ostermeyer * - * Released for general non-commercial use under the MAME license - * Visit http://mamedev.org for licensing and usage restrictions. - * */ #pragma once diff --git a/src/mess/includes/cgenie.h b/src/mess/includes/cgenie.h deleted file mode 100644 index 07c72e2b57e..00000000000 --- a/src/mess/includes/cgenie.h +++ /dev/null @@ -1,139 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/***************************************************************************** - * - * includes/cgenie.h - * - ****************************************************************************/ - -#ifndef CGENIE_H_ -#define CGENIE_H_ - -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "sound/ay8910.h" -#include "bus/cgenie/expansion.h" - -// CRTC 6845 -struct CRTC6845 -{ - UINT8 cursor_address_lo; - UINT8 cursor_address_hi; - UINT8 screen_address_lo; - UINT8 screen_address_hi; - UINT8 cursor_bottom; - UINT8 cursor_top; - UINT8 scan_lines; - UINT8 crt_mode; - UINT8 vertical_sync_pos; - UINT8 vertical_displayed; - UINT8 vertical_adjust; - UINT8 vertical_total; - UINT8 horizontal_length; - UINT8 horizontal_sync_pos; - UINT8 horizontal_displayed; - UINT8 horizontal_total; - UINT8 idx; - UINT8 cursor_visible; - UINT8 cursor_phase; -}; - - -class cgenie_state : public driver_device -{ -public: - cgenie_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_colorram(*this, "colorram"), - m_fontram(*this, "fontram"), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_ay8910(*this, "ay8910"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_screen(*this, "screen"), - m_exp(*this, "exp") - { - } - - required_shared_ptr<UINT8> m_colorram; - required_shared_ptr<UINT8> m_fontram; - - UINT8 *m_videoram; - int m_tv_mode; - int m_font_offset[4]; - int m_port_ff; - UINT8 m_irq_status; - UINT8 m_cass_level; - UINT8 m_cass_bit; - UINT8 m_psg_a_out; - UINT8 m_psg_b_out; - UINT8 m_psg_a_inp; - UINT8 m_psg_b_inp; - UINT8 m_control_port; - CRTC6845 m_crt; - int m_graphics; - bitmap_ind16 m_bitmap; - bitmap_ind16 m_dlybitmap; - int m_off_x; - int m_off_y; - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(cgenie); - DECLARE_PALETTE_INIT(cgenienz); - UINT32 screen_update_cgenie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(cgenie_timer_interrupt); - INTERRUPT_GEN_MEMBER(cgenie_frame_interrupt); - TIMER_CALLBACK_MEMBER(handle_cassette_input); - - 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<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); - void cgenie_mode_select(int mode); - void cgenie_refresh_monitor(bitmap_ind16 &bitmap, const rectangle &cliprect); - void cgenie_refresh_tv_set(bitmap_ind16 &bitmap, const rectangle &cliprect); - int cgenie_port_xx_r( int offset ); - int cgenie_videoram_r( int offset ); - - DECLARE_READ8_MEMBER( cgenie_psg_port_a_r ); - DECLARE_READ8_MEMBER( cgenie_psg_port_b_r ); - DECLARE_WRITE8_MEMBER( cgenie_psg_port_a_w ); - DECLARE_WRITE8_MEMBER( cgenie_psg_port_b_w ); - - DECLARE_READ8_MEMBER( cgenie_colorram_r ); - DECLARE_READ8_MEMBER( cgenie_fontram_r ); - - DECLARE_WRITE8_MEMBER( cgenie_colorram_w ); - DECLARE_WRITE8_MEMBER( cgenie_fontram_w ); - - DECLARE_WRITE8_MEMBER( cgenie_port_ff_w ); - DECLARE_READ8_MEMBER( cgenie_port_ff_r ); - - DECLARE_READ8_MEMBER( cgenie_irq_status_r ); - - DECLARE_READ8_MEMBER( cgenie_keyboard_r ); - DECLARE_WRITE8_MEMBER( cgenie_videoram_w ); - - - DECLARE_READ8_MEMBER( cgenie_index_r ); - DECLARE_READ8_MEMBER( cgenie_register_r ); - - DECLARE_WRITE8_MEMBER( cgenie_index_w ); - DECLARE_WRITE8_MEMBER( cgenie_register_w ); -}; - -#endif /* CGENIE_H_ */ diff --git a/src/mess/includes/galaxy.h b/src/mess/includes/galaxy.h index af377b26b19..a115eb146f1 100644 --- a/src/mess/includes/galaxy.h +++ b/src/mess/includes/galaxy.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha, Miodrag Milanovic /***************************************************************************** * diff --git a/src/mess/includes/lviv.h b/src/mess/includes/lviv.h index 680cf1f1d6d..363948263e2 100644 --- a/src/mess/includes/lviv.h +++ b/src/mess/includes/lviv.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /***************************************************************************** * diff --git a/src/mess/includes/mboard.h b/src/mess/includes/mboard.h index 3238a231f98..c06a1db95d2 100644 --- a/src/mess/includes/mboard.h +++ b/src/mess/includes/mboard.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ralf Schaefer +// license:BSD-3-Clause +// copyright-holders:Ralf Schaefer, Cowering /********************************************************************** Mephisto Chess Computers diff --git a/src/mess/includes/pmd85.h b/src/mess/includes/pmd85.h index bc7fb76f15d..46ec61a52d9 100644 --- a/src/mess/includes/pmd85.h +++ b/src/mess/includes/pmd85.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /***************************************************************************** * diff --git a/src/mess/includes/primo.h b/src/mess/includes/primo.h index 0052703ebee..ef58558bc7f 100644 --- a/src/mess/includes/primo.h +++ b/src/mess/includes/primo.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /***************************************************************************** * diff --git a/src/mess/includes/rm380z.h b/src/mess/includes/rm380z.h index c4e6d7c3f04..394446daeca 100644 --- a/src/mess/includes/rm380z.h +++ b/src/mess/includes/rm380z.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol,friol +// copyright-holders:Wilbert Pol,Gabriele D'Antona /* diff --git a/src/mess/includes/ti85.h b/src/mess/includes/ti85.h index b8e4793e9c3..d77433eaf21 100644 --- a/src/mess/includes/ti85.h +++ b/src/mess/includes/ti85.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha,Jon Sturm /***************************************************************************** * diff --git a/src/mess/includes/x1.h b/src/mess/includes/x1.h index b2a0dd530ce..63ff63321b9 100644 --- a/src/mess/includes/x1.h +++ b/src/mess/includes/x1.h @@ -95,68 +95,115 @@ public: required_device<mc6845_device> m_crtc; required_device<z80ctc_device> m_ctc; - UINT8 *m_tvram; - UINT8 *m_avram; - UINT8 *m_kvram; - UINT8 *m_ipl_rom; - UINT8 *m_work_ram; - UINT8 *m_emm_ram; - UINT8 *m_pcg_ram; - UINT8 *m_cg_rom; - UINT8 *m_kanji_rom; - int m_xstart,m_ystart; - UINT8 m_hres_320; - UINT8 m_io_switch; - UINT8 m_io_sys; - UINT8 m_vsync; - UINT8 m_vdisp; - UINT8 m_io_bank_mode; - UINT8 *m_gfx_bitmap_ram; - UINT8 m_pcg_reset; - UINT8 m_sub_obf; - UINT8 m_ctc_irq_flag; - scrn_reg_t m_scrn_reg; - turbo_reg_t m_turbo_reg; - x1_rtc_t m_rtc; - emu_timer *m_rtc_timer; - UINT8 m_pcg_write_addr; - UINT8 m_sub_cmd; - UINT8 m_sub_cmd_length; - UINT8 m_sub_val[8]; - int m_sub_val_ptr; - int m_key_i; - UINT8 m_irq_vector; - UINT8 m_cmt_current_cmd; - UINT8 m_cmt_test; - UINT8 m_rom_index[3]; - UINT32 m_kanji_offset; - UINT8 m_bios_offset; - UINT8 m_x_b; - UINT8 m_x_g; - UINT8 m_x_r; - UINT16 m_kanji_addr_latch; - UINT32 m_kanji_addr; - UINT8 m_kanji_eksel; - UINT8 m_pcg_reset_occurred; - UINT32 m_old_key1; - UINT32 m_old_key2; - UINT32 m_old_key3; - UINT32 m_old_key4; - UINT32 m_old_fkey; - UINT8 m_key_irq_flag; - UINT8 m_key_irq_vector; - UINT32 m_emm_addr; - UINT8 *m_pal_4096; - UINT8 m_crtc_vreg[0x100],m_crtc_index; - UINT8 m_is_turbo; - UINT8 m_ex_bank; - UINT8 m_ram_bank; + UINT8 *m_tvram; /**< Pointer for Text Video RAM */ + UINT8 *m_avram; /**< Pointer for Attribute Video RAM */ + UINT8 *m_kvram; /**< Pointer for Extended Kanji Video RAM (X1 Turbo) */ + UINT8 *m_ipl_rom; /**< Pointer for IPL ROM */ + UINT8 *m_work_ram; /**< Pointer for base work RAM */ + UINT8 *m_emm_ram; /**< Pointer for EMM RAM */ + UINT8 *m_pcg_ram; /**< Pointer for PCG GFX RAM */ + UINT8 *m_cg_rom; /**< Pointer for GFX ROM */ + UINT8 *m_kanji_rom; /**< Pointer for Kanji ROMs */ + int m_xstart, /**< Start X offset for screen drawing. */ + m_ystart; /**< Start Y offset for screen drawing. */ + UINT8 m_hres_320; /**< Pixel clock divider setting: (1) 48 (0) 24 */ + UINT8 m_io_switch; /**< Enable access for special bitmap RMW phase in isolated i/o. */ + UINT8 m_io_sys; /**< Read-back for PPI port C */ + UINT8 m_vsync; /**< Screen V-Sync bit, active low */ + UINT8 m_vdisp; /**< Screen V-Disp bit, active high */ + UINT8 m_io_bank_mode; /**< Helper for special bitmap RMW phase. */ + UINT8 *m_gfx_bitmap_ram; /**< Pointer for bitmap layer RAM. */ + UINT8 m_pcg_reset; /**< @todo Unused variable. */ + UINT8 m_sub_obf; /**< MCU side: OBF flag active low, indicates that there are parameters in comm buffer. */ + UINT8 m_ctc_irq_flag; /**< @todo Unused variable. */ + scrn_reg_t m_scrn_reg; /**< Base Video Registers. */ + turbo_reg_t m_turbo_reg; /**< Turbo Z Video Registers. */ + x1_rtc_t m_rtc; /**< Struct for RTC related variables */ + emu_timer *m_rtc_timer; /**< Pointer for RTC timer. */ + UINT8 m_pcg_write_addr; /**< @todo Unused variable. */ + UINT8 m_sub_cmd; /**< MCU side: current command issued from Main to Sub. */ + UINT8 m_sub_cmd_length; /**< MCU side: number of parameters, in bytes. */ + UINT8 m_sub_val[8]; /**< MCU side: parameters buffer. */ + int m_sub_val_ptr; /**< MCU side: index for parameter read-back */ + int m_key_i; /**< MCU side: index for keyboard read-back during OBF phase. */ + UINT8 m_irq_vector; /**< @todo Unused variable. */ + UINT8 m_cmt_current_cmd; /**< MCU side: CMT command issued. */ + UINT8 m_cmt_test; /**< MCU side: Tape BREAK status bit. */ + UINT8 m_rom_index[3]; /**< Current ROM address. */ + UINT32 m_kanji_offset; /**< @todo Unused variable. */ + UINT8 m_bios_offset; /**< @todo Unused variable. */ + UINT8 m_x_b; /**< Palette Register for Blue Gun */ + UINT8 m_x_g; /**< Palette Register for Green Gun */ + UINT8 m_x_r; /**< Palette Register for Red Gun */ + UINT16 m_kanji_addr_latch; /**< Internal Kanji ROM address. */ + UINT32 m_kanji_addr; /**< Latched Kanji ROM address. */ + UINT8 m_kanji_eksel; /**< Kanji ROM register bit for latch phase. */ + UINT8 m_pcg_reset_occurred; /**< @todo Unused variable. */ + UINT32 m_old_key1; /**< Keyboard read buffer for i/o port "key1" */ + UINT32 m_old_key2; /**< Keyboard read buffer for i/o port "key2" */ + UINT32 m_old_key3; /**< Keyboard read buffer for i/o port "key3" */ + UINT32 m_old_key4; /**< Keyboard read buffer for i/o port "tenkey" */ + UINT32 m_old_fkey; /**< Keyboard read buffer for i/o port "f_keys" */ + UINT8 m_key_irq_flag; /**< Keyboard IRQ pending. */ + UINT8 m_key_irq_vector; /**< Keyboard IRQ vector. */ + UINT32 m_emm_addr; /**< EMM RAM current address */ + UINT8 *m_pal_4096; /**< X1 Turbo Z: pointer for 4096 palette entries */ + UINT8 m_crtc_vreg[0x100], /**< CRTC register buffer. */ + m_crtc_index; /**< CRTC register index. */ + UINT8 m_is_turbo; /**< Machine type: (0) X1 Vanilla, (1) X1 Turbo */ + UINT8 m_ex_bank; /**< X1 Turbo Z: RAM bank register */ + UINT8 m_ram_bank; /**< Regular RAM bank for 0x0000-0x7fff memory window: (0) ROM/IPL (1) RAM */ + /** + @brief Refresh current bitmap palette. + */ void set_current_palette(); + /** + @brief Retrieves the current PCG address. + + @param width Number of currently setted up CRTC characters + @param y_char_size Number of scanlines per character. + @return Destination PCG address. + */ UINT16 get_pcg_addr(UINT16 width, UINT8 y_char_size); + /** + @brief X1 Turbo: Retrieves the current CHR ROM address in Hi-Speed Mode. + + @return Destination CHR address. + */ UINT16 check_chr_addr(); + /** + @brief X1 Turbo: Retrieves the current PCG ROM address in Hi-Speed Mode. + + @return Destination CHR address. + */ UINT16 check_pcg_addr(); + /** + @brief MCU side: retrieve keycode to game key conversion. + + @param port Address to convert. + @return The converted game key buffer + */ UINT8 get_game_key(UINT8 port); + /** + @brief MCU side: retrieve keyboard special key register. + + @return + x--- ---- TEN: Numpad, Function key, special input key + -x-- ---- KIN: Valid key + --x- ---- REP: Key repeat + ---x ---- GRAPH key ON + ---- x--- CAPS lock ON + ---- -x-- KANA lock ON + ---- --x- SHIFT ON + ---- ---x CTRL ON + */ UINT8 check_keyboard_shift(); + /** + @brief convert MAME input to raw scancode for keyboard. + + @return the converted scancode + @todo Unoptimized. + */ UINT16 check_keyboard_press(); DECLARE_READ8_MEMBER(x1_mem_r); diff --git a/src/mess/machine/apollo.c b/src/mess/machine/apollo.c index 32fca6df07d..568a9c08fc8 100644 --- a/src/mess/machine/apollo.c +++ b/src/mess/machine/apollo.c @@ -6,9 +6,6 @@ * Created on: Jan 20, 2011 * Author: Hans Ostermeyer * - * Released for general non-commercial use under the MAME license - * Visit http://mamedev.org for licensing and usage restrictions. - * * Contains: * - apollo_config.c - APOLLO DS3500 configuration * - apollo_csr.c - APOLLO DS3500 CPU Control and Status registers diff --git a/src/mess/machine/apollo_dbg.c b/src/mess/machine/apollo_dbg.c index 634cf513c41..7111526c17e 100644 --- a/src/mess/machine/apollo_dbg.c +++ b/src/mess/machine/apollo_dbg.c @@ -6,9 +6,6 @@ * Created on: Nov. 21, 2010 * Author: Hans Ostermeyer * - * Released for general non-commercial use under the MAME license - * Visit http://mamedev.org for licensing and usage restrictions. - * */ #define VERBOSE 1 diff --git a/src/mess/machine/apollo_kbd.c b/src/mess/machine/apollo_kbd.c index 80a298f3998..5dc6d468f7b 100644 --- a/src/mess/machine/apollo_kbd.c +++ b/src/mess/machine/apollo_kbd.c @@ -6,9 +6,6 @@ * Created on: Dec 27, 2010 * Author: Hans Ostermeyer * - * Released for general non-commercial use under the MAME license - * Visit http://mamedev.org for licensing and usage restrictions. - * * see also http://www.bitsavers.org/pdf/apollo/008778-03_DOMAIN_Series_3000_4000_Technical_Reference_Aug87.pdf * */ diff --git a/src/mess/machine/apollo_kbd.h b/src/mess/machine/apollo_kbd.h index eb4ac3991d9..151e753f916 100644 --- a/src/mess/machine/apollo_kbd.h +++ b/src/mess/machine/apollo_kbd.h @@ -6,9 +6,6 @@ * Created on: Dec 27, 2010 * Author: Hans Ostermeyer * - * Released for general non-commercial use under the MAME license - * Visit http://mamedev.org for licensing and usage restrictions. - * */ #pragma once diff --git a/src/mess/machine/apricotkb.c b/src/mess/machine/apricotkb.c index 9b37f7926aa..a2520442d3e 100644 --- a/src/mess/machine/apricotkb.c +++ b/src/mess/machine/apricotkb.c @@ -4,9 +4,6 @@ Apricot keyboard emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #include "apricotkb.h" diff --git a/src/mess/machine/apricotkb.h b/src/mess/machine/apricotkb.h index 00200bcacbe..b85dab77dcf 100644 --- a/src/mess/machine/apricotkb.h +++ b/src/mess/machine/apricotkb.h @@ -4,9 +4,6 @@ Apricot keyboard emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #pragma once diff --git a/src/mess/machine/cgenie.c b/src/mess/machine/cgenie.c deleted file mode 100644 index a71d5cbec00..00000000000 --- a/src/mess/machine/cgenie.c +++ /dev/null @@ -1,432 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - machine.c - - Functions to emulate general aspects of the machine - (RAM, ROM, interrupts, I/O ports) - -***************************************************************************/ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "includes/cgenie.h" -#include "imagedev/cassette.h" -#include "sound/dac.h" -#include "machine/ram.h" - -#define AYWriteReg(chip,port,value) \ - m_ay8910->address_w(space, 0,port); \ - m_ay8910->data_w(space, 0,value) - -#define TAPE_HEADER "Colour Genie - Virtual Tape File" - - - - -#define IRQ_TIMER 0x80 -#define IRQ_FDC 0x40 - - - -TIMER_CALLBACK_MEMBER(cgenie_state::handle_cassette_input) -{ - UINT8 new_level = ( (m_cassette->input()) > 0.0 ) ? 1 : 0; - - if ( new_level != m_cass_level ) - { - m_cass_level = new_level; - m_cass_bit ^= 1; - } -} - - -void cgenie_state::machine_reset() -{ - address_space &space = m_maincpu->space(AS_PROGRAM); - UINT8 *ROM = memregion("maincpu")->base(); - - /* reset the AY8910 to be quiet, since the cgenie BIOS doesn't */ - AYWriteReg(0, 0, 0); - AYWriteReg(0, 1, 0); - AYWriteReg(0, 2, 0); - AYWriteReg(0, 3, 0); - AYWriteReg(0, 4, 0); - AYWriteReg(0, 5, 0); - AYWriteReg(0, 6, 0); - AYWriteReg(0, 7, 0x3f); - AYWriteReg(0, 8, 0); - AYWriteReg(0, 9, 0); - AYWriteReg(0, 10, 0); - - /* wipe out color RAM */ - memset(&ROM[0x0f000], 0x00, 0x0400); - - /* wipe out font RAM */ - memset(&ROM[0x0f400], 0xff, 0x0400); - - m_cass_level = 0; - m_cass_bit = 1; -} - -void cgenie_state::machine_start() -{ - address_space &space = m_maincpu->space(AS_PROGRAM); - UINT8 *gfx = memregion("gfx2")->base(); - int i; - - /* initialize static variables */ - m_irq_status = 0; - m_tv_mode = -1; - m_port_ff = 0xff; - - /* - * Every fifth cycle is a wait cycle, so I reduced - * the overlocking by one fitfth - * Underclocking causes the tape loading to not work. - */ -// cpunum_set_clockscale(machine(), 0, 0.80); - - /* Initialize some patterns to be displayed in graphics mode */ - for( i = 0; i < 256; i++ ) - memset(gfx + i * 8, i, 8); - - /* set up RAM */ - space.install_read_bank(0x4000, 0x4000 + m_ram->size() - 1, "bank1"); - space.install_write_handler(0x4000, 0x4000 + m_ram->size() - 1, write8_delegate(FUNC(cgenie_state::cgenie_videoram_w),this)); - 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)); -} - -/************************************* - * - * Port handlers. - * - *************************************/ - -/* used bits on port FF */ -#define FF_CAS 0x01 /* tape output signal */ -#define FF_BGD0 0x04 /* background color enable */ -#define FF_CHR1 0x08 /* charset 0xc0 - 0xff 1:fixed 0:defined */ -#define FF_CHR0 0x10 /* charset 0x80 - 0xbf 1:fixed 0:defined */ -#define FF_CHR (FF_CHR0 | FF_CHR1) -#define FF_FGR 0x20 /* 1: "hi" resolution graphics, 0: text mode */ -#define FF_BGD1 0x40 /* background color select 1 */ -#define FF_BGD2 0x80 /* background color select 2 */ -#define FF_BGD (FF_BGD0 | FF_BGD1 | FF_BGD2) - -WRITE8_MEMBER( cgenie_state::cgenie_port_ff_w ) -{ - int port_ff_changed = m_port_ff ^ data; - - m_cassette->output(data & 0x01 ? -1.0 : 1.0 ); - - /* background bits changed ? */ - if( port_ff_changed & FF_BGD ) - { - unsigned char r, g, b; - - if( data & FF_BGD0 ) - { - r = 112; - g = 0; - b = 112; - } - else - { - if( m_tv_mode == 0 ) - { - switch( data & (FF_BGD1 + FF_BGD2) ) - { - case FF_BGD1: - r = 112; - g = 40; - b = 32; - break; - case FF_BGD2: - r = 40; - g = 112; - b = 32; - break; - case FF_BGD1 + FF_BGD2: - r = 72; - g = 72; - b = 72; - break; - default: - r = 0; - g = 0; - b = 0; - break; - } - } - else - { - r = 15; - g = 15; - b = 15; - } - } - m_palette->set_pen_color(0, r, g, b); - } - - /* character mode changed ? */ - if( port_ff_changed & FF_CHR ) - { - m_font_offset[2] = (data & FF_CHR0) ? 0x00 : 0x80; - m_font_offset[3] = (data & FF_CHR1) ? 0x00 : 0x80; - } - - /* graphics mode changed ? */ - if( port_ff_changed & FF_FGR ) - { - cgenie_mode_select(data & FF_FGR); - } - - m_port_ff = data; -} - - -READ8_MEMBER( cgenie_state::cgenie_port_ff_r ) -{ - UINT8 data = m_port_ff & ~0x01; - - data |= m_cass_bit; - - return data; -} - -int cgenie_state::cgenie_port_xx_r( int offset ) -{ - return 0xff; -} - -/************************************* - * * - * Memory handlers * - * * - *************************************/ - - -READ8_MEMBER( cgenie_state::cgenie_psg_port_a_r ) -{ - return m_psg_a_inp; -} - -READ8_MEMBER( cgenie_state::cgenie_psg_port_b_r ) -{ - if( m_psg_a_out < 0xd0 ) - { - /* comparator value */ - m_psg_b_inp = 0x00; - - if( ioport("JOY0")->read() > m_psg_a_out ) - m_psg_b_inp |= 0x80; - - if( ioport("JOY1")->read() > m_psg_a_out ) - m_psg_b_inp |= 0x40; - - if( ioport("JOY2")->read() > m_psg_a_out ) - m_psg_b_inp |= 0x20; - - if( ioport("JOY3")->read() > m_psg_a_out ) - m_psg_b_inp |= 0x10; - } - else - { - /* read keypad matrix */ - m_psg_b_inp = 0xFF; - - if( !(m_psg_a_out & 0x01) ) - m_psg_b_inp &= ~ioport("KP0")->read(); - - if( !(m_psg_a_out & 0x02) ) - m_psg_b_inp &= ~ioport("KP1")->read(); - - if( !(m_psg_a_out & 0x04) ) - m_psg_b_inp &= ~ioport("KP2")->read(); - - if( !(m_psg_a_out & 0x08) ) - m_psg_b_inp &= ~ioport("KP3")->read(); - - if( !(m_psg_a_out & 0x10) ) - m_psg_b_inp &= ~ioport("KP4")->read(); - - if( !(m_psg_a_out & 0x20) ) - m_psg_b_inp &= ~ioport("KP5")->read(); - } - return m_psg_b_inp; -} - -WRITE8_MEMBER( cgenie_state::cgenie_psg_port_a_w ) -{ - m_psg_a_out = data; -} - -WRITE8_MEMBER( cgenie_state::cgenie_psg_port_b_w ) -{ - m_psg_b_out = data; -} - -READ8_MEMBER( cgenie_state::cgenie_irq_status_r ) -{ - int result = m_irq_status; - - m_irq_status &= ~(IRQ_TIMER); - return result; -} - -INTERRUPT_GEN_MEMBER(cgenie_state::cgenie_timer_interrupt) -{ - if( (m_irq_status & IRQ_TIMER) == 0 ) - { - m_irq_status |= IRQ_TIMER; - m_maincpu->set_input_line(0, HOLD_LINE); - } -} - -WRITE_LINE_MEMBER( cgenie_state::exp_intrq_w ) -{ - m_irq_status &= ~IRQ_FDC; - m_irq_status |= state << 6; - - if (m_irq_status) - m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); - else - m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); -} - - -/************************************* - * Keyboard * - *************************************/ -READ8_MEMBER( cgenie_state::cgenie_keyboard_r ) -{ - int result = 0; - - if( offset & 0x01 ) - result |= ioport("ROW0")->read(); - - if( offset & 0x02 ) - result |= ioport("ROW1")->read(); - - if( offset & 0x04 ) - result |= ioport("ROW2")->read(); - - if( offset & 0x08 ) - result |= ioport("ROW3")->read(); - - if( offset & 0x10 ) - result |= ioport("ROW4")->read(); - - if( offset & 0x20 ) - result |= ioport("ROW5")->read(); - - if( offset & 0x40 ) - result |= ioport("ROW6")->read(); - - if( offset & 0x80 ) - result |= ioport("ROW7")->read(); - - return result; -} - -/************************************* - * Video RAM * - *************************************/ - -int cgenie_state::cgenie_videoram_r( int offset ) -{ - UINT8 *videoram = m_videoram; - return videoram[offset]; -} - -WRITE8_MEMBER( cgenie_state::cgenie_videoram_w ) -{ - UINT8 *videoram = m_videoram; - /* write to video RAM */ - if( data == videoram[offset] ) - return; /* no change */ - videoram[offset] = data; -} - -READ8_MEMBER( cgenie_state::cgenie_colorram_r ) -{ - return m_colorram[offset] | 0xf0; -} - -WRITE8_MEMBER( cgenie_state::cgenie_colorram_w ) -{ - /* only bits 0 to 3 */ - data &= 15; - /* nothing changed ? */ - if( data == m_colorram[offset] ) - return; - - /* set new value */ - m_colorram[offset] = data; - /* make offset relative to video frame buffer offset */ - offset = (offset + (cgenie_get_register(12) << 8) + cgenie_get_register(13)) & 0x3ff; -} - -READ8_MEMBER( cgenie_state::cgenie_fontram_r ) -{ - return m_fontram[offset]; -} - -WRITE8_MEMBER( cgenie_state::cgenie_fontram_w ) -{ - UINT8 *dp; - - if( data == m_fontram[offset] ) - return; /* no change */ - - /* store data */ - m_fontram[offset] = data; - - /* convert eight pixels */ - dp = const_cast<UINT8 *>(m_gfxdecode->gfx(0)->get_data(256 + offset/8) + (offset % 8) * m_gfxdecode->gfx(0)->width()); - dp[0] = (data & 0x80) ? 1 : 0; - dp[1] = (data & 0x40) ? 1 : 0; - dp[2] = (data & 0x20) ? 1 : 0; - dp[3] = (data & 0x10) ? 1 : 0; - dp[4] = (data & 0x08) ? 1 : 0; - dp[5] = (data & 0x04) ? 1 : 0; - dp[6] = (data & 0x02) ? 1 : 0; - dp[7] = (data & 0x01) ? 1 : 0; -} - -/************************************* - * - * Interrupt handlers. - * - *************************************/ - -INTERRUPT_GEN_MEMBER(cgenie_state::cgenie_frame_interrupt) -{ - if( m_tv_mode != (ioport("DSW0")->read() & 0x10) ) - { - m_tv_mode = ioport("DSW0")->read() & 0x10; - /* force setting of background color */ - m_port_ff ^= FF_BGD0; - cgenie_port_ff_w(m_maincpu->space(AS_PROGRAM), 0, m_port_ff ^ FF_BGD0); - } -} - - -READ8_MEMBER(cgenie_state::cgenie_sh_control_port_r) -{ - return m_control_port; -} - -WRITE8_MEMBER(cgenie_state::cgenie_sh_control_port_w) -{ - m_control_port = data; - m_ay8910->address_w(space, offset, data); -} diff --git a/src/mess/machine/galaxy.c b/src/mess/machine/galaxy.c index 08e16e0351f..2356a193b7e 100644 --- a/src/mess/machine/galaxy.c +++ b/src/mess/machine/galaxy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha, Miodrag Milanovic /*************************************************************************** diff --git a/src/mess/machine/k7659kb.c b/src/mess/machine/k7659kb.c index aae4309e845..5b46d8a9814 100644 --- a/src/mess/machine/k7659kb.c +++ b/src/mess/machine/k7659kb.c @@ -4,9 +4,6 @@ K7659 keyboard emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #include "k7659kb.h" diff --git a/src/mess/machine/k7659kb.h b/src/mess/machine/k7659kb.h index a8977539ed9..2dc4db24747 100644 --- a/src/mess/machine/k7659kb.h +++ b/src/mess/machine/k7659kb.h @@ -4,9 +4,6 @@ K7659 keyboard emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #pragma once diff --git a/src/mess/machine/lviv.c b/src/mess/machine/lviv.c index 1bf56a19134..e2fd86c293f 100644 --- a/src/mess/machine/lviv.c +++ b/src/mess/machine/lviv.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /*************************************************************************** diff --git a/src/mess/machine/mboard.c b/src/mess/machine/mboard.c index 149ed2caf28..02771271924 100644 --- a/src/mess/machine/mboard.c +++ b/src/mess/machine/mboard.c @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ralf Schaefer +// license:BSD-3-Clause +// copyright-holders:Ralf Schaefer, Cowering /********************************************************************** Mephisto Chess Computers diff --git a/src/mess/machine/pmd85.c b/src/mess/machine/pmd85.c index 8454899d21d..d5435443d26 100644 --- a/src/mess/machine/pmd85.c +++ b/src/mess/machine/pmd85.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /*************************************************************************** diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c index 37222e35b37..1295fe14b8d 100644 --- a/src/mess/machine/primo.c +++ b/src/mess/machine/primo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /******************************************************************************* diff --git a/src/mess/machine/prof80mmu.c b/src/mess/machine/prof80mmu.c index eaba6450295..ebdccf33004 100644 --- a/src/mess/machine/prof80mmu.c +++ b/src/mess/machine/prof80mmu.c @@ -4,9 +4,6 @@ Conitec PROF-80 Memory Management Unit emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "prof80mmu.h" diff --git a/src/mess/machine/prof80mmu.h b/src/mess/machine/prof80mmu.h index 5475b86a179..89e64f72579 100644 --- a/src/mess/machine/prof80mmu.h +++ b/src/mess/machine/prof80mmu.h @@ -4,9 +4,6 @@ Conitec PROF-80 Memory Management Unit emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/mess/machine/rm380z.c b/src/mess/machine/rm380z.c index 8cf80b6c1c5..4fb941b82b9 100644 --- a/src/mess/machine/rm380z.c +++ b/src/mess/machine/rm380z.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol,friol +// copyright-holders:Wilbert Pol,Gabriele D'Antona /* diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c index 42073599b14..069e8f7f6fa 100644 --- a/src/mess/machine/ti85.c +++ b/src/mess/machine/ti85.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha,Jon Sturm /*************************************************************************** TI-85 driver by Krzysztof Strzecha diff --git a/src/mess/video/apollo.c b/src/mess/video/apollo.c index 0ca51d558fc..b35e6550d4e 100644 --- a/src/mess/video/apollo.c +++ b/src/mess/video/apollo.c @@ -6,9 +6,6 @@ * Created on: April 25, 2013 * Author: Hans Ostermeyer * - * Released for general non-commercial use under the MAME license - * Visit http://mamedev.org for licensing and usage restrictions. - * * see also: * - Domain Series 3000/Series 4000 Hardware Architecture Handbook (Order No. 007861 Rev. 02) * - http://www.bitsavers.org/pdf/apollo/002398-04_Domain_Engineering_Handbook_Rev4_Jan87.pdf (page 12-16 ...) diff --git a/src/mess/video/cgenie.c b/src/mess/video/cgenie.c deleted file mode 100644 index 2919f97e9a9..00000000000 --- a/src/mess/video/cgenie.c +++ /dev/null @@ -1,412 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - cgenie.c - - Functions to emulate the video controller 6845. - -***************************************************************************/ - -#include "emu.h" -#include "includes/cgenie.h" - - - - - -/*************************************************************************** - - Start the video hardware emulation. - -***************************************************************************/ -void cgenie_state::video_start() -{ - m_screen->register_screen_bitmap(m_dlybitmap); - m_screen->register_screen_bitmap(m_bitmap); -} - -/*************************************************************************** - - Calculate the horizontal and vertical offset for the - current register settings of the 6845 CRTC - -***************************************************************************/ -void cgenie_state::cgenie_offset_xy() -{ - if( m_crt.horizontal_sync_pos ) - m_off_x = m_crt.horizontal_total - m_crt.horizontal_sync_pos - 14; - else - m_off_x = -15; - - m_off_y = (m_crt.vertical_total - m_crt.vertical_sync_pos) * - (m_crt.scan_lines + 1) + m_crt.vertical_adjust - - 32; - - if( m_off_y < 0 ) - m_off_y = 0; - - if( m_off_y > 128 ) - m_off_y = 128; - -// logerror("cgenie offset x:%d y:%d\n", m_off_x, m_off_y); -} - - -/*************************************************************************** - Write to an indexed register of the 6845 CRTC -***************************************************************************/ -WRITE8_MEMBER( cgenie_state::cgenie_register_w ) -{ - //int addr; - - switch (m_crt.idx) - { - case 0: - if( m_crt.horizontal_total == data ) - break; - m_crt.horizontal_total = data; - cgenie_offset_xy(); - break; - case 1: - if( m_crt.horizontal_displayed == data ) - break; - m_crt.horizontal_displayed = data; - break; - case 2: - if( m_crt.horizontal_sync_pos == data ) - break; - m_crt.horizontal_sync_pos = data; - cgenie_offset_xy(); - break; - case 3: - m_crt.horizontal_length = data; - break; - case 4: - if( m_crt.vertical_total == data ) - break; - m_crt.vertical_total = data; - cgenie_offset_xy(); - break; - case 5: - if( m_crt.vertical_adjust == data ) - break; - m_crt.vertical_adjust = data; - cgenie_offset_xy(); - break; - case 6: - if( m_crt.vertical_displayed == data ) - break; - m_crt.vertical_displayed = data; - break; - case 7: - if( m_crt.vertical_sync_pos == data ) - break; - m_crt.vertical_sync_pos = data; - cgenie_offset_xy(); - break; - case 8: - m_crt.crt_mode = data; - break; - case 9: - data &= 15; - if( m_crt.scan_lines == data ) - break; - m_crt.scan_lines = data; - cgenie_offset_xy(); - break; - case 10: - if( m_crt.cursor_top == data ) - break; - m_crt.cursor_top = data; - //addr = 256 * m_crt.cursor_address_hi + m_crt.cursor_address_lo; - break; - case 11: - if( m_crt.cursor_bottom == data ) - break; - m_crt.cursor_bottom = data; - //addr = 256 * m_crt.cursor_address_hi + m_crt.cursor_address_lo; - break; - case 12: - data &= 63; - if( m_crt.screen_address_hi == data ) - break; - m_crt.screen_address_hi = data; - break; - case 13: - if( m_crt.screen_address_lo == data ) - break; - m_crt.screen_address_lo = data; - break; - case 14: - data &= 63; - if( m_crt.cursor_address_hi == data ) - break; - m_crt.cursor_address_hi = data; - //addr = 256 * m_crt.cursor_address_hi + m_crt.cursor_address_lo; - break; - case 15: - if( m_crt.cursor_address_lo == data ) - break; - m_crt.cursor_address_lo = data; - //addr = 256 * m_crt.cursor_address_hi + m_crt.cursor_address_lo; - break; - } -} - -/*************************************************************************** - Write to the index register of the 6845 CRTC -***************************************************************************/ -WRITE8_MEMBER( cgenie_state::cgenie_index_w ) -{ - m_crt.idx = data & 15; -} - -/*************************************************************************** - Read from an indexed register of the 6845 CRTC -***************************************************************************/ -READ8_MEMBER( cgenie_state::cgenie_register_r ) -{ - return cgenie_get_register(m_crt.idx); -} - -/*************************************************************************** - Read from a register of the 6845 CRTC -***************************************************************************/ -int cgenie_state::cgenie_get_register(int indx) -{ - switch (indx) - { - case 0: - return m_crt.horizontal_total; - case 1: - return m_crt.horizontal_displayed; - case 2: - return m_crt.horizontal_sync_pos; - case 3: - return m_crt.horizontal_length; - case 4: - return m_crt.vertical_total; - case 5: - return m_crt.vertical_adjust; - case 6: - return m_crt.vertical_displayed; - case 7: - return m_crt.vertical_sync_pos; - case 8: - return m_crt.crt_mode; - case 9: - return m_crt.scan_lines; - case 10: - return m_crt.cursor_top; - case 11: - return m_crt.cursor_bottom; - case 12: - return m_crt.screen_address_hi; - case 13: - return m_crt.screen_address_lo; - case 14: - return m_crt.cursor_address_hi; - case 15: - return m_crt.cursor_address_lo; - } - return 0; -} - -/*************************************************************************** - Read the index register of the 6845 CRTC -***************************************************************************/ -READ8_MEMBER( cgenie_state::cgenie_index_r ) -{ - return m_crt.idx; -} - -/*************************************************************************** - Switch mode between character generator and graphics -***************************************************************************/ -void cgenie_state::cgenie_mode_select(int mode) -{ - m_graphics = (mode) ? 1 : 0; -} - - -void cgenie_state::cgenie_refresh_monitor(bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 *videoram = m_videoram; - int i, address, offset, cursor, size, code, x, y; - rectangle r; - - bitmap.fill(m_palette->black_pen(), cliprect); - - if(m_crt.vertical_displayed || m_crt.horizontal_displayed) - { - offset = 256 * m_crt.screen_address_hi + m_crt.screen_address_lo; - size = m_crt.horizontal_displayed * m_crt.vertical_displayed; - cursor = 256 * m_crt.cursor_address_hi + m_crt.cursor_address_lo; - - /* - * for every character in the Video RAM, check if it has been modified since - * last time and update it accordingly. - */ - for( address = 0; address < size; address++ ) - { - i = (offset + address) & 0x3fff; - x = address % m_crt.horizontal_displayed + m_off_x; - y = address / m_crt.horizontal_displayed; - - r.min_x = x * 8; - r.max_x = r.min_x + 7; - r.min_y = y * (m_crt.scan_lines + 1) + m_off_y; - r.max_y = r.min_y + m_crt.scan_lines; - - if( m_graphics ) - { - /* get graphics code */ - code = videoram[i]; - m_gfxdecode->gfx(1)->opaque(bitmap,r, code, 0, - 0, 0, r.min_x, r.min_y); - } - else - { - /* get character code */ - code = videoram[i]; - - /* translate defined character sets */ - code += m_font_offset[(code >> 6) & 3]; - m_gfxdecode->gfx(0)->opaque(bitmap,r, code, m_colorram[i&0x3ff], - 0, 0, r.min_x, r.min_y); - } - - if( i == cursor ) - { - rectangle rc; - - /* check if cursor turned off */ - if( (m_crt.cursor_top & 0x60) == 0x20 ) - continue; - - if( (m_crt.cursor_top & 0x60) == 0x60 ) - { - m_crt.cursor_visible = 1; - } - else - { - m_crt.cursor_phase++; - m_crt.cursor_visible = (m_crt.cursor_phase >> 3) & 1; - } - - if( !m_crt.cursor_visible ) - continue; - - rc.min_x = r.min_x; - rc.max_x = r.max_x; - rc.min_y = r.min_y + (m_crt.cursor_top & 15); - rc.max_y = r.min_y + (m_crt.cursor_bottom & 15); - m_gfxdecode->gfx(0)->opaque(bitmap,rc, 0x7f, m_colorram[i&0x3ff], - 0, 0, rc.min_x, rc.min_y); - } - } - } -} - -void cgenie_state::cgenie_refresh_tv_set(bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 *videoram = m_videoram; - int i, address, offset, cursor, size, code, x, y; - rectangle r; - - m_bitmap.fill(m_palette->black_pen(), cliprect); - m_dlybitmap.fill(m_palette->black_pen(), cliprect); - - if(m_crt.vertical_displayed || m_crt.horizontal_displayed) - { - offset = 256 * m_crt.screen_address_hi + m_crt.screen_address_lo; - size = m_crt.horizontal_displayed * m_crt.vertical_displayed; - cursor = 256 * m_crt.cursor_address_hi + m_crt.cursor_address_lo; - - /* - * for every character in the Video RAM, check if it has been modified since - * last time and update it accordingly. - */ - for( address = 0; address < size; address++ ) - { - i = (offset + address) & 0x3fff; - x = address % m_crt.horizontal_displayed + m_off_x; - y = address / m_crt.horizontal_displayed; - - r.min_x = x * 8; - r.max_x = r.min_x + 7; - r.min_y = y * (m_crt.scan_lines + 1) + m_off_y; - r.max_y = r.min_y + m_crt.scan_lines; - - if( m_graphics ) - { - /* get graphics code */ - code = videoram[i]; - m_gfxdecode->gfx(1)->opaque(m_bitmap,r, code, 1, - 0, 0, r.min_x, r.min_y); - m_gfxdecode->gfx(1)->opaque(m_dlybitmap,r, code, 2, - 0, 0, r.min_x, r.min_y); - } - else - { - /* get character code */ - code = videoram[i]; - - /* translate defined character sets */ - code += m_font_offset[(code >> 6) & 3]; - m_gfxdecode->gfx(0)->opaque(m_bitmap,r, code, m_colorram[i&0x3ff] + 16, - 0, 0, r.min_x, r.min_y); - m_gfxdecode->gfx(0)->opaque(m_dlybitmap,r, code, m_colorram[i&0x3ff] + 32, - 0, 0, r.min_x, r.min_y); - } - - if( i == cursor ) - { - rectangle rc; - - /* check if cursor turned off */ - if( (m_crt.cursor_top & 0x60) == 0x20 ) - continue; - - if( (m_crt.cursor_top & 0x60) == 0x60 ) - { - m_crt.cursor_visible = 1; - } - else - { - m_crt.cursor_phase++; - m_crt.cursor_visible = (m_crt.cursor_phase >> 3) & 1; - } - - if( !m_crt.cursor_visible ) - continue; - - rc.min_x = r.min_x; - rc.max_x = r.max_x; - rc.min_y = r.min_y + (m_crt.cursor_top & 15); - rc.max_y = r.min_y + (m_crt.cursor_bottom & 15); - - m_gfxdecode->gfx(0)->opaque(m_bitmap,rc, 0x7f, m_colorram[i&0x3ff] + 16, - 0, 0, rc.min_x, rc.min_y); - m_gfxdecode->gfx(0)->opaque(m_dlybitmap,rc, 0x7f, m_colorram[i&0x3ff] + 32, - 0, 0, rc.min_x, rc.min_y); - } - } - } - - copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); - copybitmap_trans(bitmap, m_dlybitmap, 0, 0, 1, 0, cliprect, 0); -} - -/*************************************************************************** - Draw the game screen in the given bitmap_ind16. -***************************************************************************/ -UINT32 cgenie_state::screen_update_cgenie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - if( m_tv_mode ) - cgenie_refresh_tv_set(bitmap, cliprect); - else - cgenie_refresh_monitor(bitmap, cliprect); - return 0; -} diff --git a/src/mess/video/galaxy.c b/src/mess/video/galaxy.c index 637b9e742f3..0f8184916f8 100644 --- a/src/mess/video/galaxy.c +++ b/src/mess/video/galaxy.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha, Miodrag Milanovic /*************************************************************************** diff --git a/src/mess/video/lviv.c b/src/mess/video/lviv.c index 826753f3c87..affc58516f0 100644 --- a/src/mess/video/lviv.c +++ b/src/mess/video/lviv.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /*************************************************************************** diff --git a/src/mess/video/nick.c b/src/mess/video/nick.c index 6541008c5a7..3083c3f24a8 100644 --- a/src/mess/video/nick.c +++ b/src/mess/video/nick.c @@ -4,9 +4,6 @@ Intelligent Designs NICK emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "nick.h" diff --git a/src/mess/video/nick.h b/src/mess/video/nick.h index 4cb21be87a5..738d202e2a7 100644 --- a/src/mess/video/nick.h +++ b/src/mess/video/nick.h @@ -4,9 +4,6 @@ Intelligent Designs NICK emulation - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #pragma once diff --git a/src/mess/video/pmd85.c b/src/mess/video/pmd85.c index 751ad57e714..146e7a03e6f 100644 --- a/src/mess/video/pmd85.c +++ b/src/mess/video/pmd85.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /*************************************************************************** diff --git a/src/mess/video/primo.c b/src/mess/video/primo.c index c97d9a2aea1..55332149128 100644 --- a/src/mess/video/primo.c +++ b/src/mess/video/primo.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha /*************************************************************************** diff --git a/src/mess/video/rm380z.c b/src/mess/video/rm380z.c index e98f9df75b3..4b00c5222db 100644 --- a/src/mess/video/rm380z.c +++ b/src/mess/video/rm380z.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol,friol +// copyright-holders:Wilbert Pol,Gabriele D'Antona /* diff --git a/src/mess/video/stic.c b/src/mess/video/stic.c index 706aec24e82..b5b8dbfb6a4 100644 --- a/src/mess/video/stic.c +++ b/src/mess/video/stic.c @@ -5,9 +5,6 @@ General Instruments AY-3-8900-1 a.k.a. Standard Television Interface Chip (STIC) emulation for Mattel Intellivision - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - *********************************************************************/ #include "emu.h" diff --git a/src/mess/video/ti85.c b/src/mess/video/ti85.c index c88f15c861c..92ade7ae6fc 100644 --- a/src/mess/video/ti85.c +++ b/src/mess/video/ti85.c @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Krzysztof Strzecha,Jon Sturm /*************************************************************************** TI-85 driver by Krzysztof Strzecha diff --git a/src/mess/video/vtvideo.h b/src/mess/video/vtvideo.h index 657a4c6a772..49dbcfef7cd 100644 --- a/src/mess/video/vtvideo.h +++ b/src/mess/video/vtvideo.h @@ -7,9 +7,6 @@ DEC VT Terminal video emulation 01/05/2009 Initial implementation [Miodrag Milanovic] -Copyright MESS Team. -Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #ifndef __VT_VIDEO__ diff --git a/src/osd/windows/ledutil.c b/src/osd/windows/ledutil.c index 2ad96cae700..6788fdaf53e 100644 --- a/src/osd/windows/ledutil.c +++ b/src/osd/windows/ledutil.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles,Paul Priest //============================================================ // // ledutil.c - Win32 example code that tracks changing diff --git a/src/tools/nltool.c b/src/tools/nltool.c index 4f627f413b6..a2e70ced243 100644 --- a/src/tools/nltool.c +++ b/src/tools/nltool.c @@ -8,23 +8,41 @@ ****************************************************************************/ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <sstream> -#include <assert.h> -#include "corefile.h" -#include "corestr.h" -#include "sha1.h" -#include "netlist/nl_base.h" +#include <cstdio> + +#ifdef PSTANDALONE +#if (PSTANDALONE) +#define PSTANDALONE_PROVIDED +#endif +#endif + +#ifdef PSTANDALONE_PROVIDED + +#include <ctime> + +#include "poptions.h" +#include "pstring.h" +#include "plists.h" +#include "nl_setup.h" +#include "nl_factory.h" +#include "nl_parser.h" +#include "devices/net_lib.h" + +#define osd_ticks_t clock_t + +inline osd_ticks_t osd_ticks_per_second() { return CLOCKS_PER_SEC; } + +osd_ticks_t osd_ticks(void) { return clock(); } +#else + +#include "netlist/poptions.h" +#include "netlist/pstring.h" +#include "netlist/plists.h" #include "netlist/nl_setup.h" -#include "netlist/nl_parser.h" #include "netlist/nl_factory.h" -#include "netlist/nl_util.h" +#include "netlist/nl_parser.h" #include "netlist/devices/net_lib.h" -#include "options.h" - +#endif /*************************************************************************** * MAME COMPATIBILITY ... * @@ -79,17 +97,30 @@ void report_bad_cast(const std::type_info &src_type, const std::type_info &dst_t } #endif -struct options_entry oplist[] = +class tool_options_t : public poptions { - { "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" }, - { "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, 0, NULL } +public: + tool_options_t() : + poptions(), + opt_ttr ("t", "time_to_run", 1.0, "time to run the emulation (seconds)", this), + opt_logs("l", "logs", "", "colon separated list of terminals to log", this), + opt_file("f", "file", "-", "file to process (default is stdin)", this), + opt_cmd ("c", "cmd", "run", "run|convert|listdevices", this), + opt_verb("v", "verbose", "be verbose - this produces lots of output", this), + opt_help("h", "help", "display help", this) + {} + + poption_double opt_ttr; + poption_str opt_logs; + poption_str opt_file; + poption_str opt_cmd; + poption_bool opt_verb; + poption_bool opt_help; }; +//Alternative +//static poption *optlist[] = { &opt_ttr, &opt_logs, &opt_file, &opt_cmd, &opt_verb, &opt_help, NULL }; + NETLIST_START(dummy) /* Standard stuff */ @@ -148,7 +179,7 @@ public: void init() { - m_setup = nl_alloc(netlist_setup_t, *this); + m_setup = palloc(netlist_setup_t, *this); this->init_object(*this, "netlist"); m_setup->init(); } @@ -216,9 +247,8 @@ private: }; -void usage(core_options &opts) +void usage(tool_options_t &opts) { - std::string buffer; fprintf(stderr, "Usage:\n" " nltool -help\n" @@ -226,19 +256,19 @@ void usage(core_options &opts) "\n" "Where:\n" ); - fprintf(stderr, "%s\n", opts.output_help(buffer)); + fprintf(stderr, "%s\n", opts.help().cstr()); } -static void run(core_options &opts) +static void run(tool_options_t &opts) { netlist_tool_t nt; osd_ticks_t t = osd_ticks(); 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"); + nt.m_logs = opts.opt_logs(); + nt.m_verbose = opts.opt_verb(); + nt.read_netlist(filetobuf(opts.opt_file())); + double ttr = opts.opt_ttr(); printf("startup time ==> %5.3f\n", (double) (osd_ticks() - t) / (double) osd_ticks_per_second() ); printf("runnning ...\n"); @@ -316,13 +346,14 @@ static void listdevices() class convert_t { public: - void convert(pstring contents) + + void convert(const 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.add(palloc(sp_net_t, "0"), false); nets[0]->terminals().add("GND"); pstring line = ""; @@ -364,15 +395,15 @@ protected: struct sp_dev_t { public: - sp_dev_t(const pstring atype, const pstring aname, const pstring amodel) + 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) + 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) + 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) {} @@ -404,7 +435,7 @@ protected: sp_net_t * net = nets.find(netname); if (net == NULL) { - net = nl_alloc(sp_net_t, netname); + net = palloc(sp_net_t, netname); nets.add(net, false); } net->terminals().add(termname); @@ -497,6 +528,7 @@ protected: if (line != "") { nl_util::pstring_list tt = nl_util::split(line, " ", true); + double val = 0.0; switch (tt[0].cstr()[0]) { case ';': @@ -529,21 +561,23 @@ protected: // FIXME: we need a is_long method .. ATTR_UNUSED 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); + devs.add(palloc(sp_dev_t, "QBJT", tt[0], tt[5]), false); else - devs.add(nl_alloc(sp_dev_t, "QBJT", tt[0], tt[4]), false); + devs.add(palloc(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); + val = get_sp_val(tt[3]); + devs.add(palloc(sp_dev_t, "RES", tt[0], val), 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); + val = get_sp_val(tt[3]); + devs.add(palloc(sp_dev_t, "CAP", tt[0], val), false); add_term(tt[1], tt[0] + ".1"); add_term(tt[2], tt[0] + ".2"); break; @@ -551,7 +585,8 @@ protected: // 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); + val = get_sp_val(tt[3]); + devs.add(palloc(sp_dev_t, "ANALOG_INPUT", tt[0], val), false); add_term(tt[1], tt[0] + ".Q"); //add_term(tt[2], tt[0] + ".2"); } @@ -560,20 +595,23 @@ protected: break; case 'D': // FIXME: Rewrite resistor value - devs.add(nl_alloc(sp_dev_t, "DIODE", tt[0], tt[3]), false); + devs.add(palloc(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); + pstring tname = "TTL_" + tt[tt.count()-1] + "_DIP"; + devs.add(palloc(sp_dev_t, tname, 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()); } @@ -614,32 +652,31 @@ convert_t::sp_unit convert_t::m_sp_units[] = { int main(int argc, char *argv[]) { - //int result; - core_options opts(oplist); - std::string aerror(""); + tool_options_t opts; + int ret; fprintf(stderr, "%s", "WARNING: This is Work In Progress! - It may fail anytime\n"); - if (!opts.parse_command_line(argc, argv, OPTION_PRIORITY_DEFAULT, aerror)) + if ((ret = opts.parse(argc, argv)) != argc) { - fprintf(stderr, "%s\n", aerror.c_str()); + fprintf(stderr, "Error parsing %s\n", argv[ret]); usage(opts); return 1; } - if (opts.bool_value("h")) + if (opts.opt_help()) { usage(opts); return 1; } - pstring cmd = opts.value("c"); + pstring cmd = opts.opt_cmd(); if (cmd == "listdevices") listdevices(); else if (cmd == "run") run(opts); else if (cmd == "convert") { - pstring contents = filetobuf(opts.value("f")); + pstring contents = filetobuf(opts.opt_file()); convert_t converter; converter.convert(contents); } diff --git a/src/tools/romcmp.c b/src/tools/romcmp.c index 68713cb1648..205b6db2623 100644 --- a/src/tools/romcmp.c +++ b/src/tools/romcmp.c @@ -6,9 +6,6 @@ ROM comparison utility program. - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - ***************************************************************************/ #include "unzip.h" |