summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2026-03-22 01:27:52 +1100
committer Vas Crabb <vas@vastheman.com>2026-03-22 01:27:52 +1100
commit237d736a31062763d8d24658a52a1fc52e944dc5 (patch)
tree331503893e9b56df1969e208344191c53c4f3a36
parent420030e0e672f07b29a0c1b0d46409455f992e6d (diff)
-emu/dislot.cpp: Cleaned up interface.
* Added a helper for the common operation of replacing all options, setting default, and setting whether the slot is fixed (reduced boilerplate in slot devices a bit). * Fixed a bug where slot options copied the supplied name but also required the string to remain valid for their lifetime. * Use std::string_view for strings that should never be null. * Reduced some duplication. -dynax/ddenlovr.cpp: Allow a mahjong panel to be connected for all hanafuda games with slotted control panels. This is how the games were operated most of the time, and all mahjong controls are displayed in input tests. Also cleaned up some DIP switch settings. -emu/inpttype.h: Got rid of IPT_GAMBLE_SERVICE. -bus/bk/parallel.h: Fixed a bug where the supplied options and default weren't actually used. -emu/debug/debugcmd.cpp: Use C++ file stream for dumping address maps. -frontend/mame/clifront.cpp: Use osd_printf_info output for interactive verbs. -jaleco/ms32.cpp: Simplified mahjong panel column permutation. -capcom/cps1bl_5205.cpp, mattel/juicebox.cpp, sun/sun2.cpp, sun/sun3.cpp: Cleaned up logging. -emu/xtal.cpp: Reduced temporary objects and duplicated code.
-rw-r--r--src/devices/bus/a2bus/a2bus.h5
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.h5
-rw-r--r--src/devices/bus/a2kbd/a2kbd.h5
-rw-r--r--src/devices/bus/a7800/a78_slot.h5
-rw-r--r--src/devices/bus/amiga/keyboard/keyboard.h5
-rw-r--r--src/devices/bus/amiga/zorro/zorro.h5
-rw-r--r--src/devices/bus/applepp/applepp.h5
-rw-r--r--src/devices/bus/astrocde/accessory.h5
-rw-r--r--src/devices/bus/bbc/analogue/analogue.h5
-rw-r--r--src/devices/bus/bbc/analogue/quinkey.h5
-rw-r--r--src/devices/bus/bbc/cart/slot.h5
-rw-r--r--src/devices/bus/bbc/fdc/fdc.h5
-rw-r--r--src/devices/bus/bbc/joyport/joyport.h5
-rw-r--r--src/devices/bus/bbc/modem/modem.h5
-rw-r--r--src/devices/bus/bbc/tube/tube.h5
-rw-r--r--src/devices/bus/bbc/vsp/slot.h5
-rw-r--r--src/devices/bus/bk/parallel.h5
-rw-r--r--src/devices/bus/bml3/bml3bus.h5
-rw-r--r--src/devices/bus/c64/exp.h5
-rw-r--r--src/devices/bus/cbmiec/cbmiec.h5
-rw-r--r--src/devices/bus/chanf/slot.h5
-rw-r--r--src/devices/bus/coleco/cartridge/exp.h5
-rw-r--r--src/devices/bus/coleco/controller/ctrl.h5
-rw-r--r--src/devices/bus/coleco/expansion/expansion.h5
-rw-r--r--src/devices/bus/cpc/cpcexp.h5
-rw-r--r--src/devices/bus/dmv/dmvbus.h5
-rw-r--r--src/devices/bus/electron/exp.h5
-rw-r--r--src/devices/bus/epson_qx/keyboard/keyboard.h5
-rw-r--r--src/devices/bus/gameboy/mdslot.h5
-rw-r--r--src/devices/bus/heathzenith/h89/h89bus.h21
-rw-r--r--src/devices/bus/heathzenith/intr_cntrl/intr_cntrl.h5
-rw-r--r--src/devices/bus/hp_ipc_io/hp_ipc_io.h5
-rw-r--r--src/devices/bus/idpartner/bus.h5
-rw-r--r--src/devices/bus/imi7000/imi7000.h5
-rw-r--r--src/devices/bus/interpro/mouse/mouse.h11
-rw-r--r--src/devices/bus/intv/slot.h5
-rw-r--r--src/devices/bus/intv_ctrl/ctrl.h5
-rw-r--r--src/devices/bus/iq151/iq151.h5
-rw-r--r--src/devices/bus/isa/isa.h10
-rw-r--r--src/devices/bus/jakks_gamekey/slot.h5
-rw-r--r--src/devices/bus/jvs/jvs.h5
-rw-r--r--src/devices/bus/kc/kc.h14
-rw-r--r--src/devices/bus/lpci/pci.h5
-rw-r--r--src/devices/bus/mm2/exp.h5
-rw-r--r--src/devices/bus/mtx/exp.h5
-rw-r--r--src/devices/bus/nes/aladdin.h5
-rw-r--r--src/devices/bus/nes/datach.h5
-rw-r--r--src/devices/bus/nes/karastudio.h5
-rw-r--r--src/devices/bus/nubus/nubus.h4
-rw-r--r--src/devices/bus/oricext/oricext.h5
-rw-r--r--src/devices/bus/pc1512/mouse.h5
-rw-r--r--src/devices/bus/pc8801/pc8801_exp.h5
-rw-r--r--src/devices/bus/pc98_cbus/slot.h5
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.h17
-rw-r--r--src/devices/bus/pce/pce_slot.h7
-rw-r--r--src/devices/bus/pce_ctrl/pcectrl.h5
-rw-r--r--src/devices/bus/pci/pci_slot.h5
-rw-r--r--src/devices/bus/pencil2/slot.h5
-rw-r--r--src/devices/bus/pet/cass.h5
-rw-r--r--src/devices/bus/pet/user.h7
-rw-r--r--src/devices/bus/pofo/exp.h5
-rw-r--r--src/devices/bus/psi_kbd/psi_kbd.h9
-rw-r--r--src/devices/bus/psion/honda/slot.h5
-rw-r--r--src/devices/bus/psx/ctlrport.h5
-rw-r--r--src/devices/bus/rs232/rs232.h5
-rw-r--r--src/devices/bus/saitek_osa/expansion.h5
-rw-r--r--src/devices/bus/samcoupe/expansion/expansion.h5
-rw-r--r--src/devices/bus/samcoupe/mouse/mouseport.h5
-rw-r--r--src/devices/bus/saturn/sat_slot.h5
-rw-r--r--src/devices/bus/sega8/sega8_slot.h40
-rw-r--r--src/devices/bus/segaai/segaai_exp.h5
-rw-r--r--src/devices/bus/sg1000_exp/sg1000exp.h9
-rw-r--r--src/devices/bus/sg1000_exp/sk1100prn.h5
-rw-r--r--src/devices/bus/sms_exp/smsexp.h9
-rw-r--r--src/devices/bus/snes/snes_slot.h17
-rw-r--r--src/devices/bus/snes_ctrl/ctrl.h5
-rw-r--r--src/devices/bus/ss50/interface.h9
-rw-r--r--src/devices/bus/sunmouse/sunmouse.h5
-rw-r--r--src/devices/bus/tanbus/keyboard/keyboard.h9
-rw-r--r--src/devices/bus/tanbus/tanbus.h5
-rw-r--r--src/devices/bus/technics/kn5000/kn5000_extension.h5
-rw-r--r--src/devices/bus/ti99/joyport/joyport.h5
-rw-r--r--src/devices/bus/ti99/peb/peribox.h5
-rw-r--r--src/devices/bus/tmc600/euro.h5
-rw-r--r--src/devices/bus/tvc/tvc.h9
-rw-r--r--src/devices/bus/vcs/vcs_slot.h7
-rw-r--r--src/devices/bus/vic10/exp.h5
-rw-r--r--src/devices/bus/vic20/exp.h5
-rw-r--r--src/devices/bus/vtech/ioexp/ioexp.h5
-rw-r--r--src/devices/bus/wswan/slot.h5
-rw-r--r--src/devices/bus/wysekbd/wysekbd.h9
-rw-r--r--src/devices/imagedev/floppy.h5
-rw-r--r--src/devices/machine/nscsi_bus.h5
-rw-r--r--src/emu/debug/debugcmd.cpp68
-rw-r--r--src/emu/dislot.cpp125
-rw-r--r--src/emu/dislot.h95
-rw-r--r--src/emu/emuopts.cpp44
-rw-r--r--src/emu/emuopts.h21
-rw-r--r--src/emu/inpttype.h1
-rw-r--r--src/emu/inpttype.ipp1
-rw-r--r--src/emu/mconfig.cpp2
-rw-r--r--src/emu/validity.cpp10
-rw-r--r--src/emu/xtal.cpp24
-rw-r--r--src/emu/xtal.h10
-rw-r--r--src/frontend/mame/clifront.cpp58
-rw-r--r--src/frontend/mame/infoxml.cpp2
-rw-r--r--src/frontend/mame/luaengine.cpp2
-rw-r--r--src/frontend/mame/luaengine.h3
-rw-r--r--src/frontend/mame/luaengine.ipp12
-rw-r--r--src/frontend/mame/luaengine_debug.cpp2
-rw-r--r--src/frontend/mame/luaengine_input.cpp2
-rw-r--r--src/frontend/mame/luaengine_mem.cpp6
-rw-r--r--src/frontend/mame/ui/devopt.cpp6
-rw-r--r--src/frontend/mame/ui/slotopt.cpp14
-rw-r--r--src/mame/aristocrat/aristmk4.cpp12
-rw-r--r--src/mame/capcom/cps1bl_5205.cpp4
-rw-r--r--src/mame/dynax/ddenlovr.cpp229
-rw-r--r--src/mame/dynax/mjdipsw.h7
-rw-r--r--src/mame/excellent/d9final.cpp2
-rw-r--r--src/mame/excellent/lastbank.cpp2
-rw-r--r--src/mame/f32/f-32.cpp2
-rw-r--r--src/mame/funworld/snookr10.cpp8
-rw-r--r--src/mame/gaelco/atvtrack.cpp12
-rw-r--r--src/mame/gametron/gatron.cpp2
-rw-r--r--src/mame/ibm/rtpc_kbd.h3
-rw-r--r--src/mame/ibm/rtpc_kbdc.h5
-rw-r--r--src/mame/igs/goldstar.cpp90
-rw-r--r--src/mame/jaleco/ms32.cpp21
-rw-r--r--src/mame/konami/konendev.cpp4
-rw-r--r--src/mame/mattel/juicebox.cpp92
-rw-r--r--src/mame/merit/mgames.cpp2
-rw-r--r--src/mame/midway/mcr.cpp2
-rw-r--r--src/mame/misc/ampoker2.cpp10
-rw-r--r--src/mame/misc/amusco.cpp2
-rw-r--r--src/mame/misc/boramz80.cpp2
-rw-r--r--src/mame/misc/calomega.cpp30
-rw-r--r--src/mame/misc/cb2001.cpp17
-rw-r--r--src/mame/misc/gluck2.cpp6
-rw-r--r--src/mame/misc/goldnpkr.cpp2
-rw-r--r--src/mame/misc/hotchili.cpp2
-rw-r--r--src/mame/misc/jackhouse.cpp2
-rw-r--r--src/mame/misc/kingpin.cpp2
-rw-r--r--src/mame/misc/magicfly.cpp18
-rw-r--r--src/mame/misc/multfish.cpp2
-rw-r--r--src/mame/misc/norautp.cpp6
-rw-r--r--src/mame/misc/truco.cpp2
-rw-r--r--src/mame/sega/9h0-0008_iox.h5
-rw-r--r--src/mame/sega/bingoct.cpp2
-rw-r--r--src/mame/sega/saturn_v.cpp2
-rw-r--r--src/mame/sega/segajw.cpp2
-rw-r--r--src/mame/sega/segasm1.cpp5
-rw-r--r--src/mame/seta/thedealr.cpp2
-rw-r--r--src/mame/shared/mahjong.cpp36
-rw-r--r--src/mame/shared/mahjong.h5
-rw-r--r--src/mame/shared/xbox_usb.h5
-rw-r--r--src/mame/sigma/sigmab52.cpp2
-rw-r--r--src/mame/skeleton/dm7000.cpp4
-rw-r--r--src/mame/skeleton/seoul88.cpp2
-rw-r--r--src/mame/subsino/subsino.cpp26
-rw-r--r--src/mame/sun/sun2.cpp77
-rw-r--r--src/mame/sun/sun3.cpp116
-rw-r--r--src/mame/taito/taito_o.cpp4
-rw-r--r--src/mame/toaplan/sunwise.cpp4
-rw-r--r--src/mame/wing/lucky74.cpp2
-rw-r--r--src/mame/wing/slotcarn.cpp16
165 files changed, 856 insertions, 1164 deletions
diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h
index 14f05b43563..1bf569b1601 100644
--- a/src/devices/bus/a2bus/a2bus.h
+++ b/src/devices/bus/a2bus/a2bus.h
@@ -40,10 +40,7 @@ public:
a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&a2bus_tag, U &&opts, const char *dflt)
: a2bus_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
m_a2bus.set_tag(std::forward<T>(a2bus_tag));
}
a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/a2bus/a2eauxslot.h b/src/devices/bus/a2bus/a2eauxslot.h
index 9d6ccfb7036..fb7b2936c29 100644
--- a/src/devices/bus/a2bus/a2eauxslot.h
+++ b/src/devices/bus/a2bus/a2eauxslot.h
@@ -33,10 +33,7 @@ public:
a2eauxslot_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slottag, U &&opts, char const *dflt)
: a2eauxslot_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
m_a2eauxslot.set_tag(std::forward<T>(slottag));
}
diff --git a/src/devices/bus/a2kbd/a2kbd.h b/src/devices/bus/a2kbd/a2kbd.h
index 31f31632d15..a2a57420b26 100644
--- a/src/devices/bus/a2kbd/a2kbd.h
+++ b/src/devices/bus/a2kbd/a2kbd.h
@@ -33,10 +33,7 @@ public:
a2kbd_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: a2kbd_connector_device(mconfig, tag, owner, 0U)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
// standard options
diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h
index c3f6c5c6833..bb8a846841a 100644
--- a/src/devices/bus/a7800/a78_slot.h
+++ b/src/devices/bus/a7800/a78_slot.h
@@ -92,10 +92,7 @@ public:
a78_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
: a78_cart_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~a78_cart_slot_device();
diff --git a/src/devices/bus/amiga/keyboard/keyboard.h b/src/devices/bus/amiga/keyboard/keyboard.h
index 9eee49da5b2..febc979b3cf 100644
--- a/src/devices/bus/amiga/keyboard/keyboard.h
+++ b/src/devices/bus/amiga/keyboard/keyboard.h
@@ -35,10 +35,7 @@ public:
amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: amiga_keyboard_bus_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U);
virtual ~amiga_keyboard_bus_device();
diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h
index 2662a3e9356..a9de1e7d5d9 100644
--- a/src/devices/bus/amiga/zorro/zorro.h
+++ b/src/devices/bus/amiga/zorro/zorro.h
@@ -153,10 +153,7 @@ public:
zorro2_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) :
zorro2_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
protected:
diff --git a/src/devices/bus/applepp/applepp.h b/src/devices/bus/applepp/applepp.h
index 8baf7a52ac6..cadabbe4967 100644
--- a/src/devices/bus/applepp/applepp.h
+++ b/src/devices/bus/applepp/applepp.h
@@ -20,10 +20,7 @@ public:
applepp_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false)
: applepp_connector(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
applepp_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/astrocde/accessory.h b/src/devices/bus/astrocde/accessory.h
index 00d4c55abd8..117d33abea8 100644
--- a/src/devices/bus/astrocde/accessory.h
+++ b/src/devices/bus/astrocde/accessory.h
@@ -30,10 +30,7 @@ public:
: astrocade_accessory_port_device(mconfig, tag, owner, 0U)
{
m_screen.set_tag(std::forward<T>(screen_tag));
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
}
astrocade_accessory_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U);
virtual ~astrocade_accessory_port_device();
diff --git a/src/devices/bus/bbc/analogue/analogue.h b/src/devices/bus/bbc/analogue/analogue.h
index 772a5028a1e..feef542f6e2 100644
--- a/src/devices/bus/bbc/analogue/analogue.h
+++ b/src/devices/bus/bbc/analogue/analogue.h
@@ -50,10 +50,7 @@ public:
bbc_analogue_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: bbc_analogue_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bbc_analogue_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/bbc/analogue/quinkey.h b/src/devices/bus/bbc/analogue/quinkey.h
index 44e1b0da34a..cc4c4f55fd1 100644
--- a/src/devices/bus/bbc/analogue/quinkey.h
+++ b/src/devices/bus/bbc/analogue/quinkey.h
@@ -54,10 +54,7 @@ public:
bbc_quinkey_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: bbc_quinkey_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bbc_quinkey_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/bbc/cart/slot.h b/src/devices/bus/bbc/cart/slot.h
index 69e5b5f69a5..f91ac40d9bf 100644
--- a/src/devices/bus/bbc/cart/slot.h
+++ b/src/devices/bus/bbc/cart/slot.h
@@ -126,10 +126,7 @@ public:
bbc_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option)
: electron_cartslot_device(mconfig, tag, owner, clock)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bbc_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/bbc/fdc/fdc.h b/src/devices/bus/bbc/fdc/fdc.h
index e8d20ebee94..1a28919771c 100644
--- a/src/devices/bus/bbc/fdc/fdc.h
+++ b/src/devices/bus/bbc/fdc/fdc.h
@@ -29,10 +29,7 @@ public:
bbc_fdc_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option)
: bbc_fdc_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
set_insert_rom(true);
}
diff --git a/src/devices/bus/bbc/joyport/joyport.h b/src/devices/bus/bbc/joyport/joyport.h
index 0cd1e735d5d..106283ad9b4 100644
--- a/src/devices/bus/bbc/joyport/joyport.h
+++ b/src/devices/bus/bbc/joyport/joyport.h
@@ -49,10 +49,7 @@ public:
bbc_joyport_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: bbc_joyport_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bbc_joyport_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/bbc/modem/modem.h b/src/devices/bus/bbc/modem/modem.h
index 8d8ed91681f..f697596af30 100644
--- a/src/devices/bus/bbc/modem/modem.h
+++ b/src/devices/bus/bbc/modem/modem.h
@@ -53,10 +53,7 @@ public:
bbc_modem_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option)
: bbc_modem_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bbc_modem_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/bbc/tube/tube.h b/src/devices/bus/bbc/tube/tube.h
index 49f5025df4b..d23fc94f025 100644
--- a/src/devices/bus/bbc/tube/tube.h
+++ b/src/devices/bus/bbc/tube/tube.h
@@ -53,10 +53,7 @@ public:
bbc_tube_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, char const *default_option)
: bbc_tube_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
set_insert_rom(true);
}
diff --git a/src/devices/bus/bbc/vsp/slot.h b/src/devices/bus/bbc/vsp/slot.h
index a6707d5a901..e87dce9f895 100644
--- a/src/devices/bus/bbc/vsp/slot.h
+++ b/src/devices/bus/bbc/vsp/slot.h
@@ -29,10 +29,7 @@ public:
bbc_vsp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: bbc_vsp_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bbc_vsp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/bk/parallel.h b/src/devices/bus/bk/parallel.h
index 7546e9e43d7..4edf7af7e8e 100644
--- a/src/devices/bus/bk/parallel.h
+++ b/src/devices/bus/bk/parallel.h
@@ -63,10 +63,7 @@ public:
bk_parallel_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option)
: bk_parallel_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- bk_parallel_devices(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
bk_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~bk_parallel_slot_device();
diff --git a/src/devices/bus/bml3/bml3bus.h b/src/devices/bus/bml3/bml3bus.h
index cdafbb3d33f..6b85ce793a6 100644
--- a/src/devices/bus/bml3/bml3bus.h
+++ b/src/devices/bus/bml3/bml3bus.h
@@ -34,10 +34,7 @@ public:
bml3bus_slot_device(machine_config const &mconfig, const char *tag, device_t *owner, T &&nbtag, U &&opts, const char *dflt)
: bml3bus_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
set_bml3bus_slot(std::forward<T>(nbtag), tag);
}
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index a775b9529d6..cc27c306e5c 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -58,10 +58,7 @@ public:
c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
: c64_expansion_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/cbmiec/cbmiec.h b/src/devices/bus/cbmiec/cbmiec.h
index fafea819abb..f1c924ffc7a 100644
--- a/src/devices/bus/cbmiec/cbmiec.h
+++ b/src/devices/bus/cbmiec/cbmiec.h
@@ -126,10 +126,7 @@ public:
cbm_iec_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, int address, T &&opts, char const *dflt)
: cbm_iec_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
set_address(address);
}
cbm_iec_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h
index 01235a7595b..0e2edaf4eb3 100644
--- a/src/devices/bus/chanf/slot.h
+++ b/src/devices/bus/chanf/slot.h
@@ -68,10 +68,7 @@ public:
channelf_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: channelf_cart_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/coleco/cartridge/exp.h b/src/devices/bus/coleco/cartridge/exp.h
index 2c396794a63..e420e34ccfb 100644
--- a/src/devices/bus/coleco/cartridge/exp.h
+++ b/src/devices/bus/coleco/cartridge/exp.h
@@ -57,10 +57,7 @@ public:
colecovision_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: colecovision_cartridge_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/coleco/controller/ctrl.h b/src/devices/bus/coleco/controller/ctrl.h
index 6862f4d1380..0359d0eac3c 100644
--- a/src/devices/bus/coleco/controller/ctrl.h
+++ b/src/devices/bus/coleco/controller/ctrl.h
@@ -52,10 +52,7 @@ public:
colecovision_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: colecovision_control_port_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/coleco/expansion/expansion.h b/src/devices/bus/coleco/expansion/expansion.h
index 0c38f42f514..71158c6cef1 100644
--- a/src/devices/bus/coleco/expansion/expansion.h
+++ b/src/devices/bus/coleco/expansion/expansion.h
@@ -65,10 +65,7 @@ public:
coleco_expansion_device(machine_config const &mconfig, char const *tag, device_t *owner, const char *dflt) :
coleco_expansion_device(mconfig, tag, owner, uint32_t(0))
{
- option_reset();
- coleco_expansion_cards(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(coleco_expansion_cards, dflt, false);
}
coleco_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/cpc/cpcexp.h b/src/devices/bus/cpc/cpcexp.h
index 7fed2af89e4..8b00dc5cb59 100644
--- a/src/devices/bus/cpc/cpcexp.h
+++ b/src/devices/bus/cpc/cpcexp.h
@@ -97,10 +97,7 @@ public:
cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
: cpc_expansion_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
virtual ~cpc_expansion_slot_device();
diff --git a/src/devices/bus/dmv/dmvbus.h b/src/devices/bus/dmv/dmvbus.h
index 593925f4e12..6cad99c49fc 100644
--- a/src/devices/bus/dmv/dmvbus.h
+++ b/src/devices/bus/dmv/dmvbus.h
@@ -30,10 +30,7 @@ public:
dmvcart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: dmvcart_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~dmvcart_slot_device();
diff --git a/src/devices/bus/electron/exp.h b/src/devices/bus/electron/exp.h
index d36a9c75034..86205f5c7c4 100644
--- a/src/devices/bus/electron/exp.h
+++ b/src/devices/bus/electron/exp.h
@@ -106,10 +106,7 @@ public:
electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
: electron_expansion_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/epson_qx/keyboard/keyboard.h b/src/devices/bus/epson_qx/keyboard/keyboard.h
index f260cd4849d..86d82526ee9 100644
--- a/src/devices/bus/epson_qx/keyboard/keyboard.h
+++ b/src/devices/bus/epson_qx/keyboard/keyboard.h
@@ -31,10 +31,7 @@ public:
keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: keyboard_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U);
diff --git a/src/devices/bus/gameboy/mdslot.h b/src/devices/bus/gameboy/mdslot.h
index d78ac6f906c..f1694c0f733 100644
--- a/src/devices/bus/gameboy/mdslot.h
+++ b/src/devices/bus/gameboy/mdslot.h
@@ -45,10 +45,7 @@ public:
megaduck_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) :
megaduck_cart_slot_device(mconfig, tag, owner, 0U)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
megaduck_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
diff --git a/src/devices/bus/heathzenith/h89/h89bus.h b/src/devices/bus/heathzenith/h89/h89bus.h
index 7eebad284e6..baf30fd74bb 100644
--- a/src/devices/bus/heathzenith/h89/h89bus.h
+++ b/src/devices/bus/heathzenith/h89/h89bus.h
@@ -204,9 +204,7 @@ public:
h89bus_left_slot_device(const machine_config &mconfig, T &&tag, device_t *owner, const char *sltag, U &&opts, const char *dflt)
: h89bus_left_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
+ set_options(std::forward<U>(opts), dflt, false);
set_h89bus_slot(std::forward<T>(sltag), tag);
}
@@ -232,7 +230,7 @@ protected:
const char *m_h89bus_slottag;
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(H89BUS_LEFT_SLOT, h89bus_left_slot_device)
class h89bus_right_slot_device : public device_t, public device_single_card_slot_interface<device_h89bus_right_card_interface>
@@ -243,9 +241,7 @@ public:
h89bus_right_slot_device(const machine_config &mconfig, T &&tag, device_t *owner, const char *sltag, U &&opts, const char *dflt)
: h89bus_right_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
+ set_options(std::forward<U>(opts), dflt, false);
set_h89bus_slot(std::forward<T>(sltag), tag);
}
@@ -277,7 +273,7 @@ protected:
bool m_p506_signals;
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(H89BUS_RIGHT_SLOT, h89bus_right_slot_device)
@@ -349,6 +345,7 @@ protected:
required_region_ptr<uint8_t> m_decode_prom;
};
+// device type declaration
DECLARE_DEVICE_TYPE(H89BUS_IO_DECODER_444_43, heath_io_decoder_444_43)
DECLARE_DEVICE_TYPE(H89BUS_IO_DECODER_444_61, heath_io_decoder_444_61)
DECLARE_DEVICE_TYPE(H89BUS_IO_DECODER_MMS_61C, heath_io_decoder_mms_61c)
@@ -363,10 +360,7 @@ public:
heath_io_decoder_socket(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) :
heath_io_decoder_socket(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
heath_io_decoder_socket(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -379,6 +373,7 @@ protected:
virtual void device_start() override ATTR_COLD;
};
+// device type declaration
DECLARE_DEVICE_TYPE(H89BUS_IO_DECODER_SOCKET, heath_io_decoder_socket)
@@ -494,7 +489,7 @@ inline void device_h89bus_right_card_interface::set_slot_wait(int state)
h89bus().set_wait_line(state);
}
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(H89BUS, h89bus_device)
#endif // MAME_BUS_HEATHZENITH_H89_H89BUS_H
diff --git a/src/devices/bus/heathzenith/intr_cntrl/intr_cntrl.h b/src/devices/bus/heathzenith/intr_cntrl/intr_cntrl.h
index 0eee01945a3..cfe5d4b2df3 100644
--- a/src/devices/bus/heathzenith/intr_cntrl/intr_cntrl.h
+++ b/src/devices/bus/heathzenith/intr_cntrl/intr_cntrl.h
@@ -131,10 +131,7 @@ public:
heath_intr_socket(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) :
heath_intr_socket(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
heath_intr_socket(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
diff --git a/src/devices/bus/hp_ipc_io/hp_ipc_io.h b/src/devices/bus/hp_ipc_io/hp_ipc_io.h
index 079242c9554..d2f94b72230 100644
--- a/src/devices/bus/hp_ipc_io/hp_ipc_io.h
+++ b/src/devices/bus/hp_ipc_io/hp_ipc_io.h
@@ -25,10 +25,7 @@ public:
hp_ipc_io_slot_device(machine_config const &mconfig, char const *tag, device_t *owner)
: hp_ipc_io_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- hp_ipc_io_slot_devices(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(hp_ipc_io_slot_devices, nullptr, false);
}
hp_ipc_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/idpartner/bus.h b/src/devices/bus/idpartner/bus.h
index fd27bf5472f..7a2272c2004 100644
--- a/src/devices/bus/idpartner/bus.h
+++ b/src/devices/bus/idpartner/bus.h
@@ -63,10 +63,7 @@ public:
bus_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&bus_tag, U &&opts, const char *dflt)
: bus_connector_device(mconfig, tag, owner)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
m_bus.set_tag(std::forward<T>(bus_tag));
}
diff --git a/src/devices/bus/imi7000/imi7000.h b/src/devices/bus/imi7000/imi7000.h
index 5a35f82708a..30dbc0050ba 100644
--- a/src/devices/bus/imi7000/imi7000.h
+++ b/src/devices/bus/imi7000/imi7000.h
@@ -54,10 +54,7 @@ public:
imi7000_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: imi7000_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/interpro/mouse/mouse.h b/src/devices/bus/interpro/mouse/mouse.h
index 72d1bc816b7..9fc7082ba91 100644
--- a/src/devices/bus/interpro/mouse/mouse.h
+++ b/src/devices/bus/interpro/mouse/mouse.h
@@ -16,10 +16,7 @@ public:
interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: interpro_mouse_port_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
@@ -28,9 +25,9 @@ public:
auto state_func() { return m_state_func.bind(); }
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
- virtual void device_config_complete() override;
+ virtual void device_config_complete() override ATTR_COLD;
private:
devcb_write32 m_state_func;
@@ -73,7 +70,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(mouse_y);
protected:
- // device overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
virtual void device_reset() override ATTR_COLD;
diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h
index 1cd770836d3..101edab554f 100644
--- a/src/devices/bus/intv/slot.h
+++ b/src/devices/bus/intv/slot.h
@@ -102,10 +102,7 @@ public:
intv_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: intv_cart_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
intv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/intv_ctrl/ctrl.h b/src/devices/bus/intv_ctrl/ctrl.h
index 71106e7d9f5..f3c728e977c 100644
--- a/src/devices/bus/intv_ctrl/ctrl.h
+++ b/src/devices/bus/intv_ctrl/ctrl.h
@@ -44,10 +44,7 @@ public:
intv_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: intv_control_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h
index 452165761a1..a027cec001d 100644
--- a/src/devices/bus/iq151/iq151.h
+++ b/src/devices/bus/iq151/iq151.h
@@ -91,10 +91,7 @@ public:
iq151cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: iq151cart_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
iq151cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h
index 225663a4da1..12660c93639 100644
--- a/src/devices/bus/isa/isa.h
+++ b/src/devices/bus/isa/isa.h
@@ -84,10 +84,7 @@ public:
isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&isa_tag, U &&opts, const char *dflt, bool fixed)
: isa8_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<U>(opts), dflt, fixed);
m_isa_bus.set_tag(std::forward<T>(isa_tag));
}
isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -283,10 +280,7 @@ public:
isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&isa_tag, U &&opts, const char *dflt, bool fixed)
: isa16_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<U>(opts), dflt, fixed);
m_isa_bus.set_tag(std::forward<T>(isa_tag));
}
isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/jakks_gamekey/slot.h b/src/devices/bus/jakks_gamekey/slot.h
index 5dc328ce853..99e627d2eee 100644
--- a/src/devices/bus/jakks_gamekey/slot.h
+++ b/src/devices/bus/jakks_gamekey/slot.h
@@ -60,10 +60,7 @@ public:
jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
: jakks_gamekey_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
virtual ~jakks_gamekey_slot_device();
diff --git a/src/devices/bus/jvs/jvs.h b/src/devices/bus/jvs/jvs.h
index 66b62c26ba9..011901e77a0 100644
--- a/src/devices/bus/jvs/jvs.h
+++ b/src/devices/bus/jvs/jvs.h
@@ -19,10 +19,7 @@ public:
jvs_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: jvs_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
jvs_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h
index 37cb6ee8f2a..60f6879665d 100644
--- a/src/devices/bus/kc/kc.h
+++ b/src/devices/bus/kc/kc.h
@@ -51,10 +51,7 @@ public:
kcexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: kcexp_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~kcexp_slot_device();
@@ -83,8 +80,8 @@ public:
protected:
kcexp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
- // device-level overrides
- virtual void device_validity_check(validity_checker &valid) const override;
+ // device_t implementation
+ virtual void device_validity_check(validity_checker &valid) const override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
device_kcexp_interface* m_cart;
@@ -102,10 +99,7 @@ public:
kccart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: kccart_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~kccart_slot_device();
diff --git a/src/devices/bus/lpci/pci.h b/src/devices/bus/lpci/pci.h
index ab96eb3de74..8e971321ce8 100644
--- a/src/devices/bus/lpci/pci.h
+++ b/src/devices/bus/lpci/pci.h
@@ -47,10 +47,7 @@ public:
pci_connector_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool fixed)
: pci_connector_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
pci_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~pci_connector_device();
diff --git a/src/devices/bus/mm2/exp.h b/src/devices/bus/mm2/exp.h
index 7a4f1284e99..64451ce2ed6 100644
--- a/src/devices/bus/mm2/exp.h
+++ b/src/devices/bus/mm2/exp.h
@@ -132,10 +132,7 @@ public:
mikromikko2_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&bus_tag, U &&opts, const char *dflt, bool fixed)
: mikromikko2_expansion_bus_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<U>(opts), dflt, fixed);
m_bus.set_tag(std::forward<T>(bus_tag));
}
mikromikko2_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/mtx/exp.h b/src/devices/bus/mtx/exp.h
index 0f180d16f4a..923dfa30bc0 100644
--- a/src/devices/bus/mtx/exp.h
+++ b/src/devices/bus/mtx/exp.h
@@ -32,10 +32,7 @@ public:
mtx_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: mtx_exp_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
mtx_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index b97be914218..bfbcdd84dd0 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -54,10 +54,7 @@ public:
nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts)
: nes_aladdin_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(opts), nullptr, false);
}
nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h
index 8059d234564..91feea1dc4a 100644
--- a/src/devices/bus/nes/datach.h
+++ b/src/devices/bus/nes/datach.h
@@ -56,10 +56,7 @@ public:
nes_datach_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts)
: nes_datach_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(opts), nullptr, false);
}
nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~nes_datach_slot_device();
diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h
index b76f8b7f035..81aa4ddf177 100644
--- a/src/devices/bus/nes/karastudio.h
+++ b/src/devices/bus/nes/karastudio.h
@@ -53,10 +53,7 @@ public:
nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts)
: nes_kstudio_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(opts), nullptr, false);
}
nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h
index bd3bfaa4384..715a2c70563 100644
--- a/src/devices/bus/nubus/nubus.h
+++ b/src/devices/bus/nubus/nubus.h
@@ -73,9 +73,7 @@ public:
nubus_slot_device(const machine_config &mconfig, T &&tag, device_t *owner, const char *nbtag, U &&opts, const char *dflt)
: nubus_slot_device(mconfig, tag, owner, (u32)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
+ set_options(std::forward<U>(opts), dflt, false);
set_nubus_slot(std::forward<T>(nbtag), tag);
}
diff --git a/src/devices/bus/oricext/oricext.h b/src/devices/bus/oricext/oricext.h
index e442cfdc4ac..8ee2fc4d041 100644
--- a/src/devices/bus/oricext/oricext.h
+++ b/src/devices/bus/oricext/oricext.h
@@ -24,10 +24,7 @@ public:
oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: oricext_connector(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/pc1512/mouse.h b/src/devices/bus/pc1512/mouse.h
index 64c6f9479b1..9d510673c6e 100644
--- a/src/devices/bus/pc1512/mouse.h
+++ b/src/devices/bus/pc1512/mouse.h
@@ -58,10 +58,7 @@ public:
pc1512_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: pc1512_mouse_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/pc8801/pc8801_exp.h b/src/devices/bus/pc8801/pc8801_exp.h
index b393fc8c40a..f3900a8a682 100644
--- a/src/devices/bus/pc8801/pc8801_exp.h
+++ b/src/devices/bus/pc8801/pc8801_exp.h
@@ -18,10 +18,7 @@ public:
pc8801_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: pc8801_exp_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pc8801_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~pc8801_exp_slot_device();
diff --git a/src/devices/bus/pc98_cbus/slot.h b/src/devices/bus/pc98_cbus/slot.h
index 61ad9523a31..5bb5fd6729a 100644
--- a/src/devices/bus/pc98_cbus/slot.h
+++ b/src/devices/bus/pc98_cbus/slot.h
@@ -157,10 +157,7 @@ public:
pc98_cbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cbus_tag, U &&opts, const char *dflt, bool fixed = false)
: pc98_cbus_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<U>(opts), dflt, fixed);
m_bus.set_tag(std::forward<T>(cbus_tag));
}
pc98_cbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/pc_kbd/pc_kbdc.h b/src/devices/bus/pc_kbd/pc_kbdc.h
index 78e683b1d5b..f0eb9ad76ab 100644
--- a/src/devices/bus/pc_kbd/pc_kbdc.h
+++ b/src/devices/bus/pc_kbd/pc_kbdc.h
@@ -31,10 +31,7 @@ public:
pc_kbdc_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: pc_kbdc_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -52,7 +49,7 @@ public:
void data_write_from_kb(int state);
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_resolve_objects() override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
@@ -74,7 +71,7 @@ protected:
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(PC_KBDC, pc_kbdc_device)
@@ -88,15 +85,13 @@ public:
void set_pc_kbdc_device();
- //
+ // inline configuration
+ void set_pc_kbdc(device_t *kbdc_device) { m_pc_kbdc = dynamic_cast<pc_kbdc_device *>(kbdc_device); }
+
// Override the clock_write and data_write methods in a keyboard implementation
- //
virtual void clock_write(int state);
virtual void data_write(int state);
- // inline configuration
- void set_pc_kbdc(device_t *kbdc_device) { m_pc_kbdc = dynamic_cast<pc_kbdc_device *>(kbdc_device); }
-
protected:
device_pc_kbd_interface(const machine_config &mconfig, device_t &device);
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index cb022445335..371c1a5b5c4 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -70,10 +70,7 @@ public:
pce_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, const char *interface)
: pce_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
set_intf(interface);
}
@@ -111,7 +108,7 @@ protected:
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(PCE_CART_SLOT, pce_cart_slot_device)
#endif // MAME_BUS_PCE_PCE_SLOT_H
diff --git a/src/devices/bus/pce_ctrl/pcectrl.h b/src/devices/bus/pce_ctrl/pcectrl.h
index ac3aa841fbb..5e0715eeea5 100644
--- a/src/devices/bus/pce_ctrl/pcectrl.h
+++ b/src/devices/bus/pce_ctrl/pcectrl.h
@@ -29,10 +29,7 @@ public:
pce_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: pce_control_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pce_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
diff --git a/src/devices/bus/pci/pci_slot.h b/src/devices/bus/pci/pci_slot.h
index 3d63159437c..34b34265f04 100644
--- a/src/devices/bus/pci/pci_slot.h
+++ b/src/devices/bus/pci/pci_slot.h
@@ -22,10 +22,7 @@ public:
pci_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, u8 slot, u8 irqa, u8 irqb, u8 irqc, u8 irqd, const char *dflt)
: pci_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
m_slot = slot;
m_irq[0] = irqa;
m_irq[1] = irqb;
diff --git a/src/devices/bus/pencil2/slot.h b/src/devices/bus/pencil2/slot.h
index 161437380e8..f26fdcf2804 100644
--- a/src/devices/bus/pencil2/slot.h
+++ b/src/devices/bus/pencil2/slot.h
@@ -26,10 +26,7 @@ public:
pencil2_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: pencil2_memexp_slot_device(mconfig, tag, owner)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pencil2_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
diff --git a/src/devices/bus/pet/cass.h b/src/devices/bus/pet/cass.h
index c0f53276733..8645c878cd7 100644
--- a/src/devices/bus/pet/cass.h
+++ b/src/devices/bus/pet/cass.h
@@ -46,10 +46,7 @@ public:
pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: pet_datassette_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/pet/user.h b/src/devices/bus/pet/user.h
index 99a2e76cf4f..250f03f5129 100644
--- a/src/devices/bus/pet/user.h
+++ b/src/devices/bus/pet/user.h
@@ -40,10 +40,7 @@ public:
pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: pet_user_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -88,7 +85,7 @@ public:
void write_m(int state);
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_config_complete() override;
virtual void device_start() override ATTR_COLD;
diff --git a/src/devices/bus/pofo/exp.h b/src/devices/bus/pofo/exp.h
index 9dd1dbe9ffa..39f9b95b274 100644
--- a/src/devices/bus/pofo/exp.h
+++ b/src/devices/bus/pofo/exp.h
@@ -92,10 +92,7 @@ public:
portfolio_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
: portfolio_expansion_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
portfolio_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/psi_kbd/psi_kbd.h b/src/devices/bus/psi_kbd/psi_kbd.h
index e2ba0f6f642..a428f7452a4 100644
--- a/src/devices/bus/psi_kbd/psi_kbd.h
+++ b/src/devices/bus/psi_kbd/psi_kbd.h
@@ -48,10 +48,7 @@ public:
psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *dflt)
: psi_keyboard_bus_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- psi_keyboard_devices(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(psi_keyboard_devices, dflt, false);
}
psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~psi_keyboard_bus_device();
@@ -70,7 +67,7 @@ public:
uint8_t key_data_r() { return m_key_data; }
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
virtual void device_reset() override ATTR_COLD;
@@ -99,7 +96,7 @@ protected:
psi_keyboard_bus_device *m_host;
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(PSI_KEYBOARD_INTERFACE, psi_keyboard_bus_device)
#endif // MAME_BUS_PSI_KBD_PSI_KBD_H
diff --git a/src/devices/bus/psion/honda/slot.h b/src/devices/bus/psion/honda/slot.h
index 5f7eeef0165..196de522abd 100644
--- a/src/devices/bus/psion/honda/slot.h
+++ b/src/devices/bus/psion/honda/slot.h
@@ -48,10 +48,7 @@ public:
psion_honda_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: psion_honda_slot_device(mconfig, tag, owner)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
psion_honda_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/psx/ctlrport.h b/src/devices/bus/psx/ctlrport.h
index 24e65ecedb0..486c68c7dad 100644
--- a/src/devices/bus/psx/ctlrport.h
+++ b/src/devices/bus/psx/ctlrport.h
@@ -114,10 +114,7 @@ public:
psx_controller_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: psx_controller_port_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/rs232/rs232.h b/src/devices/bus/rs232/rs232.h
index 56fb07e69ee..296a528ee8f 100644
--- a/src/devices/bus/rs232/rs232.h
+++ b/src/devices/bus/rs232/rs232.h
@@ -116,10 +116,7 @@ public:
rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: rs232_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~rs232_port_device();
diff --git a/src/devices/bus/saitek_osa/expansion.h b/src/devices/bus/saitek_osa/expansion.h
index 3646e663bad..d7a25d39863 100644
--- a/src/devices/bus/saitek_osa/expansion.h
+++ b/src/devices/bus/saitek_osa/expansion.h
@@ -50,10 +50,7 @@ public:
saitekosa_expansion_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts) :
saitekosa_expansion_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(opts), nullptr, false);
}
saitekosa_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
diff --git a/src/devices/bus/samcoupe/expansion/expansion.h b/src/devices/bus/samcoupe/expansion/expansion.h
index c052de71741..a38fe1c791e 100644
--- a/src/devices/bus/samcoupe/expansion/expansion.h
+++ b/src/devices/bus/samcoupe/expansion/expansion.h
@@ -63,10 +63,7 @@ public:
samcoupe_expansion_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts)
: samcoupe_expansion_device(mconfig, tag, owner, uint32_t(0))
{
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(opts), nullptr, false);
}
samcoupe_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/samcoupe/mouse/mouseport.h b/src/devices/bus/samcoupe/mouse/mouseport.h
index f7b188e5e56..bf56a527bf5 100644
--- a/src/devices/bus/samcoupe/mouse/mouseport.h
+++ b/src/devices/bus/samcoupe/mouse/mouseport.h
@@ -39,10 +39,7 @@ public:
samcoupe_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts)
: samcoupe_mouse_port_device(mconfig, tag, owner, uint32_t(0))
{
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(std::forward<T>(opts), nullptr, false);
}
samcoupe_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h
index 261042a1ab1..4708c0f431a 100644
--- a/src/devices/bus/saturn/sat_slot.h
+++ b/src/devices/bus/saturn/sat_slot.h
@@ -71,10 +71,7 @@ public:
sat_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sat_cart_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~sat_cart_slot_device();
diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h
index 7f320b4fc42..7aa5251dad5 100644
--- a/src/devices/bus/sega8/sega8_slot.h
+++ b/src/devices/bus/sega8/sega8_slot.h
@@ -186,10 +186,7 @@ public:
sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sg1000_cart_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sg1000_cart"; }
@@ -206,10 +203,7 @@ public:
omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: omv_cart_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sg1000_cart"; }
@@ -226,10 +220,7 @@ public:
sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sc3000_cart_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sg1000_cart"; }
@@ -246,10 +237,7 @@ public:
sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sg1000mk3_cart_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sms_cart,sg1000_cart"; }
@@ -266,10 +254,7 @@ public:
sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sms_cart_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sms_cart"; }
@@ -286,10 +271,7 @@ public:
gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: gamegear_cart_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "gamegear_cart"; }
@@ -307,10 +289,7 @@ public:
sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sms_card_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sms_card"; }
@@ -327,10 +306,7 @@ public:
sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sg1000_card_slot_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "sg1000_cart"; }
diff --git a/src/devices/bus/segaai/segaai_exp.h b/src/devices/bus/segaai/segaai_exp.h
index 2eef6014261..db6714999ef 100644
--- a/src/devices/bus/segaai/segaai_exp.h
+++ b/src/devices/bus/segaai/segaai_exp.h
@@ -19,10 +19,7 @@ public:
segaai_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt)
: segaai_exp_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
segaai_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual ~segaai_exp_slot_device();
diff --git a/src/devices/bus/sg1000_exp/sg1000exp.h b/src/devices/bus/sg1000_exp/sg1000exp.h
index 53c1c486338..6bab57564e1 100644
--- a/src/devices/bus/sg1000_exp/sg1000exp.h
+++ b/src/devices/bus/sg1000_exp/sg1000exp.h
@@ -31,10 +31,7 @@ public:
sg1000_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool const fixed)
: sg1000_expansion_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
@@ -46,7 +43,7 @@ public:
bool is_writeable(uint8_t offset);
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
private:
@@ -76,7 +73,7 @@ protected:
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(SG1000_EXPANSION_SLOT, sg1000_expansion_slot_device)
diff --git a/src/devices/bus/sg1000_exp/sk1100prn.h b/src/devices/bus/sg1000_exp/sk1100prn.h
index 9dfcfca5a6c..37c99682881 100644
--- a/src/devices/bus/sg1000_exp/sk1100prn.h
+++ b/src/devices/bus/sg1000_exp/sk1100prn.h
@@ -31,10 +31,7 @@ public:
sk1100_printer_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sk1100_printer_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sk1100_printer_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
diff --git a/src/devices/bus/sms_exp/smsexp.h b/src/devices/bus/sms_exp/smsexp.h
index 88a1b4aa613..042a946ba34 100644
--- a/src/devices/bus/sms_exp/smsexp.h
+++ b/src/devices/bus/sms_exp/smsexp.h
@@ -52,10 +52,7 @@ public:
sms_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sms_expansion_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~sms_expansion_slot_device();
@@ -72,14 +69,14 @@ public:
bool device_present() const { return bool(m_device); }
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
device_sms_expansion_slot_interface *m_device;
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(SMS_EXPANSION_SLOT, sms_expansion_slot_device)
diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h
index 59f920fa900..f8fdc8ec0f3 100644
--- a/src/devices/bus/snes/snes_slot.h
+++ b/src/devices/bus/snes/snes_slot.h
@@ -256,10 +256,7 @@ public:
sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
: sns_cart_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "snes_cart"; }
@@ -276,10 +273,7 @@ public:
sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sns_sufami_cart_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "st_cart"; }
@@ -296,10 +290,7 @@ public:
sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: sns_bsx_cart_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const noexcept override { return "bspack"; }
@@ -307,7 +298,7 @@ public:
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(SNS_CART_SLOT, sns_cart_slot_device)
DECLARE_DEVICE_TYPE(SNS_SUFAMI_CART_SLOT, sns_sufami_cart_slot_device)
DECLARE_DEVICE_TYPE(SNS_BSX_CART_SLOT, sns_bsx_cart_slot_device)
diff --git a/src/devices/bus/snes_ctrl/ctrl.h b/src/devices/bus/snes_ctrl/ctrl.h
index 3b9ed59844d..9f427b67805 100644
--- a/src/devices/bus/snes_ctrl/ctrl.h
+++ b/src/devices/bus/snes_ctrl/ctrl.h
@@ -54,10 +54,7 @@ public:
snes_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: snes_control_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~snes_control_port_device();
diff --git a/src/devices/bus/ss50/interface.h b/src/devices/bus/ss50/interface.h
index efffd46e7f0..df53cfc5a66 100644
--- a/src/devices/bus/ss50/interface.h
+++ b/src/devices/bus/ss50/interface.h
@@ -31,10 +31,7 @@ public:
ss50_interface_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: ss50_interface_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
@@ -55,7 +52,7 @@ public:
void f600_1200_w(int state);
protected:
- // device-specific overrides
+ // device_t implementation
virtual void device_resolve_objects() override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
@@ -100,7 +97,7 @@ private:
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(SS50_INTERFACE, ss50_interface_port_device)
void ss50_default_2rs_devices(device_slot_interface &device);
diff --git a/src/devices/bus/sunmouse/sunmouse.h b/src/devices/bus/sunmouse/sunmouse.h
index e36e94bd6fb..12f6cd98603 100644
--- a/src/devices/bus/sunmouse/sunmouse.h
+++ b/src/devices/bus/sunmouse/sunmouse.h
@@ -20,10 +20,7 @@ public:
sun_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sun_mouse_port_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
sun_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
virtual ~sun_mouse_port_device();
diff --git a/src/devices/bus/tanbus/keyboard/keyboard.h b/src/devices/bus/tanbus/keyboard/keyboard.h
index cb4020f22b3..e9f8f7e6261 100644
--- a/src/devices/bus/tanbus/keyboard/keyboard.h
+++ b/src/devices/bus/tanbus/keyboard/keyboard.h
@@ -28,10 +28,7 @@ public:
microtan_kbd_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slot_options, const char *default_option)
: microtan_kbd_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- slot_options(*this);
- set_default_option(default_option);
- set_fixed(false);
+ set_options(std::forward<T>(slot_options), default_option, false);
}
microtan_kbd_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0);
@@ -47,7 +44,7 @@ public:
void reset_w(int state) { m_reset_handler(state); }
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
private:
@@ -73,7 +70,7 @@ protected:
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(MICROTAN_KBD_SLOT, microtan_kbd_slot_device)
void microtan_kbd_devices(device_slot_interface &device);
diff --git a/src/devices/bus/tanbus/tanbus.h b/src/devices/bus/tanbus/tanbus.h
index d8dfe06c95e..7783dc8e3ea 100644
--- a/src/devices/bus/tanbus/tanbus.h
+++ b/src/devices/bus/tanbus/tanbus.h
@@ -35,10 +35,7 @@ public:
tanbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, int num, T &&opts, const char *dflt)
: tanbus_slot_device(mconfig, tag, owner, DERIVED_CLOCK(1, 1))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
set_tanbus_slot(num);
}
tanbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/technics/kn5000/kn5000_extension.h b/src/devices/bus/technics/kn5000/kn5000_extension.h
index d8befdd9961..823dd8a1fe3 100644
--- a/src/devices/bus/technics/kn5000/kn5000_extension.h
+++ b/src/devices/bus/technics/kn5000/kn5000_extension.h
@@ -17,10 +17,7 @@ public:
kn5000_extension_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: kn5000_extension_connector(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
kn5000_extension_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/ti99/joyport/joyport.h b/src/devices/bus/ti99/joyport/joyport.h
index 85d2f8acb53..bf431c94197 100644
--- a/src/devices/bus/ti99/joyport/joyport.h
+++ b/src/devices/bus/ti99/joyport/joyport.h
@@ -62,10 +62,7 @@ public:
joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt)
: joyport_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
}
joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h
index 7d9c0b6f9e9..3f4c04a6ae7 100644
--- a/src/devices/bus/ti99/peb/peribox.h
+++ b/src/devices/bus/ti99/peb/peribox.h
@@ -231,10 +231,7 @@ public:
peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, int slot, U &&opts, const char *dflt)
: peribox_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<U>(opts), dflt, false);
m_slotnumber = slot;
}
diff --git a/src/devices/bus/tmc600/euro.h b/src/devices/bus/tmc600/euro.h
index bf2e95ded78..648b9ab5048 100644
--- a/src/devices/bus/tmc600/euro.h
+++ b/src/devices/bus/tmc600/euro.h
@@ -79,10 +79,7 @@ public:
tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: tmc600_eurobus_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
diff --git a/src/devices/bus/tvc/tvc.h b/src/devices/bus/tvc/tvc.h
index 840cb9ef717..0ca1ba8cfe9 100644
--- a/src/devices/bus/tvc/tvc.h
+++ b/src/devices/bus/tvc/tvc.h
@@ -94,10 +94,7 @@ public:
tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: tvcexp_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
@@ -116,7 +113,7 @@ public:
void io_write(offs_t offset, uint8_t data);
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_start() override ATTR_COLD;
devcb_write_line m_out_irq_cb;
@@ -125,7 +122,7 @@ protected:
device_tvcexp_interface* m_cart;
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(TVCEXP_SLOT, tvcexp_slot_device)
diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h
index 333784e3637..ba153b42cde 100644
--- a/src/devices/bus/vcs/vcs_slot.h
+++ b/src/devices/bus/vcs/vcs_slot.h
@@ -21,10 +21,7 @@ public:
vcs_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: vcs_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
vcs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~vcs_cart_slot_device();
@@ -101,7 +98,7 @@ protected:
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(VCS_CART_SLOT, vcs_cart_slot_device)
#endif // MAME_BUS_VCS_VCS_SLOT_H
diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h
index fdfb96408d1..045c6724d1c 100644
--- a/src/devices/bus/vic10/exp.h
+++ b/src/devices/bus/vic10/exp.h
@@ -57,10 +57,7 @@ public:
vic10_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
: vic10_expansion_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
vic10_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h
index 02ae3e73dde..b27d44f0d08 100644
--- a/src/devices/bus/vic20/exp.h
+++ b/src/devices/bus/vic20/exp.h
@@ -57,10 +57,7 @@ public:
vic20_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
: vic20_expansion_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
vic20_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/vtech/ioexp/ioexp.h b/src/devices/bus/vtech/ioexp/ioexp.h
index 1df488770cd..c104c904c66 100644
--- a/src/devices/bus/vtech/ioexp/ioexp.h
+++ b/src/devices/bus/vtech/ioexp/ioexp.h
@@ -49,10 +49,7 @@ public:
vtech_ioexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner)
: vtech_ioexp_slot_device(mconfig, tag, owner, (uint32_t)0)
{
- option_reset();
- vtech_ioexp_slot_carts(*this);
- set_default_option(nullptr);
- set_fixed(false);
+ set_options(vtech_ioexp_slot_carts, nullptr, false);
}
vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~vtech_ioexp_slot_device();
diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h
index 308fedf97a3..a344e371ab5 100644
--- a/src/devices/bus/wswan/slot.h
+++ b/src/devices/bus/wswan/slot.h
@@ -137,10 +137,7 @@ public:
ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt)
: ws_cart_slot_device(mconfig, tag, owner, clock)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual ~ws_cart_slot_device();
diff --git a/src/devices/bus/wysekbd/wysekbd.h b/src/devices/bus/wysekbd/wysekbd.h
index f9372419a07..a1b4a107d3e 100644
--- a/src/devices/bus/wysekbd/wysekbd.h
+++ b/src/devices/bus/wysekbd/wysekbd.h
@@ -30,10 +30,7 @@ public:
wyse_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: wyse_keyboard_port_device(mconfig, tag, owner, 0U)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
// line handlers
@@ -41,7 +38,7 @@ public:
int data_r();
protected:
- // device-level overrides
+ // device_t implementation
virtual void device_config_complete() override;
virtual void device_start() override ATTR_COLD;
@@ -65,7 +62,7 @@ protected:
virtual void wysekbd_write_cmd(bool state) = 0;
};
-// device type definition
+// device type declaration
DECLARE_DEVICE_TYPE(WYSE_KEYBOARD, wyse_keyboard_port_device)
// standard options
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index b7d1a467565..ab199bcb058 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -445,10 +445,7 @@ public:
floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, U &&formats, bool fixed = false)
: floppy_connector(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
set_formats(std::forward<U>(formats));
}
diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h
index 539b25b569b..9d5d5f27651 100644
--- a/src/devices/machine/nscsi_bus.h
+++ b/src/devices/machine/nscsi_bus.h
@@ -58,10 +58,7 @@ public:
nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false)
: nscsi_connector(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~nscsi_connector();
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index f27684f08f9..6d79a264534 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -614,7 +614,7 @@ bool debugger_commands::mini_printf(std::ostream &stream, const std::vector<std:
address_space *tspace;
std::string s;
- for (u32 address = u32(number), taddress; mintf->translate(spacenum, device_memory_interface::TR_READ, taddress = address, tspace); address++)
+ for (offs_t address = offs_t(number), taddress; mintf->translate(spacenum, device_memory_interface::TR_READ, taddress = address, tspace); address++)
{
u8 const data = tspace->read_byte(taddress);
@@ -4591,57 +4591,51 @@ void debugger_commands::execute_memdump(const std::vector<std::string_view> &par
using namespace std::literals;
std::string filename = params.empty() ? "memdump.log"s : std::string(params[0]);
- FILE *const file = fopen(filename.c_str(), "w");
- if (!file)
+ std::ofstream file(filename);
+ if (!file.good())
{
m_console.printf("Error opening file %s\n", filename);
return;
}
+ file.imbue(std::locale::classic());
m_console.printf("Dumping memory maps to %s\n", filename);
- try
+ memory_interface_enumerator iter(*root);
+ std::vector<memory_entry> entries[2];
+ for (device_memory_interface &memory : iter)
{
- memory_interface_enumerator iter(*root);
- std::vector<memory_entry> entries[2];
- for (device_memory_interface &memory : iter)
+ for (int space = 0; space != memory.max_space_count(); space++)
{
- for (int space = 0; space != memory.max_space_count(); space++)
- if (memory.has_space(space))
- {
- address_space &sp = memory.space(space);
- bool octal = sp.is_octal();
- int nc = octal ? (sp.addr_width() + 2) / 3 : (sp.addr_width() + 3) / 4;
+ if (memory.has_space(space))
+ {
+ address_space &sp = memory.space(space);
+ bool octal = sp.is_octal();
+ int nc = octal ? (sp.addr_width() + 2) / 3 : (sp.addr_width() + 3) / 4;
- sp.dump_maps(entries[0], entries[1]);
- for (int mode = 0; mode < 2; mode ++)
+ sp.dump_maps(entries[0], entries[1]);
+ for (int mode = 0; mode < 2; mode ++)
+ {
+ util::stream_format(file, " %s '%s' space %s %s:\n", memory.device().type().fullname(), memory.device().tag(), sp.name(), mode ? "write" : "read");
+ for (memory_entry &entry : entries[mode])
{
- fprintf(file, " %s '%s' space %s %s:\n", memory.device().type().fullname(), memory.device().tag(), sp.name(), mode ? "write" : "read");
- for (memory_entry &entry : entries[mode])
- {
- if (octal)
- fprintf(file, "%0*o - %0*o:", nc, entry.start, nc, entry.end);
+ if (octal)
+ util::stream_format(file, "%0*o - %0*o:", nc, entry.start, nc, entry.end);
+ else
+ util::stream_format(file, "%0*x - %0*x:", nc, entry.start, nc, entry.end);
+ for (const auto &c : entry.context)
+ if (c.disabled)
+ util::stream_format(file, " %s[off]", c.view->name());
else
- fprintf(file, "%0*x - %0*x:", nc, entry.start, nc, entry.end);
- for (const auto &c : entry.context)
- if (c.disabled)
- fprintf(file, " %s[off]", c.view->name().c_str());
- else
- fprintf(file, " %s[%d]", c.view->name().c_str(), c.slot);
- fprintf(file, " %s\n", entry.entry->name().c_str());
- }
- fprintf(file, "\n");
+ util::stream_format(file, " %s[%d]", c.view->name(), c.slot);
+ util::stream_format(file, " %s\n", entry.entry->name());
}
- entries[0].clear();
- entries[1].clear();
+ util::stream_format(file, "\n");
}
+ entries[0].clear();
+ entries[1].clear();
+ }
}
- fclose(file);
- }
- catch (...)
- {
- fclose(file);
- throw;
}
}
diff --git a/src/emu/dislot.cpp b/src/emu/dislot.cpp
index 43d2ed96cdd..23e5992b7a1 100644
--- a/src/emu/dislot.cpp
+++ b/src/emu/dislot.cpp
@@ -14,21 +14,12 @@
#include "zippath.h"
-device_slot_interface::device_slot_interface(const machine_config &mconfig, device_t &device) :
- device_interface(device, "slot"),
- m_default_clock(DERIVED_CLOCK(1, 1)),
- m_default_option(nullptr),
- m_fixed(false),
- m_card_device(nullptr)
-{
-}
-
-device_slot_interface::~device_slot_interface()
-{
-}
+//**************************************************************************
+// device_slot_interface::slot_option
+//**************************************************************************
-device_slot_interface::slot_option::slot_option(const char *name, device_type devtype, bool selectable) :
+device_slot_interface::slot_option::slot_option(std::string_view name, device_type devtype, bool selectable) :
m_name(name),
m_devtype(devtype),
m_selectable(selectable),
@@ -39,81 +30,89 @@ device_slot_interface::slot_option::slot_option(const char *name, device_type de
{
}
-
-void device_slot_interface::interface_validity_check(validity_checker &valid) const
+device_slot_interface::slot_option &device_slot_interface::slot_option::clock(XTAL clock)
{
- if (m_default_option && (m_options.find(m_default_option) == m_options.end()))
- osd_printf_error("Default option '%s' does not correspond to any configured option\n", m_default_option);
+ clock.validate(util::string_format("Configuring slot option %s", m_name));
+ m_clock = clock.value();
+ return *this;
}
-device_slot_interface::slot_option &device_slot_interface::option_add(const char *name, device_type devtype)
-{
- if (!name || !*name)
- throw emu_fatalerror("slot '%s' attempt to add option without name\n", device().tag());
- const slot_option *const existing = option(name);
- if (existing)
- throw emu_fatalerror("slot '%s' duplicate option '%s'\n", device().tag(), name);
+//**************************************************************************
+// device_slot_interface
+//**************************************************************************
- return m_options.emplace(name, std::make_unique<slot_option>(name, devtype, true)).first->second->clock(m_default_clock);
+device_slot_interface::device_slot_interface(machine_config const &mconfig, device_t &device) :
+ device_interface(device, "slot"),
+ m_default_clock(DERIVED_CLOCK(1, 1)),
+ m_default_option(nullptr),
+ m_fixed(false),
+ m_card_device(nullptr)
+{
}
-
-device_slot_interface::slot_option &device_slot_interface::option_add_internal(const char *name, device_type devtype)
+device_slot_interface::~device_slot_interface()
{
- if (!name || !*name)
- throw emu_fatalerror("slot '%s' attempt to add option without name\n", device().tag());
+}
- const slot_option *const existing = option(name);
- if (existing)
- throw emu_fatalerror("slot '%s' duplicate option '%s'\n", device().tag(), name);
- return m_options.emplace(name, std::make_unique<slot_option>(name, devtype, false)).first->second->clock(m_default_clock);
+void device_slot_interface::interface_validity_check(validity_checker &valid) const
+{
+ // TODO: cast m_default_option to std::string_view when we have C++20
+ if (m_default_option && (m_options.find(m_default_option) == m_options.end()))
+ osd_printf_error("Default option '%s' does not correspond to any configured option\n", m_default_option);
}
-device_slot_interface::slot_option &device_slot_interface::option_replace(const char *name, device_type devtype)
+device_slot_interface::slot_option &device_slot_interface::do_add_option(std::string_view name, device_type devtype, bool selectable)
{
- if (!name || !*name)
- throw emu_fatalerror("slot '%s' attempt to replace option without name\n", device().tag());
+ if (name.empty())
+ throw emu_fatalerror("slot '%s' attempt to add option without name\n", device().tag());
- auto search = m_options.find(name);
- if (search == m_options.end())
- throw emu_fatalerror("slot '%s' attempt to replace nonexistent option '%s'\n", device().tag(), name);
+ slot_option const *const existing = option(name);
+ if (existing)
+ throw emu_fatalerror("slot '%s' duplicate option '%s'\n", device().tag(), name);
- return (search->second = std::make_unique<slot_option>(name, devtype, true))->clock(m_default_clock);
+ auto const ins = m_options.emplace(name, slot_option_ptr());
+ assert(ins.second);
+ ins.first->second = std::make_unique<slot_option>(ins.first->first, devtype, selectable);
+ return ins.first->second->clock(m_default_clock);
}
-device_slot_interface::slot_option &device_slot_interface::option_replace_internal(const char *name, device_type devtype)
+device_slot_interface::slot_option &device_slot_interface::do_replace_option(std::string_view name, device_type devtype, bool selectable)
{
- if (!name || !*name)
+ if (name.empty())
throw emu_fatalerror("slot '%s' attempt to replace option without name\n", device().tag());
- auto search = m_options.find(name);
- if (search == m_options.end())
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const found = m_options.find(std::string(name));
+ if (found == m_options.end())
throw emu_fatalerror("slot '%s' attempt to replace nonexistent option '%s'\n", device().tag(), name);
- return (search->second = std::make_unique<slot_option>(name, devtype, false))->clock(m_default_clock);
+ found->second = std::make_unique<slot_option>(found->first, devtype, selectable);
+ return found->second->clock(m_default_clock);
}
-void device_slot_interface::option_remove(const char *name)
+void device_slot_interface::option_remove(std::string_view name)
{
- if (!name || !*name)
+ if (name.empty())
throw emu_fatalerror("slot '%s' attempt to remove option without name\n", device().tag());
- if (m_options.erase(name) == 0)
+ // TODO: get rid of temporary std::string when we have C++20
+ if (m_options.erase(std::string(name)) == 0)
throw emu_fatalerror("slot '%s' attempt to remove nonexistent option '%s'\n", device().tag(), name);
}
-device_slot_interface::slot_option *device_slot_interface::config_option(const char *name)
+device_slot_interface::slot_option &device_slot_interface::config_option(std::string_view name)
{
- auto const search = m_options.find(name);
- if (search != m_options.end())
- return search->second.get();
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const found = m_options.find(std::string(name));
+ if (found != m_options.end())
+ return *found->second;
throw emu_fatalerror("slot '%s' has no option '%s'\n", device().tag(), name);
}
@@ -124,26 +123,32 @@ bool device_slot_interface::has_selectable_options() const
if (!fixed())
{
for (auto &option : option_list())
+ {
if (option.second->selectable())
return true;
+ }
}
return false;
}
-const device_slot_interface::slot_option *device_slot_interface::option(const char *name) const
+device_slot_interface::slot_option const *device_slot_interface::option(std::string_view name) const
{
- if (name)
- {
- auto const search = m_options.find(name);
- if (search != m_options.end())
- return search->second.get();
- }
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const found = m_options.find(std::string(name));
+ if (found != m_options.end())
+ return found->second.get();
+
return nullptr;
}
-get_default_card_software_hook::get_default_card_software_hook(const std::string &path, std::function<bool(util::core_file &, std::string&)> &&get_hashfile_extrainfo)
+
+//**************************************************************************
+// get_default_card_software_hook
+//**************************************************************************
+
+get_default_card_software_hook::get_default_card_software_hook(std::string const &path, get_hashfile_extrainfo_func &&get_hashfile_extrainfo)
: m_get_hashfile_extrainfo(std::move(get_hashfile_extrainfo))
, m_called_get_hashfile_extrainfo(false)
, m_has_hash_extrainfo(false)
diff --git a/src/emu/dislot.h b/src/emu/dislot.h
index f6e1f86fcb3..75308b42ce0 100644
--- a/src/emu/dislot.h
+++ b/src/emu/dislot.h
@@ -9,6 +9,13 @@
#ifndef MAME_EMU_DISLOT_H
#define MAME_EMU_DISLOT_H
+#include <functional>
+#include <memory>
+#include <string>
+#include <string_view>
+#include <unordered_map>
+
+
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -17,7 +24,9 @@ class get_default_card_software_hook
{
// goofy "hook" to pass to device_slot_interface::get_default_card_software
public:
- get_default_card_software_hook(const std::string &path, std::function<bool(util::core_file &, std::string&)> &&get_hashfile_extrainfo);
+ using get_hashfile_extrainfo_func = std::function<bool (util::core_file &, std::string &)>;
+
+ get_default_card_software_hook(std::string const &path, get_hashfile_extrainfo_func &&get_hashfile_extrainfo);
// accesses the image file to be scrutinized by get_default_card_software(); is
// nullptr in the case of images loaded by software list
@@ -30,12 +39,12 @@ public:
bool hashfile_extrainfo(std::string &extrainfo);
private:
- util::core_file::ptr m_image_file;
- std::string m_file_type;
- std::function<bool(util::core_file &, std::string&)> m_get_hashfile_extrainfo;
- bool m_called_get_hashfile_extrainfo;
- bool m_has_hash_extrainfo;
- std::string m_hash_extrainfo;
+ util::core_file::ptr m_image_file;
+ std::string m_file_type;
+ get_hashfile_extrainfo_func m_get_hashfile_extrainfo;
+ bool m_called_get_hashfile_extrainfo;
+ bool m_has_hash_extrainfo;
+ std::string m_hash_extrainfo;
};
@@ -46,9 +55,9 @@ public:
class slot_option
{
public:
- slot_option(char const *name, device_type devtype, bool selectable);
+ slot_option(std::string_view name, device_type devtype, bool selectable);
- char const *name() const { return m_name; }
+ std::string_view name() const { return m_name; }
device_type devtype() const { return m_devtype; }
bool selectable() const { return m_selectable; }
char const *default_bios() const { return m_default_bios; }
@@ -60,11 +69,11 @@ public:
template <typename Object> slot_option &machine_config(Object &&cb) { m_machine_config = std::forward<Object>(cb); return *this; }
slot_option &input_device_defaults(input_device_default const *dev_inp_def) { m_input_device_defaults = dev_inp_def; return *this; }
slot_option &clock(u32 clock) { m_clock = clock; return *this; }
- slot_option &clock(XTAL clock) { clock.validate(std::string("Configuring slot option ") + m_name); m_clock = clock.value(); return *this; }
+ slot_option &clock(XTAL clock);
private:
// internal state
- char const *const m_name;
+ std::string_view const m_name;
device_type const m_devtype;
bool const m_selectable;
char const *m_default_bios;
@@ -73,6 +82,9 @@ public:
u32 m_clock;
};
+ using slot_option_ptr = std::unique_ptr<slot_option>;
+ using slot_option_map = std::unordered_map<std::string, slot_option_ptr>;
+
virtual ~device_slot_interface();
/// \brief Set whether slot is fixed
@@ -97,7 +109,7 @@ public:
/// valid for the lifetime of the device (or until another default
/// option is configured).
/// \sa default_option
- device_slot_interface &set_default_option(const char *option) { m_default_option = option; return *this; }
+ device_slot_interface &set_default_option(char const *option) { m_default_option = option; return *this; }
/// \brief Clear options
///
@@ -116,7 +128,7 @@ public:
/// description is used in the user interface.
/// \return A reference to the added option for additional
/// configuration.
- slot_option &option_add(char const *option, device_type devtype);
+ slot_option &option_add(std::string_view option, device_type devtype) { return do_add_option(option, devtype, true); }
/// \brief Add an internal option
///
@@ -130,15 +142,42 @@ public:
/// description is used in the user interface.
/// \return A reference to the added option for additional
/// configuration.
- slot_option &option_add_internal(const char *option, device_type devtype);
+ slot_option &option_add_internal(std::string_view option, device_type devtype) { return do_add_option(option, devtype, false); }
- slot_option &option_replace(const char *option, device_type devtype);
- slot_option &option_replace_internal(const char *option, device_type devtype);
- void option_remove(const char *option);
+ slot_option &option_replace(std::string_view option, device_type devtype) { return do_replace_option(option, devtype, true); }
+ slot_option &option_replace_internal(std::string_view option, device_type devtype) { return do_replace_option(option, devtype, false); }
+ void option_remove(std::string_view option);
+
+ /// \brief Set options
+ ///
+ /// Removes all previously added options, calls a functoid to add
+ /// options, sets the default option, and sets whether the slot can
+ /// only be configured programmatically.
+ /// \param [in] options The functoid to call to add options, with a
+ /// reference to the slot interface passed as the only argument.
+ /// Should call #option_add or #option_add_internal to add
+ /// options.
+ /// \param [in] default_option The name of the default option. This
+ /// must be correspond to an option added using #option_add or
+ /// #option_add_internal, or be nullptr to not load any card
+ /// device by default. The string is not copied and must remain
+ /// valid for the lifetime of the device (or until another default
+ /// option is configured).
+ /// \param [in] fixed True to mark the slot as fixed, or false to
+ /// mark it user-configurable.
+ /// \sa option_add option_add_internal set_default_option set_fixed
+ template <typename Object>
+ void set_options(Object &&options, char const *default_option, bool fixed)
+ {
+ option_reset();
+ std::forward<Object>(options)(*this);
+ set_default_option(default_option);
+ set_fixed(fixed);
+ }
- void set_option_default_bios(const char *option, const char *default_bios) { config_option(option)->default_bios(default_bios); }
- template <typename T> void set_option_machine_config(const char *option, T &&machine_config) { config_option(option)->machine_config(std::forward<T>(machine_config)); }
- void set_option_device_input_defaults(const char *option, const input_device_default *default_input) { config_option(option)->input_device_defaults(default_input); }
+ void set_option_default_bios(std::string_view option, char const *default_bios) { config_option(option).default_bios(default_bios); }
+ template <typename T> void set_option_machine_config(std::string_view option, T &&machine_config) { config_option(option).machine_config(std::forward<T>(machine_config)); }
+ void set_option_device_input_defaults(std::string_view option, input_device_default const *default_input) { config_option(option).input_device_defaults(default_input); }
/// \brief Returns whether the slot is fixed
///
@@ -159,14 +198,14 @@ public:
/// otherwise.
bool has_selectable_options() const;
- const char *default_option() const { return m_default_option; }
- const std::unordered_map<std::string, std::unique_ptr<slot_option>> &option_list() const { return m_options; }
- const slot_option *option(const char *name) const;
+ char const *default_option() const { return m_default_option; }
+ slot_option_map const &option_list() const { return m_options; }
+ slot_option const *option(std::string_view name) const;
virtual std::string get_default_card_software(get_default_card_software_hook &hook) const { return std::string(); }
device_t *get_card_device() const { return m_card_device; }
void set_card_device(device_t *dev) { m_card_device = dev; }
- const char *slot_name() const { return device().tag() + 1; }
- slot_option &option_set(const char *tag, device_type devtype) { m_default_option = tag; m_fixed = true; return option_add_internal(tag, devtype); }
+ std::string_view slot_name() const { return device().tag() + 1; }
+ slot_option &option_set(char const *tag, device_type devtype) { m_default_option = tag; m_fixed = true; return option_add_internal(tag, devtype); }
protected:
device_slot_interface(machine_config const &mconfig, device_t &device);
@@ -175,13 +214,15 @@ protected:
private:
// internal state
- std::unordered_map<std::string, std::unique_ptr<slot_option>> m_options;
+ slot_option_map m_options;
u32 m_default_clock;
char const *m_default_option;
bool m_fixed;
device_t *m_card_device;
- slot_option *config_option(char const *option);
+ slot_option &do_add_option(std::string_view option, device_type devtype, bool selectable);
+ slot_option &do_replace_option(std::string_view option, device_type devtype, bool selectable);
+ slot_option &config_option(std::string_view option);
};
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index fa75c885c6d..8f9177e6d4b 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -291,8 +291,8 @@ namespace
class slot_option_entry : public core_options::entry
{
public:
- slot_option_entry(const char *name, slot_option &host)
- : entry(name)
+ slot_option_entry(std::string &&name, slot_option &host)
+ : entry(std::move(name))
, m_host(host)
{
}
@@ -566,7 +566,7 @@ bool emu_options::add_and_remove_slot_options()
for (const device_slot_interface &slot : slot_interface_enumerator(config.root_device()))
{
// come up with the canonical name of the slot
- const char *slot_option_name = slot.slot_name();
+ const std::string_view slot_option_name = slot.slot_name();
// erase this option from existing (so we don't purge it later)
existing.remove(slot_option_name);
@@ -588,7 +588,7 @@ bool emu_options::add_and_remove_slot_options()
add_header(header);
// create a new entry in the options
- auto new_entry = new_option.setup_option_entry(slot_option_name);
+ auto new_entry = new_option.setup_option_entry(std::string(slot_option_name));
// and add it
add_entry(std::move(new_entry), header);
@@ -1025,16 +1025,18 @@ emu_options::software_options emu_options::evaluate_initial_softlist_options(con
// find_slot_option
//-------------------------------------------------
-const slot_option *emu_options::find_slot_option(const std::string &device_name) const
+const slot_option *emu_options::find_slot_option(std::string_view device_name) const
{
- auto iter = m_slot_options.find(device_name);
- return iter != m_slot_options.end() ? &iter->second : nullptr;
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const iter = m_slot_options.find(std::string(device_name));
+ return (iter != m_slot_options.end()) ? &iter->second : nullptr;
}
-slot_option *emu_options::find_slot_option(const std::string &device_name)
+slot_option *emu_options::find_slot_option(std::string_view device_name)
{
- auto iter = m_slot_options.find(device_name);
- return iter != m_slot_options.end() ? &iter->second : nullptr;
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const iter = m_slot_options.find(std::string(device_name));
+ return (iter != m_slot_options.end()) ? &iter->second : nullptr;
}
@@ -1043,16 +1045,16 @@ slot_option *emu_options::find_slot_option(const std::string &device_name)
// slot_option
//-------------------------------------------------
-const slot_option &emu_options::slot_option(const std::string &device_name) const
+const slot_option &emu_options::slot_option(std::string_view device_name) const
{
- const ::slot_option *opt = find_slot_option(device_name);
+ ::slot_option const *const opt = find_slot_option(device_name);
assert(opt && "Attempt to access non-existent slot option");
return *opt;
}
-slot_option &emu_options::slot_option(const std::string &device_name)
+slot_option &emu_options::slot_option(std::string_view device_name)
{
- ::slot_option *opt = find_slot_option(device_name);
+ ::slot_option *const opt = find_slot_option(device_name);
assert(opt && "Attempt to access non-existent slot option");
return *opt;
}
@@ -1062,16 +1064,18 @@ slot_option &emu_options::slot_option(const std::string &device_name)
// image_option
//-------------------------------------------------
-const image_option &emu_options::image_option(const std::string &device_name) const
+const image_option &emu_options::image_option(std::string_view device_name) const
{
- auto iter = m_image_options.find(device_name);
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const iter = m_image_options.find(std::string(device_name));
assert(iter != m_image_options.end() && "Attempt to access non-existent image option");
return *iter->second;
}
-image_option &emu_options::image_option(const std::string &device_name)
+image_option &emu_options::image_option(std::string_view device_name)
{
- auto iter = m_image_options.find(device_name);
+ // TODO: get rid of temporary std::string when we have C++20
+ auto const iter = m_image_options.find(std::string(device_name));
assert(iter != m_image_options.end() && "Attempt to access non-existent image option");
return *iter->second;
}
@@ -1266,13 +1270,13 @@ void slot_option::set_bios(std::string &&text)
// slot_option::setup_option_entry
//-------------------------------------------------
-core_options::entry::shared_ptr slot_option::setup_option_entry(const char *name)
+core_options::entry::shared_ptr slot_option::setup_option_entry(std::string &&name)
{
// this should only be called once
assert(m_entry.expired());
// create the entry and return it
- core_options::entry::shared_ptr entry = std::make_shared<slot_option_entry>(name, *this);
+ auto entry = std::make_shared<slot_option_entry>(std::move(name), *this);
m_entry = entry;
return entry;
}
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 2d72580a759..10fdbb771d6 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -228,7 +228,7 @@ public:
void set_default_card_software(std::string &&s);
// instantiates an option entry (don't call outside of emuopts.cpp)
- core_options::entry::shared_ptr setup_option_entry(const char *name);
+ core_options::entry::shared_ptr setup_option_entry(std::string &&name);
private:
void possibly_changed(const std::string &old_value);
@@ -483,16 +483,15 @@ public:
short http_port() const { return int_value(OPTION_HTTP_PORT); }
const char *http_root() const { return value(OPTION_HTTP_ROOT); }
- // slots and devices - the values for these are stored outside of the core_options
- // structure
- const ::slot_option &slot_option(const std::string &device_name) const;
- ::slot_option &slot_option(const std::string &device_name);
- const ::slot_option *find_slot_option(const std::string &device_name) const;
- ::slot_option *find_slot_option(const std::string &device_name);
- bool has_slot_option(const std::string &device_name) const { return find_slot_option(device_name) ? true : false; }
- const ::image_option &image_option(const std::string &device_name) const;
- ::image_option &image_option(const std::string &device_name);
- bool has_image_option(const std::string &device_name) const { return m_image_options.find(device_name) != m_image_options.end(); }
+ // slots and devices - the values for these are stored outside of the core_options structure
+ const ::slot_option &slot_option(std::string_view device_name) const;
+ ::slot_option &slot_option(std::string_view device_name);
+ const ::slot_option *find_slot_option(std::string_view device_name) const;
+ ::slot_option *find_slot_option(std::string_view device_name);
+ bool has_slot_option(std::string_view device_name) const { return bool(find_slot_option(std::string(device_name))); } // TODO: get rid of temporary std::string when we have C++20
+ const ::image_option &image_option(std::string_view device_name) const;
+ ::image_option &image_option(std::string_view device_name);
+ bool has_image_option(std::string_view device_name) const { return m_image_options.find(std::string(device_name)) != m_image_options.end(); } // TODO: get rid of temporary std::string when we have C++20
protected:
virtual void command_argument_processed() override;
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index e2ed418ca72..e21b9dfd2fc 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -170,7 +170,6 @@ enum ioport_type : osd::u32
IPT_GAMBLE_KEYIN, // attendant
IPT_GAMBLE_KEYOUT, // attendant
- IPT_GAMBLE_SERVICE, // attendant
IPT_GAMBLE_BOOK, // attendant
IPT_GAMBLE_PAYOUT, // player
diff --git a/src/emu/inpttype.ipp b/src/emu/inpttype.ipp
index 35c859a9da0..460e6465a07 100644
--- a/src/emu/inpttype.ipp
+++ b/src/emu/inpttype.ipp
@@ -102,7 +102,6 @@ namespace {
CORE_INPUT_TYPES_BEGIN(gamble) \
INPUT_PORT_DIGITAL_TYPE( 1, OTHER, GAMBLE_KEYIN, N_p("input-name", "Key In"), input_seq(KEYCODE_Q) ) \
INPUT_PORT_DIGITAL_TYPE( 1, OTHER, GAMBLE_KEYOUT, N_p("input-name", "Key Out"), input_seq(KEYCODE_W) ) \
- INPUT_PORT_DIGITAL_TYPE( 1, OTHER, GAMBLE_SERVICE, N_p("input-name", "Service"), input_seq(KEYCODE_9) ) \
INPUT_PORT_DIGITAL_TYPE( 1, OTHER, GAMBLE_BOOK, N_p("input-name", "Bookkeeping"), input_seq(KEYCODE_0) ) \
INPUT_PORT_DIGITAL_TYPE( 1, OTHER, GAMBLE_PAYOUT, N_p("input-name", "Payout"), input_seq(KEYCODE_4) ) \
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_BET, N_p("input-name", "Bet"), input_seq(KEYCODE_M) ) \
diff --git a/src/emu/mconfig.cpp b/src/emu/mconfig.cpp
index ba88b6c289d..06a3f787072 100644
--- a/src/emu/mconfig.cpp
+++ b/src/emu/mconfig.cpp
@@ -83,7 +83,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
{
// create the device
token const tok(begin_configuration(owner));
- device_t *const new_dev = device_add(option->name(), option->devtype(), option->clock());
+ device_t *const new_dev = device_add(std::string(option->name()).c_str(), option->devtype(), option->clock()); // TODO: support string_view tags
slot.set_card_device(new_dev);
char const *const default_bios = option->default_bios();
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index c2e9ac23443..595413a71e1 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -2730,7 +2730,7 @@ void validity_checker::validate_devices(machine_config &config)
device_t *card;
{
machine_config::token const tok(config.begin_configuration(slot->device()));
- card = config.device_add(option.second->name(), option.second->devtype(), option.second->clock());
+ card = config.device_add(std::string(option.second->name()).c_str(), option.second->devtype(), option.second->clock()); // TODO: support string_view tags
const char *const def_bios = option.second->default_bios();
if (def_bios)
@@ -2745,14 +2745,14 @@ void validity_checker::validate_devices(machine_config &config)
for (device_slot_interface &subslot : slot_interface_enumerator(*card))
{
- if (subslot.fixed())
+ if (subslot.fixed() && subslot.default_option())
{
// TODO: make this self-contained so it can apply itself
- device_slot_interface::slot_option const *suboption = subslot.option(subslot.default_option());
+ device_slot_interface::slot_option const *const suboption = subslot.option(subslot.default_option());
if (suboption)
{
machine_config::token const tok(config.begin_configuration(subslot.device()));
- device_t *const sub_card = config.device_add(suboption->name(), suboption->devtype(), suboption->clock());
+ device_t *const sub_card = config.device_add(std::string(suboption->name()).c_str(), suboption->devtype(), suboption->clock()); // TODO: support string_view tags
const char *const sub_bios = suboption->default_bios();
if (sub_bios)
sub_card->set_default_bios_tag(sub_bios);
@@ -2778,7 +2778,7 @@ void validity_checker::validate_devices(machine_config &config)
}
machine_config::token const tok(config.begin_configuration(slot->device()));
- config.device_remove(option.second->name());
+ config.device_remove(std::string(option.second->name()).c_str()); // TODO: support string_view tags
m_checking_card = false;
}
}
diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp
index bbed8cd4a8d..e76d6d6d4da 100644
--- a/src/emu/xtal.cpp
+++ b/src/emu/xtal.cpp
@@ -50,6 +50,8 @@
#include <cfloat>
#include <cmath>
+#include <locale>
+#include <sstream>
// This array *must* stay in order, it's binary-searched
@@ -597,25 +599,21 @@ bool XTAL::validate(double base_clock)
return false;
}
-void XTAL::validate(const char *message) const
+void XTAL::validate(std::string_view message) const
{
if(!validate(m_base_clock))
fail(m_base_clock, message);
}
-void XTAL::validate(const std::string &message) const
+void XTAL::fail(double base_clock, std::string_view message)
{
- if(!validate(m_base_clock))
- fail(m_base_clock, message);
-}
-
-void XTAL::fail(double base_clock, const std::string &message)
-{
- std::string full_message = util::string_format("Unknown crystal value %.0f. ", base_clock);
+ std::ostringstream full_message;
+ full_message.imbue(std::locale::classic());
+ util::stream_format(full_message, "Unknown crystal value %.0f. ", base_clock);
if(xtal_error_low && xtal_error_high)
- full_message += util::string_format(" Did you mean %.0f or %.0f?", xtal_error_low, xtal_error_high);
+ util::stream_format(full_message, " Did you mean %.0f or %.0f?", xtal_error_low, xtal_error_high);
else
- full_message += util::string_format(" Did you mean %.0f?", xtal_error_low ? xtal_error_low : xtal_error_high);
- full_message += util::string_format(" Context: %s\n", message);
- fatalerror("%s\n", full_message);
+ util::stream_format(full_message, " Did you mean %.0f?", xtal_error_low ? xtal_error_low : xtal_error_high);
+ util::stream_format(full_message, " Context: %s\n", message);
+ fatalerror("%s", std::move(full_message).str());
}
diff --git a/src/emu/xtal.h b/src/emu/xtal.h
index 356ca6eb308..69cfbe90433 100644
--- a/src/emu/xtal.h
+++ b/src/emu/xtal.h
@@ -39,9 +39,12 @@ Usage:
#ifndef MAME_EMU_XTAL_H
#define MAME_EMU_XTAL_H
+#pragma once
+
#include "emucore.h"
-#pragma once
+#include <string_view>
+
class XTAL
{
@@ -59,8 +62,7 @@ public:
friend constexpr XTAL operator *(unsigned int mult, const XTAL &xtal);
friend constexpr XTAL operator *(double mult, const XTAL &xtal);
- void validate(const char *message) const;
- void validate(const std::string &message) const;
+ void validate(std::string_view message) const;
private:
double m_base_clock, m_current_clock;
@@ -69,7 +71,7 @@ private:
static const double known_xtals[];
static double last_correct_value, xtal_error_low, xtal_error_high;
- static void fail(double base_clock, const std::string &message);
+ static void fail(double base_clock, std::string_view message);
static bool validate(double base_clock);
static void check_ordering();
};
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp
index da9900ff680..9db3ef61eca 100644
--- a/src/frontend/mame/clifront.cpp
+++ b/src/frontend/mame/clifront.cpp
@@ -662,7 +662,7 @@ void cli_frontend::listbios(const std::vector<std::string> &args)
if (firstsystem)
firstsystem = false;
else
- printf("\n");
+ osd_printf_info("\n");
// print system BIOS options if there are any
bool firstbios = true;
@@ -670,13 +670,13 @@ void cli_frontend::listbios(const std::vector<std::string> &args)
{
if (firstbios)
{
- printf("BIOS options for system %s (%s):\n", root.name(), root.shortname());
+ osd_printf_info("BIOS options for system %s (%s):\n", root.name(), root.shortname());
firstbios = false;
}
- printf(" %-16s %s\n", bios.get_name(), bios.get_description());
+ osd_printf_info(" %-16s %s\n", bios.get_name(), bios.get_description());
}
if (firstbios)
- printf("No BIOS options for system %s (%s)\n", root.name(), root.shortname());
+ osd_printf_info("No BIOS options for system %s (%s)\n", root.name(), root.shortname());
// iterate over slots
for (const device_slot_interface &slot : slot_interface_enumerator(root))
@@ -692,10 +692,10 @@ void cli_frontend::listbios(const std::vector<std::string> &args)
{
if (firstcard)
{
- printf("\n BIOS options for device %s (-%s %s):\n", card->name(), slot.device().tag() + 1, card->basetag());
+ osd_printf_info("\n BIOS options for device %s (-%s %s):\n", card->name(), slot.device().tag() + 1, card->basetag());
firstcard = false;
}
- printf(" %-16s %s\n", bios.get_name(), bios.get_description());
+ osd_printf_info(" %-16s %s\n", bios.get_name(), bios.get_description());
}
}
}
@@ -762,9 +762,9 @@ void cli_frontend::listdevices(const std::vector<std::string> &args)
{
// print a header
if (!first)
- printf("\n");
+ osd_printf_info("\n");
first = false;
- printf("Driver %s (%s):\n", drivlist.driver().name, drivlist.driver().type.fullname());
+ osd_printf_info("Driver %s (%s):\n", drivlist.driver().name, drivlist.driver().type.fullname());
// build a list of devices
std::vector<device_t *> device_list;
@@ -808,20 +808,20 @@ void cli_frontend::listdevices(const std::vector<std::string> &args)
depth++;
}
}
- printf(" %*s%-*s %s", depth * 2, "", 30 - depth * 2, tag, device->name());
+ osd_printf_info(" %*s%-*s %s", depth * 2, "", 30 - depth * 2, tag, device->name());
// add more information
uint32_t clock = device->clock();
if (clock >= 1000000000)
- printf(" @ %d.%02d GHz\n", clock / 1000000000, (clock / 10000000) % 100);
+ osd_printf_info(" @ %d.%02d GHz\n", clock / 1000000000, (clock / 10000000) % 100);
else if (clock >= 1000000)
- printf(" @ %d.%02d MHz\n", clock / 1000000, (clock / 10000) % 100);
+ osd_printf_info(" @ %d.%02d MHz\n", clock / 1000000, (clock / 10000) % 100);
else if (clock >= 1000)
- printf(" @ %d.%02d kHz\n", clock / 1000, (clock / 10) % 100);
+ osd_printf_info(" @ %d.%02d kHz\n", clock / 1000, (clock / 10) % 100);
else if (clock > 0)
- printf(" @ %d Hz\n", clock);
+ osd_printf_info(" @ %d Hz\n", clock);
else
- printf("\n");
+ osd_printf_info("\n");
}
}
}
@@ -842,8 +842,8 @@ void cli_frontend::listslots(const std::vector<std::string> &args)
throw emu_fatalerror(EMU_ERR_NO_SUCH_SYSTEM, "No matching systems found for '%s'", gamename);
// print header
- printf("%-16s %-16s %-16s %s\n", "SYSTEM", "SLOT NAME", "SLOT OPTIONS", "SLOT DEVICE NAME");
- printf("%s %s %s %s\n", std::string(16,'-').c_str(), std::string(16,'-').c_str(), std::string(16,'-').c_str(), std::string(28,'-').c_str());
+ osd_printf_info("%-16s %-16s %-16s %s\n", "SYSTEM", "SLOT NAME", "SLOT OPTIONS", "SLOT DEVICE NAME");
+ osd_printf_info("%s %s %s %s\n", std::string(16,'-'), std::string(16,'-'), std::string(16,'-'), std::string(28,'-'));
// iterate over drivers
while (drivlist.next())
@@ -867,12 +867,12 @@ void cli_frontend::listslots(const std::vector<std::string> &args)
option_list.end(),
[] (device_slot_interface::slot_option const *opt1, device_slot_interface::slot_option const *opt2)
{
- return strcmp(opt1->name(), opt2->name()) < 0;
+ return opt1->name() < opt2->name();
});
// output the line, up to the list of extensions
- printf("%-16s %-16s ", first ? drivlist.driver().name : "", slot.device().tag()+1);
+ osd_printf_info("%-16s %-16s ", first ? drivlist.driver().name : "", slot.device().tag()+1);
bool first_option = true;
@@ -880,22 +880,22 @@ void cli_frontend::listslots(const std::vector<std::string> &args)
for (device_slot_interface::slot_option const *opt : option_list)
{
if (first_option)
- printf("%-16s %s\n", opt->name(), opt->devtype().fullname());
+ osd_printf_info("%-16s %s\n", opt->name(), opt->devtype().fullname());
else
- printf("%-34s%-16s %s\n", "", opt->name(), opt->devtype().fullname());
+ osd_printf_info("%-34s%-16s %s\n", "", opt->name(), opt->devtype().fullname());
first_option = false;
}
if (first_option)
- printf("%-16s %s\n", "[none]","No options available");
+ osd_printf_info("%-16s %s\n", "[none]","No options available");
// end the line
- printf("\n");
+ osd_printf_info("\n");
first = false;
}
// if we didn't get any at all, just print a none line
if (first)
- printf("%-16s (none)\n", drivlist.driver().name);
+ osd_printf_info("%-16s (none)\n", drivlist.driver().name);
}
}
@@ -915,8 +915,8 @@ void cli_frontend::listmedia(const std::vector<std::string> &args)
throw emu_fatalerror(EMU_ERR_NO_SUCH_SYSTEM, "No matching systems found for '%s'", gamename);
// print header
- printf("%-16s %-16s %-10s %s\n", "SYSTEM", "MEDIA NAME", "(brief)", "IMAGE FILE EXTENSIONS SUPPORTED");
- printf("%s %s-%s %s\n", std::string(16,'-').c_str(), std::string(16,'-').c_str(), std::string(10,'-').c_str(), std::string(31,'-').c_str());
+ osd_printf_info("%-16s %-16s %-10s %s\n", "SYSTEM", "MEDIA NAME", "(brief)", "IMAGE FILE EXTENSIONS SUPPORTED");
+ osd_printf_info("%s %s-%s %s\n", std::string(16,'-'), std::string(16,'-'), std::string(10,'-'), std::string(31,'-'));
// iterate over drivers
while (drivlist.next())
@@ -932,26 +932,26 @@ void cli_frontend::listmedia(const std::vector<std::string> &args)
std::string paren_shortname = string_format("(%s)", imagedev.brief_instance_name());
// output the line, up to the list of extensions
- printf("%-16s %-16s %-10s ", drivlist.driver().name, imagedev.instance_name().c_str(), paren_shortname.c_str());
+ osd_printf_info("%-16s %-16s %-10s ", drivlist.driver().name, imagedev.instance_name(), paren_shortname);
// get the extensions and print them
std::string extensions(imagedev.file_extensions());
for (int start = 0, end = extensions.find_first_of(',');; start = end + 1, end = extensions.find_first_of(',', start))
{
std::string curext(extensions, start, (end == -1) ? extensions.length() - start : end - start);
- printf(".%-5s", curext.c_str());
+ osd_printf_info(".%-5s", curext);
if (end == -1)
break;
}
// end the line
- printf("\n");
+ osd_printf_info("\n");
first = false;
}
// if we didn't get any at all, just print a none line
if (first)
- printf("%-16s (none)\n", drivlist.driver().name);
+ osd_printf_info("%-16s (none)\n", drivlist.driver().name);
}
}
diff --git a/src/frontend/mame/infoxml.cpp b/src/frontend/mame/infoxml.cpp
index fec2eebbf47..9da194d36de 100644
--- a/src/frontend/mame/infoxml.cpp
+++ b/src/frontend/mame/infoxml.cpp
@@ -2173,7 +2173,7 @@ void output_slots(std::ostream &out, machine_config &config, device_t &device, c
{
util::stream_format(out, "\t\t\t<slotoption name=\"%s\"", normalize_string(option.second->name()));
util::stream_format(out, " devname=\"%s\"", normalize_string(dev->shortname()));
- if (slot.default_option() && !strcmp(slot.default_option(), option.second->name()))
+ if (slot.default_option() && (slot.default_option() == option.second->name()))
out << " default=\"yes\"";
out << "/>\n";
}
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index d0c01053c55..3e3e848ecc2 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -2146,7 +2146,7 @@ void lua_engine::initialize()
slot_type["fixed"] = sol::property(&device_slot_interface::fixed);
slot_type["has_selectable_options"] = sol::property(&device_slot_interface::has_selectable_options);
slot_type["default_option"] = sol::property(&device_slot_interface::default_option);
- slot_type["options"] = sol::property([] (device_slot_interface const &slot) { return standard_tag_object_ptr_map<device_slot_interface::slot_option>(slot.option_list()); });
+ slot_type["options"] = sol::property([] (device_slot_interface const &slot) { return make_tag_object_ptr_map(slot.option_list()); });
slot_type["device"] = sol::property(static_cast<device_t & (device_slot_interface::*)()>(&device_slot_interface::device));
diff --git a/src/frontend/mame/luaengine.h b/src/frontend/mame/luaengine.h
index ac166974e50..c3acd5501fb 100644
--- a/src/frontend/mame/luaengine.h
+++ b/src/frontend/mame/luaengine.h
@@ -40,7 +40,6 @@ public:
template <typename T> struct devenum;
template <typename T> struct simple_list_wrapper;
template <typename T> struct tag_object_ptr_map;
- template <typename T> using standard_tag_object_ptr_map = tag_object_ptr_map<std::unordered_map<std::string, std::unique_ptr<T> > >;
template <typename T> struct immutable_container_helper;
template <typename T, typename C, typename I = typename C::iterator> struct immutable_collection_helper;
template <typename T, typename C, typename I = typename C::iterator> struct immutable_sequence_helper;
@@ -181,6 +180,8 @@ private:
std::vector<int> m_update_tasks;
std::vector<int> m_frame_tasks;
+ template <typename T>
+ static auto make_tag_object_ptr_map(T &map);
template <typename... T>
auto make_notifier_adder(util::notifier<T...> &notifier, const char *desc);
template <typename T, typename D, typename R, typename... A>
diff --git a/src/frontend/mame/luaengine.ipp b/src/frontend/mame/luaengine.ipp
index e08f267538e..53c4ba1a105 100644
--- a/src/frontend/mame/luaengine.ipp
+++ b/src/frontend/mame/luaengine.ipp
@@ -575,6 +575,18 @@ private:
//-------------------------------------------------
+// make_tag_object_ptr_map - make a wrapper for a
+// tag to object pointer map
+//-------------------------------------------------
+
+template <typename T>
+auto lua_engine::make_tag_object_ptr_map(T &map)
+{
+ return tag_object_ptr_map<std::remove_cv_t<T> >(map);
+}
+
+
+//-------------------------------------------------
// make_notifier_adder - make a function for
// subscribing to a notifier
//-------------------------------------------------
diff --git a/src/frontend/mame/luaengine_debug.cpp b/src/frontend/mame/luaengine_debug.cpp
index 992a9cc791a..994f61adbfb 100644
--- a/src/frontend/mame/luaengine_debug.cpp
+++ b/src/frontend/mame/luaengine_debug.cpp
@@ -339,7 +339,7 @@ void lua_engine::initialize_debug(sol::table &emu)
});
symbol_table_type.set_function("read_memory", &symbol_table_wrapper::read_memory);
symbol_table_type.set_function("write_memory", &symbol_table_wrapper::write_memory);
- symbol_table_type["entries"] = sol::property([] (symbol_table_wrapper const &st) { return standard_tag_object_ptr_map<symbol_entry>(st.table().entries()); });
+ symbol_table_type["entries"] = sol::property([] (symbol_table_wrapper const &st) { return make_tag_object_ptr_map(st.table().entries()); });
symbol_table_type["parent"] = sol::property(&symbol_table_wrapper::parent);
diff --git a/src/frontend/mame/luaengine_input.cpp b/src/frontend/mame/luaengine_input.cpp
index 82d8ad1c2cc..93d0cfff2d7 100644
--- a/src/frontend/mame/luaengine_input.cpp
+++ b/src/frontend/mame/luaengine_input.cpp
@@ -199,7 +199,7 @@ void lua_engine::initialize_input(sol::table &emu)
&ioport_manager::input_type_to_token,
[] (ioport_manager &im, ioport_type type) { return im.input_type_to_token(type, 0); });
ioport_manager_type["types"] = sol::property(&ioport_manager::types);
- ioport_manager_type["ports"] = sol::property([] (ioport_manager &im) { return tag_object_ptr_map<ioport_list>(im.ports()); });
+ ioport_manager_type["ports"] = sol::property([] (ioport_manager &im) { return make_tag_object_ptr_map(im.ports()); });
auto natkeyboard_type = sol().registry().new_usertype<natural_keyboard>("natkeyboard", sol::no_constructor);
diff --git a/src/frontend/mame/luaengine_mem.cpp b/src/frontend/mame/luaengine_mem.cpp
index ff2f406828b..deff4843ba7 100644
--- a/src/frontend/mame/luaengine_mem.cpp
+++ b/src/frontend/mame/luaengine_mem.cpp
@@ -725,9 +725,9 @@ void lua_engine::initialize_memory(sol::table &emu)
auto memory_type = sol().registry().new_usertype<memory_manager>("memory", sol::no_constructor);
- memory_type["banks"] = sol::property([] (memory_manager &mm) { return standard_tag_object_ptr_map<memory_bank>(mm.banks()); });
- memory_type["regions"] = sol::property([] (memory_manager &mm) { return standard_tag_object_ptr_map<memory_region>(mm.regions()); });
- memory_type["shares"] = sol::property([] (memory_manager &mm) { return standard_tag_object_ptr_map<memory_share>(mm.shares()); });
+ memory_type["banks"] = sol::property([] (memory_manager &mm) { return make_tag_object_ptr_map(mm.banks()); });
+ memory_type["regions"] = sol::property([] (memory_manager &mm) { return make_tag_object_ptr_map(mm.regions()); });
+ memory_type["shares"] = sol::property([] (memory_manager &mm) { return make_tag_object_ptr_map(mm.shares()); });
auto bank_type = sol().registry().new_usertype<memory_bank>("membank", sol::no_constructor);
diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp
index 0abba28c592..9ff99ad3bf6 100644
--- a/src/frontend/mame/ui/devopt.cpp
+++ b/src/frontend/mame/ui/devopt.cpp
@@ -54,10 +54,12 @@ void menu_device_config::populate_text(std::optional<text_layout> &layout, float
machine_config &mconfig(const_cast<machine_config &>(machine().config()));
machine_config::token const tok(mconfig.begin_configuration(mconfig.root_device()));
- device_t *const dev = mconfig.device_add(m_option->name(), m_option->devtype(), 0);
+ device_t *const dev = mconfig.device_add(std::string(m_option->name()).c_str(), m_option->devtype(), 0); // TODO: support string_view tags
for (device_t &d : device_enumerator(*dev))
+ {
if (!d.configured())
d.config_complete();
+ }
// get decimal separator
std::string point;
@@ -393,7 +395,7 @@ void menu_device_config::populate_text(std::optional<text_layout> &layout, float
+ input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0)
layout->add_text(_("[None]\n"), color);
- mconfig.device_remove(m_option->name());
+ mconfig.device_remove(std::string(m_option->name()).c_str()); // TODO: support string_view tags
lines = layout->lines();
}
width = layout->actual_width();
diff --git a/src/frontend/mame/ui/slotopt.cpp b/src/frontend/mame/ui/slotopt.cpp
index 10fbeed03c6..8cd38a2e6f9 100644
--- a/src/frontend/mame/ui/slotopt.cpp
+++ b/src/frontend/mame/ui/slotopt.cpp
@@ -68,7 +68,7 @@ device_slot_interface::slot_option const *menu_slot_devices::get_current_option(
if (!slot.fixed())
{
- char const *const slot_option_name = slot.slot_name();
+ auto const slot_option_name = slot.slot_name();
current = machine().options().slot_option(slot_option_name).value();
}
else
@@ -78,7 +78,7 @@ device_slot_interface::slot_option const *menu_slot_devices::get_current_option(
current.assign(slot.default_option());
}
- return slot.option(current.c_str());
+ return slot.option(current);
}
@@ -99,7 +99,7 @@ void menu_slot_devices::set_slot_device(device_slot_interface &slot, std::string
opt.specify(val);
// erase this from our recorded options list - this is the slot we're trying to change!
- m_slot_options.erase(slot.slot_name());
+ m_slot_options.erase(std::string(slot.slot_name())); // TODO: get rid of temporary std::string when we have C++20
// refresh any options that we might have annotated earlier
while (try_refresh_current_options())
@@ -126,7 +126,7 @@ void menu_slot_devices::record_current_options()
const slot_option &opt(machine().options().slot_option(slot.slot_name()));
// and record the value in our local cache
- m_slot_options[slot.slot_name()] = opt.specified_value();
+ m_slot_options[std::string(slot.slot_name())] = opt.specified_value(); // TODO: get rid of temporary std::string if possible when we have C++20
}
}
}
@@ -198,7 +198,7 @@ void menu_slot_devices::populate()
? FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW
: FLAG_DISABLE;
- item_append(slot.slot_name(), opt_name, item_flags, (void *)&slot);
+ item_append(std::string(slot.slot_name()), std::move(opt_name), item_flags, (void *)&slot);
}
item_append(menu_item_type::SEPARATOR);
item_append(_("Reset System"), 0, ITEMREF_RESET);
@@ -293,11 +293,11 @@ void menu_slot_devices::rotate_slot_device(device_slot_interface &slot, menu_slo
std::sort(m_current_option_list.begin(), m_current_option_list.end());
// find the current position
- char const *const target = current ? current->name() : "";
+ std::string_view const target = current ? current->name() : std::string_view();
m_current_option_list_iter = std::find_if(
m_current_option_list.begin(),
m_current_option_list.end(),
- [target] (const std::string &opt_value)
+ [target] (std::string const &opt_value)
{
return opt_value == target;
});
diff --git a/src/mame/aristocrat/aristmk4.cpp b/src/mame/aristocrat/aristmk4.cpp
index efec04c9f2d..aa5b2c3d66c 100644
--- a/src/mame/aristocrat/aristmk4.cpp
+++ b/src/mame/aristocrat/aristmk4.cpp
@@ -1268,7 +1268,7 @@ static INPUT_PORTS_START(aristmk4)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("5 Credits Per Line") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("10 Credits Per Line") PORT_CODE(KEYCODE_Y)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Reserve") PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reserve") PORT_CODE(KEYCODE_A)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Gamble") PORT_CODE(KEYCODE_U)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Take Win") PORT_CODE(KEYCODE_J)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("0-7 UNUSED")
@@ -1527,7 +1527,7 @@ static INPUT_PORTS_START(eforestu)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Play 7 Lines") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Play 9 Lines / Black") PORT_CODE(KEYCODE_Y)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Cashout") PORT_CODE(KEYCODE_Q)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CODE(KEYCODE_A)
PORT_MODIFY("500e")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Play 1 Line / Red") PORT_CODE(KEYCODE_W)
@@ -1661,7 +1661,7 @@ static INPUT_PORTS_START(topgear)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("0-1 UNUSED")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("0-2 UNUSED")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Change") PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Change") PORT_CODE(KEYCODE_A)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("0-5 UNUSED")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("0-6 UNUSED")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("0-7 UNUSED")
@@ -1693,7 +1693,7 @@ static INPUT_PORTS_START(gunnrose)
PORT_MODIFY("500e")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Half Gamble") PORT_CODE(KEYCODE_E)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Reserve") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reserve") PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Full Gamble") PORT_CODE(KEYCODE_W)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Bet 1 / Hold 1") PORT_CODE(KEYCODE_S)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Bet 5 / Hold 5") PORT_CODE(KEYCODE_H)
@@ -1706,7 +1706,7 @@ static INPUT_PORTS_START(wildone)
PORT_INCLUDE(aristmk4)
PORT_MODIFY("500d")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_CODE(KEYCODE_D)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CODE(KEYCODE_D)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CODE(KEYCODE_H)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Bet 2 / Hold 2") PORT_CODE(KEYCODE_E)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Bet 3 / Hold 3") PORT_CODE(KEYCODE_R)
@@ -1737,7 +1737,7 @@ static INPUT_PORTS_START(gldnpkr)
PORT_MODIFY("500e")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_W)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Change") PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Change") PORT_CODE(KEYCODE_A)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Red") PORT_CODE(KEYCODE_S)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Black") PORT_CODE(KEYCODE_H)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_CODE(KEYCODE_G)
diff --git a/src/mame/capcom/cps1bl_5205.cpp b/src/mame/capcom/cps1bl_5205.cpp
index 4a16c8031c4..ef9d55f0141 100644
--- a/src/mame/capcom/cps1bl_5205.cpp
+++ b/src/mame/capcom/cps1bl_5205.cpp
@@ -227,7 +227,7 @@ void cps1bl_5205_state::knightsb_layer_w(offs_t offset, uint16_t data)
data = 0x1380;
break;
default:
- printf ("Unknown control word = %X\n",data);
+ logerror("Unknown control word = %X\n", data);
data = 0x12c0;
}
m_cps_b_regs[m_layer_enable_reg / 2] = data;
@@ -271,7 +271,7 @@ void cps1bl_5205_state::sf2b_layer_w(offs_t offset, uint16_t data)
m_cps_b_regs[m_layer_enable_reg / 2] = data;
break;
default:
- printf("%X:%X ",offset,data);
+ logerror("%X:%X ", offset,data);
}
}
diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp
index ee0468e5981..8a7f7278948 100644
--- a/src/mame/dynax/ddenlovr.cpp
+++ b/src/mame/dynax/ddenlovr.cpp
@@ -258,11 +258,6 @@ void mahjong_medal_panel(device_slot_interface &device)
device.option_add("mj", MAHJONG_MEDAL_PANEL);
}
-void hanafuda_medal_panel(device_slot_interface &device)
-{
- device.option_add("hf", HANAFUDA_MEDAL_PANEL);
-}
-
void medal_panels(device_slot_interface &device)
{
device.option_add("mj", MAHJONG_MEDAL_PANEL);
@@ -4745,8 +4740,8 @@ void htengoku_state::htengoku(machine_config &config)
m_mainlatch->q_out_cb<2>().set(FUNC(htengoku_state::layer_half2_w)); //
m_mainlatch->q_out_cb<5>().set(FUNC(htengoku_state::blitter_ack_w)); // Blitter IRQ Ack
- MAHJONG_PANEL_CONNECTOR(config, m_key_matrix[0], hanafuda_medal_panel, "hf", true);
- MAHJONG_PANEL_CONNECTOR(config, m_key_matrix[1], hanafuda_medal_panel, "hf", false);
+ MAHJONG_PANEL_CONNECTOR(config, m_key_matrix[0], medal_panels, "hf", false);
+ MAHJONG_PANEL_CONNECTOR(config, m_key_matrix[1], medal_panels, "hf", false);
HOPPER(config, m_hopper, attotime::from_msec(50));
@@ -6634,56 +6629,44 @@ static INPUT_PORTS_START( jongtei )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_START("DSW1")
- PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
- PORT_DIPSETTING( 0x00, "50" )
- PORT_DIPSETTING( 0x01, "53" )
- PORT_DIPSETTING( 0x02, "56" )
- PORT_DIPSETTING( 0x03, "59" )
- PORT_DIPSETTING( 0x04, "62" )
- PORT_DIPSETTING( 0x05, "65" )
- PORT_DIPSETTING( 0x06, "68" )
- PORT_DIPSETTING( 0x07, "71" )
- PORT_DIPSETTING( 0x08, "75" )
- PORT_DIPSETTING( 0x09, "78" )
- PORT_DIPSETTING( 0x0a, "81" )
- PORT_DIPSETTING( 0x0b, "84" )
- PORT_DIPSETTING( 0x0c, "87" )
- PORT_DIPSETTING( 0x0d, "90" )
- PORT_DIPSETTING( 0x0e, "93" )
- PORT_DIPSETTING( 0x0f, "96" )
- PORT_DIPNAME( 0x30, 0x30, "Odds Rate" )
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
- PORT_DIPNAME( 0xc0, 0xc0, "Max Rate" )
+ MAHJONG_PAYOUT_RATE(0, "DIP1:1,2,3,4")
+ MAHJONG_ODDS_RATE_NS(4, "DIP1:5,6")
+ PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("DIP1:7,8")
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
PORT_DIPSETTING( 0x40, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_10C ) )
- PORT_DIPNAME( 0x0c, 0x0c, "Min Rate To Play" )
+ MAHJONG_COINAGE(0, "DIP2:1,2")
+ PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("DIP2:3,4")
PORT_DIPSETTING( 0x0c, "1" )
PORT_DIPSETTING( 0x08, "2" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x30, 0x30, "Payout" )
- PORT_DIPSETTING( 0x30, "300" )
- PORT_DIPSETTING( 0x20, "500" )
- PORT_DIPSETTING( 0x10, "700" )
- PORT_DIPSETTING( 0x00, "1000" )
- PORT_DIPNAME( 0x40, 0x40, "W-BET" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Last Chance" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x30, 0x00, "Credit Limit" ) PORT_DIPLOCATION("DIP2:5,6")
+ PORT_DIPSETTING( 0x30, "300" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 300
+ PORT_DIPSETTING( 0x30, "600" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x30, "1500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x30, "3000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPSETTING( 0x20, "500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 500
+ PORT_DIPSETTING( 0x20, "1000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x20, "2500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x20, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPSETTING( 0x10, "700" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 700
+ PORT_DIPSETTING( 0x10, "1400" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x10, "3500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x10, "7000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPSETTING( 0x00, "1000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 1000
+ PORT_DIPSETTING( 0x00, "2000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x00, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x00, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPNAME( 0x40, 0x00, "Double Bet" ) PORT_DIPLOCATION("DIP2:7")
+ PORT_DIPSETTING( 0x40, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x80, 0x00, "Last Chance" ) PORT_DIPLOCATION("DIP2:8")
+ PORT_DIPSETTING( 0x80, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_START("DSW3")
PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" )
@@ -6714,7 +6697,7 @@ static INPUT_PORTS_START( jongtei )
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, "In Game Music" )
+ PORT_DIPNAME( 0x02, 0x00, "In-Game Music" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x00, "Girls" )
@@ -6778,15 +6761,10 @@ static INPUT_PORTS_START( mjgnight )
PORT_INCLUDE(jongtei)
PORT_MODIFY("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_10C ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIP2:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x38, 0x38, "Min Rate To Play" )
+ PORT_DIPNAME( 0x38, 0x38, "Minimum Bet" ) PORT_DIPLOCATION("DIP2:4,5,6")
PORT_DIPSETTING( 0x38, "1" )
PORT_DIPSETTING( 0x30, "2" )
PORT_DIPSETTING( 0x28, "3" )
@@ -6795,19 +6773,25 @@ static INPUT_PORTS_START( mjgnight )
PORT_DIPSETTING( 0x10, "6" )
PORT_DIPSETTING( 0x08, "7" )
PORT_DIPSETTING( 0x00, "8" )
- PORT_DIPNAME( 0xc0, 0xc0, "Payout" )
- PORT_DIPSETTING( 0xc0, "300" )
- PORT_DIPSETTING( 0x80, "500" )
- PORT_DIPSETTING( 0x40, "700" )
- PORT_DIPSETTING( 0x00, "1000" )
+ PORT_DIPNAME( 0xc0, 0x00, "Credit Limit" ) PORT_DIPLOCATION("DIP2:7,8")
+ PORT_DIPSETTING( 0xc0, "300" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 300
+ PORT_DIPSETTING( 0xc0, "600" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0xc0, "1500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0xc0, "3000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPSETTING( 0x80, "500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 500
+ PORT_DIPSETTING( 0x80, "1000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x80, "2500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x80, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPSETTING( 0x40, "700" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 700
+ PORT_DIPSETTING( 0x40, "1400" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x40, "3500" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x40, "7000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
+ PORT_DIPSETTING( 0x00, "1000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03 ) // 1000
+ PORT_DIPSETTING( 0x00, "2000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02 )
+ PORT_DIPSETTING( 0x00, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01 )
+ PORT_DIPSETTING( 0x00, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00 )
PORT_MODIFY("DSW4")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, "In Game Music" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -7259,11 +7243,7 @@ static INPUT_PORTS_START( mjmyster )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE(0, "SW1:1,2,3,4") // PAY-OUT 管理
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW1:5,6") // ODDS 設定
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "SW1:5,6") // ODDS 設定
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW1:7,8") // BET-MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -7478,22 +7458,22 @@ static INPUT_PORTS_START( hginga )
PORT_DIPSETTING( 0x04, "Active Low" ) // Low Active
PORT_DIPSETTING( 0x00, "Active High" ) // High Active
PORT_DIPNAME( 0x18, 0x08, "Credit Limit" ) PORT_DIPLOCATION("SW3:4,5") // クレジット・リミット
- PORT_DIPSETTING( 0x18, "1000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 1000クレジット
- PORT_DIPSETTING( 0x18, "2000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
- PORT_DIPSETTING( 0x18, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x18, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
- PORT_DIPSETTING( 0x10, "2000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 2000クレジット
- PORT_DIPSETTING( 0x10, "4000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
- PORT_DIPSETTING( 0x10, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x10, "20000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
- PORT_DIPSETTING( 0x08, "3000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 3000クレジット
- PORT_DIPSETTING( 0x08, "6000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
- PORT_DIPSETTING( 0x08, "15000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x08, "30000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
- PORT_DIPSETTING( 0x00, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 5000クレジット
- PORT_DIPSETTING( 0x00, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
- PORT_DIPSETTING( 0x00, "25000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x00, "50000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x18, "1,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 1000クレジット
+ PORT_DIPSETTING( 0x18, "2,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
+ PORT_DIPSETTING( 0x18, "5,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
+ PORT_DIPSETTING( 0x18, "10,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x10, "2,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 2000クレジット
+ PORT_DIPSETTING( 0x10, "4,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
+ PORT_DIPSETTING( 0x10, "10,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
+ PORT_DIPSETTING( 0x10, "20,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x08, "3,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 3000クレジット
+ PORT_DIPSETTING( 0x08, "6,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
+ PORT_DIPSETTING( 0x08, "15,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
+ PORT_DIPSETTING( 0x08, "30,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x00, "5,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 5000クレジット
+ PORT_DIPSETTING( 0x00, "10,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
+ PORT_DIPSETTING( 0x00, "25,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
+ PORT_DIPSETTING( 0x00, "50,000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
PORT_DIPNAME( 0x20, 0x20, "Hanaroku Hopper" ) PORT_DIPLOCATION("SW3:6") // 花六ホッパー
PORT_DIPSETTING( 0x20, "Manual" ) // 手動
PORT_DIPSETTING( 0x00, "Automatic" ) // 自動
@@ -7746,11 +7726,7 @@ static INPUT_PORTS_START( mjmyornt )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE(0, "SW 1:1,2,3,4") // PAY-OUT 管理
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW 1:5,6") // ODDS 設定
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "SW 1:5,6") // ODDS 設定
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW 1:7,8") // BET-MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -8361,11 +8337,7 @@ static INPUT_PORTS_START( seljan2 )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE(0, "DIP-SW1:1,2,3,4") // PAY OUT RATE
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("DIP-SW1:5,6") // ODDS RATE
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "DIP-SW1:5,6") // ODDS RATE
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("DIP-SW1:7,8") // BET-MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -8571,11 +8543,7 @@ static INPUT_PORTS_START( janshinp )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE(0, "DIP1:1,2,3,4")
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("DIP1:5,6")
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "DIP1:5,6")
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("DIP1:7,8")
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -8721,11 +8689,7 @@ static INPUT_PORTS_START( dtoyoken )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE(0, "DIP-SW1:1,2,3,4") // PAY OUT RATE
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("DIP-SW1:5,6") // ODDS RATE
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "DIP-SW1:5,6") // ODDS RATE
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("DIP-SW1:7,8") // BET-MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -8860,11 +8824,7 @@ static INPUT_PORTS_START( daimyojn )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE(0, "DIP-SW1:1,2,3,4") // PAY OUT RATE
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("DIP-SW1:5,6") // ODDS RATE no effect in "Credit timer" mode, always uses 1 2 4 8 12 16 24 32
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "DIP-SW1:5,6") // ODDS RATE no effect in "Credit timer" mode, always uses 1 2 4 8 12 16 24 32
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("DIP-SW1:7,8") // BET MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -8999,11 +8959,7 @@ static INPUT_PORTS_START( mjnigiri )
PORT_START("DSW1")
MAHJONG_PAYOUT_RATE_DFLT(0, 0x06, "DIP-SW1:1,2,3,4") // PAY OUT RATE
- PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("DIP-SW1:5,6") // ODDS RATE no effect in "Credit timer" mode, always uses 1 2 4 8 12 16 24 32
- PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
- PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
- PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
+ MAHJONG_ODDS_RATE_NS(4, "DIP-SW1:5,6") // ODDS RATE no effect in "Credit timer" mode, always uses 1 2 4 8 12 16 24 32
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("DIP-SW1:7,8") // BET-MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@@ -9860,14 +9816,8 @@ void hanakanz_state::mjreach1(machine_config &config)
{
hanakanz(config);
- m_key_matrix[0]->option_reset();
- mahjong_medal_panel(*m_key_matrix[0]);
- m_key_matrix[0]->set_default_option("mj");
- m_key_matrix[0]->set_fixed(true);
-
- m_key_matrix[1]->option_reset();
- mahjong_medal_panel(*m_key_matrix[1]);
- m_key_matrix[1]->set_default_option("mj");
+ m_key_matrix[0]->set_options(mahjong_medal_panel, "mj", true);
+ m_key_matrix[1]->set_options(mahjong_medal_panel, "mj", false);
// basic machine hardware
m_maincpu->set_addrmap(AS_IO, &hanakanz_state::mjreach1_portmap);
@@ -9895,14 +9845,8 @@ void hanakanz_state::mjchuuka(machine_config &config)
tmpz.out_pa_callback().set(FUNC(hanakanz_state::hanakanz_rombank_w));
tmpz.out_pb_callback().set(FUNC(hanakanz_state::mjchuuka_oki_bank_w));
- m_key_matrix[0]->option_reset();
- mahjong_medal_panel(*m_key_matrix[0]);
- m_key_matrix[0]->set_default_option("mj");
- m_key_matrix[0]->set_fixed(true);
-
- m_key_matrix[1]->option_reset();
- mahjong_medal_panel(*m_key_matrix[1]);
- m_key_matrix[1]->set_default_option("mj");
+ m_key_matrix[0]->set_options(mahjong_medal_panel, "mj", true);
+ m_key_matrix[1]->set_options(mahjong_medal_panel, "mj", false);
m_screen->screen_vblank().set("maincpu", FUNC(tmpz84c015_device::trg0));
@@ -10346,13 +10290,8 @@ void hanakanz_state::htsubaki(machine_config &config)
{
jongtei(config);
- m_key_matrix[0]->option_reset();
- hanafuda_medal_panel(*m_key_matrix[0]);
- m_key_matrix[0]->set_default_option("hf");
-
- m_key_matrix[1]->option_reset();
- hanafuda_medal_panel(*m_key_matrix[1]);
- m_key_matrix[1]->set_default_option("hf");
+ m_key_matrix[0]->set_options(medal_panels, "hf", false);
+ m_key_matrix[1]->set_options(medal_panels, "hf", false);
}
/***************************************************************************
@@ -10621,14 +10560,8 @@ void hanakanz_state::hnrose(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &hanakanz_state::hnrose_portmap);
- m_key_matrix[0]->option_reset();
- standard_panels(*m_key_matrix[0]);
- m_key_matrix[0]->set_default_option("hf");
- m_key_matrix[0]->set_fixed(false);
-
- m_key_matrix[1]->option_reset();
- standard_panels(*m_key_matrix[1]);
- m_key_matrix[1]->set_default_option("hf");
+ m_key_matrix[0]->set_options(standard_panels, "hf", false);
+ m_key_matrix[1]->set_options(standard_panels, "hf", false);
}
/***************************************************************************
diff --git a/src/mame/dynax/mjdipsw.h b/src/mame/dynax/mjdipsw.h
index f27db3d21b4..d9b7e42e6b9 100644
--- a/src/mame/dynax/mjdipsw.h
+++ b/src/mame/dynax/mjdipsw.h
@@ -39,6 +39,13 @@
PORT_DIPSETTING( 0x01 << shift, "1 2 3 5 10 25 50 100" ) \
PORT_DIPSETTING( 0x02 << shift, "1 2 3 5 10 50 100 200" )
+#define MAHJONG_ODDS_RATE_NS(shift, loc) \
+ PORT_DIPNAME( 0x03 << shift, 0x00 << shift, "Odds Rate" ) PORT_DIPLOCATION(loc) \
+ PORT_DIPSETTING( 0x03 << shift, "1 2 4 8 12 16 24 32" ) \
+ PORT_DIPSETTING( 0x00 << shift, "1 2 3 5 8 15 30 50" ) \
+ PORT_DIPSETTING( 0x02 << shift, "2 3 6 8 12 15 30 50" ) \
+ PORT_DIPSETTING( 0x01 << shift, "1 2 3 5 10 25 50 100" )
+
#define MAHJONG_COINAGE(shift, loc) \
PORT_DIPNAME( 0x03 << shift, 0x03 << shift, DEF_STR(Coinage) ) PORT_DIPLOCATION(loc) /* COIN RATE */ \
PORT_DIPSETTING( 0x03 << shift, DEF_STR(1C_1C) ) /* 1コイン  1プレイ */ \
diff --git a/src/mame/excellent/d9final.cpp b/src/mame/excellent/d9final.cpp
index 0074708833f..3851406d95d 100644
--- a/src/mame/excellent/d9final.cpp
+++ b/src/mame/excellent/d9final.cpp
@@ -188,7 +188,7 @@ static INPUT_PORTS_START( d9final )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
PORT_START("IN1")
diff --git a/src/mame/excellent/lastbank.cpp b/src/mame/excellent/lastbank.cpp
index 41d69540966..f5c38f608b5 100644
--- a/src/mame/excellent/lastbank.cpp
+++ b/src/mame/excellent/lastbank.cpp
@@ -257,7 +257,7 @@ static INPUT_PORTS_START( lastbank )
PORT_START("SPECIAL")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r))
PORT_DIPNAME( 0x08, 0x08, "Hopper Empty" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
diff --git a/src/mame/f32/f-32.cpp b/src/mame/f32/f-32.cpp
index 4a8d01fd0c2..6dfb7057dad 100644
--- a/src/mame/f32/f-32.cpp
+++ b/src/mame/f32/f-32.cpp
@@ -303,7 +303,7 @@ static INPUT_PORTS_START( royalpk2 )
PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Credit Pay Out") PORT_CODE(KEYCODE_E)
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Income") PORT_CODE(KEYCODE_R)
PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Income Clear") PORT_CODE(KEYCODE_T)
- PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("screen", FUNC(screen_device::vblank))
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/funworld/snookr10.cpp b/src/mame/funworld/snookr10.cpp
index 08cddb6baf5..2026b2f20c4 100644
--- a/src/mame/funworld/snookr10.cpp
+++ b/src/mame/funworld/snookr10.cpp
@@ -815,13 +815,13 @@ void snookr10_state::crystalc_map(address_map &map)
static INPUT_PORTS_START( snookr10 )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Remote x100") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Remote x100")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1") // Input Test in stats mode
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancella (Cancel) / Play / Bet")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start (Deal) / Raddoppio (Double-Up)")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Stop 5 / Risk (Half Gamble) / Super Game")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Estatistica (Stats)")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Management")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Management")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Stop 4 / Alta (High)")
PORT_START("IN1")
@@ -939,13 +939,13 @@ INPUT_PORTS_END
static INPUT_PORTS_START( crystalc )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Remote x100") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Remote x100")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancella (Cancel) / Play / Bet")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start (Deal) / Raddoppio (Double-Up)")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Stop 5 / Risk (Half Gamble) / Super Game")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistica (Stats)")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Management")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Management")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Stop 4 / Alta (High)")
PORT_START("IN1")
diff --git a/src/mame/gaelco/atvtrack.cpp b/src/mame/gaelco/atvtrack.cpp
index 31699243af5..01c4b93055b 100644
--- a/src/mame/gaelco/atvtrack.cpp
+++ b/src/mame/gaelco/atvtrack.cpp
@@ -208,9 +208,7 @@ inline u32 atvtrack_state::decode64_32(offs_t offset64, u64 data, u64 mem_mask,
u64 atvtrack_state::control_r(offs_t offset, u64 mem_mask)
{
- u32 addr;
-
- addr = 0;
+ offs_t addr = 0;
decode64_32(offset, 0, mem_mask, addr);
if (addr == (0x00020000-0x00020000)/4)
return -1;
@@ -221,11 +219,9 @@ u64 atvtrack_state::control_r(offs_t offset, u64 mem_mask)
void atvtrack_state::control_w(offs_t offset, u64 data, u64 mem_mask)
{
- u32 addr, dat; //, old;
-
- addr = 0;
- dat = decode64_32(offset, data, mem_mask, addr);
-// old = m_area1_data[addr];
+ offs_t addr = 0;
+ u32 dat = decode64_32(offset, data, mem_mask, addr);
+ //u32 old = m_area1_data[addr];
m_area1_data[addr] = dat;
if (addr == (0x00020000-0x00020000)/4) {
if ((data & 4) && m_slaverun)
diff --git a/src/mame/gametron/gatron.cpp b/src/mame/gametron/gatron.cpp
index 4cea174cc3c..6af97ad2afb 100644
--- a/src/mame/gametron/gatron.cpp
+++ b/src/mame/gametron/gatron.cpp
@@ -551,7 +551,7 @@ static INPUT_PORTS_START( poker41 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Service 2 (Test Mode Out / Coin Stuck)")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Payout? */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service 1 (Test/Settings)")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service 1 (Test/Settings)")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1 / Low")
INPUT_PORTS_END
diff --git a/src/mame/ibm/rtpc_kbd.h b/src/mame/ibm/rtpc_kbd.h
index c0a80c8476c..11ae076fa3b 100644
--- a/src/mame/ibm/rtpc_kbd.h
+++ b/src/mame/ibm/rtpc_kbd.h
@@ -6,9 +6,10 @@
#pragma once
+#include "rtpc_kbdc.h"
+
#include "cpu/mcs48/mcs48.h"
-#include "rtpc_kbdc.h"
class rtpc_kbd_device
: public device_t
diff --git a/src/mame/ibm/rtpc_kbdc.h b/src/mame/ibm/rtpc_kbdc.h
index a2a1f536b78..b87809b9def 100644
--- a/src/mame/ibm/rtpc_kbdc.h
+++ b/src/mame/ibm/rtpc_kbdc.h
@@ -17,10 +17,7 @@ public:
rtpc_kbdc_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: rtpc_kbdc_device(mconfig, tag, owner, 0U)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
+ set_options(std::forward<T>(opts), dflt, false);
}
rtpc_kbdc_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0U);
diff --git a/src/mame/igs/goldstar.cpp b/src/mame/igs/goldstar.cpp
index b7f59eec93c..71a1c04bb10 100644
--- a/src/mame/igs/goldstar.cpp
+++ b/src/mame/igs/goldstar.cpp
@@ -5313,7 +5313,7 @@ static INPUT_PORTS_START( cmv4_service )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // on some sets a DSW must be on/off to access this menu
INPUT_PORTS_END
@@ -5677,7 +5677,7 @@ static INPUT_PORTS_START( animalhs )
PORT_MODIFY("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("custom battery supervisor line")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings / Port Test")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings / Port Test")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Girls Test")
PORT_MODIFY("DSW1")
@@ -7207,7 +7207,7 @@ static INPUT_PORTS_START( cmast99 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Test: 4-Pad")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Test: 5-Pad")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Test: 6-Pad")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings / Port Test")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings / Port Test")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Palette Test")
*/
PORT_INCLUDE( cmv4_player )
@@ -7361,7 +7361,7 @@ static INPUT_PORTS_START( goldstar )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_INCLUDE( cb3_dsw1 )
@@ -7749,7 +7749,7 @@ static INPUT_PORTS_START( wcherry )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Start")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("Bet P1") // player 1
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("Small / Info")
PORT_START("IN1")
@@ -7814,7 +7814,7 @@ static INPUT_PORTS_START( super9 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("IN2") // nadaaa
@@ -8314,7 +8314,7 @@ static INPUT_PORTS_START( pkrmast )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin C")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Coin D")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT)
@@ -8526,7 +8526,7 @@ static INPUT_PORTS_START( jkrmast )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME("Coin C")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME("Coin D")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT)
@@ -8920,7 +8920,7 @@ static INPUT_PORTS_START( lucky8 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -9153,7 +9153,7 @@ static INPUT_PORTS_START( ns8linew )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -9303,7 +9303,7 @@ static INPUT_PORTS_START( ns8linwa )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -10107,7 +10107,7 @@ static INPUT_PORTS_START( superdrg )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -10197,7 +10197,7 @@ static INPUT_PORTS_START( nd8lines ) // TODO: need to be done once palette is f
PORT_START("IN3") // b810
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings / Test Mode")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings / Test Mode")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) // C or B?
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // B or C?
@@ -10446,7 +10446,7 @@ static INPUT_PORTS_START( ladylinr )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_J) PORT_NAME("Hopper Voll (Hopper Fill)")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Abschreib (Payout)")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Aufsteller (Supervisor)")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Aufsteller (Supervisor)")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Buchhaltung (Bookkeeping)")
PORT_START("IN2")
@@ -10617,7 +10617,7 @@ static INPUT_PORTS_START( bingowng )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -10790,18 +10790,18 @@ static INPUT_PORTS_START( mbstar )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("IN3-1")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("IN3-2")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("IN3-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_5) PORT_NAME("Coin 1") PORT_IMPULSE(2) // coin 1
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_6) PORT_NAME("Coin 2") PORT_IMPULSE(2) // coin 2
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // coin 1
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // coin 2
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_7) PORT_NAME("Note") // note acceptor
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_Q) PORT_NAME("Remote") // remote credits
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8) PORT_NAME("Coin 3 (tokens)") // coin 3 (tokens)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Remote") // remote credits
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3) PORT_CODE(KEYCODE_8) PORT_NAME("Coin 3 (tokens)") // coin 3 (tokens)
PORT_START("IN4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN4-1")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Operator Bookkeeping") // operator bookkeeping
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // grull - Set 2025
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN4-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_W) PORT_NAME("Keyout") // payout?
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Keyout") // payout?
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("IN4-6")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("IN4-7")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Supervisor Bookkeeping") // supervisor bookkeeping
@@ -10960,7 +10960,7 @@ static INPUT_PORTS_START( magodds )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -11097,7 +11097,7 @@ static INPUT_PORTS_START( schery97 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // doesn't work in v352c4
PORT_START("DSW1")
@@ -11269,7 +11269,7 @@ static INPUT_PORTS_START( nfb96 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings / Confirm")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings / Confirm")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -11460,7 +11460,7 @@ static INPUT_PORTS_START( nfb96tx )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused keyout?
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -11625,7 +11625,7 @@ static INPUT_PORTS_START( fb2010 ) // hit 'start1' to init NVRAM for first time
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused keyout?
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -11805,7 +11805,7 @@ static INPUT_PORTS_START( roypok96 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -11985,7 +11985,7 @@ static INPUT_PORTS_START( pokonl97 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -12402,7 +12402,7 @@ static INPUT_PORTS_START( nfm )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // display ticket value?
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // keyin? tied to ticket clear value
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // DSW4-1 must be on to access account menu
PORT_MODIFY( "DSW2" )
@@ -12434,7 +12434,7 @@ static INPUT_PORTS_START( amaztsk )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // display ticket value?
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // keyin? tied to ticket clear value
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // DSW4-1 must be on to access account menu
PORT_MODIFY("DSW1")
@@ -12563,7 +12563,7 @@ static INPUT_PORTS_START( unkch_controls )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
INPUT_PORTS_END
@@ -12587,7 +12587,7 @@ static INPUT_PORTS_START( unkch_controls_alt )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_CODE(KEYCODE_N) PORT_NAME("Start / Stop All")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
INPUT_PORTS_END
@@ -13513,7 +13513,7 @@ static INPUT_PORTS_START( megaline )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -13699,13 +13699,13 @@ static INPUT_PORTS_START( bonusch )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) //PORT_CODE(KEYCODE_K) PORT_NAME("COINS:IN2-8")
PORT_START("IN3") // service
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Reset")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("tickets", FUNC(ticket_dispenser_device::line_r))
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("IN4")
@@ -13870,13 +13870,13 @@ static INPUT_PORTS_START( feverch )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME("Coin A - Exchange Out")
PORT_START("IN4") // service
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Reset")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Reset")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("Service Coin")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // 1 coin - 100 credits
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // Hopper presence detection
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Hopper Payout")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1")
@@ -14018,7 +14018,7 @@ static INPUT_PORTS_START( star100 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Limited Payout") PORT_CODE(KEYCODE_H)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings / Test Mode") PORT_TOGGLE
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings / Test Mode") PORT_TOGGLE
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
PORT_START("IN3") // reflected in test mode
@@ -14558,12 +14558,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( flam7_w4 )
PORT_START("IN0") // b800
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("Button Lockout")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 - Big")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Big")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 - Double-Up")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 - Take Score")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Double Up")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / Take Score")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet 1")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 - Low")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Low")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start")
PORT_START("IN1") // b801
@@ -14604,8 +14604,8 @@ static INPUT_PORTS_START( flam7_w4 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN4-4 Active") // This one is active in real PCB.
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN4-5")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Collect")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Books / Stats / Setup") PORT_TOGGLE
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Reset")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Books / Stats / Setup") PORT_TOGGLE
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Payout" ) PORT_DIPLOCATION("DSW1:1,2")
@@ -14754,8 +14754,8 @@ static INPUT_PORTS_START( flaming7 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN4-4 Active") // this one is active in real PCB.
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN4-5")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Collect")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Books / Stats / Setup") PORT_TOGGLE
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Reset")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Books / Stats / Setup") PORT_TOGGLE
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x01, "Credits Out" ) PORT_DIPLOCATION("DSW1:1,2")
diff --git a/src/mame/jaleco/ms32.cpp b/src/mame/jaleco/ms32.cpp
index 2ce093b2357..e637b63ddc0 100644
--- a/src/mame/jaleco/ms32.cpp
+++ b/src/mame/jaleco/ms32.cpp
@@ -486,7 +486,7 @@ Notes from Charles MacDonald
ioport_value ms32_state::mahjong_ctrl_r()
{
- u32 mj_input = 0xff;
+ u32 mj_input = 0x3f;
for (int i = 0; i < m_io_mj.size(); i++)
{
@@ -494,7 +494,8 @@ ioport_value ms32_state::mahjong_ctrl_r()
mj_input &= m_io_mj[i]->read();
}
- return bitswap<8>(mj_input, 6, 5, 4, 2, 3, 1, 0, 7);
+ // rotated one bit left so the Start column is the least significant bit
+ return bitswap<6>(mj_input, 4, 2, 3, 1, 0, 5) | 0xc0;
}
void ms32_base_state::sound_command_w(u32 data)
@@ -963,22 +964,6 @@ static INPUT_PORTS_START( ms32_mahjong )
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_INCLUDE(mahjong_matrix_1p)
-
- PORT_MODIFY("KEY0")
- PORT_BIT( 0x00000060, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_START1 ) // rotated into LSB
-
- PORT_MODIFY("KEY1")
- PORT_BIT( 0x000000c0, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_MODIFY("KEY2")
- PORT_BIT( 0x000000c0, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_MODIFY("KEY3")
- PORT_BIT( 0x000000c0, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_MODIFY("KEY4")
- PORT_BIT( 0x000000c0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
/*************************************
diff --git a/src/mame/konami/konendev.cpp b/src/mame/konami/konendev.cpp
index e5129174301..31882d0cbb7 100644
--- a/src/mame/konami/konendev.cpp
+++ b/src/mame/konami/konendev.cpp
@@ -280,7 +280,7 @@ Play 30 Lines: 2/4/6 (2:1 odds), black
static INPUT_PORTS_START( konendev )
PORT_START("IN0")
PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_CODE(KEYCODE_3) PORT_NAME("Help")
+ PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CODE(KEYCODE_3) PORT_NAME("Help")
PORT_BIT( 0x0000fe00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Q) PORT_NAME("Bet 1 Credit")
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_W) PORT_NAME("Bet 2 Credits")
@@ -289,7 +289,7 @@ static INPUT_PORTS_START( konendev )
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_T) PORT_NAME("Bet 10 Credits")
PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_Y) PORT_NAME("Bet 20 Credits")
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_1) PORT_NAME("Collect")
- PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_CODE(KEYCODE_2) PORT_NAME("Reserve")
+ PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CODE(KEYCODE_2) PORT_NAME("Reserve")
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_A) PORT_NAME("Play 1 Line / Red")
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_S) PORT_NAME("Play 5 Lines")
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_CODE(KEYCODE_D) PORT_NAME("Play 10 Lines")
diff --git a/src/mame/mattel/juicebox.cpp b/src/mame/mattel/juicebox.cpp
index fea7715a7b7..c3a201b5f3d 100644
--- a/src/mame/mattel/juicebox.cpp
+++ b/src/mame/mattel/juicebox.cpp
@@ -9,16 +9,19 @@
*******************************************************************************/
#include "emu.h"
+
#include "cpu/arm7/arm7.h"
#include "machine/s3c44b0.h"
#include "machine/smartmed.h"
#include "sound/dac.h"
+
#include "emupal.h"
#include "screen.h"
#include "softlist_dev.h"
#include "speaker.h"
-#include <cstdarg>
+//#define VERBOSE 1
+#include "logmacro.h"
namespace {
@@ -39,9 +42,9 @@ public:
, m_port_g(*this, "PORTG")
{ }
- void juicebox(machine_config &config);
+ void juicebox(machine_config &config) ATTR_COLD;
- void init_juicebox();
+ void init_juicebox() ATTR_COLD;
DECLARE_INPUT_CHANGED_MEMBER(port_changed);
@@ -50,13 +53,6 @@ protected:
virtual void machine_reset() override ATTR_COLD;
private:
- required_device<cpu_device> m_maincpu;
- required_device<s3c44b0_device> m_s3c44b0;
- required_device<smartmedia_image_device> m_smartmedia;
- required_ioport m_port_g;
-
- uint32_t port[9];
-
struct jb_smc_t
{
int add_latch;
@@ -64,14 +60,21 @@ private:
int busy;
};
+ required_device<cpu_device> m_maincpu;
+ required_device<s3c44b0_device> m_s3c44b0;
+ required_device<smartmedia_image_device> m_smartmedia;
+ required_ioport m_port_g;
+
+ uint32_t port[9];
+
jb_smc_t smc;
- #if defined(JUICEBOX_ENTER_DEBUG_MENU) || defined(JUICEBOX_DISPLAY_ROM_ID)
+#if defined(JUICEBOX_ENTER_DEBUG_MENU) || defined(JUICEBOX_DISPLAY_ROM_ID)
int port_g_read_count;
- #endif
+#endif
+
uint32_t juicebox_nand_r(offs_t offset, uint32_t mem_mask = ~0);
void juicebox_nand_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
- inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4);
void smc_reset();
void smc_init();
uint8_t smc_read();
@@ -82,19 +85,6 @@ private:
void juicebox_map(address_map &map) ATTR_COLD;
};
-inline void juicebox_state::verboselog(int n_level, const char *s_fmt, ...)
-{
- if (VERBOSE_LEVEL >= n_level)
- {
- va_list v;
- char buf[32768];
- va_start( v, s_fmt);
- vsprintf( buf, s_fmt, v);
- va_end( v);
- logerror( "%s: %s", machine().describe_context(), buf);
- }
-}
-
/***************************************************************************
MACHINE HARDWARE
@@ -105,7 +95,7 @@ inline void juicebox_state::verboselog(int n_level, const char *s_fmt, ...)
void juicebox_state::smc_reset( )
{
- verboselog(5, "smc_reset\n");
+ LOG("smc_reset\n");
smc.add_latch = 0;
smc.cmd_latch = 0;
smc.busy = 0;
@@ -113,7 +103,7 @@ void juicebox_state::smc_reset( )
void juicebox_state::smc_init( )
{
- verboselog(5, "smc_init\n");
+ LOG("smc_init\n");
smc_reset();
}
@@ -126,30 +116,30 @@ uint8_t juicebox_state::smc_read( )
}
else
{
- data = 0xFF;
+ data = 0xff;
}
- verboselog(5, "smc_read %08X\n", data);
+ LOG("smc_read %08X\n", data);
return data;
}
void juicebox_state::smc_write( uint8_t data)
{
- verboselog(5, "smc_write %08X\n", data);
+ LOG("smc_write %08X\n", data);
if (m_smartmedia->is_present())
{
if (smc.cmd_latch)
{
- verboselog(5, "smartmedia_command_w %08X\n", data);
+ LOG("smartmedia_command_w %08X\n", data);
m_smartmedia->command_w(data);
}
else if (smc.add_latch)
{
- verboselog(5, "smartmedia_address_w %08X\n", data);
+ LOG("smartmedia_address_w %08X\n", data);
m_smartmedia->address_w(data);
}
else
{
- verboselog(5, "smartmedia_data_w %08X\n", data);
+ LOG("smartmedia_data_w %08X\n", data);
m_smartmedia->data_w(data);
}
}
@@ -174,7 +164,7 @@ uint32_t juicebox_state::s3c44b0_gpio_port_r(offs_t offset)
{
// 0C0062C4 -> bit 8 is turned on
//data |= 1 << 13;
- data = 0x0000FF15;
+ data = 0x0000ff15;
data &= (1 << 2) | (1 << 9) | (1 << 10) | (1 << 11);
data |= (1 << 2) | (1 << 9) | (1 << 10) | (1 << 11);
}
@@ -186,14 +176,14 @@ uint32_t juicebox_state::s3c44b0_gpio_port_r(offs_t offset)
break;
case S3C44B0_GPIO_PORT_E :
{
- data = 0x000000DF;
+ data = 0x000000df;
}
break;
case S3C44B0_GPIO_PORT_F :
{
data = data | (0 << 7);
- data = 0x0000009F;
- data &= ~0xE0;
+ data = 0x0000009f;
+ data &= ~0xe0;
if (smc.cmd_latch) data = data | 0x00000020;
if (smc.add_latch) data = data | 0x00000040;
if (!smc.busy) data = data | 0x00000080;
@@ -201,8 +191,8 @@ uint32_t juicebox_state::s3c44b0_gpio_port_r(offs_t offset)
break;
case S3C44B0_GPIO_PORT_G :
{
- data = 0x0000009F;
- data = (data & ~0x1F) | (m_port_g->read() & 0x1F);
+ data = 0x0000009f;
+ data = (data & ~0x1f) | (m_port_g->read() & 0x1f);
#if defined(JUICEBOX_ENTER_DEBUG_MENU)
if (port_g_read_count++ < 1)
{
@@ -211,13 +201,13 @@ uint32_t juicebox_state::s3c44b0_gpio_port_r(offs_t offset)
#elif defined(JUICEBOX_DISPLAY_ROM_ID)
if (port_g_read_count++ < 3)
{
- data = 0x0000008A; // RETURN + FORWARD + STAR
+ data = 0x0000008a; // RETURN + FORWARD + STAR
}
#endif
}
break;
}
-// data = ((machine().rand() & 0xFF) << 24) | ((machine().rand() & 0xFF) << 16) | ((machine().rand() & 0xFF) << 8) | ((machine().rand() & 0xFF) << 0);
+ //data = ((machine().rand() & 0xff) << 24) | ((machine().rand() & 0xff) << 16) | ((machine().rand() & 0xff) << 8) | ((machine().rand() & 0xff) << 0);
return data;
}
@@ -230,7 +220,7 @@ void juicebox_state::s3c44b0_gpio_port_w(offs_t offset, uint32_t data)
{
smc.cmd_latch = ((data & 0x00000020) != 0);
smc.add_latch = ((data & 0x00000040) != 0);
- verboselog( 5, "s3c44b0_gpio_port_w - nand cle %d ale %d\n", (data & 0x20) ? 1 : 0, (data & 0x40) ? 1 : 0);
+ LOG("s3c44b0_gpio_port_w - nand cle %d ale %d\n", (data & 0x20) ? 1 : 0, (data & 0x40) ? 1 : 0);
}
break;
}
@@ -245,17 +235,17 @@ uint32_t juicebox_state::juicebox_nand_r(offs_t offset, uint32_t mem_mask)
if (ACCESSING_BITS_8_15) data = data | (smc_read() << 8);
if (ACCESSING_BITS_16_23) data = data | (smc_read() << 16);
if (ACCESSING_BITS_24_31) data = data | (smc_read() << 24);
- verboselog( 5, "juicebox_nand_r %08X %08X %08X\n", offset, mem_mask, data);
+ LOG("juicebox_nand_r %08X %08X %08X\n", offset, mem_mask, data);
return data;
}
void juicebox_state::juicebox_nand_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- verboselog( 5, "juicebox_nand_w %08X %08X %08X\n", offset, mem_mask, data);
- if (ACCESSING_BITS_0_7) smc_write((data >> 0) & 0xFF);
- if (ACCESSING_BITS_8_15) smc_write((data >> 8) & 0xFF);
- if (ACCESSING_BITS_16_23) smc_write((data >> 16) & 0xFF);
- if (ACCESSING_BITS_24_31) smc_write((data >> 24) & 0xFF);
+ LOG("juicebox_nand_w %08X %08X %08X\n", offset, mem_mask, data);
+ if (ACCESSING_BITS_0_7) smc_write((data >> 0) & 0xff);
+ if (ACCESSING_BITS_8_15) smc_write((data >> 8) & 0xff);
+ if (ACCESSING_BITS_16_23) smc_write((data >> 16) & 0xff);
+ if (ACCESSING_BITS_24_31) smc_write((data >> 24) & 0xff);
}
// ...
@@ -365,9 +355,9 @@ ROM_START( juicebox )
ROM_SYSTEM_BIOS( 0, "juicebox", "Juice Box v.28 08242004" )
ROMX_LOAD( "juicebox.rom", 0, 0x800000, CRC(ac731197) SHA1(8278891c3531b3b6b5fec2a97a3ef6f0de1ac81d), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "uclinuxp", "uClinux 2.4.24-uc0 (patched)" )
- ROMX_LOAD( "newboot.rom", 0, 0x1A0800, CRC(443f48b7) SHA1(38f0dc07b5cf02b972a851aa9e87f5d93d03f629), ROM_BIOS(1) )
+ ROMX_LOAD( "newboot.rom", 0, 0x1a0800, CRC(443f48b7) SHA1(38f0dc07b5cf02b972a851aa9e87f5d93d03f629), ROM_BIOS(1) )
ROM_SYSTEM_BIOS( 2, "uclinux", "uClinux 2.4.24-uc0" )
- ROMX_LOAD( "image.rom", 0, 0x19E400, CRC(6c0308bf) SHA1(5fe21a38a4cd0d86bb60920eb100138b0e924d90), ROM_BIOS(2) )
+ ROMX_LOAD( "image.rom", 0, 0x19e400, CRC(6c0308bf) SHA1(5fe21a38a4cd0d86bb60920eb100138b0e924d90), ROM_BIOS(2) )
ROM_END
} // Anonymous namespace
diff --git a/src/mame/merit/mgames.cpp b/src/mame/merit/mgames.cpp
index 46b077b0a15..94382ccffad 100644
--- a/src/mame/merit/mgames.cpp
+++ b/src/mame/merit/mgames.cpp
@@ -572,7 +572,7 @@ static INPUT_PORTS_START( mgames )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/midway/mcr.cpp b/src/mame/midway/mcr.cpp
index 4e5c457b474..3718d0b312d 100644
--- a/src/mame/midway/mcr.cpp
+++ b/src/mame/midway/mcr.cpp
@@ -1036,7 +1036,7 @@ static INPUT_PORTS_START( dpoker )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? ARM HIT
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // will only work after opening a door
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? XTMSG (ON/OFF)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? EXTLKT (ON/OFF)
diff --git a/src/mame/misc/ampoker2.cpp b/src/mame/misc/ampoker2.cpp
index ec4f2b06b61..7dabf589b07 100644
--- a/src/mame/misc/ampoker2.cpp
+++ b/src/mame/misc/ampoker2.cpp
@@ -706,7 +706,7 @@ static INPUT_PORTS_START( ampoker2 )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Operator Key") PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Operator Key") PORT_TOGGLE
PORT_DIPNAME( 0x08, 0x08, "Remote Mode" )
PORT_DIPSETTING( 0x08, "Mode 1" )
PORT_DIPSETTING( 0x00, "Mode 2" )
@@ -791,7 +791,7 @@ static INPUT_PORTS_START( ampkr95 )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Operator Key") PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Operator Key") PORT_TOGGLE
PORT_DIPNAME( 0x08, 0x08, "Remote Mode" )
PORT_DIPSETTING( 0x08, "Mode 1" )
PORT_DIPSETTING( 0x00, "Mode 2" )
@@ -876,7 +876,7 @@ static INPUT_PORTS_START( sigmapkr )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Operator Key") PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Operator Key") PORT_TOGGLE
PORT_DIPNAME( 0x08, 0x08, "Remote Mode" )
PORT_DIPSETTING( 0x08, "Mode 1" )
PORT_DIPSETTING( 0x00, "Mode 2" )
@@ -960,7 +960,7 @@ static INPUT_PORTS_START( sigma2k )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Operator Key") PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Operator Key") PORT_TOGGLE
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1059,7 +1059,7 @@ static INPUT_PORTS_START( piccolop )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal/Take")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Operator Key") PORT_TOGGLE
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Operator Key") PORT_TOGGLE
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
diff --git a/src/mame/misc/amusco.cpp b/src/mame/misc/amusco.cpp
index 7b6fbd76615..dff54b058c7 100644
--- a/src/mame/misc/amusco.cpp
+++ b/src/mame/misc/amusco.cpp
@@ -436,7 +436,7 @@ static INPUT_PORTS_START( amusco )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("Cash Door")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("Logic Door")
diff --git a/src/mame/misc/boramz80.cpp b/src/mame/misc/boramz80.cpp
index a2347d5b8e8..7f018bfef52 100644
--- a/src/mame/misc/boramz80.cpp
+++ b/src/mame/misc/boramz80.cpp
@@ -323,7 +323,7 @@ static INPUT_PORTS_START( pkboram )
PORT_START("IN4")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYOUT )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // not shown is input test
diff --git a/src/mame/misc/calomega.cpp b/src/mame/misc/calomega.cpp
index 5db16a66fa5..8bbfecd0beb 100644
--- a/src/mame/misc/calomega.cpp
+++ b/src/mame/misc/calomega.cpp
@@ -1260,7 +1260,7 @@ static INPUT_PORTS_START( keno_903 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clear Credits") PORT_CODE(KEYCODE_8) // "8"
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Credits") // "F1"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1610,7 +1610,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gdrwpkrd )
PORT_START("IN0-0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // credits
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Collect")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel Discards")
@@ -1752,7 +1752,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gdrwpkrh )
PORT_START("IN0-0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Collect")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel Holds")
@@ -2118,7 +2118,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( comg074 )
PORT_START("IN0-0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // credits
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Collect")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel Discards")
@@ -2290,7 +2290,7 @@ static INPUT_PORTS_START( comg076 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clear Credits") PORT_CODE(KEYCODE_8)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Credits")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big")
@@ -2431,7 +2431,7 @@ static INPUT_PORTS_START( biggame )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clear Credits") PORT_CODE(KEYCODE_8)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Credits")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2575,7 +2575,7 @@ static INPUT_PORTS_START( nudgensw ) // nudge bingo
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clear Credits") PORT_CODE(KEYCODE_8)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Credits")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2715,7 +2715,7 @@ static INPUT_PORTS_START( hotline ) // nudge bingo
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Credits") PORT_IMPULSE(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn") PORT_CODE(KEYCODE_0)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clear Data") PORT_CODE(KEYCODE_8)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Data")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5
@@ -3199,7 +3199,7 @@ static INPUT_PORTS_START( comg170 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn") PORT_CODE(KEYCODE_8)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clr Data") PORT_CODE(KEYCODE_0)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Data")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -3280,7 +3280,7 @@ static INPUT_PORTS_START( comg172 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn") PORT_CODE(KEYCODE_8)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clr Data") PORT_CODE(KEYCODE_0)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Data")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -3360,7 +3360,7 @@ static INPUT_PORTS_START( elgrande )
PORT_START("IN0-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3467,7 +3467,7 @@ static INPUT_PORTS_START( jjpoker )
PORT_START("IN0-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3574,7 +3574,7 @@ static INPUT_PORTS_START( ssipkr )
PORT_START("IN0-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3681,7 +3681,7 @@ static INPUT_PORTS_START( comg204 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn") PORT_CODE(KEYCODE_8)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clr Data") PORT_CODE(KEYCODE_0)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Data")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -4089,7 +4089,7 @@ static INPUT_PORTS_START( pixels ) // sys905
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play/Bet")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Go/Start")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn") PORT_CODE(KEYCODE_0)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clear Data") PORT_CODE(KEYCODE_8)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Clear Data")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/misc/cb2001.cpp b/src/mame/misc/cb2001.cpp
index 1dd769eb241..7a77ddeea86 100644
--- a/src/mame/misc/cb2001.cpp
+++ b/src/mame/misc/cb2001.cpp
@@ -635,9 +635,10 @@ void cb2001_state::cb5_io_map(address_map &map)
}
static INPUT_PORTS_START( cb2001 )
+ // TODO: resolve conflicting input types
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Big")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 / D-UP")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SLOT_STOP_ALL ) PORT_NAME("Stop All / Take")
@@ -662,7 +663,7 @@ static INPUT_PORTS_START( cb2001 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1-2")
@@ -795,9 +796,10 @@ static INPUT_PORTS_START( cb2001 )
INPUT_PORTS_END
static INPUT_PORTS_START( scherrymp )
+ // TODO: resolve conflicting input types
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Big")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 / D-UP")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SLOT_STOP_ALL ) PORT_NAME("Stop All / Take")
@@ -822,7 +824,7 @@ static INPUT_PORTS_START( scherrymp )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1-2")
@@ -1045,7 +1047,7 @@ static INPUT_PORTS_START( cb5 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
PORT_START("DSW1")
@@ -1180,9 +1182,10 @@ static INPUT_PORTS_START( cb5 )
INPUT_PORTS_END
static INPUT_PORTS_START( ndongmul2 )
+ // TODO: resolve conflicting input types
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Big")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 / D-UP")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SLOT_STOP_ALL ) PORT_NAME("Stop All / Take")
@@ -1207,7 +1210,7 @@ static INPUT_PORTS_START( ndongmul2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
PORT_START("DSW1-2")
diff --git a/src/mame/misc/gluck2.cpp b/src/mame/misc/gluck2.cpp
index 50d7dbebf6a..d588d314ec2 100644
--- a/src/mame/misc/gluck2.cpp
+++ b/src/mame/misc/gluck2.cpp
@@ -388,7 +388,7 @@ static INPUT_PORTS_START( gluck2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -399,7 +399,7 @@ static INPUT_PORTS_START( gluck2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_R) PORT_NAME("Reset")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Reset")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SW1") // 2000
@@ -495,7 +495,7 @@ static INPUT_PORTS_START( sise7 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("PAD 3")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("PAD 4")
diff --git a/src/mame/misc/goldnpkr.cpp b/src/mame/misc/goldnpkr.cpp
index cf4559e242a..d7f17689d2b 100644
--- a/src/mame/misc/goldnpkr.cpp
+++ b/src/mame/misc/goldnpkr.cpp
@@ -4789,7 +4789,7 @@ static INPUT_PORTS_START( megadpkr )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Menu")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Menu")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // not used?
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Credit")
diff --git a/src/mame/misc/hotchili.cpp b/src/mame/misc/hotchili.cpp
index 3237bb62868..b33b79fcc03 100644
--- a/src/mame/misc/hotchili.cpp
+++ b/src/mame/misc/hotchili.cpp
@@ -304,7 +304,7 @@ void hotchili_state::hc_map(address_map &map)
static INPUT_PORTS_START( hotchili )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("All Clear / Configuration") // pressed on startup
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Clear / Configuration") // pressed on startup
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unknown
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) // active: enables RNG and read inputs on secondary buffer (inputs with special timing)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meter Reading Key") PORT_TOGGLE
diff --git a/src/mame/misc/jackhouse.cpp b/src/mame/misc/jackhouse.cpp
index 7cba3681d45..ed643f97816 100644
--- a/src/mame/misc/jackhouse.cpp
+++ b/src/mame/misc/jackhouse.cpp
@@ -524,7 +524,7 @@ static INPUT_PORTS_START( jackhouse )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-4") PORT_CODE(KEYCODE_M) // unknown
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // attendant pay key
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // hopper payout button
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Confirm / Test Mode") // confirm / test mode
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Confirm / Test Mode") // confirm / test mode
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Record Mode") // books-record / color test
PORT_START("IN3")
diff --git a/src/mame/misc/kingpin.cpp b/src/mame/misc/kingpin.cpp
index 7888171fe84..03e427de3eb 100644
--- a/src/mame/misc/kingpin.cpp
+++ b/src/mame/misc/kingpin.cpp
@@ -181,7 +181,7 @@ static INPUT_PORTS_START( kingpin )
PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
- PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) // switches to next screen in attract mode
+ PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // switches to next screen in attract mode
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "Setup (1 of 4)" ) PORT_DIPLOCATION("S1:1")
diff --git a/src/mame/misc/magicfly.cpp b/src/mame/misc/magicfly.cpp
index 3fe4a235eb5..b48aa235bfc 100644
--- a/src/mame/misc/magicfly.cpp
+++ b/src/mame/misc/magicfly.cpp
@@ -798,7 +798,7 @@ static INPUT_PORTS_START( magicfly )
PORT_START("IN0-3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Deal / Last Bet") PORT_CODE(KEYCODE_C)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Cancel") PORT_CODE(KEYCODE_V)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Bet10") PORT_CODE(KEYCODE_X)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Bet1/Select") PORT_CODE(KEYCODE_Z)
@@ -839,10 +839,10 @@ static INPUT_PORTS_START( 7mezzo )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Big") PORT_CODE(KEYCODE_A)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Small") PORT_CODE(KEYCODE_S)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Payout") PORT_CODE(KEYCODE_Q)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Take") PORT_CODE(KEYCODE_V)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // present in the input test
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -861,10 +861,10 @@ static INPUT_PORTS_START( 7mezzo )
PORT_START("IN0-3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Deal / Last Bet") PORT_CODE(KEYCODE_Z)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_X)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Double") PORT_CODE(KEYCODE_C)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_1)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -935,7 +935,7 @@ static INPUT_PORTS_START( bchance )
PORT_START("IN0-3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") // input test R4C1 (start/deal)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // input test R4C2 (cancel)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) // input test R4C3 (service/test)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // input test R4C3 (service/test)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // input test R4C4 (d-up)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // input test R4C5 (bet)
diff --git a/src/mame/misc/multfish.cpp b/src/mame/misc/multfish.cpp
index 3504e717ca0..6b6268f2c58 100644
--- a/src/mame/misc/multfish.cpp
+++ b/src/mame/misc/multfish.cpp
@@ -829,7 +829,7 @@ static INPUT_PORTS_START( rollfr )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN5")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) //Service SW (20 B)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) //Service SW (20 B)
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN6")
diff --git a/src/mame/misc/norautp.cpp b/src/mame/misc/norautp.cpp
index 85dadc2c9f3..15dde9e4b8c 100644
--- a/src/mame/misc/norautp.cpp
+++ b/src/mame/misc/norautp.cpp
@@ -1556,7 +1556,7 @@ static INPUT_PORTS_START( norautp )
PORT_START("IN2") // Only 3 lines: PPI-2; PC0-PC2
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Readout")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Readout")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("Low Level Hopper")
PORT_START("DSW1")
@@ -1594,7 +1594,7 @@ static INPUT_PORTS_START( norautrh )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet / Change Card")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // Coin A
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // Coin B
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Readout")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Readout")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Hi")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Lo")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
@@ -1652,7 +1652,7 @@ static INPUT_PORTS_START( norautpn )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet / Change Card")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // Coin A
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // Coin B
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Readout")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Readout")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Hi")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Lo")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
diff --git a/src/mame/misc/truco.cpp b/src/mame/misc/truco.cpp
index ffd34b8ba4b..c22c487d403 100644
--- a/src/mame/misc/truco.cpp
+++ b/src/mame/misc/truco.cpp
@@ -497,7 +497,7 @@ void truco_state::main_map(address_map &map)
static INPUT_PORTS_START( truco )
PORT_START("P1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Keyout enable Key") // Connected to JAMMA S17 (P2 START)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Keyout enable Key") // Connected to JAMMA S17 (P2 START)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Connected to JAMMA S14 (SERVICE SW)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("P1-4")PORT_CODE(KEYCODE_D) // still not clear... Connected to JAMMA C26 (P2 SELECT)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN) // Connected to JAMMA S16 (COIN2)
diff --git a/src/mame/sega/9h0-0008_iox.h b/src/mame/sega/9h0-0008_iox.h
index 212ade14a20..b47a85317a4 100644
--- a/src/mame/sega/9h0-0008_iox.h
+++ b/src/mame/sega/9h0-0008_iox.h
@@ -23,10 +23,7 @@ public:
sega_9h0_0008_iox_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool const fixed)
: sega_9h0_0008_iox_slot_device(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
sega_9h0_0008_iox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
virtual ~sega_9h0_0008_iox_slot_device();
diff --git a/src/mame/sega/bingoct.cpp b/src/mame/sega/bingoct.cpp
index 224c0dbd110..630fb66b304 100644
--- a/src/mame/sega/bingoct.cpp
+++ b/src/mame/sega/bingoct.cpp
@@ -172,7 +172,7 @@ static INPUT_PORTS_START( terminal )
PORT_START("in1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_SERVICE) PORT_NAME("Test")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT) PORT_NAME("Key")
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE) PORT_NAME("Service")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE1) PORT_NAME("Service")
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_COIN1) PORT_NAME("Coin")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_NAME("Hopper Pool Sensor")
diff --git a/src/mame/sega/saturn_v.cpp b/src/mame/sega/saturn_v.cpp
index de55fe34473..b2ac19bd442 100644
--- a/src/mame/sega/saturn_v.cpp
+++ b/src/mame/sega/saturn_v.cpp
@@ -428,7 +428,7 @@ void saturn_state::vdp1_regs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
if ( VDP1_LOG ) logerror( "VDP1: Draw forced termination register write: %08X %08X\n", offset*2, data );
break;
default:
- printf("Warning: write to unknown VDP1 reg %08x %08x\n",offset*2,data);
+ logerror("Warning: write to unknown VDP1 reg %08x %08x\n",offset*2,data);
break;
}
diff --git a/src/mame/sega/segajw.cpp b/src/mame/sega/segajw.cpp
index dffaba0d998..34e2ded3b19 100644
--- a/src/mame/sega/segajw.cpp
+++ b/src/mame/sega/segajw.cpp
@@ -239,7 +239,7 @@ static INPUT_PORTS_START( segajw )
PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Meter")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meter")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Last Game") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("M-Door")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("D-Door")
diff --git a/src/mame/sega/segasm1.cpp b/src/mame/sega/segasm1.cpp
index d469b915e9e..2575af3432f 100644
--- a/src/mame/sega/segasm1.cpp
+++ b/src/mame/sega/segasm1.cpp
@@ -332,10 +332,9 @@ static INPUT_PORTS_START( tinkerbl )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Analyzer")
PORT_START("IN1_PD")
- // Following can't be IPT_SERVICE1, it will collide with IPT_GAMBLE_SERVICE
// TODO: verify what's for (doesn't increment credits)
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Service Switch")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("All Reset")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Switch")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("All Reset")
PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/seta/thedealr.cpp b/src/mame/seta/thedealr.cpp
index c4abf68cf21..fd2c8cf34f2 100644
--- a/src/mame/seta/thedealr.cpp
+++ b/src/mame/seta/thedealr.cpp
@@ -270,7 +270,7 @@ static INPUT_PORTS_START( thedealr )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // HL5 (hold 5)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_HALF ) // 1/2 (half gamble)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") // SML (small)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Attendant Reset") // RST (reset: clears tilt condition)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Attendant Reset") // RST (reset: clears tilt condition)
PORT_START("IOX1")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/shared/mahjong.cpp b/src/mame/shared/mahjong.cpp
index 9fc8cfaedca..0edded8cdb5 100644
--- a/src/mame/shared/mahjong.cpp
+++ b/src/mame/shared/mahjong.cpp
@@ -37,6 +37,42 @@
Reach * * * *
Ron * * * *
+
+ "Standard" mahjong keyboards use a 4*6 matrix. Gambling controls add an additional row.
+
+ A E I M Kan Start
+ B F J N Reach Bet
+ C G K Chi Ron -
+ D H L Pon - -
+ Last Take W-Up F.Flop Big Small
+
+ Hanafuda keyboards use a subset of the matrix.
+ These are rare. A mahjong panel with additional labels would usually be used.
+
+ 1 5 - Yes - Start
+ 2 6 - No - Bet
+ 3 7 - - - -
+ 4 8 - - - -
+ - Take W-Up F.Flop Big Small
+
+ Rarest of all is the 6-button hanafuda (or "hanaroku") keyboard, using a 6*6 matrix.
+ This has controls for two player positions in one matrix.
+
+ 1P 1 1P 2 1P 3 1P 4 Payout F.Flop
+ 1P 5 1P No 1P Yes 1P 6 - -
+ - 1P Start 1P Bet - - -
+ 2P 1 2P 2 2P 3 2P 4 - -
+ 2P 5 2P No 2P Yes 2P 6 - -
+ - 2P Start 2P Bet - - -
+
+ Columns are usually wired from left to right from least significant to most significant bit.
+ Nichibutsu wires the bits in the opposite order.
+ The Jaleco MegaSystem 32 has the columns rotated by one position so the Start column is the least significant bit.
+
+ Note that non-standard mahjong/hanafuda keyboards exist:
+ * Some Nichibutsu hanafuda games use the Reach/Ron positions for Yes/No (rather than M/N).
+ * SNK Neo Geo mahjong keyboards use a non-standard 3*7 matrix.
+
*/
#include "emu.h"
#include "mahjong.h"
diff --git a/src/mame/shared/mahjong.h b/src/mame/shared/mahjong.h
index 04b4b9d4e77..600948f1a0d 100644
--- a/src/mame/shared/mahjong.h
+++ b/src/mame/shared/mahjong.h
@@ -31,10 +31,7 @@ public:
bool const fixed)
: mahjong_panel_connector_device(mconfig, tag, owner, u32(0))
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
mahjong_panel_connector_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
virtual ~mahjong_panel_connector_device();
diff --git a/src/mame/shared/xbox_usb.h b/src/mame/shared/xbox_usb.h
index e69c310d386..98d5fc450f4 100644
--- a/src/mame/shared/xbox_usb.h
+++ b/src/mame/shared/xbox_usb.h
@@ -475,10 +475,7 @@ public:
ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed)
: ohci_usb_connector(mconfig, tag, owner, 0)
{
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(fixed);
+ set_options(std::forward<T>(opts), dflt, fixed);
}
ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/mame/sigma/sigmab52.cpp b/src/mame/sigma/sigmab52.cpp
index 7bb912b5794..b5d900084b5 100644
--- a/src/mame/sigma/sigmab52.cpp
+++ b/src/mame/sigma/sigmab52.cpp
@@ -461,7 +461,7 @@ static INPUT_PORTS_START( jwildb52 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Meter")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meter")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("Reset")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("Last")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_DOOR ) PORT_NAME("Machine Door")
diff --git a/src/mame/skeleton/dm7000.cpp b/src/mame/skeleton/dm7000.cpp
index 0692a7da716..2433f82b7fa 100644
--- a/src/mame/skeleton/dm7000.cpp
+++ b/src/mame/skeleton/dm7000.cpp
@@ -355,7 +355,7 @@ uint32_t dm7000_state::screen_update_dm7000(screen_device &screen, bitmap_rgb32
uint32_t dm7000_state::dcr_r(offs_t offset)
{
osd_printf_debug("DCR %03X read\n", offset);
- if(offset>=1024) {printf("get %04X\n", offset); return 0;} else
+ if(offset>=1024) {logerror("get %04X\n", offset); return 0;} else
switch(offset) {
case DCRSTB045_CMD_STAT:
return 0; // assume that video dev is always ready
@@ -368,7 +368,7 @@ uint32_t dm7000_state::dcr_r(offs_t offset)
void dm7000_state::dcr_w(offs_t offset, uint32_t data)
{
osd_printf_debug("DCR %03X write = %08X\n", offset, data);
- if(offset>=1024) {printf("get %04X\n", offset); } else
+ if(offset>=1024) {logerror("get %04X\n", offset); } else
dcr[offset] = data;
}
diff --git a/src/mame/skeleton/seoul88.cpp b/src/mame/skeleton/seoul88.cpp
index 8190743a25c..8393db66757 100644
--- a/src/mame/skeleton/seoul88.cpp
+++ b/src/mame/skeleton/seoul88.cpp
@@ -176,7 +176,7 @@ static INPUT_PORTS_START( seoul88 ) // there are 3 8-dip banks on PCB but test m
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
PORT_START("DSW1")
diff --git a/src/mame/subsino/subsino.cpp b/src/mame/subsino/subsino.cpp
index 208868896c3..e7f08c09517 100644
--- a/src/mame/subsino/subsino.cpp
+++ b/src/mame/subsino/subsino.cpp
@@ -1325,7 +1325,7 @@ static INPUT_PORTS_START( victor21 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) // coin 2
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(3) // coin 3
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // no payout?
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out
@@ -1433,7 +1433,7 @@ static INPUT_PORTS_START( victor5 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out
@@ -1569,7 +1569,7 @@ static INPUT_PORTS_START( tisub )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Current settings.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Current settings.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out
@@ -1744,7 +1744,7 @@ static INPUT_PORTS_START( stbsub )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Current settings.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Current settings.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out
@@ -1880,7 +1880,7 @@ static INPUT_PORTS_START( tesorone )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Current settings.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Current settings.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out
@@ -2015,7 +2015,7 @@ static INPUT_PORTS_START( crsbingo )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out
@@ -2107,7 +2107,7 @@ static INPUT_PORTS_START( sharkpy )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout?
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out?
@@ -2215,7 +2215,7 @@ static INPUT_PORTS_START( sharkpye )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
@@ -2311,7 +2311,7 @@ static INPUT_PORTS_START( smoto16 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out?
@@ -2407,7 +2407,7 @@ static INPUT_PORTS_START( smoto20 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // key out?
@@ -2515,7 +2515,7 @@ static INPUT_PORTS_START( victor6 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
@@ -2623,7 +2623,7 @@ static INPUT_PORTS_START( victor6a )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
@@ -2731,7 +2731,7 @@ static INPUT_PORTS_START( victor6b )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats / Test") // Bookkeeping.
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") // Game Rate & others.
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings") // Game Rate & others.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
diff --git a/src/mame/sun/sun2.cpp b/src/mame/sun/sun2.cpp
index 139b7193ad0..3d3f084540b 100644
--- a/src/mame/sun/sun2.cpp
+++ b/src/mame/sun/sun2.cpp
@@ -120,17 +120,22 @@ How the architecture works:
****************************************************************************/
#include "emu.h"
+
+#include "bus/rs232/rs232.h"
#include "cpu/m68000/m68010.h"
-#include "machine/ram.h"
#include "machine/am9513.h"
+#include "machine/bankdev.h"
#include "machine/i82586.h"
+#include "machine/input_merger.h"
#include "machine/mm58167.h"
+#include "machine/ram.h"
#include "machine/z80scc.h"
-#include "machine/bankdev.h"
-#include "machine/input_merger.h"
-#include "bus/rs232/rs232.h"
+
#include "screen.h"
+//#define VERBOSE 1
+#include "logmacro.h"
+
namespace {
@@ -240,19 +245,19 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
switch (offset & 7)
{
case 4:
- //printf("sun2: Read IDPROM @ %x (PC=%x)\n", offset<<1, m_maincpu->pc());
+ LOG("sun2: Read IDPROM @ %x (PC=%x)\n", offset<<1, m_maincpu->pc());
return m_idprom_ptr[(offset>>10) & 0x1f]<<8;
case 5:
- //printf("sun2: Read diag reg\n");
+ LOG("sun2: Read diag reg\n");
return m_diagreg;
case 6:
- //printf("sun2: Read bus error @ PC %x\n", m_maincpu->pc());
+ LOG("sun2: Read bus error @ PC %x\n", m_maincpu->pc());
return m_buserror;
case 7:
- //printf("sun2: Read sysenable\n");
+ LOG("sun2: Read sysenable\n");
return m_sysenable;
}
}
@@ -267,7 +272,7 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
page = m_segmap[m_context & 7][offset >> 14] << 4;
page += ((offset >> 10) & 0xf);
- //printf("sun2: Read page map at %x (entry %d)\n", offset<<1, page);
+ LOG("sun2: Read page map at %x (entry %d)\n", offset<<1, page);
if (offset & 1) // low-order 16 bits
{
return m_pagemap[page] & 0xffff;
@@ -275,11 +280,11 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
return m_pagemap[page] >> 16;
case 2: // segment map
- //printf("sun2: Read segment map at %x (entry %d, user ctx %d)\n", offset<<1, offset>>14, m_context & 7);
+ LOG("sun2: Read segment map at %x (entry %d, user ctx %d)\n", offset<<1, offset>>14, m_context & 7);
return m_segmap[m_context & 7][offset >> 14];
case 3: // context reg
- //printf("sun2: Read context reg\n");
+ LOG("sun2: Read context reg\n");
return m_context;
}
}
@@ -302,7 +307,7 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
uint8_t pmeg = m_segmap[context][offset >> 14];
uint32_t entry = (pmeg << 4) + ((offset >> 10) & 0xf);
- // printf("sun2: Context = %d, pmeg = %d, offset >> 14 = %x, entry = %d, page = %d\n", context, pmeg, offset >> 14, entry, (offset >> 10) & 0xf);
+ LOG("sun2: Context = %d, pmeg = %d, offset >> 14 = %x, entry = %d, page = %d\n", context, pmeg, offset >> 14, entry, (offset >> 10) & 0xf);
if (m_pagemap[entry] & PM_VALID)
{
@@ -312,8 +317,8 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
uint32_t tmp = (m_pagemap[entry] & 0xfff) << 10;
tmp |= (offset & 0x3ff);
- // if (!machine().side_effects_disabled())
- // printf("sun2: Translated addr: %08x, type %d (page %d page entry %08x, orig virt %08x, FC %d)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, entry, m_pagemap[entry], offset<<1, fc);
+ if (!machine().side_effects_disabled())
+ LOG("sun2: Translated addr: %08x, type %d (page %d page entry %08x, orig virt %08x, FC %d)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, entry, m_pagemap[entry], offset<<1, fc);
switch ((m_pagemap[entry] >> 22) & 7)
{
@@ -343,7 +348,7 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
}
}
- //printf("read device space @ %x\n", tmp<<1);
+ LOG("read device space @ %x\n", tmp<<1);
return m_type1space->read16(tmp, mem_mask);
case 2: // type 2 space
@@ -355,10 +360,12 @@ uint16_t sun2_state::tl_mmu_r(uint8_t fc, offs_t offset, uint16_t mem_mask)
}
else
{
- if (!machine().side_effects_disabled()) printf("sun2: pagemap entry not valid!\n");
+ if (!machine().side_effects_disabled())
+ logerror("sun2: pagemap entry not valid!\n");
}
- if (!machine().side_effects_disabled()) printf("sun2: Unmapped read @ %08x (FC %d, mask %04x, PC=%x, seg %x)\n", offset<<1, fc, mem_mask, m_maincpu->pc(), offset>>15);
+ if (!machine().side_effects_disabled())
+ logerror("sun2: Unmapped read @ %08x (FC %d, mask %04x, PC=%x, seg %x)\n", offset<<1, fc, mem_mask, m_maincpu->pc(), offset>>15);
return 0xffff;
}
@@ -370,7 +377,7 @@ void sun2_state::mmu_w(offs_t offset, uint16_t data, uint16_t mem_mask)
void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem_mask)
{
- //printf("sun2: Write %04x (FC %d, mask %04x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc(), offset<<1);
+ LOG("sun2: Write %04x (FC %d, mask %04x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc(), offset<<1);
if (fc == 3)
{
@@ -379,33 +386,33 @@ void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem
switch (offset & 7)
{
case 4:
- //printf("sun2: Write? IDPROM @ %x\n", offset<<1);
+ LOG("sun2: Write? IDPROM @ %x\n", offset<<1);
return;
case 5:
// XOR to match Table 2-1 in the 2/50 Field Service Manual
- printf("sun2: CPU LEDs to %02x (PC=%x) => ", (data & 0xff) ^ 0xff, m_maincpu->pc());
+ osd_printf_info("sun2: CPU LEDs to %02x (PC=%x) => ", (data & 0xff) ^ 0xff, m_maincpu->pc());
m_diagreg = data & 0xff;
for (int i = 0; i < 8; i++)
{
if (m_diagreg & (1<<(7-i)))
{
- printf("*");
+ osd_printf_info("*");
}
else
{
- printf("O");
+ osd_printf_info("O");
}
}
- printf("\n");
+ osd_printf_info("\n");
return;
case 6:
- //printf("sun2: Write %04x to bus error not allowed\n", data);
+ LOG("sun2: Write %04x to bus error not allowed\n", data);
return;
case 7:
- //printf("sun2: Write %04x to system enable\n", data);
+ LOG("sun2: Write %04x to system enable\n", data);
COMBINE_DATA(&m_sysenable);
return;
}
@@ -421,7 +428,7 @@ void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem
page = m_segmap[m_context & 7][offset >> 14] << 4;
page += ((offset >> 10) & 0xf);
- //printf("sun2: Write %04x to page map at %x (entry %d), ", data, offset<<1, page);
+ LOG("sun2: Write %04x to page map at %x (entry %d), ", data, offset<<1, page);
if (offset & 1) // low-order 16 bits
{
m_pagemap[page] &= 0xffff0000;
@@ -432,16 +439,16 @@ void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem
m_pagemap[page] &= 0x0000ffff;
m_pagemap[page] |= (data<<16);
}
- //printf("entry now %08x (adr %08x PC=%x)\n", m_pagemap[page], (m_pagemap[page] & 0xfffff) << 11, m_maincpu->pc());
+ LOG("entry now %08x (adr %08x PC=%x)\n", m_pagemap[page], (m_pagemap[page] & 0xfffff) << 11, m_maincpu->pc());
return;
case 2: // segment map
- //printf("sun2: Write %02x to segment map at %x (entry %d, user ctx %d PC=%x)\n", data & 0xff, offset<<1, offset>>14, m_context & 7, m_maincpu->pc());
+ LOG("sun2: Write %02x to segment map at %x (entry %d, user ctx %d PC=%x)\n", data & 0xff, offset<<1, offset>>14, m_context & 7, m_maincpu->pc());
m_segmap[m_context & 7][offset >> 14] = data & 0xff;
return;
case 3: // context reg
- //printf("sun2: Write %04x to context\n", data);
+ LOG("sun2: Write %04x to context\n", data);
COMBINE_DATA(&m_context);
return;
}
@@ -461,7 +468,8 @@ void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem
uint32_t tmp = (m_pagemap[entry] & 0xfff) << 10;
tmp |= (offset & 0x3ff);
- //if (!machine().side_effects_disabled()) printf("sun2: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, m_pagemap[entry], offset<<1);
+ if (!machine().side_effects_disabled())
+ LOG("sun2: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, m_pagemap[entry], offset<<1);
switch ((m_pagemap[entry] >> 22) & 7)
{
@@ -470,7 +478,7 @@ void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem
return;
case 1: // type 1
- //printf("write device space @ %x\n", tmp<<1);
+ LOG("write device space @ %x\n", tmp<<1);
m_type1space->write16(tmp, data, mem_mask);
return;
@@ -485,10 +493,11 @@ void sun2_state::tl_mmu_w(uint8_t fc, offs_t offset, uint16_t data, uint16_t mem
}
else
{
- if (!machine().side_effects_disabled()) printf("sun2: pagemap entry not valid!\n");
+ if (!machine().side_effects_disabled())
+ logerror("sun2: pagemap entry not valid!\n");
}
- printf("sun2: Unmapped write %04x (FC %d, mask %04x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc(), offset<<1);
+ logerror("sun2: Unmapped write %04x (FC %d, mask %04x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc(), offset<<1);
}
// BW2 video control
@@ -499,7 +508,7 @@ uint16_t sun2_state::video_ctrl_r()
void sun2_state::video_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
- //printf("sun2: BW2: %x to video_ctrl\n", data);
+ LOG("sun2: BW2: %x to video_ctrl\n", data);
COMBINE_DATA(&m_bw2_ctrl);
}
diff --git a/src/mame/sun/sun3.cpp b/src/mame/sun/sun3.cpp
index 128a8ec3332..3ad78471bcf 100644
--- a/src/mame/sun/sun3.cpp
+++ b/src/mame/sun/sun3.cpp
@@ -180,26 +180,28 @@ fefc34a - start of mem_size, which queries ECC registers for each memory board
#include "emu.h"
+#include "bus/nscsi/cd.h"
+#include "bus/nscsi/hd.h"
+#include "bus/nscsi/tape.h"
+#include "bus/rs232/rs232.h"
+#include "bus/sunkbd/sunkbd.h"
+#include "bus/sunmouse/sunmouse.h"
#include "cpu/m68000/m68020.h"
+#include "machine/am79c90.h"
#include "machine/am9516.h"
#include "machine/bankdev.h"
+#include "machine/ncr5380.h"
#include "machine/nvram.h"
#include "machine/ram.h"
#include "machine/timekpr.h"
#include "machine/timer.h"
#include "machine/z80scc.h"
-#include "machine/am79c90.h"
-#include "machine/ncr5380.h"
-#include "bus/nscsi/cd.h"
-#include "bus/nscsi/hd.h"
-#include "bus/nscsi/tape.h"
-
-#include "bus/rs232/rs232.h"
-#include "bus/sunkbd/sunkbd.h"
-#include "bus/sunmouse/sunmouse.h"
#include "screen.h"
+//#define VERBOSE 1
+#include "logmacro.h"
+
namespace {
@@ -337,7 +339,7 @@ uint32_t sun3_state::ram_r(offs_t offset)
{
if (m_ecc[0] == 0x10c00000)
{
- //printf("ECC testing, RAM read ofs %x\n", offset);
+ LOG("ECC testing, RAM read ofs %x\n", offset);
m_ecc[1] &= 0x00ffffff;
if (m_ecc[2] == 0x01000000) // single-bit error test
@@ -359,8 +361,7 @@ uint32_t sun3_state::ram_r(offs_t offset)
if (!m_bInBusErr)
{
- //printf("ram_r: bus error on timeout, access to invalid addr %08x, PC=%x\n", offset<<2, m_maincpu->pc());
- //fflush(stdout);
+ LOG("ram_r: bus error on timeout, access to invalid addr %08x, PC=%x\n", offset<<2, m_maincpu->pc());
m_buserr = BE_TIMEOUT;
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
@@ -377,7 +378,7 @@ void sun3_state::ram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
!(m_bInBusErr))
{
m_parregs[1] = offset<<2;
- //printf("Generating parity error, mem_mask %08x\n", mem_mask);
+ LOG("Generating parity error, mem_mask %08x\n", mem_mask);
switch (mem_mask)
{
case 0xff000000:
@@ -432,7 +433,7 @@ void sun3_state::ram_w(offs_t offset, uint32_t data, uint32_t mem_mask)
if (!m_bInBusErr)
{
- //printf("ram_w: bus error on timeout, access to invalid addr %08x, PC=%x\n", offset<<2, m_maincpu->pc());
+ LOG("ram_w: bus error on timeout, access to invalid addr %08x, PC=%x\n", offset<<2, m_maincpu->pc());
fflush(stdout);
m_buserr = BE_TIMEOUT;
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
@@ -451,21 +452,21 @@ uint32_t sun3_state::tl_mmu_r(offs_t offset, uint32_t mem_mask)
switch (offset >> 26)
{
case 0: // IDPROM
- //printf("sun3: Read IDPROM at %x (mask %08x)\n", offset, mem_mask);
+ LOG("sun3: Read IDPROM at %x (mask %08x)\n", offset, mem_mask);
return m_idprom_ptr[(offset*4)] << 24 | m_idprom_ptr[(offset*4)+1]<<16 | m_idprom_ptr[(offset*4)+2]<<8 | m_idprom_ptr[(offset*4)+3];
case 1: // page map
page = m_segmap[m_context & 7][(offset >> 15) & 0x7ff] << 4;
page += (offset >> 11) & 0xf;
- //printf("sun3: Read page map at %x (entry %d)\n", offset<<1, page);
+ LOG("sun3: Read page map at %x (entry %d)\n", offset<<1, page);
return m_pagemap[page];
case 2: // segment map
- //printf("sun3: Read segment map at %x (entry %d, user ctx %d mask %x)\n", offset<<2, (offset & ~0x3c000000) >> 15, m_context & 7, mem_mask);
+ LOG("sun3: Read segment map at %x (entry %d, user ctx %d mask %x)\n", offset<<2, (offset & ~0x3c000000) >> 15, m_context & 7, mem_mask);
return m_segmap[m_context & 7][(offset >> 15) & 0x7ff]<<24;
case 3: // context reg
- //printf("sun3: Read context reg\n");
+ LOG("sun3: Read context reg\n");
return m_context<<24;
case 4: // enable reg
@@ -476,29 +477,29 @@ uint32_t sun3_state::tl_mmu_r(offs_t offset, uint32_t mem_mask)
case 6: // bus error
m_bInBusErr = false;
- //printf("Reading bus error: %02x\n", m_buserr);
+ LOG("Reading bus error: %02x\n", m_buserr);
return m_buserr<<24;
case 7: // diagnostic reg
return 0;
case 8: // cache tags
- //printf("sun3: read cache tags @ %x, PC = %x\n", offset, m_maincpu->pc());
+ LOG("sun3: read cache tags @ %x, PC = %x\n", offset, m_maincpu->pc());
return m_cache_tags[(offset & 0x3fff) >> 2];
case 9: // cache data
- //printf("sun3: read cache data @ %x, PC = %x\n", offset, m_maincpu->pc());
+ LOG("sun3: read cache data @ %x, PC = %x\n", offset, m_maincpu->pc());
return m_cache_data[(offset & 0x3fff)];
case 10: // flush cache
return 0xffffffff;
case 11: // block copy
- printf("sun3: read block copy @ %x, PC = %x\n", offset, m_maincpu->pc());
+ logerror("sun3: read block copy @ %x, PC = %x\n", offset, m_maincpu->pc());
return 0xffffffff;
case 15: // UART bypass
- //printf("sun3: read UART bypass @ %x, PC = %x, mask = %08x\n", offset, m_maincpu->pc(), mem_mask);
+ LOG("sun3: read UART bypass @ %x, PC = %x, mask = %08x\n", offset, m_maincpu->pc(), mem_mask);
return 0xffffffff;
}
}
@@ -519,7 +520,7 @@ uint32_t sun3_state::tl_mmu_r(offs_t offset, uint32_t mem_mask)
uint8_t pmeg = m_segmap[m_context & 7][(offset >> 15) & 0x7ff];
uint32_t entry = (pmeg << 4) + ((offset >> 11) & 0xf);
- //printf("sun3: Context = %d, pmeg = %d, offset >> 15 = %x, entry = %d, page = %d\n", m_context&7, pmeg, (offset >> 15) & 0x7ff, entry, (offset >> 11) & 0xf);
+ LOG("sun3: Context = %d, pmeg = %d, offset >> 15 = %x, entry = %d, page = %d\n", m_context&7, pmeg, (offset >> 15) & 0x7ff, entry, (offset >> 11) & 0xf);
if (m_pagemap[entry] & PM_VALID)
{
@@ -537,10 +538,10 @@ uint32_t sun3_state::tl_mmu_r(offs_t offset, uint32_t mem_mask)
uint32_t tmp = (m_pagemap[entry] & 0x7ffff) << 11;
tmp |= (offset & 0x7ff);
- //printf("pmeg %d, entry %d = %08x, virt %08x => tmp %08x\n", pmeg, entry, m_pagemap[entry], offset << 2, tmp);
+ LOG("pmeg %d, entry %d = %08x, virt %08x => tmp %08x\n", pmeg, entry, m_pagemap[entry], offset << 2, tmp);
- // if (!machine().side_effects_disabled())
- //printf("sun3: Translated addr: %08x, type %d (page %d page entry %08x, orig virt %08x, FC %d)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, entry, m_pagemap[entry], offset<<2, fc);
+ if (!machine().side_effects_disabled())
+ LOG("sun3: Translated addr: %08x, type %d (page %d page entry %08x, orig virt %08x, FC %d)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, entry, m_pagemap[entry], offset<<2, fc);
switch ((m_pagemap[entry] >> 26) & 3)
{
@@ -564,7 +565,8 @@ uint32_t sun3_state::tl_mmu_r(offs_t offset, uint32_t mem_mask)
}
else
{
-// if (!machine().side_effects_disabled()) printf("sun3: pagemap entry not valid! (PC=%x)\n", m_maincpu->pc());
+ if (!machine().side_effects_disabled())
+ LOG("sun3: pagemap entry not valid! (PC=%x)\n", m_maincpu->pc());
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
m_buserr = BE_INVALID;
@@ -581,7 +583,7 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
uint8_t fc = m_maincpu->get_fc();
- //printf("sun3: Write %08x (FC %d, mask %08x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc(), offset<<1);
+ LOG("sun3: Write %08x (FC %d, mask %08x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc(), offset<<1);
if (fc == 3) // control space
{
@@ -594,28 +596,28 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
case 1: // page map fefaf32
page = m_segmap[m_context & 7][(offset >> 15) & 0x7ff] << 4;
- //printf("context = %d, segment = %d, PMEG = %d, add = %d\n", m_context & 7, (offset >> 15) & 0x7ff, page, (offset >> 11) & 0xf);
+ LOG("context = %d, segment = %d, PMEG = %d, add = %d\n", m_context & 7, (offset >> 15) & 0x7ff, page, (offset >> 11) & 0xf);
page += (offset >> 11) & 0xf;
- //printf("sun3: Write %04x to page map at %x (entry %d), ", data, offset<<2, page);
+ LOG("sun3: Write %04x to page map at %x (entry %d), ", data, offset<<2, page);
COMBINE_DATA(&m_pagemap[page]);
- //printf("entry now %08x (adr %08x PC=%x mask %x)\n", m_pagemap[page], (m_pagemap[page] & 0xfffff) << 13, m_maincpu->pc(), mem_mask);
+ LOG("entry now %08x (adr %08x PC=%x mask %x)\n", m_pagemap[page], (m_pagemap[page] & 0xfffff) << 13, m_maincpu->pc(), mem_mask);
return;
case 2: // segment map
- //printf("sun3: Write %02x to segment map at %x (entry %d, user ctx %d PC=%x mask %x)\n", (data>>24) & 0xff, offset<<2, (offset & ~0x3c000000)>>15, m_context & 7, m_maincpu->pc(), mem_mask);
+ LOG("sun3: Write %02x to segment map at %x (entry %d, user ctx %d PC=%x mask %x)\n", (data>>24) & 0xff, offset<<2, (offset & ~0x3c000000)>>15, m_context & 7, m_maincpu->pc(), mem_mask);
m_segmap[m_context & 7][(offset >> 15) & 0x7ff] = (data>>24) & 0xff;
- //printf("segment map[%d][%d] now %x\n", m_context & 7, (offset & ~0x3c000000) >> 15, m_segmap[m_context & 7][(offset & ~0x3c000000) >> 15] = (data>>24) & 0xff);
+ LOG("segment map[%d][%d] now %x\n", m_context & 7, (offset & ~0x3c000000) >> 15, m_segmap[m_context & 7][(offset & ~0x3c000000) >> 15] = (data>>24) & 0xff);
return;
case 3: // context reg
- //printf("sun3: Write (%x) %x to context\n", data, data>>24);
+ LOG("sun3: Write (%x) %x to context\n", data, data>>24);
m_context = data >> 24;
return;
case 4: // enable reg
- //printf("sun3: Write %x to enable, PC=%x\n", data, m_maincpu->pc());
+ LOG("sun3: Write %x to enable, PC=%x\n", data, m_maincpu->pc());
COMBINE_DATA(&m_enable);
return;
@@ -629,29 +631,29 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
case 7: // diagnostic reg
m_diag = data >> 24;
#if 0
- printf("sun3: CPU LEDs to %02x (PC=%x) => ", ((data>>24) & 0xff) ^ 0xff, m_maincpu->pc());
+ osd_printf_info("sun3: CPU LEDs to %02x (PC=%x) => ", ((data>>24) & 0xff) ^ 0xff, m_maincpu->pc());
for (int i = 0; i < 8; i++)
{
if (m_diag & (1<<i))
{
- printf(".");
+ osd_printf_info(".");
}
else
{
- printf("*");
+ osd_printf_info("*");
}
}
- printf("\n");
+ osd_printf_info("\n");
#endif
return;
case 8: // cache tags
- //printf("sun3: %08x to cache tags @ %x, PC = %x, mask = %08x\n", data, offset, m_maincpu->pc(), mem_mask);
+ LOG("sun3: %08x to cache tags @ %x, PC = %x, mask = %08x\n", data, offset, m_maincpu->pc(), mem_mask);
m_cache_tags[(offset & 0x3fff) >> 2] = data;
return;
case 9: // cache data
- //printf("sun3: %08x to cache data @ %x, PC = %x, mask = %08x\n", data, offset, m_maincpu->pc(), mem_mask);
+ LOG("sun3: %08x to cache data @ %x, PC = %x, mask = %08x\n", data, offset, m_maincpu->pc(), mem_mask);
m_cache_data[(offset & 0x3fff)] = data;
return;
@@ -659,11 +661,11 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
return;
case 11: // block copy
- printf("sun3: %08x to block copy @ %x, PC = %x\n", data, offset, m_maincpu->pc());
+ logerror("sun3: %08x to block copy @ %x, PC = %x\n", data, offset, m_maincpu->pc());
return;
case 15: // UART bypass
- //printf("sun3: %08x to UART bypass @ %x, PC = %x\n", data, offset, m_maincpu->pc());
+ LOG("sun3: %08x to UART bypass @ %x, PC = %x\n", data, offset, m_maincpu->pc());
return;
}
}
@@ -677,7 +679,7 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
if ((!(m_pagemap[entry] & PM_WRITEMASK)) ||
((m_pagemap[entry] & PM_SYSMASK) && (fc < M68K_FC_SUPERVISOR_DATA)))
{
- //printf("sun3: write protect MMU error (PC=%x)\n", m_maincpu->pc());
+ LOG("sun3: write protect MMU error (PC=%x)\n", m_maincpu->pc());
m_buserr = BE_PROTERR;
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
@@ -690,7 +692,8 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
uint32_t tmp = (m_pagemap[entry] & 0x7ffff) << 11;
tmp |= (offset & 0x7ff);
- //if (!machine().side_effects_disabled()) printf("sun3: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, m_pagemap[entry], offset<<2);
+ if (!machine().side_effects_disabled())
+ LOG("sun3: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, m_pagemap[entry], offset<<2);
switch ((m_pagemap[entry] >> 26) & 3)
{
@@ -699,7 +702,7 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
return;
case 1: // type 1
- //printf("write device space @ %x\n", tmp<<1);
+ LOG("write device space @ %x\n", tmp<<1);
m_type1space->write32(tmp, data, mem_mask);
return;
@@ -714,7 +717,8 @@ void sun3_state::tl_mmu_w(offs_t offset, uint32_t data, uint32_t mem_mask)
}
else
{
- //if (!machine().side_effects_disabled()) printf("sun3: pagemap entry not valid!\n");
+ if (!machine().side_effects_disabled())
+ LOG("sun3: pagemap entry not valid!\n");
m_buserr = BE_INVALID;
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
@@ -740,7 +744,7 @@ uint32_t sun3_state::parity_r(offs_t offset)
void sun3_state::parity_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- //printf("sun3: %08x to parity registers @ %x (mask %08x)\n", data, offset, mem_mask);
+ LOG("sun3: %08x to parity registers @ %x (mask %08x)\n", data, offset, mem_mask);
if (offset == 0)
{
@@ -820,7 +824,7 @@ uint32_t sun3_state::irqctrl_r()
void sun3_state::irqctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- //printf("sun3: %08x to interrupt control (mask %08x)\n", data, mem_mask);
+ LOG("sun3: %08x to interrupt control (mask %08x)\n", data, mem_mask);
COMBINE_DATA(&m_irqctrl);
if (data & 0x01000000)
@@ -852,14 +856,14 @@ void sun3_state::irqctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask)
uint8_t sun3_state::rtc7170_r(offs_t offset)
{
- //printf("read 7170 @ %x, PC=%x\n", offset, m_maincpu->pc());
+ LOG("read 7170 @ %x, PC=%x\n", offset, m_maincpu->pc());
return 0xff;
}
void sun3_state::rtc7170_w(offs_t offset, uint8_t data)
{
- //printf("%02x to 7170 @ %x\n", data, offset);
+ LOG("%02x to 7170 @ %x\n", data, offset);
if ((offset == 0x11) && (data == 0x1c))
{
@@ -888,12 +892,12 @@ void sun3_state::scsictrl_w(uint16_t data)
uint32_t sun3_state::ecc_r(offs_t offset)
{
- //printf("read ECC @ %x, PC=%x\n", offset, m_maincpu->pc());
+ LOG("read ECC @ %x, PC=%x\n", offset, m_maincpu->pc());
// fefc34a
int mbram = (m_ram_size / (1024*1024));
int beoff = (mbram / 32) * 0x10;
- //printf("offset %x MB %d beoff %x\n", offset, mbram, beoff);
+ LOG("offset %x MB %d beoff %x\n", offset, mbram, beoff);
if (offset >= beoff)
{
@@ -911,7 +915,7 @@ uint32_t sun3_state::ecc_r(offs_t offset)
void sun3_state::ecc_w(offs_t offset, uint32_t data, uint32_t mem_mask)
{
- //printf("%08x to ecc @ %x, mask %08x\n", data, offset, mem_mask);
+ LOG("%08x to ecc @ %x, mask %08x\n", data, offset, mem_mask);
offset &= 0xf;
m_ecc[offset] = data;
@@ -921,7 +925,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(sun3_state::sun3_timer)
{
if ((m_irqctrl & 0x81000000) == 0x81000000)
{
- //printf("NMI tick\n");
+ LOG("NMI tick\n");
m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE);
}
diff --git a/src/mame/taito/taito_o.cpp b/src/mame/taito/taito_o.cpp
index e43da38558f..3a027538ae3 100644
--- a/src/mame/taito/taito_o.cpp
+++ b/src/mame/taito/taito_o.cpp
@@ -276,7 +276,7 @@ static INPUT_PORTS_START( parentj )
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Over") // hopper overload sensor to activate diverter coil
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("opto2", FUNC(taitoio_opto_device::opto_h_r))
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("opto2", FUNC(taitoio_opto_device::opto_l_r))
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("All Clear SW")
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("All Clear SW")
PORT_SERVICE_NO_TOGGLE(0x0010, IP_ACTIVE_LOW )
PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // battery error if '1'
@@ -344,7 +344,7 @@ static INPUT_PORTS_START( eibise )
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Over") // hopper overload sensor to activate diverter coil
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("opto2", FUNC(taitoio_opto_device::opto_h_r))
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("opto2", FUNC(taitoio_opto_device::opto_l_r))
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("All Clear SW")
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME("All Clear SW")
PORT_SERVICE_NO_TOGGLE(0x0010, IP_ACTIVE_LOW )
PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // battery error if '1'
diff --git a/src/mame/toaplan/sunwise.cpp b/src/mame/toaplan/sunwise.cpp
index 88ff7d0b3b3..97df6a3ea47 100644
--- a/src/mame/toaplan/sunwise.cpp
+++ b/src/mame/toaplan/sunwise.cpp
@@ -189,7 +189,7 @@ static INPUT_PORTS_START( pwrkick )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME(u8"Coin Exchange (¥100)")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK )
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_GAMBLE_SERVICE ) PORT_NAME("Attendant Key")
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Attendant Key")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin 1 (Medal)")
// The specific "Payout" button shown on the test screen and diagnostic menu does not exist.
@@ -273,7 +273,7 @@ static INPUT_PORTS_START( burgkids )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME(u8"Coin Exchange (¥100)")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_GAMBLE_BOOK )
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_GAMBLE_SERVICE ) PORT_NAME("Attendant Key")
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Attendant Key")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin 1 (Medal)")
INPUT_PORTS_END
diff --git a/src/mame/wing/lucky74.cpp b/src/mame/wing/lucky74.cpp
index 68c92e9ee08..442d9bb7f2f 100644
--- a/src/mame/wing/lucky74.cpp
+++ b/src/mame/wing/lucky74.cpp
@@ -1065,7 +1065,7 @@ static INPUT_PORTS_START( lucky74 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // Coin B
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) // Coin C
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/wing/slotcarn.cpp b/src/mame/wing/slotcarn.cpp
index efe0e43bfd6..1d7e99bc0ff 100644
--- a/src/mame/wing/slotcarn.cpp
+++ b/src/mame/wing/slotcarn.cpp
@@ -213,7 +213,7 @@ static INPUT_PORTS_START( slotcarn )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_Q) PORT_NAME("Key In")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_N) PORT_NAME("Start")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_M) PORT_NAME("Cancel")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("Select")
@@ -221,8 +221,8 @@ static INPUT_PORTS_START( slotcarn )
PORT_START("IN1") /* b801 (ppi8255) */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1) PORT_IMPULSE(2) /* Coin A */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2) PORT_IMPULSE(2) /* Coin B */
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Stats")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Settings")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3) PORT_IMPULSE(2) /* Coin C */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN4) PORT_IMPULSE(2) /* Coin D */
@@ -235,10 +235,10 @@ static INPUT_PORTS_START( slotcarn )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("Double-Up")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("Take Score")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("Bet")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_W) PORT_NAME("Payout")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_H) PORT_NAME("Empty Hopper")
PORT_START("IN4") /* bc01 (ppi8255) */
@@ -363,7 +363,7 @@ static INPUT_PORTS_START( spielbud )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1) PORT_IMPULSE(2) /* Coin A */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2) PORT_IMPULSE(2) /* Coin B */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Settings")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3) PORT_IMPULSE(2) /* Coin C */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN4) PORT_IMPULSE(2) /* Coin D */