summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-25 20:09:51 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-25 20:09:51 -0400
commit596678f2cd1b40c456db8f278a7f652c2a37da84 (patch)
treea4ffbdf51889f7a63ea7dc3da3afee4535987030 /src
parentec2669cacff2ec954ba351e09ba083c4e32b4ce4 (diff)
parente8326cdc3267591b635f4f97e5255e031ba6b834 (diff)
Merge remote-tracking branch 'upstream/master' into firstrun
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/a2bus/a2thunderclock.cpp2
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp2
-rw-r--r--src/devices/bus/c64/exp.h2
-rw-r--r--src/devices/bus/c64/magic_voice.cpp2
-rw-r--r--src/devices/bus/c64/ps64.cpp2
-rw-r--r--src/devices/bus/cbmiec/cbmiec.h8
-rw-r--r--src/devices/bus/cgenie/expansion/expansion.h2
-rw-r--r--src/devices/bus/cgenie/parallel/parallel.h2
-rw-r--r--src/devices/bus/dmv/k230.cpp2
-rw-r--r--src/devices/bus/generic/slot.h4
-rw-r--r--src/devices/bus/hp_optroms/hp_optrom.cpp143
-rw-r--r--src/devices/bus/hp_optroms/hp_optrom.h74
-rw-r--r--src/devices/bus/ieee488/ieee488.h16
-rw-r--r--src/devices/bus/ieee488/softbox.cpp2
-rw-r--r--src/devices/bus/iq151/minigraf.cpp2
-rw-r--r--src/devices/bus/iq151/ms151a.cpp2
-rw-r--r--src/devices/bus/isa/finalchs.cpp2
-rw-r--r--src/devices/bus/isa/sc499.cpp2
-rw-r--r--src/devices/bus/lpci/southbridge.cpp2
-rw-r--r--src/devices/bus/m5/slot.cpp10
-rw-r--r--src/devices/bus/m5/slot.h2
-rw-r--r--src/devices/bus/msx_slot/cartridge.h2
-rw-r--r--src/devices/bus/neogeo/neogeo_intf.cpp16
-rw-r--r--src/devices/bus/nes/aladdin.h2
-rw-r--r--src/devices/bus/nes/datach.h2
-rw-r--r--src/devices/bus/nes/karastudio.h2
-rw-r--r--src/devices/bus/nes/nes_ines.inc2
-rw-r--r--src/devices/bus/nes/nes_unif.inc2
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.h2
-rw-r--r--src/devices/bus/plus4/exp.h2
-rw-r--r--src/devices/bus/s100/wunderbus.cpp4
-rw-r--r--src/devices/bus/svi3x8/expander/expander.h2
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.cpp14
-rw-r--r--src/devices/bus/svi3x8/expander/sv602.cpp2
-rw-r--r--src/devices/bus/ti99_peb/peribox.h2
-rw-r--r--src/devices/bus/ti99_peb/ti_rs232.cpp2
-rw-r--r--src/devices/bus/ti99x/990_dk.cpp10
-rw-r--r--src/devices/bus/ti99x/gromport.cpp485
-rw-r--r--src/devices/bus/ti99x/gromport.h10
-rw-r--r--src/devices/bus/vic20/exp.h2
-rw-r--r--src/devices/bus/vtech/ioexp/ioexp.h2
-rw-r--r--src/devices/bus/vtech/memexp/memexp.h2
-rw-r--r--src/devices/cpu/adsp2100/adsp2100.cpp2
-rw-r--r--src/devices/cpu/alto2/a2roms.cpp4
-rw-r--r--src/devices/cpu/asap/asap.cpp2
-rw-r--r--src/devices/cpu/avr8/avr8.cpp2
-rw-r--r--src/devices/cpu/cosmac/cosmac.cpp2
-rw-r--r--src/devices/cpu/drcbeut.cpp4
-rw-r--r--src/devices/cpu/drcuml.cpp6
-rw-r--r--src/devices/cpu/dsp16/dsp16.cpp2
-rw-r--r--src/devices/cpu/dsp32/dsp32.cpp2
-rw-r--r--src/devices/cpu/dsp56k/inst.h2
-rw-r--r--src/devices/cpu/e132xs/e132xs.cpp2
-rw-r--r--src/devices/cpu/es5510/es5510.cpp6
-rw-r--r--src/devices/cpu/esrip/esrip.cpp2
-rw-r--r--src/devices/cpu/g65816/g65816.cpp2
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.cpp87
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.h8
-rw-r--r--src/devices/cpu/hphybrid/hphybrid_dasm.cpp3
-rw-r--r--src/devices/cpu/i386/i386priv.h2
-rw-r--r--src/devices/cpu/i8008/i8008.cpp2
-rw-r--r--src/devices/cpu/ie15/ie15.cpp2
-rw-r--r--src/devices/cpu/lc8670/lc8670.cpp2
-rw-r--r--src/devices/cpu/lr35902/lr35902d.cpp2
-rw-r--r--src/devices/cpu/m68000/m68kcpu.cpp12
-rw-r--r--src/devices/cpu/m68000/m68kfpu.inc10
-rw-r--r--src/devices/cpu/m68000/m68kmake.cpp4
-rw-r--r--src/devices/cpu/m6805/m6805.cpp2
-rw-r--r--src/devices/cpu/m6809/m6809.cpp2
-rw-r--r--src/devices/cpu/mb88xx/mb88xx.h2
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp2
-rw-r--r--src/devices/cpu/mips/r3000.cpp2
-rw-r--r--src/devices/cpu/patinhofeio/patinho_feio.h2
-rw-r--r--src/devices/cpu/pdp8/pdp8.cpp4
-rw-r--r--src/devices/cpu/pic16c5x/dis16c5x.cpp8
-rw-r--r--src/devices/cpu/pic16c62x/dis16c62x.cpp8
-rw-r--r--src/devices/cpu/psx/dismips.cpp6
-rw-r--r--src/devices/cpu/score/score.cpp2
-rw-r--r--src/devices/cpu/ssem/ssem.cpp2
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.cpp7
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.h8
-rw-r--r--src/devices/cpu/tms32010/dis32010.cpp8
-rw-r--r--src/devices/cpu/tms32025/dis32025.cpp8
-rw-r--r--src/devices/cpu/tms32031/tms32031.cpp2
-rw-r--r--src/devices/cpu/tms9900/99xxcore.h18
-rw-r--r--src/devices/cpu/upd7725/upd7725.cpp2
-rw-r--r--src/devices/cpu/z80/z80.cpp2
-rw-r--r--src/devices/imagedev/floppy.h2
-rw-r--r--src/devices/machine/corvushd.cpp2
-rw-r--r--src/devices/machine/cs4031.cpp2
-rw-r--r--src/devices/machine/genpc.cpp2
-rw-r--r--src/devices/machine/gt64xxx.cpp2
-rw-r--r--src/devices/machine/i80130.cpp2
-rw-r--r--src/devices/machine/laserdsc.h2
-rw-r--r--src/devices/machine/netlist.h2
-rw-r--r--src/devices/machine/nvram.h4
-rw-r--r--src/devices/machine/pdc.cpp2
-rw-r--r--src/devices/machine/ram.h2
-rw-r--r--src/devices/machine/rtc65271.h2
-rw-r--r--src/devices/machine/smpc.cpp9
-rw-r--r--src/devices/machine/stvcd.cpp4
-rw-r--r--src/devices/machine/wd7600.cpp2
-rw-r--r--src/devices/machine/z80ctc.h2
-rw-r--r--src/devices/sound/aica.cpp2
-rw-r--r--src/devices/sound/aicadsp.cpp2
-rw-r--r--src/devices/sound/c140.cpp2
-rw-r--r--src/devices/sound/disc_mth.h2
-rw-r--r--src/devices/sound/discrete.cpp2
-rw-r--r--src/devices/sound/discrete.h214
-rw-r--r--src/devices/sound/es5506.cpp6
-rw-r--r--src/devices/sound/qs1000.cpp2
-rw-r--r--src/devices/sound/scsp.cpp2
-rw-r--r--src/devices/sound/scspdsp.cpp2
-rw-r--r--src/devices/sound/spu.cpp2
-rw-r--r--src/devices/sound/spu.h4
-rw-r--r--src/devices/sound/upd1771.cpp (renamed from src/mame/audio/upd1771.cpp)2
-rw-r--r--src/devices/sound/upd1771.h (renamed from src/mame/audio/upd1771.h)0
-rw-r--r--src/devices/sound/upd7759.cpp4
-rw-r--r--src/devices/sound/upd7759.h4
-rw-r--r--src/devices/sound/x1_010.cpp2
-rw-r--r--src/devices/video/ef9364.cpp2
-rw-r--r--src/devices/video/ef9365.cpp2
-rw-r--r--src/devices/video/poly.h2
-rw-r--r--src/devices/video/v9938.cpp2
-rw-r--r--src/devices/video/vector.cpp2
-rw-r--r--src/devices/video/vooddefs.h10
-rw-r--r--src/devices/video/voodoo.cpp2
-rw-r--r--src/emu/addrmap.cpp6
-rw-r--r--src/emu/addrmap.h66
-rw-r--r--src/emu/crsshair.h2
-rw-r--r--src/emu/debug/debugcmd.cpp6
-rw-r--r--src/emu/debug/dvdisasm.cpp25
-rw-r--r--src/emu/debug/dvdisasm.h2
-rw-r--r--src/emu/debug/dvmemory.h2
-rw-r--r--src/emu/debug/dvstate.cpp1
-rw-r--r--src/emu/debug/dvstate.h6
-rw-r--r--src/emu/debug/express.cpp2
-rw-r--r--src/emu/debug/express.h2
-rw-r--r--src/emu/debug/textbuf.cpp2
-rw-r--r--src/emu/devcb.h41
-rw-r--r--src/emu/devfind.cpp4
-rw-r--r--src/emu/devfind.h8
-rw-r--r--src/emu/device.h10
-rw-r--r--src/emu/diexec.h14
-rw-r--r--src/emu/digfx.h2
-rw-r--r--src/emu/diimage.cpp8
-rw-r--r--src/emu/diimage.h34
-rw-r--r--src/emu/dimemory.h2
-rw-r--r--src/emu/dinetwork.h6
-rw-r--r--src/emu/diserial.h10
-rw-r--r--src/emu/dispatch.h17
-rw-r--r--src/emu/distate.cpp14
-rw-r--r--src/emu/drawgfxm.h6
-rw-r--r--src/emu/drivenum.h6
-rw-r--r--src/emu/emucore.h2
-rw-r--r--src/emu/emumem.cpp8
-rw-r--r--src/emu/emumem.h2
-rw-r--r--src/emu/emuopts.cpp2
-rw-r--r--src/emu/fileio.h2
-rw-r--r--src/emu/inpttype.h192
-rw-r--r--src/emu/input.cpp10
-rw-r--r--src/emu/ioport.cpp6
-rw-r--r--src/emu/ioport.h41
-rw-r--r--src/emu/machine.cpp3
-rw-r--r--src/emu/machine.h4
-rw-r--r--src/emu/main.h3
-rw-r--r--src/emu/mconfig.h16
-rw-r--r--src/emu/output.cpp2
-rw-r--r--src/emu/output.h4
-rw-r--r--src/emu/render.cpp6
-rw-r--r--src/emu/rendfont.cpp2
-rw-r--r--src/emu/rendlay.cpp2
-rw-r--r--src/emu/romload.cpp2
-rw-r--r--src/emu/romload.h16
-rw-r--r--src/emu/save.h2
-rw-r--r--src/emu/screen.cpp2
-rw-r--r--src/emu/screen.h6
-rw-r--r--src/emu/softlist.cpp11
-rw-r--r--src/emu/tilemap.cpp4
-rw-r--r--src/emu/tilemap.h8
-rw-r--r--src/emu/timer.h20
-rw-r--r--src/emu/ui/cmddata.h2
-rw-r--r--src/emu/ui/uimain.h6
-rw-r--r--src/emu/validity.cpp4
-rw-r--r--src/emu/video/rgbgen.h4
-rw-r--r--src/frontend/mame/cheat.cpp4
-rw-r--r--src/frontend/mame/info.cpp7
-rw-r--r--src/frontend/mame/luaengine.cpp4
-rw-r--r--src/frontend/mame/mame.cpp11
-rw-r--r--src/frontend/mame/mame.h3
-rw-r--r--src/frontend/mame/pluginopts.cpp5
-rw-r--r--src/frontend/mame/ui/cheatopt.cpp2
-rw-r--r--src/frontend/mame/ui/custmenu.cpp4
-rw-r--r--src/frontend/mame/ui/custui.cpp6
-rw-r--r--src/frontend/mame/ui/datfile.cpp8
-rw-r--r--src/frontend/mame/ui/datmenu.cpp1
-rw-r--r--src/frontend/mame/ui/icorender.h2
-rw-r--r--src/frontend/mame/ui/imgcntrl.cpp3
-rw-r--r--src/frontend/mame/ui/mainmenu.cpp2
-rw-r--r--src/frontend/mame/ui/menu.cpp12
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp3
-rw-r--r--src/frontend/mame/ui/optsmenu.cpp5
-rw-r--r--src/frontend/mame/ui/pluginopt.cpp2
-rw-r--r--src/frontend/mame/ui/selgame.cpp17
-rw-r--r--src/frontend/mame/ui/simpleselgame.cpp1
-rw-r--r--src/frontend/mame/ui/sliders.cpp1
-rw-r--r--src/frontend/mame/ui/submenu.cpp4
-rw-r--r--src/frontend/mame/ui/ui.cpp29
-rw-r--r--src/frontend/mame/ui/viewgfx.cpp2
-rw-r--r--src/lib/formats/cassimg.h2
-rw-r--r--src/lib/formats/cgen_cas.cpp70
-rw-r--r--src/lib/formats/flopimg.h14
-rw-r--r--src/lib/formats/fsd_dsk.cpp2
-rw-r--r--src/lib/formats/imageutl.cpp2
-rw-r--r--src/lib/formats/rx50_dsk.cpp4
-rw-r--r--src/lib/formats/tzx_cas.cpp2
-rw-r--r--src/lib/formats/x07_cas.cpp2
-rw-r--r--src/lib/netlist/analog/nld_fourterm.cpp4
-rw-r--r--src/lib/netlist/devices/nld_system.cpp2
-rw-r--r--src/lib/netlist/devices/nld_truthtable.cpp2
-rw-r--r--src/lib/netlist/devices/nld_truthtable.h2
-rw-r--r--src/lib/netlist/nl_base.cpp54
-rw-r--r--src/lib/netlist/nl_base.h28
-rw-r--r--src/lib/netlist/nl_factory.cpp4
-rw-r--r--src/lib/netlist/nl_parser.h2
-rw-r--r--src/lib/netlist/nl_setup.cpp30
-rw-r--r--src/lib/netlist/nl_util.h2
-rw-r--r--src/lib/netlist/plib/palloc.cpp2
-rw-r--r--src/lib/netlist/plib/pfmtlog.cpp24
-rw-r--r--src/lib/netlist/plib/plists.h52
-rw-r--r--src/lib/netlist/plib/poptions.h22
-rw-r--r--src/lib/netlist/plib/pparser.cpp8
-rw-r--r--src/lib/netlist/plib/pstate.h4
-rw-r--r--src/lib/netlist/plib/pstream.cpp8
-rw-r--r--src/lib/netlist/plib/pstring.cpp26
-rw-r--r--src/lib/netlist/plib/pstring.h10
-rw-r--r--src/lib/netlist/prg/nltool.cpp6
-rw-r--r--src/lib/netlist/solver/nld_ms_direct.h6
-rw-r--r--src/lib/netlist/solver/nld_ms_gcr.h2
-rw-r--r--src/lib/netlist/solver/nld_solver.cpp12
-rw-r--r--src/lib/netlist/tools/nl_convert.cpp4
-rw-r--r--src/lib/util/aviio.cpp2
-rw-r--r--src/lib/util/chd.cpp6
-rw-r--r--src/lib/util/chd.h2
-rw-r--r--src/lib/util/chdcodec.cpp2
-rw-r--r--src/lib/util/corefile.cpp4
-rw-r--r--src/lib/util/coretmpl.h4
-rw-r--r--src/lib/util/cstrpool.cpp6
-rw-r--r--src/lib/util/delegate.h2
-rw-r--r--src/lib/util/flac.cpp18
-rw-r--r--src/lib/util/options.cpp2
-rw-r--r--src/lib/util/options.h1
-rw-r--r--src/lib/util/palette.h6
-rw-r--r--src/lib/util/png.cpp10
-rw-r--r--src/lib/util/pool.cpp4
-rw-r--r--src/lib/util/un7z.cpp4
-rw-r--r--src/lib/util/unzip.cpp4
-rw-r--r--src/lib/util/xmlfile.cpp12
-rw-r--r--src/mame/audio/cclimber.cpp2
-rw-r--r--src/mame/audio/dcs.cpp22
-rw-r--r--src/mame/audio/irem.cpp10
-rw-r--r--src/mame/audio/lynx.h2
-rw-r--r--src/mame/audio/special.cpp (renamed from src/mame/audio/specimx_snd.cpp)4
-rw-r--r--src/mame/audio/special.h (renamed from src/mame/audio/specimx_snd.h)2
-rw-r--r--src/mame/audio/tvc.cpp (renamed from src/mame/audio/tvc_snd.cpp)2
-rw-r--r--src/mame/audio/tvc.h (renamed from src/mame/audio/tvc_snd.h)0
-rw-r--r--src/mame/audio/vc4000.cpp (renamed from src/mame/audio/vc4000snd.cpp)2
-rw-r--r--src/mame/audio/vc4000.h (renamed from src/mame/audio/vc4000snd.h)2
-rw-r--r--src/mame/audio/wswan.cpp (renamed from src/mame/audio/wswan_snd.cpp)2
-rw-r--r--src/mame/audio/wswan.h (renamed from src/mame/audio/wswan_snd.h)2
-rw-r--r--src/mame/drivers/39in1.cpp2
-rw-r--r--src/mame/drivers/4enlinea.cpp2
-rw-r--r--src/mame/drivers/8080bw.cpp34
-rw-r--r--src/mame/drivers/alg.cpp6
-rw-r--r--src/mame/drivers/alphasma.cpp160
-rw-r--r--src/mame/drivers/amiga.cpp2
-rw-r--r--src/mame/drivers/amusco.cpp2
-rw-r--r--src/mame/drivers/amust.cpp2
-rw-r--r--src/mame/drivers/apc.cpp6
-rw-r--r--src/mame/drivers/apple2.cpp4
-rw-r--r--src/mame/drivers/apple2e.cpp30
-rw-r--r--src/mame/drivers/apple2gs.cpp2
-rw-r--r--src/mame/drivers/apricot.cpp2
-rw-r--r--src/mame/drivers/apricotp.cpp2
-rw-r--r--src/mame/drivers/arkanoid.cpp18
-rw-r--r--src/mame/drivers/arsystems.cpp2
-rw-r--r--src/mame/drivers/artmagic.cpp4
-rw-r--r--src/mame/drivers/asteroid.cpp18
-rw-r--r--src/mame/drivers/astrocde.cpp8
-rw-r--r--src/mame/drivers/astrof.cpp18
-rw-r--r--src/mame/drivers/atari400.cpp12
-rw-r--r--src/mame/drivers/atarist.cpp2
-rw-r--r--src/mame/drivers/atvtrack.cpp2
-rw-r--r--src/mame/drivers/avigo.cpp22
-rw-r--r--src/mame/drivers/b2m.cpp2
-rw-r--r--src/mame/drivers/balsente.cpp13
-rw-r--r--src/mame/drivers/bartop52.cpp2
-rw-r--r--src/mame/drivers/battlex.cpp2
-rw-r--r--src/mame/drivers/bbc.cpp2
-rw-r--r--src/mame/drivers/bebox.cpp4
-rw-r--r--src/mame/drivers/bmcpokr.cpp6
-rw-r--r--src/mame/drivers/bml3.cpp8
-rw-r--r--src/mame/drivers/btoads.cpp4
-rw-r--r--src/mame/drivers/bwidow.cpp16
-rw-r--r--src/mame/drivers/by17.cpp4
-rw-r--r--src/mame/drivers/bzone.cpp4
-rw-r--r--src/mame/drivers/calomega.cpp4
-rw-r--r--src/mame/drivers/cave.cpp6
-rw-r--r--src/mame/drivers/cbm2.cpp6
-rw-r--r--src/mame/drivers/ccastles.cpp2
-rw-r--r--src/mame/drivers/ccs2810.cpp12
-rw-r--r--src/mame/drivers/cgenie.cpp2
-rw-r--r--src/mame/drivers/champbas.cpp2
-rw-r--r--src/mame/drivers/chihiro.cpp2
-rw-r--r--src/mame/drivers/cloud9.cpp4
-rw-r--r--src/mame/drivers/cobra.cpp2
-rw-r--r--src/mame/drivers/coco12.cpp108
-rw-r--r--src/mame/drivers/coco3.cpp132
-rw-r--r--src/mame/drivers/coolridr.cpp4
-rw-r--r--src/mame/drivers/cops.cpp4
-rw-r--r--src/mame/drivers/cosmicos.cpp2
-rw-r--r--src/mame/drivers/cps2.cpp4
-rw-r--r--src/mame/drivers/crbaloon.cpp2
-rw-r--r--src/mame/drivers/crimfght.cpp2
-rw-r--r--src/mame/drivers/crshrace.cpp2
-rw-r--r--src/mame/drivers/cubo.cpp2
-rw-r--r--src/mame/drivers/dacholer.cpp2
-rw-r--r--src/mame/drivers/dccons.cpp7
-rw-r--r--src/mame/drivers/dcheese.cpp6
-rw-r--r--src/mame/drivers/ddayjlc.cpp2
-rw-r--r--src/mame/drivers/ddenlovr.cpp12
-rw-r--r--src/mame/drivers/ddragon.cpp2
-rw-r--r--src/mame/drivers/deco_ld.cpp2
-rw-r--r--src/mame/drivers/decwritr.cpp2
-rw-r--r--src/mame/drivers/dfruit.cpp2
-rw-r--r--src/mame/drivers/dlair.cpp8
-rw-r--r--src/mame/drivers/dragon.cpp104
-rw-r--r--src/mame/drivers/dvk_ksm.cpp2
-rw-r--r--src/mame/drivers/ecoinfr.cpp6
-rw-r--r--src/mame/drivers/enigma2.cpp8
-rw-r--r--src/mame/drivers/eolith.cpp4
-rw-r--r--src/mame/drivers/eolith16.cpp2
-rw-r--r--src/mame/drivers/equites.cpp2
-rw-r--r--src/mame/drivers/eti660.cpp2
-rw-r--r--src/mame/drivers/exerion.cpp2
-rw-r--r--src/mame/drivers/exidy.cpp2
-rw-r--r--src/mame/drivers/exidy440.cpp48
-rw-r--r--src/mame/drivers/famibox.cpp2
-rw-r--r--src/mame/drivers/fanucspmg.cpp2
-rw-r--r--src/mame/drivers/fastinvaders.cpp2
-rw-r--r--src/mame/drivers/fgoal.cpp2
-rw-r--r--src/mame/drivers/firefox.cpp4
-rw-r--r--src/mame/drivers/flstory.cpp4
-rw-r--r--src/mame/drivers/fmtowns.cpp2
-rw-r--r--src/mame/drivers/fromanc2.cpp8
-rw-r--r--src/mame/drivers/galastrm.cpp4
-rw-r--r--src/mame/drivers/galaxi.cpp8
-rw-r--r--src/mame/drivers/galaxian.cpp10
-rw-r--r--src/mame/drivers/ghosteo.cpp2
-rw-r--r--src/mame/drivers/gimix.cpp2
-rw-r--r--src/mame/drivers/gizmondo.cpp30
-rw-r--r--src/mame/drivers/gottlieb.cpp2
-rw-r--r--src/mame/drivers/goupil.cpp4
-rw-r--r--src/mame/drivers/groundfx.cpp4
-rw-r--r--src/mame/drivers/gstream.cpp6
-rw-r--r--src/mame/drivers/gunbustr.cpp2
-rw-r--r--src/mame/drivers/hh_cop400.cpp2
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp497
-rw-r--r--src/mame/drivers/hh_melps4.cpp35
-rw-r--r--src/mame/drivers/hh_sm510.cpp86
-rw-r--r--src/mame/drivers/hh_tms1k.cpp12
-rw-r--r--src/mame/drivers/hh_ucom4.cpp247
-rw-r--r--src/mame/drivers/hng64.cpp8
-rw-r--r--src/mame/drivers/homerun.cpp12
-rw-r--r--src/mame/drivers/horizon.cpp2
-rw-r--r--src/mame/drivers/hp9845.cpp19
-rw-r--r--src/mame/drivers/hyhoo.cpp4
-rw-r--r--src/mame/drivers/ibmpcjr.cpp2
-rw-r--r--src/mame/drivers/icecold.cpp2
-rw-r--r--src/mame/drivers/igs009.cpp2
-rw-r--r--src/mame/drivers/igs011.cpp14
-rw-r--r--src/mame/drivers/igspoker.cpp16
-rw-r--r--src/mame/drivers/imds.cpp8
-rw-r--r--src/mame/drivers/imds2.cpp4
-rw-r--r--src/mame/drivers/imolagp.cpp4
-rw-r--r--src/mame/drivers/inufuku.cpp2
-rw-r--r--src/mame/drivers/iq151.cpp2
-rw-r--r--src/mame/drivers/irisha.cpp2
-rw-r--r--src/mame/drivers/isbc.cpp6
-rw-r--r--src/mame/drivers/itech32.cpp6
-rw-r--r--src/mame/drivers/itech8.cpp32
-rw-r--r--src/mame/drivers/jackie.cpp2
-rw-r--r--src/mame/drivers/jaguar.cpp28
-rw-r--r--src/mame/drivers/jankenmn.cpp2
-rw-r--r--src/mame/drivers/jedi.cpp2
-rw-r--r--src/mame/drivers/jpmsys5.cpp2
-rw-r--r--src/mame/drivers/junior.cpp2
-rw-r--r--src/mame/drivers/kaneko16.cpp2
-rw-r--r--src/mame/drivers/kenseim.cpp10
-rw-r--r--src/mame/drivers/kim1.cpp2
-rw-r--r--src/mame/drivers/konamigx.cpp4
-rw-r--r--src/mame/drivers/ksys573.cpp6
-rw-r--r--src/mame/drivers/kyocera.cpp6
-rw-r--r--src/mame/drivers/ladybug.cpp4
-rw-r--r--src/mame/drivers/lc80.cpp2
-rw-r--r--src/mame/drivers/lethalj.cpp2
-rw-r--r--src/mame/drivers/limenko.cpp6
-rw-r--r--src/mame/drivers/littlerb.cpp2
-rw-r--r--src/mame/drivers/m107.cpp2
-rw-r--r--src/mame/drivers/m20.cpp2
-rw-r--r--src/mame/drivers/m5.cpp12
-rw-r--r--src/mame/drivers/m72.cpp10
-rw-r--r--src/mame/drivers/m90.cpp2
-rw-r--r--src/mame/drivers/m92.cpp4
-rw-r--r--src/mame/drivers/mac.cpp8
-rw-r--r--src/mame/drivers/macs.cpp2
-rw-r--r--src/mame/drivers/mainsnk.cpp4
-rw-r--r--src/mame/drivers/maxaflex.cpp2
-rw-r--r--src/mame/drivers/mbc55x.cpp2
-rw-r--r--src/mame/drivers/mc1502.cpp2
-rw-r--r--src/mame/drivers/mcr.cpp2
-rw-r--r--src/mame/drivers/megadriv.cpp2
-rw-r--r--src/mame/drivers/merit.cpp8
-rw-r--r--src/mame/drivers/metro.cpp2
-rw-r--r--src/mame/drivers/mhavoc.cpp18
-rw-r--r--src/mame/drivers/micro3d.cpp2
-rw-r--r--src/mame/drivers/midyunit.cpp45
-rw-r--r--src/mame/drivers/mini2440.cpp2
-rw-r--r--src/mame/drivers/missile.cpp4
-rw-r--r--src/mame/drivers/mjkjidai.cpp2
-rw-r--r--src/mame/drivers/mmodular.cpp4
-rw-r--r--src/mame/drivers/model2.cpp28
-rw-r--r--src/mame/drivers/mpu4vid.cpp4
-rw-r--r--src/mame/drivers/ms32.cpp2
-rw-r--r--src/mame/drivers/multfish.cpp4
-rw-r--r--src/mame/drivers/multi16.cpp2
-rw-r--r--src/mame/drivers/multigam.cpp2
-rw-r--r--src/mame/drivers/mw18w.cpp2
-rw-r--r--src/mame/drivers/mw8080bw.cpp46
-rw-r--r--src/mame/drivers/n64.cpp2
-rw-r--r--src/mame/drivers/nakajies.cpp16
-rw-r--r--src/mame/drivers/namcond1.cpp2
-rw-r--r--src/mame/drivers/namcos11.cpp2
-rw-r--r--src/mame/drivers/namcos12.cpp2
-rw-r--r--src/mame/drivers/namcos2.cpp4
-rw-r--r--src/mame/drivers/naomi.cpp28
-rw-r--r--src/mame/drivers/nbmj8688.cpp68
-rw-r--r--src/mame/drivers/nbmj8891.cpp62
-rw-r--r--src/mame/drivers/nbmj8991.cpp34
-rw-r--r--src/mame/drivers/neogeo.cpp6
-rw-r--r--src/mame/drivers/neogeo_noslot.cpp26
-rw-r--r--src/mame/drivers/neoprint.cpp4
-rw-r--r--src/mame/drivers/ng_aes.cpp4
-rw-r--r--src/mame/drivers/ngen.cpp4
-rw-r--r--src/mame/drivers/ngp.cpp2
-rw-r--r--src/mame/drivers/ninjakd2.cpp4
-rw-r--r--src/mame/drivers/niyanpai.cpp8
-rw-r--r--src/mame/drivers/notetaker.cpp6
-rw-r--r--src/mame/drivers/nova2001.cpp2
-rw-r--r--src/mame/drivers/nss.cpp2
-rw-r--r--src/mame/drivers/omegrace.cpp2
-rw-r--r--src/mame/drivers/opwolf.cpp4
-rw-r--r--src/mame/drivers/palm.cpp2
-rw-r--r--src/mame/drivers/paso1600.cpp2
-rw-r--r--src/mame/drivers/pastelg.cpp4
-rw-r--r--src/mame/drivers/pc100.cpp2
-rw-r--r--src/mame/drivers/pc1500.cpp2
-rw-r--r--src/mame/drivers/pc1512.cpp4
-rw-r--r--src/mame/drivers/pc2000.cpp4
-rw-r--r--src/mame/drivers/pc6001.cpp4
-rw-r--r--src/mame/drivers/pc8001.cpp4
-rw-r--r--src/mame/drivers/pc8401a.cpp4
-rw-r--r--src/mame/drivers/pc8801.cpp4
-rw-r--r--src/mame/drivers/pc88va.cpp2
-rw-r--r--src/mame/drivers/pc9801.cpp8
-rw-r--r--src/mame/drivers/pcd.cpp6
-rw-r--r--src/mame/drivers/pce220.cpp328
-rw-r--r--src/mame/drivers/pdp1.cpp2
-rw-r--r--src/mame/drivers/peoplepc.cpp2
-rw-r--r--src/mame/drivers/phoenix.cpp8
-rw-r--r--src/mame/drivers/piggypas.cpp2
-rw-r--r--src/mame/drivers/pirates.cpp2
-rw-r--r--src/mame/drivers/pk8020.cpp2
-rw-r--r--src/mame/drivers/playch10.cpp2
-rw-r--r--src/mame/drivers/plus4.cpp6
-rw-r--r--src/mame/drivers/pockchal.cpp131
-rw-r--r--src/mame/drivers/pocketc.cpp18
-rw-r--r--src/mame/drivers/poisk1.cpp2
-rw-r--r--src/mame/drivers/polepos.cpp2
-rw-r--r--src/mame/drivers/policetr.cpp2
-rw-r--r--src/mame/drivers/poly880.cpp2
-rw-r--r--src/mame/drivers/popeye.cpp6
-rw-r--r--src/mame/drivers/prestige.cpp4
-rw-r--r--src/mame/drivers/prof80.cpp2
-rw-r--r--src/mame/drivers/psikyo.cpp14
-rw-r--r--src/mame/drivers/pzletime.cpp2
-rw-r--r--src/mame/drivers/qdrmfgp.cpp4
-rw-r--r--src/mame/drivers/qix.cpp4
-rw-r--r--src/mame/drivers/quantum.cpp2
-rw-r--r--src/mame/drivers/quizshow.cpp4
-rw-r--r--src/mame/drivers/qx10.cpp2
-rw-r--r--src/mame/drivers/r2dtank.cpp2
-rw-r--r--src/mame/drivers/rainbow.cpp4
-rw-r--r--src/mame/drivers/rc759.cpp2
-rw-r--r--src/mame/drivers/re900.cpp4
-rw-r--r--src/mame/drivers/realbrk.cpp2
-rw-r--r--src/mame/drivers/renegade.cpp2
-rw-r--r--src/mame/drivers/rex6000.cpp4
-rw-r--r--src/mame/drivers/rgum.cpp2
-rw-r--r--src/mame/drivers/rpunch.cpp4
-rw-r--r--src/mame/drivers/s7.cpp2
-rw-r--r--src/mame/drivers/sage2.cpp2
-rw-r--r--src/mame/drivers/scv.cpp2
-rw-r--r--src/mame/drivers/segac2.cpp2
-rw-r--r--src/mame/drivers/segag80v.cpp2
-rw-r--r--src/mame/drivers/segajw.cpp6
-rw-r--r--src/mame/drivers/segaorun.cpp2
-rw-r--r--src/mame/drivers/segapico.cpp2
-rw-r--r--src/mame/drivers/segas24.cpp4
-rw-r--r--src/mame/drivers/segaufo.cpp12
-rw-r--r--src/mame/drivers/sf.cpp14
-rw-r--r--src/mame/drivers/sigmab52.cpp2
-rw-r--r--src/mame/drivers/sms.cpp4
-rw-r--r--src/mame/drivers/snk.cpp48
-rw-r--r--src/mame/drivers/snk6502.cpp6
-rw-r--r--src/mame/drivers/spdodgeb.cpp2
-rw-r--r--src/mame/drivers/spoker.cpp4
-rw-r--r--src/mame/drivers/squale.cpp4
-rw-r--r--src/mame/drivers/ssingles.cpp2
-rw-r--r--src/mame/drivers/stactics.cpp10
-rw-r--r--src/mame/drivers/starshp1.cpp4
-rw-r--r--src/mame/drivers/starwars.cpp4
-rw-r--r--src/mame/drivers/studio2.cpp2
-rw-r--r--src/mame/drivers/stv.cpp133
-rw-r--r--src/mame/drivers/superslave.cpp2
-rw-r--r--src/mame/drivers/suprridr.cpp2
-rw-r--r--src/mame/drivers/swtpc09.cpp6
-rw-r--r--src/mame/drivers/system1.cpp4
-rw-r--r--src/mame/drivers/taito_f3.cpp4
-rw-r--r--src/mame/drivers/taitosj.cpp24
-rw-r--r--src/mame/drivers/tandy2k.cpp4
-rw-r--r--src/mame/drivers/tdv2324.cpp2
-rw-r--r--src/mame/drivers/tempest.cpp8
-rw-r--r--src/mame/drivers/tetrisp2.cpp2
-rw-r--r--src/mame/drivers/thayers.cpp4
-rw-r--r--src/mame/drivers/thomson.cpp22
-rw-r--r--src/mame/drivers/ti990_4.cpp2
-rw-r--r--src/mame/drivers/timeplt.cpp4
-rw-r--r--src/mame/drivers/tm990189.cpp26
-rw-r--r--src/mame/drivers/tmc2000e.cpp2
-rw-r--r--src/mame/drivers/toaplan2.cpp6
-rw-r--r--src/mame/drivers/tomcat.cpp2
-rw-r--r--src/mame/drivers/trs80m2.cpp2
-rw-r--r--src/mame/drivers/ts802.cpp2
-rw-r--r--src/mame/drivers/tsispch.cpp2
-rw-r--r--src/mame/drivers/tvc.cpp2
-rw-r--r--src/mame/drivers/tx0.cpp8
-rw-r--r--src/mame/drivers/undrfire.cpp4
-rw-r--r--src/mame/drivers/vamphalf.cpp2
-rw-r--r--src/mame/drivers/vegaeo.cpp4
-rw-r--r--src/mame/drivers/vicdual.cpp128
-rw-r--r--src/mame/drivers/victor9k.cpp2
-rw-r--r--src/mame/drivers/viper.cpp2
-rw-r--r--src/mame/drivers/vk100.cpp6
-rw-r--r--src/mame/drivers/vlc.cpp8
-rw-r--r--src/mame/drivers/wacky_gator.cpp4
-rw-r--r--src/mame/drivers/wangpc.cpp2
-rw-r--r--src/mame/drivers/wecleman.cpp2
-rw-r--r--src/mame/drivers/welltris.cpp2
-rw-r--r--src/mame/drivers/williams.cpp2
-rw-r--r--src/mame/drivers/wswan.cpp1
-rw-r--r--src/mame/drivers/wwfsstar.cpp2
-rw-r--r--src/mame/drivers/xain.cpp4
-rw-r--r--src/mame/drivers/xbox.cpp2
-rw-r--r--src/mame/drivers/xmen.cpp2
-rw-r--r--src/mame/drivers/z100.cpp2
-rw-r--r--src/mame/drivers/z80ne.cpp4
-rw-r--r--src/mame/drivers/zn.cpp6
-rw-r--r--src/mame/etc/jrcrypt.cpp2
-rw-r--r--src/mame/etc/template_cpu.h2
-rw-r--r--src/mame/includes/atari400.h (renamed from src/mame/includes/atari.h)0
-rw-r--r--src/mame/includes/cps1.h2
-rw-r--r--src/mame/includes/hh_ucom4.h1
-rw-r--r--src/mame/includes/md_cons.h56
-rw-r--r--src/mame/includes/megadriv.h55
-rw-r--r--src/mame/includes/special.h2
-rw-r--r--src/mame/includes/stv.h15
-rw-r--r--src/mame/includes/vc4000.h2
-rw-r--r--src/mame/includes/wswan.h4
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.cpp1
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.h4
-rw-r--r--src/mame/machine/315-5881_crypt.h2
-rw-r--r--src/mame/machine/amigakbd.cpp6
-rw-r--r--src/mame/machine/amstrad.cpp6
-rw-r--r--src/mame/machine/apollo.cpp2
-rw-r--r--src/mame/machine/at.cpp2
-rw-r--r--src/mame/machine/atari400.cpp (renamed from src/mame/machine/atari.cpp)2
-rw-r--r--src/mame/machine/atarifdc.cpp4
-rw-r--r--src/mame/machine/atarigen.cpp2
-rw-r--r--src/mame/machine/cps2crypt.cpp (renamed from src/mame/machine/cps2crpt.cpp)2
-rw-r--r--src/mame/machine/deco146.h8
-rw-r--r--src/mame/machine/fddebug.cpp6
-rw-r--r--src/mame/machine/gaelco3d.cpp4
-rw-r--r--src/mame/machine/gamecom.cpp4
-rw-r--r--src/mame/machine/igs025.h2
-rw-r--r--src/mame/machine/lisa.cpp2
-rw-r--r--src/mame/machine/m24_z8000.cpp4
-rw-r--r--src/mame/machine/mac.cpp12
-rw-r--r--src/mame/machine/megacdcd.h8
-rw-r--r--src/mame/machine/n64.cpp6
-rw-r--r--src/mame/machine/naomigd.h2
-rw-r--r--src/mame/machine/pce_cd.cpp8
-rw-r--r--src/mame/machine/pcshare.cpp2
-rw-r--r--src/mame/machine/playch10.cpp4
-rw-r--r--src/mame/machine/segaic16.h8
-rw-r--r--src/mame/machine/vsnes.cpp4
-rw-r--r--src/mame/machine/xbox.cpp14
-rw-r--r--src/mame/mame.lst15
-rw-r--r--src/mame/video/atari400.cpp (renamed from src/mame/video/atari.cpp)2
-rw-r--r--src/mame/video/atarirle.cpp2
-rw-r--r--src/mame/video/avgdvg.cpp4
-rw-r--r--src/mame/video/groundfx.cpp2
-rw-r--r--src/mame/video/gunbustr.cpp2
-rw-r--r--src/mame/video/igs017_igs031.h2
-rw-r--r--src/mame/video/m62.cpp2
-rw-r--r--src/mame/video/midzeus2.cpp16
-rw-r--r--src/mame/video/model2.cpp2
-rw-r--r--src/mame/video/othunder.cpp2
-rw-r--r--src/mame/video/pcd.cpp2
-rw-r--r--src/mame/video/ppu2c0x.h2
-rw-r--r--src/mame/video/segaic16.h2
-rw-r--r--src/mame/video/slapshot.cpp2
-rw-r--r--src/mame/video/snk68_spr.h2
-rw-r--r--src/mame/video/superchs.cpp2
-rw-r--r--src/mame/video/taito_f2.cpp2
-rw-r--r--src/mame/video/tc0180vcu.cpp2
-rw-r--r--src/mame/video/thomson.cpp2
-rw-r--r--src/mame/video/tmc1800.cpp4
-rw-r--r--src/mame/video/undrfire.cpp4
-rw-r--r--src/mame/video/vsystem_spr.h2
-rw-r--r--src/mame/video/vsystem_spr2.h2
-rw-r--r--src/mame/video/wswan.cpp (renamed from src/mame/video/wswan_video.cpp)4
-rw-r--r--src/mame/video/wswan.h (renamed from src/mame/video/wswan_video.h)0
-rw-r--r--src/mame/video/x68k.cpp2
-rw-r--r--src/osd/modules/debugger/debugimgui.cpp108
-rw-r--r--src/osd/modules/debugger/debugint.cpp4
-rw-r--r--src/osd/modules/debugger/debugosx.mm4
-rw-r--r--src/osd/modules/debugger/debugqt.cpp20
-rw-r--r--src/osd/modules/debugger/debugwin.cpp20
-rw-r--r--src/osd/modules/debugger/osx/debugconsole.mm22
-rw-r--r--src/osd/modules/debugger/osx/debugview.mm2
-rw-r--r--src/osd/modules/debugger/osx/debugwindowhandler.mm2
-rw-r--r--src/osd/modules/debugger/osx/deviceinfoviewer.mm4
-rw-r--r--src/osd/modules/debugger/osx/devicesviewer.mm2
-rw-r--r--src/osd/modules/debugger/osx/disassemblyview.mm16
-rw-r--r--src/osd/modules/debugger/osx/disassemblyviewer.mm26
-rw-r--r--src/osd/modules/debugger/osx/memoryview.mm16
-rw-r--r--src/osd/modules/debugger/osx/registersview.mm2
-rw-r--r--src/osd/modules/debugger/qt/breakpointswindow.cpp6
-rw-r--r--src/osd/modules/debugger/qt/breakpointswindow.h2
-rw-r--r--src/osd/modules/debugger/qt/dasmwindow.cpp18
-rw-r--r--src/osd/modules/debugger/qt/dasmwindow.h2
-rw-r--r--src/osd/modules/debugger/qt/debuggerview.cpp6
-rw-r--r--src/osd/modules/debugger/qt/debuggerview.h2
-rw-r--r--src/osd/modules/debugger/qt/deviceinformationwindow.cpp4
-rw-r--r--src/osd/modules/debugger/qt/deviceinformationwindow.h2
-rw-r--r--src/osd/modules/debugger/qt/deviceswindow.cpp8
-rw-r--r--src/osd/modules/debugger/qt/deviceswindow.h2
-rw-r--r--src/osd/modules/debugger/qt/logwindow.cpp4
-rw-r--r--src/osd/modules/debugger/qt/logwindow.h2
-rw-r--r--src/osd/modules/debugger/qt/mainwindow.cpp18
-rw-r--r--src/osd/modules/debugger/qt/mainwindow.h8
-rw-r--r--src/osd/modules/debugger/qt/memorywindow.cpp12
-rw-r--r--src/osd/modules/debugger/qt/memorywindow.h4
-rw-r--r--src/osd/modules/debugger/qt/windowqt.cpp2
-rw-r--r--src/osd/modules/debugger/qt/windowqt.h2
-rw-r--r--src/osd/modules/debugger/win/consolewininfo.cpp24
-rw-r--r--src/osd/modules/debugger/win/debugviewinfo.cpp100
-rw-r--r--src/osd/modules/debugger/win/debugviewinfo.h2
-rw-r--r--src/osd/modules/debugger/win/debugwininfo.cpp44
-rw-r--r--src/osd/modules/debugger/win/debugwininfo.h6
-rw-r--r--src/osd/modules/debugger/win/disasmwininfo.cpp6
-rw-r--r--src/osd/modules/debugger/win/editwininfo.cpp22
-rw-r--r--src/osd/modules/debugger/win/memoryviewinfo.h1
-rw-r--r--src/osd/modules/debugger/win/memorywininfo.cpp6
-rw-r--r--src/osd/modules/debugger/win/pointswininfo.cpp4
-rw-r--r--src/osd/modules/debugger/win/uimetrics.cpp10
-rw-r--r--src/osd/modules/file/winfile.cpp26
-rw-r--r--src/osd/modules/file/winptty.cpp6
-rw-r--r--src/osd/modules/font/font_dwrite.cpp16
-rw-r--r--src/osd/modules/font/font_osx.cpp26
-rw-r--r--src/osd/modules/font/font_windows.cpp24
-rw-r--r--src/osd/modules/input/input_common.h30
-rw-r--r--src/osd/modules/input/input_dinput.cpp2
-rw-r--r--src/osd/modules/input/input_sdl.cpp28
-rw-r--r--src/osd/modules/input/input_sdlcommon.cpp6
-rw-r--r--src/osd/modules/input/input_sdlcommon.h5
-rw-r--r--src/osd/modules/input/input_win32.cpp4
-rw-r--r--src/osd/modules/input/input_x11.cpp4
-rw-r--r--src/osd/modules/lib/osdlib_macosx.cpp4
-rw-r--r--src/osd/modules/lib/osdlib_unix.cpp2
-rw-r--r--src/osd/modules/lib/osdlib_win32.cpp26
-rw-r--r--src/osd/modules/lib/osdobj_common.cpp4
-rw-r--r--src/osd/modules/lib/osdobj_common.h8
-rw-r--r--src/osd/modules/netdev/pcap.cpp36
-rw-r--r--src/osd/modules/opengl/gl_shader_mgr.cpp26
-rw-r--r--src/osd/modules/opengl/gl_shader_mgr.h2
-rw-r--r--src/osd/modules/opengl/gl_shader_tool.cpp74
-rw-r--r--src/osd/modules/osdmodule.cpp6
-rw-r--r--src/osd/modules/osdmodule.h6
-rw-r--r--src/osd/modules/osdwindow.h26
-rw-r--r--src/osd/modules/output/network.cpp4
-rw-r--r--src/osd/modules/render/bgfx/chain.h1
-rw-r--r--src/osd/modules/render/bgfx/chainentry.cpp15
-rw-r--r--src/osd/modules/render/bgfx/chainentry.h5
-rw-r--r--src/osd/modules/render/bgfx/chainentryreader.cpp125
-rw-r--r--src/osd/modules/render/bgfx/chainentryreader.h7
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.cpp48
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.h26
-rw-r--r--src/osd/modules/render/bgfx/chainreader.cpp14
-rw-r--r--src/osd/modules/render/bgfx/chainreader.h6
-rw-r--r--src/osd/modules/render/bgfx/clearreader.cpp8
-rw-r--r--src/osd/modules/render/bgfx/inputpair.cpp109
-rw-r--r--src/osd/modules/render/bgfx/inputpair.h26
-rw-r--r--src/osd/modules/render/bgfx/paramreader.cpp5
-rw-r--r--src/osd/modules/render/bgfx/paramreader.h3
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc64
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/blurs/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq2x/varying.def.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc48
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/eagle/fs_eagle.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_eagle.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/eagle/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/supereagle/varying.def.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/eagle/vs_eagle.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_eagle.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc125
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq2x.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq2x/fs_hq2x.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq3x.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq3x/fs_hq3x.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq4x.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq4x/fs_hq4x.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq3x/varying.def.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq2x.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq2x/vs_hq2x.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq3x.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq3x/vs_hq3x.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq4x.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq4x/vs_hq4x.sc)0
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc46
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/warp/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/hq4x/varying.def.sc)2
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc51
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc10
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc210
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc234
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc254
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc59
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc336
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc265
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc255
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc281
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc271
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc256
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc288
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc341
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/varying.def.sc)3
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc72
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc159
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc174
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc160
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc160
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc158
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc163
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc162
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc185
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/varying.def.sc)3
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc59
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc55
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc54
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc56
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc216
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc180
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/varying.def.sc)3
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc60
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc55
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc208
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc235
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc172
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc164
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/varying.def.sc (renamed from src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/varying.def.sc)3
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc52
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc59
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc55
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc53
-rw-r--r--src/osd/modules/render/bgfx/sliderreader.cpp19
-rw-r--r--src/osd/modules/render/bgfx/sliderreader.h4
-rw-r--r--src/osd/modules/render/bgfx/target.cpp1
-rw-r--r--src/osd/modules/render/bgfx/targetreader.cpp14
-rw-r--r--src/osd/modules/render/bgfx/targetreader.h5
-rw-r--r--src/osd/modules/render/blit13.h2
-rw-r--r--src/osd/modules/render/d3d/d3dcomm.h38
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp2
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.h2
-rw-r--r--src/osd/modules/render/drawd3d.h36
-rw-r--r--src/osd/modules/render/drawogl.h6
-rw-r--r--src/osd/modules/render/drawsdl.cpp6
-rw-r--r--src/osd/modules/render/sdlglcontext.h2
-rw-r--r--src/osd/modules/render/winglcontext.h18
-rw-r--r--src/osd/modules/sound/coreaudio_sound.cpp122
-rw-r--r--src/osd/modules/sound/direct_sound.cpp34
-rw-r--r--src/osd/modules/sound/sdl_sound.cpp8
-rw-r--r--src/osd/modules/sound/sound_module.h2
-rw-r--r--src/osd/osdcore.h6
-rw-r--r--src/osd/osdsync.cpp42
-rw-r--r--src/osd/sdl/osdsdl.h2
-rw-r--r--src/osd/sdl/sdldir.cpp16
-rw-r--r--src/osd/sdl/sdlmain.cpp40
-rw-r--r--src/osd/sdl/video.cpp22
-rw-r--r--src/osd/sdl/video.h2
-rw-r--r--src/osd/sdl/window.cpp8
-rw-r--r--src/osd/strconv.cpp26
-rw-r--r--src/osd/strconv.h2
-rw-r--r--src/osd/watchdog.h4
-rw-r--r--src/osd/windows/main.cpp4
-rw-r--r--src/osd/windows/video.cpp30
-rw-r--r--src/osd/windows/video.h2
-rw-r--r--src/osd/windows/windir.cpp30
-rw-r--r--src/osd/windows/window.cpp8
-rw-r--r--src/osd/windows/window.h4
-rw-r--r--src/osd/windows/winmain.cpp2
-rw-r--r--src/osd/windows/winmain.h3
-rw-r--r--src/osd/windows/winutf8.cpp14
-rw-r--r--src/osd/windows/winutil.cpp8
-rw-r--r--src/osd/windows/winutil.h4
883 files changed, 12486 insertions, 4606 deletions
diff --git a/src/devices/bus/a2bus/a2thunderclock.cpp b/src/devices/bus/a2bus/a2thunderclock.cpp
index 881acd496ce..8b378f238b6 100644
--- a/src/devices/bus/a2bus/a2thunderclock.cpp
+++ b/src/devices/bus/a2bus/a2thunderclock.cpp
@@ -41,7 +41,7 @@ const device_type A2BUS_THUNDERCLOCK = &device_creator<a2bus_thunderclock_device
#define THUNDERCLOCK_UPD1990_TAG "thunclk_upd"
MACHINE_CONFIG_FRAGMENT( thunderclock )
- MCFG_UPD1990A_ADD(THUNDERCLOCK_UPD1990_TAG, 1021800, DEVWRITELINE(DEVICE_SELF, a2bus_thunderclock_device, upd_dataout_w), NULL)
+ MCFG_UPD1990A_ADD(THUNDERCLOCK_UPD1990_TAG, 1021800, DEVWRITELINE(DEVICE_SELF, a2bus_thunderclock_device, upd_dataout_w), NOOP)
MACHINE_CONFIG_END
ROM_START( thunderclock )
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 17d504472ab..140f3e99a16 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -118,7 +118,7 @@ MACHINE_CONFIG_FRAGMENT( pcxporter )
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(a2bus_pcxporter_device, pc_dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(a2bus_pcxporter_device, pc_dack3_w))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("v30", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("v30", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(READ8(a2bus_pcxporter_device, pc_ppi_porta_r))
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index d72a91475be..f380e22e39d 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -58,7 +58,7 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD() \
- MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, c64_expansion_cards, NULL) \
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, c64_expansion_cards, nullptr) \
MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, c64_expansion_slot_device, irq_w)) \
MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, c64_expansion_slot_device, nmi_w)) \
MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, c64_expansion_slot_device, reset_w)) \
diff --git a/src/devices/bus/c64/magic_voice.cpp b/src/devices/bus/c64/magic_voice.cpp
index 264f6f87f05..cc0b2da9453 100644
--- a/src/devices/bus/c64/magic_voice.cpp
+++ b/src/devices/bus/c64/magic_voice.cpp
@@ -226,7 +226,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
MCFG_TPI6525_OUT_PB_CB(WRITE8(c64_magic_voice_cartridge_device, tpi_pb_w))
MCFG_TPI6525_OUT_CA_CB(WRITELINE(c64_magic_voice_cartridge_device, tpi_ca_w))
MCFG_TPI6525_OUT_CA_CB(WRITELINE(c64_magic_voice_cartridge_device, tpi_cb_w))
- MCFG_40105_ADD(CMOS40105_TAG, DEVWRITELINE(MOS6525_TAG, tpi6525_device, i3_w), NULL)
+ MCFG_40105_ADD(CMOS40105_TAG, DEVWRITELINE(MOS6525_TAG, tpi6525_device, i3_w), NOOP)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(T6721A_TAG, T6721A, XTAL_640kHz)
diff --git a/src/devices/bus/c64/ps64.cpp b/src/devices/bus/c64/ps64.cpp
index af9ea9d2402..422fa7d837d 100644
--- a/src/devices/bus/c64/ps64.cpp
+++ b/src/devices/bus/c64/ps64.cpp
@@ -65,7 +65,7 @@ const device_type C64_PS64 = &device_creator<c64_ps64_cartridge_device>;
/*
static struct votrax_sc02_interface votrax_intf =
{
- DEVCB_NULL
+ DEVCB_NOOP
};
*/
diff --git a/src/devices/bus/cbmiec/cbmiec.h b/src/devices/bus/cbmiec/cbmiec.h
index d950a8c19e1..5be1ff5f818 100644
--- a/src/devices/bus/cbmiec/cbmiec.h
+++ b/src/devices/bus/cbmiec/cbmiec.h
@@ -54,11 +54,11 @@
#define MCFG_CBM_IEC_ADD(_default_drive) \
- MCFG_CBM_IEC_SLOT_ADD("iec4", 4, cbm_iec_devices, NULL) \
+ MCFG_CBM_IEC_SLOT_ADD("iec4", 4, cbm_iec_devices, nullptr) \
MCFG_CBM_IEC_SLOT_ADD("iec8", 8, cbm_iec_devices, _default_drive) \
- MCFG_CBM_IEC_SLOT_ADD("iec9", 9, cbm_iec_devices, NULL) \
- MCFG_CBM_IEC_SLOT_ADD("iec10", 10, cbm_iec_devices, NULL) \
- MCFG_CBM_IEC_SLOT_ADD("iec11", 11, cbm_iec_devices, NULL) \
+ MCFG_CBM_IEC_SLOT_ADD("iec9", 9, cbm_iec_devices, nullptr) \
+ MCFG_CBM_IEC_SLOT_ADD("iec10", 10, cbm_iec_devices, nullptr) \
+ MCFG_CBM_IEC_SLOT_ADD("iec11", 11, cbm_iec_devices, nullptr) \
MCFG_CBM_IEC_BUS_ADD()
diff --git a/src/devices/bus/cgenie/expansion/expansion.h b/src/devices/bus/cgenie/expansion/expansion.h
index c465561d300..a78829ad37b 100644
--- a/src/devices/bus/cgenie/expansion/expansion.h
+++ b/src/devices/bus/cgenie/expansion/expansion.h
@@ -48,7 +48,7 @@
#define MCFG_EXPANSION_SLOT_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, EXPANSION_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(expansion_slot_carts, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(expansion_slot_carts, nullptr, false)
#define MCFG_EXPANSION_SLOT_INT_HANDLER(_devcb) \
devcb = &expansion_slot_device::set_int_handler(*device, DEVCB_##_devcb);
diff --git a/src/devices/bus/cgenie/parallel/parallel.h b/src/devices/bus/cgenie/parallel/parallel.h
index 3c8bd6bf8c0..2c52f54bd2c 100644
--- a/src/devices/bus/cgenie/parallel/parallel.h
+++ b/src/devices/bus/cgenie/parallel/parallel.h
@@ -33,7 +33,7 @@
#define MCFG_PARALLEL_SLOT_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, PARALLEL_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(parallel_slot_carts, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(parallel_slot_carts, nullptr, false)
//**************************************************************************
diff --git a/src/devices/bus/dmv/k230.cpp b/src/devices/bus/dmv/k230.cpp
index 5f5dd5f509d..33e2c917024 100644
--- a/src/devices/bus/dmv/k230.cpp
+++ b/src/devices/bus/dmv/k230.cpp
@@ -74,7 +74,7 @@ static MACHINE_CONFIG_FRAGMENT( dmv_k235 )
MCFG_CPU_IO_MAP(k235_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index 032193baa39..b071e49dde4 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -191,11 +191,11 @@ extern const device_type GENERIC_SOCKET;
#define MCFG_GENERIC_CARTSLOT_ADD(_tag, _slot_intf, _dev_intf) \
MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false) \
MCFG_GENERIC_INTERFACE(_dev_intf)
#define MCFG_GENERIC_SOCKET_ADD(_tag, _slot_intf, _dev_intf) \
MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false) \
MCFG_GENERIC_INTERFACE(_dev_intf)
#define MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT(_tag, _slot_intf, _dev_intf, _default) \
diff --git a/src/devices/bus/hp_optroms/hp_optrom.cpp b/src/devices/bus/hp_optroms/hp_optrom.cpp
new file mode 100644
index 00000000000..aa3ef766d71
--- /dev/null
+++ b/src/devices/bus/hp_optroms/hp_optrom.cpp
@@ -0,0 +1,143 @@
+// license:BSD-3-Clause
+// copyright-holders: F. Ulivi
+/*********************************************************************
+
+ hp_optrom.cpp
+
+ Optional ROMs for HP9845 systems
+
+*********************************************************************/
+
+#include "hp_optrom.h"
+#include "softlist.h"
+#include "cpu/hphybrid/hphybrid.h"
+
+const device_type HP_OPTROM_CART = &device_creator<hp_optrom_cart_device>;
+const device_type HP_OPTROM_SLOT = &device_creator<hp_optrom_slot_device>;
+
+// +---------------------+
+// |hp_optrom_cart_device|
+// +---------------------+
+hp_optrom_cart_device::hp_optrom_cart_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+ device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_slot_card_interface(mconfig, *this)
+{
+}
+
+hp_optrom_cart_device::hp_optrom_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, HP_OPTROM_CART, "HP9845 optional ROM cartridge", tag, owner, clock, "hp_optrom_cart", __FILE__),
+ device_slot_card_interface(mconfig, *this)
+{
+}
+
+// +---------------------+
+// |hp_optrom_slot_device|
+// +---------------------+
+hp_optrom_slot_device::hp_optrom_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, HP_OPTROM_SLOT, "HP9845 optional ROM Slot", tag, owner, clock, "hp_optrom_slot", __FILE__),
+ device_image_interface(mconfig, *this),
+ device_slot_interface(mconfig, *this),
+ m_cart(nullptr),
+ m_base_addr(0),
+ m_end_addr(0)
+{
+}
+
+hp_optrom_slot_device::~hp_optrom_slot_device()
+{
+}
+
+void hp_optrom_slot_device::device_start()
+{
+ m_cart = dynamic_cast<hp_optrom_cart_device *>(get_card_device());
+}
+
+void hp_optrom_slot_device::device_config_complete()
+{
+ update_names(HP_OPTROM_SLOT , "optional_rom" , "optrom");
+}
+
+bool hp_optrom_slot_device::call_load()
+{
+ logerror("hp_optrom: call_load\n");
+ if (m_cart == nullptr || !m_from_swlist) {
+ logerror("hp_optrom: must be loaded from sw list\n");
+ return IMAGE_INIT_FAIL;
+ }
+
+ const char *base_feature = get_feature("base");
+ if (base_feature == nullptr) {
+ logerror("hp_optrom: no 'base' feature\n");
+ return IMAGE_INIT_FAIL;
+ }
+
+ offs_t base_addr;
+ if (base_feature[ 0 ] != '0' || base_feature[ 1 ] != 'x' || sscanf(&base_feature[ 2 ] , "%x" , &base_addr) != 1) {
+ logerror("hp_optrom: can't parse 'base' feature\n");
+ return IMAGE_INIT_FAIL;
+ }
+
+ // Valid BSC values for ROMs on LPU drawer: 0x07 0x0b .... 0x3b
+ // Valid BSC values for ROMs on PPU drawer: 0x09 0x0d .... 0x3d
+ // (BSC is field in bits 16..21 of base address)
+ // Bit 15 of base address must be 0
+ // Base address must be multiple of 0x1000
+ if ((base_addr & ~0x3f7000UL) != 0 || ((base_addr & 0x30000) != 0x10000 && (base_addr & 0x30000) != 0x30000) || base_addr < 0x70000) {
+ logerror("hp_optrom: illegal base address (%x)\n" , base_addr);
+ return IMAGE_INIT_FAIL;
+ }
+
+ auto length = get_software_region_length("rom") / 2;
+
+ if (length < 0x1000 || length > 0x8000 || (length & 0xfff) != 0 || ((base_addr & 0x7000) + length) > 0x8000) {
+ logerror("hp_optrom: illegal region length (%x)\n" , length);
+ return IMAGE_INIT_FAIL;
+ }
+
+ offs_t end_addr = base_addr + length - 1;
+ logerror("hp_optrom: base_addr = %06x end_addr = %06x\n" , base_addr , end_addr);
+
+ m_content.resize(length * 2);
+ UINT8 *buffer = m_content.data();
+ memcpy(buffer , get_software_region("rom") , length * 2);
+
+ // Install ROM in address space of every CPU
+ for (hp_hybrid_cpu_device& cpu : device_interface_iterator<hp_hybrid_cpu_device>(machine().root_device())) {
+ logerror("hp_optrom: install in %s AS\n" , cpu.tag());
+ cpu.space(AS_PROGRAM).install_rom(base_addr , end_addr , buffer);
+ }
+
+ m_base_addr = base_addr;
+ m_end_addr = end_addr;
+
+ return IMAGE_INIT_PASS;
+}
+
+void hp_optrom_slot_device::call_unload()
+{
+ logerror("hp_optrom: call_unload\n");
+ if (m_cart != nullptr && m_base_addr != 0 && m_end_addr != 0) {
+ for (hp_hybrid_cpu_device& cpu : device_interface_iterator<hp_hybrid_cpu_device>(machine().root_device())) {
+ cpu.space(AS_PROGRAM).unmap_read(m_base_addr , m_end_addr);
+ }
+ m_content.resize(0);
+ m_base_addr = 0;
+ m_end_addr = 0;
+ }
+}
+
+bool hp_optrom_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry)
+{
+ logerror("hp_optrom: call_softlist_load\n");
+ machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry);
+ return TRUE;
+}
+
+std::string hp_optrom_slot_device::get_default_card_software()
+{
+ return software_get_default_slot("rom");
+}
+
+SLOT_INTERFACE_START(hp_optrom_slot_device)
+ SLOT_INTERFACE_INTERNAL("rom", HP_OPTROM_CART)
+SLOT_INTERFACE_END
diff --git a/src/devices/bus/hp_optroms/hp_optrom.h b/src/devices/bus/hp_optroms/hp_optrom.h
new file mode 100644
index 00000000000..a18fd5e4087
--- /dev/null
+++ b/src/devices/bus/hp_optroms/hp_optrom.h
@@ -0,0 +1,74 @@
+// license:BSD-3-Clause
+// copyright-holders: F. Ulivi
+/*********************************************************************
+
+ hp_optrom.h
+
+ Optional ROMs for HP9845 systems
+
+*********************************************************************/
+
+#pragma once
+
+#ifndef _HP_OPTROM_H_
+#define _HP_OPTROM_H_
+
+#include "emu.h"
+
+class hp_optrom_cart_device : public device_t,
+ public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ hp_optrom_cart_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ hp_optrom_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // device-level overrides
+ virtual void device_start() override {}
+};
+
+class hp_optrom_slot_device : public device_t,
+ public device_image_interface,
+ public device_slot_interface
+{
+public:
+ // construction/destruction
+ hp_optrom_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~hp_optrom_slot_device();
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_config_complete() override;
+
+ // image-level overrides
+ virtual bool call_load() override;
+ virtual void call_unload() override;
+ virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override;
+
+ virtual iodevice_t image_type() const override { return IO_CARTSLOT; }
+ virtual bool is_readable() const override { return true; }
+ virtual bool is_writeable() const override { return false; }
+ virtual bool is_creatable() const override { return false; }
+ virtual bool must_be_loaded() const override { return false; }
+ virtual bool is_reset_on_load() const override { return true; }
+ virtual const option_guide *create_option_guide() const override { return nullptr; }
+ virtual const char *image_interface() const override { return "hp9845b_rom"; }
+ virtual const char *file_extensions() const override { return "bin"; }
+
+ // slot interface overrides
+ virtual std::string get_default_card_software() override;
+
+protected:
+ hp_optrom_cart_device *m_cart;
+ dynamic_buffer m_content;
+ offs_t m_base_addr;
+ offs_t m_end_addr;
+};
+
+// device type definition
+extern const device_type HP_OPTROM_SLOT;
+extern const device_type HP_OPTROM_CART;
+
+SLOT_INTERFACE_EXTERN(hp_optrom_slot_device);
+
+#endif /* _HP_OPTROM_H_ */
diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h
index f14189e83d9..61018600ceb 100644
--- a/src/devices/bus/ieee488/ieee488.h
+++ b/src/devices/bus/ieee488/ieee488.h
@@ -64,15 +64,15 @@
#define MCFG_CBM_IEEE488_ADD(_default_drive) \
- MCFG_IEEE488_SLOT_ADD("ieee4", 4, cbm_ieee488_devices, NULL) \
+ MCFG_IEEE488_SLOT_ADD("ieee4", 4, cbm_ieee488_devices, nullptr) \
MCFG_IEEE488_SLOT_ADD("ieee8", 8, cbm_ieee488_devices, _default_drive) \
- MCFG_IEEE488_SLOT_ADD("ieee9", 9, cbm_ieee488_devices, NULL) \
- MCFG_IEEE488_SLOT_ADD("ieee10", 10, cbm_ieee488_devices, NULL) \
- MCFG_IEEE488_SLOT_ADD("ieee11", 11, cbm_ieee488_devices, NULL) \
- MCFG_IEEE488_SLOT_ADD("ieee12", 12, cbm_ieee488_devices, NULL) \
- MCFG_IEEE488_SLOT_ADD("ieee13", 13, cbm_ieee488_devices, NULL) \
- MCFG_IEEE488_SLOT_ADD("ieee14", 14, cbm_ieee488_devices, NULL) \
- MCFG_IEEE488_SLOT_ADD("ieee15", 15, cbm_ieee488_devices, NULL) \
+ MCFG_IEEE488_SLOT_ADD("ieee9", 9, cbm_ieee488_devices, nullptr) \
+ MCFG_IEEE488_SLOT_ADD("ieee10", 10, cbm_ieee488_devices, nullptr) \
+ MCFG_IEEE488_SLOT_ADD("ieee11", 11, cbm_ieee488_devices, nullptr) \
+ MCFG_IEEE488_SLOT_ADD("ieee12", 12, cbm_ieee488_devices, nullptr) \
+ MCFG_IEEE488_SLOT_ADD("ieee13", 13, cbm_ieee488_devices, nullptr) \
+ MCFG_IEEE488_SLOT_ADD("ieee14", 14, cbm_ieee488_devices, nullptr) \
+ MCFG_IEEE488_SLOT_ADD("ieee15", 15, cbm_ieee488_devices, nullptr) \
MCFG_IEEE488_BUS_ADD()
diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp
index 0536b4aba07..d4e4617a332 100644
--- a/src/devices/bus/ieee488/softbox.cpp
+++ b/src/devices/bus/ieee488/softbox.cpp
@@ -272,7 +272,7 @@ static MACHINE_CONFIG_FRAGMENT( softbox )
MCFG_HARDDISK_INTERFACE("corvus_hdd")
MCFG_HARDDISK_ADD("harddisk4")
MCFG_HARDDISK_INTERFACE("corvus_hdd")
- //MCFG_IMI7000_BUS_ADD("imi5000h", NULL, NULL, NULL)
+ //MCFG_IMI7000_BUS_ADD("imi5000h", nullptr, nullptr, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/iq151/minigraf.cpp b/src/devices/bus/iq151/minigraf.cpp
index 14cd9515cf7..0eeae3af73b 100644
--- a/src/devices/bus/iq151/minigraf.cpp
+++ b/src/devices/bus/iq151/minigraf.cpp
@@ -85,7 +85,7 @@ void iq151_minigraf_device::device_stop()
static const rgb_t png_palette[] = { rgb_t::white, rgb_t::black };
// save the paper into a png
- png_write_bitmap(file, NULL, *m_paper, 2, png_palette);
+ png_write_bitmap(file, nullptr, *m_paper, 2, png_palette);
}
#endif
}
diff --git a/src/devices/bus/iq151/ms151a.cpp b/src/devices/bus/iq151/ms151a.cpp
index c3aedf5f07d..f1bde64cf4c 100644
--- a/src/devices/bus/iq151/ms151a.cpp
+++ b/src/devices/bus/iq151/ms151a.cpp
@@ -84,7 +84,7 @@ void iq151_ms151a_device::device_stop()
static const rgb_t png_palette[] = { rgb_t::white, rgb_t::black };
// save the paper into a png
- png_write_bitmap(file, NULL, *m_paper, 2, png_palette);
+ png_write_bitmap(file, nullptr, *m_paper, 2, png_palette);
}
#endif
}
diff --git a/src/devices/bus/isa/finalchs.cpp b/src/devices/bus/isa/finalchs.cpp
index 94601de84da..c55414a62e1 100644
--- a/src/devices/bus/isa/finalchs.cpp
+++ b/src/devices/bus/isa/finalchs.cpp
@@ -105,7 +105,7 @@ void isa8_finalchs_device::device_start()
//the included setup program allows any port from 0x100 to 0x1F0 to be selected, at increments of 0x10
//picked the following at random until we get dips hooked up
m_isa->install_device(0x160, 0x0161, 0, 0, read8_delegate(FUNC(isa8_finalchs_device::finalchs_r), this), write8_delegate(FUNC(isa8_finalchs_device::finalchs_w), this));
-// timer_pulse(machine, ATTOTIME_IN_HZ(1), NULL, 0, cause_M6502_irq);
+// timer_pulse(machine, ATTOTIME_IN_HZ(1), nullptr, 0, cause_M6502_irq);
}
//-------------------------------------------------
diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp
index 5e044759603..453cb5a90d4 100644
--- a/src/devices/bus/isa/sc499.cpp
+++ b/src/devices/bus/isa/sc499.cpp
@@ -1345,7 +1345,7 @@ void sc499_ctape_image_device::call_unload()
{
m_ctape_data.resize(0);
// TODO: add save tape on exit?
- //if (software_entry() == NULL)
+ //if (software_entry() == nullptr)
//{
// fseek(0, SEEK_SET);
// fwrite(m_ctape_data, m_ctape_data.size);
diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp
index e7858521437..72959090f7d 100644
--- a/src/devices/bus/lpci/southbridge.cpp
+++ b/src/devices/bus/lpci/southbridge.cpp
@@ -61,7 +61,7 @@ static MACHINE_CONFIG_FRAGMENT( southbridge )
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(southbridge_device, pc_dack7_w))
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE(":maincpu", 0), VCC, READ8(southbridge_device, get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NOOP)
MCFG_DEVICE_ADD("keybc", AT_KEYBOARD_CONTROLLER, XTAL_12MHz)
MCFG_AT_KEYBOARD_CONTROLLER_SYSTEM_RESET_CB(INPUTLINE(":maincpu", INPUT_LINE_RESET))
diff --git a/src/devices/bus/m5/slot.cpp b/src/devices/bus/m5/slot.cpp
index 92bda7e5fbd..fdeba61463e 100644
--- a/src/devices/bus/m5/slot.cpp
+++ b/src/devices/bus/m5/slot.cpp
@@ -27,7 +27,7 @@ const device_type M5_CART_SLOT = &device_creator<m5_cart_slot_device>;
device_m5_cart_interface::device_m5_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
- m_rom(NULL),
+ m_rom(nullptr),
m_rom_size(0)
{
}
@@ -47,7 +47,7 @@ device_m5_cart_interface::~device_m5_cart_interface()
void device_m5_cart_interface::rom_alloc(UINT32 size, const char *tag)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
m_rom = device().machine().memory().region_alloc(std::string(tag).append(M5SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -163,7 +163,7 @@ bool m5_cart_slot_device::call_load()
{
m_type=M5_STD;
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
const char *pcb_name = get_feature("slot");
//software_info *name=m_software_info_ptr;
@@ -175,7 +175,7 @@ bool m5_cart_slot_device::call_load()
if (m_type == M5_STD || m_type>2) //carts with roms
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
if (size > 0x5000 && m_type == M5_STD)
{
@@ -185,7 +185,7 @@ bool m5_cart_slot_device::call_load()
m_cart->rom_alloc(size, tag());
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(m_cart->get_rom_base(), size);
else
memcpy(m_cart->get_rom_base(), get_software_region("rom"), size);
diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h
index 5f584ea2b82..9c72dc3c32a 100644
--- a/src/devices/bus/m5/slot.h
+++ b/src/devices/bus/m5/slot.h
@@ -82,7 +82,7 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return NULL; }
+ virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "m5_cart"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h
index ce8303ff3d4..da3c631859e 100644
--- a/src/devices/bus/msx_slot/cartridge.h
+++ b/src/devices/bus/msx_slot/cartridge.h
@@ -13,7 +13,7 @@ extern const device_type MSX_SLOT_YAMAHA_EXPANSION;
#define MCFG_MSX_SLOT_CARTRIDGE_ADD(_tag, _devcb) \
MCFG_DEVICE_ADD(_tag, MSX_SLOT_CARTRIDGE, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(msx_cart, NULL, false) \
+ MCFG_DEVICE_SLOT_INTERFACE(msx_cart, nullptr, false) \
devcb = &msx_slot_cartridge_device::set_irq_handler(*device, DEVCB_##_devcb);
diff --git a/src/devices/bus/neogeo/neogeo_intf.cpp b/src/devices/bus/neogeo/neogeo_intf.cpp
index c173b00e8db..30877b11be8 100644
--- a/src/devices/bus/neogeo/neogeo_intf.cpp
+++ b/src/devices/bus/neogeo/neogeo_intf.cpp
@@ -12,14 +12,14 @@ device_neogeo_cart_interface::device_neogeo_cart_interface(const machine_config
: device_slot_card_interface(mconfig, device),
m_sprite_gfx_address_mask(0)
/*
-m_rom(NULL),
-m_fixed(NULL),
-m_sprites(NULL),
-m_sprites_optimized(NULL),
-m_audio(NULL),
-m_ym(NULL),
-m_ymdelta(NULL),
-m_audiocrypt(NULL)
+m_rom(nullptr),
+m_fixed(nullptr),
+m_sprites(nullptr),
+m_sprites_optimized(nullptr),
+m_audio(nullptr),
+m_ym(nullptr),
+m_ymdelta(nullptr),
+m_audiocrypt(nullptr)
*/
{
}
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index 20786c3cab3..6d2caeba96d 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -79,7 +79,7 @@ extern const device_type NES_ALADDIN_SLOT;
#define MCFG_ALADDIN_MINICART_ADD(_tag, _slot_intf) \
MCFG_DEVICE_ADD(_tag, NES_ALADDIN_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
//----------------------------------
diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h
index bda9edfe50e..a2ae7df2753 100644
--- a/src/devices/bus/nes/datach.h
+++ b/src/devices/bus/nes/datach.h
@@ -81,7 +81,7 @@ extern const device_type NES_DATACH_SLOT;
#define MCFG_DATACH_MINICART_ADD(_tag, _slot_intf) \
MCFG_DEVICE_ADD(_tag, NES_DATACH_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
//--------------------------------
diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h
index 3a2f0c6d919..8d75e3d555d 100644
--- a/src/devices/bus/nes/karastudio.h
+++ b/src/devices/bus/nes/karastudio.h
@@ -78,7 +78,7 @@ extern const device_type NES_KSEXPANSION_SLOT;
#define MCFG_KSTUDIO_MINICART_ADD(_tag, _slot_intf) \
MCFG_DEVICE_ADD(_tag, NES_KSEXPANSION_SLOT, 0) \
-MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
+MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
//-----------------------------------------------
diff --git a/src/devices/bus/nes/nes_ines.inc b/src/devices/bus/nes/nes_ines.inc
index c8a495c11fc..a3bf0ad803e 100644
--- a/src/devices/bus/nes/nes_ines.inc
+++ b/src/devices/bus/nes/nes_ines.inc
@@ -307,7 +307,7 @@ int nes_get_mmc_id( running_machine &machine, int mapper )
{
const nes_mmc *mmc = nes_mapper_lookup(mapper);
- if (mmc == NULL)
+ if (mmc == nullptr)
fatalerror("Unimplemented Mapper %d\n", mapper);
return mmc->pcb_id;
diff --git a/src/devices/bus/nes/nes_unif.inc b/src/devices/bus/nes/nes_unif.inc
index 4379c9d7602..890685bfe76 100644
--- a/src/devices/bus/nes/nes_unif.inc
+++ b/src/devices/bus/nes/nes_unif.inc
@@ -79,7 +79,7 @@ static const unif unif_list[] =
{ "UNL-8237", 0, 0, CHRRAM_0, UNL_8237},
{ "UNL-SL1632", 0, 0, CHRRAM_0, REXSOFT_SL1632},
{ "UNL-SACHEN-74LS374N", 0, 0, CHRRAM_0, SACHEN_74LS374},
- // mapper 243 variant exists! how to distinguish?!? mapper243_l_w, NULL, NULL, NULL, NULL, NULL, NULL (also uses NT_VERT!)
+ // mapper 243 variant exists! how to distinguish?!? mapper243_l_w, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr (also uses NT_VERT!)
{ "UNL-TC-U01-1.5M", 0, 0, CHRRAM_0, SACHEN_TCU01},
{ "UNL-SACHEN-8259C", 0, 0, CHRRAM_0, SACHEN_8259C},
{ "UNL-SA-016-1M", 0, 0, CHRRAM_0, AVE_NINA06}, // actually this is Mapper 146, but works like 79!
diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h
index 83393719cf7..53dd8eb66a3 100644
--- a/src/devices/bus/nes/sunsoft_dcs.h
+++ b/src/devices/bus/nes/sunsoft_dcs.h
@@ -74,7 +74,7 @@ extern const device_type NES_NTB_SLOT;
#define MCFG_NTB_MINICART_ADD(_tag, _slot_intf) \
MCFG_DEVICE_ADD(_tag, NES_NTB_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
//-----------------------------------------------
diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h
index 3595b013f98..8d69029c132 100644
--- a/src/devices/bus/plus4/exp.h
+++ b/src/devices/bus/plus4/exp.h
@@ -60,7 +60,7 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_PLUS4_PASSTHRU_EXPANSION_SLOT_ADD() \
- MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, 0, plus4_expansion_cards, NULL) \
+ MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, 0, plus4_expansion_cards, nullptr) \
MCFG_PLUS4_EXPANSION_SLOT_IRQ_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, plus4_expansion_slot_device, irq_w)) \
MCFG_PLUS4_EXPANSION_SLOT_CD_INPUT_CALLBACK(DEVREAD8(DEVICE_SELF_OWNER, plus4_expansion_slot_device, dma_cd_r)) \
MCFG_PLUS4_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(DEVWRITE8(DEVICE_SELF_OWNER, plus4_expansion_slot_device, dma_cd_w)) \
diff --git a/src/devices/bus/s100/wunderbus.cpp b/src/devices/bus/s100/wunderbus.cpp
index efa739c0742..37d10342d4e 100644
--- a/src/devices/bus/s100/wunderbus.cpp
+++ b/src/devices/bus/s100/wunderbus.cpp
@@ -86,7 +86,7 @@ WRITE_LINE_MEMBER( s100_wunderbus_device::rtc_tp_w )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( s100_wunderbus )
- MCFG_PIC8259_ADD(I8259A_TAG, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, pic_int_w), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A_TAG, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, pic_int_w), VCC, NOOP)
MCFG_DEVICE_ADD(INS8250_1_TAG, INS8250, XTAL_18_432MHz/10)
MCFG_INS8250_OUT_TX_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
@@ -125,7 +125,7 @@ static MACHINE_CONFIG_FRAGMENT( s100_wunderbus )
MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, ri_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, cts_w))
- MCFG_UPD1990A_ADD(UPD1990C_TAG, XTAL_32_768kHz, NULL, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, rtc_tp_w))
+ MCFG_UPD1990A_ADD(UPD1990C_TAG, XTAL_32_768kHz, NOOP, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, rtc_tp_w))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/svi3x8/expander/expander.h b/src/devices/bus/svi3x8/expander/expander.h
index 0cbeb6eeba3..98c2b8af348 100644
--- a/src/devices/bus/svi3x8/expander/expander.h
+++ b/src/devices/bus/svi3x8/expander/expander.h
@@ -48,7 +48,7 @@
#define MCFG_SVI_EXPANDER_BUS_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SVI_EXPANDER, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(svi_expander_modules, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(svi_expander_modules, nullptr, false)
#define MCFG_SVI_EXPANDER_INT_HANDLER(_devcb) \
devcb = &svi_expander_device::set_int_handler(*device, DEVCB_##_devcb);
diff --git a/src/devices/bus/svi3x8/expander/sv601.cpp b/src/devices/bus/svi3x8/expander/sv601.cpp
index 79538de37ed..6f29b12b6e2 100644
--- a/src/devices/bus/svi3x8/expander/sv601.cpp
+++ b/src/devices/bus/svi3x8/expander/sv601.cpp
@@ -25,13 +25,13 @@ static MACHINE_CONFIG_FRAGMENT( sv601 )
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv601_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv601_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv601_device, ramdis_w))
- MCFG_SVI_SLOT_ADD("0", svi_slot_cards, NULL)
- MCFG_SVI_SLOT_ADD("1", svi_slot_cards, NULL)
- MCFG_SVI_SLOT_ADD("2", svi_slot_cards, NULL)
- MCFG_SVI_SLOT_ADD("3", svi_slot_cards, NULL)
- MCFG_SVI_SLOT_ADD("4", svi_slot_cards, NULL)
- MCFG_SVI_SLOT_ADD("5", svi_slot_cards, NULL)
- MCFG_SVI_SLOT_ADD("6", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("0", svi_slot_cards, nullptr)
+ MCFG_SVI_SLOT_ADD("1", svi_slot_cards, nullptr)
+ MCFG_SVI_SLOT_ADD("2", svi_slot_cards, nullptr)
+ MCFG_SVI_SLOT_ADD("3", svi_slot_cards, nullptr)
+ MCFG_SVI_SLOT_ADD("4", svi_slot_cards, nullptr)
+ MCFG_SVI_SLOT_ADD("5", svi_slot_cards, nullptr)
+ MCFG_SVI_SLOT_ADD("6", svi_slot_cards, nullptr)
MACHINE_CONFIG_END
machine_config_constructor sv601_device::device_mconfig_additions() const
diff --git a/src/devices/bus/svi3x8/expander/sv602.cpp b/src/devices/bus/svi3x8/expander/sv602.cpp
index 489a1ed6625..aef20a8e464 100644
--- a/src/devices/bus/svi3x8/expander/sv602.cpp
+++ b/src/devices/bus/svi3x8/expander/sv602.cpp
@@ -25,7 +25,7 @@ static MACHINE_CONFIG_FRAGMENT( sv602 )
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv602_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv602_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv602_device, ramdis_w))
- MCFG_SVI_SLOT_ADD("0", sv602_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("0", sv602_slot_cards, nullptr)
MACHINE_CONFIG_END
machine_config_constructor sv602_device::device_mconfig_additions() const
diff --git a/src/devices/bus/ti99_peb/peribox.h b/src/devices/bus/ti99_peb/peribox.h
index 47095f7d9ce..498d44da8d8 100644
--- a/src/devices/bus/ti99_peb/peribox.h
+++ b/src/devices/bus/ti99_peb/peribox.h
@@ -247,7 +247,7 @@ protected:
#define MCFG_PERIBOX_SLOT_ADD(_tag, _slot_intf) \
MCFG_DEVICE_ADD(_tag, PERIBOX_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
#define MCFG_PERIBOX_SLOT_ADD_DEF(_tag, _slot_intf, _default) \
MCFG_DEVICE_ADD(_tag, PERIBOX_SLOT, 0) \
diff --git a/src/devices/bus/ti99_peb/ti_rs232.cpp b/src/devices/bus/ti99_peb/ti_rs232.cpp
index e93bb86d015..dc2b29b8a2d 100644
--- a/src/devices/bus/ti99_peb/ti_rs232.cpp
+++ b/src/devices/bus/ti99_peb/ti_rs232.cpp
@@ -199,7 +199,7 @@ bool ti_rs232_attached_device::call_load()
}
// The following line may cause trouble in the init phase
- // card->incoming_dtr(devnumber, (m_file!=NULL)? ASSERT_LINE : CLEAR_LINE);
+ // card->incoming_dtr(devnumber, (m_file!=nullptr)? ASSERT_LINE : CLEAR_LINE);
return false; // OK
}
diff --git a/src/devices/bus/ti99x/990_dk.cpp b/src/devices/bus/ti99x/990_dk.cpp
index 16fd5920d7c..7b6c8e9e36e 100644
--- a/src/devices/bus/ti99x/990_dk.cpp
+++ b/src/devices/bus/ti99x/990_dk.cpp
@@ -178,7 +178,7 @@ int fd800_legacy_device::do_seek(int unit, int cylinder, int head)
return TRUE;
}
- if (m_drv[unit].img == NULL || !m_drv[unit].img->exists())
+ if (m_drv[unit].img == nullptr || !m_drv[unit].img->exists())
{
m_stat_reg |= status_drv_not_ready;
return TRUE;
@@ -186,7 +186,7 @@ int fd800_legacy_device::do_seek(int unit, int cylinder, int head)
if (m_drv[unit].log_cylinder[head] == -1)
{
- if (!read_id(unit, head, &m_drv[unit].log_cylinder[head], NULL))
+ if (!read_id(unit, head, &m_drv[unit].log_cylinder[head], nullptr))
{
m_stat_reg |= status_ID_not_found;
return TRUE;
@@ -205,7 +205,7 @@ int fd800_legacy_device::do_seek(int unit, int cylinder, int head)
if (m_drv[unit].phys_cylinder != -1)
m_drv[unit].phys_cylinder += cylinder-m_drv[unit].log_cylinder[head];
- if (!read_id(unit, head, &m_drv[unit].log_cylinder[head], NULL))
+ if (!read_id(unit, head, &m_drv[unit].log_cylinder[head], nullptr))
{
m_drv[unit].log_cylinder[head] = -1;
m_stat_reg |= status_ID_not_found;
@@ -852,7 +852,7 @@ WRITE8_MEMBER( fd800_legacy_device::cru_w )
#if 0
LEGACY_FLOPPY_OPTIONS_START(fd800)
// SSSD 8"
- LEGACY_FLOPPY_OPTION(fd800, "dsk", "TI990 8\" SSSD disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(fd800, "dsk", "TI990 8\" SSSD disk image", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS([77])
SECTORS([26])
@@ -860,7 +860,7 @@ LEGACY_FLOPPY_OPTIONS_START(fd800)
FIRST_SECTOR_ID([1]))
// DSSD 8"
- LEGACY_FLOPPY_OPTION(fd800, "dsk", "TI990 8\" DSSD disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(fd800, "dsk", "TI990 8\" DSSD disk image", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([2])
TRACKS([77])
SECTORS([26])
diff --git a/src/devices/bus/ti99x/gromport.cpp b/src/devices/bus/ti99x/gromport.cpp
index 0109c15708d..3bbb9528cd5 100644
--- a/src/devices/bus/ti99x/gromport.cpp
+++ b/src/devices/bus/ti99x/gromport.cpp
@@ -103,12 +103,6 @@
is able to override the console GROMs, thus allowing the user to install
a customized OS.
- (Emulation detail: Take care when changing something in this emulation -
- this overrun is emulated by the sequence in which the devices on the datamux
- are executed.)
-
- Michael Zapf, July 2012
-
***************************************************************************/
#include "gromport.h"
#include "emuopts.h"
@@ -136,59 +130,13 @@
#define GKRACKER_ROM_TAG "gkracker_rom"
#define GKRACKER_NVRAM_TAG "gkracker_nvram"
-/*-------------------------------------------------
- image_battery_load_by_name - retrieves the battery
- backed RAM for an image. A filename may be supplied
- to the function.
-
- The function comes in two flavors, depending on
- what should happen when no battery is available:
- we could fill the memory with a given value, or
- pass a default battery (for a pre-initialized
- battery from factory)
--------------------------------------------------*/
-
-static void image_battery_load_by_name(emu_options &options, const char *filename, void *buffer, int length, int fill)
-{
- osd_file::error filerr;
- int bytes_read = 0;
-
- assert_always(buffer && (length > 0), "Must specify sensical buffer/length");
-
- /* try to open the battery file and read it in, if possible */
- emu_file file(options.nvram_directory(), OPEN_FLAG_READ);
- filerr = file.open(filename);
- if (filerr == osd_file::error::NONE)
- bytes_read = file.read(buffer, length);
-
- /* fill remaining bytes (if necessary) */
- memset(((char *) buffer) + bytes_read, fill, length - bytes_read);
-}
-
-/*-------------------------------------------------
- image_battery_save_by_name - stores the battery
- backed RAM for an image. A filename may be supplied
- to the function.
--------------------------------------------------*/
-static void image_battery_save_by_name(emu_options &options, const char *filename, const void *buffer, int length)
-{
- assert_always(buffer && (length > 0), "Must specify sensical buffer/length");
-
- /* try to open the battery file and write it out, if possible */
- emu_file file(options.nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- osd_file::error filerr = file.open(filename);
- if (filerr == osd_file::error::NONE)
- file.write(buffer, length);
-}
-
-
gromport_device::gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: bus8z_device(mconfig, GROMPORT, "Cartridge port", tag, owner, clock, "gromport", __FILE__),
device_slot_interface(mconfig, *this),
m_connector(nullptr),
m_reset_on_insert(true),
m_console_ready(*this),
- m_console_reset(*this) // , m_grombase(0), m_grommask(0)
+ m_console_reset(*this)
{ }
/*
@@ -200,7 +148,7 @@ READ8Z_MEMBER(gromport_device::readz)
if (m_connector != nullptr)
{
m_connector->readz(space, offset & m_mask, value);
- if (TRACE_READ) if (m_romgq) logerror("Read %04x -> %02x\n", offset, *value);
+ if (TRACE_READ) if (m_romgq) logerror("Read %04x -> %02x\n", offset | 0x6000, *value);
}
}
@@ -212,7 +160,7 @@ WRITE8_MEMBER(gromport_device::write)
{
if (m_connector != nullptr)
{
- if (TRACE_WRITE) if (m_romgq) logerror("Write %04x <- %02x\n", offset, data);
+ if (TRACE_WRITE) if (m_romgq) logerror("Write %04x <- %02x\n", offset | 0x6000, data);
m_connector->write(space, offset & m_mask, data);
}
}
@@ -517,7 +465,7 @@ multi_conn_device::multi_conn_device(const machine_config &mconfig, const char *
void multi_conn_device::set_slot(int slotnumber)
{
if (TRACE_CHANGE)
- if (m_active_slot != slotnumber) logerror("%s: Setting cartslot to %d\n", tag(), slotnumber);
+ if (m_active_slot != slotnumber) logerror("Setting cartslot to %d\n", slotnumber);
if (m_fixed_slot==AUTO)
m_active_slot = slotnumber;
@@ -531,7 +479,7 @@ int multi_conn_device::get_active_slot(bool changebase, offs_t offset)
if (changebase)
{
// GROM selected?
- if (m_gsel != 0) set_slot((offset>>2) & 0x00ff);
+ if (m_grom_selected) set_slot((offset>>2) & 0x00ff);
}
slot = m_active_slot;
return slot;
@@ -539,14 +487,14 @@ int multi_conn_device::get_active_slot(bool changebase, offs_t offset)
void multi_conn_device::insert(int index, ti99_cartridge_device* cart)
{
- if (TRACE_CHANGE) logerror("%s: Insert slot %d\n", tag(), index);
+ if (TRACE_CHANGE) logerror("Insert slot %d\n", index);
m_cartridge[index] = cart;
m_gromport->cartridge_inserted();
}
void multi_conn_device::remove(int index)
{
- if (TRACE_CHANGE) logerror("%s: Remove slot %d\n", tag(), index);
+ if (TRACE_CHANGE) logerror("Remove slot %d\n", index);
m_cartridge[index] = nullptr;
}
@@ -570,7 +518,7 @@ WRITE_LINE_MEMBER(multi_conn_device::romgq_line)
WRITE8_MEMBER(multi_conn_device::set_gromlines)
{
// GROM selected?
- m_gsel = data;
+ m_grom_selected = (data != 0);
// Propagate to all slots
for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
@@ -601,7 +549,7 @@ READ8Z_MEMBER(multi_conn_device::readz)
// If we have a GROM access, we need to send the read request to all
// attached cartridges so the slot is irrelevant here. Each GROM
// contains an internal address counter, and we must make sure they all stay in sync.
- if (m_gsel != 0)
+ if (m_grom_selected)
{
for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
{
@@ -629,7 +577,7 @@ WRITE8_MEMBER(multi_conn_device::write)
{
// Same issue as above (read)
// We don't have GRAM cartridges, anyway, so it's just used for setting the address.
- if (m_gsel != 0)
+ if (m_grom_selected)
{
for (auto & elem : m_cartridge)
{
@@ -691,7 +639,7 @@ void multi_conn_device::device_reset(void)
{
m_active_slot = 0;
m_fixed_slot = ioport("CARTSLOT")->read() - 1;
- m_gsel = 0;
+ m_grom_selected = false;
}
static MACHINE_CONFIG_FRAGMENT( multi_slot )
@@ -839,6 +787,7 @@ enum
gkracker_device::gkracker_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ti99_cartridge_connector_device(mconfig, GROMPORT_GK, "GRAMKracker", tag, owner, clock, "ti99_gkracker", __FILE__),
device_nvram_interface(mconfig, *this),
+ m_romspace_selected(false),
m_ram_page(0),
m_grom_address(0),
m_ram_ptr(nullptr),
@@ -850,11 +799,9 @@ gkracker_device::gkracker_device(const machine_config &mconfig, const char *tag,
WRITE_LINE_MEMBER(gkracker_device::romgq_line)
{
- if (m_cartridge != nullptr)
- {
- // Propagate to the guest
- m_cartridge->romgq_line(state);
- }
+ m_romspace_selected = (state==ASSERT_LINE);
+ // Propagate to the guest
+ if (m_cartridge != nullptr) m_cartridge->romgq_line(state);
}
/*
@@ -862,125 +809,72 @@ WRITE_LINE_MEMBER(gkracker_device::romgq_line)
*/
WRITE8_MEMBER(gkracker_device::set_gromlines)
{
- m_gsel = data;
- if (m_cartridge != nullptr)
- {
- // Propagate to the guest
- m_cartridge->set_gromlines(space, offset, data);
- }
+ m_grom_selected = (data != 0);
+ if (m_cartridge != nullptr) m_cartridge->set_gromlines(space, offset, data);
}
WRITE_LINE_MEMBER(gkracker_device::gclock_in)
{
- if (m_cartridge != nullptr)
- {
- // Propagate to the guest
- m_cartridge->gclock_in(state);
- }
+ if (m_cartridge != nullptr) m_cartridge->gclock_in(state);
}
READ8Z_MEMBER(gkracker_device::readz)
{
- if (m_gsel != 0)
+ if (m_grom_selected)
{
// Reads from the GRAM space of the GRAM Kracker.
+ int id = ((m_grom_address & 0xe000)>>13)&0x07;
// The GK does not have a readable address counter, but the console
- // GROMs will keep our address counter up to date. That is
- // exactly what happens in the real machine.
- // (The console GROMs are not accessed here but directly via the datamux
- // so we can just return without doing anything)
- if ((offset & 0x0002)!=0) return;
-
- int id = ((m_grom_address & 0xe000)>>13)&0x07;
- switch (id)
+ // GROMs and the GROMs of the guest cartridge will keep our address
+ // counter up to date.
+ if ((offset & 0x0002)==0)
{
- case 0:
- // GRAM 0. Only return a value if switch 2 is in GRAM0 position.
- if (m_gk_switch[2]==GK_GRAM0)
+ // Reading data
+ if (((id==0) && (m_gk_switch[2]==GK_GRAM0))
+ || ((id==1) && (m_gk_switch[5]==GK_LDOFF) && (m_gk_switch[3]==GK_GRAM12))
+ || ((id==2) && (m_gk_switch[3]==GK_GRAM12))
+ || ((id>=3) && (m_gk_switch[1]==GK_NORMAL)))
*value = m_ram_ptr[m_grom_address];
- break;
- case 1:
- // If the loader is turned on, return loader contents.
- if (m_gk_switch[5]==GK_LDON)
- {
- // The only ROM contained in the GK box is the loader
- // Adjust the address
- *value = m_grom_ptr[m_grom_address & 0x1fff];
- }
- else
- {
- // Loader off
- // GRAM 1. Only return a value if switch 3 is in GRAM12 position.
- // Otherwise, the console GROM 1 will respond (not here; it is the grom_device
- // whose output would then not be overwritten)
- if (m_gk_switch[3]==GK_GRAM12)
- *value = m_ram_ptr[m_grom_address];
- }
- break;
- case 2:
- // GRAM 2. Only return a value if switch 3 is in GRAM12 position.
- if (m_gk_switch[3]==GK_GRAM12)
- *value = m_ram_ptr[m_grom_address];
- break;
- default:
- // Cartridge space (0x6000 - 0xffff)
- // When a cartridge is installed, it overrides the GK contents
- // but only if it has GROMs
- bool guest_has_grom = false;
- if (m_cartridge != nullptr)
- {
- guest_has_grom = m_cartridge->has_grom();
- // Note that we only have ONE real cartridge and the GK;
- // we need not access all slots.
- if (guest_has_grom)
- {
- m_cartridge->readz(space, offset, value, mem_mask); // read from guest
- }
- }
- if (!guest_has_grom && (m_gk_switch[1]==GK_NORMAL))
- *value = m_ram_ptr[m_grom_address]; // use the GK memory
- }
+ if ((id==1) && (m_gk_switch[5]==GK_LDON))
+ *value = m_grom_ptr[m_grom_address & 0x1fff];
- // The GK GROM emulation does not wrap at 8K boundaries.
- m_grom_address = (m_grom_address + 1) & 0xffff;
+ // The GK GROM emulation does not wrap at 8K boundaries.
+ m_grom_address = (m_grom_address + 1) & 0xffff;
- // Reset the write address flipflop.
- m_waddr_LSB = false;
+ // Reset the write address flipflop.
+ m_waddr_LSB = false;
+ if (TRACE_GKRACKER) logerror("GROM read -> %02x\n", *value);
+ }
}
- else
+
+ if (m_romspace_selected)
{
- if (m_cartridge != nullptr)
+ // Reads from the RAM space of the GRAM Kracker.
+
+ // RAM is stored behind the GRAM area
+ // Note that offset is 0000...1fff
+ // When switch in middle position (WP) do bank select according to page flag
+ if (m_gk_switch[1] == GK_NORMAL)
{
- // Read from the guest cartridge.
- m_cartridge->readz(space, offset, value, mem_mask);
+ int base = ((m_gk_switch[4]==GK_BANK1) || ((m_gk_switch[4]==GK_WP) && (m_ram_page==0)))? 0x10000 : 0x12000;
+ *value = m_ram_ptr[offset | base];
+ if (TRACE_GKRACKER) logerror("Read %04x -> %02x\n", offset | 0x6000, *value);
}
- else
- {
- // Reads from the RAM space of the GRAM Kracker.
- if (m_gk_switch[1] == GK_OFF) return; // just don't do anything
- switch (m_gk_switch[4])
- {
- // RAM is stored behind the GRAM area
- case GK_BANK1:
- *value = m_ram_ptr[offset+0x10000 - 0x6000];
- break;
- case GK_BANK2:
- *value = m_ram_ptr[offset+0x12000 - 0x6000];
- break;
+ }
- default:
- // Switch in middle position (WP, implies auto-select according to the page flag)
- if (m_ram_page==0)
- *value = m_ram_ptr[offset+0x10000 - 0x6000];
- else
- *value = m_ram_ptr[offset+0x12000 - 0x6000];
- break;
- }
- }
+ // If the guest has GROMs or ROMs they will override the GK contents
+ if (m_cartridge != nullptr)
+ {
+ // For debugging
+ UINT8 val1 = *value;
+
+ // Read from the guest cartridge.
+ m_cartridge->readz(space, offset, value, mem_mask);
+ if (TRACE_GKRACKER)
+ if (val1 != *value) logerror("Read (from guest) %04x -> %02x\n", offset, *value);
}
- if (TRACE_READ) logerror("%s: Read %04x -> %02x\n", tag(), offset, *value);
}
WRITE8_MEMBER(gkracker_device::write)
@@ -991,7 +885,7 @@ WRITE8_MEMBER(gkracker_device::write)
m_cartridge->write(space, offset, data, mem_mask);
}
- if (m_gsel != 0)
+ if (m_grom_selected)
{
// Write to the GRAM space of the GRAM Kracker.
if ((offset & 0x0002)==0x0002)
@@ -1002,7 +896,7 @@ WRITE8_MEMBER(gkracker_device::write)
// Accept low address byte (second write)
m_grom_address = (m_grom_address & 0xff00) | data;
m_waddr_LSB = false;
- if (TRACE_GROM) logerror("%s: Set grom address %04x\n", tag(), m_grom_address);
+ if (TRACE_GKRACKER) logerror("Set GROM address %04x\n", m_grom_address);
}
else
{
@@ -1014,7 +908,7 @@ WRITE8_MEMBER(gkracker_device::write)
else
{
// Write data byte to GRAM area.
- if (TRACE_GROM) logerror("%s: gwrite %04x(%04x) <- %02x\n", tag(), offset, m_grom_address, data);
+ if (TRACE_GKRACKER) logerror("GROM write %04x(%04x) <- %02x\n", offset, m_grom_address, data);
// According to manual:
// Writing to GRAM 0: switch 2 set to GRAM 0 + Write protect switch (4) in 1 or 2 position
@@ -1022,26 +916,15 @@ WRITE8_MEMBER(gkracker_device::write)
// Writing to GRAM 2: switch 3 set to GRAM 1-2 (write prot has no effect)
// Writing to GRAM 3-7: switch 1 set to GK_NORMAL, no cartridge inserted
// GK_NORMAL switch has no effect on GRAM 0-2
+
int id = ((m_grom_address & 0xe000)>>13)&0x07;
- switch (id)
- {
- case 0:
- if (m_gk_switch[2]==GK_GRAM0 && m_gk_switch[4]!=GK_WP)
- m_ram_ptr[m_grom_address] = data;
- break;
- case 1:
- if (m_gk_switch[3]==GK_GRAM12 && m_gk_switch[5]==GK_LDOFF)
- m_ram_ptr[m_grom_address] = data;
- break;
- case 2:
- if (m_gk_switch[3]==GK_GRAM12)
- m_ram_ptr[m_grom_address] = data;
- break;
- default:
- if (m_gk_switch[1]==GK_NORMAL && m_cartridge == nullptr)
- m_ram_ptr[m_grom_address] = data;
- break;
- }
+
+ if ((id==0 && m_gk_switch[2]==GK_GRAM0 && m_gk_switch[4]!=GK_WP)
+ || (id==1 && m_gk_switch[3]==GK_GRAM12 && m_gk_switch[5]==GK_LDOFF)
+ || (id==2 && m_gk_switch[3]==GK_GRAM12)
+ || (id>=3 && m_gk_switch[1]==GK_NORMAL))
+ m_ram_ptr[m_grom_address] = data;
+
// The GK GROM emulation does not wrap at 8K boundaries.
m_grom_address = (m_grom_address + 1) & 0xffff;
@@ -1049,31 +932,19 @@ WRITE8_MEMBER(gkracker_device::write)
m_waddr_LSB = false;
}
}
- else
+
+ if (m_romspace_selected)
{
// Write to the RAM space of the GRAM Kracker
- // (only if no cartridge is present)
- if (TRACE_GROM) logerror("%s: write %04x <- %02x\n", tag(), offset, data);
- if (m_cartridge == nullptr)
- {
- if (m_gk_switch[1] == GK_OFF) return; // just don't do anything
- switch (m_gk_switch[4])
- {
- // RAM is stored behind the GRAM area
- case GK_BANK1:
- m_ram_ptr[offset+0x10000 - 0x6000] = data;
- break;
-
- case GK_BANK2:
- m_ram_ptr[offset+0x12000 - 0x6000] = data;
- break;
+ if (TRACE_GKRACKER) logerror("Write %04x <- %02x\n", offset | 0x6000, data);
- default:
- // Switch in middle position (WP, implies auto-select according to the page flag)
- // This is handled like in Extended Basic (using addresses)
- m_ram_page = (offset >> 1) & 1;
- break;
- }
+ if (m_gk_switch[1] == GK_NORMAL)
+ {
+ if (m_gk_switch[4]==GK_BANK1) m_ram_ptr[offset | 0x10000] = data;
+ else if (m_gk_switch[4]==GK_BANK2) m_ram_ptr[offset | 0x12000] = data;
+ // Switch in middle position (WP, implies auto-select according to the page flag)
+ // This is handled like in Extended Basic (using addresses)
+ else m_ram_page = (offset >> 1) & 1;
}
}
}
@@ -1090,13 +961,13 @@ WRITE8_MEMBER( gkracker_device::cruwrite )
INPUT_CHANGED_MEMBER( gkracker_device::gk_changed )
{
- if (TRACE_GKRACKER) logerror("%s: Input changed %d - %d\n", tag(), (int)((UINT64)param & 0x07), newval);
+ if (TRACE_GKRACKER) logerror("Input changed %d - %d\n", (int)((UINT64)param & 0x07), newval);
m_gk_switch[(UINT64)param & 0x07] = newval;
}
void gkracker_device::insert(int index, ti99_cartridge_device* cart)
{
- if (TRACE_CHANGE) logerror("%s: Insert cartridge\n", tag());
+ if (TRACE_CHANGE) logerror("Insert cartridge\n");
m_cartridge = cart;
// Switch 1 has a third location for resetting. We do the reset by default
// here. It can be turned off in the configuration.
@@ -1105,7 +976,7 @@ void gkracker_device::insert(int index, ti99_cartridge_device* cart)
void gkracker_device::remove(int index)
{
- if (TRACE_CHANGE) logerror("%s: Remove cartridge\n", tag());
+ if (TRACE_CHANGE) logerror("Remove cartridge\n");
m_cartridge = nullptr;
}
@@ -1128,7 +999,7 @@ void gkracker_device::gk_install_menu(const char* menutext, int len, int ptr, in
*/
void gkracker_device::nvram_default()
{
- if (TRACE_GKRACKER) logerror("%s: Creating default NVRAM\n", tag());
+ if (TRACE_GKRACKER) logerror("Creating default NVRAM\n");
memset(m_ram_ptr, 0, 81920);
m_ram_ptr[0x6000] = 0xaa;
@@ -1152,7 +1023,7 @@ void gkracker_device::nvram_default()
void gkracker_device::nvram_read(emu_file &file)
{
int readsize = file.read(m_ram_ptr, 81920);
- if (TRACE_GKRACKER) logerror("%s: Reading NVRAM\n", tag());
+ if (TRACE_GKRACKER) logerror("Reading NVRAM\n");
// If we increased the size, fill the remaining parts with 0
if (readsize < 81920)
{
@@ -1162,7 +1033,7 @@ void gkracker_device::nvram_read(emu_file &file)
void gkracker_device::nvram_write(emu_file &file)
{
- if (TRACE_GKRACKER) logerror("%s: Writing NVRAM\n", tag());
+ if (TRACE_GKRACKER) logerror("Writing NVRAM\n");
file.write(m_ram_ptr, 81920);
}
@@ -1184,7 +1055,7 @@ void gkracker_device::device_reset()
m_grom_address = 0; // for the GROM emulation
m_ram_page = 0;
m_waddr_LSB = false;
- m_gsel = 0;
+ m_grom_selected = false;
}
static MACHINE_CONFIG_FRAGMENT( gkracker_slot )
@@ -1325,7 +1196,7 @@ void ti99_cartridge_device::prepare_cartridge()
for (int i=0; i < 5; i++) m_pcb->m_grom[i] = nullptr;
m_pcb->m_grom_size = m_softlist? get_software_region_length("grom_socket") : m_rpk->get_resource_length("grom_socket");
- if (TRACE_CONFIG) logerror("%s: grom_socket.size=0x%04x\n", tag(), m_pcb->m_grom_size);
+ if (TRACE_CONFIG) logerror("grom_socket.size=0x%04x\n", m_pcb->m_grom_size);
if (m_pcb->m_grom_size > 0)
{
@@ -1346,7 +1217,7 @@ void ti99_cartridge_device::prepare_cartridge()
m_pcb->m_rom_size = m_softlist? get_software_region_length("rom_socket") : m_rpk->get_resource_length("rom_socket");
if (m_pcb->m_rom_size > 0)
{
- if (TRACE_CONFIG) logerror("%s: rom_socket.size=0x%04x\n", tag(), m_pcb->m_rom_size);
+ if (TRACE_CONFIG) logerror("rom_socket.size=0x%04x\n", m_pcb->m_rom_size);
regr = memregion(CARTROM_TAG);
rom_ptr = m_softlist? get_software_region("rom_socket") : m_rpk->get_contents_of_socket("rom_socket");
memcpy(regr->base(), rom_ptr, m_pcb->m_rom_size);
@@ -1394,30 +1265,15 @@ int ti99_cartridge_device::get_index_from_tagname()
return atoi(mytag+i+1)-1;
}
-bool ti99_cartridge_device::has_grom()
-{
- return m_pcb->m_grom_size>0;
-}
-
-// UINT16 ti99_cartridge_device::grom_base()
-// {
- // return m_connector->grom_base();
-// }
-//
-// UINT16 ti99_cartridge_device::grom_mask()
-// {
- // return m_connector->grom_mask();
-// }
-
bool ti99_cartridge_device::call_load()
{
// File name is in m_basename
// return true = error
- if (TRACE_CHANGE) logerror("%s: Loading %s in slot %s\n", tag(), m_basename.c_str(), tag());
+ if (TRACE_CHANGE) logerror("Loading %s in slot %s\n", m_basename.c_str());
if (m_softlist)
{
- if (TRACE_CONFIG) logerror("%s: Using softlists\n", tag());
+ if (TRACE_CONFIG) logerror("Using softlists\n");
int i = 0;
const char* pcb = get_feature("pcb");
do
@@ -1429,7 +1285,7 @@ bool ti99_cartridge_device::call_load()
}
i++;
} while (sw_pcbdefs[i].id != 0);
- if (TRACE_CONFIG) logerror("%s: Cartridge type is %s (%d)\n", tag(), pcb, m_pcbtype);
+ if (TRACE_CONFIG) logerror("Cartridge type is %s (%d)\n", pcb, m_pcbtype);
}
else
{
@@ -1441,7 +1297,7 @@ bool ti99_cartridge_device::call_load()
}
catch (rpk_exception& err)
{
- logerror("%s: Failed to load cartridge '%s': %s\n", tag(), basename(), err.to_string());
+ logerror("Failed to load cartridge '%s': %s\n", basename(), err.to_string());
m_rpk = nullptr;
m_err = IMAGE_ERROR_INVALIDIMAGE;
return true;
@@ -1451,43 +1307,43 @@ bool ti99_cartridge_device::call_load()
switch (m_pcbtype)
{
case PCB_STANDARD:
- if (TRACE_CONFIG) logerror("%s: Standard PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Standard PCB\n");
m_pcb = new ti99_standard_cartridge();
break;
case PCB_PAGED:
- if (TRACE_CONFIG) logerror("%s: Paged PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Paged PCB\n");
m_pcb = new ti99_paged_cartridge();
break;
case PCB_MINIMEM:
- if (TRACE_CONFIG) logerror("%s: Minimem PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Minimem PCB\n");
m_pcb = new ti99_minimem_cartridge();
break;
case PCB_SUPER:
- if (TRACE_CONFIG) logerror("%s: Superspace PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Superspace PCB\n");
m_pcb = new ti99_super_cartridge();
break;
case PCB_MBX:
- if (TRACE_CONFIG) logerror("%s: MBX PCB\n", tag());
+ if (TRACE_CONFIG) logerror("MBX PCB\n");
m_pcb = new ti99_mbx_cartridge();
break;
case PCB_PAGED379I:
- if (TRACE_CONFIG) logerror("%s: Paged379i PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Paged379i PCB\n");
m_pcb = new ti99_paged379i_cartridge();
break;
case PCB_PAGED378:
- if (TRACE_CONFIG) logerror("%s: Paged378 PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Paged378 PCB\n");
m_pcb = new ti99_paged378_cartridge();
break;
case PCB_PAGED377:
- if (TRACE_CONFIG) logerror("%s: Paged377 PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Paged377 PCB\n");
m_pcb = new ti99_paged377_cartridge();
break;
case PCB_PAGEDCRU:
- if (TRACE_CONFIG) logerror("%s: PagedCRU PCB\n", tag());
+ if (TRACE_CONFIG) logerror("PagedCRU PCB\n");
m_pcb = new ti99_pagedcru_cartridge();
break;
case PCB_GROMEMU:
- if (TRACE_CONFIG) logerror("%s: Grom Emulation PCB\n", tag());
+ if (TRACE_CONFIG) logerror("Grom Emulation PCB\n");
m_pcb = new ti99_gromemu_cartridge();
break;
}
@@ -1502,7 +1358,7 @@ bool ti99_cartridge_device::call_load()
void ti99_cartridge_device::call_unload()
{
- if (TRACE_CHANGE) logerror("%s: Unload\n", tag());
+ if (TRACE_CHANGE) logerror("Unload\n");
if (m_rpk != nullptr)
{
m_rpk->close(); // will write NVRAM contents
@@ -1521,7 +1377,7 @@ void ti99_cartridge_device::set_slot(int i)
bool ti99_cartridge_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry)
{
- if (TRACE_CONFIG) logerror("%s: swlist = %s, swname = %s\n", tag(), swlist.list_name(), swname);
+ if (TRACE_CONFIG) logerror("swlist = %s, swname = %s\n", swlist.list_name(), swname);
machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry);
m_softlist = true;
m_rpk = nullptr;
@@ -1633,7 +1489,7 @@ ti99_cartridge_pcb::ti99_cartridge_pcb()
m_ram_size(0),
m_rom_ptr(nullptr),
m_ram_ptr(nullptr),
- m_access_cartspace(false),
+ m_romspace_selected(false),
m_rom_page(0),
m_grom_ptr(nullptr),
m_grom_address(0),
@@ -1642,16 +1498,6 @@ ti99_cartridge_pcb::ti99_cartridge_pcb()
{
}
-// UINT16 ti99_cartridge_pcb::grom_base()
-// {
- // return m_cart->grom_base();
-// }
-//
-// UINT16 ti99_cartridge_pcb::grom_mask()
-// {
- // return m_cart->grom_mask();
-// }
-
void ti99_cartridge_pcb::set_cartridge(ti99_cartridge_device *cart)
{
m_cart = cart;
@@ -1686,7 +1532,7 @@ WRITE8_MEMBER(ti99_cartridge_pcb::gromwrite)
*/
READ8Z_MEMBER(ti99_cartridge_pcb::readz)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
if (m_rom_ptr!=nullptr)
{
@@ -1702,9 +1548,9 @@ READ8Z_MEMBER(ti99_cartridge_pcb::readz)
WRITE8_MEMBER(ti99_cartridge_pcb::write)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
- if (TRACE_ILLWRITE) space.device().logerror("%s: Cannot write to ROM space at %04x\n", tag(), offset);
+ if (TRACE_ILLWRITE) space.device().logerror("Cannot write to ROM space at %04x\n", offset);
}
else
{
@@ -1729,7 +1575,7 @@ void ti99_cartridge_pcb::set_grom_pointer(int number, device_t *dev)
WRITE_LINE_MEMBER( ti99_cartridge_pcb::romgq_line )
{
- m_access_cartspace = (state==ASSERT_LINE);
+ m_romspace_selected = (state==ASSERT_LINE);
}
// Propagate to all GROMs
@@ -1761,7 +1607,7 @@ WRITE_LINE_MEMBER(ti99_cartridge_pcb::gclock_in)
READ8Z_MEMBER(ti99_paged_cartridge::readz)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
*value = m_rom_ptr[(offset & 0x1fff) | (m_rom_page << 13)];
}
@@ -1774,7 +1620,7 @@ READ8Z_MEMBER(ti99_paged_cartridge::readz)
WRITE8_MEMBER(ti99_paged_cartridge::write)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
m_rom_page = (offset >> 1) & 1;
}
@@ -1795,7 +1641,7 @@ WRITE8_MEMBER(ti99_paged_cartridge::write)
/* Read function for the minimem cartridge. */
READ8Z_MEMBER(ti99_minimem_cartridge::readz)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
if ((offset & 0x1000)==0x0000)
{
@@ -1818,11 +1664,11 @@ READ8Z_MEMBER(ti99_minimem_cartridge::readz)
/* Write function for the minimem cartridge. */
WRITE8_MEMBER(ti99_minimem_cartridge::write)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
if ((offset & 0x1000)==0x0000)
{
- if (TRACE_ILLWRITE) space.device().logerror("%s: Write access to cartridge ROM at address %04x ignored", tag(), offset);
+ if (TRACE_ILLWRITE) space.device().logerror("Write access to cartridge ROM at address %04x ignored", offset);
}
else
{
@@ -1854,7 +1700,7 @@ WRITE8_MEMBER(ti99_minimem_cartridge::write)
/* Read function for the super cartridge. */
READ8Z_MEMBER(ti99_super_cartridge::readz)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
if (m_ram_ptr != nullptr)
{
@@ -1870,7 +1716,7 @@ READ8Z_MEMBER(ti99_super_cartridge::readz)
/* Write function for the super cartridge. */
WRITE8_MEMBER(ti99_super_cartridge::write)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
m_ram_ptr[(m_ram_page << 13) | (offset & 0x1fff)] = data;
}
@@ -1912,7 +1758,7 @@ READ8Z_MEMBER(ti99_super_cartridge::crureadz)
if ((offset & 0xfff0) == 0x0800)
{
- if (TRACE_CRU) space.device().logerror("%s: CRU accessed at %04x\n", tag(), offset);
+ if (TRACE_CRU) space.device().logerror("CRU accessed at %04x\n", offset);
UINT8 val = 0x02 << (m_ram_page << 1);
*value = (val >> ((offset - 0x0800)>>1)) & 0xff;
}
@@ -1922,7 +1768,7 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite)
{
if ((offset & 0xfff0) == 0x0800)
{
- if (TRACE_CRU) space.device().logerror("%s: CRU accessed at %04x\n", tag(), offset);
+ if (TRACE_CRU) space.device().logerror("CRU accessed at %04x\n", offset);
if (data != 0)
m_ram_page = (offset-0x0802)>>2;
}
@@ -1943,7 +1789,7 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite)
/* Read function for the mbx cartridge. */
READ8Z_MEMBER(ti99_mbx_cartridge::readz)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
if ((offset & 0x1c00)==0x0c00)
{
@@ -1968,7 +1814,7 @@ READ8Z_MEMBER(ti99_mbx_cartridge::readz)
/* Write function for the mbx cartridge. */
WRITE8_MEMBER(ti99_mbx_cartridge::write)
{
- if (m_access_cartspace)
+ if (m_romspace_selected)
{
if (offset == 0x6ffe)
{
@@ -2020,48 +1866,30 @@ WRITE8_MEMBER(ti99_mbx_cartridge::write)
The paged379i cartrige does not have any GROMs.
******************************************************************************/
-/*
- Determines which bank to set, depending on the size of the ROM. This is
- some magic code that actually represents different PCB versions.
-*/
-int ti99_paged379i_cartridge::get_paged379i_bank(int rompage)
-{
- int mask;
- if (m_rom_size > 16384)
- {
- if (m_rom_size > 32768)
- {
- if (m_rom_size > 65536)
- mask = 15;
- else
- mask = 7;
- }
- else
- mask = 3;
- }
- else
- mask = 1;
-
- return rompage & mask;
-}
-
-
/* Read function for the paged379i cartridge. */
READ8Z_MEMBER(ti99_paged379i_cartridge::readz)
{
- if ((offset & 0xe000)==0x6000)
+ if (m_romspace_selected)
*value = m_rom_ptr[(m_rom_page<<13) | (offset & 0x1fff)];
}
/* Write function for the paged379i cartridge. Only used to set the bank. */
WRITE8_MEMBER(ti99_paged379i_cartridge::write)
{
- // Bits: 0110 0000 000b bbbx
+ // Bits: 011x xxxx xxxb bbbx
// x = don't care, bbbb = bank
- if ((offset & 0xffe0)==0x6000)
+ if (m_romspace_selected)
{
- // Set bank
- m_rom_page = get_paged379i_bank(15 - ((offset>>1) & 15));
+ // This is emulation magic to automatically adapt to different ROM sizes
+
+ // Each block has 8 KiB. We assume that m_rom_size is a power of 2.
+ // Thus the number of blocks is also a power of 2.
+ // To get the required number of address lines, we just have to subtract 1.
+ // The SN74LS379 only has four flipflops, so we limit the lines to 4.
+ int mask = ((m_rom_size / 8192) - 1) & 0x0f;
+
+ // The page is determined by the inverted outputs.
+ m_rom_page = (~offset)>>1 & mask;
}
}
@@ -2074,25 +1902,22 @@ WRITE8_MEMBER(ti99_paged379i_cartridge::write)
The cartridge may also be used without GROM.
- The selection scheme is much simpler than in the 379i type.
-
******************************************************************************/
/* Read function for the paged378 cartridge. */
READ8Z_MEMBER(ti99_paged378_cartridge::readz)
{
- if ((offset & 0xe000)==0x6000)
+ if (m_romspace_selected)
*value = m_rom_ptr[(m_rom_page<<13) | (offset & 0x1fff)];
}
/* Write function for the paged378 cartridge. Only used to set the bank. */
WRITE8_MEMBER(ti99_paged378_cartridge::write)
{
- // Bits: 0110 0000 0bbb bbbx
+ // Bits: 011x xxxx xbbb bbbx
// x = don't care, bbbb = bank
- if ((offset & 0xff80)==0x6000)
+ if (m_romspace_selected)
{
- // Set bank
m_rom_page = ((offset >> 1)&0x003f);
}
}
@@ -2107,20 +1932,17 @@ WRITE8_MEMBER(ti99_paged378_cartridge::write)
/* Read function for the paged377 cartridge. */
READ8Z_MEMBER(ti99_paged377_cartridge::readz)
{
- if ((offset & 0xe000)==0x6000)
+ if (m_romspace_selected)
*value = m_rom_ptr[(m_rom_page<<13) | (offset & 0x1fff)];
}
/* Write function for the paged377 cartridge. Only used to set the bank. */
WRITE8_MEMBER(ti99_paged377_cartridge::write)
{
- // Bits: 0110 000b bbbb bbbx
+ // Bits: 011x xxxb bbbb bbbx
// x = don't care, bbbb = bank
- if ((offset & 0xfe00)==0x6000)
- {
- // Set bank
+ if (m_romspace_selected)
m_rom_page = ((offset >> 1)&0x00ff);
- }
}
/*****************************************************************************
@@ -2148,7 +1970,7 @@ WRITE8_MEMBER(ti99_paged377_cartridge::write)
/* Read function for the pagedcru cartridge. */
READ8Z_MEMBER(ti99_pagedcru_cartridge::readz)
{
- if ((offset & 0xe000)==0x6000)
+ if (m_romspace_selected)
*value = m_rom_ptr[(m_rom_page<<13) | (offset & 0x1fff)];
}
@@ -2289,7 +2111,7 @@ WRITE8_MEMBER(ti99_gromemu_cartridge::gromemuwrite)
// Accept low address byte (second write)
m_grom_address = (m_grom_address & 0xff00) | data;
m_waddr_LSB = false;
- if (TRACE_GROM) space.device().logerror("%s: Set grom address %04x\n", tag(), m_grom_address);
+ if (TRACE_GROM) space.device().logerror("Set GROM address %04x\n", m_grom_address);
}
else
{
@@ -2299,7 +2121,7 @@ WRITE8_MEMBER(ti99_gromemu_cartridge::gromemuwrite)
}
}
else {
- if (TRACE_ILLWRITE) space.device().logerror("%s: Ignoring write to GROM area at address %04x\n", tag(), m_grom_address);
+ if (TRACE_ILLWRITE) space.device().logerror("Ignoring write to GROM area at address %04x\n", m_grom_address);
}
}
@@ -2409,7 +2231,14 @@ void rpk::close()
{
if (socket->persistent_ram())
{
- image_battery_save_by_name(m_options, socket->get_pathname(), socket->get_contents(), socket->get_content_length());
+ // try to open the battery file and write it if possible
+ assert_always(socket->get_contents() && (socket->get_content_length() > 0), "Buffer is null or length is 0");
+
+ emu_file file(m_options.nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
+ osd_file::error filerr = file.open(socket->get_pathname());
+ if (filerr == osd_file::error::NONE)
+ file.write(socket->get_contents(), socket->get_content_length());
+
}
socket->cleanup();
socket = socket->m_next;
@@ -2590,7 +2419,19 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r
ram_pname = core_strdup(ram_pathname.c_str());
// load, and fill rest with 00
if (TRACE_RPK) printf("gromport/RPK: Loading NVRAM contents from '%s'\n", ram_pname);
- image_battery_load_by_name(options, ram_pname, contents, length, 0x00);
+
+ // Load the NVRAM contents
+ int bytes_read = 0;
+ assert_always(contents && (length > 0), "Buffer is null or length is 0");
+
+ // try to open the battery file and read it if possible
+ emu_file file(options.nvram_directory(), OPEN_FLAG_READ);
+ osd_file::error filerr = file.open(ram_pname);
+ if (filerr == osd_file::error::NONE)
+ bytes_read = file.read(contents, length);
+
+ // fill remaining bytes (if necessary)
+ memset(((char *) contents) + bytes_read, 0x00, length - bytes_read);
}
}
diff --git a/src/devices/bus/ti99x/gromport.h b/src/devices/bus/ti99x/gromport.h
index 8f49a7f98d4..dd6842300b3 100644
--- a/src/devices/bus/ti99x/gromport.h
+++ b/src/devices/bus/ti99x/gromport.h
@@ -104,10 +104,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(gclock_in);
bool is_available() { return m_pcb != nullptr; }
- bool has_grom();
void set_slot(int i);
- // UINT16 grom_base();
- // UINT16 grom_mask();
protected:
virtual void device_start() override { };
@@ -177,7 +174,7 @@ protected:
virtual void device_config_complete() override;
gromport_device* m_gromport;
- int m_gsel;
+ bool m_grom_selected;
};
/*
@@ -283,6 +280,7 @@ protected:
private:
int m_gk_switch[6]; // Used to cache the switch settings.
+ bool m_romspace_selected;
int m_ram_page;
int m_grom_address;
UINT8* m_ram_ptr;
@@ -323,8 +321,6 @@ protected:
DECLARE_WRITE8_MEMBER(gromwrite);
inline void set_grom_pointer(int number, device_t *dev);
void set_cartridge(ti99_cartridge_device *cart);
- // UINT16 grom_base();
- // UINT16 grom_mask();
const char* tag() { return m_tag; }
void set_tag(const char* tag) { m_tag = tag; }
@@ -336,7 +332,7 @@ protected:
UINT8* m_rom_ptr;
UINT8* m_ram_ptr;
- bool m_access_cartspace;
+ bool m_romspace_selected;
int m_rom_page; // for some cartridge types
UINT8* m_grom_ptr; // for gromemu
int m_grom_address; // for gromemu
diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h
index 15d67b00e53..097cbc994dd 100644
--- a/src/devices/bus/vic20/exp.h
+++ b/src/devices/bus/vic20/exp.h
@@ -57,7 +57,7 @@
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_VIC20_PASSTHRU_EXPANSION_SLOT_ADD(_tag) \
- MCFG_VIC20_EXPANSION_SLOT_ADD(_tag, 0, vic20_expansion_cards, NULL) \
+ MCFG_VIC20_EXPANSION_SLOT_ADD(_tag, 0, vic20_expansion_cards, nullptr) \
MCFG_VIC20_EXPANSION_SLOT_IRQ_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, vic20_expansion_slot_device, irq_w)) \
MCFG_VIC20_EXPANSION_SLOT_NMI_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, vic20_expansion_slot_device, nmi_w)) \
MCFG_VIC20_EXPANSION_SLOT_RES_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, vic20_expansion_slot_device, res_w))
diff --git a/src/devices/bus/vtech/ioexp/ioexp.h b/src/devices/bus/vtech/ioexp/ioexp.h
index c8ec78042d6..bd98a4aaeb1 100644
--- a/src/devices/bus/vtech/ioexp/ioexp.h
+++ b/src/devices/bus/vtech/ioexp/ioexp.h
@@ -38,7 +38,7 @@
#define MCFG_IOEXP_SLOT_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, IOEXP_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(ioexp_slot_carts, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(ioexp_slot_carts, nullptr, false)
//**************************************************************************
diff --git a/src/devices/bus/vtech/memexp/memexp.h b/src/devices/bus/vtech/memexp/memexp.h
index 9085c2ce6cb..1026ddb2bba 100644
--- a/src/devices/bus/vtech/memexp/memexp.h
+++ b/src/devices/bus/vtech/memexp/memexp.h
@@ -45,7 +45,7 @@
#define MCFG_MEMEXP_SLOT_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, MEMEXP_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(memexp_slot_carts, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(memexp_slot_carts, nullptr, false)
#define MCFG_MEMEXP_SLOT_INT_HANDLER(_devcb) \
devcb = &memexp_device::set_int_handler(*device, DEVCB_##_devcb);
diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp
index 55cf0b3ab65..3f169ae0ee5 100644
--- a/src/devices/cpu/adsp2100/adsp2100.cpp
+++ b/src/devices/cpu/adsp2100/adsp2100.cpp
@@ -637,7 +637,7 @@ void adsp21xx_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/alto2/a2roms.cpp b/src/devices/cpu/alto2/a2roms.cpp
index aa457024f78..ee46d12c0e5 100644
--- a/src/devices/cpu/alto2/a2roms.cpp
+++ b/src/devices/cpu/alto2/a2roms.cpp
@@ -43,10 +43,10 @@ static UINT32 log2_u32(UINT32 val)
/**
* @brief map a number of data or address lines using a lookup table
*
- * @param map pointer to an array of values, or NULL for default
+ * @param map pointer to an array of values, or nullptr for default
* @param lines number of data or address lines
* @param val value to map
- * @result returns the remapped value, or just val, if map was NULL
+ * @result returns the remapped value, or just val, if map was nullptr
*/
static UINT32 map_lines(const UINT8 *map, int lines, UINT32 val)
{
diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp
index 6f08253b425..5cf5c35512a 100644
--- a/src/devices/cpu/asap/asap.cpp
+++ b/src/devices/cpu/asap/asap.cpp
@@ -231,7 +231,7 @@ void asap_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index 6b2b19a2021..420c5ba86fa 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -875,7 +875,7 @@ void avr8_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp
index fa53c68807b..b47ba545a5e 100644
--- a/src/devices/cpu/cosmac/cosmac.cpp
+++ b/src/devices/cpu/cosmac/cosmac.cpp
@@ -403,7 +403,7 @@ void cosmac_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/drcbeut.cpp b/src/devices/cpu/drcbeut.cpp
index 356045fad3b..e4354dda517 100644
--- a/src/devices/cpu/drcbeut.cpp
+++ b/src/devices/cpu/drcbeut.cpp
@@ -92,7 +92,7 @@ void drc_hash_table::block_begin(drcuml_block &block, const uml::instruction *in
{
const uml::instruction &inst = instlist[inum];
- // if the opcode is a hash, verify that it makes sense and then set a NULL entry
+ // if the opcode is a hash, verify that it makes sense and then set a nullptr entry
if (inst.opcode() == OP_HASH)
{
assert(inst.numparams() == 2);
@@ -484,7 +484,7 @@ void drc_label_list::block_end(drcuml_block &block)
//-------------------------------------------------
// get_codeptr - find or allocate a new label;
-// returns NULL and requests an OOB callback if
+// returns nullptr and requests an OOB callback if
// undefined
//-------------------------------------------------
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index efd3a81614a..0abb6172025 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -230,7 +230,7 @@ void drcuml_state::symbol_add(void *base, UINT32 length, const char *name)
//-------------------------------------------------
// symbol_find - look up a symbol from the
-// internal symbol table or return NULL if not
+// internal symbol table or return nullptr if not
// found
//-------------------------------------------------
@@ -252,7 +252,7 @@ const char *drcuml_state::symbol_find(void *base, UINT32 *offset)
return cursym->m_name.c_str();
}
- // not found; return NULL
+ // not found; return nullptr
return nullptr;
}
@@ -502,7 +502,7 @@ const char *drcuml_block::get_comment_text(const instruction &inst, std::string
return comment.c_str();
}
- // everything else is NULL
+ // everything else is nullptr
return nullptr;
}
diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp
index a5e4b9b03b8..ac27d657fa1 100644
--- a/src/devices/cpu/dsp16/dsp16.cpp
+++ b/src/devices/cpu/dsp16/dsp16.cpp
@@ -197,7 +197,7 @@ void dsp16_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp
index dbd8e62aef7..f9a3907c8d0 100644
--- a/src/devices/cpu/dsp32/dsp32.cpp
+++ b/src/devices/cpu/dsp32/dsp32.cpp
@@ -301,7 +301,7 @@ void dsp32c_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/dsp56k/inst.h b/src/devices/cpu/dsp56k/inst.h
index b0b22e9e911..62e946b6ac1 100644
--- a/src/devices/cpu/dsp56k/inst.h
+++ b/src/devices/cpu/dsp56k/inst.h
@@ -1568,7 +1568,7 @@ public:
size_t accumulatorBitsModified() const override { return BM_HIGH | BM_MIDDLE | BM_LOW; }
};
-//static Jmp_2* JMP2 = new Jmp_2(NULL, 0x0000, 0x0000);
+//static Jmp_2* JMP2 = new Jmp_2(nullptr, 0x0000, 0x0000);
// JScc : 0000 0110 --01 cccc xxxx xxxx xxxx xxxx : A-112 //////////////////////
class Jscc: public Instruction
diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp
index 8103ce6f7c2..66567e35c2f 100644
--- a/src/devices/cpu/e132xs/e132xs.cpp
+++ b/src/devices/cpu/e132xs/e132xs.cpp
@@ -1825,7 +1825,7 @@ void hyperstone_device::device_stop()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/es5510/es5510.cpp b/src/devices/cpu/es5510/es5510.cpp
index 28be6e56f8b..721f3b222db 100644
--- a/src/devices/cpu/es5510/es5510.cpp
+++ b/src/devices/cpu/es5510/es5510.cpp
@@ -497,7 +497,7 @@ WRITE8_MEMBER(es5510_device::host_w)
case 0xc0: /* Write select - INSTR */
#if VERBOSE
- DESCRIBE_INSTR(buf, instr_latch, gpr[data], NULL, NULL, NULL, NULL);
+ DESCRIBE_INSTR(buf, instr_latch, gpr[data], nullptr, nullptr, nullptr, nullptr);
LOG(("%s",string_format("ES5510: Host Write INSTR %02x %012I64x: %s\n", data, instr_latch&U64(0xffffffffffff), buf).c_str()));
#endif
if (data < 0xa0) {
@@ -507,7 +507,7 @@ WRITE8_MEMBER(es5510_device::host_w)
case 0xe0: /* Write select - GPR + INSTR */
#if VERBOSE
- DESCRIBE_INSTR(buf, instr_latch, gpr_latch, NULL, NULL, NULL, NULL);
+ DESCRIBE_INSTR(buf, instr_latch, gpr_latch, nullptr, nullptr, nullptr, nullptr);
LOG(("%s",string_format("ES5510: Host Write INSTR+GPR %02x (%s): %012I64x %06x (%d): %s\n", data, REGNAME(data&0xff), instr_latch, gpr_latch, SX(gpr_latch), buf).c_str()));
#endif
if (data < 0xa0) {
@@ -700,7 +700,7 @@ void es5510_device::execute_run() {
#if VERBOSE_EXEC
char buf[1024];
- DESCRIBE_INSTR(buf, instr[pc], gpr[pc], NULL, NULL, NULL, NULL);
+ DESCRIBE_INSTR(buf, instr[pc], gpr[pc], nullptr, nullptr, nullptr, nullptr);
LOG_EXEC(("%s",string_format("EXECUTING %02x: %012I64x %06x %s\n", pc, instr[pc], gpr[pc]&0xffffff, buf).c_str()));
#endif
diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp
index 3a41297cefd..43c6590a05f 100644
--- a/src/devices/cpu/esrip/esrip.cpp
+++ b/src/devices/cpu/esrip/esrip.cpp
@@ -331,7 +331,7 @@ void esrip_device::device_stop()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp
index 37bd68c9d00..0d538e93616 100644
--- a/src/devices/cpu/g65816/g65816.cpp
+++ b/src/devices/cpu/g65816/g65816.cpp
@@ -736,7 +736,7 @@ void g65816_device::g65816_set_sp(unsigned val)
/* Get a register */
unsigned g65816_device::g65816_get_reg(int regnum)
{
- /* Set the function tables to emulation mode if the FTABLE is NULL */
+ /* Set the function tables to emulation mode if the FTABLE is nullptr */
if( FTABLE_GET_REG == nullptr )
g65816i_set_execution_mode(EXECUTION_MODE_E);
diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp
index fd7870d319f..da9470a91ae 100644
--- a/src/devices/cpu/hphybrid/hphybrid.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid.cpp
@@ -1,10 +1,31 @@
// license:BSD-3-Clause
// copyright-holders:F. Ulivi
+// I found 2 undocumented instructions in 5061-3001. First I noticed that PPU processor in
+// hp9845b emulator executed 2 unknown instructions at each keyboard interrupt whose opcodes
+// were 0x7026 & 0x7027.
+// I searched for a while for any kind of documentation about them but found nothing at all.
+// Some time later I found the mnemonics in the binary dump of assembly development option ROM:
+// CIM & SIM, respectively. From the mnemonic I deduced their function: Clear & Set Interrupt Mask.
+// I think they are basically used to temporarily disable/enable interrupt recognition inside
+// ISRs. This is consistent with their usage in PPU firmware and test ROM. The official EIR &
+// DIR instructions cannot be used while servicing an interrupt because they probably reset
+// the "in ISR" condition of the processor.
+// Using CIM&SIM only makes sense in low-level ISRs because high-level ones can't be interrupted
+// by anyone.
+// Now, I still have some doubts about the "polarity" of interrupt mask. Is interrupt
+// recognition disabled when the mask is cleared or is it the opposite?
+// I'm leaning towards the "no interrupts with mask cleared" interpretation, but I'm not 100%
+// convinced. CIM & SIM at the moment are implemented with this interpretation (see also
+// NO_ISR_WITH_IM_CLEARED macro below).
+
#include "emu.h"
#include "debugger.h"
#include "hphybrid.h"
+// Define this to have "IM cleared" == "No interrupt recognition"
+#define NO_ISR_WITH_IM_CLEARED
+
enum {
HPHYBRID_A,
HPHYBRID_B,
@@ -58,6 +79,7 @@ enum {
#define HPHYBRID_STS_BIT 13 // Status flag
#define HPHYBRID_FLG_BIT 14 // "Flag" flag
#define HPHYBRID_DC_BIT 15 // Decimal carry
+#define HPHYBRID_IM_BIT 16 // Interrupt mask
#define HPHYBRID_IV_MASK 0xfff0 // IV mask
@@ -512,6 +534,7 @@ UINT16 hp_hybrid_cpu_device::execute_one_sub(UINT16 opcode)
memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS);
m_pa_changed_func((UINT8)CURRENT_PA);
}
+ BIT_CLR(m_flags, HPHYBRID_IM_BIT);
}
tmp = RM(AEC_CASE_C , m_reg_R--) + (opcode & 0x1f);
return BIT(opcode , 5) ? tmp - 0x20 : tmp;
@@ -878,6 +901,21 @@ UINT16 hp_hybrid_cpu_device::get_skip_addr_sc(UINT16 opcode , UINT16& v , unsign
return get_skip_addr(opcode , val);
}
+UINT16 hp_hybrid_cpu_device::get_skip_addr_sc(UINT16 opcode , UINT32& v , unsigned n)
+{
+ bool val = BIT(v , n);
+
+ if (BIT(opcode , 7)) {
+ if (BIT(opcode , 6)) {
+ BIT_SET(v , n);
+ } else {
+ BIT_CLR(v , n);
+ }
+ }
+
+ return get_skip_addr(opcode , val);
+}
+
void hp_hybrid_cpu_device::do_pw(UINT16 opcode)
{
UINT16 tmp;
@@ -969,7 +1007,7 @@ void hp_hybrid_cpu_device::do_pw(UINT16 opcode)
void hp_hybrid_cpu_device::check_for_interrupts(void)
{
- if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) {
+ if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT) || BIT(m_flags , HPHYBRID_IM_BIT)) {
return;
}
@@ -979,6 +1017,9 @@ void hp_hybrid_cpu_device::check_for_interrupts(void)
// Service high-level interrupt
BIT_SET(m_flags , HPHYBRID_IRH_SVC_BIT);
irqline = HPHYBRID_IRH;
+ if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
+ logerror("H pre-empted L @ %06x\n" , m_genpc);
+ }
} else if (BIT(m_flags , HPHYBRID_IRL_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
// Service low-level interrupt
BIT_SET(m_flags , HPHYBRID_IRL_SVC_BIT);
@@ -1014,12 +1055,20 @@ void hp_hybrid_cpu_device::check_for_interrupts(void)
// lasts for 32 cycles
m_icount -= 32;
+ // Allow special processing in 5061-3001
+ enter_isr();
+
// Do a double-indirect JSM IV,I instruction
WM(AEC_CASE_C , ++m_reg_R , m_reg_P);
m_reg_P = RM(AEC_CASE_I , m_reg_IV + CURRENT_PA);
m_reg_I = fetch();
}
+void hp_hybrid_cpu_device::enter_isr(void)
+{
+ // Do nothing special
+}
+
void hp_hybrid_cpu_device::handle_dma(void)
{
// Patent hints at the fact that terminal count is detected by bit 15 of dmac being 1 after decrementing
@@ -1428,6 +1477,34 @@ UINT16 hp_5061_3001_cpu_device::execute_no_bpc_ioc(UINT16 opcode)
do_mpy();
break;
+ case 0x7026:
+ // CIM
+ // Undocumented instruction, see beginning of this file
+ // Probably "Clear Interrupt Mask"
+ // No idea at all about exec. time: make it 9 cycles
+ m_icount -= 9;
+#ifndef NO_ISR_WITH_IM_CLEARED
+ BIT_CLR(m_flags, HPHYBRID_IM_BIT);
+#else
+ BIT_SET(m_flags, HPHYBRID_IM_BIT);
+#endif
+ logerror("hp-5061-3001: CIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
+ break;
+
+ case 0x7027:
+ // SIM
+ // Undocumented instruction, see beginning of this file
+ // Probably "Set Interrupt Mask"
+ // No idea at all about exec. time: make it 9 cycles
+ m_icount -= 9;
+#ifndef NO_ISR_WITH_IM_CLEARED
+ BIT_SET(m_flags, HPHYBRID_IM_BIT);
+#else
+ BIT_CLR(m_flags, HPHYBRID_IM_BIT);
+#endif
+ logerror("hp-5061-3001: SIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
+ break;
+
default:
if ((opcode & 0xfec0) == 0x74c0) {
// SDS
@@ -1576,6 +1653,14 @@ void hp_5061_3001_cpu_device::write_non_common_reg(UINT16 addr , UINT16 v)
}
}
+void hp_5061_3001_cpu_device::enter_isr(void)
+{
+ // Set interrupt mask when entering an ISR
+#ifndef NO_ISR_WITH_IM_CLEARED
+ BIT_SET(m_flags, HPHYBRID_IM_BIT);
+#endif
+}
+
hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: hp_hybrid_cpu_device(mconfig, HP_5061_3011, "HP-5061-3011", tag, owner, clock, "5061-3011", 16)
{
diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h
index 97aea0febce..d61785cb146 100644
--- a/src/devices/cpu/hphybrid/hphybrid.h
+++ b/src/devices/cpu/hphybrid/hphybrid.h
@@ -109,7 +109,7 @@ protected:
virtual UINT16 execute_no_bpc_ioc(UINT16 opcode) = 0;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str) const override;
@@ -161,7 +161,7 @@ protected:
UINT16 m_reg_IV; // Register IV
UINT16 m_reg_W; // Register W
UINT8 m_reg_PA[ HPHYBRID_INT_LVLS + 1 ]; // Stack of register PA (4 bit-long)
- UINT16 m_flags; // Flags
+ UINT32 m_flags; // Flags
UINT8 m_dmapa; // DMA peripheral address (4 bits)
UINT16 m_dmama; // DMA address
UINT16 m_dmac; // DMA counter
@@ -179,8 +179,10 @@ private:
UINT32 get_ea(UINT16 opcode);
void do_add(UINT16& addend1 , UINT16 addend2);
UINT16 get_skip_addr_sc(UINT16 opcode , UINT16& v , unsigned n);
+ UINT16 get_skip_addr_sc(UINT16 opcode , UINT32& v , unsigned n);
void do_pw(UINT16 opcode);
void check_for_interrupts(void);
+ virtual void enter_isr(void);
void handle_dma(void);
UINT16 RIO(UINT8 pa , UINT8 ic);
@@ -225,6 +227,8 @@ private:
UINT16 m_reg_r26; // R26 register
UINT16 m_reg_r27; // R27 register
UINT16 m_reg_aec[ HP_REG_R37_ADDR - HP_REG_R32_ADDR + 1 ]; // AEC registers R32-R37
+
+ virtual void enter_isr(void) override;
};
class hp_5061_3011_cpu_device : public hp_hybrid_cpu_device
diff --git a/src/devices/cpu/hphybrid/hphybrid_dasm.cpp b/src/devices/cpu/hphybrid/hphybrid_dasm.cpp
index 48b03b4afb4..78b586f2310 100644
--- a/src/devices/cpu/hphybrid/hphybrid_dasm.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid_dasm.cpp
@@ -355,6 +355,9 @@ static const dis_entry_t dis_table_emc[] = {
{0xffff , 0x7b40 , "MRY" , param_none , 0 },
{0xffff , 0x7b61 , "MLY" , param_none , 0 },
{0xffff , 0x7b8f , "MPY" , param_none , 0 },
+ // *** Undocumented instructions of 5061-3001 ***
+ {0xffff , 0x7026 , "CIM" , param_none , 0 },
+ {0xffff , 0x7027 , "SIM" , param_none , 0 },
// *** END ***
{0 , 0 , nullptr , nullptr , 0 }
};
diff --git a/src/devices/cpu/i386/i386priv.h b/src/devices/cpu/i386/i386priv.h
index 0a471adfe36..3edf681744b 100644
--- a/src/devices/cpu/i386/i386priv.h
+++ b/src/devices/cpu/i386/i386priv.h
@@ -516,7 +516,7 @@ int i386_device::translate_address(int pl, int type, UINT32 *address, UINT32 *er
}
*address = (entry & 0xfffff000) | (*address & 0xfff);
#ifdef TEST_TLB
- int test_ret = i386_translate_address(type | TRANSLATE_DEBUG_MASK, &test_addr, NULL);
+ int test_ret = i386_translate_address(type | TRANSLATE_DEBUG_MASK, &test_addr, nullptr);
if(!test_ret || (test_addr != *address))
logerror("TLB-PTE mismatch! %06X %06X %06x\n", *address, test_addr, m_pc);
#endif
diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp
index e9f25118f6a..c0af31b82a5 100644
--- a/src/devices/cpu/i8008/i8008.cpp
+++ b/src/devices/cpu/i8008/i8008.cpp
@@ -134,7 +134,7 @@ void i8008_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/ie15/ie15.cpp b/src/devices/cpu/ie15/ie15.cpp
index 6adbc4feb6f..e48b836586d 100644
--- a/src/devices/cpu/ie15/ie15.cpp
+++ b/src/devices/cpu/ie15/ie15.cpp
@@ -82,7 +82,7 @@ void ie15_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp
index 9eeb643000b..fe50a7182c8 100644
--- a/src/devices/cpu/lc8670/lc8670.cpp
+++ b/src/devices/cpu/lc8670/lc8670.cpp
@@ -387,7 +387,7 @@ void lc8670_cpu_device::state_string_export(const device_state_entry &entry, std
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/lr35902/lr35902d.cpp b/src/devices/cpu/lr35902/lr35902d.cpp
index 3458c5094e6..a41b789eddd 100644
--- a/src/devices/cpu/lr35902/lr35902d.cpp
+++ b/src/devices/cpu/lr35902/lr35902d.cpp
@@ -201,7 +201,7 @@ CPU_DISASSEMBLE( lr35902 )
int pos = 0;
dst = buffer;
- //symbol = NULL;
+ //symbol = nullptr;
op = oprom[pos++];
op1 = 0; /* keep GCC happy */
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp
index 8e8e7a3eadb..3adef0173ba 100644
--- a/src/devices/cpu/m68000/m68kcpu.cpp
+++ b/src/devices/cpu/m68000/m68kcpu.cpp
@@ -598,18 +598,18 @@ const UINT8 m68ki_exception_cycle_table[7][256] =
const UINT8 m68ki_ea_idx_cycle_table[64] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, /* ..01.000 no memory indirect, base NULL */
- 5, /* ..01..01 memory indirect, base NULL, outer NULL */
- 7, /* ..01..10 memory indirect, base NULL, outer 16 */
- 7, /* ..01..11 memory indirect, base NULL, outer 32 */
+ 0, /* ..01.000 no memory indirect, base nullptr */
+ 5, /* ..01..01 memory indirect, base nullptr, outer nullptr */
+ 7, /* ..01..10 memory indirect, base nullptr, outer 16 */
+ 7, /* ..01..11 memory indirect, base nullptr, outer 32 */
0, 5, 7, 7, 0, 5, 7, 7, 0, 5, 7, 7,
2, /* ..10.000 no memory indirect, base 16 */
- 7, /* ..10..01 memory indirect, base 16, outer NULL */
+ 7, /* ..10..01 memory indirect, base 16, outer nullptr */
9, /* ..10..10 memory indirect, base 16, outer 16 */
9, /* ..10..11 memory indirect, base 16, outer 32 */
0, 7, 9, 9, 0, 7, 9, 9, 0, 7, 9, 9,
6, /* ..11.000 no memory indirect, base 32 */
- 11, /* ..11..01 memory indirect, base 32, outer NULL */
+ 11, /* ..11..01 memory indirect, base 32, outer nullptr */
13, /* ..11..10 memory indirect, base 32, outer 16 */
13, /* ..11..11 memory indirect, base 32, outer 32 */
0, 11, 13, 13, 0, 11, 13, 13, 0, 11, 13, 13
diff --git a/src/devices/cpu/m68000/m68kfpu.inc b/src/devices/cpu/m68000/m68kfpu.inc
index b5275bd314a..5c0d884311e 100644
--- a/src/devices/cpu/m68000/m68kfpu.inc
+++ b/src/devices/cpu/m68000/m68kfpu.inc
@@ -1991,7 +1991,7 @@ static int perform_fsave(m68000_base_device *m68k, UINT32 addr, int inc)
}
}
-// FRESTORE on a NULL frame reboots the FPU - all registers to NaN, the 3 status regs to 0
+// FRESTORE on a nullptr frame reboots the FPU - all registers to NaN, the 3 status regs to 0
static void do_frestore_null(m68000_base_device *m68k)
{
int i;
@@ -2005,8 +2005,8 @@ static void do_frestore_null(m68000_base_device *m68k)
REG_FP(m68k)[i].low = U64(0xffffffffffffffff);
}
- // Mac IIci at 408458e6 wants an FSAVE of a just-restored NULL frame to also be NULL
- // The PRM says it's possible to generate a NULL frame, but not how/when/why. (need the 68881/68882 manual!)
+ // Mac IIci at 408458e6 wants an FSAVE of a just-restored nullptr frame to also be nullptr
+ // The PRM says it's possible to generate a nullptr frame, but not how/when/why. (need the 68881/68882 manual!)
m68k->fpu_just_reset = 1;
}
@@ -2030,10 +2030,10 @@ static void m68040_do_frestore(m68000_base_device *m68k, UINT32 addr, int reg)
bool m40 = m68k->cpu_type & CPU_TYPE_040;
UINT32 temp = m68ki_read_32(m68k, addr);
- // check for NULL frame
+ // check for nullptr frame
if (temp & 0xff000000)
{
- // we don't handle non-NULL frames
+ // we don't handle non-nullptr frames
m68k->fpu_just_reset = 0;
if (reg != -1)
diff --git a/src/devices/cpu/m68000/m68kmake.cpp b/src/devices/cpu/m68000/m68kmake.cpp
index 941ae23f0aa..46d8a46832e 100644
--- a/src/devices/cpu/m68000/m68kmake.cpp
+++ b/src/devices/cpu/m68000/m68kmake.cpp
@@ -687,12 +687,12 @@ opcode_struct* find_illegal_opcode(void)
{
opcode_struct* op;
- for(op = g_opcode_input_table;op->name != NULL;op++)
+ for(op = g_opcode_input_table;op->name != nullptr;op++)
{
if(strcmp(op->name, "illegal") == 0)
return op;
}
- return NULL;
+ return nullptr;
}
#endif
diff --git a/src/devices/cpu/m6805/m6805.cpp b/src/devices/cpu/m6805/m6805.cpp
index 1ea1b7ccb03..9a7effe5c5c 100644
--- a/src/devices/cpu/m6805/m6805.cpp
+++ b/src/devices/cpu/m6805/m6805.cpp
@@ -474,7 +474,7 @@ void m6805_base_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp
index ce226e23739..d52fcb0fe40 100644
--- a/src/devices/cpu/m6809/m6809.cpp
+++ b/src/devices/cpu/m6809/m6809.cpp
@@ -282,7 +282,7 @@ void m6809_base_device::device_post_load()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h
index 6dc4252f706..3eae8a92427 100644
--- a/src/devices/cpu/mb88xx/mb88xx.h
+++ b/src/devices/cpu/mb88xx/mb88xx.h
@@ -56,7 +56,7 @@ enum
CPU_DISASSEMBLE( mb88 );
-// Configure 32 byte PLA, if NULL (default) assume direct output */
+// Configure 32 byte PLA, if nullptr (default) assume direct output */
#define MCFG_MB88_PLA(_pla) mb88_cpu_device::set_pla(*device, _pla);
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index b5b7cd0d390..efcda7dbfa5 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -791,7 +791,7 @@ void mips3_device::static_generate_exception(UINT8 exception, int recover, const
if ((PRINTF_EXCEPTIONS && exception != EXCEPTION_INTERRUPT && exception != EXCEPTION_SYSCALL) ||
(PRINTF_MMU && (exception == EXCEPTION_TLBLOAD || exception == EXCEPTION_TLBSTORE)))
{
- UML_CALLC(block, cfunc_printf_exception, this); // callc cfunc_printf_exception,NULL
+ UML_CALLC(block, cfunc_printf_exception, this); // callc cfunc_printf_exception,nullptr
}
/* choose our target PC */
diff --git a/src/devices/cpu/mips/r3000.cpp b/src/devices/cpu/mips/r3000.cpp
index f14c6adc93f..dce91379357 100644
--- a/src/devices/cpu/mips/r3000.cpp
+++ b/src/devices/cpu/mips/r3000.cpp
@@ -390,7 +390,7 @@ void r3000_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/patinhofeio/patinho_feio.h b/src/devices/cpu/patinhofeio/patinho_feio.h
index df80799d592..7057d318c30 100644
--- a/src/devices/cpu/patinhofeio/patinho_feio.h
+++ b/src/devices/cpu/patinhofeio/patinho_feio.h
@@ -88,7 +88,7 @@ protected:
virtual UINT32 execute_max_cycles() const override { return 2; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/pdp8/pdp8.cpp b/src/devices/cpu/pdp8/pdp8.cpp
index 2679c7e9205..84685e54636 100644
--- a/src/devices/cpu/pdp8/pdp8.cpp
+++ b/src/devices/cpu/pdp8/pdp8.cpp
@@ -116,7 +116,7 @@ void pdp8_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
@@ -126,7 +126,7 @@ const address_space_config *pdp8_device::memory_space_config(address_spacenum sp
{
return &m_program_config;
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/cpu/pic16c5x/dis16c5x.cpp b/src/devices/cpu/pic16c5x/dis16c5x.cpp
index 5b108310b5f..08c7f2657df 100644
--- a/src/devices/cpu/pic16c5x/dis16c5x.cpp
+++ b/src/devices/cpu/pic16c5x/dis16c5x.cpp
@@ -49,12 +49,12 @@ int main(int argc,char *argv[])
argv++; argc--;
if (argv[1])
{
- offset = strtol(argv[1],NULL,0);
+ offset = strtol(argv[1],nullptr,0);
argv++; argc--;
}
if (argv[1])
{
- length = strtol(argv[1],NULL,0);
+ length = strtol(argv[1],nullptr,0);
argv++; argc--;
}
@@ -68,14 +68,14 @@ int main(int argc,char *argv[])
length_to_dump = length;
printf("Starting from %d, dumping %d opcodes (word size)\n",offset,length/2);
Buffer = calloc((filelength+1),sizeof(char));
- if (Buffer==NULL)
+ if (Buffer==nullptr)
{
printf("Out of Memory !!!");
fclose(F);
exit(3);
}
String_Output = calloc(80,sizeof(char));
- if (String_Output==NULL)
+ if (String_Output==nullptr)
{
printf("Out of Memory !!!");
free(Buffer);
diff --git a/src/devices/cpu/pic16c62x/dis16c62x.cpp b/src/devices/cpu/pic16c62x/dis16c62x.cpp
index c87acd87018..1fb91304dd2 100644
--- a/src/devices/cpu/pic16c62x/dis16c62x.cpp
+++ b/src/devices/cpu/pic16c62x/dis16c62x.cpp
@@ -51,12 +51,12 @@ int main(int argc,char *argv[])
argv++; argc--;
if (argv[1])
{
- offset = strtol(argv[1],NULL,0);
+ offset = strtol(argv[1],nullptr,0);
argv++; argc--;
}
if (argv[1])
{
- length = strtol(argv[1],NULL,0);
+ length = strtol(argv[1],nullptr,0);
argv++; argc--;
}
@@ -70,14 +70,14 @@ int main(int argc,char *argv[])
length_to_dump = length;
printf("Starting from %d, dumping %d opcodes (word size)\n",offset,length/2);
Buffer = calloc((filelength+1),sizeof(char));
- if (Buffer==NULL)
+ if (Buffer==nullptr)
{
printf("Out of Memory !!!");
fclose(F);
exit(3);
}
String_Output = calloc(80,sizeof(char));
- if (String_Output==NULL)
+ if (String_Output==nullptr)
{
printf("Out of Memory !!!");
free(Buffer);
diff --git a/src/devices/cpu/psx/dismips.cpp b/src/devices/cpu/psx/dismips.cpp
index 76f67fba2cf..7a98fe5dfa7 100644
--- a/src/devices/cpu/psx/dismips.cpp
+++ b/src/devices/cpu/psx/dismips.cpp
@@ -84,7 +84,7 @@ int main( int argc, char *argv[] )
UINT32 format;
UINT32 cpu;
- filename = NULL;
+ filename = nullptr;
begin = 0;
end = 0xffffffff;
format = FORMAT_BIN;
@@ -293,11 +293,11 @@ int main( int argc, char *argv[] )
switch( cpu )
{
case CPU_PSX:
- i = DasmPSXCPU( NULL, buffer, pc + offset, filebuf + pc );
+ i = DasmPSXCPU( nullptr, buffer, pc + offset, filebuf + pc );
break;
case CPU_R3000:
{
- legacy_cpu_device *device = NULL;
+ legacy_cpu_device *device = nullptr;
int options = 0;
UINT8 *opram = filebuf + pc;
UINT8 *oprom = opram;
diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp
index a10b5320996..e20726b0337 100644
--- a/src/devices/cpu/score/score.cpp
+++ b/src/devices/cpu/score/score.cpp
@@ -149,7 +149,7 @@ void score7_cpu_device::state_string_export(const device_state_entry &entry, std
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/ssem/ssem.cpp b/src/devices/cpu/ssem/ssem.cpp
index bb2d4683ef2..3f67e18de5f 100644
--- a/src/devices/cpu/ssem/ssem.cpp
+++ b/src/devices/cpu/ssem/ssem.cpp
@@ -130,7 +130,7 @@ void ssem_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp
index 3719154174f..1ee24461666 100644
--- a/src/devices/cpu/tlcs90/tlcs90.cpp
+++ b/src/devices/cpu/tlcs90/tlcs90.cpp
@@ -24,6 +24,7 @@ ALLOW_SAVE_TYPE(tlcs90_device::e_mode); // allow save_item on a non-fundamental
const device_type TMP90840 = &device_creator<tmp90840_device>;
const device_type TMP90841 = &device_creator<tmp90841_device>;
+const device_type TMP90845 = &device_creator<tmp90845_device>;
const device_type TMP91640 = &device_creator<tmp91640_device>;
const device_type TMP91641 = &device_creator<tmp91641_device>;
@@ -71,6 +72,12 @@ tmp90841_device::tmp90841_device(const machine_config &mconfig, const char *tag,
{
}
+tmp90845_device::tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tlcs90_device(mconfig, TMP90841, "TMP90845", tag, owner, clock, "tmp90845", __FILE__, ADDRESS_MAP_NAME(tmp90841_mem))
+{
+}
+
+
tmp91640_device::tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: tlcs90_device(mconfig, TMP91640, "TMP91640", tag, owner, clock, "tmp91640", __FILE__, ADDRESS_MAP_NAME(tmp91640_mem))
diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h
index 42a7e5f5c08..35c5cc15c77 100644
--- a/src/devices/cpu/tlcs90/tlcs90.h
+++ b/src/devices/cpu/tlcs90/tlcs90.h
@@ -157,6 +157,13 @@ public:
};
+class tmp90845_device : public tlcs90_device
+{
+public:
+ // construction/destruction
+ tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
class tmp91640_device : public tlcs90_device
{
public:
@@ -175,6 +182,7 @@ public:
extern const device_type TMP90840;
extern const device_type TMP90841;
+extern const device_type TMP90845;
extern const device_type TMP91640;
extern const device_type TMP91641;
diff --git a/src/devices/cpu/tms32010/dis32010.cpp b/src/devices/cpu/tms32010/dis32010.cpp
index 430a56b1744..681c83f8891 100644
--- a/src/devices/cpu/tms32010/dis32010.cpp
+++ b/src/devices/cpu/tms32010/dis32010.cpp
@@ -49,12 +49,12 @@ int main(int argc,char *argv[])
argv++; argc--;
if (argv[1])
{
- offset = strtol(argv[1],NULL,0);
+ offset = strtol(argv[1],nullptr,0);
argv++; argc--;
}
if (argv[1])
{
- length = strtol(argv[1],NULL,0);
+ length = strtol(argv[1],nullptr,0);
argv++; argc--;
}
@@ -68,14 +68,14 @@ int main(int argc,char *argv[])
length_to_dump = length;
printf("Starting from %d, dumping %d opcodes (word size)\n",offset,length/2);
Buffer = calloc((filelength+1),sizeof(char));
- if (Buffer==NULL)
+ if (Buffer==nullptr)
{
printf("Out of Memory !!!");
fclose(F);
exit(3);
}
String_Output = calloc(80,sizeof(char));
- if (String_Output==NULL)
+ if (String_Output==nullptr)
{
printf("Out of Memory !!!");
free(Buffer);
diff --git a/src/devices/cpu/tms32025/dis32025.cpp b/src/devices/cpu/tms32025/dis32025.cpp
index 212c5339627..6df4b92707a 100644
--- a/src/devices/cpu/tms32025/dis32025.cpp
+++ b/src/devices/cpu/tms32025/dis32025.cpp
@@ -50,12 +50,12 @@ int main(int argc,char *argv[])
argv++; argc--;
if (argv[1])
{
- offset = strtol(argv[1],NULL,0);
+ offset = strtol(argv[1],nullptr,0);
argv++; argc--;
}
if (argv[1])
{
- length = strtol(argv[1],NULL,0);
+ length = strtol(argv[1],nullptr,0);
argv++; argc--;
}
@@ -69,14 +69,14 @@ int main(int argc,char *argv[])
length_to_dump = length;
printf("Starting from %d, dumping %d opcodes (word size)\n",offset,length/2);
Buffer = calloc((filelength+1),sizeof(char));
- if (Buffer==NULL)
+ if (Buffer==nullptr)
{
printf("Out of Memory !!!");
fclose(F);
exit(3);
}
String_Output = calloc(80,sizeof(char));
- if (String_Output==NULL)
+ if (String_Output==nullptr)
{
printf("Out of Memory !!!");
free(Buffer);
diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp
index cf7b457036d..692166b474a 100644
--- a/src/devices/cpu/tms32031/tms32031.cpp
+++ b/src/devices/cpu/tms32031/tms32031.cpp
@@ -462,7 +462,7 @@ void tms3203x_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/tms9900/99xxcore.h b/src/devices/cpu/tms9900/99xxcore.h
index 9bc68f30c26..6af39f91141 100644
--- a/src/devices/cpu/tms9900/99xxcore.h
+++ b/src/devices/cpu/tms9900/99xxcore.h
@@ -535,7 +535,7 @@ struct tms99xx_state
static inline tms99xx_state *get_safe_token(device_t *device)
{
- assert(device != NULL);
+ assert(device != nullptr);
// assert(device->type() == TMS99XX_GET_INFO);
return (tms99xx_state *)downcast<legacy_cpu_device *>(device)->token();
}
@@ -1798,18 +1798,18 @@ static CPU_INIT( tms99xx )
cpustate->timer = device->machine().scheduler().timer_alloc(FUNC(decrementer_callback), cpustate);
#endif
- cpustate->idle_callback = param ? param->idle_callback : NULL;
+ cpustate->idle_callback = param ? param->idle_callback : nullptr;
#if (TMS99XX_MODEL == TI990_10_ID)
- cpustate->rset_callback = param ? param->rset_callback : NULL;
- cpustate->lrex_callback = param ? param->lrex_callback : NULL;
- cpustate->ckon_ckof_callback = param ? param->ckon_ckof_callback : NULL;
+ cpustate->rset_callback = param ? param->rset_callback : nullptr;
+ cpustate->lrex_callback = param ? param->lrex_callback : nullptr;
+ cpustate->ckon_ckof_callback = param ? param->ckon_ckof_callback : nullptr;
- cpustate->error_interrupt_callback = param ? param->error_interrupt_callback : NULL;
+ cpustate->error_interrupt_callback = param ? param->error_interrupt_callback : nullptr;
#endif
#if (TMS99XX_MODEL == TMS9995_ID)
/* we can ask at reset time that the CPU always generates one wait state automatically */
- if (param == NULL)
+ if (param == nullptr)
{ /* if no param, the default is currently "wait state added" */
cpustate->memory_wait_states_byte = 4;
cpustate->memory_wait_states_word = 12;
@@ -5133,7 +5133,7 @@ static CPU_SET_INFO( tms99xx )
void TMS99XX_GET_INFO(legacy_cpu_device *device, UINT32 state, cpuinfo *info)
{
- tms99xx_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
+ tms99xx_state *cpustate = (device != nullptr && device->token() != nullptr) ? get_safe_token(device) : nullptr;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
@@ -5261,7 +5261,7 @@ void TMS99XX_GET_INFO(legacy_cpu_device *device, UINT32 state, cpuinfo *info)
case CPUINFO_FCT_RESET: info->reset = CPU_RESET_NAME(tms99xx); break;
case CPUINFO_FCT_EXIT: info->exit = CPU_EXIT_NAME(tms99xx); break;
case CPUINFO_FCT_EXECUTE: info->execute = CPU_EXECUTE_NAME(tms99xx); break;
- case CPUINFO_FCT_BURN: info->burn = NULL; break;
+ case CPUINFO_FCT_BURN: info->burn = nullptr; break;
case CPUINFO_FCT_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(tms99xx); break;
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break;
diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp
index a3913e3f6c1..5641743ffb7 100644
--- a/src/devices/cpu/upd7725/upd7725.cpp
+++ b/src/devices/cpu/upd7725/upd7725.cpp
@@ -167,7 +167,7 @@ void necdsp_device::device_reset()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or NULL if
+// of the specified address space, or nullptr if
// the space doesn't exist
//-------------------------------------------------
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index 8d30ae2df3d..c95ec17610d 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -76,7 +76,7 @@
* Changes in 2.6:
* - BUSY_LOOP_HACKS needed to call change_pc() earlier, before
* checking the opcodes at the new address, because otherwise they
- * might access the old (wrong or even NULL) banked memory region.
+ * might access the old (wrong or even nullptr) banked memory region.
* Thanks to Sean Young for finding this nasty bug.
* Changes in 2.5:
* - Burning cycles always adjusts the ICount by a multiple of 4.
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index a6c1fe6a244..f777d872426 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -36,7 +36,7 @@
const floppy_format_type _member [] = {
#define FLOPPY_FORMATS_END0 \
, \
- NULL };
+ nullptr };
#define FLOPPY_FORMATS_END \
, \
FLOPPY_D88_FORMAT, \
diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp
index 08536344849..d1cdfcd1835 100644
--- a/src/devices/machine/corvushd.cpp
+++ b/src/devices/machine/corvushd.cpp
@@ -1222,7 +1222,7 @@ void corvus_hdc_t::device_timer(emu_timer &timer, device_timer_id id, int param,
// Nothing
//
// Returns:
-// NULL if there's no file to attach to
+// nullptr if there's no file to attach to
//
void corvus_hdc_t::device_start() {
m_status &= ~(CONTROLLER_DIRECTION | CONTROLLER_BUSY); // Host-to-controller mode, Idle (awaiting command from Host mode)
diff --git a/src/devices/machine/cs4031.cpp b/src/devices/machine/cs4031.cpp
index b6d8de1acd8..4331747e506 100644
--- a/src/devices/machine/cs4031.cpp
+++ b/src/devices/machine/cs4031.cpp
@@ -125,7 +125,7 @@ static MACHINE_CONFIG_FRAGMENT( cs4031 )
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(cs4031_device, dma2_dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(cs4031_device, dma2_dack3_w))
MCFG_PIC8259_ADD("intc1", WRITELINE(cs4031_device, intc1_int_w), VCC, READ8(cs4031_device, intc1_slave_ack_r))
- MCFG_PIC8259_ADD("intc2", DEVWRITELINE("intc1", pic8259_device, ir2_w), GND, NULL)
+ MCFG_PIC8259_ADD("intc2", DEVWRITELINE("intc1", pic8259_device, ir2_w), GND, NOOP)
MCFG_DEVICE_ADD("ctc", PIT8254, 0)
MCFG_PIT8253_CLK0(XTAL_14_31818MHz / 12)
diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp
index a363c0d75aa..978683d7ab5 100644
--- a/src/devices/machine/genpc.cpp
+++ b/src/devices/machine/genpc.cpp
@@ -418,7 +418,7 @@ static MACHINE_CONFIG_FRAGMENT( ibm5160_mb_config )
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(ibm5160_mb_device, pc_dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(ibm5160_mb_device, pc_dack3_w))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE(":maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE(":maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(READ8(ibm5160_mb_device, pc_ppi_porta_r))
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp
index 126741f3730..4c096af6a3e 100644
--- a/src/devices/machine/gt64xxx.cpp
+++ b/src/devices/machine/gt64xxx.cpp
@@ -34,7 +34,7 @@ gt64xxx_device::gt64xxx_device(const machine_config &mconfig, const char *tag, d
const address_space_config *gt64xxx_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? pci_bridge_device::memory_space_config(spacenum) : (spacenum == AS_DATA) ? &m_mem_config : (spacenum == AS_IO) ? &m_io_config : NULL;
+ return (spacenum == AS_PROGRAM) ? pci_bridge_device::memory_space_config(spacenum) : (spacenum == AS_DATA) ? &m_mem_config : (spacenum == AS_IO) ? &m_io_config : nullptr;
}
void gt64xxx_device::device_start()
diff --git a/src/devices/machine/i80130.cpp b/src/devices/machine/i80130.cpp
index fb419a06090..fee62312f7e 100644
--- a/src/devices/machine/i80130.cpp
+++ b/src/devices/machine/i80130.cpp
@@ -98,7 +98,7 @@ const rom_entry *i80130_device::device_rom_region() const
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( i80130 )
- MCFG_PIC8259_ADD("pic", DEVWRITELINE(DEVICE_SELF, i80130_device, irq_w), VCC, NULL)
+ MCFG_PIC8259_ADD("pic", DEVWRITELINE(DEVICE_SELF, i80130_device, irq_w), VCC, NOOP)
MCFG_DEVICE_ADD("pit", PIT8254, 0)
MCFG_PIT8253_CLK0(0)
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index c550a9f61aa..7da9dbc94f3 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -66,7 +66,7 @@ enum laserdisc_field_code
#define MCFG_LASERDISC_OVERLAY_STATIC(_width, _height, _func) \
laserdisc_device::static_set_overlay(*device, _width, _height, screen_update_delegate_smart(&screen_update_##_func, "screen_update_" #_func));
#define MCFG_LASERDISC_OVERLAY_DRIVER(_width, _height, _class, _method) \
- laserdisc_device::static_set_overlay(*device, _width, _height, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, NULL));
+ laserdisc_device::static_set_overlay(*device, _width, _height, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, nullptr));
#define MCFG_LASERDISC_OVERLAY_DEVICE(_width, _height, _device, _class, _method) \
laserdisc_device::static_set_overlay(*device, _width, _height, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, _device));
#define MCFG_LASERDISC_OVERLAY_CLIP(_minx, _maxx, _miny, _maxy) \
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 00b1e3ad352..a5a71ae2318 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -34,7 +34,7 @@
MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_OUTPUT, 0) \
netlist_mame_analog_output_t::static_set_params(*device, _IN, \
netlist_analog_output_delegate(& _class :: _member, \
- # _class "::" # _member, _class_tag, (_class *) 0) );
+ # _class "::" # _member, _class_tag, (_class *)nullptr) );
#define MCFG_NETLIST_LOGIC_INPUT(_basetag, _tag, _name, _shift, _mask) \
MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_LOGIC_INPUT, 0) \
diff --git a/src/devices/machine/nvram.h b/src/devices/machine/nvram.h
index c1a733a3953..1d509882cf0 100644
--- a/src/devices/machine/nvram.h
+++ b/src/devices/machine/nvram.h
@@ -33,7 +33,7 @@
nvram_device::static_set_default_value(*device, nvram_device::DEFAULT_NONE);
#define MCFG_NVRAM_ADD_CUSTOM_DRIVER(_tag, _class, _method) \
MCFG_DEVICE_ADD(_tag, NVRAM, 0) \
- nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_NVRAM_REPLACE_0FILL(_tag) \
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
@@ -46,7 +46,7 @@
nvram_device::static_set_default_value(*device, nvram_device::DEFAULT_RANDOM);
#define MCFG_NVRAM_REPLACE_CUSTOM_DRIVER(_tag, _class, _method) \
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
- nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
//**************************************************************************
diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp
index 4a882d12a04..af947a482a9 100644
--- a/src/devices/machine/pdc.cpp
+++ b/src/devices/machine/pdc.cpp
@@ -280,7 +280,7 @@ static MACHINE_CONFIG_FRAGMENT( pdc )
/* Hard Disk Controller - HDC9224 */
MCFG_DEVICE_ADD(HDC_TAG, HDC9224, 0)
- MCFG_MFM_HARDDISK_CONN_ADD("h1", pdc_harddisks, NULL, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT)
+ MCFG_MFM_HARDDISK_CONN_ADD("h1", pdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT)
MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h
index 8fbe85cd865..73e7430a6ce 100644
--- a/src/devices/machine/ram.h
+++ b/src/devices/machine/ram.h
@@ -31,7 +31,7 @@
#define MCFG_RAM_MODIFY(_tag) \
MCFG_DEVICE_MODIFY(_tag) \
- ram_device::static_set_extra_options(*device, NULL);
+ ram_device::static_set_extra_options(*device, nullptr);
#define MCFG_RAM_DEFAULT_SIZE(_default_size) \
ram_device::static_set_default_size(*device, _default_size);
diff --git a/src/devices/machine/rtc65271.h b/src/devices/machine/rtc65271.h
index 903f5fe9a28..eb97ef6a778 100644
--- a/src/devices/machine/rtc65271.h
+++ b/src/devices/machine/rtc65271.h
@@ -62,7 +62,7 @@ private:
emu_timer *m_SQW_timer;
UINT8 m_SQW_internal_state;
- /* callback called when interrupt pin state changes (may be NULL) */
+ /* callback called when interrupt pin state changes (may be nullptr) */
devcb_write_line m_interrupt_cb;
};
diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp
index 6b7e0225dfa..6ce2e2f275f 100644
--- a/src/devices/machine/smpc.cpp
+++ b/src/devices/machine/smpc.cpp
@@ -364,11 +364,18 @@ TIMER_CALLBACK_MEMBER( saturn_state::stv_smpc_intback )
- ID first controller, followed by the number of reads needed by the plugged controller
- ID second controller, followed by the number of reads needed by the plugged controller
- and so on... until the 4th (for SegaTap) or 6th (for Multitap) controller is read
+ TODO: how does the multitap check if a controller is connected? does it ask for the
+ controller status of each subport? how does this work exactly?
+ currently, there is a small problem in some specific controller config which seems to
+ lose track of one controller. E.g. if I put multitap in port2 with inserted joy1, joy2 and joy4
+ it does not see joy4 controller, but if I put joy1, joy2, joy4 and joy5 it sees
+ all four of them. The same happens if I skip controllers with id = 0xff...
+ how did a real unit behave in this case?
*/
TIMER_CALLBACK_MEMBER( saturn_state::intback_peripheral )
{
- // if (LOG_SMPC) logerror("SMPC: providing PAD data for intback, pad %d\n", intback_stage-2);
+// if (LOG_SMPC) logerror("SMPC: providing PAD data for intback, pad %d\n", intback_stage-2);
// doesn't work?
//pad_num = m_smpc.intback_stage - 1;
diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp
index 5ec8fb7c95f..c41f4ad508b 100644
--- a/src/devices/machine/stvcd.cpp
+++ b/src/devices/machine/stvcd.cpp
@@ -258,7 +258,7 @@ void saturn_state::cd_exec_command( void )
#endif
/* reset CD device connection */
- //cddevice = (filterT *)NULL;
+ //cddevice = (filterT *)nullptr;
}
hirqreg |= (CMOK|ESEL);
@@ -1179,7 +1179,7 @@ void saturn_state::cd_exec_command( void )
//deallocate the src blocks
//partitions[src_filter].size -= partitions[src_filter].blocks[i]->size;
//cd_free_block(partitions[src_filter].blocks[i]);
- //partitions[src_filter].blocks[i] = (blockT *)NULL;
+ //partitions[src_filter].blocks[i] = (blockT *)nullptr;
//partitions[src_filter].bnum[i] = 0xff;
}
diff --git a/src/devices/machine/wd7600.cpp b/src/devices/machine/wd7600.cpp
index e7ff002ddec..90ed0d9ef73 100644
--- a/src/devices/machine/wd7600.cpp
+++ b/src/devices/machine/wd7600.cpp
@@ -51,7 +51,7 @@ static MACHINE_CONFIG_FRAGMENT( wd7600 )
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(wd7600_device, dma2_dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(wd7600_device, dma2_dack3_w))
MCFG_PIC8259_ADD("intc1", WRITELINE(wd7600_device, pic1_int_w), VCC, READ8(wd7600_device, pic1_slave_ack_r))
- MCFG_PIC8259_ADD("intc2", DEVWRITELINE("intc1", pic8259_device, ir2_w), GND, NULL)
+ MCFG_PIC8259_ADD("intc2", DEVWRITELINE("intc1", pic8259_device, ir2_w), GND, NOOP)
MCFG_DEVICE_ADD("ctc", PIT8254, 0)
MCFG_PIT8253_CLK0(XTAL_14_31818MHz / 12)
diff --git a/src/devices/machine/z80ctc.h b/src/devices/machine/z80ctc.h
index a144ff013d4..87e0011fdfa 100644
--- a/src/devices/machine/z80ctc.h
+++ b/src/devices/machine/z80ctc.h
@@ -120,7 +120,7 @@ private:
devcb_write_line m_zc0_cb; // channel 0 zero crossing callbacks
devcb_write_line m_zc1_cb; // channel 1 zero crossing callbacks
devcb_write_line m_zc2_cb; // channel 2 zero crossing callbacks
- devcb_write_line m_zc3_cb; // channel 3 zero crossing callbacks = NULL ?
+ devcb_write_line m_zc3_cb; // channel 3 zero crossing callbacks = nullptr ?
UINT8 m_vector; // interrupt vector
attotime m_period16; // 16/system clock
diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp
index 0442f5811ff..4e1b4d5fd40 100644
--- a/src/devices/sound/aica.cpp
+++ b/src/devices/sound/aica.cpp
@@ -414,7 +414,7 @@ void aica_device::Init()
m_MidiOutR=m_MidiOutW=0;
// get AICA RAM
- if (m_ram_region != NULL)
+ if (m_ram_region != nullptr)
{
m_AICARAM = m_ram_region->base();
m_AICARAM += m_roffset;
diff --git a/src/devices/sound/aicadsp.cpp b/src/devices/sound/aicadsp.cpp
index 08cb0702e44..816c0e78254 100644
--- a/src/devices/sound/aicadsp.cpp
+++ b/src/devices/sound/aicadsp.cpp
@@ -83,7 +83,7 @@ void aica_dsp_step(AICADSP *DSP)
memset(DSP->EFREG,0,2*16);
#if 0
int dump=0;
- FILE *f=NULL;
+ FILE *f=nullptr;
if(dump)
f=fopen("dsp.txt","wt");
#endif
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp
index 350ba6f047b..3e3efc193cb 100644
--- a/src/devices/sound/c140.cpp
+++ b/src/devices/sound/c140.cpp
@@ -113,7 +113,7 @@ void c140_device::device_start()
m_stream = stream_alloc(0, 2, m_sample_rate);
- if (m_rom_ptr != NULL)
+ if (m_rom_ptr != nullptr)
{
m_pRom = m_rom_ptr;
}
diff --git a/src/devices/sound/disc_mth.h b/src/devices/sound/disc_mth.h
index 0e550739a53..bbe71e30f52 100644
--- a/src/devices/sound/disc_mth.h
+++ b/src/devices/sound/disc_mth.h
@@ -174,7 +174,7 @@ DISCRETE_CLASS_STEP_RESET(dst_mixer, 1,
int m_r_node_bit_flag;
int m_c_bit_flag;
double m_r_total;
- const double * m_r_node[DISC_MIXER_MAX_INPS]; /* Either pointer to resistance node output OR NULL */
+ const double * m_r_node[DISC_MIXER_MAX_INPS]; /* Either pointer to resistance node output OR nullptr */
double m_r_last[DISC_MIXER_MAX_INPS];
double m_exponent_rc[DISC_MIXER_MAX_INPS]; /* For high pass filtering cause by cIn */
double m_v_cap[DISC_MIXER_MAX_INPS]; /* cap voltage of each input */
diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp
index e15e033a0fa..a2232bc9f44 100644
--- a/src/devices/sound/discrete.cpp
+++ b/src/devices/sound/discrete.cpp
@@ -1034,7 +1034,7 @@ void discrete_sound_device::device_reset()
//
// input / output buffers are stream_sample_t
// to not to have to convert the buffers.
-// a "discrete cpu" device will pass NULL here
+// a "discrete cpu" device will pass nullptr here
//-------------------------------------------------
void discrete_device::process(int samples)
diff --git a/src/devices/sound/discrete.h b/src/devices/sound/discrete.h
index ac20e25cfab..1ebb8f12e9a 100644
--- a/src/devices/sound/discrete.h
+++ b/src/devices/sound/discrete.h
@@ -1904,7 +1904,7 @@
* ...,
* address of v_junction table)
*
- * v_junction table can be set to NULL if you want all diodes to
+ * v_junction table can be set to nullptr if you want all diodes to
* default to a 0.5V drop. Otherwise use a
* table of doubles to specify juntion voltages.
*
@@ -4531,7 +4531,7 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_
#define DSC_SND_ENTRY(_nod, _class, _dss, _num, _iact, _iinit, _custom, _name) { _nod, &discrete_create_node< DISCRETE_CLASS_NAME(_class) >, _dss, _num, _iact, _iinit, _custom, _name, # _class }
-#define DISCRETE_SOUND_END DSC_SND_ENTRY( NODE_00, special, DSS_NULL , 0, DSE( NODE_NC ), DSE( 0 ) ,NULL ,"DISCRETE_SOUND_END" ) };
+#define DISCRETE_SOUND_END DSC_SND_ENTRY( NODE_00, special, DSS_NULL , 0, DSE( NODE_NC ), DSE( 0 ) ,nullptr ,"DISCRETE_SOUND_END" ) };
#define DSE( ... ) { __VA_ARGS__ }
/* Module Name out, enum value, #in, {variable inputs}, {static inputs}, data pointer, "name" */
@@ -4539,33 +4539,33 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_
/* from disc_inp.inc */
#define DISCRETE_ADJUSTMENT(NODE,MIN,MAX,LOGLIN,TAG) DSC_SND_ENTRY( NODE, dss_adjustment , DSS_NODE , 6, DSE( NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( MIN,MAX,LOGLIN,0 ,0 ,100 ), TAG , "DISCRETE_ADJUSTMENT" ),
#define DISCRETE_ADJUSTMENTX(NODE,MIN,MAX,LOGLIN,TAG,PMIN,PMAX) DSC_SND_ENTRY( NODE, dss_adjustment , DSS_NODE , 6, DSE( NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( MIN,MAX,LOGLIN,0 ,PMIN,PMAX ), TAG , "DISCRETE_ADJUSTMENTX" ),
-#define DISCRETE_CONSTANT(NODE,CONST) DSC_SND_ENTRY( NODE, dss_constant , DSS_NODE , 1, DSE( NODE_NC ), DSE( CONST ) ,NULL ,"DISCRETE_CONSTANT" ),
-#define DISCRETE_INPUT_DATA(NODE) DSC_SND_ENTRY( NODE, dss_input_data , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,0 ), NULL, "DISCRETE_INPUT_DATA" ),
-#define DISCRETE_INPUTX_DATA(NODE,GAIN,OFFSET,INIT) DSC_SND_ENTRY( NODE, dss_input_data , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( GAIN,OFFSET,INIT ), NULL, "DISCRETE_INPUTX_DATA" ),
-#define DISCRETE_INPUT_LOGIC(NODE) DSC_SND_ENTRY( NODE, dss_input_logic , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,0 ), NULL, "DISCRETE_INPUT_LOGIC" ),
-#define DISCRETE_INPUTX_LOGIC(NODE,GAIN,OFFSET,INIT) DSC_SND_ENTRY( NODE, dss_input_logic , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( GAIN,OFFSET,INIT ), NULL, "DISCRETE_INPUTX_LOGIC" ),
-#define DISCRETE_INPUT_NOT(NODE) DSC_SND_ENTRY( NODE, dss_input_not , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,0 ), NULL, "DISCRETE_INPUT_NOT" ),
-#define DISCRETE_INPUTX_NOT(NODE,GAIN,OFFSET,INIT) DSC_SND_ENTRY( NODE, dss_input_not , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( GAIN,OFFSET,INIT ), NULL, "DISCRETE_INPUTX_NOT" ),
-#define DISCRETE_INPUT_PULSE(NODE,INIT) DSC_SND_ENTRY( NODE, dss_input_pulse , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,INIT ), NULL, "DISCRETE_INPUT_PULSE" ),
+#define DISCRETE_CONSTANT(NODE,CONST) DSC_SND_ENTRY( NODE, dss_constant , DSS_NODE , 1, DSE( NODE_NC ), DSE( CONST ) ,nullptr ,"DISCRETE_CONSTANT" ),
+#define DISCRETE_INPUT_DATA(NODE) DSC_SND_ENTRY( NODE, dss_input_data , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,0 ), nullptr, "DISCRETE_INPUT_DATA" ),
+#define DISCRETE_INPUTX_DATA(NODE,GAIN,OFFSET,INIT) DSC_SND_ENTRY( NODE, dss_input_data , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( GAIN,OFFSET,INIT ), nullptr, "DISCRETE_INPUTX_DATA" ),
+#define DISCRETE_INPUT_LOGIC(NODE) DSC_SND_ENTRY( NODE, dss_input_logic , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,0 ), nullptr, "DISCRETE_INPUT_LOGIC" ),
+#define DISCRETE_INPUTX_LOGIC(NODE,GAIN,OFFSET,INIT) DSC_SND_ENTRY( NODE, dss_input_logic , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( GAIN,OFFSET,INIT ), nullptr, "DISCRETE_INPUTX_LOGIC" ),
+#define DISCRETE_INPUT_NOT(NODE) DSC_SND_ENTRY( NODE, dss_input_not , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,0 ), nullptr, "DISCRETE_INPUT_NOT" ),
+#define DISCRETE_INPUTX_NOT(NODE,GAIN,OFFSET,INIT) DSC_SND_ENTRY( NODE, dss_input_not , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( GAIN,OFFSET,INIT ), nullptr, "DISCRETE_INPUTX_NOT" ),
+#define DISCRETE_INPUT_PULSE(NODE,INIT) DSC_SND_ENTRY( NODE, dss_input_pulse , DSS_NODE , 3, DSE( NODE_NC,NODE_NC,NODE_NC ), DSE( 1,0,INIT ), nullptr, "DISCRETE_INPUT_PULSE" ),
-#define DISCRETE_INPUT_STREAM(NODE, NUM) DSC_SND_ENTRY( NODE, dss_input_stream, DSS_NODE , 3, DSE( static_cast<int>(NUM),NODE_NC,NODE_NC ), DSE( NUM,1,0 ), NULL, "DISCRETE_INPUT_STREAM" ),
-#define DISCRETE_INPUTX_STREAM(NODE, NUM, GAIN,OFFSET) DSC_SND_ENTRY( NODE, dss_input_stream, DSS_NODE , 3, DSE( static_cast<int>(NUM),NODE_NC,NODE_NC ), DSE( NUM,GAIN,OFFSET ), NULL, "DISCRETE_INPUTX_STREAM" ),
+#define DISCRETE_INPUT_STREAM(NODE, NUM) DSC_SND_ENTRY( NODE, dss_input_stream, DSS_NODE , 3, DSE( static_cast<int>(NUM),NODE_NC,NODE_NC ), DSE( NUM,1,0 ), nullptr, "DISCRETE_INPUT_STREAM" ),
+#define DISCRETE_INPUTX_STREAM(NODE, NUM, GAIN,OFFSET) DSC_SND_ENTRY( NODE, dss_input_stream, DSS_NODE , 3, DSE( static_cast<int>(NUM),NODE_NC,NODE_NC ), DSE( NUM,GAIN,OFFSET ), nullptr, "DISCRETE_INPUTX_STREAM" ),
-#define DISCRETE_INPUT_BUFFER(NODE, NUM) DSC_SND_ENTRY( NODE, dss_input_buffer, DSS_NODE , 3, DSE( static_cast<int>(NUM),NODE_NC,NODE_NC ), DSE( NUM,1,0 ), NULL, "DISCRETE_INPUT_BUFFER" ),
+#define DISCRETE_INPUT_BUFFER(NODE, NUM) DSC_SND_ENTRY( NODE, dss_input_buffer, DSS_NODE , 3, DSE( static_cast<int>(NUM),NODE_NC,NODE_NC ), DSE( NUM,1,0 ), nullptr, "DISCRETE_INPUT_BUFFER" ),
/* from disc_wav.inc */
/* generic modules */
-#define DISCRETE_COUNTER(NODE,ENAB,RESET,CLK,MIN,MAX,DIR,INIT0,CLKTYPE) DSC_SND_ENTRY( NODE, dss_counter , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(RESET),static_cast<int>(CLK),NODE_NC,NODE_NC,static_cast<int>(DIR),static_cast<int>(INIT0),NODE_NC ), DSE( ENAB,RESET,CLK,MIN,MAX,DIR,INIT0,CLKTYPE ), NULL, "DISCRETE_COUNTER" ),
-#define DISCRETE_COUNTER_7492(NODE,ENAB,RESET,CLK,CLKTYPE) DSC_SND_ENTRY( NODE, dss_counter , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(RESET),static_cast<int>(CLK),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,RESET,CLK,CLKTYPE,0,1,0,DISC_COUNTER_IS_7492 ), NULL, "DISCRETE_COUNTER_7492" ),
+#define DISCRETE_COUNTER(NODE,ENAB,RESET,CLK,MIN,MAX,DIR,INIT0,CLKTYPE) DSC_SND_ENTRY( NODE, dss_counter , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(RESET),static_cast<int>(CLK),NODE_NC,NODE_NC,static_cast<int>(DIR),static_cast<int>(INIT0),NODE_NC ), DSE( ENAB,RESET,CLK,MIN,MAX,DIR,INIT0,CLKTYPE ), nullptr, "DISCRETE_COUNTER" ),
+#define DISCRETE_COUNTER_7492(NODE,ENAB,RESET,CLK,CLKTYPE) DSC_SND_ENTRY( NODE, dss_counter , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(RESET),static_cast<int>(CLK),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,RESET,CLK,CLKTYPE,0,1,0,DISC_COUNTER_IS_7492 ), nullptr, "DISCRETE_COUNTER_7492" ),
#define DISCRETE_LFSR_NOISE(NODE,ENAB,RESET,CLK,AMPL,FEED,BIAS,LFSRTB) DSC_SND_ENTRY( NODE, dss_lfsr_noise , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(RESET),static_cast<int>(CLK),static_cast<int>(AMPL),static_cast<int>(FEED),static_cast<int>(BIAS) ), DSE( ENAB,RESET,CLK,AMPL,FEED,BIAS ), LFSRTB, "DISCRETE_LFSR_NOISE" ),
-#define DISCRETE_NOISE(NODE,ENAB,FREQ,AMPL,BIAS) DSC_SND_ENTRY( NODE, dss_noise , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS) ), DSE( ENAB,FREQ,AMPL,BIAS ), NULL, "DISCRETE_NOISE" ),
-#define DISCRETE_NOTE(NODE,ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE) DSC_SND_ENTRY( NODE, dss_note , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(CLK),static_cast<int>(DATA),NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE ), NULL, "DISCRETE_NOTE" ),
-#define DISCRETE_SAWTOOTHWAVE(NODE,ENAB,FREQ,AMPL,BIAS,GRAD,PHASE) DSC_SND_ENTRY( NODE, dss_sawtoothwave, DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS),NODE_NC,NODE_NC ), DSE( ENAB,FREQ,AMPL,BIAS,GRAD,PHASE ), NULL, "DISCRETE_SAWTOOTHWAVE" ),
-#define DISCRETE_SINEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_sinewave , DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,BIAS,PHASE ), NULL, "DISCRETE_SINEWAVE" ),
-#define DISCRETE_SQUAREWAVE(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_squarewave , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(DUTY),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,DUTY,BIAS,PHASE ), NULL, "DISCRETE_SQUAREWAVE" ),
-#define DISCRETE_SQUAREWFIX(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_squarewfix , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(DUTY),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,DUTY,BIAS,PHASE ), NULL, "DISCRETE_SQUAREWFIX" ),
-#define DISCRETE_SQUAREWAVE2(NODE,ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT) DSC_SND_ENTRY( NODE, dss_squarewave2 , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(AMPL),static_cast<int>(T_OFF),static_cast<int>(T_ON),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT ), NULL, "DISCRETE_SQUAREWAVE2" ),
-#define DISCRETE_TRIANGLEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_trianglewave, DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,BIAS,PHASE ), NULL, "DISCRETE_TRIANGLEWAVE" ),
+#define DISCRETE_NOISE(NODE,ENAB,FREQ,AMPL,BIAS) DSC_SND_ENTRY( NODE, dss_noise , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS) ), DSE( ENAB,FREQ,AMPL,BIAS ), nullptr, "DISCRETE_NOISE" ),
+#define DISCRETE_NOTE(NODE,ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE) DSC_SND_ENTRY( NODE, dss_note , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(CLK),static_cast<int>(DATA),NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,CLK,DATA,MAX1,MAX2,CLKTYPE ), nullptr, "DISCRETE_NOTE" ),
+#define DISCRETE_SAWTOOTHWAVE(NODE,ENAB,FREQ,AMPL,BIAS,GRAD,PHASE) DSC_SND_ENTRY( NODE, dss_sawtoothwave, DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS),NODE_NC,NODE_NC ), DSE( ENAB,FREQ,AMPL,BIAS,GRAD,PHASE ), nullptr, "DISCRETE_SAWTOOTHWAVE" ),
+#define DISCRETE_SINEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_sinewave , DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,BIAS,PHASE ), nullptr, "DISCRETE_SINEWAVE" ),
+#define DISCRETE_SQUAREWAVE(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_squarewave , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(DUTY),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,DUTY,BIAS,PHASE ), nullptr, "DISCRETE_SQUAREWAVE" ),
+#define DISCRETE_SQUAREWFIX(NODE,ENAB,FREQ,AMPL,DUTY,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_squarewfix , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(DUTY),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,DUTY,BIAS,PHASE ), nullptr, "DISCRETE_SQUAREWFIX" ),
+#define DISCRETE_SQUAREWAVE2(NODE,ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT) DSC_SND_ENTRY( NODE, dss_squarewave2 , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(AMPL),static_cast<int>(T_OFF),static_cast<int>(T_ON),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,AMPL,T_OFF,T_ON,BIAS,TSHIFT ), nullptr, "DISCRETE_SQUAREWAVE2" ),
+#define DISCRETE_TRIANGLEWAVE(NODE,ENAB,FREQ,AMPL,BIAS,PHASE) DSC_SND_ENTRY( NODE, dss_trianglewave, DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(FREQ),static_cast<int>(AMPL),static_cast<int>(BIAS),NODE_NC ), DSE( ENAB,FREQ,AMPL,BIAS,PHASE ), nullptr, "DISCRETE_TRIANGLEWAVE" ),
/* Component specific */
#define DISCRETE_INVERTER_OSC(NODE,ENAB,MOD,RCHARGE,RP,C,R2,INFO) DSC_SND_ENTRY( NODE, dss_inverter_osc, DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(MOD),NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,MOD,RCHARGE,RP,C,R2 ), INFO, "DISCRETE_INVERTER_OSC" ),
#define DISCRETE_OP_AMP_OSCILLATOR(NODE,ENAB,INFO) DSC_SND_ENTRY( NODE, dss_op_amp_osc , DSS_NODE , 1, DSE( static_cast<int>(ENAB) ), DSE( ENAB ), INFO, "DISCRETE_OP_AMP_OSCILLATOR" ),
@@ -4577,48 +4577,48 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_
/* from disc_mth.inc */
/* generic modules */
-#define DISCRETE_ADDER2(NODE,ENAB,INP0,INP1) DSC_SND_ENTRY( NODE, dst_adder , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ENAB,INP0,INP1 ), NULL, "DISCRETE_ADDER2" ),
-#define DISCRETE_ADDER3(NODE,ENAB,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_adder , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2) ), DSE( ENAB,INP0,INP1,INP2 ), NULL, "DISCRETE_ADDER3" ),
-#define DISCRETE_ADDER4(NODE,ENAB,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_adder , DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( ENAB,INP0,INP1,INP2,INP3 ), NULL, "DISCRETE_ADDER4" ),
-#define DISCRETE_CLAMP(NODE,INP0,MIN,MAX) DSC_SND_ENTRY( NODE, dst_clamp , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(MIN),static_cast<int>(MAX) ), DSE( INP0,MIN,MAX ), NULL, "DISCRETE_CLAMP" ),
-#define DISCRETE_DIVIDE(NODE,ENAB,INP0,INP1) DSC_SND_ENTRY( NODE, dst_divide , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ENAB,INP0,INP1 ), NULL, "DISCRETE_DIVIDE" ),
-#define DISCRETE_GAIN(NODE,INP0,GAIN) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( INP0,GAIN,0 ), NULL, "DISCRETE_GAIN" ),
-#define DISCRETE_INVERT(NODE,INP0) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( INP0,-1,0 ), NULL, "DISCRETE_INVERT" ),
-#define DISCRETE_LOGIC_INVERT(NODE,INP0) DSC_SND_ENTRY( NODE, dst_logic_inv , DSS_NODE , 1, DSE( static_cast<int>(INP0) ), DSE( INP0 ), NULL, "DISCRETE_LOGIC_INVERT" ),
-
-#define DISCRETE_BIT_DECODE(NODE, INP, BIT_N, VOUT) DSC_SND_ENTRY( NODE, dst_bits_decode , DSS_NODE , 4, DSE( static_cast<int>(INP),NODE_NC,NODE_NC,NODE_NC ), DSE( INP,BIT_N,BIT_N,VOUT ), NULL, "DISCRETE_BIT_DECODE" ),
-#define DISCRETE_BITS_DECODE(NODE, INP, BIT_FROM, BIT_TO, VOUT) DSC_SND_ENTRY( NODE, dst_bits_decode , DSS_NODE , 4, DSE( static_cast<int>(INP),NODE_NC,NODE_NC,NODE_NC ), DSE( INP,BIT_FROM,BIT_TO,VOUT ), NULL, "DISCRETE_BITS_DECODE" ),
-
-#define DISCRETE_LOGIC_AND(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_and , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,1.0,1.0 ), NULL, "DISCRETE_LOGIC_AND" ),
-#define DISCRETE_LOGIC_AND3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_and , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,1.0 ), NULL, "DISCRETE_LOGIC_AND3" ),
-#define DISCRETE_LOGIC_AND4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_and , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ) ,NULL, "DISCRETE_LOGIC_AND4" ),
-#define DISCRETE_LOGIC_NAND(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_nand , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,1.0,1.0 ), NULL, "DISCRETE_LOGIC_NAND" ),
-#define DISCRETE_LOGIC_NAND3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_nand , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,1.0 ), NULL, "DISCRETE_LOGIC_NAND3" ),
-#define DISCRETE_LOGIC_NAND4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_nand , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), NULL, ")DISCRETE_LOGIC_NAND4" ),
-#define DISCRETE_LOGIC_OR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_or , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,0.0,0.0 ), NULL, "DISCRETE_LOGIC_OR" ),
-#define DISCRETE_LOGIC_OR3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_or , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,0.0 ), NULL, "DISCRETE_LOGIC_OR3" ),
-#define DISCRETE_LOGIC_OR4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_or , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), NULL, "DISCRETE_LOGIC_OR4" ),
-#define DISCRETE_LOGIC_NOR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_nor , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,0.0,0.0 ), NULL, "DISCRETE_LOGIC_NOR" ),
-#define DISCRETE_LOGIC_NOR3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_nor , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,0.0 ), NULL, "DISCRETE_LOGIC_NOR3" ),
-#define DISCRETE_LOGIC_NOR4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_nor , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), NULL, "DISCRETE_LOGIC_NOR4" ),
-#define DISCRETE_LOGIC_XOR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_xor , DSS_NODE , 2, DSE( static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( INP0,INP1 ), NULL, "DISCRETE_LOGIC_XOR" ),
-#define DISCRETE_LOGIC_XNOR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_nxor , DSS_NODE , 2, DSE( static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( INP0,INP1 ), NULL, "DISCRETE_LOGIC_XNOR" ),
-#define DISCRETE_LOGIC_DFLIPFLOP(NODE,RESET,SET,CLK,INP) DSC_SND_ENTRY( NODE, dst_logic_dff , DSS_NODE , 4, DSE( static_cast<int>(RESET),static_cast<int>(SET),static_cast<int>(CLK),static_cast<int>(INP) ), DSE( RESET,SET,CLK,INP ), NULL, "DISCRETE_LOGIC_DFLIPFLOP" ),
-#define DISCRETE_LOGIC_JKFLIPFLOP(NODE,RESET,SET,CLK,J,K) DSC_SND_ENTRY( NODE, dst_logic_jkff , DSS_NODE , 5, DSE( static_cast<int>(RESET),static_cast<int>(SET),static_cast<int>(CLK),static_cast<int>(J),static_cast<int>(K) ), DSE( RESET,SET,CLK,J,K ), NULL, "DISCRETE_LOGIC_JKFLIPFLOP" ),
-#define DISCRETE_LOGIC_SHIFT(NODE,INP0,RESET,CLK,SIZE,OPTIONS) DSC_SND_ENTRY( NODE, dst_logic_shift , DSS_NODE , 5, DSE( static_cast<int>(INP0),static_cast<int>(RESET),static_cast<int>(CLK),NODE_NC,NODE_NC ), DSE( INP0,RESET,CLK,SIZE,OPTIONS ), NULL, "DISCRETE_LOGIC_SHIFT" ),
+#define DISCRETE_ADDER2(NODE,ENAB,INP0,INP1) DSC_SND_ENTRY( NODE, dst_adder , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ENAB,INP0,INP1 ), nullptr, "DISCRETE_ADDER2" ),
+#define DISCRETE_ADDER3(NODE,ENAB,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_adder , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2) ), DSE( ENAB,INP0,INP1,INP2 ), nullptr, "DISCRETE_ADDER3" ),
+#define DISCRETE_ADDER4(NODE,ENAB,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_adder , DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( ENAB,INP0,INP1,INP2,INP3 ), nullptr, "DISCRETE_ADDER4" ),
+#define DISCRETE_CLAMP(NODE,INP0,MIN,MAX) DSC_SND_ENTRY( NODE, dst_clamp , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(MIN),static_cast<int>(MAX) ), DSE( INP0,MIN,MAX ), nullptr, "DISCRETE_CLAMP" ),
+#define DISCRETE_DIVIDE(NODE,ENAB,INP0,INP1) DSC_SND_ENTRY( NODE, dst_divide , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ENAB,INP0,INP1 ), nullptr, "DISCRETE_DIVIDE" ),
+#define DISCRETE_GAIN(NODE,INP0,GAIN) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( INP0,GAIN,0 ), nullptr, "DISCRETE_GAIN" ),
+#define DISCRETE_INVERT(NODE,INP0) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( INP0,-1,0 ), nullptr, "DISCRETE_INVERT" ),
+#define DISCRETE_LOGIC_INVERT(NODE,INP0) DSC_SND_ENTRY( NODE, dst_logic_inv , DSS_NODE , 1, DSE( static_cast<int>(INP0) ), DSE( INP0 ), nullptr, "DISCRETE_LOGIC_INVERT" ),
+
+#define DISCRETE_BIT_DECODE(NODE, INP, BIT_N, VOUT) DSC_SND_ENTRY( NODE, dst_bits_decode , DSS_NODE , 4, DSE( static_cast<int>(INP),NODE_NC,NODE_NC,NODE_NC ), DSE( INP,BIT_N,BIT_N,VOUT ), nullptr, "DISCRETE_BIT_DECODE" ),
+#define DISCRETE_BITS_DECODE(NODE, INP, BIT_FROM, BIT_TO, VOUT) DSC_SND_ENTRY( NODE, dst_bits_decode , DSS_NODE , 4, DSE( static_cast<int>(INP),NODE_NC,NODE_NC,NODE_NC ), DSE( INP,BIT_FROM,BIT_TO,VOUT ), nullptr, "DISCRETE_BITS_DECODE" ),
+
+#define DISCRETE_LOGIC_AND(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_and , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,1.0,1.0 ), nullptr, "DISCRETE_LOGIC_AND" ),
+#define DISCRETE_LOGIC_AND3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_and , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,1.0 ), nullptr, "DISCRETE_LOGIC_AND3" ),
+#define DISCRETE_LOGIC_AND4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_and , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ) ,nullptr, "DISCRETE_LOGIC_AND4" ),
+#define DISCRETE_LOGIC_NAND(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_nand , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,1.0,1.0 ), nullptr, "DISCRETE_LOGIC_NAND" ),
+#define DISCRETE_LOGIC_NAND3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_nand , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,1.0 ), nullptr, "DISCRETE_LOGIC_NAND3" ),
+#define DISCRETE_LOGIC_NAND4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_nand , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), nullptr, ")DISCRETE_LOGIC_NAND4" ),
+#define DISCRETE_LOGIC_OR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_or , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,0.0,0.0 ), nullptr, "DISCRETE_LOGIC_OR" ),
+#define DISCRETE_LOGIC_OR3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_or , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,0.0 ), nullptr, "DISCRETE_LOGIC_OR3" ),
+#define DISCRETE_LOGIC_OR4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_or , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), nullptr, "DISCRETE_LOGIC_OR4" ),
+#define DISCRETE_LOGIC_NOR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_nor , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,0.0,0.0 ), nullptr, "DISCRETE_LOGIC_NOR" ),
+#define DISCRETE_LOGIC_NOR3(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_logic_nor , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),NODE_NC ), DSE( INP0,INP1,INP2,0.0 ), nullptr, "DISCRETE_LOGIC_NOR3" ),
+#define DISCRETE_LOGIC_NOR4(NODE,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_logic_nor , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), nullptr, "DISCRETE_LOGIC_NOR4" ),
+#define DISCRETE_LOGIC_XOR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_xor , DSS_NODE , 2, DSE( static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( INP0,INP1 ), nullptr, "DISCRETE_LOGIC_XOR" ),
+#define DISCRETE_LOGIC_XNOR(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_logic_nxor , DSS_NODE , 2, DSE( static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( INP0,INP1 ), nullptr, "DISCRETE_LOGIC_XNOR" ),
+#define DISCRETE_LOGIC_DFLIPFLOP(NODE,RESET,SET,CLK,INP) DSC_SND_ENTRY( NODE, dst_logic_dff , DSS_NODE , 4, DSE( static_cast<int>(RESET),static_cast<int>(SET),static_cast<int>(CLK),static_cast<int>(INP) ), DSE( RESET,SET,CLK,INP ), nullptr, "DISCRETE_LOGIC_DFLIPFLOP" ),
+#define DISCRETE_LOGIC_JKFLIPFLOP(NODE,RESET,SET,CLK,J,K) DSC_SND_ENTRY( NODE, dst_logic_jkff , DSS_NODE , 5, DSE( static_cast<int>(RESET),static_cast<int>(SET),static_cast<int>(CLK),static_cast<int>(J),static_cast<int>(K) ), DSE( RESET,SET,CLK,J,K ), nullptr, "DISCRETE_LOGIC_JKFLIPFLOP" ),
+#define DISCRETE_LOGIC_SHIFT(NODE,INP0,RESET,CLK,SIZE,OPTIONS) DSC_SND_ENTRY( NODE, dst_logic_shift , DSS_NODE , 5, DSE( static_cast<int>(INP0),static_cast<int>(RESET),static_cast<int>(CLK),NODE_NC,NODE_NC ), DSE( INP0,RESET,CLK,SIZE,OPTIONS ), nullptr, "DISCRETE_LOGIC_SHIFT" ),
#define DISCRETE_LOOKUP_TABLE(NODE,ADDR,SIZE,TABLE) DSC_SND_ENTRY( NODE, dst_lookup_table, DSS_NODE , 2, DSE( static_cast<int>(ADDR),NODE_NC ), DSE( ADDR,SIZE ), TABLE, "DISCRETE_LOOKUP_TABLE" ),
-#define DISCRETE_MULTIPLEX2(NODE,ADDR,INP0,INP1) DSC_SND_ENTRY( NODE, dst_multiplex , DSS_NODE , 3, DSE( static_cast<int>(ADDR),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ADDR,INP0,INP1 ), NULL, "DISCRETE_MULTIPLEX2" ),
-#define DISCRETE_MULTIPLEX4(NODE,ADDR,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_multiplex , DSS_NODE , 5, DSE( static_cast<int>(ADDR),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( ADDR,INP0,INP1,INP2,INP3 ), NULL, "DISCRETE_MULTIPLEX4" ),
-#define DISCRETE_MULTIPLEX8(NODE,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7) DSC_SND_ENTRY( NODE, dst_multiplex, DSS_NODE , 9, DSE( static_cast<int>(ADDR),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3),static_cast<int>(INP4),static_cast<int>(INP5),static_cast<int>(INP6),static_cast<int>(INP7) ), DSE( ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7 ), NULL, "DISCRETE_MULTIPLEX8" ),
-#define DISCRETE_MULTIPLY(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC ), DSE( INP0,INP1,0 ), NULL, "DISCRETE_MULTIPLY" ),
-#define DISCRETE_MULTADD(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2) ), DSE( INP0,INP1,INP2 ), NULL, "DISCRETE_MULTADD" ),
-#define DISCRETE_ONESHOT(NODE,TRIG,AMPL,WIDTH,TYPE) DSC_SND_ENTRY( NODE, dst_oneshot , DSS_NODE , 5, DSE( 0,static_cast<int>(TRIG),static_cast<int>(AMPL),static_cast<int>(WIDTH),NODE_NC ), DSE( 0,TRIG,AMPL,WIDTH,TYPE ), NULL, "DISCRETE_ONESHOT" ),
-#define DISCRETE_ONESHOTR(NODE,RESET,TRIG,AMPL,WIDTH,TYPE) DSC_SND_ENTRY( NODE, dst_oneshot , DSS_NODE , 5, DSE( static_cast<int>(RESET),static_cast<int>(TRIG),static_cast<int>(AMPL),static_cast<int>(WIDTH),NODE_NC ), DSE( RESET,TRIG,AMPL,WIDTH,TYPE ), NULL, "One Shot Resetable" ),
-#define DISCRETE_ONOFF(NODE,ENAB,INP0) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC ), DSE( 0,1,0 ), NULL, "DISCRETE_ONOFF" ),
-#define DISCRETE_RAMP(NODE,ENAB,RAMP,GRAD,START,END,CLAMP) DSC_SND_ENTRY( NODE, dst_ramp , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(RAMP),static_cast<int>(GRAD),static_cast<int>(START),static_cast<int>(END),static_cast<int>(CLAMP) ), DSE( ENAB,RAMP,GRAD,START,END,CLAMP ), NULL, "DISCRETE_RAMP" ),
-#define DISCRETE_SAMPLHOLD(NODE,INP0,CLOCK,CLKTYPE) DSC_SND_ENTRY( NODE, dst_samphold , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(CLOCK),NODE_NC ), DSE( INP0,CLOCK,CLKTYPE ), NULL, "DISCRETE_SAMPLHOLD" ),
-#define DISCRETE_SWITCH(NODE,ENAB,SWITCH,INP0,INP1) DSC_SND_ENTRY( NODE, dst_switch , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(SWITCH),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ENAB,SWITCH,INP0,INP1 ), NULL, "DISCRETE_SWITCH" ),
-#define DISCRETE_ASWITCH(NODE,CTRL,INP,THRESHOLD) DSC_SND_ENTRY( NODE, dst_aswitch , DSS_NODE , 3, DSE( static_cast<int>(CTRL),static_cast<int>(INP),static_cast<int>(THRESHOLD) ), DSE( CTRL,INP, THRESHOLD), NULL, "Analog Switch" ),
+#define DISCRETE_MULTIPLEX2(NODE,ADDR,INP0,INP1) DSC_SND_ENTRY( NODE, dst_multiplex , DSS_NODE , 3, DSE( static_cast<int>(ADDR),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ADDR,INP0,INP1 ), nullptr, "DISCRETE_MULTIPLEX2" ),
+#define DISCRETE_MULTIPLEX4(NODE,ADDR,INP0,INP1,INP2,INP3) DSC_SND_ENTRY( NODE, dst_multiplex , DSS_NODE , 5, DSE( static_cast<int>(ADDR),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( ADDR,INP0,INP1,INP2,INP3 ), nullptr, "DISCRETE_MULTIPLEX4" ),
+#define DISCRETE_MULTIPLEX8(NODE,ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7) DSC_SND_ENTRY( NODE, dst_multiplex, DSS_NODE , 9, DSE( static_cast<int>(ADDR),static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3),static_cast<int>(INP4),static_cast<int>(INP5),static_cast<int>(INP6),static_cast<int>(INP7) ), DSE( ADDR,INP0,INP1,INP2,INP3,INP4,INP5,INP6,INP7 ), nullptr, "DISCRETE_MULTIPLEX8" ),
+#define DISCRETE_MULTIPLY(NODE,INP0,INP1) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC ), DSE( INP0,INP1,0 ), nullptr, "DISCRETE_MULTIPLY" ),
+#define DISCRETE_MULTADD(NODE,INP0,INP1,INP2) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2) ), DSE( INP0,INP1,INP2 ), nullptr, "DISCRETE_MULTADD" ),
+#define DISCRETE_ONESHOT(NODE,TRIG,AMPL,WIDTH,TYPE) DSC_SND_ENTRY( NODE, dst_oneshot , DSS_NODE , 5, DSE( 0,static_cast<int>(TRIG),static_cast<int>(AMPL),static_cast<int>(WIDTH),NODE_NC ), DSE( 0,TRIG,AMPL,WIDTH,TYPE ), nullptr, "DISCRETE_ONESHOT" ),
+#define DISCRETE_ONESHOTR(NODE,RESET,TRIG,AMPL,WIDTH,TYPE) DSC_SND_ENTRY( NODE, dst_oneshot , DSS_NODE , 5, DSE( static_cast<int>(RESET),static_cast<int>(TRIG),static_cast<int>(AMPL),static_cast<int>(WIDTH),NODE_NC ), DSE( RESET,TRIG,AMPL,WIDTH,TYPE ), nullptr, "One Shot Resetable" ),
+#define DISCRETE_ONOFF(NODE,ENAB,INP0) DSC_SND_ENTRY( NODE, dst_gain , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC ), DSE( 0,1,0 ), nullptr, "DISCRETE_ONOFF" ),
+#define DISCRETE_RAMP(NODE,ENAB,RAMP,GRAD,START,END,CLAMP) DSC_SND_ENTRY( NODE, dst_ramp , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(RAMP),static_cast<int>(GRAD),static_cast<int>(START),static_cast<int>(END),static_cast<int>(CLAMP) ), DSE( ENAB,RAMP,GRAD,START,END,CLAMP ), nullptr, "DISCRETE_RAMP" ),
+#define DISCRETE_SAMPLHOLD(NODE,INP0,CLOCK,CLKTYPE) DSC_SND_ENTRY( NODE, dst_samphold , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(CLOCK),NODE_NC ), DSE( INP0,CLOCK,CLKTYPE ), nullptr, "DISCRETE_SAMPLHOLD" ),
+#define DISCRETE_SWITCH(NODE,ENAB,SWITCH,INP0,INP1) DSC_SND_ENTRY( NODE, dst_switch , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(SWITCH),static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( ENAB,SWITCH,INP0,INP1 ), nullptr, "DISCRETE_SWITCH" ),
+#define DISCRETE_ASWITCH(NODE,CTRL,INP,THRESHOLD) DSC_SND_ENTRY( NODE, dst_aswitch , DSS_NODE , 3, DSE( static_cast<int>(CTRL),static_cast<int>(INP),static_cast<int>(THRESHOLD) ), DSE( CTRL,INP, THRESHOLD), nullptr, "Analog Switch" ),
#define DISCRETE_TRANSFORM2(NODE,INP0,INP1,FUNCT) DSC_SND_ENTRY( NODE, dst_transform , DSS_NODE , 2, DSE( static_cast<int>(INP0),static_cast<int>(INP1) ), DSE( INP0,INP1 ), FUNCT, "DISCRETE_TRANSFORM2" ),
#define DISCRETE_TRANSFORM3(NODE,INP0,INP1,INP2,FUNCT) DSC_SND_ENTRY( NODE, dst_transform , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2) ), DSE( INP0,INP1,INP2 ), FUNCT, "DISCRETE_TRANSFORM3" ),
#define DISCRETE_TRANSFORM4(NODE,INP0,INP1,INP2,INP3,FUNCT) DSC_SND_ENTRY( NODE, dst_transform , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),static_cast<int>(INP2),static_cast<int>(INP3) ), DSE( INP0,INP1,INP2,INP3 ), FUNCT, "DISCRETE_TRANSFORM4" ),
@@ -4640,40 +4640,40 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_
#define DISCRETE_OP_AMP(NODE,ENAB,IN0,IN1,INFO) DSC_SND_ENTRY( NODE, dst_op_amp , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(IN0),static_cast<int>(IN1) ), DSE( ENAB,IN0,IN1 ), INFO, "DISCRETE_OP_AMP" ),
#define DISCRETE_OP_AMP_ONESHOT(NODE,TRIG,INFO) DSC_SND_ENTRY( NODE, dst_op_amp_1sht , DSS_NODE , 1, DSE( static_cast<int>(TRIG) ), DSE( TRIG ), INFO, "DISCRETE_OP_AMP_ONESHOT" ),
#define DISCRETE_OP_AMP_TRIG_VCA(NODE,TRG0,TRG1,TRG2,IN0,IN1,INFO) DSC_SND_ENTRY( NODE, dst_tvca_op_amp , DSS_NODE , 5, DSE( static_cast<int>(TRG0),static_cast<int>(TRG1),static_cast<int>(TRG2),static_cast<int>(IN0),static_cast<int>(IN1) ), DSE( TRG0,TRG1,TRG2,IN0,IN1 ), INFO, "DISCRETE_OP_AMP_TRIG_VCA" ),
-#define DISCRETE_VCA(NODE,ENAB,IN0,CTRL,TYPE) DSC_SND_ENTRY( NODE, dst_vca , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(IN0),static_cast<int>(CTRL),NODE_NC ), DSE( ENAB,IN0,CTRL,TYPE ), NULL, "DISCRETE_VCA" ),
-#define DISCRETE_XTIME_BUFFER(NODE,IN0,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_buffer, DSS_NODE , 4, DSE( static_cast<int>(IN0),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,LOW,HIGH,0 ), NULL, "DISCRETE_XTIME_BUFFER" ),
-#define DISCRETE_XTIME_INVERTER(NODE,IN0,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_buffer, DSS_NODE , 4, DSE( static_cast<int>(IN0),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,LOW,HIGH,1 ), NULL, "DISCRETE_XTIME_INVERTER" ),
-#define DISCRETE_XTIME_AND(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_and , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,0 ), NULL, "DISCRETE_XTIME_AND" ),
-#define DISCRETE_XTIME_NAND(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_and , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,1 ), NULL, "DISCRETE_XTIME_NAND" ),
-#define DISCRETE_XTIME_OR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_or , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,0 ), NULL, "DISCRETE_XTIME_OR" ),
-#define DISCRETE_XTIME_NOR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_or , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,1 ), NULL, "DISCRETE_XTIME_NOR" ),
-#define DISCRETE_XTIME_XOR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_xor , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,0 ), NULL, "DISCRETE_XTIME_XOR" ),
-#define DISCRETE_XTIME_XNOR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_xnor , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,1 ), NULL, "DISCRETE_XTIME_XNOR" ),
+#define DISCRETE_VCA(NODE,ENAB,IN0,CTRL,TYPE) DSC_SND_ENTRY( NODE, dst_vca , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(IN0),static_cast<int>(CTRL),NODE_NC ), DSE( ENAB,IN0,CTRL,TYPE ), nullptr, "DISCRETE_VCA" ),
+#define DISCRETE_XTIME_BUFFER(NODE,IN0,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_buffer, DSS_NODE , 4, DSE( static_cast<int>(IN0),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,LOW,HIGH,0 ), nullptr, "DISCRETE_XTIME_BUFFER" ),
+#define DISCRETE_XTIME_INVERTER(NODE,IN0,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_buffer, DSS_NODE , 4, DSE( static_cast<int>(IN0),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,LOW,HIGH,1 ), nullptr, "DISCRETE_XTIME_INVERTER" ),
+#define DISCRETE_XTIME_AND(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_and , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,0 ), nullptr, "DISCRETE_XTIME_AND" ),
+#define DISCRETE_XTIME_NAND(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_and , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,1 ), nullptr, "DISCRETE_XTIME_NAND" ),
+#define DISCRETE_XTIME_OR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_or , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,0 ), nullptr, "DISCRETE_XTIME_OR" ),
+#define DISCRETE_XTIME_NOR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_or , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,1 ), nullptr, "DISCRETE_XTIME_NOR" ),
+#define DISCRETE_XTIME_XOR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_xor , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,0 ), nullptr, "DISCRETE_XTIME_XOR" ),
+#define DISCRETE_XTIME_XNOR(NODE,IN0,IN1,LOW,HIGH) DSC_SND_ENTRY( NODE, dst_xtime_xnor , DSS_NODE , 5, DSE( static_cast<int>(IN0),static_cast<int>(IN1),static_cast<int>(LOW),static_cast<int>(HIGH),NODE_NC ), DSE( IN0,IN1,LOW,HIGH,1 ), nullptr, "DISCRETE_XTIME_XNOR" ),
/* from disc_flt.inc */
/* generic modules */
-#define DISCRETE_FILTER1(NODE,ENAB,INP0,FREQ,TYPE) DSC_SND_ENTRY( NODE, dst_filter1 , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,FREQ,TYPE ), NULL, "DISCRETE_FILTER1" ),
-#define DISCRETE_FILTER2(NODE,ENAB,INP0,FREQ,DAMP,TYPE) DSC_SND_ENTRY( NODE, dst_filter2 , DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,FREQ,DAMP,TYPE ), NULL, "DISCRETE_FILTER2" ),
+#define DISCRETE_FILTER1(NODE,ENAB,INP0,FREQ,TYPE) DSC_SND_ENTRY( NODE, dst_filter1 , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,FREQ,TYPE ), nullptr, "DISCRETE_FILTER1" ),
+#define DISCRETE_FILTER2(NODE,ENAB,INP0,FREQ,DAMP,TYPE) DSC_SND_ENTRY( NODE, dst_filter2 , DSS_NODE , 5, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,FREQ,DAMP,TYPE ), nullptr, "DISCRETE_FILTER2" ),
/* Component specific */
#define DISCRETE_SALLEN_KEY_FILTER(NODE,ENAB,INP0,TYPE,INFO) DSC_SND_ENTRY( NODE, dst_sallen_key , DSS_NODE , 3, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC ), DSE( ENAB,INP0,TYPE ), INFO, "DISCRETE_SALLEN_KEY_FILTER" ),
-#define DISCRETE_CRFILTER(NODE,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_crfilter , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)) ), DSE( INP0,RVAL,CVAL ), NULL, "DISCRETE_CRFILTER" ),
-#define DISCRETE_CRFILTER_VREF(NODE,INP0,RVAL,CVAL,VREF) DSC_SND_ENTRY( NODE, dst_crfilter , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)),static_cast<int>(VREF) ), DSE( INP0,RVAL,CVAL,VREF ), NULL, "DISCRETE_CRFILTER_VREF" ),
+#define DISCRETE_CRFILTER(NODE,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_crfilter , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)) ), DSE( INP0,RVAL,CVAL ), nullptr, "DISCRETE_CRFILTER" ),
+#define DISCRETE_CRFILTER_VREF(NODE,INP0,RVAL,CVAL,VREF) DSC_SND_ENTRY( NODE, dst_crfilter , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)),static_cast<int>(VREF) ), DSE( INP0,RVAL,CVAL,VREF ), nullptr, "DISCRETE_CRFILTER_VREF" ),
#define DISCRETE_OP_AMP_FILTER(NODE,ENAB,INP0,INP1,TYPE,INFO) DSC_SND_ENTRY( NODE, dst_op_amp_filt , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC ), DSE( ENAB,INP0,INP1,TYPE ), INFO, "DISCRETE_OP_AMP_FILTER" ),
-#define DISCRETE_RC_CIRCUIT_1(NODE,INP0,INP1,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rc_circuit_1, DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,RVAL,CVAL ), NULL, "DISCRETE_RC_CIRCUIT_1" ),
-#define DISCRETE_RCDISC(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), NULL, "DISCRETE_RCDISC" ),
-#define DISCRETE_RCDISC2(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc2 , DSS_NODE , 6, DSE( static_cast<int>(SWITCH),static_cast<int>(INP0),NODE_NC,static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL ), NULL, "DISCRETE_RCDISC2" ),
-#define DISCRETE_RCDISC3(NODE,ENAB,INP0,RVAL0,RVAL1,CVAL,DJV) DSC_SND_ENTRY( NODE, dst_rcdisc3 , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL0,RVAL1,CVAL,DJV ), NULL, "DISCRETE_RCDISC3" ),
-#define DISCRETE_RCDISC4(NODE,ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE) DSC_SND_ENTRY( NODE, dst_rcdisc4 , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE ), NULL, "DISCRETE_RCDISC4" ),
-#define DISCRETE_RCDISC5(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc5 , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), NULL, "DISCRETE_RCDISC5" ),
-#define DISCRETE_RCDISC_MODULATED(NODE,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP) DSC_SND_ENTRY( NODE, dst_rcdisc_mod, DSS_NODE , 8, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP ), NULL, "DISCRETE_RCDISC_MODULATED" ),
-#define DISCRETE_RCFILTER(NODE,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcfilter , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)) ), DSE( INP0,RVAL,CVAL ), NULL, "DISCRETE_RCFILTER" ),
-#define DISCRETE_RCFILTER_VREF(NODE,INP0,RVAL,CVAL,VREF) DSC_SND_ENTRY( NODE, dst_rcfilter , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)),static_cast<int>(VREF) ), DSE( INP0,RVAL,CVAL,VREF ), NULL, "DISCRETE_RCFILTER_VREF" ),
-#define DISCRETE_RCFILTER_SW(NODE,ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4) DSC_SND_ENTRY( NODE, dst_rcfilter_sw, DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(SW),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 ), NULL, "DISCRETE_RCFILTER_SW" ),
-#define DISCRETE_RCINTEGRATE(NODE,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE) DSC_SND_ENTRY( NODE, dst_rcintegrate , DSS_NODE , 7, DSE( static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE ), NULL, "DISCRETE_RCINTEGRATE" ),
+#define DISCRETE_RC_CIRCUIT_1(NODE,INP0,INP1,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rc_circuit_1, DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( INP0,INP1,RVAL,CVAL ), nullptr, "DISCRETE_RC_CIRCUIT_1" ),
+#define DISCRETE_RCDISC(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), nullptr, "DISCRETE_RCDISC" ),
+#define DISCRETE_RCDISC2(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc2 , DSS_NODE , 6, DSE( static_cast<int>(SWITCH),static_cast<int>(INP0),NODE_NC,static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL ), nullptr, "DISCRETE_RCDISC2" ),
+#define DISCRETE_RCDISC3(NODE,ENAB,INP0,RVAL0,RVAL1,CVAL,DJV) DSC_SND_ENTRY( NODE, dst_rcdisc3 , DSS_NODE , 6, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL0,RVAL1,CVAL,DJV ), nullptr, "DISCRETE_RCDISC3" ),
+#define DISCRETE_RCDISC4(NODE,ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE) DSC_SND_ENTRY( NODE, dst_rcdisc4 , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL0,RVAL1,RVAL2,CVAL,VP,TYPE ), nullptr, "DISCRETE_RCDISC4" ),
+#define DISCRETE_RCDISC5(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc5 , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), nullptr, "DISCRETE_RCDISC5" ),
+#define DISCRETE_RCDISC_MODULATED(NODE,INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP) DSC_SND_ENTRY( NODE, dst_rcdisc_mod, DSS_NODE , 8, DSE( static_cast<int>(INP0),static_cast<int>(INP1),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( INP0,INP1,RVAL0,RVAL1,RVAL2,RVAL3,CVAL,VP ), nullptr, "DISCRETE_RCDISC_MODULATED" ),
+#define DISCRETE_RCFILTER(NODE,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcfilter , DSS_NODE , 3, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)) ), DSE( INP0,RVAL,CVAL ), nullptr, "DISCRETE_RCFILTER" ),
+#define DISCRETE_RCFILTER_VREF(NODE,INP0,RVAL,CVAL,VREF) DSC_SND_ENTRY( NODE, dst_rcfilter , DSS_NODE , 4, DSE( static_cast<int>(INP0),static_cast<int>(OPT_NODE(RVAL)),static_cast<int>(OPT_NODE(CVAL)),static_cast<int>(VREF) ), DSE( INP0,RVAL,CVAL,VREF ), nullptr, "DISCRETE_RCFILTER_VREF" ),
+#define DISCRETE_RCFILTER_SW(NODE,ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4) DSC_SND_ENTRY( NODE, dst_rcfilter_sw, DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),static_cast<int>(SW),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,INP0,SW,RVAL,CVAL1,CVAL2,CVAL3,CVAL4 ), nullptr, "DISCRETE_RCFILTER_SW" ),
+#define DISCRETE_RCINTEGRATE(NODE,INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE) DSC_SND_ENTRY( NODE, dst_rcintegrate , DSS_NODE , 7, DSE( static_cast<int>(INP0),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( INP0,RVAL0,RVAL1,RVAL2,CVAL,vP,TYPE ), nullptr, "DISCRETE_RCINTEGRATE" ),
/* For testing - seem to be buggered. Use versions not ending in N. */
-#define DISCRETE_RCDISCN(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcdiscn , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), NULL, "DISCRETE_RCDISCN" ),
-#define DISCRETE_RCDISC2N(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc2n , DSS_NODE , 6, DSE( static_cast<int>(SWITCH),static_cast<int>(INP0),NODE_NC,static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL ), NULL, "DISCRETE_RCDISC2N" ),
-#define DISCRETE_RCFILTERN(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcfiltern , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), NULL, "DISCRETE_RCFILTERN" ),
+#define DISCRETE_RCDISCN(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcdiscn , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), nullptr, "DISCRETE_RCDISCN" ),
+#define DISCRETE_RCDISC2N(NODE,SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL) DSC_SND_ENTRY( NODE, dst_rcdisc2n , DSS_NODE , 6, DSE( static_cast<int>(SWITCH),static_cast<int>(INP0),NODE_NC,static_cast<int>(INP1),NODE_NC,NODE_NC ), DSE( SWITCH,INP0,RVAL0,INP1,RVAL1,CVAL ), nullptr, "DISCRETE_RCDISC2N" ),
+#define DISCRETE_RCFILTERN(NODE,ENAB,INP0,RVAL,CVAL) DSC_SND_ENTRY( NODE, dst_rcfiltern , DSS_NODE , 4, DSE( static_cast<int>(ENAB),static_cast<int>(INP0),NODE_NC,NODE_NC ), DSE( ENAB,INP0,RVAL,CVAL ), nullptr, "DISCRETE_RCFILTERN" ),
/* from disc_dev.inc */
/* generic modules */
@@ -4694,34 +4694,34 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_
#define DISCRETE_555_CC(NODE,RESET,VIN,R,C,RBIAS,RGND,RDIS,OPTIONS) DSC_SND_ENTRY( NODE, dsd_555_cc , DSS_NODE , 7, DSE( static_cast<int>(RESET),static_cast<int>(VIN),static_cast<int>(R),static_cast<int>(C),static_cast<int>(RBIAS),static_cast<int>(RGND),static_cast<int>(RDIS) ), DSE( RESET,VIN,R,C,RBIAS,RGND,RDIS ), OPTIONS, "DISCRETE_555_CC" ),
#define DISCRETE_555_VCO1(NODE,RESET,VIN,OPTIONS) DSC_SND_ENTRY( NODE, dsd_555_vco1 , DSS_NODE , 3, DSE( static_cast<int>(RESET),static_cast<int>(VIN),NODE_NC ), DSE( RESET,VIN,-1 ), OPTIONS, "DISCRETE_555_VCO1" ),
#define DISCRETE_555_VCO1_CV(NODE,RESET,VIN,CTRLV,OPTIONS) DSC_SND_ENTRY( NODE, dsd_555_vco1 , DSS_NODE , 3, DSE( static_cast<int>(RESET),static_cast<int>(VIN),static_cast<int>(CTRLV) ), DSE( RESET,VIN,CTRLV ), OPTIONS, "DISCRETE_555_VCO1_CV" ),
-#define DISCRETE_566(NODE,VMOD,R,C,VPOS,VNEG,VCHARGE,OPTIONS) DSC_SND_ENTRY( NODE, dsd_566 , DSS_NODE , 7, DSE( static_cast<int>(VMOD),static_cast<int>(R),static_cast<int>(C),NODE_NC,NODE_NC,static_cast<int>(VCHARGE),NODE_NC ), DSE( VMOD,R,C,VPOS,VNEG,VCHARGE,OPTIONS ), NULL, "DISCRETE_566" ),
-#define DISCRETE_74LS624(NODE,ENAB,VMOD,VRNG,C,R_FREQ_IN,C_FREQ_IN,R_RNG_IN,OUTTYPE) DSC_SND_ENTRY( NODE, dsd_ls624 , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(VMOD),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,VMOD,VRNG,C,R_FREQ_IN,C_FREQ_IN,R_RNG_IN,OUTTYPE ), NULL, "DISCRETE_74LS624" ),
+#define DISCRETE_566(NODE,VMOD,R,C,VPOS,VNEG,VCHARGE,OPTIONS) DSC_SND_ENTRY( NODE, dsd_566 , DSS_NODE , 7, DSE( static_cast<int>(VMOD),static_cast<int>(R),static_cast<int>(C),NODE_NC,NODE_NC,static_cast<int>(VCHARGE),NODE_NC ), DSE( VMOD,R,C,VPOS,VNEG,VCHARGE,OPTIONS ), nullptr, "DISCRETE_566" ),
+#define DISCRETE_74LS624(NODE,ENAB,VMOD,VRNG,C,R_FREQ_IN,C_FREQ_IN,R_RNG_IN,OUTTYPE) DSC_SND_ENTRY( NODE, dsd_ls624 , DSS_NODE , 8, DSE( static_cast<int>(ENAB),static_cast<int>(VMOD),NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC ), DSE( ENAB,VMOD,VRNG,C,R_FREQ_IN,C_FREQ_IN,R_RNG_IN,OUTTYPE ), nullptr, "DISCRETE_74LS624" ),
/* NOP */
-#define DISCRETE_NOP(NODE) DSC_SND_ENTRY( NODE, dss_nop , DSS_NOP , 0, DSE( 0 ), DSE( 0 ), NULL, "DISCRETE_NOP" ),
+#define DISCRETE_NOP(NODE) DSC_SND_ENTRY( NODE, dss_nop , DSS_NOP , 0, DSE( 0 ), DSE( 0 ), nullptr, "DISCRETE_NOP" ),
/* logging */
-#define DISCRETE_CSVLOG1(NODE1) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 1, DSE( static_cast<int>(NODE1) ), DSE( NODE1 ), NULL, "DISCRETE_CSVLOG1" ),
-#define DISCRETE_CSVLOG2(NODE1,NODE2) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 2, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2) ), DSE( NODE1,NODE2 ), NULL, "DISCRETE_CSVLOG2" ),
-#define DISCRETE_CSVLOG3(NODE1,NODE2,NODE3) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 3, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2),static_cast<int>(NODE3) ), DSE( NODE1,NODE2,NODE3 ), NULL, "DISCRETE_CSVLOG3" ),
-#define DISCRETE_CSVLOG4(NODE1,NODE2,NODE3,NODE4) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 4, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2),static_cast<int>(NODE3),static_cast<int>(NODE4) ), DSE( NODE1,NODE2,NODE3,NODE4 ), NULL, "DISCRETE_CSVLOG4" ),
-#define DISCRETE_CSVLOG5(NODE1,NODE2,NODE3,NODE4,NODE5) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 5, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2),static_cast<int>(NODE3),static_cast<int>(NODE4),static_cast<int>(NODE5) ), DSE( NODE1,NODE2,NODE3,NODE4,NODE5 ), NULL, "DISCRETE_CSVLOG5" ),
-#define DISCRETE_WAVLOG1(NODE1,GAIN1) DSC_SND_ENTRY( NODE_SPECIAL, dso_wavlog , DSO_WAVLOG , 2, DSE( static_cast<int>(NODE1),NODE_NC ), DSE( NODE1,GAIN1 ), NULL, "DISCRETE_WAVLOG1" ),
-#define DISCRETE_WAVLOG2(NODE1,GAIN1,NODE2,GAIN2) DSC_SND_ENTRY( NODE_SPECIAL, dso_wavlog , DSO_WAVLOG , 4, DSE( static_cast<int>(NODE1),NODE_NC,static_cast<int>(NODE2),NODE_NC ), DSE( NODE1,GAIN1,NODE2,GAIN2 ), NULL, "DISCRETE_WAVLOG2" ),
+#define DISCRETE_CSVLOG1(NODE1) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 1, DSE( static_cast<int>(NODE1) ), DSE( NODE1 ), nullptr, "DISCRETE_CSVLOG1" ),
+#define DISCRETE_CSVLOG2(NODE1,NODE2) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 2, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2) ), DSE( NODE1,NODE2 ), nullptr, "DISCRETE_CSVLOG2" ),
+#define DISCRETE_CSVLOG3(NODE1,NODE2,NODE3) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 3, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2),static_cast<int>(NODE3) ), DSE( NODE1,NODE2,NODE3 ), nullptr, "DISCRETE_CSVLOG3" ),
+#define DISCRETE_CSVLOG4(NODE1,NODE2,NODE3,NODE4) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 4, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2),static_cast<int>(NODE3),static_cast<int>(NODE4) ), DSE( NODE1,NODE2,NODE3,NODE4 ), nullptr, "DISCRETE_CSVLOG4" ),
+#define DISCRETE_CSVLOG5(NODE1,NODE2,NODE3,NODE4,NODE5) DSC_SND_ENTRY( NODE_SPECIAL, dso_csvlog , DSO_CSVLOG , 5, DSE( static_cast<int>(NODE1),static_cast<int>(NODE2),static_cast<int>(NODE3),static_cast<int>(NODE4),static_cast<int>(NODE5) ), DSE( NODE1,NODE2,NODE3,NODE4,NODE5 ), nullptr, "DISCRETE_CSVLOG5" ),
+#define DISCRETE_WAVLOG1(NODE1,GAIN1) DSC_SND_ENTRY( NODE_SPECIAL, dso_wavlog , DSO_WAVLOG , 2, DSE( static_cast<int>(NODE1),NODE_NC ), DSE( NODE1,GAIN1 ), nullptr, "DISCRETE_WAVLOG1" ),
+#define DISCRETE_WAVLOG2(NODE1,GAIN1,NODE2,GAIN2) DSC_SND_ENTRY( NODE_SPECIAL, dso_wavlog , DSO_WAVLOG , 4, DSE( static_cast<int>(NODE1),NODE_NC,static_cast<int>(NODE2),NODE_NC ), DSE( NODE1,GAIN1,NODE2,GAIN2 ), nullptr, "DISCRETE_WAVLOG2" ),
/* import */
#define DISCRETE_IMPORT(INFO) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_IMPORT , 0, DSE( 0 ), DSE( 0 ), &(INFO##_discrete_interface), "DISCRETE_IMPORT" ),
-#define DISCRETE_DELETE(NODE_FROM, NODE_TO) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_DELETE , 2, DSE( static_cast<int>(NODE_FROM), static_cast<int>(NODE_TO) ), DSE( NODE_FROM, NODE_TO ), NULL, "DISCRETE_DELETE" ),
-#define DISCRETE_REPLACE DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_REPLACE , 0, DSE( 0 ), DSE( 0 ), NULL, "DISCRETE_REPLACE" ),
+#define DISCRETE_DELETE(NODE_FROM, NODE_TO) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_DELETE , 2, DSE( static_cast<int>(NODE_FROM), static_cast<int>(NODE_TO) ), DSE( NODE_FROM, NODE_TO ), nullptr, "DISCRETE_DELETE" ),
+#define DISCRETE_REPLACE DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_REPLACE , 0, DSE( 0 ), DSE( 0 ), nullptr, "DISCRETE_REPLACE" ),
/* parallel tasks */
-#define DISCRETE_TASK_START(TASK_GROUP) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_TASK_START, 2, DSE( NODE_NC, NODE_NC ), DSE( TASK_GROUP, 0 ), NULL, "DISCRETE_TASK_START" ),
-#define DISCRETE_TASK_END() DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_TASK_END , 0, DSE( 0 ), DSE( 0 ), NULL, "DISCRETE_TASK_END" ),
-//#define DISCRETE_TASK_SYNC() DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_TASK_SYNC , 0, DSE( 0 ), DSE( 0 ), NULL, "DISCRETE_TASK_SYNC" ),
+#define DISCRETE_TASK_START(TASK_GROUP) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_TASK_START, 2, DSE( NODE_NC, NODE_NC ), DSE( TASK_GROUP, 0 ), nullptr, "DISCRETE_TASK_START" ),
+#define DISCRETE_TASK_END() DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_TASK_END , 0, DSE( 0 ), DSE( 0 ), nullptr, "DISCRETE_TASK_END" ),
+//#define DISCRETE_TASK_SYNC() DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_TASK_SYNC , 0, DSE( 0 ), DSE( 0 ), nullptr, "DISCRETE_TASK_SYNC" ),
/* output */
-#define DISCRETE_OUTPUT(OPNODE,GAIN) DSC_SND_ENTRY( NODE_SPECIAL, dso_output , DSO_OUTPUT ,2, DSE( static_cast<int>(OPNODE),NODE_NC ), DSE( 0,GAIN ), NULL, "DISCRETE_OUTPUT" ),
+#define DISCRETE_OUTPUT(OPNODE,GAIN) DSC_SND_ENTRY( NODE_SPECIAL, dso_output , DSO_OUTPUT ,2, DSE( static_cast<int>(OPNODE),NODE_NC ), DSE( 0,GAIN ), nullptr, "DISCRETE_OUTPUT" ),
diff --git a/src/devices/sound/es5506.cpp b/src/devices/sound/es5506.cpp
index 7a27d7575f7..dc2602c7cea 100644
--- a/src/devices/sound/es5506.cpp
+++ b/src/devices/sound/es5506.cpp
@@ -146,7 +146,7 @@ es550x_device::es550x_device(const machine_config &mconfig, device_type type, co
m_ulaw_lookup(nullptr),
m_volume_lookup(nullptr),
#if MAKE_WAVS
- m_wavraw(NULL),
+ m_wavraw(nullptr),
#endif
m_eslog(nullptr),
m_region0(nullptr),
@@ -1047,7 +1047,7 @@ void es5506_device::generate_samples(INT32 **outputs, int offset, int samples)
/* generate from the appropriate source */
if (!base)
{
- logerror("es5506: NULL region base %d\n",voice->control >> 14);
+ logerror("es5506: nullptr region base %d\n",voice->control >> 14);
generate_dummy(voice, base, left, right, samples);
}
else if (voice->control & 0x2000)
@@ -1110,7 +1110,7 @@ void es5505_device::generate_samples(INT32 **outputs, int offset, int samples)
/* generate from the appropriate source */
if (!base)
{
- logerror("es5506: NULL region base %d\n",voice->control >> 14);
+ logerror("es5506: nullptr region base %d\n",voice->control >> 14);
generate_dummy(voice, base, left, right, samples);
}
else if (voice->control & 0x2000)
diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp
index a892945adad..c886e44178a 100644
--- a/src/devices/sound/qs1000.cpp
+++ b/src/devices/sound/qs1000.cpp
@@ -581,7 +581,7 @@ void qs1000_device::start_voice(int ch)
if (LOGGING_ENABLED)
printf("[%.6x] Freq:%.4x ????:%.4x Addr:%.4x\n", table_addr, freq, word1, base);
- // See Raccoon World and Wyvern Wings NULL sound
+ // See Raccoon World and Wyvern Wings nullptr sound
if (freq == 0)
return;
diff --git a/src/devices/sound/scsp.cpp b/src/devices/sound/scsp.cpp
index 1acf90f2c22..2d6054209c8 100644
--- a/src/devices/sound/scsp.cpp
+++ b/src/devices/sound/scsp.cpp
@@ -518,7 +518,7 @@ void scsp_device::init()
memory_region* ram_region = memregion(tag());
// coolridr.c defines a region for the RAM, stv.c doesn't (uses set_ram_base instead, which seems to be more correct anyway?)
- if (ram_region != NULL)
+ if (ram_region != nullptr)
{
m_SCSPRAM = ram_region->base();
m_SCSPRAM_LENGTH = ram_region->bytes();
diff --git a/src/devices/sound/scspdsp.cpp b/src/devices/sound/scspdsp.cpp
index 9989e48b08a..734f1a073cc 100644
--- a/src/devices/sound/scspdsp.cpp
+++ b/src/devices/sound/scspdsp.cpp
@@ -82,7 +82,7 @@ void SCSPDSP_Step(SCSPDSP *DSP)
memset(DSP->EFREG,0,2*16);
#if 0
int dump=0;
- FILE *f=NULL;
+ FILE *f=nullptr;
if(dump)
f=fopen("dsp.txt","wt");
#endif
diff --git a/src/devices/sound/spu.cpp b/src/devices/sound/spu.cpp
index 3686fab3f9d..4a14123c40d 100644
--- a/src/devices/sound/spu.cpp
+++ b/src/devices/sound/spu.cpp
@@ -543,7 +543,7 @@ public:
global_free(xam);
}
- // Set marker head to NULL if the list is now empty
+ // Set marker head to nullptr if the list is now empty
if (! marker_tail) marker_head=nullptr;
diff --git a/src/devices/sound/spu.h b/src/devices/sound/spu.h
index 6381464c7cd..8cb1e461b95 100644
--- a/src/devices/sound/spu.h
+++ b/src/devices/sound/spu.h
@@ -203,10 +203,10 @@ protected:
#if 0
void write_cache_pointer(outfile *fout,
cache_pointer *cp,
- sample_loop_cache *lc=NULL);
+ sample_loop_cache *lc=nullptr);
void read_cache_pointer(infile *fin,
cache_pointer *cp,
- sample_loop_cache **lc=NULL);
+ sample_loop_cache **lc=nullptr);
#endif
static float get_linear_rate(const int n);
static float get_linear_rate_neg_phase(const int n);
diff --git a/src/mame/audio/upd1771.cpp b/src/devices/sound/upd1771.cpp
index e826aafee0f..cef6a1c26d4 100644
--- a/src/mame/audio/upd1771.cpp
+++ b/src/devices/sound/upd1771.cpp
@@ -170,7 +170,7 @@
**********************************************************************/
#include "emu.h"
-#include "audio/upd1771.h"
+#include "upd1771.h"
#define LOG 0
diff --git a/src/mame/audio/upd1771.h b/src/devices/sound/upd1771.h
index 46ca16e0158..46ca16e0158 100644
--- a/src/mame/audio/upd1771.h
+++ b/src/devices/sound/upd1771.h
diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp
index ed26fe6772f..cb75e30b231 100644
--- a/src/devices/sound/upd7759.cpp
+++ b/src/devices/sound/upd7759.cpp
@@ -244,7 +244,7 @@ void upd7759_device::device_start()
m_rommask = romsize - 1;
}
- m_drqcallback.set_callback(DEVCB_NULL);
+ m_drqcallback.set_callback(DEVCB_NOOP);
}
else
{
@@ -325,7 +325,7 @@ void upd7756_device::device_start()
m_rommask = romsize - 1;
}
- m_drqcallback.set_callback(DEVCB_NULL);
+ m_drqcallback.set_callback(DEVCB_NOOP);
}
else
{
diff --git a/src/devices/sound/upd7759.h b/src/devices/sound/upd7759.h
index 6828810e4eb..27ecd86f651 100644
--- a/src/devices/sound/upd7759.h
+++ b/src/devices/sound/upd7759.h
@@ -95,8 +95,8 @@ protected:
INT16 m_sample; /* current sample value */
/* ROM access */
- optional_region_ptr<UINT8> m_rombase; /* pointer to ROM data or NULL for slave mode */
- UINT8 * m_rom; /* pointer to ROM data or NULL for slave mode */
+ optional_region_ptr<UINT8> m_rombase; /* pointer to ROM data or nullptr for slave mode */
+ UINT8 * m_rom; /* pointer to ROM data or nullptr for slave mode */
UINT32 m_romoffset; /* ROM offset to make save/restore easier */
UINT32 m_rommask; /* maximum address offset */
diff --git a/src/devices/sound/x1_010.cpp b/src/devices/sound/x1_010.cpp
index 8a599027c24..e1689df139c 100644
--- a/src/devices/sound/x1_010.cpp
+++ b/src/devices/sound/x1_010.cpp
@@ -80,7 +80,7 @@ struct X1_010_CHANNEL {
/* mixer tables and internal buffers */
-//static short *mixer_buffer = NULL;
+//static short *mixer_buffer = nullptr;
const device_type X1_010 = &device_creator<x1_010_device>;
diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp
index e7266e88b49..61b78e79447 100644
--- a/src/devices/video/ef9364.cpp
+++ b/src/devices/video/ef9364.cpp
@@ -41,7 +41,7 @@ ADDRESS_MAP_END
const address_space_config *ef9364_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
//**************************************************************************
diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp
index db278ce24bb..e86ca1b4b83 100644
--- a/src/devices/video/ef9365.cpp
+++ b/src/devices/video/ef9365.cpp
@@ -139,7 +139,7 @@ ADDRESS_MAP_END
const address_space_config *ef9365_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
//**************************************************************************
diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h
index e5739e39570..5427e0d0ef9 100644
--- a/src/devices/video/poly.h
+++ b/src/devices/video/poly.h
@@ -607,7 +607,7 @@ UINT32 poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::render_tile(
extent_t &extent = unit.extent[extnum];
extent.startx = istartx;
extent.stopx = istopx;
- extent.userdata = NULL;
+ extent.userdata = nullptr;
pixels += istopx - istartx;
// fill in the parameters for the extent
diff --git a/src/devices/video/v9938.cpp b/src/devices/video/v9938.cpp
index 38adc1e58aa..210377946e1 100644
--- a/src/devices/video/v9938.cpp
+++ b/src/devices/video/v9938.cpp
@@ -652,7 +652,7 @@ void v99x8_device::device_start()
save_item(NAME(m_cont_reg));
save_item(NAME(m_read_ahead));
// save_item(NAME(m_vram));
- // if ( m_vram_exp != NULL )
+ // if ( m_vram_exp != nullptr )
// save_pointer(NAME(m_vram_exp), 0x10000);
save_item(NAME(m_int_state));
save_item(NAME(m_scanline));
diff --git a/src/devices/video/vector.cpp b/src/devices/video/vector.cpp
index e83fc5b190e..bc0d62c0244 100644
--- a/src/devices/video/vector.cpp
+++ b/src/devices/video/vector.cpp
@@ -102,7 +102,7 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity)
ibucket = TEXTURE_INTENSITY_BUCKETS;
tex = &vectortex[ibucket][lbucket];
- if (tex->texture != NULL)
+ if (tex->texture != nullptr)
return tex->texture;
height = lbucket * VECTOR_WIDTH_DENOM / TEXTURE_LENGTH_BUCKETS;
diff --git a/src/devices/video/vooddefs.h b/src/devices/video/vooddefs.h
index 5bef9d4cc8e..7ccfcabb057 100644
--- a/src/devices/video/vooddefs.h
+++ b/src/devices/video/vooddefs.h
@@ -361,11 +361,11 @@ static inline UINT32 compute_raster_hash(const raster_info *info)
#define DITHER_G(val,dith) ((((val) << 2) - ((val) >> 4) + ((val) >> 6) + (dith)) >> 2)
#define DECLARE_DITHER_POINTERS \
- const UINT8 *dither_lookup = NULL; \
- const UINT8 *dither4 = NULL; \
- const UINT8 *dither = NULL
+ const UINT8 *dither_lookup = nullptr; \
+ const UINT8 *dither4 = nullptr; \
+ const UINT8 *dither = nullptr
#define DECLARE_DITHER_POINTERS_NO_DITHER_VAR \
- const UINT8 *dither_lookup = NULL;
+ const UINT8 *dither_lookup = nullptr;
#define COMPUTE_DITHER_POINTERS(FBZMODE, YY) \
do \
{ \
@@ -2718,7 +2718,7 @@ void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *ex
\
/* get pointers to the target buffer and depth buffer */ \
dest = (UINT16 *)destbase + scry * vd->fbi.rowpixels; \
- depth = (vd->fbi.auxoffs != ~0) ? ((UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels) : NULL; \
+ depth = (vd->fbi.auxoffs != ~0) ? ((UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels) : nullptr; \
\
/* compute the starting parameters */ \
dx = startx - (extra->ax >> 4); \
diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp
index b391298c1b5..98ea123f55b 100644
--- a/src/devices/video/voodoo.cpp
+++ b/src/devices/video/voodoo.cpp
@@ -218,7 +218,7 @@ UINT32 voodoo_reciplog[(2 << RECIPLOG_LOOKUP_BITS) + 2];
*************************************/
#define RASTERIZER_ENTRY(fbzcp, alpha, fog, fbz, tex0, tex1) \
- { NULL, voodoo_device::raster_##fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1, FALSE, 0, 0, 0, fbzcp, alpha, fog, fbz, tex0, tex1 },
+ { nullptr, voodoo_device::raster_##fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1, FALSE, 0, 0, 0, fbzcp, alpha, fog, fbz, tex0, tex1 },
static const raster_info predef_raster_table[] =
{
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp
index dedf97c780c..a7a510b56f7 100644
--- a/src/emu/addrmap.cpp
+++ b/src/emu/addrmap.cpp
@@ -445,7 +445,7 @@ void address_map::configure(address_spacenum spacenum, UINT8 databits)
void address_map::set_global_mask(offs_t mask)
{
-// if (m_entrylist != NULL)
+// if (m_entrylist != nullptr)
// throw emu_fatalerror("AM_GLOBALMASK must be specified before any entries");
m_globalmask = mask;
}
@@ -755,8 +755,8 @@ void address_map::map_validity_check(validity_checker &valid, const device_t &de
}
// make sure ports exist
-// if ((entry.m_read.m_type == AMH_PORT && entry.m_read.m_tag != NULL && portlist.find(entry.m_read.m_tag) == NULL) ||
-// (entry.m_write.m_type == AMH_PORT && entry.m_write.m_tag != NULL && portlist.find(entry.m_write.m_tag) == NULL))
+// if ((entry.m_read.m_type == AMH_PORT && entry.m_read.m_tag != nullptr && portlist.find(entry.m_read.m_tag) == nullptr) ||
+// (entry.m_write.m_type == AMH_PORT && entry.m_write.m_tag != nullptr && portlist.find(entry.m_write.m_tag) == nullptr))
// osd_printf_error("%s space memory map entry references nonexistent port tag '%s'\n", spaceconfig.m_name, entry.m_read.m_tag);
// validate bank and share tags
diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h
index 56e9fde3e8f..e4386d68365 100644
--- a/src/emu/addrmap.h
+++ b/src/emu/addrmap.h
@@ -302,7 +302,7 @@ public:
//**************************************************************************
// so that "0" can be used for unneeded address maps
-#define construct_address_map_0 NULL
+#define construct_address_map_0 nullptr
// start/end tags for the address map
#define ADDRESS_MAP_NAME(_name) construct_address_map_##_name
@@ -312,7 +312,7 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, device_t &device) \
{ \
typedef read##_bits##_delegate read_delegate ATTR_UNUSED; \
typedef write##_bits##_delegate write_delegate ATTR_UNUSED; \
- address_map_entry##_bits *curentry = NULL; \
+ address_map_entry##_bits *curentry = nullptr; \
(void)curentry; \
assert(&device != nullptr); \
map.configure(_space, _bits); \
@@ -322,7 +322,7 @@ void _class :: _name(::address_map &map, device_t &device) \
{ \
typedef read##_bits##_delegate read_delegate ATTR_UNUSED; \
typedef write##_bits##_delegate write_delegate ATTR_UNUSED; \
- address_map_entry##_bits *curentry = NULL; \
+ address_map_entry##_bits *curentry = nullptr; \
(void)curentry; \
assert(&device != nullptr); \
map.configure(AS_PROGRAM, _bits); \
@@ -365,83 +365,83 @@ void _class :: _name(::address_map &map, device_t &device) \
// driver data reads
#define AM_READ(_handler) \
- curentry->set_handler(read_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0));
+ curentry->set_handler(read_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr));
#define AM_READ8(_handler, _unitmask) \
- curentry->set_handler(read8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(read8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
#define AM_READ16(_handler, _unitmask) \
- curentry->set_handler(read16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(read16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
#define AM_READ32(_handler, _unitmask) \
- curentry->set_handler(read32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(read32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
// driver data writes
#define AM_WRITE(_handler) \
- curentry->set_handler(write_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0));
+ curentry->set_handler(write_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr));
#define AM_WRITE8(_handler, _unitmask) \
- curentry->set_handler(write8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(write8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
#define AM_WRITE16(_handler, _unitmask) \
- curentry->set_handler(write16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(write16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
#define AM_WRITE32(_handler, _unitmask) \
- curentry->set_handler(write32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(write32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
// driver data reads/writes
#define AM_READWRITE(_rhandler, _whandler) \
- curentry->set_handler(read_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)0), write_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)0));
+ curentry->set_handler(read_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)nullptr), write_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)nullptr));
#define AM_READWRITE8(_rhandler, _whandler, _unitmask) \
- curentry->set_handler(read8_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)0), write8_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(read8_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)nullptr), write8_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
#define AM_READWRITE16(_rhandler, _whandler, _unitmask) \
- curentry->set_handler(read16_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)0), write16_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(read16_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)nullptr), write16_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
#define AM_READWRITE32(_rhandler, _whandler, _unitmask) \
- curentry->set_handler(read32_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)0), write32_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)0), _unitmask);
+ curentry->set_handler(read32_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, DEVICE_SELF, (drivdata_class *)nullptr), write32_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, DEVICE_SELF, (drivdata_class *)nullptr), _unitmask);
// driver set offset. Upcast to base class because there are no data width variants,
// and the compiler complains if we don't do it explicitly
#define AM_SETOFFSET(_handler) \
- ((address_map_entry*)curentry)->set_handler(setoffset_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0));
+ ((address_map_entry*)curentry)->set_handler(setoffset_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)nullptr));
// device reads
#define AM_DEVREAD(_tag, _class, _handler) \
- curentry->set_handler(read_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0));
+ curentry->set_handler(read_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr));
#define AM_DEVREAD8(_tag, _class, _handler, _unitmask) \
- curentry->set_handler(read8_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(read8_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr), _unitmask);
#define AM_DEVREAD16(_tag, _class, _handler, _unitmask) \
- curentry->set_handler(read16_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(read16_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr), _unitmask);
#define AM_DEVREAD32(_tag, _class, _handler, _unitmask) \
- curentry->set_handler(read32_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(read32_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr), _unitmask);
// device writes
#define AM_DEVWRITE(_tag, _class, _handler) \
- curentry->set_handler(write_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0));
+ curentry->set_handler(write_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr));
#define AM_DEVWRITE8(_tag, _class, _handler, _unitmask) \
- curentry->set_handler(write8_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(write8_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr), _unitmask);
#define AM_DEVWRITE16(_tag, _class, _handler, _unitmask) \
- curentry->set_handler(write16_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(write16_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr), _unitmask);
#define AM_DEVWRITE32(_tag, _class, _handler, _unitmask) \
- curentry->set_handler(write32_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(write32_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr), _unitmask);
// device reads/writes
#define AM_DEVREADWRITE(_tag, _class, _rhandler, _whandler) \
- curentry->set_handler(read_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)0), write_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)0));
+ curentry->set_handler(read_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)nullptr), write_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)nullptr));
#define AM_DEVREADWRITE8(_tag, _class, _rhandler, _whandler, _unitmask) \
- curentry->set_handler(read8_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)0), write8_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(read8_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)nullptr), write8_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)nullptr), _unitmask);
#define AM_DEVREADWRITE16(_tag, _class, _rhandler, _whandler, _unitmask) \
- curentry->set_handler(read16_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)0), write16_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(read16_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)nullptr), write16_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)nullptr), _unitmask);
#define AM_DEVREADWRITE32(_tag, _class, _rhandler, _whandler, _unitmask) \
- curentry->set_handler(read32_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)0), write32_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)0), _unitmask);
+ curentry->set_handler(read32_delegate(&_class::_rhandler, #_class "::" #_rhandler, _tag, (_class *)nullptr), write32_delegate(&_class::_whandler, #_class "::" #_whandler, _tag, (_class *)nullptr), _unitmask);
// device set offset
#define AM_DEVSETOFFSET(_tag, _class, _handler) \
- ((address_map_entry*)curentry)->set_handler(setoffset_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)0));
+ ((address_map_entry*)curentry)->set_handler(setoffset_delegate(&_class::_handler, #_class "::" #_handler, _tag, (_class *)nullptr));
// device mapping
#define AM_DEVICE(_tag, _class, _handler) \
- curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), 0, 0);
+ curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)nullptr), 0, 0);
#define AM_DEVICE8(_tag, _class, _handler, _unitmask) \
- curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), 8, _unitmask);
+ curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)nullptr), 8, _unitmask);
#define AM_DEVICE16(_tag, _class, _handler, _unitmask) \
- curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), 16, _unitmask);
+ curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)nullptr), 16, _unitmask);
#define AM_DEVICE32(_tag, _class, _handler, _unitmask) \
- curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), 32, _unitmask);
+ curentry->set_submap(_tag, address_map_delegate(&_class::_handler, #_class "::" #_handler, (_class *)nullptr), 32, _unitmask);
// special-case accesses
#define AM_ROM \
diff --git a/src/emu/crsshair.h b/src/emu/crsshair.h
index 91becc37f58..0faf47f508e 100644
--- a/src/emu/crsshair.h
+++ b/src/emu/crsshair.h
@@ -65,7 +65,7 @@ public:
void set_screen(int player, screen_device *screen) { m_screen[player] = screen; }
/* return TRUE if any crosshairs are used */
- int get_usage() { return m_usage; }
+ int get_usage() const { return m_usage; }
/* return the current crosshair settings for the given player */
void get_user_settings(UINT8 player, crosshair_user_settings *settings);
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 084eacfc66f..004ec75a8d1 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -510,7 +510,7 @@ static void global_set(symbol_table &table, void *ref, UINT64 value)
int debug_command_parameter_number(running_machine &machine, const char *param, UINT64 *result)
{
- /* NULL parameter does nothing and returns no error */
+ /* nullptr parameter does nothing and returns no error */
if (param == nullptr)
return TRUE;
@@ -614,7 +614,7 @@ int debug_command_parameter_cpu_space(running_machine &machine, const char *para
static int debug_command_parameter_expression(running_machine &machine, const char *param, parsed_expression &result)
{
- /* NULL parameter does nothing and returns no error */
+ /* nullptr parameter does nothing and returns no error */
if (param == nullptr)
return TRUE;
@@ -644,7 +644,7 @@ static int debug_command_parameter_command(running_machine &machine, const char
{
CMDERR err;
- /* NULL parameter does nothing and returns no error */
+ /* nullptr parameter does nothing and returns no error */
if (param == nullptr)
return TRUE;
diff --git a/src/emu/debug/dvdisasm.cpp b/src/emu/debug/dvdisasm.cpp
index ffe188b722d..c0ed17bdde0 100644
--- a/src/emu/debug/dvdisasm.cpp
+++ b/src/emu/debug/dvdisasm.cpp
@@ -25,7 +25,6 @@
debug_view_disasm_source::debug_view_disasm_source(const char *name, device_t &device)
: debug_view_source(name, &device),
- m_device(device),
m_disasmintf(dynamic_cast<device_disasm_interface *>(&device)),
m_space(device.memory().space(AS_PROGRAM)),
m_decrypted_space(device.memory().has_space(AS_DECRYPTED_OPCODES) ? device.memory().space(AS_DECRYPTED_OPCODES) : device.memory().space(AS_PROGRAM))
@@ -69,7 +68,7 @@ debug_view_disasm::debug_view_disasm(running_machine &machine, debug_view_osd_up
for (const debug_view_source &source : m_source_list)
{
const debug_view_disasm_source &dasmsource = downcast<const debug_view_disasm_source &>(source);
- total_comments += dasmsource.m_device.debug()->comment_count();
+ total_comments += dasmsource.device()->debug()->comment_count();
}
// configure the view
@@ -122,7 +121,7 @@ void debug_view_disasm::view_notify(debug_view_notification type)
adjust_visible_y_for_cursor();
else if (type == VIEW_NOTIFY_SOURCE_CHANGED)
- m_expression.set_context(&downcast<const debug_view_disasm_source *>(m_source)->device().debug()->symtable());
+ m_expression.set_context(&downcast<const debug_view_disasm_source *>(m_source)->device()->debug()->symtable());
}
@@ -168,7 +167,7 @@ void debug_view_disasm::view_char(int chval)
case DCH_HOME: // set the active column to the PC
{
const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source);
- offs_t pc = source.m_space.address_to_byte(source.m_device.safe_pc()) & source.m_space.logbytemask();
+ offs_t pc = source.m_space.address_to_byte(source.device()->safe_pc()) & source.m_space.logbytemask();
// figure out which row the pc is on
for (unsigned int curline = 0; curline < m_byteaddress.size(); curline++)
@@ -273,7 +272,7 @@ offs_t debug_view_disasm::find_pc_backwards(offs_t targetpc, int numinstrs)
if (debug_cpu_translate(source.m_space, TRANSLATE_FETCH, &physpcbyte))
{
char dasmbuffer[100];
- instlen = source.m_device.debug()->disassemble(dasmbuffer, scanpc, &opbuf[1000 + scanpcbyte - targetpcbyte], &argbuf[1000 + scanpcbyte - targetpcbyte]) & DASMFLAG_LENGTHMASK;
+ instlen = source.device()->debug()->disassemble(dasmbuffer, scanpc, &opbuf[1000 + scanpcbyte - targetpcbyte], &argbuf[1000 + scanpcbyte - targetpcbyte]) & DASMFLAG_LENGTHMASK;
}
// count this one
@@ -408,7 +407,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
}
// disassemble the result
- pc += numbytes = source.m_device.debug()->disassemble(buffer, pc & source.m_space.logaddrmask(), opbuf, argbuf) & DASMFLAG_LENGTHMASK;
+ pc += numbytes = source.device()->debug()->disassemble(buffer, pc & source.m_space.logaddrmask(), opbuf, argbuf) & DASMFLAG_LENGTHMASK;
}
else
strcpy(buffer, "<unmapped>");
@@ -428,7 +427,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
{
// get and add the comment, if present
const offs_t comment_address = source.m_space.byte_to_address(m_byteaddress[instr]);
- const char *const text = source.m_device.debug()->comment_text(comment_address);
+ const char *const text = source.device()->debug()->comment_text(comment_address);
if (text != nullptr)
util::stream_format(m_dasm.seekp(base + m_divider2), "// %.*s", m_total.x - m_divider2 - 4, text);
}
@@ -442,7 +441,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
// update opcode base information
m_last_direct_decrypted = source.m_decrypted_space.direct().ptr();
m_last_direct_raw = source.m_space.direct().ptr();
- m_last_change_count = source.m_device.debug()->comment_change_count();
+ m_last_change_count = source.device()->debug()->comment_change_count();
// no longer need to recompute
m_recompute = false;
@@ -459,7 +458,7 @@ void debug_view_disasm::view_update()
{
const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source);
- offs_t pc = source.m_device.safe_pc();
+ offs_t pc = source.device()->safe_pc();
offs_t pcbyte = source.m_space.address_to_byte(pc) & source.m_space.logbytemask();
// update our context; if the expression is dirty, recompute
@@ -493,7 +492,7 @@ void debug_view_disasm::view_update()
m_recompute = true;
// if the comments have changed, redo it
- if (m_last_change_count != source.m_device.debug()->comment_change_count())
+ if (m_last_change_count != source.device()->debug()->comment_change_count())
m_recompute = true;
// if we need to recompute, do it
@@ -502,7 +501,7 @@ recompute:
if (m_recompute)
{
// recompute the view
- if (!m_byteaddress.empty() && m_last_change_count != source.m_device.debug()->comment_change_count())
+ if (!m_byteaddress.empty() && m_last_change_count != source.device()->debug()->comment_change_count())
{
// smoosh us against the left column, but not the top row
m_topleft.x = 0;
@@ -569,7 +568,7 @@ recompute:
// if we're on a line with a breakpoint, tag it changed
else
{
- for (device_debug::breakpoint *bp = source.m_device.debug()->breakpoint_first(); bp != nullptr; bp = bp->next())
+ for (device_debug::breakpoint *bp = source.device()->debug()->breakpoint_first(); bp != nullptr; bp = bp->next())
if (m_byteaddress[effrow] == (source.m_space.address_to_byte(bp->address()) & source.m_space.logbytemask()))
attrib = DCA_CHANGED;
}
@@ -579,7 +578,7 @@ recompute:
attrib |= DCA_SELECTED;
// if we've visited this pc, mark it as such
- if (source.m_device.debug()->track_pc_visited(m_byteaddress[effrow]))
+ if (source.device()->debug()->track_pc_visited(m_byteaddress[effrow]))
attrib |= DCA_VISITED;
// get the effective string
diff --git a/src/emu/debug/dvdisasm.h b/src/emu/debug/dvdisasm.h
index c474f5021a6..662d5102425 100644
--- a/src/emu/debug/dvdisasm.h
+++ b/src/emu/debug/dvdisasm.h
@@ -45,12 +45,10 @@ class debug_view_disasm_source : public debug_view_source
public:
// getters
- device_t &device() const { return m_device; }
address_space &space() const { return m_space; }
private:
// internal state
- device_t & m_device; // underlying device
device_disasm_interface *m_disasmintf; // disassembly interface
address_space & m_space; // address space to display
address_space & m_decrypted_space; // address space to display for decrypted opcodes
diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h
index 234bd0ed19b..3b15748ed2e 100644
--- a/src/emu/debug/dvmemory.h
+++ b/src/emu/debug/dvmemory.h
@@ -52,7 +52,7 @@ class debug_view_memory : public debug_view
public:
// getters
- const char *expression() { return m_expression.string(); }
+ const char *expression() const { return m_expression.string(); }
int get_data_format() { flush_updates(); return m_data_format; }
UINT32 chunks_per_row() { flush_updates(); return m_chunks_per_row; }
bool reverse() const { return m_reverse_view; }
diff --git a/src/emu/debug/dvstate.cpp b/src/emu/debug/dvstate.cpp
index 0c1924d90fa..ca216c12f78 100644
--- a/src/emu/debug/dvstate.cpp
+++ b/src/emu/debug/dvstate.cpp
@@ -24,7 +24,6 @@
debug_view_state_source::debug_view_state_source(const char *name, device_t &device)
: debug_view_source(name, &device),
- m_device(device),
m_stateintf(dynamic_cast<device_state_interface *>(&device)),
m_execintf(dynamic_cast<device_execute_interface *>(&device))
{
diff --git a/src/emu/debug/dvstate.h b/src/emu/debug/dvstate.h
index 909526ee5f6..ad51ff69b3b 100644
--- a/src/emu/debug/dvstate.h
+++ b/src/emu/debug/dvstate.h
@@ -25,14 +25,8 @@ class debug_view_state_source : public debug_view_source
// construction/destruction
debug_view_state_source(const char *name, device_t &device);
-
-public:
- // getters
- device_t &device() const { return m_device; }
-
private:
// internal state
- device_t & m_device; // underlying device
device_state_interface *m_stateintf; // state interface
device_execute_interface *m_execintf; // execution interface
};
diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp
index 7a9ed4697ae..eb2477a1374 100644
--- a/src/emu/debug/express.cpp
+++ b/src/emu/debug/express.cpp
@@ -613,7 +613,7 @@ void parsed_expression::print_tokens(FILE *out)
{
#if DEBUG_TOKENS
osd_printf_debug("----\n");
- for (parse_token *token = m_tokens.first(); token != NULL; token = token->next())
+ for (parse_token *token = m_tokens.first(); token != nullptr; token = token->next())
{
switch (token->type)
{
diff --git a/src/emu/debug/express.h b/src/emu/debug/express.h
index bbbac044691..5eb961606e4 100644
--- a/src/emu/debug/express.h
+++ b/src/emu/debug/express.h
@@ -181,7 +181,7 @@ public:
void add(const char *name, UINT64 constvalue);
void add(const char *name, void *ref, getter_func getter, setter_func setter = nullptr);
void add(const char *name, void *ref, int minparams, int maxparams, execute_func execute);
- symbol_entry *find(const char *name) { return m_symlist.find(name); }
+ symbol_entry *find(const char *name) const { return m_symlist.find(name); }
symbol_entry *find_deep(const char *name);
// value getter/setter
diff --git a/src/emu/debug/textbuf.cpp b/src/emu/debug/textbuf.cpp
index 476fe6e1efc..5f2fbf8280b 100644
--- a/src/emu/debug/textbuf.cpp
+++ b/src/emu/debug/textbuf.cpp
@@ -261,7 +261,7 @@ void text_buffer_print_wrap(text_buffer *text, const char *data, int wrapcol)
}
}
- /* NULL terminate what we have on this line */
+ /* nullptr terminate what we have on this line */
text->buffer[text->bufend] = 0;
}
diff --git a/src/emu/devcb.h b/src/emu/devcb.h
index 5aefb2b3429..d84d3bca1dc 100644
--- a/src/emu/devcb.h
+++ b/src/emu/devcb.h
@@ -23,7 +23,6 @@
//**************************************************************************
// wrappers for ioports, constants, and loggers
-#define DEVCB_NULL devcb_base::null_desc()
#define DEVCB_NOOP devcb_base::null_desc()
#define DEVCB_IOPORT(_tag) devcb_base::ioport_desc(_tag)
#define DEVCB_CONSTANT(_value) devcb_base::constant_desc(_value)
@@ -33,32 +32,32 @@
#define DEVCB_GND DEVCB_CONSTANT(0)
// wrappers for read callbacks into the owner device
-#define DEVCB_READLINE(_class, _func) read_line_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_READ8(_class, _func) read8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_READ16(_class, _func) read16_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_READ32(_class, _func) read32_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_READ64(_class, _func) read64_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
+#define DEVCB_READLINE(_class, _func) read_line_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_READ8(_class, _func) read8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_READ16(_class, _func) read16_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_READ32(_class, _func) read32_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_READ64(_class, _func) read64_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
// wrappers for read callbacks into any tagged device
-#define DEVCB_DEVREADLINE(tag, _class, _func) read_line_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVREAD8(tag, _class, _func) read8_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVREAD16(tag, _class, _func) read16_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVREAD32(tag, _class, _func) read32_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVREAD64(tag, _class, _func) read64_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
+#define DEVCB_DEVREADLINE(tag, _class, _func) read_line_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVREAD8(tag, _class, _func) read8_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVREAD16(tag, _class, _func) read16_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVREAD32(tag, _class, _func) read32_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVREAD64(tag, _class, _func) read64_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
// wrappers for write callbacks into the owner device
-#define DEVCB_WRITELINE(_class, _func) write_line_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_WRITE8(_class, _func) write8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_WRITE16(_class, _func) write16_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_WRITE32(_class, _func) write32_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
-#define DEVCB_WRITE64(_class, _func) write64_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0)
+#define DEVCB_WRITELINE(_class, _func) write_line_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_WRITE8(_class, _func) write8_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_WRITE16(_class, _func) write16_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_WRITE32(_class, _func) write32_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
+#define DEVCB_WRITE64(_class, _func) write64_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)
// wrappers for write callbacks into any tagged device
-#define DEVCB_DEVWRITELINE(tag, _class, _func) write_line_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVWRITE8(tag, _class, _func) write8_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVWRITE16(tag, _class, _func) write16_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVWRITE32(tag, _class, _func) write32_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
-#define DEVCB_DEVWRITE64(tag, _class, _func) write64_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)0)
+#define DEVCB_DEVWRITELINE(tag, _class, _func) write_line_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVWRITE8(tag, _class, _func) write8_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVWRITE16(tag, _class, _func) write16_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVWRITE32(tag, _class, _func) write32_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
+#define DEVCB_DEVWRITE64(tag, _class, _func) write64_delegate(&_class::_func, #_class "::" #_func, tag, (_class *)nullptr)
// machine config helpers to add shift, mask, or address space configuration
#define MCFG_DEVCB_RSHIFT(_shift) devcb->set_rshift(_shift);
diff --git a/src/emu/devfind.cpp b/src/emu/devfind.cpp
index 820a4e110c6..803bd0a15e5 100644
--- a/src/emu/devfind.cpp
+++ b/src/emu/devfind.cpp
@@ -42,7 +42,7 @@ finder_base::~finder_base()
void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) const
{
- // look up the region and return NULL if not found
+ // look up the region and return nullptr if not found
memory_region *region = m_base.memregion(m_tag);
if (region == nullptr)
{
@@ -119,7 +119,7 @@ bool finder_base::validate_memregion(size_t bytes, bool required) const
void *finder_base::find_memshare(UINT8 width, size_t &bytes, bool required) const
{
- // look up the share and return NULL if not found
+ // look up the share and return nullptr if not found
memory_share *share = m_base.memshare(m_tag);
if (share == nullptr)
return nullptr;
diff --git a/src/emu/devfind.h b/src/emu/devfind.h
index 98599e4a6e9..8ea8e59908c 100644
--- a/src/emu/devfind.h
+++ b/src/emu/devfind.h
@@ -154,7 +154,7 @@ public:
: object_finder_base<memory_region>(base, tag) { }
// make reference use transparent as well
- operator memory_region &() { assert(object_finder_base<memory_region>::m_target != NULL); return *object_finder_base<memory_region>::m_target; }
+ operator memory_region &() const { assert(object_finder_base<memory_region>::m_target != nullptr); return *object_finder_base<memory_region>::m_target; }
// finder
virtual bool findit(bool isvalidation = false) override
@@ -192,7 +192,7 @@ public:
: object_finder_base<memory_bank>(base, tag) { }
// make reference use transparent as well
- operator memory_bank &() { assert(object_finder_base<memory_bank>::m_target != NULL); return *object_finder_base<memory_bank>::m_target; }
+ operator memory_bank &() const { assert(object_finder_base<memory_bank>::m_target != nullptr); return *object_finder_base<memory_bank>::m_target; }
// finder
virtual bool findit(bool isvalidation = false) override
@@ -230,9 +230,9 @@ public:
: object_finder_base<ioport_port>(base, tag) { }
// make reference use transparent as well
- operator ioport_port &() { assert(object_finder_base<ioport_port>::m_target != NULL); return *object_finder_base<ioport_port>::m_target; }
+ operator ioport_port &() const { assert(object_finder_base<ioport_port>::m_target != nullptr); return *object_finder_base<ioport_port>::m_target; }
- // allow dereference even when target is NULL so read_safe() can be used
+ // allow dereference even when target is nullptr so read_safe() can be used
ioport_port *operator->() const override { return object_finder_base<ioport_port>::m_target; }
// finder
diff --git a/src/emu/device.h b/src/emu/device.h
index c33939dc210..114e8e28b16 100644
--- a/src/emu/device.h
+++ b/src/emu/device.h
@@ -190,7 +190,7 @@ public:
virtual ~device_t();
// getters
- running_machine &machine() const { /*assert(m_machine != NULL);*/ return *m_machine; }
+ running_machine &machine() const { /*assert(m_machine != nullptr);*/ return *m_machine; }
const char *tag() const { return m_tag.c_str(); }
const char *basetag() const { return m_basetag.c_str(); }
device_type type() const { return m_type; }
@@ -442,7 +442,7 @@ protected:
// search depth-first for the next device
void advance()
{
- // remember our starting position, and end immediately if we're NULL
+ // remember our starting position, and end immediately if we're nullptr
device_t *start = m_curdevice;
if (start == nullptr)
return;
@@ -730,7 +730,7 @@ private:
inline device_t *device_t::subdevice(const char *tag) const
{
- // empty string or NULL means this device
+ // empty string or nullptr means this device
if (tag == nullptr || *tag == 0)
return const_cast<device_t *>(this);
@@ -747,7 +747,7 @@ inline device_t *device_t::subdevice(const char *tag) const
inline device_t *device_t::siblingdevice(const char *tag) const
{
- // empty string or NULL means this device
+ // empty string or nullptr means this device
if (tag == nullptr || *tag == 0)
return const_cast<device_t *>(this);
@@ -758,7 +758,7 @@ inline device_t *device_t::siblingdevice(const char *tag) const
if (m_owner != nullptr)
return m_owner->subdevice(tag);
- // otherwise, it's NULL unless the tag is absolute
+ // otherwise, it's nullptr unless the tag is absolute
return (tag[0] == ':') ? subdevice(tag) : nullptr;
}
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 4fd379b5dae..240fd950043 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -89,21 +89,21 @@ enum
#define MCFG_DEVICE_DISABLE() \
device_execute_interface::static_set_disable(*device);
#define MCFG_DEVICE_VBLANK_INT_DRIVER(_tag, _class, _func) \
- device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0), _tag);
+ device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr), _tag);
#define MCFG_DEVICE_VBLANK_INT_DEVICE(_tag, _devtag, _class, _func) \
- device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0), _tag);
+ device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)nullptr), _tag);
#define MCFG_DEVICE_VBLANK_INT_REMOVE() \
- device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(), NULL);
+ device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(), nullptr);
#define MCFG_DEVICE_PERIODIC_INT_DRIVER(_class, _func, _rate) \
- device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0), attotime::from_hz(_rate));
+ device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr), attotime::from_hz(_rate));
#define MCFG_DEVICE_PERIODIC_INT_DEVICE(_devtag, _class, _func, _rate) \
- device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0), attotime::from_hz(_rate));
+ device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)nullptr), attotime::from_hz(_rate));
#define MCFG_DEVICE_PERIODIC_INT_REMOVE() \
device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(), attotime());
#define MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(_class, _func) \
- device_execute_interface::static_set_irq_acknowledge_callback(*device, device_irq_acknowledge_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0));
+ device_execute_interface::static_set_irq_acknowledge_callback(*device, device_irq_acknowledge_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr));
#define MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE(_devtag, _class, _func) \
- device_execute_interface::static_set_irq_acknowledge_callback(*device, device_irq_acknowledge_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0));
+ device_execute_interface::static_set_irq_acknowledge_callback(*device, device_irq_acknowledge_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)nullptr));
#define MCFG_DEVICE_IRQ_ACKNOWLEDGE_REMOVE() \
device_execute_interface::static_set_irq_acknowledge_callback(*device, device_irq_acknowledge_delegate());
diff --git a/src/emu/digfx.h b/src/emu/digfx.h
index ec13147e966..510656dc253 100644
--- a/src/emu/digfx.h
+++ b/src/emu/digfx.h
@@ -178,7 +178,7 @@ struct gfx_decode_entry
{
const char * memory_region; // memory region where the data resides
UINT32 start; // offset of beginning of data to decode
- const gfx_layout *gfxlayout; // pointer to gfx_layout describing the layout; NULL marks the end of the array
+ const gfx_layout *gfxlayout; // pointer to gfx_layout describing the layout; nullptr marks the end of the array
UINT16 color_codes_start; // offset in the color lookup table where color codes start
UINT16 total_color_codes; // total number of color codes
UINT32 flags; // flags and optional scaling factors
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index 67d7bbf06f5..c1e1e6de409 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -372,7 +372,7 @@ UINT8 *device_image_interface::get_software_region(const char *tag)
sprintf( full_tag, "%s:%s", device().tag(), tag );
memory_region *region = device().machine().root_device().memregion(full_tag);
- return region != NULL ? region->base() : NULL;
+ return region != nullptr ? region->base() : nullptr;
}
@@ -387,7 +387,7 @@ UINT32 device_image_interface::get_software_region_length(const char *tag)
sprintf( full_tag, "%s:%s", device().tag(), tag );
memory_region *region = device().machine().root_device().memregion(full_tag);
- return region != NULL ? region->bytes() : 0;
+ return region != nullptr ? region->bytes() : 0;
}
@@ -1178,8 +1178,8 @@ void device_image_interface::update_names(const device_type device_type, const c
// strings.
//
// str1:str2:str3 => swlist_name - str1, swname - str2, swpart - str3
-// str1:str2 => swlist_name - NULL, swname - str1, swpart - str2
-// str1 => swlist_name - NULL, swname - str1, swpart - NULL
+// str1:str2 => swlist_name - nullptr, swname - str1, swpart - str2
+// str1 => swlist_name - nullptr, swname - str1, swpart - nullptr
//
// Notice however that we could also have been
// passed a string swlist_name:swname, and thus
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index 08001c8da89..10b4144e27f 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -165,24 +165,24 @@ public:
virtual const char *file_extensions() const = 0;
virtual const option_guide *create_option_guide() const = 0;
- const image_device_format *device_get_indexed_creatable_format(int index) { return m_formatlist.find(index); }
+ const image_device_format *device_get_indexed_creatable_format(int index) const { return m_formatlist.find(index); }
const image_device_format *device_get_named_creatable_format(const char *format_name);
- const option_guide *device_get_creation_option_guide() { return create_option_guide(); }
+ const option_guide *device_get_creation_option_guide() const { return create_option_guide(); }
const char *error();
void seterror(image_error_t err, const char *message);
void message(const char *format, ...) ATTR_PRINTF(2,3);
bool exists() { return !m_image_name.empty(); }
- const char *filename() { if (m_image_name.empty()) return nullptr; else return m_image_name.c_str(); }
- const char *basename() { if (m_basename.empty()) return nullptr; else return m_basename.c_str(); }
- const char *basename_noext() { if (m_basename_noext.empty()) return nullptr; else return m_basename_noext.c_str(); }
- const char *filetype() { if (m_filetype.empty()) return nullptr; else return m_filetype.c_str(); }
+ const char *filename() const { if (m_image_name.empty()) return nullptr; else return m_image_name.c_str(); }
+ const char *basename() const { if (m_basename.empty()) return nullptr; else return m_basename.c_str(); }
+ const char *basename_noext() const { if (m_basename_noext.empty()) return nullptr; else return m_basename_noext.c_str(); }
+ const char *filetype() const { if (m_filetype.empty()) return nullptr; else return m_filetype.c_str(); }
bool is_open() const { return bool(m_file); }
- util::core_file &image_core_file() { return *m_file; }
+ util::core_file &image_core_file() const { return *m_file; }
UINT64 length() { check_for_file(); return m_file->size(); }
- bool is_readonly() { return m_readonly; }
- bool has_been_created() { return m_created; }
+ bool is_readonly() const { return m_readonly; }
+ bool has_been_created() const { return m_created; }
void make_readonly() { m_readonly = true; }
UINT32 fread(void *buffer, UINT32 length) { check_for_file(); return m_file->read(buffer, length); }
UINT32 fread(optional_shared_ptr<UINT8> &ptr, UINT32 length) { ptr.allocate(length); return fread(ptr.target(), length); }
@@ -197,14 +197,14 @@ public:
// configuration access
void set_init_phase() { m_init_phase = TRUE; }
- const char* longname() { return m_longname.c_str(); }
- const char* manufacturer() { return m_manufacturer.c_str(); }
- const char* year() { return m_year.c_str(); }
- UINT32 supported() { return m_supported; }
+ const char* longname() const { return m_longname.c_str(); }
+ const char* manufacturer() const { return m_manufacturer.c_str(); }
+ const char* year() const { return m_year.c_str(); }
+ UINT32 supported() const { return m_supported; }
- const software_info *software_entry() { return m_software_info_ptr; }
- const software_part *part_entry() { return m_software_part_ptr; }
- const char *software_list_name() { return m_software_list_name.c_str(); }
+ const software_info *software_entry() const { return m_software_info_ptr; }
+ const software_part *part_entry() const { return m_software_part_ptr; }
+ const char *software_list_name() const { return m_software_list_name.c_str(); }
void set_working_directory(const char *working_directory) { m_working_directory = working_directory; }
const char * working_directory();
@@ -258,7 +258,7 @@ protected:
void clear_error();
- void check_for_file() { assert_always(m_file, "Illegal operation on unmounted image"); }
+ void check_for_file() const { assert_always(m_file, "Illegal operation on unmounted image"); }
void setup_working_directory();
bool try_change_working_directory(const char *subdir);
diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h
index 941a8c87729..6bd85ff5e5e 100644
--- a/src/emu/dimemory.h
+++ b/src/emu/dimemory.h
@@ -47,7 +47,7 @@ const int TRANSLATE_FETCH_DEBUG = (TRANSLATE_FETCH | TRANSLATE_DEBUG_MASK);
device_memory_interface::static_set_addrmap(*device, _space, ADDRESS_MAP_NAME(_map));
#define MCFG_DEVICE_REMOVE_ADDRESS_MAP(_space) \
- device_memory_interface::static_set_addrmap(*device, _space, NULL);
+ device_memory_interface::static_set_addrmap(*device, _space, nullptr);
#define MCFG_DEVICE_PROGRAM_MAP(_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_PROGRAM, _map)
diff --git a/src/emu/dinetwork.h b/src/emu/dinetwork.h
index f4383f67834..dd78dbcea15 100644
--- a/src/emu/dinetwork.h
+++ b/src/emu/dinetwork.h
@@ -15,9 +15,9 @@ public:
void set_promisc(bool promisc);
void set_mac(const char *mac);
- const char *get_mac() { return m_mac; }
- bool get_promisc() { return m_promisc; }
- int get_interface() { return m_intf; }
+ const char *get_mac() const { return m_mac; }
+ bool get_promisc() const { return m_promisc; }
+ int get_interface() const { return m_intf; }
int send(UINT8 *buf, int len) const;
virtual void recv_cb(UINT8 *buf, int len);
diff --git a/src/emu/diserial.h b/src/emu/diserial.h
index 185c6849a4d..dbb9c3b8c55 100644
--- a/src/emu/diserial.h
+++ b/src/emu/diserial.h
@@ -109,12 +109,12 @@ protected:
bool is_receive_register_full();
bool is_transmit_register_empty();
- bool is_receive_register_synchronized() { return m_rcv_flags & RECEIVE_REGISTER_SYNCHRONISED; }
- bool is_receive_register_shifting() { return m_rcv_bit_count_received > 0; }
- bool is_receive_framing_error() { return m_rcv_framing_error; }
- bool is_receive_parity_error() { return m_rcv_parity_error; }
+ bool is_receive_register_synchronized() const { return m_rcv_flags & RECEIVE_REGISTER_SYNCHRONISED; }
+ bool is_receive_register_shifting() const { return m_rcv_bit_count_received > 0; }
+ bool is_receive_framing_error() const { return m_rcv_framing_error; }
+ bool is_receive_parity_error() const { return m_rcv_parity_error; }
- UINT8 get_received_char() { return m_rcv_byte_received; }
+ UINT8 get_received_char() const { return m_rcv_byte_received; }
virtual void tra_callback() { }
virtual void rcv_callback() { receive_register_update_bit(m_rcv_line); }
diff --git a/src/emu/dispatch.h b/src/emu/dispatch.h
index f9442a658da..fae34197100 100644
--- a/src/emu/dispatch.h
+++ b/src/emu/dispatch.h
@@ -23,10 +23,17 @@
#define MCFG_LINE_DISPATCH_FWD_CB(_entry, _count, _devcb) \
devcb = &devcb_line_dispatch_device<_count>::set_fwd_cb(*device, _entry, DEVCB_##_devcb);
+extern const device_type DEVCB_LINE_DISPATCH_2;
+extern const device_type DEVCB_LINE_DISPATCH_3;
+extern const device_type DEVCB_LINE_DISPATCH_4;
+extern const device_type DEVCB_LINE_DISPATCH_5;
+extern const device_type DEVCB_LINE_DISPATCH_6;
+
template<int N> class devcb_line_dispatch_device : public device_t {
public:
- devcb_line_dispatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+ devcb_line_dispatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, DEVCB_LINE_DISPATCH_2, "DEVCB_LINE_DISPATCH_2", tag, owner, clock, "devcb_line_dispatch_2", __FILE__) { }
+
void init_fwd() {
for(auto & elem : fwd_cb)
elem = new devcb_write_line(*this);
@@ -54,10 +61,4 @@ private:
devcb_write_line *fwd_cb[N];
};
-extern const device_type DEVCB_LINE_DISPATCH_2;
-extern const device_type DEVCB_LINE_DISPATCH_3;
-extern const device_type DEVCB_LINE_DISPATCH_4;
-extern const device_type DEVCB_LINE_DISPATCH_5;
-extern const device_type DEVCB_LINE_DISPATCH_6;
-
#endif
diff --git a/src/emu/distate.cpp b/src/emu/distate.cpp
index 3fa2fd8e03b..daa8942e3ee 100644
--- a/src/emu/distate.cpp
+++ b/src/emu/distate.cpp
@@ -111,7 +111,7 @@ device_state_entry &device_state_entry::formatstr(const char *_format)
m_format.assign(_format);
m_default_format = false;
- // set the DSF_CUSTOM_STRING flag by formatting with a NULL string
+ // set the DSF_CUSTOM_STRING flag by formatting with a nullptr string
m_flags &= ~DSF_CUSTOM_STRING;
format(nullptr);
@@ -417,7 +417,7 @@ device_state_interface::~device_state_interface()
UINT64 device_state_interface::state_int(int index)
{
- // NULL or out-of-range entry returns 0
+ // nullptr or out-of-range entry returns 0
const device_state_entry *entry = state_find_entry(index);
if (entry == nullptr)
return 0;
@@ -438,7 +438,7 @@ UINT64 device_state_interface::state_int(int index)
std::string device_state_interface::state_string(int index) const
{
- // NULL or out-of-range entry returns bogus string
+ // nullptr or out-of-range entry returns bogus string
const device_state_entry *entry = state_find_entry(index);
if (entry == nullptr)
return std::string("???");
@@ -460,7 +460,7 @@ std::string device_state_interface::state_string(int index) const
int device_state_interface::state_string_max_length(int index)
{
- // NULL or out-of-range entry returns bogus string
+ // nullptr or out-of-range entry returns bogus string
const device_state_entry *entry = state_find_entry(index);
if (entry == nullptr)
return 3;
@@ -477,7 +477,7 @@ int device_state_interface::state_string_max_length(int index)
void device_state_interface::set_state_int(int index, UINT64 value)
{
- // NULL or out-of-range entry is a no-op
+ // nullptr or out-of-range entry is a no-op
const device_state_entry *entry = state_find_entry(index);
if (entry == nullptr)
return;
@@ -498,7 +498,7 @@ void device_state_interface::set_state_int(int index, UINT64 value)
void device_state_interface::set_state_string(int index, const char *string)
{
- // NULL or out-of-range entry is a no-op
+ // nullptr or out-of-range entry is a no-op
const device_state_entry *entry = state_find_entry(index);
if (entry == nullptr)
return;
@@ -625,6 +625,6 @@ const device_state_entry *device_state_interface::state_find_entry(int index) co
if (entry->m_index == index)
return entry;
- // handle failure by returning NULL
+ // handle failure by returning nullptr
return nullptr;
}
diff --git a/src/emu/drawgfxm.h b/src/emu/drawgfxm.h
index 4a310ca4839..7e4e803c6c9 100644
--- a/src/emu/drawgfxm.h
+++ b/src/emu/drawgfxm.h
@@ -59,7 +59,7 @@ extern bitmap_ind8 drawgfx_dummy_priority_bitmap;
/* macros for using the optional priority */
#define PRIORITY_VALID(x) (sizeof(x) != sizeof(NO_PRIORITY))
-#define PRIORITY_ADDR(p,t,y,x) (PRIORITY_VALID(t) ? (&(p).pixt<t>(y, x)) : NULL)
+#define PRIORITY_ADDR(p,t,y,x) (PRIORITY_VALID(t) ? (&(p).pixt<t>(y, x)) : nullptr)
#define PRIORITY_ADVANCE(t,p,i) do { if (PRIORITY_VALID(t)) (p) += (i); } while (0)
@@ -1173,7 +1173,7 @@ do {
assert(destx + length <= bitmap.width()); \
assert(desty >= 0); \
assert(desty < bitmap.height()); \
- assert(srcptr != NULL); \
+ assert(srcptr != nullptr); \
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
\
{ \
@@ -1228,7 +1228,7 @@ do {
assert(srcx + length <= bitmap.width()); \
assert(srcy >= 0); \
assert(srcy < bitmap.height()); \
- assert(destptr != NULL); \
+ assert(destptr != nullptr); \
\
{ \
const PIXEL_TYPE *srcptr = &bitmap.pixt<PIXEL_TYPE>(srcy, srcx); \
diff --git a/src/emu/drivenum.h b/src/emu/drivenum.h
index e4f646d77f7..cc3bad554bf 100644
--- a/src/emu/drivenum.h
+++ b/src/emu/drivenum.h
@@ -91,9 +91,9 @@ public:
// current item
const game_driver &driver() const { return driver_list::driver(m_current); }
machine_config &config() const { return config(m_current, m_options); }
- int clone() { return driver_list::clone(m_current); }
- int non_bios_clone() { return driver_list::non_bios_clone(m_current); }
- int compatible_with() { return driver_list::compatible_with(m_current); }
+ int clone() const { return driver_list::clone(m_current); }
+ int non_bios_clone() const { return driver_list::non_bios_clone(m_current); }
+ int compatible_with() const { return driver_list::compatible_with(m_current); }
void include() { include(m_current); }
void exclude() { exclude(m_current); }
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index ae631cecd79..c8c95c1af48 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -209,7 +209,7 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); }
// this macro wraps a function 'x' and can be used to pass a function followed by its name
#define FUNC(x) &x, #x
-#define FUNC_NULL NULL, "(null)"
+#define FUNC_NULL nullptr, "(null)"
// standard assertion macros
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index fb406709669..649be6d8138 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -1050,7 +1050,7 @@ public:
accessors.write_qword_masked = reinterpret_cast<void (*)(address_space &, offs_t, UINT64, UINT64)>(&write_qword_masked_static);
}
- // return a pointer to the read bank, or NULL if none
+ // return a pointer to the read bank, or nullptr if none
virtual void *get_read_ptr(offs_t byteaddress) override
{
// perform the lookup
@@ -1064,7 +1064,7 @@ public:
return handler.ramptr(handler.byteoffset(byteaddress));
}
- // return a pointer to the write bank, or NULL if none
+ // return a pointer to the write bank, or nullptr if none
virtual void *get_write_ptr(offs_t byteaddress) override
{
// perform the lookup
@@ -4005,9 +4005,9 @@ void memory_bank::invalidate_references()
void memory_bank::set_base(void *base)
{
- // NULL is not an option
+ // nullptr is not an option
if (base == nullptr)
- throw emu_fatalerror("memory_bank::set_base called NULL base");
+ throw emu_fatalerror("memory_bank::set_base called nullptr base");
// set the base and invalidate any referencing spaces
*m_baseptr = reinterpret_cast<UINT8 *>(base);
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 9348058f650..ac17925370d 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -878,7 +878,7 @@ private:
//-------------------------------------------------
// read_ptr - return a pointer to valid RAM
-// referenced by the address, or NULL if no RAM
+// referenced by the address, or nullptr if no RAM
// backing that address
//-------------------------------------------------
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index 9cf84a3a6eb..e7a7d74db2b 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -228,7 +228,7 @@ emu_options::emu_options()
//-------------------------------------------------
// system - return a pointer to the specified
-// system driver, or NULL if no match
+// system driver, or nullptr if no match
//-------------------------------------------------
const game_driver *emu_options::system() const
diff --git a/src/emu/fileio.h b/src/emu/fileio.h
index e71934ea22a..5e765f660d8 100644
--- a/src/emu/fileio.h
+++ b/src/emu/fileio.h
@@ -92,7 +92,7 @@ public:
const char *fullpath() const { return m_fullpath.c_str(); }
UINT32 openflags() const { return m_openflags; }
hash_collection &hashes(const char *types);
- bool restrict_to_mediapath() { return m_restrict_to_mediapath; }
+ bool restrict_to_mediapath() const { return m_restrict_to_mediapath; }
bool part_of_mediapath(std::string path);
// setters
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index cd083738ecc..605abe0b024 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -31,7 +31,7 @@
/* split up into small functions to be nicer on optimizers */
-void construct_core_types_P1(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P1(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, JOYSTICK_UP, "P1 Up", input_seq(KEYCODE_UP, input_seq::or_code, JOYCODE_Y_UP_SWITCH_INDEXED(0)) )
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, JOYSTICK_DOWN, "P1 Down", input_seq(KEYCODE_DOWN, input_seq::or_code, JOYCODE_Y_DOWN_SWITCH_INDEXED(0)) )
@@ -65,7 +65,7 @@ void construct_core_types_P1(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, SELECT, "P1 Select", input_seq(KEYCODE_5, input_seq::or_code, JOYCODE_SELECT_INDEXED(0)) )
}
-void construct_core_types_P1_mahjong(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P1_mahjong(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, MAHJONG_A, "P1 Mahjong A", input_seq(KEYCODE_A) )
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, MAHJONG_B, "P1 Mahjong B", input_seq(KEYCODE_B) )
@@ -98,7 +98,7 @@ void construct_core_types_P1_mahjong(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, MAHJONG_SMALL, "P1 Mahjong Small", input_seq(KEYCODE_BACKSPACE) )
}
-void construct_core_types_P1_hanafuda(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P1_hanafuda(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, HANAFUDA_A, "P1 Hanafuda A/1", input_seq(KEYCODE_A) )
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, HANAFUDA_B, "P1 Hanafuda B/2", input_seq(KEYCODE_B) )
@@ -112,7 +112,7 @@ void construct_core_types_P1_hanafuda(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, HANAFUDA_NO, "P1 Hanafuda No", input_seq(KEYCODE_N) )
}
-void construct_core_types_gamble(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_gamble(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HIGH, "High", input_seq(KEYCODE_A) )
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_LOW, "Low", input_seq(KEYCODE_S) )
@@ -130,7 +130,7 @@ void construct_core_types_gamble(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_BOOK, "Book-Keeping", input_seq(KEYCODE_0) )
}
-void construct_core_types_poker(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_poker(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, POKER_HOLD1, "Hold 1", input_seq(KEYCODE_Z) )
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, POKER_HOLD2, "Hold 2", input_seq(KEYCODE_X) )
@@ -141,7 +141,7 @@ void construct_core_types_poker(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, POKER_BET, "Bet", input_seq(KEYCODE_1) )
}
-void construct_core_types_slot(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_slot(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, SLOT_STOP1, "Stop Reel 1", input_seq(KEYCODE_X) )
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, SLOT_STOP2, "Stop Reel 2", input_seq(KEYCODE_C) )
@@ -150,7 +150,7 @@ void construct_core_types_slot(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, SLOT_STOP_ALL, "Stop All Reels", input_seq(KEYCODE_Z) )
}
-void construct_core_types_P2(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P2(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, JOYSTICK_UP, "P2 Up", input_seq(KEYCODE_R, input_seq::or_code, JOYCODE_Y_UP_SWITCH_INDEXED(1)) )
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, JOYSTICK_DOWN, "P2 Down", input_seq(KEYCODE_F, input_seq::or_code, JOYCODE_Y_DOWN_SWITCH_INDEXED(1)) )
@@ -184,7 +184,7 @@ void construct_core_types_P2(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, SELECT, "P2 Select", input_seq(KEYCODE_6, input_seq::or_code, JOYCODE_SELECT_INDEXED(1)) )
}
-void construct_core_types_P2_mahjong(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P2_mahjong(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_A, "P2 Mahjong A", input_seq() )
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_B, "P2 Mahjong B", input_seq() )
@@ -217,7 +217,7 @@ void construct_core_types_P2_mahjong(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_SMALL, "P2 Mahjong Small", input_seq() )
}
-void construct_core_types_P2_hanafuda(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P2_hanafuda(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, HANAFUDA_A, "P2 Hanafuda A/1", input_seq() )
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, HANAFUDA_B, "P2 Hanafuda B/2", input_seq() )
@@ -231,7 +231,7 @@ void construct_core_types_P2_hanafuda(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, HANAFUDA_NO, "P2 Hanafuda No", input_seq() )
}
-void construct_core_types_P3(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P3(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 3, PLAYER3, JOYSTICK_UP, "P3 Up", input_seq(KEYCODE_I, input_seq::or_code, JOYCODE_Y_UP_SWITCH_INDEXED(2)) )
INPUT_PORT_DIGITAL_TYPE( 3, PLAYER3, JOYSTICK_DOWN, "P3 Down", input_seq(KEYCODE_K, input_seq::or_code, JOYCODE_Y_DOWN_SWITCH_INDEXED(2)) )
@@ -265,7 +265,7 @@ void construct_core_types_P3(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 3, PLAYER3, SELECT, "P3 Select", input_seq(KEYCODE_7, input_seq::or_code, JOYCODE_SELECT_INDEXED(2)) )
}
-void construct_core_types_P4(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P4(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 4, PLAYER4, JOYSTICK_UP, "P4 Up", input_seq(KEYCODE_8_PAD, input_seq::or_code, JOYCODE_Y_UP_SWITCH_INDEXED(3)) )
INPUT_PORT_DIGITAL_TYPE( 4, PLAYER4, JOYSTICK_DOWN, "P4 Down", input_seq(KEYCODE_2_PAD, input_seq::or_code, JOYCODE_Y_DOWN_SWITCH_INDEXED(3)) )
@@ -299,7 +299,7 @@ void construct_core_types_P4(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 4, PLAYER4, SELECT, "P4 Select", input_seq(KEYCODE_8, input_seq::or_code, JOYCODE_SELECT_INDEXED(3)) )
}
-void construct_core_types_P5(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P5(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 5, PLAYER5, JOYSTICK_UP, "P5 Up", input_seq(JOYCODE_Y_UP_SWITCH_INDEXED(4)) )
INPUT_PORT_DIGITAL_TYPE( 5, PLAYER5, JOYSTICK_DOWN, "P5 Down", input_seq(JOYCODE_Y_DOWN_SWITCH_INDEXED(4)) )
@@ -333,7 +333,7 @@ void construct_core_types_P5(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 5, PLAYER5, SELECT, "P5 Select", input_seq() )
}
-void construct_core_types_P6(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P6(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 6, PLAYER6, JOYSTICK_UP, "P6 Up", input_seq(JOYCODE_Y_UP_SWITCH_INDEXED(5)) )
INPUT_PORT_DIGITAL_TYPE( 6, PLAYER6, JOYSTICK_DOWN, "P6 Down", input_seq(JOYCODE_Y_DOWN_SWITCH_INDEXED(5)) )
@@ -367,7 +367,7 @@ void construct_core_types_P6(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 6, PLAYER6, SELECT, "P6 Select", input_seq() )
}
-void construct_core_types_P7(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P7(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 7, PLAYER7, JOYSTICK_UP, "P7 Up", input_seq(JOYCODE_Y_UP_SWITCH_INDEXED(6)) )
INPUT_PORT_DIGITAL_TYPE( 7, PLAYER7, JOYSTICK_DOWN, "P7 Down", input_seq(JOYCODE_Y_DOWN_SWITCH_INDEXED(6)) )
@@ -401,7 +401,7 @@ void construct_core_types_P7(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 7, PLAYER7, SELECT, "P7 Select", input_seq() )
}
-void construct_core_types_P8(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P8(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 8, PLAYER8, JOYSTICK_UP, "P8 Up", input_seq(JOYCODE_Y_UP_SWITCH_INDEXED(7)) )
INPUT_PORT_DIGITAL_TYPE( 8, PLAYER8, JOYSTICK_DOWN, "P8 Down", input_seq(JOYCODE_Y_DOWN_SWITCH_INDEXED(7)) )
@@ -435,7 +435,75 @@ void construct_core_types_P8(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 8, PLAYER8, SELECT, "P8 Select", input_seq() )
}
-void construct_core_types_start(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_P9(simple_list<input_type_entry> &typelist)
+{
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICK_UP, "P9 Up", input_seq(JOYCODE_Y_UP_SWITCH_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICK_DOWN, "P9 Down", input_seq(JOYCODE_Y_DOWN_SWITCH_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICK_LEFT, "P9 Left", input_seq(JOYCODE_X_LEFT_SWITCH_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICK_RIGHT, "P9 Right", input_seq(JOYCODE_X_RIGHT_SWITCH_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKRIGHT_UP, "P9 Right/Up", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKRIGHT_DOWN, "P9 Right/Down", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKRIGHT_LEFT, "P9 Right/Left", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKRIGHT_RIGHT, "P9 Right/Right", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKLEFT_UP, "P9 Left/Up", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKLEFT_DOWN, "P9 Left/Down", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKLEFT_LEFT, "P9 Left/Left", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, JOYSTICKLEFT_RIGHT, "P9 Left/Right", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON1, "P9 Button 1", input_seq(JOYCODE_BUTTON1_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON2, "P9 Button 2", input_seq(JOYCODE_BUTTON2_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON3, "P9 Button 3", input_seq(JOYCODE_BUTTON3_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON4, "P9 Button 4", input_seq(JOYCODE_BUTTON4_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON5, "P9 Button 5", input_seq(JOYCODE_BUTTON5_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON6, "P9 Button 6", input_seq(JOYCODE_BUTTON6_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON7, "P9 Button 7", input_seq(JOYCODE_BUTTON7_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON8, "P9 Button 8", input_seq(JOYCODE_BUTTON8_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON9, "P9 Button 9", input_seq(JOYCODE_BUTTON9_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON10, "P9 Button 10", input_seq(JOYCODE_BUTTON10_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON11, "P9 Button 11", input_seq(JOYCODE_BUTTON11_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON12, "P9 Button 12", input_seq(JOYCODE_BUTTON12_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON13, "P9 Button 13", input_seq(JOYCODE_BUTTON13_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON14, "P9 Button 14", input_seq(JOYCODE_BUTTON14_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON15, "P9 Button 15", input_seq(JOYCODE_BUTTON15_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, BUTTON16, "P9 Button 16", input_seq(JOYCODE_BUTTON16_INDEXED(8)) )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, START, "P9 Start", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 9, PLAYER9, SELECT, "P9 Select", input_seq() )
+}
+
+inline void construct_core_types_P10(simple_list<input_type_entry> &typelist)
+{
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICK_UP, "P10 Up", input_seq(JOYCODE_Y_UP_SWITCH_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICK_DOWN, "P10 Down", input_seq(JOYCODE_Y_DOWN_SWITCH_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICK_LEFT, "P10 Left", input_seq(JOYCODE_X_LEFT_SWITCH_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICK_RIGHT, "P10 Right", input_seq(JOYCODE_X_RIGHT_SWITCH_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKRIGHT_UP, "P10 Right/Up", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKRIGHT_DOWN, "P10 Right/Down", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKRIGHT_LEFT, "P10 Right/Left", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKRIGHT_RIGHT, "P10 Right/Right", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKLEFT_UP, "P10 Left/Up", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKLEFT_DOWN, "P10 Left/Down", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKLEFT_LEFT, "P10 Left/Left", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, JOYSTICKLEFT_RIGHT, "P10 Left/Right", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON1, "P10 Button 1", input_seq(JOYCODE_BUTTON1_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON2, "P10 Button 2", input_seq(JOYCODE_BUTTON2_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON3, "P10 Button 3", input_seq(JOYCODE_BUTTON3_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON4, "P10 Button 4", input_seq(JOYCODE_BUTTON4_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON5, "P10 Button 5", input_seq(JOYCODE_BUTTON5_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON6, "P10 Button 6", input_seq(JOYCODE_BUTTON6_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON7, "P10 Button 7", input_seq(JOYCODE_BUTTON7_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON8, "P10 Button 8", input_seq(JOYCODE_BUTTON8_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON9, "P10 Button 9", input_seq(JOYCODE_BUTTON9_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON10, "P10 Button 10", input_seq(JOYCODE_BUTTON10_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON11, "P10 Button 11", input_seq(JOYCODE_BUTTON11_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON12, "P10 Button 12", input_seq(JOYCODE_BUTTON12_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON13, "P10 Button 13", input_seq(JOYCODE_BUTTON13_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON14, "P10 Button 14", input_seq(JOYCODE_BUTTON14_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON15, "P10 Button 15", input_seq(JOYCODE_BUTTON15_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, BUTTON16, "P10 Button 16", input_seq(JOYCODE_BUTTON16_INDEXED(9)) )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, START, "P10 Start", input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 10, PLAYER10, SELECT, "P10 Select", input_seq() )
+}
+
+inline void construct_core_types_start(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, START1, "1 Player Start", input_seq(KEYCODE_1, input_seq::or_code, JOYCODE_START_INDEXED(0)) )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, START2, "2 Players Start", input_seq(KEYCODE_2, input_seq::or_code, JOYCODE_START_INDEXED(1)) )
@@ -447,7 +515,7 @@ void construct_core_types_start(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, START8, "8 Players Start", input_seq() )
}
-void construct_core_types_coin(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_coin(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN1, "Coin 1", input_seq(KEYCODE_5, input_seq::or_code, JOYCODE_SELECT_INDEXED(0)) )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, COIN2, "Coin 2", input_seq(KEYCODE_6, input_seq::or_code, JOYCODE_SELECT_INDEXED(1)) )
@@ -464,7 +532,7 @@ void construct_core_types_coin(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, BILL1, "Bill 1", input_seq(KEYCODE_BACKSPACE) )
}
-void construct_core_types_service(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_service(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, SERVICE1, "Service 1", input_seq(KEYCODE_9) )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, SERVICE2, "Service 2", input_seq(KEYCODE_0) )
@@ -472,7 +540,7 @@ void construct_core_types_service(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, SERVICE4, "Service 4", input_seq(KEYCODE_EQUALS) )
}
-void construct_core_types_tilt(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_tilt(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, TILT1, "Tilt 1", input_seq(KEYCODE_T) )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, TILT2, "Tilt 2", input_seq() )
@@ -480,7 +548,7 @@ void construct_core_types_tilt(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, TILT4, "Tilt 4", input_seq() )
}
-void construct_core_types_other(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_other(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, POWER_ON, "Power On", input_seq(KEYCODE_F1) )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, POWER_OFF, "Power Off", input_seq(KEYCODE_F2) )
@@ -491,7 +559,7 @@ void construct_core_types_other(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, VOLUME_UP, "Volume Up", input_seq(KEYCODE_EQUALS) )
}
-void construct_core_types_pedal(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_pedal(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, PEDAL, "P1 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(0)), input_seq(), input_seq(KEYCODE_LCONTROL, input_seq::or_code, JOYCODE_BUTTON1_INDEXED(0)) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, PEDAL, "P2 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(1)), input_seq(), input_seq(KEYCODE_A, input_seq::or_code, JOYCODE_BUTTON1_INDEXED(1)) )
@@ -501,9 +569,11 @@ void construct_core_types_pedal(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, PEDAL, "P6 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(5)), input_seq(), input_seq(JOYCODE_BUTTON1_INDEXED(5)) )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, PEDAL, "P7 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(6)), input_seq(), input_seq(JOYCODE_BUTTON1_INDEXED(6)) )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, PEDAL, "P8 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(7)), input_seq(), input_seq(JOYCODE_BUTTON1_INDEXED(7)) )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, PEDAL, "P9 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(8)), input_seq(), input_seq(JOYCODE_BUTTON1_INDEXED(8)) )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, PEDAL, "P10 Pedal 1", input_seq(JOYCODE_Z_NEG_ABSOLUTE_INDEXED(9)), input_seq(), input_seq(JOYCODE_BUTTON1_INDEXED(9)) )
}
-void construct_core_types_pedal2(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_pedal2(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, PEDAL2, "P1 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(0)), input_seq(), input_seq(KEYCODE_LALT, input_seq::or_code, JOYCODE_BUTTON2_INDEXED(0)) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, PEDAL2, "P2 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(1)), input_seq(), input_seq(KEYCODE_S, input_seq::or_code, JOYCODE_BUTTON2_INDEXED(1)) )
@@ -513,9 +583,11 @@ void construct_core_types_pedal2(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, PEDAL2, "P6 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(5)), input_seq(), input_seq(JOYCODE_BUTTON2_INDEXED(5)) )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, PEDAL2, "P7 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(6)), input_seq(), input_seq(JOYCODE_BUTTON2_INDEXED(6)) )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, PEDAL2, "P8 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(7)), input_seq(), input_seq(JOYCODE_BUTTON2_INDEXED(7)) )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, PEDAL2, "P9 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(8)), input_seq(), input_seq(JOYCODE_BUTTON2_INDEXED(8)) )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, PEDAL2, "P10 Pedal 2", input_seq(JOYCODE_Z_POS_ABSOLUTE_INDEXED(9)), input_seq(), input_seq(JOYCODE_BUTTON2_INDEXED(9)) )
}
-void construct_core_types_pedal3(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_pedal3(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, PEDAL3, "P1 Pedal 3", input_seq(), input_seq(), input_seq(KEYCODE_SPACE, input_seq::or_code, JOYCODE_BUTTON3_INDEXED(0)) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, PEDAL3, "P2 Pedal 3", input_seq(), input_seq(), input_seq(KEYCODE_Q, input_seq::or_code, JOYCODE_BUTTON3_INDEXED(1)) )
@@ -525,9 +597,11 @@ void construct_core_types_pedal3(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, PEDAL3, "P6 Pedal 3", input_seq(), input_seq(), input_seq(JOYCODE_BUTTON3_INDEXED(5)) )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, PEDAL3, "P7 Pedal 3", input_seq(), input_seq(), input_seq(JOYCODE_BUTTON3_INDEXED(6)) )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, PEDAL3, "P8 Pedal 3", input_seq(), input_seq(), input_seq(JOYCODE_BUTTON3_INDEXED(7)) )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, PEDAL3, "P9 Pedal 3", input_seq(), input_seq(), input_seq(JOYCODE_BUTTON3_INDEXED(8)) )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, PEDAL3, "P10 Pedal 3", input_seq(), input_seq(), input_seq(JOYCODE_BUTTON3_INDEXED(9)) )
}
-void construct_core_types_paddle(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_paddle(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, PADDLE, "Paddle", input_seq(JOYCODE_X_INDEXED(0), input_seq::or_code, MOUSECODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, PADDLE, "Paddle 2", input_seq(JOYCODE_X_INDEXED(1), input_seq::or_code, MOUSECODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -537,9 +611,11 @@ void construct_core_types_paddle(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, PADDLE, "Paddle 6", input_seq(JOYCODE_X_INDEXED(5), input_seq::or_code, MOUSECODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, PADDLE, "Paddle 7", input_seq(JOYCODE_X_INDEXED(6), input_seq::or_code, MOUSECODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, PADDLE, "Paddle 8", input_seq(JOYCODE_X_INDEXED(7), input_seq::or_code, MOUSECODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, PADDLE, "Paddle 9", input_seq(JOYCODE_X_INDEXED(8), input_seq::or_code, MOUSECODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, PADDLE, "Paddle 10", input_seq(JOYCODE_X_INDEXED(9), input_seq::or_code, MOUSECODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_paddle_v(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_paddle_v(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, PADDLE_V, "Paddle V", input_seq(JOYCODE_Y_INDEXED(0), input_seq::or_code, MOUSECODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, PADDLE_V, "Paddle V 2", input_seq(JOYCODE_Y_INDEXED(1), input_seq::or_code, MOUSECODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -549,9 +625,11 @@ void construct_core_types_paddle_v(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, PADDLE_V, "Paddle V 6", input_seq(JOYCODE_Y_INDEXED(5), input_seq::or_code, MOUSECODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, PADDLE_V, "Paddle V 7", input_seq(JOYCODE_Y_INDEXED(6), input_seq::or_code, MOUSECODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, PADDLE_V, "Paddle V 8", input_seq(JOYCODE_Y_INDEXED(7), input_seq::or_code, MOUSECODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, PADDLE_V, "Paddle V 9", input_seq(JOYCODE_Y_INDEXED(8), input_seq::or_code, MOUSECODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, PADDLE_V, "Paddle V 10", input_seq(JOYCODE_Y_INDEXED(9), input_seq::or_code, MOUSECODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_positional(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_positional(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, POSITIONAL, "Positional", input_seq(MOUSECODE_X_INDEXED(0), input_seq::or_code, JOYCODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, POSITIONAL, "Positional 2", input_seq(MOUSECODE_X_INDEXED(1), input_seq::or_code, JOYCODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -561,9 +639,11 @@ void construct_core_types_positional(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, POSITIONAL, "Positional 6", input_seq(MOUSECODE_X_INDEXED(5), input_seq::or_code, JOYCODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, POSITIONAL, "Positional 7", input_seq(MOUSECODE_X_INDEXED(6), input_seq::or_code, JOYCODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, POSITIONAL, "Positional 8", input_seq(MOUSECODE_X_INDEXED(7), input_seq::or_code, JOYCODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, POSITIONAL, "Positional 9", input_seq(MOUSECODE_X_INDEXED(8), input_seq::or_code, JOYCODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, POSITIONAL, "Positional 10", input_seq(MOUSECODE_X_INDEXED(9), input_seq::or_code, JOYCODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_positional_v(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_positional_v(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, POSITIONAL_V, "Positional V", input_seq(MOUSECODE_Y_INDEXED(0), input_seq::or_code, JOYCODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, POSITIONAL_V, "Positional V 2", input_seq(MOUSECODE_Y_INDEXED(1), input_seq::or_code, JOYCODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -573,9 +653,11 @@ void construct_core_types_positional_v(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, POSITIONAL_V, "Positional V 6", input_seq(MOUSECODE_Y_INDEXED(5), input_seq::or_code, JOYCODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, POSITIONAL_V, "Positional V 7", input_seq(MOUSECODE_Y_INDEXED(6), input_seq::or_code, JOYCODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, POSITIONAL_V, "Positional V 8", input_seq(MOUSECODE_Y_INDEXED(7), input_seq::or_code, JOYCODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, POSITIONAL_V, "Positional V 9", input_seq(MOUSECODE_Y_INDEXED(8), input_seq::or_code, JOYCODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, POSITIONAL_V, "Positional V 10", input_seq(MOUSECODE_Y_INDEXED(9), input_seq::or_code, JOYCODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_dial(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_dial(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, DIAL, "Dial", input_seq(MOUSECODE_X_INDEXED(0), input_seq::or_code, JOYCODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, DIAL, "Dial 2", input_seq(MOUSECODE_X_INDEXED(1), input_seq::or_code, JOYCODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -585,9 +667,11 @@ void construct_core_types_dial(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, DIAL, "Dial 6", input_seq(MOUSECODE_X_INDEXED(5), input_seq::or_code, JOYCODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, DIAL, "Dial 7", input_seq(MOUSECODE_X_INDEXED(6), input_seq::or_code, JOYCODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, DIAL, "Dial 8", input_seq(MOUSECODE_X_INDEXED(7), input_seq::or_code, JOYCODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, DIAL, "Dial 9", input_seq(MOUSECODE_X_INDEXED(8), input_seq::or_code, JOYCODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, DIAL, "Dial 10", input_seq(MOUSECODE_X_INDEXED(9), input_seq::or_code, JOYCODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_dial_v(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_dial_v(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, DIAL_V, "Dial V", input_seq(MOUSECODE_Y_INDEXED(0), input_seq::or_code, JOYCODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, DIAL_V, "Dial V 2", input_seq(MOUSECODE_Y_INDEXED(1), input_seq::or_code, JOYCODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -597,9 +681,11 @@ void construct_core_types_dial_v(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, DIAL_V, "Dial V 6", input_seq(MOUSECODE_Y_INDEXED(5), input_seq::or_code, JOYCODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, DIAL_V, "Dial V 7", input_seq(MOUSECODE_Y_INDEXED(6), input_seq::or_code, JOYCODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, DIAL_V, "Dial V 8", input_seq(MOUSECODE_Y_INDEXED(7), input_seq::or_code, JOYCODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, DIAL_V, "Dial V 9", input_seq(MOUSECODE_Y_INDEXED(8), input_seq::or_code, JOYCODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, DIAL_V, "Dial V 10", input_seq(MOUSECODE_Y_INDEXED(9), input_seq::or_code, JOYCODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_trackball_X(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_trackball_X(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, TRACKBALL_X, "Track X", input_seq(MOUSECODE_X_INDEXED(0), input_seq::or_code, JOYCODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, TRACKBALL_X, "Track X 2", input_seq(MOUSECODE_X_INDEXED(1), input_seq::or_code, JOYCODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -609,9 +695,11 @@ void construct_core_types_trackball_X(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, TRACKBALL_X, "Track X 6", input_seq(MOUSECODE_X_INDEXED(5), input_seq::or_code, JOYCODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, TRACKBALL_X, "Track X 7", input_seq(MOUSECODE_X_INDEXED(6), input_seq::or_code, JOYCODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, TRACKBALL_X, "Track X 8", input_seq(MOUSECODE_X_INDEXED(7), input_seq::or_code, JOYCODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, TRACKBALL_X, "Track X 9", input_seq(MOUSECODE_X_INDEXED(8), input_seq::or_code, JOYCODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, TRACKBALL_X, "Track X 10", input_seq(MOUSECODE_X_INDEXED(9), input_seq::or_code, JOYCODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_trackball_Y(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_trackball_Y(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, TRACKBALL_Y, "Track Y", input_seq(MOUSECODE_Y_INDEXED(0), input_seq::or_code, JOYCODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, TRACKBALL_Y, "Track Y 2", input_seq(MOUSECODE_Y_INDEXED(1), input_seq::or_code, JOYCODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -621,9 +709,11 @@ void construct_core_types_trackball_Y(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, TRACKBALL_Y, "Track Y 6", input_seq(MOUSECODE_Y_INDEXED(5), input_seq::or_code, JOYCODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, TRACKBALL_Y, "Track Y 7", input_seq(MOUSECODE_Y_INDEXED(6), input_seq::or_code, JOYCODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, TRACKBALL_Y, "Track Y 8", input_seq(MOUSECODE_Y_INDEXED(7), input_seq::or_code, JOYCODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, TRACKBALL_Y, "Track Y 9", input_seq(MOUSECODE_Y_INDEXED(8), input_seq::or_code, JOYCODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, TRACKBALL_Y, "Track Y 10", input_seq(MOUSECODE_Y_INDEXED(9), input_seq::or_code, JOYCODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_AD_stick_X(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_AD_stick_X(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, AD_STICK_X, "AD Stick X", input_seq(JOYCODE_X_INDEXED(0), input_seq::or_code, MOUSECODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, AD_STICK_X, "AD Stick X 2", input_seq(JOYCODE_X_INDEXED(1), input_seq::or_code, MOUSECODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -633,9 +723,11 @@ void construct_core_types_AD_stick_X(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, AD_STICK_X, "AD Stick X 6", input_seq(JOYCODE_X_INDEXED(5), input_seq::or_code, MOUSECODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, AD_STICK_X, "AD Stick X 7", input_seq(JOYCODE_X_INDEXED(6), input_seq::or_code, MOUSECODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, AD_STICK_X, "AD Stick X 8", input_seq(JOYCODE_X_INDEXED(7), input_seq::or_code, MOUSECODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, AD_STICK_X, "AD Stick X 9", input_seq(JOYCODE_X_INDEXED(8), input_seq::or_code, MOUSECODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, AD_STICK_X, "AD Stick X 10", input_seq(JOYCODE_X_INDEXED(9), input_seq::or_code, MOUSECODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_AD_stick_Y(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_AD_stick_Y(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, AD_STICK_Y, "AD Stick Y", input_seq(JOYCODE_Y_INDEXED(0), input_seq::or_code, MOUSECODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, AD_STICK_Y, "AD Stick Y 2", input_seq(JOYCODE_Y_INDEXED(1), input_seq::or_code, MOUSECODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -645,9 +737,11 @@ void construct_core_types_AD_stick_Y(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, AD_STICK_Y, "AD Stick Y 6", input_seq(JOYCODE_Y_INDEXED(5), input_seq::or_code, MOUSECODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, AD_STICK_Y, "AD Stick Y 7", input_seq(JOYCODE_Y_INDEXED(6), input_seq::or_code, MOUSECODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, AD_STICK_Y, "AD Stick Y 8", input_seq(JOYCODE_Y_INDEXED(7), input_seq::or_code, MOUSECODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, AD_STICK_Y, "AD Stick Y 9", input_seq(JOYCODE_Y_INDEXED(8), input_seq::or_code, MOUSECODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, AD_STICK_Y, "AD Stick Y 10", input_seq(JOYCODE_Y_INDEXED(9), input_seq::or_code, MOUSECODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_AD_stick_Z(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_AD_stick_Z(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, AD_STICK_Z, "AD Stick Z", input_seq(JOYCODE_Z_INDEXED(0)), input_seq(KEYCODE_A), input_seq(KEYCODE_Z) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, AD_STICK_Z, "AD Stick Z 2", input_seq(JOYCODE_Z_INDEXED(1)), input_seq(), input_seq() )
@@ -657,9 +751,11 @@ void construct_core_types_AD_stick_Z(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, AD_STICK_Z, "AD Stick Z 6", input_seq(JOYCODE_Z_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, AD_STICK_Z, "AD Stick Z 7", input_seq(JOYCODE_Z_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, AD_STICK_Z, "AD Stick Z 8", input_seq(JOYCODE_Z_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, AD_STICK_Z, "AD Stick Z 9", input_seq(JOYCODE_Z_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, AD_STICK_Z, "AD Stick Z 10", input_seq(JOYCODE_Z_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_lightgun_X(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_lightgun_X(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, LIGHTGUN_X, "Lightgun X", input_seq(GUNCODE_X_INDEXED(0), input_seq::or_code, MOUSECODE_X_INDEXED(0), input_seq::or_code, JOYCODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, LIGHTGUN_X, "Lightgun X 2", input_seq(GUNCODE_X_INDEXED(1), input_seq::or_code, MOUSECODE_X_INDEXED(1), input_seq::or_code, JOYCODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -669,9 +765,11 @@ void construct_core_types_lightgun_X(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, LIGHTGUN_X, "Lightgun X 6", input_seq(GUNCODE_X_INDEXED(5), input_seq::or_code, MOUSECODE_X_INDEXED(5), input_seq::or_code, JOYCODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, LIGHTGUN_X, "Lightgun X 7", input_seq(GUNCODE_X_INDEXED(6), input_seq::or_code, MOUSECODE_X_INDEXED(6), input_seq::or_code, JOYCODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, LIGHTGUN_X, "Lightgun X 8", input_seq(GUNCODE_X_INDEXED(7), input_seq::or_code, MOUSECODE_X_INDEXED(7), input_seq::or_code, JOYCODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, LIGHTGUN_X, "Lightgun X 9", input_seq(GUNCODE_X_INDEXED(8), input_seq::or_code, MOUSECODE_X_INDEXED(8), input_seq::or_code, JOYCODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, LIGHTGUN_X, "Lightgun X 10", input_seq(GUNCODE_X_INDEXED(9), input_seq::or_code, MOUSECODE_X_INDEXED(9), input_seq::or_code, JOYCODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_lightgun_Y(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_lightgun_Y(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, LIGHTGUN_Y, "Lightgun Y", input_seq(GUNCODE_Y_INDEXED(0), input_seq::or_code, MOUSECODE_Y_INDEXED(0), input_seq::or_code, JOYCODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, LIGHTGUN_Y, "Lightgun Y 2", input_seq(GUNCODE_Y_INDEXED(1), input_seq::or_code, MOUSECODE_Y_INDEXED(1), input_seq::or_code, JOYCODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -681,9 +779,11 @@ void construct_core_types_lightgun_Y(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, LIGHTGUN_Y, "Lightgun Y 6", input_seq(GUNCODE_Y_INDEXED(5), input_seq::or_code, MOUSECODE_Y_INDEXED(5), input_seq::or_code, JOYCODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, LIGHTGUN_Y, "Lightgun Y 7", input_seq(GUNCODE_Y_INDEXED(6), input_seq::or_code, MOUSECODE_Y_INDEXED(6), input_seq::or_code, JOYCODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, LIGHTGUN_Y, "Lightgun Y 8", input_seq(GUNCODE_Y_INDEXED(7), input_seq::or_code, MOUSECODE_Y_INDEXED(7), input_seq::or_code, JOYCODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, LIGHTGUN_Y, "Lightgun Y 9", input_seq(GUNCODE_Y_INDEXED(8), input_seq::or_code, MOUSECODE_Y_INDEXED(8), input_seq::or_code, JOYCODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, LIGHTGUN_Y, "Lightgun Y 10", input_seq(GUNCODE_Y_INDEXED(9), input_seq::or_code, MOUSECODE_Y_INDEXED(9), input_seq::or_code, JOYCODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_mouse_X(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_mouse_X(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, MOUSE_X, "Mouse X", input_seq(MOUSECODE_X_INDEXED(0)), input_seq(KEYCODE_LEFT), input_seq(KEYCODE_RIGHT) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, MOUSE_X, "Mouse X 2", input_seq(MOUSECODE_X_INDEXED(1)), input_seq(KEYCODE_D), input_seq(KEYCODE_G) )
@@ -693,9 +793,11 @@ void construct_core_types_mouse_X(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, MOUSE_X, "Mouse X 6", input_seq(MOUSECODE_X_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, MOUSE_X, "Mouse X 7", input_seq(MOUSECODE_X_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, MOUSE_X, "Mouse X 8", input_seq(MOUSECODE_X_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, MOUSE_X, "Mouse X 9", input_seq(MOUSECODE_X_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, MOUSE_X, "Mouse X 10", input_seq(MOUSECODE_X_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_mouse_Y(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_mouse_Y(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_ANALOG_TYPE( 1, PLAYER1, MOUSE_Y, "Mouse Y", input_seq(MOUSECODE_Y_INDEXED(0)), input_seq(KEYCODE_UP), input_seq(KEYCODE_DOWN) )
INPUT_PORT_ANALOG_TYPE( 2, PLAYER2, MOUSE_Y, "Mouse Y 2", input_seq(MOUSECODE_Y_INDEXED(1)), input_seq(KEYCODE_R), input_seq(KEYCODE_F) )
@@ -705,15 +807,17 @@ void construct_core_types_mouse_Y(simple_list<input_type_entry> &typelist)
INPUT_PORT_ANALOG_TYPE( 6, PLAYER6, MOUSE_Y, "Mouse Y 6", input_seq(MOUSECODE_Y_INDEXED(5)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 7, PLAYER7, MOUSE_Y, "Mouse Y 7", input_seq(MOUSECODE_Y_INDEXED(6)), input_seq(), input_seq() )
INPUT_PORT_ANALOG_TYPE( 8, PLAYER8, MOUSE_Y, "Mouse Y 8", input_seq(MOUSECODE_Y_INDEXED(7)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 9, PLAYER9, MOUSE_Y, "Mouse Y 9", input_seq(MOUSECODE_Y_INDEXED(8)), input_seq(), input_seq() )
+ INPUT_PORT_ANALOG_TYPE( 10, PLAYER10, MOUSE_Y, "Mouse Y 10", input_seq(MOUSECODE_Y_INDEXED(9)), input_seq(), input_seq() )
}
-void construct_core_types_keypad(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_keypad(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, KEYPAD, "Keypad", input_seq() )
INPUT_PORT_DIGITAL_TYPE( 0, OTHER, KEYBOARD, "Keyboard", input_seq() )
}
-void construct_core_types_UI(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_UI(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ON_SCREEN_DISPLAY,"On Screen Display", input_seq(KEYCODE_TILDE) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DEBUG_BREAK, "Break in Debugger", input_seq(KEYCODE_TILDE) )
@@ -771,7 +875,7 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_AUDIT_ALL, "UI Audit All", input_seq(KEYCODE_F1, KEYCODE_LSHIFT) )
}
-void construct_core_types_OSD(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_OSD(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_1, nullptr, input_seq() )
INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_2, nullptr, input_seq() )
@@ -791,7 +895,7 @@ void construct_core_types_OSD(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_16, nullptr, input_seq() )
}
-void construct_core_types_invalid(simple_list<input_type_entry> &typelist)
+inline void construct_core_types_invalid(simple_list<input_type_entry> &typelist)
{
INPUT_PORT_DIGITAL_TYPE( 0, INVALID, UNKNOWN, nullptr, input_seq() )
INPUT_PORT_DIGITAL_TYPE( 0, INVALID, UNUSED, nullptr, input_seq() )
@@ -802,7 +906,7 @@ void construct_core_types_invalid(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, INVALID, CONFIG, nullptr, input_seq() )
}
-void construct_core_types(simple_list<input_type_entry> &typelist)
+inline void construct_core_types(simple_list<input_type_entry> &typelist)
{
construct_core_types_P1(typelist);
construct_core_types_P1_mahjong(typelist);
@@ -819,6 +923,8 @@ void construct_core_types(simple_list<input_type_entry> &typelist)
construct_core_types_P6(typelist);
construct_core_types_P7(typelist);
construct_core_types_P8(typelist);
+ construct_core_types_P9(typelist);
+ construct_core_types_P10(typelist);
construct_core_types_start(typelist);
construct_core_types_coin(typelist);
construct_core_types_service(typelist);
diff --git a/src/emu/input.cpp b/src/emu/input.cpp
index 68e825402b4..360810a3b6c 100644
--- a/src/emu/input.cpp
+++ b/src/emu/input.cpp
@@ -1184,7 +1184,7 @@ void input_manager::reset_polling()
for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
{
- // fetch the device; ignore if NULL
+ // fetch the device; ignore if nullptr
input_device *device = m_class[devclass]->device(devnum);
if (device == nullptr)
continue;
@@ -1211,7 +1211,7 @@ input_code input_manager::poll_switches()
for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
{
- // fetch the device; ignore if NULL
+ // fetch the device; ignore if nullptr
input_device *device = m_class[devclass]->device(devnum);
if (device == nullptr)
continue;
@@ -1291,7 +1291,7 @@ input_code input_manager::poll_keyboard_switches()
// iterate over devices within each class
for (int devnum = 0; devnum < m_keyboard_class.maxindex(); devnum++)
{
- // fetch the device; ignore if NULL
+ // fetch the device; ignore if nullptr
input_device *device = m_keyboard_class.device(devnum);
if (device == nullptr)
continue;
@@ -1365,7 +1365,7 @@ input_code input_manager::poll_axes()
for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
{
- // fetch the device; ignore if NULL
+ // fetch the device; ignore if nullptr
input_device *device = m_class[devclass]->device(devnum);
if (device == nullptr)
continue;
@@ -1400,7 +1400,7 @@ input_device *input_manager::device_from_code(input_code code) const
if (devclass >= DEVICE_CLASS_FIRST_VALID && devclass <= DEVICE_CLASS_LAST_VALID)
return m_class[devclass]->device(code.device_index());
- // otherwise, return NULL
+ // otherwise, return nullptr
return nullptr;
}
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index c7c40b139f2..5a68a76a0ae 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -3315,7 +3315,7 @@ void ioport_manager::save_game_inputs(xml_data_node *parentnode)
template<typename _Type>
_Type ioport_manager::playback_read(_Type &result)
{
- // protect against NULL handles if previous reads fail
+ // protect against nullptr handles if previous reads fail
if (!m_playback_file.is_open())
result = 0;
@@ -3480,7 +3480,7 @@ void ioport_manager::playback_port(ioport_port &port)
template<typename _Type>
void ioport_manager::record_write(_Type value)
{
- // protect against NULL handles if previous reads fail
+ // protect against nullptr handles if previous reads fail
if (!m_record_file.is_open())
return;
@@ -3499,7 +3499,7 @@ void ioport_manager::record_write<bool>(bool value)
template<typename _Type>
void ioport_manager::timecode_write(_Type value)
{
- // protect against NULL handles if previous reads fail
+ // protect against nullptr handles if previous reads fail
if (!m_timecode_file.is_open())
return;
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index 5155005569b..3f6a0185337 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -34,7 +34,7 @@ const ioport_value IP_ACTIVE_HIGH = 0x00000000;
const ioport_value IP_ACTIVE_LOW = 0xffffffff;
// maximum number of players supported
-const int MAX_PLAYERS = 8;
+const int MAX_PLAYERS = 10;
// unicode constants
const unicode_char UCHAR_PRIVATE = 0x100000;
@@ -78,6 +78,8 @@ enum ioport_group
IPG_PLAYER6,
IPG_PLAYER7,
IPG_PLAYER8,
+ IPG_PLAYER9,
+ IPG_PLAYER10,
IPG_OTHER,
IPG_TOTAL_GROUPS,
IPG_INVALID
@@ -105,6 +107,8 @@ enum ioport_type
IPT_START6,
IPT_START7,
IPT_START8,
+ IPT_START9,
+ IPT_START10,
// coin slots
IPT_COIN1,
@@ -1191,7 +1195,7 @@ private:
// internal state
ioport_field * m_next; // pointer to next field in sequence
ioport_port & m_port; // reference to the port that owns us
- std::unique_ptr<ioport_field_live> m_live; // live state of field (NULL if not live)
+ std::unique_ptr<ioport_field_live> m_live; // live state of field (nullptr if not live)
int m_modcount; // modification count
simple_list<ioport_setting> m_settinglist; // list of input_setting_configs
simple_list<ioport_diplocation> m_diploclist; // list of locations for various bits
@@ -1317,7 +1321,7 @@ private:
std::string m_tag; // copy of this port's tag
int m_modcount; // modification count
ioport_value m_active; // mask of active bits in the port
- std::unique_ptr<ioport_port_live> m_live; // live state of port (NULL if not live)
+ std::unique_ptr<ioport_port_live> m_live; // live state of port (nullptr if not live)
};
inline ioport_value read_safe(ioport_port *port, ioport_value defval) { return (port == nullptr) ? defval : port->read(); }
@@ -1539,7 +1543,7 @@ private:
template<typename _Type> void timecode_write(_Type value);
void timecode_init();
- void timecode_end(const char *message = NULL);
+ void timecode_end(const char *message = nullptr);
// internal state
running_machine & m_machine; // reference to owning machine
@@ -1559,11 +1563,11 @@ private:
attoseconds_t m_last_delta_nsec; // nanoseconds that passed since the previous callback
// playback/record information
- emu_file m_record_file; // recording file (NULL if not recording)
- emu_file m_playback_file; // playback file (NULL if not recording)
+ emu_file m_record_file; // recording file (nullptr if not recording)
+ emu_file m_playback_file; // playback file (nullptr if not recording)
UINT64 m_playback_accumulated_speed; // accumulated speed during playback
UINT32 m_playback_accumulated_frames; // accumulated frames during playback
- emu_file m_timecode_file; // timecode/frames playback file (NULL if not recording)
+ emu_file m_timecode_file; // timecode/frames playback file (nullptr if not recording)
int m_timecode_count;
attotime m_timecode_last_time;
@@ -1671,7 +1675,7 @@ private:
//**************************************************************************
// so that "0" can be used for unneeded input ports
-#define construct_ioport_0 NULL
+#define construct_ioport_0 nullptr
// name of table
#define INPUT_PORTS_NAME(_name) construct_ioport_##_name
@@ -1702,7 +1706,7 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
#define PORT_BIT(_mask, _default, _type) \
configurer.field_alloc((_type), (_default), (_mask));
#define PORT_SPECIAL_ONOFF(_mask, _default, _strindex) \
- PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, _strindex, NULL)
+ PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, _strindex, nullptr)
#define PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, _strindex, _diploc) \
configurer.onoff_alloc(DEF_STR(_strindex), _default, _mask, _diploc);
@@ -1775,10 +1779,10 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
configurer.field_set_crosshair(CROSSHAIR_AXIS_##axis, altaxis, scale, offset);
#define PORT_CROSSHAIR_MAPPER(_callback) \
- configurer.field_set_crossmapper(ioport_field_crossmap_delegate(_callback, #_callback, DEVICE_SELF, (device_t *)NULL));
+ configurer.field_set_crossmapper(ioport_field_crossmap_delegate(_callback, #_callback, DEVICE_SELF, (device_t *)nullptr));
#define PORT_CROSSHAIR_MAPPER_MEMBER(_device, _class, _member) \
- configurer.field_set_crossmapper(ioport_field_crossmap_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL));
+ configurer.field_set_crossmapper(ioport_field_crossmap_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr));
// how many optical counts for 1 full turn of the control
#define PORT_FULL_TURN_COUNT(_count) \
@@ -1805,19 +1809,19 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
// read callbacks
#define PORT_CUSTOM_MEMBER(_device, _class, _member, _param) \
- configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL), (void *)(_param));
+ configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr), (void *)(_param));
// write callbacks
#define PORT_CHANGED_MEMBER(_device, _class, _member, _param) \
- configurer.field_set_dynamic_write(ioport_field_write_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL), (void *)(_param));
+ configurer.field_set_dynamic_write(ioport_field_write_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr), (void *)(_param));
// input device handler
#define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \
- configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)NULL));
+ configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)nullptr));
// output device handler
#define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \
- configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, _device, (_class *)NULL));
+ configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, _device, (_class *)nullptr));
// dip switch definition
#define PORT_DIPNAME(_mask, _default, _name) \
@@ -1849,10 +1853,7 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
// name of table
#define DEVICE_INPUT_DEFAULTS_NAME(_name) device_iptdef_##_name
-#define device_iptdef_0 NULL
-#define device_iptdef_0L NULL
-#define device_iptdef_0LL NULL
-#define device_iptdef___null NULL
+#define device_iptdef_NOOP nullptr
// start of table
#define DEVICE_INPUT_DEFAULTS_START(_name) \
@@ -1862,7 +1863,7 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
{ _tag ,_mask, _defval },
// end of table
#define DEVICE_INPUT_DEFAULTS_END \
- {NULL,0,0} };
+ {nullptr,0,0} };
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 27f6d0dd568..2555cda4c2e 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -257,7 +257,8 @@ void running_machine::start()
m_render->resolve_tags();
-
+ manager().create_custom(*this);
+
// register callbacks for the devices, then start them
add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(running_machine::reset_all_devices), this));
add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(running_machine::stop_all_devices), this));
diff --git a/src/emu/machine.h b/src/emu/machine.h
index 02721c30718..9cdc893a2d2 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -244,7 +244,7 @@ public:
private:
// video-related information
- screen_device * primary_screen; // the primary screen device, or NULL if screenless
+ screen_device * primary_screen; // the primary screen device, or nullptr if screenless
public:
// debugger-related information
@@ -382,7 +382,7 @@ private:
template <typename Format, typename... Params>
inline void running_machine::popmessage(Format &&fmt, Params &&... args) const
{
- // if the format is NULL, it is a signal to clear the popmessage
+ // if the format is nullptr, it is a signal to clear the popmessage
// otherwise, generate the buffer and call the UI to display the message
if (is_null<Format>::value(fmt))
popup_clear();
diff --git a/src/emu/main.h b/src/emu/main.h
index 0b0aa16121e..b8aaf3b838a 100644
--- a/src/emu/main.h
+++ b/src/emu/main.h
@@ -76,11 +76,12 @@ public:
osd_interface &osd() const { return m_osd; }
emu_options &options() const { return m_options; }
- running_machine *machine() { return m_machine; }
+ running_machine *machine() const { return m_machine; }
void set_machine(running_machine *machine) { m_machine = machine; }
virtual ui_manager* create_ui(running_machine& machine) { return nullptr; }
+ virtual void create_custom(running_machine& machine) { }
virtual void ui_initialize(running_machine& machine) { }
virtual void update_machine() { }
diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h
index 582ea14d035..a2ae9638527 100644
--- a/src/emu/mconfig.h
+++ b/src/emu/mconfig.h
@@ -114,9 +114,9 @@ private:
#define MACHINE_CONFIG_START(_name, _class) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
- devcb_base *devcb = NULL; \
+ devcb_base *devcb = nullptr; \
(void)devcb; \
- if (owner == NULL) owner = config.device_add(NULL, "root", &driver_device_creator<_class>, 0);
+ if (owner == nullptr) owner = config.device_add(nullptr, "root", &driver_device_creator<_class>, 0);
/**
@def MACHINE_CONFIG_FRAGMENT(_name)
@@ -127,9 +127,9 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
#define MACHINE_CONFIG_FRAGMENT(_name) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
- devcb_base *devcb = NULL; \
+ devcb_base *devcb = nullptr; \
(void)devcb; \
- assert(owner != NULL);
+ assert(owner != nullptr);
/**
@def MACHINE_CONFIG_DERIVED(_name, _base)
@@ -141,10 +141,10 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
#define MACHINE_CONFIG_DERIVED(_name, _base) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
- devcb_base *devcb = NULL; \
+ devcb_base *devcb = nullptr; \
(void)devcb; \
owner = MACHINE_CONFIG_NAME(_base)(config, owner, device); \
- assert(owner != NULL);
+ assert(owner != nullptr);
/**
@def MACHINE_CONFIG_DERIVED_CLASS(_name, _base, _class)
@@ -157,9 +157,9 @@ Begins a machine_config that is derived from another machine_config that can spe
#define MACHINE_CONFIG_DERIVED_CLASS(_name, _base, _class) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
- devcb_base *devcb = NULL; \
+ devcb_base *devcb = nullptr; \
(void)devcb; \
- if (owner == NULL) owner = config.device_add(NULL, "root", &driver_device_creator<_class>, 0); \
+ if (owner == nullptr) owner = config.device_add(nullptr, "root", &driver_device_creator<_class>, 0); \
owner = MACHINE_CONFIG_NAME(_base)(config, owner, device);
/**
diff --git a/src/emu/output.cpp b/src/emu/output.cpp
index 25d37dd4c43..b905c45d70b 100644
--- a/src/emu/output.cpp
+++ b/src/emu/output.cpp
@@ -183,7 +183,7 @@ INT32 output_manager::get_indexed_value(const char *basename, int index)
/*-------------------------------------------------
output_set_notifier - sets a notifier callback
for a particular output, or for all outputs
- if NULL is specified
+ if nullptr is specified
-------------------------------------------------*/
void output_manager::set_notifier(const char *outname, output_notifier_func callback, void *param)
diff --git a/src/emu/output.h b/src/emu/output.h
index 77798c1eaf1..e83399aa4b1 100644
--- a/src/emu/output.h
+++ b/src/emu/output.h
@@ -68,10 +68,10 @@ public:
// return the current value for a given indexed output
INT32 get_indexed_value(const char *outname, int index);
- // set a notifier on a particular output, or globally if NULL
+ // set a notifier on a particular output, or globally if nullptr
void set_notifier(const char *outname, output_notifier_func callback, void *param);
- // set a notifier on a particular output, or globally if NULL
+ // set a notifier on a particular output, or globally if nullptr
void notify_all(output_notifier_func callback, void *param);
// map a name to a unique ID
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index 304e667b82f..22f23d3d263 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -546,7 +546,7 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
case TEXFORMAT_ARGB32:
case TEXFORMAT_YUY16:
- // if no adjustment necessary, return NULL
+ // if no adjustment necessary, return nullptr
if (!container.has_brightness_contrast_gamma_changes())
return nullptr;
return container.bcg_lookup_table(m_format);
@@ -2123,7 +2123,7 @@ bool render_target::map_point_internal(INT32 target_x, INT32 target_y, render_co
//-------------------------------------------------
// view_name - return the name of the indexed
-// view, or NULL if it doesn't exist
+// view, or nullptr if it doesn't exist
//-------------------------------------------------
layout_view *render_target::view_by_index(int index) const
@@ -2770,7 +2770,7 @@ void render_manager::font_free(render_font *font)
void render_manager::invalidate_all(void *refptr)
{
- // permit NULL
+ // permit nullptr
if (refptr == nullptr)
return;
diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp
index e99bcc12088..70d87856378 100644
--- a/src/emu/rendfont.cpp
+++ b/src/emu/rendfont.cpp
@@ -32,7 +32,7 @@ inline const char *next_line(const char *ptr)
// scan forward until we hit the end or a carriage return
while (*ptr != 13 && *ptr != 10 && *ptr != 0) ptr++;
- // if we hit the end, return NULL
+ // if we hit the end, return nullptr
if (*ptr == 0)
return nullptr;
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index ea2fc8b4bd5..5b945b09d04 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -647,7 +647,7 @@ layout_element::component::component(running_machine &machine, xml_data_node &co
}
m_stopnames[m_numstops++] = symbollist;
- // careful, dirname is NULL if we're coming from internal layout, and our string assignment doesn't like that
+ // careful, dirname is nullptr if we're coming from internal layout, and our string assignment doesn't like that
if (dirname != nullptr)
m_dirname = dirname;
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp
index a7f0d74d826..a03e25e91ed 100644
--- a/src/emu/romload.cpp
+++ b/src/emu/romload.cpp
@@ -661,7 +661,7 @@ int rom_load_manager::open_rom_file(const char *regiontag, const rom_entry *romp
/*-------------------------------------------------
rom_fread - cheesy fread that fills with
- random data for a NULL file
+ random data for a nullptr file
-------------------------------------------------*/
int rom_load_manager::rom_fread(UINT8 *buffer, int length, const rom_entry *parent_region)
diff --git a/src/emu/romload.h b/src/emu/romload.h
index 48190330409..f0553949d96 100644
--- a/src/emu/romload.h
+++ b/src/emu/romload.h
@@ -194,11 +194,11 @@ struct rom_entry
/* ----- start/stop macros ----- */
#define ROM_NAME(name) rom_##name
#define ROM_START(name) static const rom_entry ROM_NAME(name)[] = {
-#define ROM_END { NULL, NULL, 0, 0, ROMENTRYTYPE_END } };
+#define ROM_END { nullptr, nullptr, 0, 0, ROMENTRYTYPE_END } };
/* ----- ROM region macros ----- */
-#define ROM_REGION(length,tag,flags) { tag, NULL, 0, length, ROMENTRYTYPE_REGION | (flags) },
+#define ROM_REGION(length,tag,flags) { tag, nullptr, 0, length, ROMENTRYTYPE_REGION | (flags) },
#define ROM_REGION16_LE(length,tag,flags) ROM_REGION(length, tag, (flags) | ROMREGION_16BIT | ROMREGION_LE)
#define ROM_REGION16_BE(length,tag,flags) ROM_REGION(length, tag, (flags) | ROMREGION_16BIT | ROMREGION_BE)
#define ROM_REGION32_LE(length,tag,flags) ROM_REGION(length, tag, (flags) | ROMREGION_32BIT | ROMREGION_LE)
@@ -229,19 +229,19 @@ struct rom_entry
/* ----- ROM_RELOAD related macros ----- */
-#define ROM_RELOAD(offset,length) { NULL, NULL, offset, length, ROMENTRYTYPE_RELOAD | ROM_INHERITFLAGS },
-#define ROM_RELOAD_PLAIN(offset,length) { NULL, NULL, offset, length, ROMENTRYTYPE_RELOAD },
+#define ROM_RELOAD(offset,length) { nullptr, nullptr, offset, length, ROMENTRYTYPE_RELOAD | ROM_INHERITFLAGS },
+#define ROM_RELOAD_PLAIN(offset,length) { nullptr, nullptr, offset, length, ROMENTRYTYPE_RELOAD },
/* ----- additional ROM-related macros ----- */
-#define ROM_CONTINUE(offset,length) { NULL, NULL, offset, length, ROMENTRYTYPE_CONTINUE | ROM_INHERITFLAGS },
-#define ROM_IGNORE(length) { NULL, NULL, 0, length, ROMENTRYTYPE_IGNORE | ROM_INHERITFLAGS },
-#define ROM_FILL(offset,length,value) { NULL, (const char *)value, offset, length, ROMENTRYTYPE_FILL },
+#define ROM_CONTINUE(offset,length) { nullptr, nullptr, offset, length, ROMENTRYTYPE_CONTINUE | ROM_INHERITFLAGS },
+#define ROM_IGNORE(length) { nullptr, nullptr, 0, length, ROMENTRYTYPE_IGNORE | ROM_INHERITFLAGS },
+#define ROM_FILL(offset,length,value) { nullptr, (const char *)value, offset, length, ROMENTRYTYPE_FILL },
#define ROM_COPY(srctag,srcoffs,offset,length) { srctag, (const char *)srcoffs, offset, length, ROMENTRYTYPE_COPY },
/* ----- system BIOS macros ----- */
#define ROM_SYSTEM_BIOS(value,name,description) { name, description, 0, 0, ROMENTRYTYPE_SYSTEM_BIOS | ROM_BIOS(value+1) },
-#define ROM_DEFAULT_BIOS(name) { name, NULL, 0, 0, ROMENTRYTYPE_DEFAULT_BIOS },
+#define ROM_DEFAULT_BIOS(name) { name, nullptr, 0, 0, ROMENTRYTYPE_DEFAULT_BIOS },
/* ----- game parameter macro ----- */
diff --git a/src/emu/save.h b/src/emu/save.h
index b4c2c3c2186..fabbcba9071 100644
--- a/src/emu/save.h
+++ b/src/emu/save.h
@@ -74,7 +74,7 @@ public:
state_entry * m_next; // pointer to next entry
void * m_data; // pointer to the memory to save/restore
std::string m_name; // full name
- device_t * m_device; // associated device, NULL if none
+ device_t * m_device; // associated device, nullptr if none
std::string m_module; // module name
std::string m_tag; // tag name
int m_index; // index
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index fa53767854d..8566e85f2b1 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -67,7 +67,7 @@ screen_device_svg_renderer::screen_device_svg_renderer(memory_region *region)
delete[] s;
m_rasterizer = nsvgCreateRasterizer();
- for (NSVGshape *shape = m_image->shapes; shape != NULL; shape = shape->next)
+ for (NSVGshape *shape = m_image->shapes; shape != nullptr; shape = shape->next)
if(shape->title[0]) {
shape->flags &= ~NSVG_FLAGS_VISIBLE;
m_keyed_shapes[shape->title].push_back(shape);
diff --git a/src/emu/screen.h b/src/emu/screen.h
index cf55fcb0ec8..5650365032a 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -445,15 +445,15 @@ typedef device_type_iterator<&device_creator<screen_device>, screen_device> scre
#define MCFG_SCREEN_DEFAULT_POSITION(_xscale, _xoffs, _yscale, _yoffs) \
screen_device::static_set_default_position(*device, _xscale, _xoffs, _yscale, _yoffs);
#define MCFG_SCREEN_UPDATE_DRIVER(_class, _method) \
- screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, NULL));
+ screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, nullptr));
#define MCFG_SCREEN_UPDATE_DEVICE(_device, _class, _method) \
screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, _device));
#define MCFG_SCREEN_VBLANK_NONE() \
screen_device::static_set_screen_vblank(*device, screen_vblank_delegate());
#define MCFG_SCREEN_VBLANK_DRIVER(_class, _method) \
- screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SCREEN_VBLANK_DEVICE(_device, _class, _method) \
- screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)0));
+ screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)nullptr));
#define MCFG_SCREEN_PALETTE(_palette_tag) \
screen_device::static_set_palette(*device, "^" _palette_tag);
#define MCFG_SCREEN_NO_PALETTE \
diff --git a/src/emu/softlist.cpp b/src/emu/softlist.cpp
index 3d65dca7598..3b57a60c82c 100644
--- a/src/emu/softlist.cpp
+++ b/src/emu/softlist.cpp
@@ -142,7 +142,7 @@ const char *software_part::feature(const char *feature_name) const
bool software_part::is_compatible(const software_list_device &swlistdev) const
{
- // get the compatibility feature and the softlist filter; if either is NULL, assume compatible
+ // get the compatibility feature and the softlist filter; if either is nullptr, assume compatible
const char *compatibility = feature("compatibility");
const char *filter = swlistdev.filter();
if (compatibility == nullptr || filter == nullptr)
@@ -447,7 +447,7 @@ void software_list_device::display_matches(const machine_config &config, const c
software_info *software_list_device::find(const char *look_for, software_info *prev)
{
- // NULL search returns nothing
+ // nullptr search returns nothing
if (look_for == nullptr)
return nullptr;
@@ -1139,8 +1139,6 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
add_rom_entry(nullptr, nullptr, offset, length, ROMENTRYTYPE_RELOAD);
else if (loadflag != nullptr && strcmp(loadflag, "continue") == 0)
add_rom_entry(nullptr, nullptr, offset, length, ROMENTRYTYPE_CONTINUE | ROM_INHERITFLAGS);
- else if (loadflag != nullptr && strcmp(loadflag, "ignore") == 0)
- add_rom_entry(nullptr, nullptr, offset, length, ROMENTRYTYPE_IGNORE | ROM_INHERITFLAGS);
else if (loadflag != nullptr && strcmp(loadflag, "fill") == 0)
add_rom_entry(nullptr, (const char *)(FPTR)(strtol(value, nullptr, 0) & 0xff), offset, length, ROMENTRYTYPE_FILL);
else if (name != nullptr)
@@ -1181,6 +1179,11 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
else
parse_error("Rom name missing");
}
+ else if (sizestr != nullptr && loadflag != nullptr && strcmp(loadflag, "ignore") == 0)
+ {
+ UINT32 length = strtol(sizestr, nullptr, 0);
+ add_rom_entry(nullptr, nullptr, 0, length, ROMENTRYTYPE_IGNORE | ROM_INHERITFLAGS);
+ }
else
parse_error("Incomplete rom definition");
}
diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp
index 69bde8821c0..48e288fa0c0 100644
--- a/src/emu/tilemap.cpp
+++ b/src/emu/tilemap.cpp
@@ -100,7 +100,7 @@ inline bool tilemap_t::gfx_elements_changed()
//**************************************************************************
//-------------------------------------------------
-// scanline_draw_opaque_null - draw to a NULL
+// scanline_draw_opaque_null - draw to a nullptr
// bitmap, setting priority only
//-------------------------------------------------
@@ -117,7 +117,7 @@ inline void tilemap_t::scanline_draw_opaque_null(int count, UINT8 *pri, UINT32 p
//-------------------------------------------------
-// scanline_draw_masked_null - draw to a NULL
+// scanline_draw_masked_null - draw to a nullptr
// bitmap using a mask, setting priority only
//-------------------------------------------------
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index 6e4308d6052..48a2bcbd543 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -370,15 +370,15 @@ enum tilemap_standard_mapper
#define MCFG_TILEMAP_BYTES_PER_ENTRY(_bpe) \
tilemap_device::static_set_bytes_per_entry(*device, _bpe);
#define MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \
- tilemap_device::static_set_info_callback(*device, tilemap_get_info_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ tilemap_device::static_set_info_callback(*device, tilemap_get_info_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_TILEMAP_INFO_CB_DEVICE(_device, _class, _method) \
- tilemap_device::static_set_info_callback(*device, tilemap_get_info_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)0));
+ tilemap_device::static_set_info_callback(*device, tilemap_get_info_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)nullptr));
#define MCFG_TILEMAP_LAYOUT_STANDARD(_standard, _columns, _rows) \
tilemap_device::static_set_layout(*device, TILEMAP_##_standard, _columns, _rows);
#define MCFG_TILEMAP_LAYOUT_CB_DRIVER(_class, _method, _columns, _rows) \
- tilemap_device::static_set_layout(*device, tilemap_mapper_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0), _columns, _rows);
+ tilemap_device::static_set_layout(*device, tilemap_mapper_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr), _columns, _rows);
#define MCFG_TILEMAP_LAYOUT_CB_DEVICE(_device, _class, _method, _columns, _rows) \
- tilemap_device::static_set_layout(*device, tilemap_mapper_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)0), _columns, _rows);
+ tilemap_device::static_set_layout(*device, tilemap_mapper_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)nullptr), _columns, _rows);
#define MCFG_TILEMAP_TILE_SIZE(_width, _height) \
tilemap_device::static_set_tile_size(*device, _width, _height);
#define MCFG_TILEMAP_TRANSPARENT_PEN(_pen) \
diff --git a/src/emu/timer.h b/src/emu/timer.h
index 55db37c267b..ca8074f5b04 100644
--- a/src/emu/timer.h
+++ b/src/emu/timer.h
@@ -35,27 +35,27 @@
timer_device::static_configure_generic(*device, timer_device_expired_delegate());
#define MCFG_TIMER_DRIVER_ADD(_tag, _class, _callback) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device::static_configure_generic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, NULL, (_class *)0));
+ timer_device::static_configure_generic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, nullptr, (_class *)nullptr));
#define MCFG_TIMER_DEVICE_ADD(_tag, _devtag, _class, _callback) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device::static_configure_generic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, _devtag, (_class *)0));
+ timer_device::static_configure_generic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, _devtag, (_class *)nullptr));
#define MCFG_TIMER_DRIVER_ADD_PERIODIC(_tag, _class, _callback, _period) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device::static_configure_periodic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, NULL, (_class *)0), _period);
+ timer_device::static_configure_periodic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, nullptr, (_class *)nullptr), _period);
#define MCFG_TIMER_DEVICE_ADD_PERIODIC(_tag, _devtag, _class, _callback, _period) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device::static_configure_periodic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, _devtag, (_class *)0), _period);
+ timer_device::static_configure_periodic(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, _devtag, (_class *)nullptr), _period);
#define MCFG_TIMER_DRIVER_ADD_SCANLINE(_tag, _class, _callback, _screen, _first_vpos, _increment) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device::static_configure_scanline(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, NULL, (_class *)0), _screen, _first_vpos, _increment);
+ timer_device::static_configure_scanline(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, nullptr, (_class *)nullptr), _screen, _first_vpos, _increment);
#define MCFG_TIMER_DEVICE_ADD_SCANLINE(_tag, _devtag, _class, _callback, _screen, _first_vpos, _increment) \
MCFG_DEVICE_ADD(_tag, TIMER, 0) \
- timer_device::static_configure_scanline(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, _devtag, (_class *)0), _screen, _first_vpos, _increment);
+ timer_device::static_configure_scanline(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, _devtag, (_class *)nullptr), _screen, _first_vpos, _increment);
#define MCFG_TIMER_MODIFY(_tag) \
MCFG_DEVICE_MODIFY(_tag)
#define MCFG_TIMER_DRIVER_CALLBACK(_class, _callback) \
- timer_device::static_set_callback(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, NULL, (_class *)0));
+ timer_device::static_set_callback(*device, timer_device_expired_delegate(&_class::_callback, #_class "::" #_callback, nullptr, (_class *)nullptr));
#define MCFG_TIMER_START_DELAY(_start_delay) \
timer_device::static_set_start_delay(*device, _start_delay);
#define MCFG_TIMER_PARAM(_param) \
@@ -98,13 +98,13 @@ public:
bool enabled() const { return m_timer->enabled(); }
// property setters
- void set_param(int param) { assert(m_type == TIMER_TYPE_GENERIC); m_timer->set_param(param); }
+ void set_param(int param) const { assert(m_type == TIMER_TYPE_GENERIC); m_timer->set_param(param); }
void set_ptr(void *ptr) { m_ptr = ptr; }
- void enable(bool enable = true) { m_timer->enable(enable); }
+ void enable(bool enable = true) const { m_timer->enable(enable); }
// adjustments
void reset() { adjust(attotime::never, 0, attotime::never); }
- void adjust(const attotime &duration, INT32 param = 0, const attotime &period = attotime::never) { assert(m_type == TIMER_TYPE_GENERIC); m_timer->adjust(duration, param, period); }
+ void adjust(const attotime &duration, INT32 param = 0, const attotime &period = attotime::never) const { assert(m_type == TIMER_TYPE_GENERIC); m_timer->adjust(duration, param, period); }
// timing information
attotime time_elapsed() const { return m_timer->elapsed(); }
diff --git a/src/emu/ui/cmddata.h b/src/emu/ui/cmddata.h
index 31dd8c5ebd8..14c09c73883 100644
--- a/src/emu/ui/cmddata.h
+++ b/src/emu/ui/cmddata.h
@@ -396,7 +396,7 @@ static fix_strings_t convert_text[] =
{ "charge", 131 }, // Charge
{ "tap", 132 }, // Serious Tap
{ "button", 133 }, // Any Button
- { 0, 0 } // end of array
+ { nullptr, 0 } // end of array
};
#endif /* __UI_CMDDATA_H__ */
diff --git a/src/emu/ui/uimain.h b/src/emu/ui/uimain.h
index c12107a6cc8..9230892adca 100644
--- a/src/emu/ui/uimain.h
+++ b/src/emu/ui/uimain.h
@@ -71,6 +71,8 @@ class ui_manager
public:
// construction/destruction
ui_manager(running_machine &machine) : m_machine(machine),m_use_natural_keyboard(false),m_show_timecode_counter(false),m_show_timecode_total(false) { }
+
+ virtual ~ui_manager() { }
virtual void set_startup_text(const char *text, bool force) { }
@@ -80,8 +82,8 @@ public:
void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; }
- bool show_timecode_counter() { return m_show_timecode_counter; }
- bool show_timecode_total() { return m_show_timecode_total; }
+ bool show_timecode_counter() const { return m_show_timecode_counter; }
+ bool show_timecode_total() const { return m_show_timecode_total; }
virtual void popup_time_string(int seconds, std::string message) { }
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index 70070623e46..91f218b9470 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -599,7 +599,7 @@ void validity_checker::validate_roms()
// check for a valid tag
if (basetag == nullptr)
{
- osd_printf_error("ROM_REGION tag with NULL name\n");
+ osd_printf_error("ROM_REGION tag with nullptr name\n");
continue;
}
@@ -874,7 +874,7 @@ void validity_checker::validate_inputs()
{
// dip switch fields must have a name
if (field.name() == nullptr)
- osd_printf_error("DIP switch has a NULL name\n");
+ osd_printf_error("DIP switch has a nullptr name\n");
// verify the settings list
validate_dip_settings(field);
diff --git a/src/emu/video/rgbgen.h b/src/emu/video/rgbgen.h
index 4ade036637a..12ec8f3d765 100644
--- a/src/emu/video/rgbgen.h
+++ b/src/emu/video/rgbgen.h
@@ -35,12 +35,12 @@ public:
}
inline void set(rgb_t& rgba) { set(rgba.a(), rgba.r(), rgba.g(), rgba.b()); }
- inline rgb_t to_rgba()
+ inline rgb_t to_rgba() const
{
return rgb_t(m_a, m_r, m_g, m_b);
}
- inline rgb_t to_rgba_clamp()
+ inline rgb_t to_rgba_clamp() const
{
UINT8 a = (m_a < 0) ? 0 : (m_a > 255) ? 255 : m_a;
UINT8 r = (m_r < 0) ? 0 : (m_r > 255) ? 255 : m_r;
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp
index 099e6344d59..2c48e8c6375 100644
--- a/src/frontend/mame/cheat.cpp
+++ b/src/frontend/mame/cheat.cpp
@@ -142,7 +142,7 @@ cheat_parameter::cheat_parameter(cheat_manager &manager, symbol_table &symbols,
// iterate over items
for (xml_data_node *itemnode = xml_get_sibling(paramnode.child, "item"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "item"))
{
- // check for NULL text
+ // check for nullptr text
if (itemnode->value == nullptr || itemnode->value[0] == 0)
throw emu_fatalerror("%s.xml(%d): item is missing text\n", filename, itemnode->line);
@@ -705,7 +705,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
xml_data_node *commentnode = xml_get_sibling(cheatnode.child, "comment");
if (commentnode != nullptr)
{
- // set the value if not NULL
+ // set the value if not nullptr
if (commentnode->value != nullptr && commentnode->value[0] != 0)
m_comment.assign(commentnode->value);
diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp
index 6f5e65d10fb..b23c8296992 100644
--- a/src/frontend/mame/info.cpp
+++ b/src/frontend/mame/info.cpp
@@ -10,7 +10,6 @@
#include "emu.h"
#include "mame.h"
-#include "emuopts.h"
#include "mameopts.h"
#include "machine/ram.h"
#include "sound/samples.h"
@@ -854,6 +853,8 @@ void info_xml_creator::output_input(const ioport_list &portlist)
CTRL_P6,
CTRL_P7,
CTRL_P8,
+ CTRL_P9,
+ CTRL_P10,
CTRL_PCOUNT
};
@@ -1103,6 +1104,10 @@ void info_xml_creator::output_input(const ioport_list &portlist)
case IPT_COIN6:
case IPT_COIN7:
case IPT_COIN8:
+ case IPT_COIN9:
+ case IPT_COIN10:
+ case IPT_COIN11:
+ case IPT_COIN12:
ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
break;
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 1e4f58ef08f..72c36e3bd47 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -40,7 +40,7 @@
#define lua_readline(b,p) \
(fputs(p, stdout), fflush(stdout), /* show prompt */ \
- fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
+ fgets(b, LUA_MAXINPUT, stdin) != nullptr) /* get line */
static lua_State *globalL = nullptr;
@@ -1669,7 +1669,7 @@ static void *serve_lua(void *param)
{
lua_engine *engine = (lua_engine *)param;
engine->serve_lua();
- return NULL;
+ return nullptr;
}
//-------------------------------------------------
diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp
index ac6610a8ab8..c162e5ff12a 100644
--- a/src/frontend/mame/mame.cpp
+++ b/src/frontend/mame/mame.cpp
@@ -53,7 +53,8 @@ mame_machine_manager::mame_machine_manager(emu_options &options,osd_interface &o
m_plugins(std::make_unique<plugin_options>()),
m_lua(global_alloc(lua_engine)),
m_new_driver_pending(nullptr),
- m_firstrun(true)
+ m_firstrun(true),
+ m_autoboot_timer(nullptr)
{
}
@@ -274,8 +275,6 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine)
m_inifile = std::make_unique<inifile_manager>(machine);
m_ui->set_startup_text("Initializing...", true);
- // set up the cheat engine
- m_cheat = std::make_unique<cheat_manager>(machine);
// allocate autoboot timer
m_autoboot_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(mame_machine_manager::autoboot_callback), this));
@@ -289,6 +288,12 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine)
return m_ui.get();
}
+void mame_machine_manager::create_custom(running_machine& machine)
+{
+ // set up the cheat engine
+ m_cheat = std::make_unique<cheat_manager>(machine);
+}
+
void mame_machine_manager::ui_initialize(running_machine& machine)
{
m_ui->initialize(machine);
diff --git a/src/frontend/mame/mame.h b/src/frontend/mame/mame.h
index 2de8f8d4876..8cf1a29d50b 100644
--- a/src/frontend/mame/mame.h
+++ b/src/frontend/mame/mame.h
@@ -51,6 +51,9 @@ public:
TIMER_CALLBACK_MEMBER(autoboot_callback);
virtual ui_manager* create_ui(running_machine& machine) override;
+
+ virtual void create_custom(running_machine& machine) override;
+
virtual void ui_initialize(running_machine& machine) override;
/* execute as configured by the OPTION_SYSTEMNAME option on the specified options */
diff --git a/src/frontend/mame/pluginopts.cpp b/src/frontend/mame/pluginopts.cpp
index 90b4b138cab..e56a72dfced 100644
--- a/src/frontend/mame/pluginopts.cpp
+++ b/src/frontend/mame/pluginopts.cpp
@@ -14,7 +14,6 @@
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/istreamwrapper.h>
-#include <fstream>
//**************************************************************************
// PLUGIN OPTIONS
@@ -66,7 +65,7 @@ void plugin_options::parse_json(std::string path)
if (document["plugin"].IsObject())
{
- std::string name = document["plugin"]["name"].GetString();
+ std::string plugin_name = document["plugin"]["name"].GetString();
std::string description = document["plugin"]["description"].GetString();
std::string type = document["plugin"]["type"].GetString();
bool start = false;
@@ -75,7 +74,7 @@ void plugin_options::parse_json(std::string path)
if (type=="plugin")
{
- add_entry(core_strdup(name.c_str()),core_strdup(description.c_str()), OPTION_BOOLEAN, start ? "1" : "0");
+ add_entry(core_strdup(plugin_name.c_str()),core_strdup(description.c_str()), OPTION_BOOLEAN, start ? "1" : "0");
}
}
diff --git a/src/frontend/mame/ui/cheatopt.cpp b/src/frontend/mame/ui/cheatopt.cpp
index 8d84c06d759..18fe17f93e4 100644
--- a/src/frontend/mame/ui/cheatopt.cpp
+++ b/src/frontend/mame/ui/cheatopt.cpp
@@ -156,7 +156,7 @@ ui_menu_cheat::~ui_menu_cheat()
menu
-------------------------------------------------*/
-ui_menu_autofire::ui_menu_autofire(running_machine &machine, render_container *container) : ui_menu(machine, container)
+ui_menu_autofire::ui_menu_autofire(running_machine &machine, render_container *container) : ui_menu(machine, container), last_toggle(false)
{
const screen_device *screen = machine.first_screen();
diff --git a/src/frontend/mame/ui/custmenu.cpp b/src/frontend/mame/ui/custmenu.cpp
index e1d6ed470ca..618b16285cd 100644
--- a/src/frontend/mame/ui/custmenu.cpp
+++ b/src/frontend/mame/ui/custmenu.cpp
@@ -84,14 +84,14 @@ void ui_menu_custom_filter::handle()
{
custfltr::other[pos]--;
for ( ; custfltr::other[pos] > FILTER_UNAVAILABLE && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) ;
+ || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) { };
changed = true;
}
else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::other[pos] < FILTER_LAST - 1)
{
custfltr::other[pos]++;
for ( ; custfltr::other[pos] < FILTER_LAST && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) ;
+ || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) { };
changed = true;
}
else if (m_event->iptkey == IPT_UI_SELECT)
diff --git a/src/frontend/mame/ui/custui.cpp b/src/frontend/mame/ui/custui.cpp
index eb0e755d240..78818f33cf8 100644
--- a/src/frontend/mame/ui/custui.cpp
+++ b/src/frontend/mame/ui/custui.cpp
@@ -216,13 +216,13 @@ ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *con
for (ui_options::entry &f_entry : moptions)
{
- const char *name = f_entry.name();
- if (name && strlen(name) && !strcmp(OPTION_INFOS_SIZE, f_entry.name()))
+ const char *entry_name = f_entry.name();
+ if (entry_name && strlen(entry_name) && !strcmp(OPTION_INFOS_SIZE, f_entry.name()))
{
m_info_max = atof(f_entry.maximum());
m_info_min = atof(f_entry.minimum());
}
- else if (name && strlen(name) && !strcmp(OPTION_FONT_ROWS, f_entry.name()))
+ else if (entry_name && strlen(entry_name) && !strcmp(OPTION_FONT_ROWS, f_entry.name()))
{
m_font_max = atof(f_entry.maximum());
m_font_min = atof(f_entry.minimum());
diff --git a/src/frontend/mame/ui/datfile.cpp b/src/frontend/mame/ui/datfile.cpp
index 1e2ca1d6938..2264a421b9e 100644
--- a/src/frontend/mame/ui/datfile.cpp
+++ b/src/frontend/mame/ui/datfile.cpp
@@ -530,19 +530,19 @@ int datfile_manager::index_datafile(dataindex &index, int &swcount)
while (cpoint < cends)
{
// search for comma
- size_t found = s_roms.find(",", cpoint);
+ size_t comma_found = s_roms.find(",", cpoint);
// found it
- if (found != std::string::npos)
+ if (comma_found != std::string::npos)
{
// copy data
- name = s_roms.substr(cpoint, found - cpoint);
+ name = s_roms.substr(cpoint, comma_found - cpoint);
// add a SoftwareItem
m_swindex[lname].emplace(name, ftell(fp));
// update current point
- cpoint = ++found;
+ cpoint = ++comma_found;
swcount++;
}
else
diff --git a/src/frontend/mame/ui/datmenu.cpp b/src/frontend/mame/ui/datmenu.cpp
index 7e90e11178d..188e938acff 100644
--- a/src/frontend/mame/ui/datmenu.cpp
+++ b/src/frontend/mame/ui/datmenu.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "ui/ui.h"
#include "ui/menu.h"
-#include "drivenum.h"
#include "rendfont.h"
#include "ui/datfile.h"
#include "ui/datmenu.h"
diff --git a/src/frontend/mame/ui/icorender.h b/src/frontend/mame/ui/icorender.h
index ac942ac922e..677ebf001c7 100644
--- a/src/frontend/mame/ui/icorender.h
+++ b/src/frontend/mame/ui/icorender.h
@@ -64,7 +64,7 @@ typedef struct{
// load an ICO file into a bitmap
//-------------------------------------------------
-void render_load_ico(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename)
+inline void render_load_ico(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename)
{
INT32 width = 0;
INT32 height = 0;
diff --git a/src/frontend/mame/ui/imgcntrl.cpp b/src/frontend/mame/ui/imgcntrl.cpp
index f06638a2fcb..c8b46afd23f 100644
--- a/src/frontend/mame/ui/imgcntrl.cpp
+++ b/src/frontend/mame/ui/imgcntrl.cpp
@@ -116,10 +116,9 @@ void ui_menu_control_device_image::test_create(bool &can_create, bool &need_conf
break;
default:
- fatalerror("Unexpected\n");
can_create = false;
need_confirm = false;
- break;
+ fatalerror("Unexpected\n");
}
if (entry != nullptr)
diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp
index 1202bd136f2..acb318b3b41 100644
--- a/src/frontend/mame/ui/mainmenu.cpp
+++ b/src/frontend/mame/ui/mainmenu.cpp
@@ -11,8 +11,6 @@
#include "emu.h"
#include "crsshair.h"
#include "emuopts.h"
-#include "rendutil.h"
-#include "cheat.h"
#include "ui/menu.h"
#include "ui/filemngr.h"
#include "ui/barcode.h"
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index a10119e876a..c26d22562aa 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -18,10 +18,6 @@
#include "ui/utils.h"
#include "ui/defimg.h"
#include "ui/starimg.h"
-#include "ui/optsmenu.h"
-#include "ui/datfile.h"
-#include "rendfont.h"
-#include "ui/custmenu.h"
#include "ui/icorender.h"
#include "ui/toolbar.h"
#include "ui/miscmenu.h"
@@ -1436,8 +1432,8 @@ void ui_menu::init_ui(running_machine &machine)
sw_toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32));
toolbar_texture[x] = mrender.texture_alloc();
sw_toolbar_texture[x] = mrender.texture_alloc();
- UINT32 *dst = &toolbar_bitmap[x]->pix32(0);
- memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
+ UINT32 *texture_dst = &toolbar_bitmap[x]->pix32(0);
+ memcpy(texture_dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
if (toolbar_bitmap[x]->valid())
toolbar_texture[x]->set_bitmap(*toolbar_bitmap[x], toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32);
else
@@ -1445,8 +1441,8 @@ void ui_menu::init_ui(running_machine &machine)
if (x == 0 || x == 2)
{
- dst = &sw_toolbar_bitmap[x]->pix32(0);
- memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
+ texture_dst = &sw_toolbar_bitmap[x]->pix32(0);
+ memcpy(texture_dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
if (sw_toolbar_bitmap[x]->valid())
sw_toolbar_texture[x]->set_bitmap(*sw_toolbar_bitmap[x], sw_toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32);
else
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index 1a89cd45fa1..38a2d944533 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -18,7 +18,6 @@
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/miscmenu.h"
-#include "ui/utils.h"
#include "../info.h"
#include "ui/inifile.h"
#include "ui/submenu.h"
@@ -523,7 +522,7 @@ void ui_menu_crosshair::populate()
}
// else
// /* leave a blank filler line when not in auto time so size does not rescale */
-// item_append("", "", NULL, NULL);
+// item_append("", "", nullptr, nullptr);
}
ui_menu_crosshair::~ui_menu_crosshair()
diff --git a/src/frontend/mame/ui/optsmenu.cpp b/src/frontend/mame/ui/optsmenu.cpp
index b08b82b1268..3dbebd3a896 100644
--- a/src/frontend/mame/ui/optsmenu.cpp
+++ b/src/frontend/mame/ui/optsmenu.cpp
@@ -13,12 +13,10 @@
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/submenu.h"
-#include "ui/datfile.h"
#include "ui/inifile.h"
#include "ui/selector.h"
#include "ui/custui.h"
#include "ui/sndmenu.h"
-#include "ui/miscmenu.h"
#include "ui/optsmenu.h"
#include "ui/custmenu.h"
#include "ui/inputmap.h"
@@ -41,7 +39,8 @@ ui_menu_game_options::ui_menu_game_options(running_machine &machine, render_cont
ui_menu_game_options::~ui_menu_game_options()
{
main_filters::actual = m_main;
- ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
+ if (ui_menu::menu_stack != nullptr)
+ ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
save_ui_options(machine());
ui_globals::switch_image = true;
}
diff --git a/src/frontend/mame/ui/pluginopt.cpp b/src/frontend/mame/ui/pluginopt.cpp
index 6d026c8fabe..ec6d0a4f25d 100644
--- a/src/frontend/mame/ui/pluginopt.cpp
+++ b/src/frontend/mame/ui/pluginopt.cpp
@@ -34,7 +34,7 @@ ui_menu_plugin::ui_menu_plugin(running_machine &machine, render_container *conta
void ui_menu_plugin::populate()
{
for (auto &curplugin : m_plugins)
- item_append(curplugin.c_str(), 0, 0, (void *)curplugin.c_str());
+ item_append(curplugin.c_str(), nullptr, 0, (void *)curplugin.c_str());
item_append(ui_menu_item_type::SEPARATOR);
}
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index fee7b756c66..25411715817 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -24,7 +24,6 @@
#include "ui/optsmenu.h"
#include "ui/selector.h"
#include "ui/selsoft.h"
-#include "sound/samples.h"
#include "ui/custmenu.h"
#include "../info.h"
#include "ui/auditmenu.h"
@@ -2085,13 +2084,13 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
{
// check size
float textlen = mui.get_string_width(tempbuf.c_str(), text_size);
- float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
+ float tmp_size2 = (textlen > sc) ? text_size * (sc / textlen) : text_size;
size_t last_underscore = tempbuf.find_last_of("_");
if (last_underscore == std::string::npos)
{
mui.draw_text_full(container, tempbuf.c_str(), origx1, oy1, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size2);
}
else
{
@@ -2102,11 +2101,11 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
float item_width;
mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size);
+ JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size2);
mui.draw_text_full(container, last_part.c_str(), effective_left + item_width, oy1,
origx2 - origx1 - 2.0f * gutter_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size2);
}
}
@@ -2115,7 +2114,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
{
// check size
float textlen = mui.get_string_width(tempbuf.c_str(), text_size);
- float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
+ float tmp_size3 = (textlen > sc) ? text_size * (sc / textlen) : text_size;
int first_dspace = (ui_globals::curdats_view == UI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":");
if (first_dspace > 0)
@@ -2126,14 +2125,14 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
std::string last_part(tempbuf.substr(first_dspace + 1));
strtrimspace(last_part);
mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width,
- JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
}
else
mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
}
else
mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
diff --git a/src/frontend/mame/ui/simpleselgame.cpp b/src/frontend/mame/ui/simpleselgame.cpp
index cd8ac95c792..dce3a395712 100644
--- a/src/frontend/mame/ui/simpleselgame.cpp
+++ b/src/frontend/mame/ui/simpleselgame.cpp
@@ -15,7 +15,6 @@
#include "ui/menu.h"
#include "uiinput.h"
#include "ui/simpleselgame.h"
-#include "ui/inputmap.h"
#include "ui/miscmenu.h"
#include "ui/optsmenu.h"
#include "drivenum.h"
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index 8ec21b8894c..75d40c2ace3 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "osdepend.h"
-#include "uiinput.h"
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/sliders.h"
diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp
index 68b8d85d36a..2d5984606eb 100644
--- a/src/frontend/mame/ui/submenu.cpp
+++ b/src/frontend/mame/ui/submenu.cpp
@@ -13,7 +13,6 @@
#include "ui/submenu.h"
#include "ui/utils.h"
#include <limits>
-#include <iterator>
//-------------------------------------------------
// ctor / dtor
@@ -89,7 +88,6 @@ ui_submenu::ui_submenu(running_machine &machine, render_container *container, st
sm_option.options = dynamic_cast<core_options*>(&mame_machine_manager::instance()->ui().options());
break;
default:
- continue;
break;
}
}
@@ -204,7 +202,7 @@ void ui_submenu::populate()
UINT32 arrow_flags;
// add options
- for (auto sm_option = m_options.begin(); sm_option < m_options.end(); sm_option++)
+ for (auto sm_option = m_options.begin(); sm_option < m_options.end(); ++sm_option)
{
// skip first heading (is menu title)
if (sm_option == m_options.begin() && sm_option->type == ui_submenu::HEAD) continue;
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index a7d88ea0b31..c075c884d1b 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -267,7 +267,18 @@ static const UINT32 mouse_bitmap[32*32] =
//-------------------------------------------------
mame_ui_manager::mame_ui_manager(running_machine &machine)
- : ui_manager(machine)
+ : ui_manager(machine),
+ m_font(nullptr),
+ m_handler_callback(nullptr),
+ m_handler_param(0),
+ m_single_step(false),
+ m_showfps(false),
+ m_showfps_end(0),
+ m_show_profiler(false),
+ m_popup_text_end(0),
+ m_mouse_arrow_texture(nullptr),
+ m_mouse_show(false),
+ m_load_save_hold(false)
{
}
@@ -278,18 +289,6 @@ void mame_ui_manager::init()
ui_menu::init(machine());
ui_gfx_init(machine());
- // reset instance variables
- m_font = nullptr;
- m_handler_callback = nullptr;
- m_handler_param = 0;
- m_single_step = false;
- m_showfps = false;
- m_showfps_end = 0;
- m_show_profiler = false;
- m_popup_text_end = 0;
- m_mouse_arrow_texture = nullptr;
- m_load_save_hold = false;
-
get_font_rows(&machine());
decode_ui_color(0, &machine());
@@ -1528,13 +1527,13 @@ UINT32 mame_ui_manager::handler_ingame(running_machine &machine, render_containe
if (mame_machine_manager::instance()->ui().show_timecode_counter()) {
std::string tempstring;
mame_machine_manager::instance()->ui().draw_text_full(container, machine.video().timecode_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, NULL, NULL);
+ JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, nullptr, nullptr);
}
// Show the total time elapsed for the video preview (all parts intro, gameplay, extras)
if (mame_machine_manager::instance()->ui().show_timecode_total()) {
std::string tempstring;
mame_machine_manager::instance()->ui().draw_text_full(container, machine.video().timecode_total_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, NULL, NULL);
+ JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, nullptr, nullptr);
}
diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp
index 2a49b00983d..94949210dfc 100644
--- a/src/frontend/mame/ui/viewgfx.cpp
+++ b/src/frontend/mame/ui/viewgfx.cpp
@@ -184,7 +184,7 @@ static void ui_gfx_count_devices(running_machine &machine, ui_gfx_state &state)
while (count < MAX_GFX_ELEMENTS && interface.gfx(count) != nullptr)
count++;
- // count = index of first NULL
+ // count = index of first nullptr
if (count > 0)
{
state.gfxdev[state.gfxset.devcount].interface = &interface;
diff --git a/src/lib/formats/cassimg.h b/src/lib/formats/cassimg.h
index 4bfbea512e6..50542aacc73 100644
--- a/src/lib/formats/cassimg.h
+++ b/src/lib/formats/cassimg.h
@@ -147,7 +147,7 @@ extern const struct CassetteFormat wavfile_format;
#define CASSETTE_FORMAT(name) \
&(name),
#define CASSETTE_FORMATLIST_END \
- NULL \
+ nullptr \
};
CASSETTE_FORMATLIST_EXTERN(cassette_default_formats);
diff --git a/src/lib/formats/cgen_cas.cpp b/src/lib/formats/cgen_cas.cpp
index 5cd4c3e1b0e..9bb77842618 100644
--- a/src/lib/formats/cgen_cas.cpp
+++ b/src/lib/formats/cgen_cas.cpp
@@ -7,6 +7,16 @@ Support for EACA Colour Genie .cas cassette images
Current state: Not working. Only the sync signal and 0x66 byte get
recognized.
+NOTE: There exist multiples type of .cas files for Colour Genie
+ - the original one from Jurgen's emu, which starts with TAPE_HEADER
+ below, followed by the sync signal, without the 255 leading 0xaa
+ bytes (which are added at loading time)
+ - a newer type from Genieous emu, which does not start with TAPE_HEADER
+ but contains the 255 leading 0xaa bytes (which are now skipped below)
+ - an alternative type (from Genieous as well?) without TAPE_HEADER
+ and without the 255 leading 0xaa bytes
+We now support these three types below...
+
********************************************************************/
#include <assert.h>
@@ -25,22 +35,21 @@ static int level;
static int cgenie_output_byte(INT16 *buffer, int sample_count, UINT8 data)
{
- int i;
int samples = 0;
- for ( i = 0; i < 8; i++ )
+ for (int i = 0; i < 8; i++)
{
- /* Output bit boundary */
+ // Output bit boundary
level ^= 1;
- if ( buffer )
- buffer[ sample_count + samples ] = level ? SMPHI : SMPLO;
+ if (buffer)
+ buffer[sample_count + samples] = level ? SMPHI : SMPLO;
samples++;
- /* Output bit */
- if ( data & 0x80 )
+ // Output bit
+ if (data & 0x80)
level ^= 1;
- if ( buffer )
- buffer[ sample_count + samples ] = level ? SMPHI : SMPLO;
+ if (buffer)
+ buffer[sample_count + samples] = level ? SMPHI : SMPLO;
samples++;
data <<= 1;
@@ -51,46 +60,47 @@ static int cgenie_output_byte(INT16 *buffer, int sample_count, UINT8 data)
static int cgenie_handle_cas(INT16 *buffer, const UINT8 *casdata)
{
- int i, data_pos, sample_count;
+ int data_pos, sample_count;
data_pos = 0;
sample_count = 0;
level = 0;
- /* Check for presence of optional header */
- if ( ! memcmp( casdata, TAPE_HEADER, sizeof(TAPE_HEADER) - 1 ) )
+ // Check for presence of optional header
+ if (!memcmp(casdata, TAPE_HEADER, sizeof(TAPE_HEADER) - 1))
{
- /* Search for 0x00 or end of file */
- while ( data_pos < cas_size && casdata[data_pos] )
+ // Search for 0x00 or end of file
+ while (data_pos < cas_size && casdata[data_pos])
data_pos++;
- /* If we're at the end of the file it's not a valid .cas file */
- if ( data_pos == cas_size )
+ // If we're at the end of the file it's not a valid .cas file
+ if (data_pos == cas_size)
return -1;
- /* Skip the 0x00 byte */
+ // Skip the 0x00 byte
data_pos++;
}
- /* If we're at the end of the file it's not a valid .cas file */
- if ( data_pos == cas_size )
+ // If we're at the end of the file it's not a valid .cas file
+ if (data_pos == cas_size)
return -1;
- /* Check for beginning of tape file marker */
- if ( casdata[data_pos] != 0x66 )
+ // Check for beginning of tape file marker (possibly skipping the 0xaa header)
+ if (casdata[data_pos] != 0x66 && casdata[data_pos + 0xff] != 0x66)
return -1;
- /* Create header */
- for ( i = 0; i < 256; i++ )
- sample_count += cgenie_output_byte( buffer, sample_count, 0xaa );
+ // Create header, if not present in the file
+ if (casdata[data_pos] == 0x66)
+ for (int i = 0; i < 256; i++)
+ sample_count += cgenie_output_byte(buffer, sample_count, 0xaa);
- /* Start outputting data */
- while( data_pos < cas_size )
+ // Start outputting data
+ while (data_pos < cas_size)
{
- sample_count += cgenie_output_byte( buffer, sample_count, casdata[data_pos] );
+ sample_count += cgenie_output_byte(buffer, sample_count, casdata[data_pos]);
data_pos++;
}
- sample_count += cgenie_output_byte( buffer, sample_count, 0x00 );
+ sample_count += cgenie_output_byte(buffer, sample_count, 0x00);
return sample_count;
}
@@ -100,7 +110,7 @@ static int cgenie_handle_cas(INT16 *buffer, const UINT8 *casdata)
********************************************************************/
static int cgenie_cas_fill_wave(INT16 *buffer, int sample_count, UINT8 *bytes)
{
- return cgenie_handle_cas( buffer, bytes );
+ return cgenie_handle_cas(buffer, bytes);
}
@@ -111,7 +121,7 @@ static int cgenie_cas_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen;
- return cgenie_handle_cas( nullptr, casdata );
+ return cgenie_handle_cas(nullptr, casdata);
}
static const struct CassetteLegacyWaveFiller cgenie_cas_legacy_fill_wave =
diff --git a/src/lib/formats/flopimg.h b/src/lib/formats/flopimg.h
index 258bc0d3db0..986cc110a9c 100644
--- a/src/lib/formats/flopimg.h
+++ b/src/lib/formats/flopimg.h
@@ -121,7 +121,7 @@ FLOPPY_CONSTRUCT(fdi_dsk_construct);
const struct FloppyFormat floppyoptions_##name[] = \
{
#define LEGACY_FLOPPY_OPTIONS_END0 \
- { NULL } \
+ { nullptr } \
};
#define LEGACY_FLOPPY_OPTIONS_EXTERN(name) \
@@ -129,12 +129,12 @@ FLOPPY_CONSTRUCT(fdi_dsk_construct);
#define LEGACY_FLOPPY_OPTION(name, extensions_, description_, identify_, construct_, destruct_, ranges_)\
{ #name, extensions_, description_, identify_, construct_, destruct_, ranges_ },
#define LEGACY_FLOPPY_OPTIONS_END \
- LEGACY_FLOPPY_OPTION( fdi, "fdi", "Formatted Disk Image", fdi_dsk_identify, fdi_dsk_construct, NULL, NULL) \
- LEGACY_FLOPPY_OPTION( td0, "td0", "Teledisk floppy disk image", td0_dsk_identify, td0_dsk_construct, td0_dsk_destruct, NULL) \
- LEGACY_FLOPPY_OPTION( imd, "imd", "IMD floppy disk image", imd_dsk_identify, imd_dsk_construct, NULL, NULL) \
- LEGACY_FLOPPY_OPTION( cqm, "cqm,dsk", "CopyQM floppy disk image", cqm_dsk_identify, cqm_dsk_construct, NULL, NULL) \
- LEGACY_FLOPPY_OPTION( dsk, "dsk", "DSK floppy disk image", dsk_dsk_identify, dsk_dsk_construct, NULL, NULL) \
- LEGACY_FLOPPY_OPTION( d88, "d77,d88,1dd", "D88 Floppy Disk image", d88_dsk_identify, d88_dsk_construct, NULL, NULL) \
+ LEGACY_FLOPPY_OPTION( fdi, "fdi", "Formatted Disk Image", fdi_dsk_identify, fdi_dsk_construct, nullptr, nullptr) \
+ LEGACY_FLOPPY_OPTION( td0, "td0", "Teledisk floppy disk image", td0_dsk_identify, td0_dsk_construct, td0_dsk_destruct, nullptr) \
+ LEGACY_FLOPPY_OPTION( imd, "imd", "IMD floppy disk image", imd_dsk_identify, imd_dsk_construct, nullptr, nullptr) \
+ LEGACY_FLOPPY_OPTION( cqm, "cqm,dsk", "CopyQM floppy disk image", cqm_dsk_identify, cqm_dsk_construct, nullptr, nullptr) \
+ LEGACY_FLOPPY_OPTION( dsk, "dsk", "DSK floppy disk image", dsk_dsk_identify, dsk_dsk_construct, nullptr, nullptr) \
+ LEGACY_FLOPPY_OPTION( d88, "d77,d88,1dd", "D88 Floppy Disk image", d88_dsk_identify, d88_dsk_construct, nullptr, nullptr) \
LEGACY_FLOPPY_OPTIONS_END0
LEGACY_FLOPPY_OPTIONS_EXTERN(default);
diff --git a/src/lib/formats/fsd_dsk.cpp b/src/lib/formats/fsd_dsk.cpp
index bed5a780275..6fec1c9754e 100644
--- a/src/lib/formats/fsd_dsk.cpp
+++ b/src/lib/formats/fsd_dsk.cpp
@@ -159,7 +159,7 @@ bool fsd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
//sects[i].actual_size = 0;
//sects[i].deleted = false;
//sects[i].bad_crc = false;
- //sects[i].data = NULL;
+ //sects[i].data = nullptr;
//osd_printf_verbose("Unread %x %x %x %x %x %x %x\n", i, sects[i].track, sects[i].head, sects[i].sector, sects[i].size, sects[i].actual_size, 0);
}
}
diff --git a/src/lib/formats/imageutl.cpp b/src/lib/formats/imageutl.cpp
index 2bf17be849c..ecb322aac57 100644
--- a/src/lib/formats/imageutl.cpp
+++ b/src/lib/formats/imageutl.cpp
@@ -167,7 +167,7 @@ void image_specify_extension(char *buffer, size_t buffer_len, const char *extens
/* determine the length of the buffer */
len = strlen(buffer);
- /* be aware that extension can be NULL */
+ /* be aware that extension can be nullptr */
if (extension != nullptr)
{
while(extension[extension_pos] != '\0')
diff --git a/src/lib/formats/rx50_dsk.cpp b/src/lib/formats/rx50_dsk.cpp
index b612db5b4a7..dd92318450b 100644
--- a/src/lib/formats/rx50_dsk.cpp
+++ b/src/lib/formats/rx50_dsk.cpp
@@ -216,8 +216,8 @@ const floppy_format_type FLOPPY_RX50IMG_FORMAT = &floppy_image_format_creator<rx
// The BIOS can also * read * VT-180 disks and access MS-DOS 160 k disks (R + W)
// ( 40 tracks; single sided with 9 or 8 sectors per track )
static LEGACY_FLOPPY_OPTIONS_START( dec100_floppy )
- LEGACY_FLOPPY_OPTION( dec100_floppy, "td0", "Teledisk floppy disk image", td0_dsk_identify, td0_dsk_construct, td0_dsk_destruct, NULL )
- LEGACY_FLOPPY_OPTION( dec100_floppy, "img", "DEC Rainbow 100", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION( dec100_floppy, "td0", "Teledisk floppy disk image", td0_dsk_identify, td0_dsk_construct, td0_dsk_destruct, nullptr )
+ LEGACY_FLOPPY_OPTION( dec100_floppy, "img", "DEC Rainbow 100", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS(40/[80])
SECTORS(8/9/[10])
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp
index d78fee1595f..fa157b282f9 100644
--- a/src/lib/formats/tzx_cas.cpp
+++ b/src/lib/formats/tzx_cas.cpp
@@ -532,7 +532,7 @@ static const char *const hw_info[] =
};
/* Will go through blocks and calculate number of samples needed.
-If buffer is not NULL the sample data will also be written. */
+If buffer is not nullptr the sample data will also be written. */
static int tzx_cas_do_work( INT16 **buffer )
{
int current_block = 0;
diff --git a/src/lib/formats/x07_cas.cpp b/src/lib/formats/x07_cas.cpp
index 0c36ad7c3e8..b55ed79913a 100644
--- a/src/lib/formats/x07_cas.cpp
+++ b/src/lib/formats/x07_cas.cpp
@@ -91,7 +91,7 @@ static int x07_handle_cassette(INT16 *buffer, const UINT8 *bytes)
}
else
{
- // remove the NULL chars at start
+ // remove the nullptr chars at start
while (!bytes[img_start])
img_start++;
diff --git a/src/lib/netlist/analog/nld_fourterm.cpp b/src/lib/netlist/analog/nld_fourterm.cpp
index 7cba4b15588..51502319f83 100644
--- a/src/lib/netlist/analog/nld_fourterm.cpp
+++ b/src/lib/netlist/analog/nld_fourterm.cpp
@@ -34,8 +34,8 @@ void NETLIB_NAME(VCCS)::start_internal(const nl_double def_RI)
register_terminal("_OP1", m_OP1);
register_terminal("_ON1", m_ON1);
- m_IP.m_otherterm = &m_IN; // <= this should be NULL and terminal be filtered out prior to solving...
- m_IN.m_otherterm = &m_IP; // <= this should be NULL and terminal be filtered out prior to solving...
+ m_IP.m_otherterm = &m_IN; // <= this should be nullptr and terminal be filtered out prior to solving...
+ m_IN.m_otherterm = &m_IP; // <= this should be nullptr and terminal be filtered out prior to solving...
m_OP.m_otherterm = &m_IP;
m_OP1.m_otherterm = &m_IN;
diff --git a/src/lib/netlist/devices/nld_system.cpp b/src/lib/netlist/devices/nld_system.cpp
index e861bf05171..3e4565d09d2 100644
--- a/src/lib/netlist/devices/nld_system.cpp
+++ b/src/lib/netlist/devices/nld_system.cpp
@@ -148,7 +148,7 @@ NETLIB_RESET(logic_input)
NETLIB_STOP(logic_input)
{
- if (m_logic_family != NULL)
+ if (m_logic_family != nullptr)
if (!m_logic_family->m_is_static)
pfree(m_logic_family);
}
diff --git a/src/lib/netlist/devices/nld_truthtable.cpp b/src/lib/netlist/devices/nld_truthtable.cpp
index 9cd2d206664..c56666209cb 100644
--- a/src/lib/netlist/devices/nld_truthtable.cpp
+++ b/src/lib/netlist/devices/nld_truthtable.cpp
@@ -270,7 +270,7 @@ netlist_base_factory_truthtable_t *nl_tt_factory_create(const unsigned ni, const
pstring msg = pfmt("unable to create truthtable<{1},{2},{3}>")(ni)(no)(has_state);
nl_assert_always(false, msg);
}
- return NULL;
+ return nullptr;
}
NETLIB_NAMESPACE_DEVICES_END()
diff --git a/src/lib/netlist/devices/nld_truthtable.h b/src/lib/netlist/devices/nld_truthtable.h
index 4c53260fdc3..d84e3b56a13 100644
--- a/src/lib/netlist/devices/nld_truthtable.h
+++ b/src/lib/netlist/devices/nld_truthtable.h
@@ -112,7 +112,7 @@ public:
nld_truthtable_t(truthtable_t *ttbl, const char *desc[])
: device_t(), m_last_state(0), m_ign(0), m_active(1), m_ttp(ttbl)
{
- while (*desc != NULL && **desc != 0 )
+ while (*desc != nullptr && **desc != 0 )
{
m_desc.push_back(*desc);
desc++;
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index c37217c6bbb..3cd6f6ba645 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -175,7 +175,7 @@ ATTR_COLD const pstring &object_t::name() const
ATTR_COLD device_object_t::device_object_t(const type_t atype,
const family_t afamily)
: object_t(atype, afamily)
-, m_device(NULL)
+, m_device(nullptr)
{
}
@@ -196,12 +196,12 @@ netlist_t::netlist_t(const pstring &aname)
m_time(netlist_time::zero),
m_use_deactivate(0),
m_queue(*this),
- m_mainclock(NULL),
- m_solver(NULL),
- m_gnd(NULL),
- m_params(NULL),
+ m_mainclock(nullptr),
+ m_solver(nullptr),
+ m_gnd(nullptr),
+ m_params(nullptr),
m_name(aname),
- m_setup(NULL),
+ m_setup(nullptr),
m_log(this),
m_lib(nullptr)
{
@@ -250,10 +250,10 @@ ATTR_COLD void netlist_t::start()
/* make sure the solver and parameters are started first! */
- if (m_solver != NULL)
+ if (m_solver != nullptr)
m_solver->start_dev();
- if (m_params != NULL)
+ if (m_params != nullptr)
{
m_params->start_dev();
}
@@ -282,7 +282,7 @@ ATTR_COLD net_t *netlist_t::find_net(const pstring &name)
if (net->name() == name)
return net;
- return NULL;
+ return nullptr;
}
ATTR_COLD void netlist_t::rebuild_lists()
@@ -296,9 +296,9 @@ ATTR_COLD void netlist_t::reset()
{
m_time = netlist_time::zero;
m_queue.clear();
- if (m_mainclock != NULL)
+ if (m_mainclock != nullptr)
m_mainclock->m_Q.net().set_time(netlist_time::zero);
- if (m_solver != NULL)
+ if (m_solver != nullptr)
m_solver->do_reset();
// Reset all nets once !
@@ -330,7 +330,7 @@ ATTR_HOT void netlist_t::process_queue(const netlist_time &delta)
{
m_stop = m_time + delta;
- if (m_mainclock == NULL)
+ if (m_mainclock == nullptr)
{
while ( (m_time < m_stop) && (m_queue.is_not_empty()))
{
@@ -401,7 +401,7 @@ ATTR_COLD core_device_t::core_device_t(const family_t afamily)
ATTR_COLD void core_device_t::init(netlist_t &anetlist, const pstring &name)
{
- if (logic_family() == NULL)
+ if (logic_family() == nullptr)
set_logic_family(this->default_logic_family());
init_object(anetlist, name);
@@ -587,7 +587,7 @@ ATTR_COLD net_t::net_t(const family_t afamily)
: object_t(NET, afamily)
, m_new_Q(0)
, m_cur_Q (0)
- , m_railterminal(NULL)
+ , m_railterminal(nullptr)
, m_time(netlist_time::zero)
, m_active(0)
, m_in_queue(2)
@@ -648,7 +648,7 @@ ATTR_HOT void net_t::dec_active(core_terminal_t &term)
ATTR_COLD void net_t::register_railterminal(core_terminal_t &mr)
{
- nl_assert(m_railterminal == NULL);
+ nl_assert(m_railterminal == nullptr);
m_railterminal = &mr;
}
@@ -689,7 +689,7 @@ ATTR_HOT /* inline */ void net_t::update_devs()
m_in_queue = 2; /* mark as taken ... */
m_cur_Q = m_new_Q;
- for (core_terminal_t *p = m_list_active.first(); p != NULL; p = p->next())
+ for (core_terminal_t *p = m_list_active.first(); p != nullptr; p = p->next())
{
inc_stat(p->netdev().stat_call_count);
if ((p->state() & mask) != 0)
@@ -742,7 +742,7 @@ ATTR_COLD void net_t::move_connections(net_t *dest_net)
ATTR_COLD void net_t::merge_net(net_t *othernet)
{
netlist().log().debug("merging nets ...\n");
- if (othernet == NULL)
+ if (othernet == nullptr)
return; // Nothing to do
if (othernet == this)
@@ -792,7 +792,7 @@ ATTR_COLD void logic_net_t::save_register()
ATTR_COLD analog_net_t::analog_net_t()
: net_t(ANALOG)
- , m_solver(NULL)
+ , m_solver(nullptr)
{
}
@@ -844,7 +844,7 @@ ATTR_COLD void analog_net_t::process_net(pvector_t<list_t> &groups)
ATTR_COLD core_terminal_t::core_terminal_t(const type_t atype, const family_t afamily)
: device_object_t(atype, afamily)
, plinkedlist_element_t()
-, m_net(NULL)
+, m_net(nullptr)
, m_state(STATE_NONEX)
{
}
@@ -860,10 +860,10 @@ ATTR_COLD void core_terminal_t::set_net(net_t &anet)
ATTR_COLD terminal_t::terminal_t()
: analog_t(TERMINAL)
-, m_otherterm(NULL)
-, m_Idr1(NULL)
-, m_go1(NULL)
-, m_gt1(NULL)
+, m_otherterm(nullptr)
+, m_Idr1(nullptr)
+, m_go1(nullptr)
+, m_gt1(nullptr)
{
}
@@ -871,14 +871,14 @@ ATTR_COLD terminal_t::terminal_t()
ATTR_HOT void terminal_t::schedule_solve()
{
// FIXME: Remove this after we found a way to remove *ALL* twoterms connected to railnets only.
- if (net().solver() != NULL)
+ if (net().solver() != nullptr)
net().solver()->update_forced();
}
ATTR_HOT void terminal_t::schedule_after(const netlist_time &after)
{
// FIXME: Remove this after we found a way to remove *ALL* twoterms connected to railnets only.
- if (net().solver() != NULL)
+ if (net().solver() != nullptr)
net().solver()->update_after(after);
}
@@ -936,7 +936,7 @@ ATTR_COLD void logic_output_t::initial(const netlist_sig_t val)
// ----------------------------------------------------------------------------------------
ATTR_COLD analog_output_t::analog_output_t()
- : analog_t(OUTPUT), m_proxied_net(NULL)
+ : analog_t(OUTPUT), m_proxied_net(nullptr)
{
this->set_net(m_my_net);
set_state(STATE_OUT);
@@ -945,7 +945,7 @@ ATTR_COLD analog_output_t::analog_output_t()
}
ATTR_COLD analog_output_t::analog_output_t(core_device_t &dev, const pstring &aname)
- : analog_t(OUTPUT), m_proxied_net(NULL)
+ : analog_t(OUTPUT), m_proxied_net(nullptr)
{
this->set_net(m_my_net);
set_state(STATE_OUT);
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index 55be15527de..b5c26a2262c 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -342,7 +342,7 @@ namespace netlist
{
public:
- logic_family_t() : m_logic_family(NULL) {}
+ logic_family_t() : m_logic_family(nullptr) {}
~logic_family_t() { }
ATTR_HOT logic_family_desc_t *logic_family() const { return m_logic_family; }
@@ -412,7 +412,7 @@ namespace netlist
ATTR_COLD void init_object(const pstring &aname);
ATTR_COLD void init_object(netlist_t &nl, const pstring &aname);
- ATTR_COLD bool isInitialized() { return (m_netlist != NULL); }
+ ATTR_COLD bool isInitialized() { return (m_netlist != nullptr); }
ATTR_COLD const pstring &name() const;
@@ -489,8 +489,8 @@ namespace netlist
ATTR_COLD core_terminal_t(const type_t atype, const family_t afamily);
ATTR_COLD void set_net(net_t &anet);
- ATTR_COLD void clear_net() { m_net = NULL; }
- ATTR_HOT bool has_net() const { return (m_net != NULL); }
+ ATTR_COLD void clear_net() { m_net = nullptr; }
+ ATTR_HOT bool has_net() const { return (m_net != nullptr); }
ATTR_HOT const net_t & net() const { return *m_net;}
ATTR_HOT net_t & net() { return *m_net;}
@@ -594,7 +594,7 @@ namespace netlist
private:
ATTR_HOT void set_ptr(nl_double *ptr, const nl_double val)
{
- if (ptr != NULL && *ptr != val)
+ if (ptr != nullptr && *ptr != val)
{
*ptr = val;
}
@@ -618,7 +618,7 @@ namespace netlist
ATTR_COLD logic_t(const type_t atype)
: core_terminal_t(atype, LOGIC), logic_family_t(),
- m_proxy(NULL)
+ m_proxy(nullptr)
{
}
@@ -626,7 +626,7 @@ namespace netlist
{
}
- ATTR_COLD bool has_proxy() const { return (m_proxy != NULL); }
+ ATTR_COLD bool has_proxy() const { return (m_proxy != nullptr); }
ATTR_COLD devices::nld_base_proxy *get_proxy() const { return m_proxy; }
ATTR_COLD void set_proxy(devices::nld_base_proxy *proxy) { m_proxy = proxy; }
@@ -720,7 +720,7 @@ namespace netlist
ATTR_HOT const netlist_time &time() const { return m_time; }
ATTR_HOT void set_time(const netlist_time &ntime) { m_time = ntime; }
- ATTR_HOT bool isRailNet() const { return !(m_railterminal == NULL); }
+ ATTR_HOT bool isRailNet() const { return !(m_railterminal == nullptr); }
ATTR_HOT core_terminal_t & railterminal() const { return *m_railterminal; }
ATTR_HOT void push_to_queue(const netlist_time &delay);
@@ -1227,7 +1227,7 @@ namespace netlist
for (std::size_t i = 0; i < m_devices.size(); i++)
{
_device_class *dev = dynamic_cast<_device_class *>(m_devices[i]);
- if (dev != NULL)
+ if (dev != nullptr)
tmp.push_back(dev);
}
return tmp;
@@ -1239,22 +1239,22 @@ namespace netlist
for (std::size_t i = 0; i < m_devices.size(); i++)
{
_device_class *dev = dynamic_cast<_device_class *>(m_devices[i]);
- if (dev != NULL)
+ if (dev != nullptr)
return dev;
}
- return NULL;
+ return nullptr;
}
template<class _device_class>
ATTR_COLD _device_class *get_single_device(const char *classname)
{
- _device_class *ret = NULL;
+ _device_class *ret = nullptr;
for (std::size_t i = 0; i < m_devices.size(); i++)
{
_device_class *dev = dynamic_cast<_device_class *>(m_devices[i]);
- if (dev != NULL)
+ if (dev != nullptr)
{
- if (ret != NULL)
+ if (ret != nullptr)
this->log().fatal("more than one {1} device found", classname);
else
ret = dev;
diff --git a/src/lib/netlist/nl_factory.cpp b/src/lib/netlist/nl_factory.cpp
index 45765cb8e30..397aa756ea3 100644
--- a/src/lib/netlist/nl_factory.cpp
+++ b/src/lib/netlist/nl_factory.cpp
@@ -62,7 +62,7 @@ device_t *factory_list_t::new_device_by_classname(const pstring &classname) cons
}
p++;
}
- return NULL; // appease code analysis
+ return nullptr; // appease code analysis
}
#endif
@@ -84,7 +84,7 @@ base_factory_t * factory_list_t::factory_by_name(const pstring &name)
else
{
m_setup.log().fatal("Class {1} not found!\n", name);
- return NULL; // appease code analysis
+ return nullptr; // appease code analysis
}
}
diff --git a/src/lib/netlist/nl_parser.h b/src/lib/netlist/nl_parser.h
index b11d89f5ff1..2a6cc79ad2b 100644
--- a/src/lib/netlist/nl_parser.h
+++ b/src/lib/netlist/nl_parser.h
@@ -19,7 +19,7 @@ namespace netlist
P_PREVENT_COPYING(parser_t)
public:
parser_t(pistream &strm, setup_t &setup)
- : ptokenizer(strm), m_setup(setup), m_buf(NULL) {}
+ : ptokenizer(strm), m_setup(setup), m_buf(nullptr) {}
bool parse(const pstring nlname = "");
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index dad17991b87..3e347356b5a 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -74,7 +74,7 @@ setup_t::~setup_t()
m_terminals.clear();
m_params_temp.clear();
- netlist().set_setup(NULL);
+ netlist().set_setup(nullptr);
pfree(m_factory);
m_sources.clear_and_free();
@@ -132,13 +132,13 @@ device_t *setup_t::register_dev(const pstring &classname, const pstring &name)
namespace_push(name);
include(classname);
namespace_pop();
- return NULL;
+ return nullptr;
}
else
{
device_t *dev = factory().new_device_by_name(classname);
//device_t *dev = factory().new_device_by_classname(classname);
- if (dev == NULL)
+ if (dev == nullptr)
log().fatal("Class {1} not found!\n", classname);
return register_dev(dev, name);
}
@@ -412,11 +412,11 @@ core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, bool require
ret = m_terminals.index_of(tname + ".Q");
}
- core_terminal_t *term = (ret < 0 ? NULL : m_terminals.value_at(ret));
+ core_terminal_t *term = (ret < 0 ? nullptr : m_terminals.value_at(ret));
- if (term == NULL && required)
+ if (term == nullptr && required)
log().fatal("terminal {1}({2}) not found!\n", terminal_in, tname);
- if (term != NULL)
+ if (term != nullptr)
log().debug("Found input {1}\n", tname);
return term;
}
@@ -436,16 +436,16 @@ core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, object_t::ty
if (ret < 0 && required)
log().fatal("terminal {1}({2}) not found!\n", terminal_in, tname);
- core_terminal_t *term = (ret < 0 ? NULL : m_terminals.value_at(ret));
+ core_terminal_t *term = (ret < 0 ? nullptr : m_terminals.value_at(ret));
- if (term != NULL && term->type() != atype)
+ if (term != nullptr && term->type() != atype)
{
if (required)
log().fatal("object {1}({2}) found but wrong type\n", terminal_in, tname);
else
- term = NULL;
+ term = nullptr;
}
- if (term != NULL)
+ if (term != nullptr)
log().debug("Found input {1}\n", tname);
return term;
@@ -463,7 +463,7 @@ param_t *setup_t::find_param(const pstring &param_in, bool required)
log().fatal("parameter {1}({2}) not found!\n", param_in_fqn, outname);
if (ret != -1)
log().debug("Found parameter {1}\n", outname);
- return (ret == -1 ? NULL : m_params.value_at(ret));
+ return (ret == -1 ? nullptr : m_params.value_at(ret));
}
// FIXME avoid dynamic cast here
@@ -474,7 +474,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(core_terminal_t &out)
logic_output_t &out_cast = dynamic_cast<logic_output_t &>(out);
devices::nld_base_proxy *proxy = out_cast.get_proxy();
- if (proxy == NULL)
+ if (proxy == nullptr)
{
// create a new one ...
devices::nld_base_d_to_a_proxy *new_proxy = out_cast.logic_family()->create_d_a_proxy(&out_cast);
@@ -782,7 +782,7 @@ void setup_t::resolve_inputs()
for (std::size_t i = 0; i < m_terminals.size(); i++)
{
core_terminal_t *term = m_terminals.value_at(i);
- if (!term->has_net() && dynamic_cast< devices::NETLIB_NAME(dummy_input) *>(&term->device()) != NULL)
+ if (!term->has_net() && dynamic_cast< devices::NETLIB_NAME(dummy_input) *>(&term->device()) != nullptr)
log().warning("Found dummy terminal {1} without connections", term->name());
else if (!term->has_net())
errstr += pfmt("Found terminal {1} without a net\n")(term->name());
@@ -798,7 +798,7 @@ void setup_t::resolve_inputs()
for (std::size_t i=0; i < netlist().m_devices.size(); i++)
{
devices::NETLIB_NAME(twoterm) *t = dynamic_cast<devices::NETLIB_NAME(twoterm) *>(netlist().m_devices[i]);
- if (t != NULL)
+ if (t != nullptr)
{
has_twoterms = true;
if (t->m_N.net().isRailNet() && t->m_P.net().isRailNet())
@@ -809,7 +809,7 @@ void setup_t::resolve_inputs()
log().verbose("initialize solver ...\n");
- if (netlist().solver() == NULL)
+ if (netlist().solver() == nullptr)
{
if (has_twoterms)
log().fatal("No solver found for this net although analog elements are present\n");
diff --git a/src/lib/netlist/nl_util.h b/src/lib/netlist/nl_util.h
index 76f49918c18..352b20d0003 100644
--- a/src/lib/netlist/nl_util.h
+++ b/src/lib/netlist/nl_util.h
@@ -44,7 +44,7 @@ public:
static const pstring environment(const pstring &var, const pstring &default_val = "")
{
- if (getenv(var.cstr()) == NULL)
+ if (getenv(var.cstr()) == nullptr)
return default_val;
else
return pstring(getenv(var.cstr()));
diff --git a/src/lib/netlist/plib/palloc.cpp b/src/lib/netlist/plib/palloc.cpp
index 22dbc1d4e93..b6d188d159e 100644
--- a/src/lib/netlist/plib/palloc.cpp
+++ b/src/lib/netlist/plib/palloc.cpp
@@ -40,7 +40,7 @@ void* operator new(std::size_t size, pmemory_pool *pool) throw (std::bad_alloc)
void operator delete(void *ptr, pmemory_pool *pool)
{
- if (ptr != NULL)
+ if (ptr != nullptr)
pfree_raw(ptr);
}
diff --git a/src/lib/netlist/plib/pfmtlog.cpp b/src/lib/netlist/plib/pfmtlog.cpp
index d66b8f62520..25ed4c4d391 100644
--- a/src/lib/netlist/plib/pfmtlog.cpp
+++ b/src/lib/netlist/plib/pfmtlog.cpp
@@ -61,7 +61,7 @@ void pformat::format_element(const char *f, const char *l, const char *fmt_spec,
m_arg++;
int sl = sprintf(search, "%%%d", m_arg);
char *p = strstr(m_str, search);
- if (p != NULL)
+ if (p != nullptr)
{
// Make room
memmove(p+nl, p+sl, strlen(p) + 1 - sl);
@@ -80,23 +80,23 @@ void pfmt::format_element(const char *f, const char *l, const char *fmt_spec, .
m_arg++;
int sl = sprintf(search, "{%d:", m_arg);
char *p = strstr(m_str, search);
- if (p == NULL)
+ if (p == nullptr)
{
sl = sprintf(search, "{%d}", m_arg);
p = strstr(m_str, search);
- if (p == NULL)
+ if (p == nullptr)
{
sl = 2;
p = strstr(m_str, "{}");
}
- if (p==NULL)
+ if (p==nullptr)
{
sl=1;
p = strstr(m_str, "{");
- if (p != NULL)
+ if (p != nullptr)
{
char *p1 = strstr(p, "}");
- if (p1 != NULL)
+ if (p1 != nullptr)
{
sl = p1 - p + 1;
strncat(fmt, p+1, p1 - p - 2);
@@ -111,7 +111,7 @@ void pfmt::format_element(const char *f, const char *l, const char *fmt_spec, .
else
{
char *p1 = strstr(p, "}");
- if (p1 != NULL)
+ if (p1 != nullptr)
{
sl = p1 - p + 1;
if (m_arg>=10)
@@ -124,20 +124,20 @@ void pfmt::format_element(const char *f, const char *l, const char *fmt_spec, .
}
strcat(fmt, l);
char *pend = fmt + strlen(fmt) - 1;
- if (strchr("fge", *fmt_spec) != NULL)
+ if (strchr("fge", *fmt_spec) != nullptr)
{
- if (strchr("fge", *pend) == NULL)
+ if (strchr("fge", *pend) == nullptr)
strcat(fmt, fmt_spec);
}
- else if (strchr("duxo", *fmt_spec) != NULL)
+ else if (strchr("duxo", *fmt_spec) != nullptr)
{
- if (strchr("duxo", *pend) == NULL)
+ if (strchr("duxo", *pend) == nullptr)
strcat(fmt, fmt_spec);
}
else
strcat(fmt, fmt_spec);
int nl = vsprintf(buf, fmt, ap);
- if (p != NULL)
+ if (p != nullptr)
{
// check room
unsigned new_size = (p - m_str) + nl + strlen(p) + 1 - sl;
diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h
index b9a9a70e195..495aeb5ed38 100644
--- a/src/lib/netlist/plib/plists.h
+++ b/src/lib/netlist/plib/plists.h
@@ -52,9 +52,9 @@ public:
~parray_t()
{
- if (m_list != NULL)
+ if (m_list != nullptr)
pfree_array(m_list);
- m_list = NULL;
+ m_list = nullptr;
}
ATTR_HOT _ListClass& operator[](const std::size_t index) { return m_list[index]; }
@@ -70,12 +70,12 @@ public:
protected:
ATTR_COLD void set_capacity(const std::size_t new_capacity)
{
- if (m_list != NULL)
+ if (m_list != nullptr)
pfree_array(m_list);
if (new_capacity > 0)
m_list = palloc_array(_ListClass, new_capacity);
else
- m_list = NULL;
+ m_list = nullptr;
m_capacity = new_capacity;
}
@@ -153,7 +153,7 @@ public:
friend class plinkedlist_t<_ListClass>;
- plinkedlist_element_t() : m_next(NULL) {}
+ plinkedlist_element_t() : m_next(nullptr) {}
_ListClass *next() const { return m_next; }
private:
@@ -165,7 +165,7 @@ class plinkedlist_t
{
public:
- plinkedlist_t() : m_head(NULL) {}
+ plinkedlist_t() : m_head(nullptr) {}
ATTR_HOT void insert(const _ListClass &before, _ListClass &elem)
{
@@ -177,7 +177,7 @@ public:
else
{
_ListClass *p = m_head;
- while (p != NULL)
+ while (p != nullptr)
{
if (p->m_next == &before)
{
@@ -200,12 +200,12 @@ public:
ATTR_HOT void add(_ListClass &elem)
{
_ListClass **p = &m_head;
- while (*p != NULL)
+ while (*p != nullptr)
{
p = &((*p)->m_next);
}
*p = &elem;
- elem.m_next = NULL;
+ elem.m_next = nullptr;
}
ATTR_HOT void remove(const _ListClass &elem)
@@ -213,14 +213,14 @@ public:
_ListClass **p;
for (p = &m_head; *p != &elem; p = &((*p)->m_next))
{
- //nl_assert(*p != NULL);
+ //nl_assert(*p != nullptr);
}
(*p) = elem.m_next;
}
ATTR_HOT _ListClass *first() const { return m_head; }
- ATTR_HOT void clear() { m_head = NULL; }
- ATTR_HOT bool is_empty() const { return (m_head == NULL); }
+ ATTR_HOT void clear() { m_head = nullptr; }
+ ATTR_HOT bool is_empty() const { return (m_head == nullptr); }
private:
_ListClass *m_head;
@@ -234,7 +234,7 @@ public:
friend class plinkedlist_t<_ListClass>;
- plinkedlist_element_t() : m_next(NULL), m_prev(NULL) {}
+ plinkedlist_element_t() : m_next(nullptr), m_prev(nullptr) {}
_ListClass *next() const { return m_next; }
private:
@@ -247,46 +247,46 @@ class plinkedlist_t
{
public:
- plinkedlist_t() : m_head(NULL), m_tail(NULL) {}
+ plinkedlist_t() : m_head(nullptr), m_tail(nullptr) {}
ATTR_HOT void insert(_ListClass &elem)
{
- if (m_head != NULL)
+ if (m_head != nullptr)
m_head->m_prev = &elem;
elem.m_next = m_head;
- elem.m_prev = NULL;
+ elem.m_prev = nullptr;
m_head = &elem;
- if (m_tail == NULL)
+ if (m_tail == nullptr)
m_tail = &elem;
}
ATTR_HOT void add(_ListClass &elem)
{
- if (m_tail != NULL)
+ if (m_tail != nullptr)
m_tail->m_next = &elem;
elem.m_prev = m_tail;
m_tail = &elem;
- elem.m_next = NULL;
- if (m_head == NULL)
+ elem.m_next = nullptr;
+ if (m_head == nullptr)
m_head = &elem;
}
ATTR_HOT void remove(const _ListClass &elem)
{
- if (prev(elem) == NULL)
+ if (prev(elem) == nullptr)
{
m_head = next(elem);
if (m_tail == &elem)
- m_tail = NULL;
+ m_tail = nullptr;
}
else
prev(elem)->m_next = next(elem);
- if (next(elem) == NULL)
+ if (next(elem) == nullptr)
{
m_tail = prev(elem);
if (m_head == &elem)
- m_head = NULL;
+ m_head = nullptr;
}
else
next(elem)->m_prev = prev(elem);
@@ -298,8 +298,8 @@ public:
ATTR_HOT static _ListClass *prev(const _ListClass &elem) { return static_cast<_ListClass *>(elem.m_prev); }
ATTR_HOT static _ListClass *prev(const _ListClass *elem) { return static_cast<_ListClass *>(elem->m_prev); }
ATTR_HOT _ListClass *first() const { return m_head; }
- ATTR_HOT void clear() { m_head = m_tail = NULL; }
- ATTR_HOT bool is_empty() const { return (m_head == NULL); }
+ ATTR_HOT void clear() { m_head = m_tail = nullptr; }
+ ATTR_HOT bool is_empty() const { return (m_head == nullptr); }
private:
_ListClass *m_head;
diff --git a/src/lib/netlist/plib/poptions.h b/src/lib/netlist/plib/poptions.h
index fe46a25f7a9..984db395e2f 100644
--- a/src/lib/netlist/plib/poptions.h
+++ b/src/lib/netlist/plib/poptions.h
@@ -28,7 +28,7 @@ public:
: m_short(""), m_long(""), m_help(""), m_has_argument(false)
{}
- poption(pstring ashort, pstring along, pstring help, bool has_argument, poptions *parent = NULL);
+ poption(pstring ashort, pstring along, pstring help, bool has_argument, poptions *parent = nullptr);
virtual ~poption()
{
@@ -48,7 +48,7 @@ private:
class poption_str : public poption
{
public:
- poption_str(pstring ashort, pstring along, pstring defval, pstring help, poptions *parent = NULL)
+ poption_str(pstring ashort, pstring along, pstring defval, pstring help, poptions *parent = nullptr)
: poption(ashort, along, help, true, parent), m_val(defval)
{}
@@ -62,7 +62,7 @@ private:
class poption_str_limit : public poption
{
public:
- poption_str_limit(pstring ashort, pstring along, pstring defval, pstring limit, pstring help, poptions *parent = NULL)
+ poption_str_limit(pstring ashort, pstring along, pstring defval, pstring limit, pstring help, poptions *parent = nullptr)
: poption(ashort, along, help, true, parent), m_val(defval), m_limit(limit, ":")
{}
@@ -86,7 +86,7 @@ private:
class poption_bool : public poption
{
public:
- poption_bool(pstring ashort, pstring along, pstring help, poptions *parent = NULL)
+ poption_bool(pstring ashort, pstring along, pstring help, poptions *parent = nullptr)
: poption(ashort, along, help, false, parent), m_val(false)
{}
@@ -100,7 +100,7 @@ private:
class poption_double : public poption
{
public:
- poption_double(pstring ashort, pstring along, double defval, pstring help, poptions *parent = NULL)
+ poption_double(pstring ashort, pstring along, double defval, pstring help, poptions *parent = nullptr)
: poption(ashort, along, help, true, parent), m_val(defval)
{}
@@ -125,7 +125,7 @@ public:
poptions(poption *o[])
{
int i=0;
- while (o[i] != NULL)
+ while (o[i] != nullptr)
{
m_opts.push_back(o[i]);
i++;
@@ -149,7 +149,7 @@ public:
for (int i=1; i<argc; )
{
pstring arg(argv[i]);
- poption *opt = NULL;
+ poption *opt = nullptr;
if (arg.startsWith("--"))
{
@@ -161,7 +161,7 @@ public:
}
else
return i;
- if (opt == NULL)
+ if (opt == nullptr)
return i;
if (opt->m_has_argument)
{
@@ -210,7 +210,7 @@ private:
if (m_opts[i]->m_short == arg)
return m_opts[i];
}
- return NULL;
+ return nullptr;
}
poption *getopt_long(pstring arg)
{
@@ -219,7 +219,7 @@ private:
if (m_opts[i]->m_long == arg)
return m_opts[i];
}
- return NULL;
+ return nullptr;
}
pvector_t<poption *> m_opts;
@@ -229,7 +229,7 @@ private:
poption::poption(pstring ashort, pstring along, pstring help, bool has_argument, poptions *parent)
: m_short(ashort), m_long(along), m_help(help), m_has_argument(has_argument)
{
- if (parent != NULL)
+ if (parent != nullptr)
parent->register_option(this);
}
diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp
index 9362ba7de0d..70e48ba5c23 100644
--- a/src/lib/netlist/plib/pparser.cpp
+++ b/src/lib/netlist/plib/pparser.cpp
@@ -352,7 +352,7 @@ ppreprocessor::define_t *ppreprocessor::get_define(const pstring &name)
if (idx >= 0)
return &m_defines.value_at(idx);
else
- return NULL;
+ return nullptr;
}
pstring ppreprocessor::replace_macros(const pstring &line)
@@ -362,7 +362,7 @@ pstring ppreprocessor::replace_macros(const pstring &line)
for (std::size_t i=0; i<elems.size(); i++)
{
define_t *def = get_define(elems[i]);
- if (def != NULL)
+ if (def != nullptr)
ret.cat(def->m_replace);
else
ret.cat(elems[i]);
@@ -403,13 +403,13 @@ pstring ppreprocessor::process_line(const pstring &line)
else if (lti[0].equals("#ifdef"))
{
m_level++;
- if (get_define(lti[1]) == NULL)
+ if (get_define(lti[1]) == nullptr)
m_ifflag |= (1 << m_level);
}
else if (lti[0].equals("#ifndef"))
{
m_level++;
- if (get_define(lti[1]) != NULL)
+ if (get_define(lti[1]) != nullptr)
m_ifflag |= (1 << m_level);
}
else if (lti[0].equals("#else"))
diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h
index 88c0c005927..4c9f34208d1 100644
--- a/src/lib/netlist/plib/pstate.h
+++ b/src/lib/netlist/plib/pstate.h
@@ -87,10 +87,10 @@ struct pstate_entry_t
pstate_entry_t(const pstring &stname, const pstate_data_type_e dt, const void *owner,
const int size, const int count, void *ptr, bool is_ptr)
- : m_name(stname), m_dt(dt), m_owner(owner), m_callback(NULL), m_size(size), m_count(count), m_ptr(ptr), m_is_ptr(is_ptr) { }
+ : m_name(stname), m_dt(dt), m_owner(owner), m_callback(nullptr), m_size(size), m_count(count), m_ptr(ptr), m_is_ptr(is_ptr) { }
pstate_entry_t(const pstring &stname, const void *owner, pstate_callback_t *callback)
- : m_name(stname), m_dt(DT_CUSTOM), m_owner(owner), m_callback(callback), m_size(0), m_count(0), m_ptr(NULL), m_is_ptr(false) { }
+ : m_name(stname), m_dt(DT_CUSTOM), m_owner(owner), m_callback(callback), m_size(0), m_count(0), m_ptr(nullptr), m_is_ptr(false) { }
~pstate_entry_t() { }
diff --git a/src/lib/netlist/plib/pstream.cpp b/src/lib/netlist/plib/pstream.cpp
index 9702ab5dab5..988a403236d 100644
--- a/src/lib/netlist/plib/pstream.cpp
+++ b/src/lib/netlist/plib/pstream.cpp
@@ -70,7 +70,7 @@ pifilestream::pifilestream(void *file, const bool do_close)
void pifilestream::init(void *file)
{
m_file = file;
- if (m_file == NULL)
+ if (m_file == nullptr)
{
set_flag(FLAG_ERROR);
set_flag(FLAG_EOF);
@@ -170,7 +170,7 @@ pofilestream::pofilestream(void *file, const bool do_close)
void pofilestream::init(void *file)
{
m_file = file;
- if (m_file == NULL)
+ if (m_file == nullptr)
{
set_flag(FLAG_ERROR);
set_flag(FLAG_CLOSED);
@@ -322,7 +322,7 @@ void pomemstream::vwrite(const void *buf, const unsigned n)
m_capacity *= 2;
char *o = m_mem;
m_mem = palloc_array(char, m_capacity);
- if (m_mem == NULL)
+ if (m_mem == nullptr)
{
set_flag(FLAG_ERROR);
return;
@@ -346,7 +346,7 @@ void pomemstream::vseek(const pos_type n)
m_capacity *= 2;
char *o = m_mem;
m_mem = palloc_array(char, m_capacity);
- if (m_mem == NULL)
+ if (m_mem == nullptr)
{
set_flag(FLAG_ERROR);
return;
diff --git a/src/lib/netlist/plib/pstring.cpp b/src/lib/netlist/plib/pstring.cpp
index 2acf1d789b1..172d543c06e 100644
--- a/src/lib/netlist/plib/pstring.cpp
+++ b/src/lib/netlist/plib/pstring.cpp
@@ -273,13 +273,13 @@ template<typename F>
double pstring_t<F>::as_double(bool *error) const
{
double ret;
- char *e = NULL;
+ char *e = nullptr;
- if (error != NULL)
+ if (error != nullptr)
*error = false;
ret = strtod(cstr(), &e);
if (*e != 0)
- if (error != NULL)
+ if (error != nullptr)
*error = true;
return ret;
}
@@ -288,16 +288,16 @@ template<typename F>
long pstring_t<F>::as_long(bool *error) const
{
long ret;
- char *e = NULL;
+ char *e = nullptr;
- if (error != NULL)
+ if (error != nullptr)
*error = false;
if (startsWith("0x"))
ret = strtol(substr(2).cstr(), &e, 16);
else
ret = strtol(cstr(), &e, 10);
if (*e != 0)
- if (error != NULL)
+ if (error != nullptr)
*error = true;
return ret;
}
@@ -314,7 +314,7 @@ long pstring_t<F>::as_long(bool *error) const
#if 1
-static std::stack<pstr_t *> *stk = NULL;
+static std::stack<pstr_t *> *stk = nullptr;
static inline unsigned countleadbits(unsigned x)
{
@@ -358,7 +358,7 @@ void pstring_t<F>::sfree(pstr_t *s)
s->m_ref_count--;
if (s->m_ref_count == 0 && s != &m_zero)
{
- if (stk != NULL)
+ if (stk != nullptr)
{
unsigned sn= ((32 - countleadbits(s->len())) + 1) / 2;
stk[sn].push(s);
@@ -372,7 +372,7 @@ void pstring_t<F>::sfree(pstr_t *s)
template<typename F>
pstr_t *pstring_t<F>::salloc(int n)
{
- if (stk == NULL)
+ if (stk == nullptr)
stk = palloc_array(std::stack<pstr_t *>, 17);
pstr_t *p;
unsigned sn= ((32 - countleadbits(n)) + 1) / 2;
@@ -392,7 +392,7 @@ pstr_t *pstring_t<F>::salloc(int n)
template<typename F>
void pstring_t<F>::resetmem()
{
- if (stk != NULL)
+ if (stk != nullptr)
{
for (unsigned i=0; i<=16; i++)
{
@@ -403,7 +403,7 @@ void pstring_t<F>::resetmem()
}
}
pfree_array(stk);
- stk = NULL;
+ stk = nullptr;
}
}
@@ -532,13 +532,13 @@ int pstring_t<F>::pcmp(const mem_t *right) const
pstringbuffer::~pstringbuffer()
{
- if (m_ptr != NULL)
+ if (m_ptr != nullptr)
pfree_array(m_ptr);
}
void pstringbuffer::resize(const std::size_t size)
{
- if (m_ptr == NULL)
+ if (m_ptr == nullptr)
{
m_size = DEFAULT_SIZE;
while (m_size <= size)
diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h
index b101ffc47a5..18cabd6fce5 100644
--- a/src/lib/netlist/plib/pstring.h
+++ b/src/lib/netlist/plib/pstring.h
@@ -58,7 +58,7 @@ public:
~pstring_t();
// construction with copy
- pstring_t(const mem_t *string) {init(); if (string != NULL && *string != 0) pcopy(string); }
+ pstring_t(const mem_t *string) {init(); if (string != nullptr && *string != 0) pcopy(string); }
pstring_t(const pstring_t &string) {init(); pcopy(string); }
// assignment operators
@@ -110,8 +110,8 @@ public:
// conversions
- double as_double(bool *error = NULL) const;
- long as_long(bool *error = NULL) const;
+ double as_double(bool *error = nullptr) const;
+ long as_long(bool *error = nullptr) const;
/*
* everything below MAY not work for utf8.
@@ -331,7 +331,7 @@ public:
~pstringbuffer();
// construction with copy
- pstringbuffer(const char *string) {init(); if (string != NULL) pcopy(string); }
+ pstringbuffer(const char *string) {init(); if (string != nullptr) pcopy(string); }
pstringbuffer(const pstring &string) {init(); pcopy(string); }
// assignment operators
@@ -359,7 +359,7 @@ private:
void init()
{
- m_ptr = NULL;
+ m_ptr = nullptr;
m_size = 0;
m_len = 0;
}
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index fe4cca62572..62a8af91b5a 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -91,13 +91,13 @@ class netlist_tool_t : public netlist::netlist_t
public:
netlist_tool_t(const pstring &aname)
- : netlist::netlist_t(aname), m_opts(NULL), m_setup(NULL)
+ : netlist::netlist_t(aname), m_opts(nullptr), m_setup(nullptr)
{
}
~netlist_tool_t()
{
- if (m_setup != NULL)
+ if (m_setup != nullptr)
pfree(m_setup);
};
@@ -165,7 +165,7 @@ void usage(tool_options_t &opts)
struct input_t
{
input_t()
- : m_param(NULL), m_value(0.0)
+ : m_param(nullptr), m_value(0.0)
{
}
input_t(netlist::netlist_t *netlist, const pstring &line)
diff --git a/src/lib/netlist/solver/nld_ms_direct.h b/src/lib/netlist/solver/nld_ms_direct.h
index 444ddd85176..91cb7c9385f 100644
--- a/src/lib/netlist/solver/nld_ms_direct.h
+++ b/src/lib/netlist/solver/nld_ms_direct.h
@@ -308,10 +308,10 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
x_i[p] = i;
x_start[p] = chunks * p;
x_stop[p] = nl_math::min(chunks*(p+1), eb);
- if (p<num_thr && x_start[p] < x_stop[p]) thr_process(p, this, NULL);
+ if (p<num_thr && x_start[p] < x_stop[p]) thr_process(p, this, nullptr);
}
if (x_start[num_thr] < x_stop[num_thr])
- do_work(num_thr, NULL);
+ do_work(num_thr, nullptr);
thr_wait();
}
else if (eb > 0)
@@ -319,7 +319,7 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
x_i[0] = i;
x_start[0] = 0;
x_stop[0] = eb;
- do_work(0, NULL);
+ do_work(0, nullptr);
}
#else
diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h
index 4dc6ff6015c..7670e036b8e 100644
--- a/src/lib/netlist/solver/nld_ms_gcr.h
+++ b/src/lib/netlist/solver/nld_ms_gcr.h
@@ -169,7 +169,7 @@ void matrix_solver_GCR_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &nets)
{
pstring symname = static_compile_name();
m_proc = this->netlist().lib().template getsym<extsolver>(symname);
- if (m_proc != NULL)
+ if (m_proc != nullptr)
this->log().verbose("External static solver {1} found ...", symname);
else
this->log().verbose("External static solver {1} not found ...", symname);
diff --git a/src/lib/netlist/solver/nld_solver.cpp b/src/lib/netlist/solver/nld_solver.cpp
index f9b64c9a93d..5341d1b70d1 100644
--- a/src/lib/netlist/solver/nld_solver.cpp
+++ b/src/lib/netlist/solver/nld_solver.cpp
@@ -69,7 +69,7 @@ ATTR_COLD void terms_t::add(terminal_t *term, int net_other, bool sorted)
m_gt.insert_at(i, 0.0);
m_go.insert_at(i, 0.0);
m_Idr.insert_at(i, 0.0);
- m_other_curanalog.insert_at(i, NULL);
+ m_other_curanalog.insert_at(i, nullptr);
return;
}
}
@@ -78,7 +78,7 @@ ATTR_COLD void terms_t::add(terminal_t *term, int net_other, bool sorted)
m_gt.push_back(0.0);
m_go.push_back(0.0);
m_Idr.push_back(0.0);
- m_other_curanalog.push_back(NULL);
+ m_other_curanalog.push_back(nullptr);
}
ATTR_COLD void terms_t::set_pointers()
@@ -169,7 +169,7 @@ ATTR_COLD void matrix_solver_t::setup_base(analog_net_t::list_t &nets)
break;
case terminal_t::INPUT:
{
- analog_output_t *net_proxy_output = NULL;
+ analog_output_t *net_proxy_output = nullptr;
for (auto & input : m_inps)
if (input->m_proxied_net == &p->net().as_analog())
{
@@ -177,7 +177,7 @@ ATTR_COLD void matrix_solver_t::setup_base(analog_net_t::list_t &nets)
break;
}
- if (net_proxy_output == NULL)
+ if (net_proxy_output == nullptr)
{
//net_proxy_output = palloc(analog_output_t(*this,
// this->name() + "." + pfmt("m{1}")(m_inps.size())));
@@ -755,7 +755,7 @@ matrix_solver_t * NETLIB_NAME(solver)::create_solver(int size, const bool use_sp
else
{
netlist().log().fatal("Unknown solver type: {1}\n", m_iterative_solver.Value());
- return NULL;
+ return nullptr;
}
}
else
@@ -894,7 +894,7 @@ ATTR_COLD void NETLIB_NAME(solver)::post_start()
else
{
netlist().log().fatal("Encountered netgroup with > 128 nets");
- ms = NULL; /* tease compilers */
+ ms = nullptr; /* tease compilers */
}
break;
diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp
index 099f913b307..a7b5611ea26 100644
--- a/src/lib/netlist/tools/nl_convert.cpp
+++ b/src/lib/netlist/tools/nl_convert.cpp
@@ -72,7 +72,7 @@ void nl_convert_base_t::add_device(const pstring &atype, const pstring &aname)
void nl_convert_base_t::add_term(pstring netname, pstring termname)
{
- net_t * net = NULL;
+ net_t * net = nullptr;
if (m_nets.contains(netname))
net = m_nets[netname];
else
@@ -84,7 +84,7 @@ void nl_convert_base_t::add_term(pstring netname, pstring termname)
/* if there is a pin alias, translate ... */
pin_alias_t *alias = m_pins[termname];
- if (alias != NULL)
+ if (alias != nullptr)
net->terminals().push_back(alias->alias());
else
net->terminals().push_back(termname);
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index 339a4de3231..acd1a83a9b1 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -2161,7 +2161,7 @@ avi_file::error avi_file_impl::get_next_chunk_internal(const avi_chunk *parent,
std::uint8_t buffer[12];
std::uint32_t bytesread;
- /* NULL parent implies the root */
+ /* nullptr parent implies the root */
if (parent == nullptr)
parent = &m_rootchunk;
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp
index 3a97c6ce0fe..ce4396eac29 100644
--- a/src/lib/util/chd.cpp
+++ b/src/lib/util/chd.cpp
@@ -331,7 +331,7 @@ sha1_t chd_file::sha1()
}
catch (chd_error &)
{
- // on failure, return NULL
+ // on failure, return nullptr
return sha1_t::null;
}
}
@@ -364,7 +364,7 @@ sha1_t chd_file::raw_sha1()
}
catch (chd_error &)
{
- // on failure, return NULL
+ // on failure, return nullptr
return sha1_t::null;
}
}
@@ -397,7 +397,7 @@ sha1_t chd_file::parent_sha1()
}
catch (chd_error &)
{
- // on failure, return NULL
+ // on failure, return nullptr
return sha1_t::null;
}
}
diff --git a/src/lib/util/chd.h b/src/lib/util/chd.h
index b178c6083ba..a3b0e0c7304 100644
--- a/src/lib/util/chd.h
+++ b/src/lib/util/chd.h
@@ -416,7 +416,7 @@ private:
UINT32 m_unitbytes; // size of each unit in bytes
UINT64 m_unitcount; // number of units represented
chd_codec_type m_compression[4]; // array of compression types used
- chd_file * m_parent; // pointer to parent file, or NULL if none
+ chd_file * m_parent; // pointer to parent file, or nullptr if none
bool m_parent_missing; // are we missing our parent?
// key offsets within the header
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index ba1840489d6..736fd7fb094 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -632,7 +632,7 @@ chd_compressor_group::chd_compressor_group(chd_file &chd, UINT32 compressor_list
throw CHDERR_UNKNOWN_COMPRESSION;
#if CHDCODEC_VERIFY_COMPRESSION
m_decompressor[codecnum] = chd_codec_list::new_decompressor(compressor_list[codecnum], chd);
- if (m_decompressor[codecnum] == NULL)
+ if (m_decompressor[codecnum] == nullptr)
throw CHDERR_UNKNOWN_COMPRESSION;
#endif
}
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index e3d34ec3738..09d99c2072b 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -541,7 +541,7 @@ char *core_text_file::gets(char *s, int n)
}
}
- // if we put nothing in, return NULL
+ // if we put nothing in, return nullptr
if (cur == s)
return nullptr;
@@ -734,7 +734,7 @@ core_osd_file::~core_osd_file()
{
// close files and free memory
if (m_zdata)
- compress(FCOMPRESS_NONE);
+ core_osd_file::compress(FCOMPRESS_NONE);
}
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 6ec00f63e22..81e9907ae29 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -141,7 +141,7 @@ private:
m_count += count;
}
- // insert the given object after a particular object (NULL means prepend)
+ // insert the given object after a particular object (nullptr means prepend)
_ElementType &insert_after(_ElementType &object, _ElementType *insert_after) noexcept
{
if (insert_after == nullptr)
@@ -154,7 +154,7 @@ private:
return object;
}
- // insert the given object before a particular object (NULL means append)
+ // insert the given object before a particular object (nullptr means append)
_ElementType &insert_before(_ElementType &object, _ElementType *insert_before) noexcept
{
if (insert_before == nullptr)
diff --git a/src/lib/util/cstrpool.cpp b/src/lib/util/cstrpool.cpp
index 242c33380de..5a9e571366b 100644
--- a/src/lib/util/cstrpool.cpp
+++ b/src/lib/util/cstrpool.cpp
@@ -32,7 +32,7 @@ const_string_pool::const_string_pool()
const char *const_string_pool::add(const char *string)
{
- // if NULL or a small number (for some hash strings), just return as-is
+ // if nullptr or a small number (for some hash strings), just return as-is
if (FPTR(string) < 0x100)
return string;
@@ -58,7 +58,7 @@ const char *const_string_pool::add(const char *string)
bool const_string_pool::contains(const char *string)
{
- // if NULL or a small number (for some hash strings), then yes, effectively
+ // if nullptr or a small number (for some hash strings), then yes, effectively
if (FPTR(string) < 0x100)
return true;
@@ -102,7 +102,7 @@ const char *const_string_pool::pool_chunk::add(const char *string)
int bytes = strlen(string) + 1;
assert(bytes < POOL_SIZE);
- // if too big, return NULL
+ // if too big, return nullptr
if (m_used + bytes > POOL_SIZE)
return nullptr;
diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h
index ae469f86ed7..1d849b508f2 100644
--- a/src/lib/util/delegate.h
+++ b/src/lib/util/delegate.h
@@ -276,7 +276,7 @@ private:
raw_mfp_data m_rawdata; // raw buffer to hold the copy of the function pointer
delegate_generic_class * m_realobject; // pointer to the object used for calling
delegate_generic_function m_stubfunction; // pointer to our matching stub function
- static raw_mfp_data s_null_mfp; // NULL mfp
+ static raw_mfp_data s_null_mfp; // nullptr mfp
};
#elif (USE_DELEGATE_TYPE == DELEGATE_TYPE_INTERNAL)
diff --git a/src/lib/util/flac.cpp b/src/lib/util/flac.cpp
index c66cc281931..fedcd6cd73e 100644
--- a/src/lib/util/flac.cpp
+++ b/src/lib/util/flac.cpp
@@ -277,12 +277,18 @@ FLAC__StreamEncoderWriteStatus flac_encoder::write_callback(const FLAC__byte buf
flac_decoder::flac_decoder()
: m_decoder(FLAC__stream_decoder_new()),
- m_file(nullptr),
- m_compressed_offset(0),
- m_compressed_start(nullptr),
- m_compressed_length(0),
- m_compressed2_start(nullptr),
- m_compressed2_length(0)
+ m_file(nullptr),
+ m_sample_rate(0),
+ m_channels(0),
+ m_bits_per_sample(0),
+ m_compressed_offset(0),
+ m_compressed_start(nullptr),
+ m_compressed_length(0),
+ m_compressed2_start(nullptr),
+ m_compressed2_length(0),
+ m_uncompressed_offset(0),
+ m_uncompressed_length(0),
+ m_uncompressed_swap(false)
{
}
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index f8ef33b0d39..cd1ce38fce1 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -290,7 +290,7 @@ void core_options::add_entry(const char *name, const char *description, UINT32 f
void core_options::add_entries(const options_entry *entrylist, bool override_existing)
{
- // loop over entries until we hit a NULL name
+ // loop over entries until we hit a nullptr name
for ( ; entrylist->name != nullptr || (entrylist->flags & OPTION_HEADER) != 0; entrylist++)
add_entry(*entrylist, override_existing);
}
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index ff1cad115de..a0c3817651a 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -169,7 +169,6 @@ public:
bool is_changed(const char *name) const;
// setting
- void set_command(const char *command);
bool set_value(const char *name, const char *value, int priority, std::string &error_string);
bool set_value(const char *name, int value, int priority, std::string &error_string);
bool set_value(const char *name, float value, int priority, std::string &error_string);
diff --git a/src/lib/util/palette.h b/src/lib/util/palette.h
index 2dfbac03a45..f8f932bc072 100644
--- a/src/lib/util/palette.h
+++ b/src/lib/util/palette.h
@@ -35,7 +35,7 @@ class rgb_t
{
public:
// construction/destruction
- rgb_t() { }
+ rgb_t(): m_data(0) { }
rgb_t(UINT32 data) { m_data = data; }
rgb_t(UINT8 r, UINT8 g, UINT8 b) { m_data = (255 << 24) | (r << 16) | (g << 8) | b; }
rgb_t(UINT8 a, UINT8 r, UINT8 g, UINT8 b) { m_data = (a << 24) | (r << 16) | (g << 8) | b; }
@@ -67,8 +67,8 @@ public:
rgb_t &operator-=(const rgb_t &rhs) { m_data = rgb_t(clamplo(a() - rhs.a()), clamplo(r() - rhs.r()), clamplo(g() - rhs.g()), clamplo(b() - rhs.b())); return *this; }
// arithmetic operators
- const rgb_t operator+(const rgb_t &rhs) const { rgb_t result = *this; result += rhs; return result; }
- const rgb_t operator-(const rgb_t &rhs) const { rgb_t result = *this; result -= rhs; return result; }
+ rgb_t operator+(const rgb_t &rhs) const { rgb_t result = *this; result += rhs; return result; }
+ rgb_t operator-(const rgb_t &rhs) const { rgb_t result = *this; result -= rhs; return result; }
// static helpers
static UINT8 clamp(INT32 value) { return (value < 0) ? 0 : (value > 255) ? 255 : value; }
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 8023d350cdc..73c43e9cf90 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -312,7 +312,7 @@ static png_error process_chunk(png_private *png, UINT8 *data, UINT32 type, UINT3
text->next = nullptr;
/* add to the end of the list */
- for (pt = nullptr, ct = png->pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) ;
+ for (pt = nullptr, ct = png->pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) { }
if (pt == nullptr)
png->pnginfo->textlist = text;
else
@@ -726,13 +726,13 @@ png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text)
strcpy(textdata, keyword);
strcpy(textdata + keylen + 1, text);
- /* text follows a trailing NULL */
+ /* text follows a trailing nullptr */
newtext->keyword = textdata;
newtext->text = textdata + keylen + 1;
newtext->next = nullptr;
/* add us to the end of the linked list */
- for (pt = nullptr, ct = pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) ;
+ for (pt = nullptr, ct = pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) { }
if (pt == nullptr)
pnginfo->textlist = newtext;
else
@@ -905,7 +905,7 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
return PNGERR_OUT_OF_MEMORY;
}
- /* copy in the pixels, specifying a NULL filter */
+ /* copy in the pixels, specifying a nullptr filter */
for (y = 0; y < pnginfo->height; y++)
{
UINT16 *src = reinterpret_cast<UINT16 *>(bitmap.raw_pixptr(y));
@@ -944,7 +944,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &
if (pnginfo->image == nullptr)
return PNGERR_OUT_OF_MEMORY;
- /* copy in the pixels, specifying a NULL filter */
+ /* copy in the pixels, specifying a nullptr filter */
for (y = 0; y < pnginfo->height; y++)
{
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);
diff --git a/src/lib/util/pool.cpp b/src/lib/util/pool.cpp
index 9712d8b6e00..f1f42bb58bf 100644
--- a/src/lib/util/pool.cpp
+++ b/src/lib/util/pool.cpp
@@ -269,10 +269,10 @@ void *pool_object_add_file_line(object_pool *pool, object_type _type, void *obje
return object;
}
- /* if we get a NULL object, fail */
+ /* if we get a nullptr object, fail */
if (object == nullptr)
{
- report_failure(pool, "pool_object_add (via %s:%d): Attempted to add a NULL object of size %d", file, line, (int)size);
+ report_failure(pool, "pool_object_add (via %s:%d): Attempted to add a nullptr object of size %d", file, line, (int)size);
return object;
}
diff --git a/src/lib/util/un7z.cpp b/src/lib/util/un7z.cpp
index 95f34179ea0..75377d4093a 100644
--- a/src/lib/util/un7z.cpp
+++ b/src/lib/util/un7z.cpp
@@ -340,7 +340,7 @@ void m7z_file_impl::close(ptr &&archive)
osd_printf_verbose("un7z: closing archive file %s and sending to cache\n", archive->m_filename.c_str());
archive->m_archive_stream.osdfile.reset();
- // find the first NULL entry in the cache
+ // find the first nullptr entry in the cache
std::lock_guard<std::mutex> guard(s_cache_mutex);
std::size_t cachenum;
for (cachenum = 0; cachenum < s_cache.size(); cachenum++)
@@ -504,7 +504,7 @@ void m7z_file_impl::make_utf8_name(int index)
archive_file::error archive_file::open_7z(const std::string &filename, ptr &result)
{
- // ensure we start with a NULL result
+ // ensure we start with a nullptr result
result.reset();
// see if we are in the cache, and reopen if so
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp
index cce6c812a76..021d9602dae 100644
--- a/src/lib/util/unzip.cpp
+++ b/src/lib/util/unzip.cpp
@@ -585,7 +585,7 @@ void zip_file_impl::close(ptr &&zip)
osd_printf_verbose("unzip: closing archive file %s and sending to cache\n", zip->m_filename.c_str());
zip->m_file.reset();
- // find the first NULL entry in the cache
+ // find the first nullptr entry in the cache
std::lock_guard<std::mutex> guard(s_cache_mutex);
std::size_t cachenum;
for (cachenum = 0; cachenum < s_cache.size(); cachenum++)
@@ -1334,7 +1334,7 @@ void m7z_file_cache_clear();
archive_file::error archive_file::open_zip(const std::string &filename, ptr &result)
{
- // ensure we start with a NULL result
+ // ensure we start with a nullptr result
result.reset();
// see if we are in the cache, and reopen if so
diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp
index db288b0a807..b1ed844dc71 100644
--- a/src/lib/util/xmlfile.cpp
+++ b/src/lib/util/xmlfile.cpp
@@ -70,7 +70,7 @@ static const char *copystring(const char *input)
{
char *newstr;
- /* NULL just passes through */
+ /* nullptr just passes through */
if (input == nullptr)
return nullptr;
@@ -94,7 +94,7 @@ static const char *copystring_lower(const char *input)
char *newstr;
int i;
- /* NULL just passes through */
+ /* nullptr just passes through */
if (input == nullptr)
return nullptr;
@@ -300,7 +300,7 @@ xml_data_node *xml_find_matching_sibling(xml_data_node *node, const char *name,
/* loop over siblings and find a matching attribute */
for ( ; node; node = node->next)
{
- /* can pass NULL as a wildcard for the node name */
+ /* can pass nullptr as a wildcard for the node name */
if (name == nullptr || strcmp(name, node->name) == 0)
{
/* find a matching attribute */
@@ -373,7 +373,7 @@ void xml_delete_node(xml_data_node *node)
/*-------------------------------------------------
xml_get_attribute - get the value of the
- specified attribute, or NULL if not found
+ specified attribute, or nullptr if not found
-------------------------------------------------*/
xml_attribute_node *xml_get_attribute(xml_data_node *node, const char *attribute)
@@ -934,7 +934,7 @@ static xml_data_node *add_child(xml_data_node *parent, const char *name, const c
node->attribute = nullptr;
/* add us to the end of the list of siblings */
- for (pnode = &parent->child; *pnode; pnode = &(*pnode)->next) ;
+ for (pnode = &parent->child; *pnode; pnode = &(*pnode)->next) { }
*pnode = node;
return node;
@@ -984,7 +984,7 @@ static xml_attribute_node *add_attribute(xml_data_node *node, const char *name,
}
/* add us to the end of the list of attributes */
- for (panode = &node->attribute; *panode; panode = &(*panode)->next) ;
+ for (panode = &node->attribute; *panode; panode = &(*panode)->next) { }
*panode = anode;
return anode;
diff --git a/src/mame/audio/cclimber.cpp b/src/mame/audio/cclimber.cpp
index 9f6e2e76755..fb9bc5901ab 100644
--- a/src/mame/audio/cclimber.cpp
+++ b/src/mame/audio/cclimber.cpp
@@ -107,7 +107,7 @@ void cclimber_audio_device::play_sample(int start,int freq,int volume)
int len;
int romlen = m_samples_region.bytes();
- if (m_samples_region == NULL)
+ if (m_samples_region == nullptr)
{
return;
}
diff --git a/src/mame/audio/dcs.cpp b/src/mame/audio/dcs.cpp
index eda1167a1e3..8cd81f12f44 100644
--- a/src/mame/audio/dcs.cpp
+++ b/src/mame/audio/dcs.cpp
@@ -610,7 +610,7 @@ void dcs_audio_device::dcs_boot()
{
buffer[i] = base[i];
}
- assert(m_internal_program_ram != NULL);
+ assert(m_internal_program_ram != nullptr);
m_cpu->load_boot_data(buffer, m_internal_program_ram);
break;
}
@@ -637,7 +637,7 @@ void dcs_audio_device::dcs_boot()
{
buffer[i] = base[i];
}
- assert(m_internal_program_ram != NULL);
+ assert(m_internal_program_ram != nullptr);
m_cpu->load_boot_data(buffer, m_internal_program_ram);
break;
}
@@ -814,8 +814,8 @@ dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type ty
m_sounddata_banks(0),
m_sounddata_bank(0),
m_data_bank(*this, "databank"),
- m_rom_page(NULL),
- m_dram_page(NULL),
+ m_rom_page(nullptr),
+ m_dram_page(nullptr),
m_auto_ack(0),
m_latch_control(0),
m_input_data(0),
@@ -855,12 +855,12 @@ void dcs_audio_device::device_start()
m_sram = nullptr;
memory_share *internal_ram = memshare("dcsint");
- if (internal_ram != NULL)
+ if (internal_ram != nullptr)
{
m_internal_program_ram = (UINT32 *)internal_ram->ptr();
}
memory_share *external_ram = memshare("dcsext");
- if (external_ram != NULL)
+ if (external_ram != nullptr)
{
m_external_program_ram = (UINT32 *)external_ram->ptr();
}
@@ -909,12 +909,12 @@ void dcs2_audio_device::device_start()
int soundbank_words;
memory_share *internal_ram = memshare("dcsint");
- if (internal_ram != NULL)
+ if (internal_ram != nullptr)
{
m_internal_program_ram = (UINT32 *)internal_ram->ptr();
}
memory_share *external_ram = memshare("dcsext");
- if (external_ram != NULL)
+ if (external_ram != nullptr)
{
m_external_program_ram = (UINT32 *)external_ram->ptr();
}
@@ -946,7 +946,7 @@ void dcs2_audio_device::device_start()
/* always boot from the base of "dcs" */
memory_region *bootrom_region = machine().root_device().memregion("dcs");
- if (bootrom_region != NULL)
+ if (bootrom_region != nullptr)
{
m_bootrom = (UINT16 *)bootrom_region->base();
m_bootrom_words = bootrom_region->bytes() / 2;
@@ -1013,14 +1013,14 @@ void dcs_audio_device::set_auto_ack(int state)
READ16_MEMBER( dcs_audio_device::dcs_dataram_r )
{
- assert(m_external_program_ram != NULL);
+ assert(m_external_program_ram != nullptr);
return m_external_program_ram[offset] >> 8;
}
WRITE16_MEMBER( dcs_audio_device::dcs_dataram_w )
{
- assert(m_external_program_ram != NULL);
+ assert(m_external_program_ram != nullptr);
UINT16 val = m_external_program_ram[offset] >> 8;
COMBINE_DATA(&val);
m_external_program_ram[offset] = (val << 8) | (m_external_program_ram[offset] & 0x0000ff);
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index 8ba9e2a7a3f..d4f2316344d 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -173,12 +173,12 @@ WRITE8_MEMBER( irem_audio_device::ay8910_45M_portb_w )
{
/* bits 2-4 select MSM5205 clock & 3b/4b playback mode */
m_adpcm1->playmode_w((data >> 2) & 7);
- if (m_adpcm2 != NULL)
+ if (m_adpcm2 != nullptr)
m_adpcm2->playmode_w(((data >> 2) & 4) | 3); /* always in slave mode */
/* bits 0 and 1 reset the two chips */
m_adpcm1->reset_w(data & 1);
- if (m_adpcm2 != NULL)
+ if (m_adpcm2 != nullptr)
m_adpcm2->reset_w(data & 2);
}
@@ -223,7 +223,7 @@ WRITE8_MEMBER( irem_audio_device::m52_adpcm_w )
}
if (offset & 2)
{
- if (m_adpcm2 != NULL)
+ if (m_adpcm2 != nullptr)
m_adpcm2->data_w(data);
}
}
@@ -232,7 +232,7 @@ WRITE8_MEMBER( irem_audio_device::m52_adpcm_w )
WRITE8_MEMBER( irem_audio_device::m62_adpcm_w )
{
msm5205_device *adpcm = (offset & 1) ? m_adpcm2 : m_adpcm1;
- if (adpcm != NULL)
+ if (adpcm != nullptr)
adpcm->data_w(data);
}
@@ -249,7 +249,7 @@ void irem_audio_device::adpcm_int(int st)
subdevice("iremsound")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
/* the first MSM5205 clocks the second */
- if (m_adpcm2 != NULL)
+ if (m_adpcm2 != nullptr)
{
m_adpcm2->vclk_w(1);
m_adpcm2->vclk_w(0);
diff --git a/src/mame/audio/lynx.h b/src/mame/audio/lynx.h
index 8bd8bdd3067..470db9cf8ca 100644
--- a/src/mame/audio/lynx.h
+++ b/src/mame/audio/lynx.h
@@ -84,7 +84,7 @@ extern const device_type LYNX2_SND;
#define MCFG_LYNX_SND_SET_TIMER( _class, _method) \
- lynx_sound_device::set_timer_delegate(*device, lynx_sound_timer_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ lynx_sound_device::set_timer_delegate(*device, lynx_sound_timer_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#endif
diff --git a/src/mame/audio/specimx_snd.cpp b/src/mame/audio/special.cpp
index ec64bc096cc..6b827a2d2c8 100644
--- a/src/mame/audio/specimx_snd.cpp
+++ b/src/mame/audio/special.cpp
@@ -2,14 +2,14 @@
// copyright-holders:Miodrag Milanovic
/***************************************************************************
- audio/special.c
+ audio/special.cpp
Functions to emulate sound hardware of Specialist MX
( based on code of DAI interface )
****************************************************************************/
-#include "specimx_snd.h"
+#include "special.h"
// device type definition
diff --git a/src/mame/audio/specimx_snd.h b/src/mame/audio/special.h
index 0f682a37c0c..6ecc3ee3f3f 100644
--- a/src/mame/audio/specimx_snd.h
+++ b/src/mame/audio/special.h
@@ -2,7 +2,7 @@
// copyright-holders:Miodrag Milanovic
/*****************************************************************************
*
- * specimx_snd.h
+ * audio/specimx.h
*
****************************************************************************/
diff --git a/src/mame/audio/tvc_snd.cpp b/src/mame/audio/tvc.cpp
index 29d61b5dc7c..4e8d71d6de5 100644
--- a/src/mame/audio/tvc_snd.cpp
+++ b/src/mame/audio/tvc.cpp
@@ -7,7 +7,7 @@
***************************************************************************/
#include "emu.h"
-#include "tvc_snd.h"
+#include "tvc.h"
// device type definition
const device_type TVC_SOUND = &device_creator<tvc_sound_device>;
diff --git a/src/mame/audio/tvc_snd.h b/src/mame/audio/tvc.h
index 1103a9c116c..1103a9c116c 100644
--- a/src/mame/audio/tvc_snd.h
+++ b/src/mame/audio/tvc.h
diff --git a/src/mame/audio/vc4000snd.cpp b/src/mame/audio/vc4000.cpp
index 72a8e46b349..cbc09c1a909 100644
--- a/src/mame/audio/vc4000snd.cpp
+++ b/src/mame/audio/vc4000.cpp
@@ -7,7 +7,7 @@
***************************************************************************/
-#include "vc4000snd.h"
+#include "vc4000.h"
const device_type VC4000_SND = &device_creator<vc4000_sound_device>;
diff --git a/src/mame/audio/vc4000snd.h b/src/mame/audio/vc4000.h
index d528fd501bc..67c284f878e 100644
--- a/src/mame/audio/vc4000snd.h
+++ b/src/mame/audio/vc4000.h
@@ -2,7 +2,7 @@
// copyright-holders:Peter Trauner
/*****************************************************************************
*
- * includes/vc4000snd.h
+ * includes/vc4000.h
*
****************************************************************************/
diff --git a/src/mame/audio/wswan_snd.cpp b/src/mame/audio/wswan.cpp
index 42918fb191b..1eb25d0d55d 100644
--- a/src/mame/audio/wswan_snd.cpp
+++ b/src/mame/audio/wswan.cpp
@@ -13,7 +13,7 @@ The noise taps and behavior are the same as the Virtual Boy.
**************************************************************************************/
-#include "wswan_snd.h"
+#include "wswan.h"
// device type definition
diff --git a/src/mame/audio/wswan_snd.h b/src/mame/audio/wswan.h
index 227922e3cf9..90e9c5746f9 100644
--- a/src/mame/audio/wswan_snd.h
+++ b/src/mame/audio/wswan.h
@@ -2,7 +2,7 @@
// copyright-holders:Wilbert Pol
/*****************************************************************************
*
- * includes/wswan_snd.h
+ * includes/wswan.h
*
****************************************************************************/
diff --git a/src/mame/drivers/39in1.cpp b/src/mame/drivers/39in1.cpp
index 0c5bdcafc11..64dd64eb123 100644
--- a/src/mame/drivers/39in1.cpp
+++ b/src/mame/drivers/39in1.cpp
@@ -170,7 +170,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_i2s_w)
{
sprintf(filename, "39in1_%04d.raw", count++);
audio_dump = fopen(filename, "rb");
- }while(audio_dump != NULL);
+ }while(audio_dump != nullptr);
count--;
sprintf(filename, "39in1_%04d.raw", count);
audio_dump = fopen(filename, "wb");
diff --git a/src/mame/drivers/4enlinea.cpp b/src/mame/drivers/4enlinea.cpp
index 86328de8c88..f2ad0702acf 100644
--- a/src/mame/drivers/4enlinea.cpp
+++ b/src/mame/drivers/4enlinea.cpp
@@ -297,7 +297,7 @@ void isa8_cga_4enlinea_device::device_start()
m_vram_size = 0x4000;
m_vram.resize(m_vram_size);
- //m_isa->install_device(0x3bf, 0x3bf, 0, 0, NULL, write8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_mode_control_w), this ) );
+ //m_isa->install_device(0x3bf, 0x3bf, 0, 0, nullptr, write8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_mode_control_w), this ) );
m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) );
m_isa->install_bank(0x8000, 0xbfff, 0, 0, "bank1", &m_vram[0]);
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index b5d7bbe462f..5afad4915b6 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -243,7 +243,7 @@ static INPUT_PORTS_START( sicv )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2")
@@ -258,7 +258,7 @@ static INPUT_PORTS_START( sicv )
PORT_DIPSETTING( 0x00, "1500" )
/* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun.
Be sure these are always ON */
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */
PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -316,7 +316,7 @@ static INPUT_PORTS_START( alieninv )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
@@ -328,7 +328,7 @@ static INPUT_PORTS_START( alieninv )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_DIPLOCATION("SW1:3") /* Pence Coin */
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" ) /* Not bonus */
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL) PORT_DIPLOCATION("SW1:5,6,7")
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr) PORT_DIPLOCATION("SW1:5,6,7")
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, "2C/1C 50p/3C (+ Bonus Life)" )
PORT_DIPSETTING( 0x80, "1C/1C 50p/5C" )
@@ -1576,7 +1576,7 @@ static INPUT_PORTS_START( sflush )
PORT_DIPNAME( 0x40, 0x00, "Coinage Display" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state,sflush_80_r, NULL) // 128V?
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state,sflush_80_r, nullptr) // 128V?
PORT_START("PADDLE")
PORT_BIT( 0xff, 0x6a, IPT_PADDLE ) PORT_MINMAX(0x16,0xbf) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_CENTERDELTA(0)
@@ -2064,7 +2064,7 @@ static INPUT_PORTS_START( yosakdon )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
@@ -2079,7 +2079,7 @@ static INPUT_PORTS_START( yosakdon )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
/* Dummy controls port, P1 */
@@ -2979,8 +2979,8 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( claybust )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_on_r, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(2) PORT_CHANGED_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_trigger, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_on_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(2) PORT_CHANGED_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_trigger, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
@@ -3070,7 +3070,7 @@ static INPUT_PORTS_START( galactic )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2")
@@ -3085,7 +3085,7 @@ static INPUT_PORTS_START( galactic )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "6" )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Dummy controls port, P1 */
@@ -3191,17 +3191,17 @@ static INPUT_PORTS_START( invmulti )
/* same as Midway Space Invaders, except that SW is unused */
PORT_START("IN0")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x00, "SW:8" )
- PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, NULL)
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, nullptr)
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
@@ -3209,7 +3209,7 @@ static INPUT_PORTS_START( invmulti )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x00, "SW:4" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW:2" )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW:1" )
/* fake port for reading the coin input */
diff --git a/src/mame/drivers/alg.cpp b/src/mame/drivers/alg.cpp
index 17ca6b176e0..d580cabd040 100644
--- a/src/mame/drivers/alg.cpp
+++ b/src/mame/drivers/alg.cpp
@@ -228,7 +228,7 @@ static INPUT_PORTS_START( alg )
PORT_BIT( 0xaaff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("HVPOS") /* read by Amiga core */
- PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_pos_r, NULL)
+ PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_pos_r, nullptr)
PORT_START("FIRE")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
@@ -259,13 +259,13 @@ static INPUT_PORTS_START( alg_2p )
PORT_MODIFY("potgo")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_trigger_r, NULL)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_trigger_r, nullptr)
PORT_MODIFY("FIRE")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("p2_joy")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_holster_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_holster_r, nullptr)
PORT_START("GUN2X") /* referenced by lightgun_pos_r */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
diff --git a/src/mame/drivers/alphasma.cpp b/src/mame/drivers/alphasma.cpp
index f7f0d58d3a5..024d103ef96 100644
--- a/src/mame/drivers/alphasma.cpp
+++ b/src/mame/drivers/alphasma.cpp
@@ -232,149 +232,149 @@ ADDRESS_MAP_END
/* Input ports */
static INPUT_PORTS_START( alphasmart )
PORT_START("COL.0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('\"') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('\"') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("COL.4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("COL.5")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.6")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LWIN) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Left Command") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LWIN) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Left Command") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RWIN) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Right Command") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)//
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RWIN) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Right Command") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)//
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear File") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear File") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("COL.7")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F12) PORT_NAME("Send") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F12) PORT_NAME("Send") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.8")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("COL.9")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_NAME("Left Alt/Option") PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_NAME("Left Alt/Option") PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RALT) PORT_NAME("Right Alt/Option") PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RALT) PORT_NAME("Right Alt/Option") PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.10")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.11")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("Pause") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Backspace") PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("ScrLk") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("Pause") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Backspace") PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("ScrLk") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Return") PORT_CHAR(13) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Return") PORT_CHAR(13) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.12")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.13")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.14")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("COL.15")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_MAMEKEY(RSHIFT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, NULL)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_MAMEKEY(RSHIFT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, nullptr)
PORT_START("BATTERY")
PORT_CONFNAME(0x01, 0x01, "Battery status")
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index f89e0536569..dc16f8d536f 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -1830,7 +1830,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( cd32, amiga_base, cd32_state )
MCFG_DEVICE_MODIFY("cia_0")
MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(cd32_state, akiko_cia_0_port_a_write))
- MCFG_MOS6526_SP_CALLBACK(NULL)
+ MCFG_MOS6526_SP_CALLBACK(NOOP)
MCFG_CDROM_ADD("cdrom")
MCFG_CDROM_INTERFACE("cd32_cdrom")
diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp
index 9ed26923a71..91a5cacdb79 100644
--- a/src/mame/drivers/amusco.cpp
+++ b/src/mame/drivers/amusco.cpp
@@ -497,7 +497,7 @@ static MACHINE_CONFIG_START( amusco, amusco_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", amusco_state, amusco_vblank_irq)
MCFG_CPU_PERIODIC_INT_DRIVER(amusco_state, amusco_timer_irq, 60*32)
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/amust.cpp b/src/mame/drivers/amust.cpp
index a827079b408..292f5b03df6 100644
--- a/src/mame/drivers/amust.cpp
+++ b/src/mame/drivers/amust.cpp
@@ -160,7 +160,7 @@ void amust_state::device_timer(emu_timer &timer, device_timer_id id, int param,
//{
// membank("bankr0")->set_entry(BIT(data, 6));
// m_fdc->dden_w(BIT(data, 5));
-// floppy_image_device *floppy = NULL;
+// floppy_image_device *floppy = nullptr;
// if (BIT(data, 0)) floppy = m_floppy0->get_device();
// m_fdc->set_floppy(floppy);
// if (floppy)
diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp
index 12f978f2584..7076123f631 100644
--- a/src/mame/drivers/apc.cpp
+++ b/src/mame/drivers/apc.cpp
@@ -54,7 +54,7 @@
#include "emu.h"
#include "cpu/i86/i86.h"
-#include "audio/upd1771.h"
+#include "sound/upd1771.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "machine/am9517a.h"
@@ -922,7 +922,7 @@ static MACHINE_CONFIG_START( apc, apc_state )
MCFG_PIT8253_CLK2(MAIN_CLOCK) /* RS-232c */
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE("maincpu", 0), VCC, READ8(apc_state,get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NULL ) // TODO: check ir7_w
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NOOP) // TODO: check ir7_w
MCFG_DEVICE_ADD("i8237", AM9517A, MAIN_CLOCK)
MCFG_I8237_OUT_HREQ_CB(WRITELINE(apc_state, apc_dma_hrq_changed))
MCFG_I8237_OUT_EOP_CB(WRITELINE(apc_state, apc_tc_w))
@@ -936,7 +936,7 @@ static MACHINE_CONFIG_START( apc, apc_state )
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(apc_state, apc_dack3_w))
MCFG_NVRAM_ADD_1FILL("cmos")
- MCFG_UPD1990A_ADD("upd1990a", XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD("upd1990a", XTAL_32_768kHz, NOOP, NOOP)
MCFG_UPD765A_ADD("upd765", true, true)
MCFG_UPD765_INTRQ_CALLBACK(DEVWRITELINE("pic8259_slave", pic8259_device, ir4_w))
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index c0f6c610850..7b7762539d1 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -1409,8 +1409,8 @@ static MACHINE_CONFIG_DERIVED( laba2p, apple2p )
MCFG_A2BUS_SLOT_REMOVE("sl3")
MCFG_A2BUS_SLOT_REMOVE("sl6")
-// MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LAB_80COL, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
+// MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LAB_80COL, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NOOP)
MACHINE_CONFIG_END
#endif
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index b2a29d9a46e..d31c411405f 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -3426,7 +3426,7 @@ static MACHINE_CONFIG_DERIVED( apple2c, apple2ee )
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(IIC_ACIA2_TAG, mos6551_device, write_cts))
// TODO: populate the IIc's other virtual slots with ONBOARD_ADD
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_DISKIING, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_DISKIING, NOOP)
MCFG_A2EAUXSLOT_SLOT_REMOVE("aux")
MCFG_DEVICE_REMOVE(A2_AUXSLOT_TAG)
@@ -3462,7 +3462,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( apple2c_iwm, apple2c )
MCFG_A2BUS_SLOT_REMOVE("sl6")
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NOOP)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( apple2c_mem, apple2c )
@@ -3470,7 +3470,7 @@ static MACHINE_CONFIG_DERIVED( apple2c_mem, apple2c )
MCFG_CPU_PROGRAM_MAP(apple2c_memexp_map)
MCFG_A2BUS_SLOT_REMOVE("sl6")
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NOOP)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("128K")
@@ -3503,12 +3503,12 @@ static MACHINE_CONFIG_DERIVED( laser128, apple2c )
MCFG_A2BUS_SLOT_REMOVE("sl6")
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl2", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl4", A2BUS_LASER128, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl2", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl4", A2BUS_LASER128, NOOP)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, nullptr)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_LASER128, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_LASER128, NOOP)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, nullptr)
MCFG_RAM_MODIFY(RAM_TAG)
@@ -3525,13 +3525,13 @@ static MACHINE_CONFIG_DERIVED( laser128ex2, apple2c )
MCFG_A2BUS_SLOT_REMOVE("sl6")
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl2", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl4", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl5", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_LASER128, NULL)
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl7", A2BUS_LASER128, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl2", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl4", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl5", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_LASER128, NOOP)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl7", A2BUS_LASER128, NOOP)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("128K")
diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp
index 8b8fcf021f1..25e373ab4de 100644
--- a/src/mame/drivers/apple2gs.cpp
+++ b/src/mame/drivers/apple2gs.cpp
@@ -373,7 +373,7 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state )
MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(apple2gs_state, a2bus_irq_w))
MCFG_A2BUS_OUT_NMI_CB(WRITELINE(apple2gs_state, a2bus_nmi_w))
MCFG_A2BUS_OUT_INH_CB(WRITELINE(apple2gs_state, a2bus_inh_w))
- MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL)
+ MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NOOP)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, nullptr)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, nullptr)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple2_cards, nullptr)
diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp
index 2f185f1c8ac..946fa1d15fb 100644
--- a/src/mame/drivers/apricot.cpp
+++ b/src/mame/drivers/apricot.cpp
@@ -419,7 +419,7 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
MCFG_I8255_IN_PORTC_CB(READ8(apricot_state, i8255_portc_r))
MCFG_I8255_OUT_PORTC_CB(WRITE8(apricot_state, i8255_portc_w))
- MCFG_PIC8259_ADD("ic31", INPUTLINE("ic91", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("ic31", INPUTLINE("ic91", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ic16", PIT8253, 0)
MCFG_PIT8253_CLK0(XTAL_4MHz / 16)
diff --git a/src/mame/drivers/apricotp.cpp b/src/mame/drivers/apricotp.cpp
index 52107c217fb..06d50995a02 100644
--- a/src/mame/drivers/apricotp.cpp
+++ b/src/mame/drivers/apricotp.cpp
@@ -621,7 +621,7 @@ static MACHINE_CONFIG_START( fp, fp_state )
MCFG_I8237_OUT_EOP_CB(DEVWRITELINE(I8259A_TAG, pic8259_device, ir7_w))
MCFG_I8237_IN_IOR_1_CB(DEVREAD8(WD2797_TAG, wd_fdc_t, data_r))
MCFG_I8237_OUT_IOW_1_CB(DEVWRITE8(WD2797_TAG, wd_fdc_t, data_w))
- MCFG_PIC8259_ADD(I8259A_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(I8253A5_TAG, PIT8253, 0)
MCFG_PIT8253_CLK0(2000000)
diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp
index 7b6d7847477..70d0bf7423f 100644
--- a/src/mame/drivers/arkanoid.cpp
+++ b/src/mame/drivers/arkanoid.cpp
@@ -362,7 +362,7 @@ Stephh's notes (based on the games Z80 code and some tests) :
1a) 'arkmcubl'
- Region = 0x76 (Japan).
- - The bootleg is based on the Japenese version.
+ - The bootleg is based on the Japanese version.
- The MCU is dumped, but the game doesn't run with it.
However, there is no problem if I use the one from the World early version.
Until I know what to do with it, I use the MCU from the World early version
@@ -385,7 +385,7 @@ Stephh's notes (based on the games Z80 code and some tests) :
and a fix (no dips selection) 1 ball x game and NO starting level selection".
However, there is still code in the game which tests the Dip Switches !
- Region = 0x76 (Japan).
- - The bootleg is based on a Japenese early version we don't have.
+ - The bootleg is based on a Japanese early version we don't have.
In fact, it is completely based on 'arkmcubl' :
Z:\MAME\roms>romcmp ark1ball.zip arkmcubl.zip -d
@@ -599,7 +599,7 @@ Stephh's notes (based on the games Z80 code and some tests) :
3) "Tayto" bootlegs and assimilated ones.
- Region = 0x76 (Japan).
- - All bootlegs are based on a Japenese early version we don't have.
+ - All bootlegs are based on a Japanese early version we don't have.
- Start of levels table at 0xbd75 (32 * 2 bytes - LSB first)
3a) 'arkatayt'
@@ -956,7 +956,7 @@ static INPUT_PORTS_START( arkanoid )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state,arkanoid_68705_input_r, NULL) /* Inputs from the 68705 */
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state,arkanoid_68705_input_r, nullptr) /* Inputs from the 68705 */
PORT_START("BUTTONS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
@@ -1440,7 +1440,7 @@ MACHINE_CONFIG_END
A75 03 = GFX 1/3
A75 04 = GFX 2/3
A75 05 = GFX 3/3
- A75 06 = MC68705P5 MCU code, v1.x Japan and v1.x USA/Romstar (verified to have crc&sha1 of 0be83647 and 625fd1e6061123df612f115ef14a06cd6009f5d1; the rom with crc&sha1 of 4e44b50a and c61e7d158dc8e2b003c8158053ec139b904599af is also probably legit as well, only differing due to a different fill in an unused area from the verified one )
+ A75 06 = MC68705P5 MCU code, v1.x Japan and v1.x USA/Romstar (DUMPED, verified to have crc&sha1 of 0be83647 and 625fd1e6061123df612f115ef14a06cd6009f5d1; the rom with crc&sha1 of 4e44b50a and c61e7d158dc8e2b003c8158053ec139b904599af is also probably legit as well, only differing due to a different fill in an unused area from the verified one )
A75 07 = PROM red
A75 08 = PROM green
A75 09 = PROM blue
@@ -1449,19 +1449,19 @@ MACHINE_CONFIG_END
(A75 12 through 17 are unknown, could be another two sets of z80 code plus mc68705p5)
A75 18 = Z80 code v2.0 2/2 USA/Romstar
A75 19 = Z80 code v2.0 1/2 USA/Romstar
- A75 20 = MC68705P5 MCU code, v2.0 USA/Romstar
+ A75 20 = MC68705P5 MCU code, v2.0 USA/Romstar (NOT DUMPED, PLACEHOLDER HACKED FROM BOOTLEG MCU)
A75 21 = Z80 code v2.0 1/2 Japan w/level select
A75 22 = Z80 code v2.0 2/2 Japan w/level select
- A75 23 = MC68705P5 MCU code, v2.0 Japan w/level select
+ A75 23 = MC68705P5 MCU code, v2.0 Japan w/level select (NOT DUMPED, PLACEHOLDER HACKED FROM BOOTLEG MCU)
A75 24 = Z80 code v2.1 1/2 Japan
A75 25 = Z80 code v2.1 2/2 Japan
- A75 26 = MC68705P5 MCU code, v2.1 Japan
+ A75 26 = MC68705P5 MCU code, v2.1 Japan (NOT DUMPED, PLACEHOLDER HACKED FROM BOOTLEG MCU)
A75 27 = Z80 code 1/2 Tournament
A75 28 = Z80 code 2/2 Tournament
A75 29 = GFX 1/3 Tournament
A75 30 = GFX 2/3 Tournament
A75 31 = GFX 3/3 Tournament
- A75 32 = MC68705P5 MCU code, Tournament
+ A75 32 = MC68705P5 MCU code, Tournament (NOT DUMPED, PLACEHOLDER HACKED FROM BOOTLEG MCU)
A75 33 = PROM red Tournament
A75 34 = PROM green Tournament
A75 35 = PROM blue Tournament
diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp
index 2ff02959a48..5195cc5d8ab 100644
--- a/src/mame/drivers/arsystems.cpp
+++ b/src/mame/drivers/arsystems.cpp
@@ -927,7 +927,7 @@ DRIVER_INIT_MEMBER( arcadia_amiga_state, arcadia )
m_agnus_id = AGNUS_HR_NTSC;
m_denise_id = DENISE;
- if (m_bios_region != NULL)
+ if (m_bios_region != nullptr)
{
/* OnePlay bios is encrypted, TenPlay is not */
UINT16 *rom = (UINT16 *)m_bios_region->base();
diff --git a/src/mame/drivers/artmagic.cpp b/src/mame/drivers/artmagic.cpp
index 3c23a78051d..ad8ceee4928 100644
--- a/src/mame/drivers/artmagic.cpp
+++ b/src/mame/drivers/artmagic.cpp
@@ -596,7 +596,7 @@ static INPUT_PORTS_START( cheesech )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("30000a")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, NULL) /* protection data */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, nullptr) /* protection data */
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* protection ready */
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -788,7 +788,7 @@ static INPUT_PORTS_START( shtstar )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("3c000a")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, NULL) /* protection data */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, nullptr) /* protection data */
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* protection ready */
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index b9ab4d1a6e1..3eda0a2d827 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -317,8 +317,8 @@ static INPUT_PORTS_START( asteroid )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
@@ -372,7 +372,7 @@ static INPUT_PORTS_START( asteroidb )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Bit 7 is VG_HALT */
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@@ -409,9 +409,9 @@ static INPUT_PORTS_START( asterock )
PORT_MODIFY("IN0")
/* Bit 0 is VG_HALT and Bit 2 is the 3 KHz source */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
@@ -451,8 +451,8 @@ static INPUT_PORTS_START( astdelux )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* According to schematics */
/* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
@@ -534,12 +534,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( llander )
PORT_START("IN0")
/* Bit 0 is VG_HALT */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
/* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */
PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
PORT_START("IN1")
diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp
index 5883edcdaa1..0413241da17 100644
--- a/src/mame/drivers/astrocde.cpp
+++ b/src/mame/drivers/astrocde.cpp
@@ -765,7 +765,7 @@ static INPUT_PORTS_START( ebases )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "S1:8" )
PORT_START("P4HANDLE")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, ebases_trackball_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, ebases_trackball_r, nullptr)
PORT_START("TRACKX1")
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_RESET
@@ -880,7 +880,7 @@ static INPUT_PORTS_START( wow )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, wow_speech_status_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, wow_speech_status_r, nullptr)
PORT_START("P4HANDLE")
/* "If S1:1,2,3 are all ON or all OFF, only coin meter number 1 will count." */
@@ -950,7 +950,7 @@ static INPUT_PORTS_START( gorf )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, gorf_speech_status_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, gorf_speech_status_r, nullptr)
PORT_START("P4HANDLE")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("S1:1")
@@ -1097,7 +1097,7 @@ static INPUT_PORTS_START( demndrgn )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("P2HANDLE")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state,demndragn_joystick_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state,demndragn_joystick_r, nullptr)
PORT_START("P3HANDLE")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/astrof.cpp b/src/mame/drivers/astrof.cpp
index 66d4584066f..e25b9b82e3f 100644
--- a/src/mame/drivers/astrof.cpp
+++ b/src/mame/drivers/astrof.cpp
@@ -621,8 +621,8 @@ static INPUT_PORTS_START( astrof )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -676,8 +676,8 @@ static INPUT_PORTS_START( abattle )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -731,8 +731,8 @@ static INPUT_PORTS_START( spfghmk2 )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -782,8 +782,8 @@ static INPUT_PORTS_START( spfghmk22 )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -836,7 +836,7 @@ static INPUT_PORTS_START( tomahawk )
PORT_INCLUDE( astrof_common )
PORT_START("IN")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,tomahawk_controls_r, NULL)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,tomahawk_controls_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/atari400.cpp b/src/mame/drivers/atari400.cpp
index 17573b3bac9..68df140f85c 100644
--- a/src/mame/drivers/atari400.cpp
+++ b/src/mame/drivers/atari400.cpp
@@ -46,7 +46,7 @@
#include "machine/ram.h"
#include "sound/dac.h"
#include "sound/pokey.h"
-#include "includes/atari.h"
+#include "includes/atari400.h"
#include "machine/atarifdc.h"
#include "bus/a800/a800_slot.h"
#include "bus/a800/a800_carts.h"
@@ -2314,8 +2314,8 @@ static MACHINE_CONFIG_DERIVED( a5200, atari_common_nodac )
// FIXME: should there be anything connected where other system have the fdc?
MCFG_SOUND_MODIFY("pokey")
- MCFG_POKEY_SERIN_R_CB(NULL)
- MCFG_POKEY_SEROUT_W_CB(NULL)
+ MCFG_POKEY_SERIN_R_CB(NOOP)
+ MCFG_POKEY_SEROUT_W_CB(NOOP)
MCFG_POKEY_KEYBOARD_CB(atari_common_state, a5200_keypads)
MCFG_POKEY_INTERRUPT_CB(atari_common_state, interrupt_cb)
@@ -2327,9 +2327,9 @@ static MACHINE_CONFIG_DERIVED( a5200, atari_common_nodac )
MCFG_ANTIC_GTIA("gtia")
MCFG_DEVICE_MODIFY("pia")
- MCFG_PIA_READPA_HANDLER(NULL) // FIXME: is there anything connected here
- MCFG_PIA_READPB_HANDLER(NULL) // FIXME: is there anything connected here
- MCFG_PIA_CB2_HANDLER(NULL) // FIXME: is there anything connected here
+ MCFG_PIA_READPA_HANDLER(NOOP) // FIXME: is there anything connected here
+ MCFG_PIA_READPB_HANDLER(NOOP) // FIXME: is there anything connected here
+ MCFG_PIA_CB2_HANDLER(NOOP) // FIXME: is there anything connected here
MCFG_MACHINE_START_OVERRIDE( a400_state, a5200 )
diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp
index 9a3fc88c5d3..42040df8a30 100644
--- a/src/mame/drivers/atarist.cpp
+++ b/src/mame/drivers/atarist.cpp
@@ -2413,7 +2413,7 @@ static MACHINE_CONFIG_START( stbook, stbook_state )
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
diff --git a/src/mame/drivers/atvtrack.cpp b/src/mame/drivers/atvtrack.cpp
index 698afe889cb..fbc6b31012d 100644
--- a/src/mame/drivers/atvtrack.cpp
+++ b/src/mame/drivers/atvtrack.cpp
@@ -167,7 +167,7 @@ inline UINT32 atvtrack_state::decode64_32(offs_t offset64, UINT64 data, UINT64 m
return (UINT32)(data >> 32);
}
logerror("Wrong word size in external access\n");
- //debugger_break(NULL);
+ //debugger_break(nullptr);
return 0;
}
diff --git a/src/mame/drivers/avigo.cpp b/src/mame/drivers/avigo.cpp
index e7b301eea5c..30cc63a4c32 100644
--- a/src/mame/drivers/avigo.cpp
+++ b/src/mame/drivers/avigo.cpp
@@ -555,32 +555,32 @@ INPUT_CHANGED_MEMBER( avigo_state::power_down_irq )
static INPUT_PORTS_START(avigo)
PORT_START("LINE0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PAGE UP") PORT_CODE(KEYCODE_PGUP) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PAGE DOWN") PORT_CODE(KEYCODE_PGDN) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LIGHT") PORT_CODE(KEYCODE_L) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PAGE UP") PORT_CODE(KEYCODE_PGUP) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PAGE DOWN") PORT_CODE(KEYCODE_PGDN) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LIGHT") PORT_CODE(KEYCODE_L) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("LINE1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("TO DO") PORT_CODE(KEYCODE_T) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ADDRESS") PORT_CODE(KEYCODE_A) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("SCHEDULE") PORT_CODE(KEYCODE_S) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("TO DO") PORT_CODE(KEYCODE_T) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ADDRESS") PORT_CODE(KEYCODE_A) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("SCHEDULE") PORT_CODE(KEYCODE_S) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("LINE2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEMO") PORT_CODE(KEYCODE_M) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEMO") PORT_CODE(KEYCODE_M) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, kb_irq, nullptr )
PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("LINE3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pen/Stylus pressed") PORT_CODE(KEYCODE_ENTER) PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, pen_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pen/Stylus pressed") PORT_CODE(KEYCODE_ENTER) PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, pen_irq, nullptr )
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("?? Causes a NMI") PORT_CODE(KEYCODE_W) PORT_CODE(JOYCODE_BUTTON2)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Power Down") PORT_CODE(KEYCODE_Q) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, power_down_irq, NULL )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Power Down") PORT_CODE(KEYCODE_Q) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, power_down_irq, nullptr )
/* these two ports are used to emulate the position of the pen/stylus on the screen */
PORT_START("POSX") /* Mouse - X AXIS */
- PORT_BIT(0x3ff, 0x060, IPT_LIGHTGUN_X) PORT_SENSITIVITY(100) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x060, 0x3a0) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, pen_move_irq, NULL )
+ PORT_BIT(0x3ff, 0x060, IPT_LIGHTGUN_X) PORT_SENSITIVITY(100) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x060, 0x3a0) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, pen_move_irq, nullptr )
PORT_START("POSY") /* Mouse - Y AXIS */
- PORT_BIT(0x3ff, 0x044, IPT_LIGHTGUN_Y) PORT_SENSITIVITY(100) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x044, 0x3a6) PORT_INVERT PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, pen_move_irq, NULL )
+ PORT_BIT(0x3ff, 0x044, IPT_LIGHTGUN_Y) PORT_SENSITIVITY(100) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x044, 0x3a6) PORT_INVERT PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CHANGED_MEMBER( DEVICE_SELF, avigo_state, pen_move_irq, nullptr )
INPUT_PORTS_END
/* F4 Character Displayer */
diff --git a/src/mame/drivers/b2m.cpp b/src/mame/drivers/b2m.cpp
index b60a4f3b556..36fe7c2bd44 100644
--- a/src/mame/drivers/b2m.cpp
+++ b/src/mame/drivers/b2m.cpp
@@ -225,7 +225,7 @@ static MACHINE_CONFIG_START( b2m, b2m_state )
MCFG_I8255_OUT_PORTB_CB(WRITE8(b2m_state, b2m_romdisk_portb_w))
MCFG_I8255_OUT_PORTC_CB(WRITE8(b2m_state, b2m_romdisk_portc_w))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
/* sound */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/balsente.cpp b/src/mame/drivers/balsente.cpp
index b5229303faa..fec4db10d33 100644
--- a/src/mame/drivers/balsente.cpp
+++ b/src/mame/drivers/balsente.cpp
@@ -526,7 +526,6 @@ static INPUT_PORTS_START( hattrick )
UNUSED_ANALOG
INPUT_PORTS_END
-#if 0
static INPUT_PORTS_START( teamht )
PORT_INCLUDE( sentetst )
@@ -617,7 +616,7 @@ static INPUT_PORTS_START( teamht )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
INPUT_PORTS_END
-#endif
+
static INPUT_PORTS_START( otwalls )
PORT_INCLUDE( sentetst )
@@ -971,7 +970,7 @@ static INPUT_PORTS_START( nstocker )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "G1:7" )
PORT_MODIFY("IN0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, balsente_state,nstocker_bits_r, NULL)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, balsente_state,nstocker_bits_r, nullptr)
/* cheese alert -- we have to map this to player 2 so that it doesn't interfere with
the crosshair controls */
@@ -1452,7 +1451,6 @@ ROM_START( hattrick )
ROM_END
-#if 0
ROM_START( teamht )
ROM_REGION( 0x40000, "maincpu", 0 ) /* 64k for code for the first CPU, plus 128k of banked ROMs */
ROM_LOAD( "HATTRK.U8A", 0x10000, 0x4000, CRC(cb746de8) SHA1(b0e5003370b65f2aed4dc9ccb2a2d3eb29050245) )
@@ -1466,7 +1464,7 @@ ROM_START( teamht )
MOTHERBOARD_PALS
ROM_END
-#endif
+
ROM_START( otwalls )
ROM_REGION( 0x40000, "maincpu", 0 ) /* 64k for code for the first CPU, plus 128k of banked ROMs */
@@ -2403,6 +2401,5 @@ GAME( 1987, rescraid, 0, balsente, rescraid, balsente_state, rescraid, RO
GAME( 1986, shrike, 0, shrike, shrike, balsente_state, shrike, ROT0, "Bally/Sente", "Shrike Avenger (prototype)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, rescraida,rescraid, balsente, rescraid, balsente_state, rescraid, ROT0, "Bally Midway", "Rescue Raider (stand-alone)", MACHINE_SUPPORTS_SAVE )
GAME( 198?, grudge, 0, balsente, grudge, balsente_state, grudge, ROT0, "Bally Midway", "Grudge Match (prototype)", MACHINE_SUPPORTS_SAVE )
-#if 0
-GAME( 1985, teamht, hattrick, balsente, teamht, balsente_state, teamht, ROT0, "Bally/Sente", "Team Hat Trick", MACHINE_SUPPORTS_SAVE )
-#endif
+GAME( 1985, teamht, 0, balsente, teamht, balsente_state, teamht, ROT0, "Bally/Sente", "Team Hat Trick", MACHINE_SUPPORTS_SAVE )
+
diff --git a/src/mame/drivers/bartop52.cpp b/src/mame/drivers/bartop52.cpp
index af9142250a5..390f24dcb16 100644
--- a/src/mame/drivers/bartop52.cpp
+++ b/src/mame/drivers/bartop52.cpp
@@ -19,7 +19,7 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
-#include "includes/atari.h"
+#include "includes/atari400.h"
#include "sound/speaker.h"
#include "sound/pokey.h"
#include "video/gtia.h"
diff --git a/src/mame/drivers/battlex.cpp b/src/mame/drivers/battlex.cpp
index 49a7d78c2c5..44d56ef56a1 100644
--- a/src/mame/drivers/battlex.cpp
+++ b/src/mame/drivers/battlex.cpp
@@ -119,7 +119,7 @@ static INPUT_PORTS_START( battlex )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, battlex_state,battlex_in0_b4_r, NULL)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, battlex_state,battlex_in0_b4_r, nullptr)
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x20, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
diff --git a/src/mame/drivers/bbc.cpp b/src/mame/drivers/bbc.cpp
index 1450a44a654..c510fb29b54 100644
--- a/src/mame/drivers/bbc.cpp
+++ b/src/mame/drivers/bbc.cpp
@@ -937,7 +937,7 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca )
MCFG_ECONET_ADD()
MCFG_ECONET_CLK_CALLBACK(WRITELINE(bbc_state, econet_clk_w))
MCFG_ECONET_DATA_CALLBACK(DEVWRITELINE("mc6854", mc6854_device, set_rx))
- MCFG_ECONET_SLOT_ADD("econet254", 254, econet_devices, NULL)
+ MCFG_ECONET_SLOT_ADD("econet254", 254, econet_devices, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cass_ls_b", "bbcb_cass")
diff --git a/src/mame/drivers/bebox.cpp b/src/mame/drivers/bebox.cpp
index 33fafdee7f2..b83e1fbe152 100644
--- a/src/mame/drivers/bebox.cpp
+++ b/src/mame/drivers/bebox.cpp
@@ -173,7 +173,7 @@ static MACHINE_CONFIG_START( bebox, bebox_state )
MCFG_PIC8259_ADD( "pic8259_1", WRITELINE(bebox_state,bebox_pic8259_master_set_int_line), VCC, READ8(bebox_state,get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_2", WRITELINE(bebox_state,bebox_pic8259_slave_set_int_line), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259_2", WRITELINE(bebox_state,bebox_pic8259_slave_set_int_line), GND, NOOP)
MCFG_DEVICE_ADD( "ns16550_0", NS16550, 0 ) /* TODO: Verify model */
MCFG_DEVICE_ADD( "ns16550_1", NS16550, 0 ) /* TODO: Verify model */
@@ -210,7 +210,7 @@ static MACHINE_CONFIG_START( bebox, bebox_state )
MCFG_PCI_BUS_DEVICE("pcibus:1", pci_devices, "cirrus", true)
- /*MCFG_PCI_BUS_DEVICE(12, NULL, scsi53c810_pci_read, scsi53c810_pci_write)*/
+ /*MCFG_PCI_BUS_DEVICE(12, nullptr, scsi53c810_pci_read, scsi53c810_pci_write)*/
MCFG_SMC37C78_ADD("smc37c78")
MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(bebox_state, fdc_interrupt))
diff --git a/src/mame/drivers/bmcpokr.cpp b/src/mame/drivers/bmcpokr.cpp
index 6bd9d2c6ce8..b2c70ace0fa 100644
--- a/src/mame/drivers/bmcpokr.cpp
+++ b/src/mame/drivers/bmcpokr.cpp
@@ -501,7 +501,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // n.a. [START, ESC in service mode]
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // SCORE
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // BET [BET, credit -1]
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, NULL) // HP [HOPPER, credit -100]
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HP [HOPPER, credit -100]
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // ACCOUNT [SERVICE MODE]
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // KEY-OUT [KEY-OUT, no hopper]
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // DOUBLE-UP
@@ -519,7 +519,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // n.a. [START, ESC in service mode]
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // <Left>2 (3rd)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // <Down>1 (2nd) [BET, credit -1]
-// PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, NULL) // HP [HOPPER, credit -100]
+// PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HP [HOPPER, credit -100]
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // A2 [SERVICE MODE]
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // C2 [KEY-OUT, no hopper]
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // S1 [START, ESC in service mode]
@@ -621,7 +621,7 @@ static INPUT_PORTS_START( mjmaglmp )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) // NOTE
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // KEY DOWN
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // PAY
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, NULL) // HOPPER
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HOPPER
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) // ACCOUNT
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset") // RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // (unused)
diff --git a/src/mame/drivers/bml3.cpp b/src/mame/drivers/bml3.cpp
index a2e405950c6..9b93e8f734c 100644
--- a/src/mame/drivers/bml3.cpp
+++ b/src/mame/drivers/bml3.cpp
@@ -945,10 +945,10 @@ static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
- DEVCB_NULL, // read A
- DEVCB_NULL, // read B
- DEVCB_NULL, // write A
- DEVCB_NULL // write B
+ DEVCB_NOOP, // read A
+ DEVCB_NOOP, // read B
+ DEVCB_NOOP, // write A
+ DEVCB_NOOP // write B
};
#endif
diff --git a/src/mame/drivers/btoads.cpp b/src/mame/drivers/btoads.cpp
index 880cd3ba532..ade3af540fa 100644
--- a/src/mame/drivers/btoads.cpp
+++ b/src/mame/drivers/btoads.cpp
@@ -260,9 +260,9 @@ static INPUT_PORTS_START( btoads )
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SPECIAL")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, sound_to_main_r, NULL)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, sound_to_main_r, nullptr)
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, main_to_sound_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, main_to_sound_r, nullptr)
PORT_BIT( 0xff7c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SW1")
diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp
index ad21a0444be..a899bd8bd9a 100644
--- a/src/mame/drivers/bwidow.cpp
+++ b/src/mame/drivers/bwidow.cpp
@@ -449,9 +449,9 @@ static INPUT_PORTS_START( bwidow )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_START("DSW0")
PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("D4:!7,!8")
@@ -527,9 +527,9 @@ static INPUT_PORTS_START( gravitar )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_START("DSW0")
PORT_DIPUNUSED_DIPLOC( 0x03, IP_ACTIVE_HIGH, "D4:!7,!8" )
@@ -601,9 +601,9 @@ static INPUT_PORTS_START( lunarbat )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_START("DSW0") /* DSW0 - Not read */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -635,9 +635,9 @@ static INPUT_PORTS_START( spacduel )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_START("DSW0")
PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("D4:!7,!8")
diff --git a/src/mame/drivers/by17.cpp b/src/mame/drivers/by17.cpp
index 690409b5c13..a16b56fe1e7 100644
--- a/src/mame/drivers/by17.cpp
+++ b/src/mame/drivers/by17.cpp
@@ -121,8 +121,8 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( by17 )
PORT_START("TEST")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, self_test, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, activity_button, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, self_test, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, activity_button, nullptr)
PORT_START("DSW0")
PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03
diff --git a/src/mame/drivers/bzone.cpp b/src/mame/drivers/bzone.cpp
index e3b43d4d4cf..787b8914163 100644
--- a/src/mame/drivers/bzone.cpp
+++ b/src/mame/drivers/bzone.cpp
@@ -357,9 +357,9 @@ ADDRESS_MAP_END
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)\
/* bit 6 is the VG HALT bit. We set it to "low" */\
/* per default (busy vector processor). */\
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_bzone_device, done_r, NULL)\
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_bzone_device, done_r, nullptr)\
/* bit 7 is tied to a 3kHz clock */\
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bzone_state,clock_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bzone_state,clock_r, nullptr)
#define BZONEDSW0\
diff --git a/src/mame/drivers/calomega.cpp b/src/mame/drivers/calomega.cpp
index 4143ff318d1..9226a748b92 100644
--- a/src/mame/drivers/calomega.cpp
+++ b/src/mame/drivers/calomega.cpp
@@ -2622,7 +2622,7 @@ static MACHINE_CONFIG_DERIVED( s903mod, sys903 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay8912")
- MCFG_AY8910_PORT_A_READ_CB(NULL)
+ MCFG_AY8910_PORT_A_READ_CB(NOOP)
MCFG_DEVICE_REMOVE("acia6850_0")
@@ -2646,7 +2646,7 @@ static MACHINE_CONFIG_DERIVED( sys905, sys903 )
/* sound hardware */
MCFG_SOUND_MODIFY("ay8912")
- MCFG_AY8910_PORT_A_READ_CB(NULL)
+ MCFG_AY8910_PORT_A_READ_CB(NOOP)
MCFG_DEVICE_REMOVE("acia6850_0")
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index 0a4b3447626..aedaac4dd3c 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -1572,7 +1572,7 @@ static INPUT_PORTS_START( korokoro )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // service medal out?
PORT_SERVICE( 0x2000, IP_ACTIVE_LOW )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service coin
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,korokoro_hopper_r, NULL) // motor / hopper status ???
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,korokoro_hopper_r, nullptr) // motor / hopper status ???
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1603,7 +1603,7 @@ static INPUT_PORTS_START( tjumpman )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE(KEYCODE_Y) // suru ("do")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "1 Bet" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1628,7 +1628,7 @@ static INPUT_PORTS_START( pacslot )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Pac-Man" ) PORT_CODE(KEYCODE_Y)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index df8460f71d3..f3552ae69d7 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -2299,7 +2299,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state )
MCFG_DS75161A_OUT_SRQ_CB(DEVWRITELINE(IEEE488_TAG, ieee488_device, srq_w))
MCFG_CBM_IEEE488_ADD("c8050")
MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i1_w))
- MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, nullptr,DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
+ MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, nullptr, DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, nullptr)
MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_18MHz/9, cbm2_expansion_cards, nullptr)
@@ -2412,7 +2412,7 @@ static MACHINE_CONFIG_DERIVED( bx256hp, b256hp )
MCFG_CPU_IO_MAP(ext_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(EXT_I8259A_TAG, pic8259_device, inta_cb)
- MCFG_PIC8259_ADD(EXT_I8259A_TAG, INPUTLINE(EXT_I8088_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(EXT_I8259A_TAG, INPUTLINE(EXT_I8088_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(EXT_MOS6525_TAG, TPI6525, 0)
MCFG_TPI6525_IN_PA_CB(DEVREAD8(EXT_MOS6526_TAG, mos6526_device, pa_r))
MCFG_TPI6525_IN_PB_CB(READ8(cbm2_state, ext_tpi_pb_r))
@@ -2475,7 +2475,7 @@ static MACHINE_CONFIG_DERIVED( cbm730, cbm720 )
MCFG_CPU_IO_MAP(ext_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(EXT_I8259A_TAG, pic8259_device, inta_cb)
- MCFG_PIC8259_ADD(EXT_I8259A_TAG, INPUTLINE(EXT_I8088_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(EXT_I8259A_TAG, INPUTLINE(EXT_I8088_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(EXT_MOS6525_TAG, TPI6525, 0)
MCFG_TPI6525_IN_PA_CB(DEVREAD8(EXT_MOS6526_TAG, mos6526_device, pa_r))
MCFG_TPI6525_IN_PB_CB(READ8(cbm2_state, ext_tpi_pb_r))
diff --git a/src/mame/drivers/ccastles.cpp b/src/mame/drivers/ccastles.cpp
index 42bac5ccc00..4d5ae422e6c 100644
--- a/src/mame/drivers/ccastles.cpp
+++ b/src/mame/drivers/ccastles.cpp
@@ -359,7 +359,7 @@ static INPUT_PORTS_START( ccastles )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ccastles_state,get_vblank, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ccastles_state,get_vblank, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* 1p Jump, non-cocktail start1 */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* 2p Jump, non-cocktail start2 */
diff --git a/src/mame/drivers/ccs2810.cpp b/src/mame/drivers/ccs2810.cpp
index ab38592295a..fe6f2f09974 100644
--- a/src/mame/drivers/ccs2810.cpp
+++ b/src/mame/drivers/ccs2810.cpp
@@ -175,12 +175,12 @@ WRITE8_MEMBER( ccs_state::kbd_put )
#if 0
static const ins8250_interface com_intf =
{
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP
};
#endif
diff --git a/src/mame/drivers/cgenie.cpp b/src/mame/drivers/cgenie.cpp
index a306f55c440..940d9c93809 100644
--- a/src/mame/drivers/cgenie.cpp
+++ b/src/mame/drivers/cgenie.cpp
@@ -209,7 +209,7 @@ static INPUT_PORTS_START( cgenie )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("L.P.") // marked as "L.P." in the manual, lightpen?
PORT_START("RST")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F5) PORT_NAME("Rst") PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHANGED_MEMBER(DEVICE_SELF, cgenie_state, rst_callback, NULL)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F5) PORT_NAME("Rst") PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHANGED_MEMBER(DEVICE_SELF, cgenie_state, rst_callback, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 9ae87f0b685..370f16ac6a4 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -329,7 +329,7 @@ static INPUT_PORTS_START( talbot )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, watchdog_bit2, NULL) // bit 2 of the watchdog counter
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, watchdog_bit2, nullptr) // bit 2 of the watchdog counter
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index 72319a30dfd..303857557b2 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -1123,7 +1123,7 @@ static MACHINE_CONFIG_DERIVED_CLASS(chihiro_base, xbox_base, chihiro_state)
MCFG_CPU_PROGRAM_MAP(chihiro_map)
MCFG_CPU_IO_MAP(chihiro_map_io)
- //MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ide_baseboard, NULL, "bb", true)
+ //MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ide_baseboard, nullptr, "bb", true)
MCFG_DEVICE_MODIFY("ide:0")
MCFG_DEVICE_SLOT_INTERFACE(ide_baseboard, nullptr, true)
MCFG_DEVICE_MODIFY("ide:1")
diff --git a/src/mame/drivers/cloud9.cpp b/src/mame/drivers/cloud9.cpp
index 17d12c4b268..b0e0a21f0cc 100644
--- a/src/mame/drivers/cloud9.cpp
+++ b/src/mame/drivers/cloud9.cpp
@@ -298,7 +298,7 @@ static INPUT_PORTS_START( cloud9 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, nullptr)
PORT_START("IN1")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -339,7 +339,7 @@ static INPUT_PORTS_START( firebeas )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, nullptr)
PORT_START("IN1")
PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp
index 113498dd03f..391cf3e040e 100644
--- a/src/mame/drivers/cobra.cpp
+++ b/src/mame/drivers/cobra.cpp
@@ -1968,7 +1968,7 @@ WRITE32_MEMBER(cobra_state::sub_sound_dma_w)
/*
static FILE *out;
- if (out == NULL)
+ if (out == nullptr)
out = fopen("sound.bin", "wb");
fputc((data >> 24) & 0xff, out);
diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp
index df9c812957a..b6c60660e53 100644
--- a/src/mame/drivers/coco12.cpp
+++ b/src/mame/drivers/coco12.cpp
@@ -98,8 +98,8 @@ static INPUT_PORTS_START( coco_joystick )
PORT_START(JOYSTICK_LY_TAG)
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
PORT_START(JOYSTICK_BUTTONS_TAG)
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button") PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button") PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button") PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button") PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
INPUT_PORTS_END
@@ -159,71 +159,71 @@ INPUT_PORTS_END
static INPUT_PORTS_START( coco_keyboard )
PORT_START("row0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_START("row1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_START("row2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_START("row3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_START("row4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
PORT_START("row5")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_START("row6")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
PORT_BIT(0x78, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, NULL) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco12_state, coco_state::keyboard_changed, nullptr) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
INPUT_PORTS_END
diff --git a/src/mame/drivers/coco3.cpp b/src/mame/drivers/coco3.cpp
index cf3b0e8710f..83a23fe7fa9 100644
--- a/src/mame/drivers/coco3.cpp
+++ b/src/mame/drivers/coco3.cpp
@@ -77,74 +77,74 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( coco3_keyboard )
PORT_START("row0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_START("row1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_START("row2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_START("row3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_START("row4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
PORT_START("row5")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') PORT_CHAR('_')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') PORT_CHAR('_')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_START("row6")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
INPUT_PORTS_END
@@ -163,10 +163,10 @@ static INPUT_PORTS_START( coco3_joystick )
PORT_START(JOYSTICK_LY_TAG)
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
PORT_START(JOYSTICK_BUTTONS_TAG)
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Right Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Left Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Right Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Left Button 1") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10)
INPUT_PORTS_END
@@ -185,10 +185,10 @@ static INPUT_PORTS_START( coco_rat_mouse )
PORT_START(RAT_MOUSE_LY_TAG)
PORT_BIT( 0x03, 0x00, IPT_MOUSE_Y) PORT_NAME("Rat Mouse Y (Left Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20)
PORT_START(RAT_MOUSE_BUTTONS_TAG)
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Right Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x02)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Right Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x02)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Left Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Left Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Right Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x02)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Right Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x02)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Left Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Left Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20)
INPUT_PORTS_END
@@ -207,8 +207,8 @@ static INPUT_PORTS_START( coco_lightgun )
PORT_START(DIECOM_LIGHTGUN_LY_TAG)
PORT_BIT( 0xff, 121, IPT_LIGHTGUN_Y ) PORT_NAME("Lightgun Y (Left Port)") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,242) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x30)
PORT_START(DIECOM_LIGHTGUN_BUTTONS_TAG)
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Right Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x03)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Left Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x30)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Right Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x03)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Left Port)") PORT_CHANGED_MEMBER(DEVICE_SELF, coco3_state, coco_state::keyboard_changed, nullptr) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x30)
INPUT_PORTS_END
diff --git a/src/mame/drivers/coolridr.cpp b/src/mame/drivers/coolridr.cpp
index b6d0b5a83fd..0345710aa1f 100644
--- a/src/mame/drivers/coolridr.cpp
+++ b/src/mame/drivers/coolridr.cpp
@@ -590,7 +590,7 @@ do {
INT32 dy; \
\
assert(dest.valid()); \
- assert(gfx != NULL); \
+ assert(gfx != nullptr); \
assert(dest.cliprect().contains(cliprect)); \
assert(code < gfx->elements()); \
\
@@ -3064,7 +3064,7 @@ ADDRESS_MAP_END
static GFXDECODE_START( coolridr )
-// GFXDECODE_ENTRY( NULL, 0, tiles16x16_layout, 0, 0x100 )
+// GFXDECODE_ENTRY( nullptr, 0, tiles16x16_layout, 0, 0x100 )
GFXDECODE_END
#define DUMMY_INPUT_PORT(_x_) \
diff --git a/src/mame/drivers/cops.cpp b/src/mame/drivers/cops.cpp
index 44529d40ae3..8c6514ddd42 100644
--- a/src/mame/drivers/cops.cpp
+++ b/src/mame/drivers/cops.cpp
@@ -866,8 +866,8 @@ static MACHINE_CONFIG_START( cops, cops_state )
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(cops_state, cdrom_ctrl_w))
/* acia */
-// MCFG_MOS6551_ADD("acia6551_1", XTAL_1_8432MHz, NULL)
-// MCFG_MOS6551_ADD("acia6551_2", XTAL_1_8432MHz, NULL)
+// MCFG_MOS6551_ADD("acia6551_1", XTAL_1_8432MHz, nullptr)
+// MCFG_MOS6551_ADD("acia6551_2", XTAL_1_8432MHz, nullptr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp
index dd84a091687..3c066b72626 100644
--- a/src/mame/drivers/cosmicos.cpp
+++ b/src/mame/drivers/cosmicos.cpp
@@ -530,7 +530,7 @@ static MACHINE_CONFIG_START( cosmicos, cosmicos_state )
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), WRITELINE(cosmicos_state, dmaout_w), WRITELINE(cosmicos_state, efx_w), NULL, VCC, VCC, VCC)
+ MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), WRITELINE(cosmicos_state, dmaout_w), WRITELINE(cosmicos_state, efx_w), NOOP, VCC, VCC, VCC)
MCFG_CDP1864_CHROMINANCE(RES_K(2), 0, 0, 0) // R2
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp
index c6719a958e7..14572b0bce1 100644
--- a/src/mame/drivers/cps2.cpp
+++ b/src/mame/drivers/cps2.cpp
@@ -9319,8 +9319,8 @@ void cps_state::init_digital_volume()
DRIVER_INIT_MEMBER(cps_state,cps2)
{
- /* Decrypt the game - see machine/cps2crpt.c */
- DRIVER_INIT_CALL(cps2crpt);
+ /* Decrypt the game - see machine/cps2crypt.cpp */
+ DRIVER_INIT_CALL(cps2crypt);
DRIVER_INIT_CALL(cps2nc);
}
diff --git a/src/mame/drivers/crbaloon.cpp b/src/mame/drivers/crbaloon.cpp
index 1e52406c0e7..93716951d09 100644
--- a/src/mame/drivers/crbaloon.cpp
+++ b/src/mame/drivers/crbaloon.cpp
@@ -291,7 +291,7 @@ static INPUT_PORTS_START( crbaloon )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Name Reset")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crbaloon_state,pc3092_r, NULL)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crbaloon_state,pc3092_r, nullptr)
PORT_START("PC3092")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp
index 483883c1058..547b8b0d486 100644
--- a/src/mame/drivers/crimfght.cpp
+++ b/src/mame/drivers/crimfght.cpp
@@ -178,7 +178,7 @@ static INPUT_PORTS_START( crimfght )
PORT_DIPUNUSED_DIPLOC(0x02, IP_ACTIVE_LOW, "SW3:2")
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3")
PORT_DIPUNUSED_DIPLOC(0x08, IP_ACTIVE_LOW, "SW3:4")
- PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, crimfght_state, system_r, NULL)
+ PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, crimfght_state, system_r, nullptr)
PORT_START("P1")
KONAMI8_B123_START(1)
diff --git a/src/mame/drivers/crshrace.cpp b/src/mame/drivers/crshrace.cpp
index 49a7ba67639..7b562e5e570 100644
--- a/src/mame/drivers/crshrace.cpp
+++ b/src/mame/drivers/crshrace.cpp
@@ -345,7 +345,7 @@ static INPUT_PORTS_START( crshrace )
PORT_DIPSETTING( 0x0e00, "5" )
PORT_DIPSETTING( 0x0f00, "5" )
*/
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crshrace_state,country_sndpending_r, NULL) /* pending sound command */
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crshrace_state,country_sndpending_r, nullptr) /* pending sound command */
INPUT_PORTS_END
/* Same as 'crshrace', but additional "unknown" Dip Switch (see notes) */
diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp
index 70d22a51e6d..127a94f18f6 100644
--- a/src/mame/drivers/cubo.cpp
+++ b/src/mame/drivers/cubo.cpp
@@ -556,7 +556,7 @@ static INPUT_PORTS_START( cubo )
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("potgo")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cubo_input, NULL)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cubo_input, nullptr)
PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index 9179640f006..d9e701f6295 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -359,7 +359,7 @@ static INPUT_PORTS_START( dacholer )
PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dacholer_state,snd_ack_r, NULL)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dacholer_state,snd_ack_r, nullptr)
PORT_START("DSWB")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) /* table at 0x0a9c */
diff --git a/src/mame/drivers/dccons.cpp b/src/mame/drivers/dccons.cpp
index 9772ad3ba8c..ecc65bb70f2 100644
--- a/src/mame/drivers/dccons.cpp
+++ b/src/mame/drivers/dccons.cpp
@@ -662,8 +662,13 @@ MACHINE_CONFIG_END
#define ROM_LOAD_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_BIOS(bios+1))
+// known undumped or private BIOS revisions:
+// "MPR-21068 SEGA JAPAN / 9850 D" from VA0 837-13392-02 (171-7782B) NTSC-J unit
+// KABUTO Ver.1.011 CRC 34DA5C88 from pre-release US unit (private)
+
+// MPR-21933-X2 confirmed match MPR-21931 (v1.01d)
+
// actual mask rom labels can have -X1 or -X2 added, presumable depending on mobo revision and/or type of rom used (5v or 3.3v), contents is the same
-// known to exists undumped MPR-21086 (VA0 NTSC-J 3010) and MPR-21933 (VA0 US) boot roms
#define DREAMCAST_COMMON_BIOS \
ROM_REGION(0x200000, "maincpu", 0) \
diff --git a/src/mame/drivers/dcheese.cpp b/src/mame/drivers/dcheese.cpp
index 7f72a4d176c..4369520d168 100644
--- a/src/mame/drivers/dcheese.cpp
+++ b/src/mame/drivers/dcheese.cpp
@@ -260,7 +260,7 @@ static INPUT_PORTS_START( dcheese )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sound->main buffer status (0=empty) */
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -309,7 +309,7 @@ static INPUT_PORTS_START( lottof2 )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sound->main buffer status (0=empty) */
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -356,7 +356,7 @@ static INPUT_PORTS_START( fredmem )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sound->main buffer status (0=empty) */
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp
index 39a0ad6718b..bb1c5b88c83 100644
--- a/src/mame/drivers/ddayjlc.cpp
+++ b/src/mame/drivers/ddayjlc.cpp
@@ -310,7 +310,7 @@ static INPUT_PORTS_START( ddayjlc )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 )
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddayjlc_state,prot_r, NULL)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddayjlc_state,prot_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW1")
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index af2113dc8a4..08cf58cde18 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -4570,7 +4570,7 @@ static INPUT_PORTS_START( ddenlovj )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovj_blitter_r, NULL) // blitter irq flag? (bit 5) & RTC (bit 6)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovj_blitter_r, nullptr) // blitter irq flag? (bit 5) & RTC (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )
PORT_START("DSW1")
@@ -4676,7 +4676,7 @@ static INPUT_PORTS_START( ddenlovr )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) // ? quiz365
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, NULL) // blitter irq flag
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag
PORT_START("DSW")
@@ -4731,7 +4731,7 @@ static INPUT_PORTS_START( nettoqc )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,nettoqc_special_r, NULL) // ? (bit 5) & blitter irq flag (bit 6)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,nettoqc_special_r, nullptr) // ? (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )
PORT_START("DSW1")
@@ -4829,7 +4829,7 @@ static INPUT_PORTS_START( ultrchmp )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, NULL) // blitter irq flag
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag
PORT_START("DSW")
@@ -5009,7 +5009,7 @@ static INPUT_PORTS_START( quiz365 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) // ? quiz365
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, NULL) // blitter irq flag
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag
PORT_START("DSW1")
@@ -8111,7 +8111,7 @@ static INPUT_PORTS_START( mjflove )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,mjflove_blitter_r, NULL) // RTC (bit 5) & blitter irq flag (bit 6)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,mjflove_blitter_r, nullptr) // RTC (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag
PORT_START("KEY0")
diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp
index b422887971d..e139b685942 100644
--- a/src/mame/drivers/ddragon.cpp
+++ b/src/mame/drivers/ddragon.cpp
@@ -695,7 +695,7 @@ static INPUT_PORTS_START( ddragon )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddragon_state, subcpu_bus_free, NULL)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddragon_state, subcpu_bus_free, nullptr)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp
index 13beeaf905c..c3707444380 100644
--- a/src/mame/drivers/deco_ld.cpp
+++ b/src/mame/drivers/deco_ld.cpp
@@ -362,7 +362,7 @@ static INPUT_PORTS_START( begas )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,deco_ld_state,begas_vblank_r, NULL) // TODO: IPT_VBLANK doesn't seem to work fine?
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,deco_ld_state,begas_vblank_r, nullptr) // TODO: IPT_VBLANK doesn't seem to work fine?
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "DSWA" )
diff --git a/src/mame/drivers/decwritr.cpp b/src/mame/drivers/decwritr.cpp
index 539b6768e03..8d19958bae1 100644
--- a/src/mame/drivers/decwritr.cpp
+++ b/src/mame/drivers/decwritr.cpp
@@ -350,7 +350,7 @@ static MACHINE_CONFIG_START( la120, decwriter_state )
MCFG_I8251_DTR_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_dtr))
MCFG_I8251_RTS_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("i8251", i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("i8251", i8251_device, write_dsr))
diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp
index c2097280503..deef35c197e 100644
--- a/src/mame/drivers/dfruit.cpp
+++ b/src/mame/drivers/dfruit.cpp
@@ -337,7 +337,7 @@ static const gfx_layout char_layout =
static GFXDECODE_START( dfruit )
GFXDECODE_ENTRY( "gfx1", 0, bg2_layout, 0, 16 )
GFXDECODE_ENTRY( "gfx1", 0, sp2_layout, 0, 16 )
- //GFXDECODE_ENTRY( NULL, 0, char_layout, 0, 16 ) // Ram-based
+ //GFXDECODE_ENTRY( nullptr, 0, char_layout, 0, 16 ) // Ram-based
GFXDECODE_END
TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::dfruit_irq_scanline)
diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp
index fb1b3c21e8b..f533bec8e32 100644
--- a/src/mame/drivers/dlair.cpp
+++ b/src/mame/drivers/dlair.cpp
@@ -539,8 +539,8 @@ static INPUT_PORTS_START( dlair )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, NULL) /* status strobe */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, NULL) /* command strobe */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, nullptr) /* status strobe */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, nullptr) /* command strobe */
INPUT_PORTS_END
@@ -571,8 +571,8 @@ static INPUT_PORTS_START( dleuro )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, NULL) /* status strobe */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, NULL) /* command strobe */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, nullptr) /* status strobe */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, nullptr) /* command strobe */
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("A:2,1")
diff --git a/src/mame/drivers/dragon.cpp b/src/mame/drivers/dragon.cpp
index 4495f78dcf2..52949b17816 100644
--- a/src/mame/drivers/dragon.cpp
+++ b/src/mame/drivers/dragon.cpp
@@ -53,71 +53,71 @@ ADDRESS_MAP_END
*/
static INPUT_PORTS_START( dragon32 )
PORT_START("row0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
PORT_START("row1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_START("row2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_START("row3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_START("row4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_START("row5")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_START("row6")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_HOME) PORT_CHAR(12)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("BREAK") PORT_CODE(KEYCODE_END) PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
PORT_BIT(0x78, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, NULL) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
INPUT_PORTS_END
static SLOT_INTERFACE_START(dragon_cart)
diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp
index 9d1273c70ff..d7cd941eb8b 100644
--- a/src/mame/drivers/dvk_ksm.cpp
+++ b/src/mame/drivers/dvk_ksm.cpp
@@ -349,7 +349,7 @@ static MACHINE_CONFIG_START( ksm, ksm_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", ksm)
MCFG_PALETTE_ADD_MONOCHROME("palette")
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
MCFG_I8255_OUT_PORTA_CB(WRITE8(ksm_state, ksm_ppi_porta_w))
diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp
index 030c23c0cde..133f966d5c1 100644
--- a/src/mame/drivers/ecoinfr.cpp
+++ b/src/mame/drivers/ecoinfr.cpp
@@ -558,12 +558,12 @@ static INPUT_PORTS_START( ecoinfr_barx )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel1_opto_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel1_opto_r, nullptr)
PORT_DIPNAME( 0x02, 0x02, "IN1:02" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel3_opto_r, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel2_opto_r, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel3_opto_r, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel2_opto_r, nullptr)
PORT_DIPNAME( 0x10, 0x10, "IN1:10" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp
index 081b3f8ce96..eeef544e53b 100644
--- a/src/mame/drivers/enigma2.cpp
+++ b/src/mame/drivers/enigma2.cpp
@@ -484,14 +484,14 @@ static INPUT_PORTS_START( enigma2 )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, NULL)
+ PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, NULL)
+ PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW")
@@ -539,7 +539,7 @@ static INPUT_PORTS_START( enigma2a )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
@@ -547,7 +547,7 @@ static INPUT_PORTS_START( enigma2a )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW")
diff --git a/src/mame/drivers/eolith.cpp b/src/mame/drivers/eolith.cpp
index 80879dbb7ae..81113f41cfb 100644
--- a/src/mame/drivers/eolith.cpp
+++ b/src/mame/drivers/eolith.cpp
@@ -282,7 +282,7 @@ static INPUT_PORTS_START( common )
PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, eolith_speedup_getvblank, NULL)
+ PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, eolith_speedup_getvblank, nullptr)
PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00008000, IP_ACTIVE_LOW )
@@ -520,7 +520,7 @@ static INPUT_PORTS_START( stealsee )
PORT_INCLUDE(common)
PORT_MODIFY("IN0")
- PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, stealsee_speedup_getvblank, NULL)
+ PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, stealsee_speedup_getvblank, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/eolith16.cpp b/src/mame/drivers/eolith16.cpp
index 6fe073c131c..fe33a8b874a 100644
--- a/src/mame/drivers/eolith16.cpp
+++ b/src/mame/drivers/eolith16.cpp
@@ -87,7 +87,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( eolith16 )
PORT_START("SPECIAL")
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith16_state, eolith_speedup_getvblank, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith16_state, eolith_speedup_getvblank, nullptr)
PORT_BIT( 0xff6f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index de52a129b66..c46f7a6285b 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -797,7 +797,7 @@ static INPUT_PORTS_START( gekisou )
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state, gekisou_unknown_bit_r, NULL)
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state, gekisou_unknown_bit_r, nullptr)
/* this is actually a variable resistor */
PORT_START(FRQ_ADJUSTER_TAG)
diff --git a/src/mame/drivers/eti660.cpp b/src/mame/drivers/eti660.cpp
index 40e37a017e5..44de05760ba 100644
--- a/src/mame/drivers/eti660.cpp
+++ b/src/mame/drivers/eti660.cpp
@@ -317,7 +317,7 @@ static MACHINE_CONFIG_START( eti660, eti660_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_8_867238MHz/5, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NULL, READLINE(eti660_state, rdata_r), READLINE(eti660_state, bdata_r), READLINE(eti660_state, gdata_r))
+ MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_8_867238MHz/5, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(eti660_state, rdata_r), READLINE(eti660_state, bdata_r), READLINE(eti660_state, gdata_r))
MCFG_CDP1864_CHROMINANCE(RES_K(2.2), RES_K(1), RES_K(4.7), RES_K(4.7)) // R7, R5, R6, R4
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mame/drivers/exerion.cpp b/src/mame/drivers/exerion.cpp
index 2e09ee72954..925a3558d40 100644
--- a/src/mame/drivers/exerion.cpp
+++ b/src/mame/drivers/exerion.cpp
@@ -232,7 +232,7 @@ ADDRESS_MAP_END
/* verified from Z80 code */
static INPUT_PORTS_START( exerion )
PORT_START("IN0")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exerion_state, exerion_controls_r, NULL)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exerion_state, exerion_controls_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
diff --git a/src/mame/drivers/exidy.cpp b/src/mame/drivers/exidy.cpp
index 81d5d68ea9a..a29bb9518f9 100644
--- a/src/mame/drivers/exidy.cpp
+++ b/src/mame/drivers/exidy.cpp
@@ -602,7 +602,7 @@ static INPUT_PORTS_START( teetert )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy_state,teetert_input_r, NULL)
+ PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy_state,teetert_input_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/exidy440.cpp b/src/mame/drivers/exidy440.cpp
index d4f5f37d8e7..3ac26994742 100644
--- a/src/mame/drivers/exidy440.cpp
+++ b/src/mame/drivers/exidy440.cpp
@@ -526,8 +526,8 @@ static INPUT_PORTS_START( crossbow )
PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -567,8 +567,8 @@ static INPUT_PORTS_START( cheyenne )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -608,8 +608,8 @@ static INPUT_PORTS_START( combat )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -649,8 +649,8 @@ static INPUT_PORTS_START( catch22 )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -692,8 +692,8 @@ static INPUT_PORTS_START( cracksht )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -730,8 +730,8 @@ static INPUT_PORTS_START( claypign )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -772,8 +772,8 @@ static INPUT_PORTS_START( chiller )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -811,8 +811,8 @@ static INPUT_PORTS_START( topsecex )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -848,7 +848,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hitnmiss )
PORT_START("IN0") /* player inputs and logic board dips */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,hitnmiss_button1_r, NULL)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,hitnmiss_button1_r, nullptr)
PORT_DIPNAME( 0x0c, 0x00, "Seconds" )
PORT_DIPSETTING( 0x04, "20" )
PORT_DIPSETTING( 0x00, "30" )
@@ -859,8 +859,8 @@ static INPUT_PORTS_START( hitnmiss )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -892,7 +892,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( whodunit )
PORT_START("IN0") /* player inputs and logic board dips */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x04, "2" )
@@ -904,8 +904,8 @@ static INPUT_PORTS_START( whodunit )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -943,8 +943,8 @@ static INPUT_PORTS_START( showdown )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_START("IN1") /* audio board dips */
COINAGE
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp
index ee39a617359..ce62e04be0d 100644
--- a/src/mame/drivers/famibox.cpp
+++ b/src/mame/drivers/famibox.cpp
@@ -477,7 +477,7 @@ static INPUT_PORTS_START( famibox )
PORT_DIPSETTING( 0x08, "Key position 4" )
PORT_DIPSETTING( 0x10, "Key position 5" )
PORT_DIPSETTING( 0x20, "Key position 6" )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, famibox_state,famibox_coin_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, famibox_state,famibox_coin_r, nullptr)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, famibox_state,coin_inserted, 0)
diff --git a/src/mame/drivers/fanucspmg.cpp b/src/mame/drivers/fanucspmg.cpp
index 62e54b6adbf..5c3a67e6b91 100644
--- a/src/mame/drivers/fanucspmg.cpp
+++ b/src/mame/drivers/fanucspmg.cpp
@@ -982,7 +982,7 @@ static MACHINE_CONFIG_START( fanucspmg, fanucspmg_state )
MCFG_I8257_OUT_IOW_0_CB(WRITE8(fanucspmg_state, fdcdma_w))
MCFG_PIC8259_ADD(PIC0_TAG, INPUTLINE("maincpu", 0), VCC, READ8(fanucspmg_state, get_slave_ack))
- MCFG_PIC8259_ADD(PIC1_TAG, DEVWRITELINE(PIC0_TAG, pic8259_device, ir7_w), GND, NULL)
+ MCFG_PIC8259_ADD(PIC1_TAG, DEVWRITELINE(PIC0_TAG, pic8259_device, ir7_w), GND, NOOP)
MCFG_UPD765A_ADD(FDC_TAG, true, true)
MCFG_UPD765_INTRQ_CALLBACK(DEVWRITELINE(PIC0_TAG, pic8259_device, ir3_w))
diff --git a/src/mame/drivers/fastinvaders.cpp b/src/mame/drivers/fastinvaders.cpp
index 1dad27b04d5..46ed0515414 100644
--- a/src/mame/drivers/fastinvaders.cpp
+++ b/src/mame/drivers/fastinvaders.cpp
@@ -640,7 +640,7 @@ static MACHINE_CONFIG_START( fastinvaders, fastinvaders_state )
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastinvaders_state, scanline_timer, "screen", 0, 1)
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("dma8257", I8257, 6144100)
MCFG_I8257_IN_MEMR_CB(READ8(fastinvaders_state, memory_read_byte))
diff --git a/src/mame/drivers/fgoal.cpp b/src/mame/drivers/fgoal.cpp
index e8c366e4955..3e6f16a9410 100644
--- a/src/mame/drivers/fgoal.cpp
+++ b/src/mame/drivers/fgoal.cpp
@@ -268,7 +268,7 @@ static INPUT_PORTS_START( fgoal )
/* extra credit score changes depending on player's performance */
PORT_START("IN1")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fgoal_state, _80_r, NULL) /* 128V */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fgoal_state, _80_r, nullptr) /* 128V */
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ))
PORT_DIPSETTING( 0x00, DEF_STR( Upright ))
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ))
diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp
index 6d52a64e925..adffd9c43ed 100644
--- a/src/mame/drivers/firefox.cpp
+++ b/src/mame/drivers/firefox.cpp
@@ -598,8 +598,8 @@ static INPUT_PORTS_START( firefox )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("rdin1")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,mainflag_r, NULL)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,soundflag_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,mainflag_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,soundflag_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/flstory.cpp b/src/mame/drivers/flstory.cpp
index b68b43e5483..237ac48c0f6 100644
--- a/src/mame/drivers/flstory.cpp
+++ b/src/mame/drivers/flstory.cpp
@@ -773,7 +773,7 @@ static INPUT_PORTS_START( victnine )
/* bits 0,1 are MCU related:
- bit 0: mcu is ready to receive data from main cpu
- bit 1: mcu has sent data to the main cpu */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, NULL)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 )
@@ -914,7 +914,7 @@ static INPUT_PORTS_START( rumba )
/* bits 0,1 are MCU related:
- bit 0: mcu is ready to receive data from main cpu
- bit 1: mcu has sent data to the main cpu */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, NULL)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index 8667759d012..39d303765bb 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -2724,7 +2724,7 @@ static MACHINE_CONFIG_FRAGMENT( towns_base )
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE("maincpu", 0), VCC, READ8(towns_state,get_slave_ack))
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NULL)
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NOOP)
MCFG_MB8877_ADD("fdc",XTAL_8MHz/4) // clock unknown
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(towns_state,mb8877a_irq_w))
diff --git a/src/mame/drivers/fromanc2.cpp b/src/mame/drivers/fromanc2.cpp
index 5843d684dc8..d098319d184 100644
--- a/src/mame/drivers/fromanc2.cpp
+++ b/src/mame/drivers/fromanc2.cpp
@@ -302,9 +302,9 @@ static INPUT_PORTS_START( fromanc2 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, NULL) // SUBCPU INT FLAG
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, NULL) // SUBCPU NMI FLAG
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, nullptr) // SUBCPU INT FLAG
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, nullptr) // SNDCPU NMI FLAG
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, nullptr) // SUBCPU NMI FLAG
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (1P)" ) PORT_CODE(KEYCODE_F2) // TEST (1P)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (2P)" ) PORT_CODE(KEYCODE_F2) // TEST (2P)
@@ -403,7 +403,7 @@ static INPUT_PORTS_START( fromanc4 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN4 )
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, nullptr) // SNDCPU NMI FLAG
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index 4ca8366e984..9122a41b935 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -204,7 +204,7 @@ static INPUT_PORTS_START( galastrm )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,frame_counter_r, NULL)
+ PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,frame_counter_r, nullptr)
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -230,7 +230,7 @@ static INPUT_PORTS_START( galastrm )
PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,coin_word_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,coin_word_r, nullptr)
PORT_START("STICKX")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_PLAYER(1)
diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp
index ccbdb96fb47..86c1736e98d 100644
--- a/src/mame/drivers/galaxi.cpp
+++ b/src/mame/drivers/galaxi.cpp
@@ -356,11 +356,11 @@ static INPUT_PORTS_START( galaxi )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, NULL) // hopper sensor
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, nullptr) // hopper sensor
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_COIN3 ) // pin 25LC
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, NULL) // ticket sensor
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, nullptr) // ticket sensor
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // hopper out (pin 14LS)
PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // (pin 26LC)
@@ -376,11 +376,11 @@ static INPUT_PORTS_START( magjoker )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, NULL) // hopper sensor
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, nullptr) // hopper sensor
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper Refill") PORT_CODE(KEYCODE_H)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, NULL) // ticket sensor
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, nullptr) // ticket sensor
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // hopper out (pin 14LS)
PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYOUT ) // (pin 26LC)
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index e1d30360857..a40ebca0f2a 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -3219,7 +3219,7 @@ static INPUT_PORTS_START( gmgalax )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("GAMESEL") /* fake - game select */
- PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_game_changed, NULL)
+ PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_game_changed, nullptr)
PORT_DIPSETTING( 0x00, "Ghost Muncher" )
PORT_DIPSETTING( 0x01, "Galaxian" )
INPUT_PORTS_END
@@ -3969,14 +3969,14 @@ static INPUT_PORTS_START( kingball )
PORT_INCLUDE(galaxian)
PORT_MODIFY("IN0")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_muxbit_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_muxbit_r, nullptr)
/* Relating to above port:Hack? - possibly multiplexed via writes to $b003 */
//PORT_DIPNAME( 0x40, 0x40, "Speech" )
//PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
//PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_MODIFY("IN1")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_noise_r, NULL) /* NOISE line */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_noise_r, nullptr) /* NOISE line */
PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) )
@@ -4860,7 +4860,7 @@ CUSTOM_INPUT_MEMBER(galaxian_state::moonwar_dial_r)
/* verified from Z80 code */
static INPUT_PORTS_START( moonwar )
PORT_START("IN0")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, moonwar_dial_r, NULL)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, moonwar_dial_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // cocktail: p2 shield
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -7074,7 +7074,7 @@ DRIVER_INIT_MEMBER(galaxian_state,amidar)
{
/* no existing amidar sets run on Amidar hardware as described by Amidar schematics! */
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::amidar_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::amidar_draw_background, nullptr, nullptr);
}
#endif
diff --git a/src/mame/drivers/ghosteo.cpp b/src/mame/drivers/ghosteo.cpp
index 2e1c408ccf6..2a6a1fa071b 100644
--- a/src/mame/drivers/ghosteo.cpp
+++ b/src/mame/drivers/ghosteo.cpp
@@ -640,7 +640,7 @@ static MACHINE_CONFIG_START( ghosteo, ghosteo_state )
// MCFG_NAND_TYPE(NAND_CHIP_K9F5608U0D) // or another variant with ID 0xEC 0x75 ?
// MCFG_NAND_RNB_CALLBACK(DEVWRITELINE("s3c2410", s3c2410_device, s3c24xx_pin_frnb_w))
-// MCFG_I2CMEM_ADD("i2cmem", 0xA0, 0, 0x100, NULL)
+// MCFG_I2CMEM_ADD("i2cmem", 0xA0, 0, 0x100, nullptr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp
index c951b6309cb..4b61c81521c 100644
--- a/src/mame/drivers/gimix.cpp
+++ b/src/mame/drivers/gimix.cpp
@@ -220,7 +220,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gimix )
PORT_START("dma_s2")
- PORT_DIPNAME(0x00000100,0x00000000,"5.25\" / 8\" floppy drive 0") PORT_DIPLOCATION("S2:9") PORT_CHANGED_MEMBER(DEVICE_SELF,gimix_state,drive_size_cb,NULL)
+ PORT_DIPNAME(0x00000100,0x00000000,"5.25\" / 8\" floppy drive 0") PORT_DIPLOCATION("S2:9") PORT_CHANGED_MEMBER(DEVICE_SELF,gimix_state,drive_size_cb,nullptr)
PORT_DIPSETTING(0x00000000,"5.25\"")
PORT_DIPSETTING(0x00000100,"8\"")
diff --git a/src/mame/drivers/gizmondo.cpp b/src/mame/drivers/gizmondo.cpp
index 4f14b5ab349..ed39f36a293 100644
--- a/src/mame/drivers/gizmondo.cpp
+++ b/src/mame/drivers/gizmondo.cpp
@@ -213,27 +213,27 @@ MACHINE_CONFIG_END
static INPUT_PORTS_START( gizmondo )
PORT_START( "PORTF-01" )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("STOP") PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("STOP") PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_PLAYER(1)
PORT_START( "PORTF-02" )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("F2") PORT_PLAYER(1) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("FORWARD") PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("F2") PORT_PLAYER(1) PORT_CODE(KEYCODE_F2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("FORWARD") PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_PLAYER(1)
PORT_START( "PORTF-04" )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("F3") PORT_PLAYER(1) PORT_CODE(KEYCODE_F3)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("PLAY") PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("F3") PORT_PLAYER(1) PORT_CODE(KEYCODE_F3)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("PLAY") PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_PLAYER(1)
PORT_START( "PORTF-08" )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("F4") PORT_PLAYER(1) PORT_CODE(KEYCODE_F4)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("REWIND") PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("F4") PORT_PLAYER(1) PORT_CODE(KEYCODE_F4)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("REWIND") PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_PLAYER(1)
PORT_START( "PORTF-10" )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("L") PORT_PLAYER(1) PORT_CODE(KEYCODE_L)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("R") PORT_PLAYER(1) PORT_CODE(KEYCODE_R)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("L") PORT_PLAYER(1) PORT_CODE(KEYCODE_L)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("R") PORT_PLAYER(1) PORT_CODE(KEYCODE_R)
PORT_START( "PORTF" )
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("F5") PORT_PLAYER(1) PORT_CODE(KEYCODE_F5)
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("F5") PORT_PLAYER(1) PORT_CODE(KEYCODE_F5)
PORT_START( "PORTG" )
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, NULL) PORT_NAME("F1") PORT_PLAYER(1) PORT_CODE(KEYCODE_F1)
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_CHANGED_MEMBER(DEVICE_SELF, gizmondo_state, port_changed, nullptr) PORT_NAME("F1") PORT_PLAYER(1) PORT_CODE(KEYCODE_F1)
INPUT_PORTS_END
/*******************************************************************************
diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp
index d6a7d2be9d6..eb26cf3a296 100644
--- a/src/mame/drivers/gottlieb.cpp
+++ b/src/mame/drivers/gottlieb.cpp
@@ -1575,7 +1575,7 @@ static INPUT_PORTS_START( 3stooges )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN4") /* joystick inputs */
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,stooges_joystick_r, NULL)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,stooges_joystick_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3)
diff --git a/src/mame/drivers/goupil.cpp b/src/mame/drivers/goupil.cpp
index 72164e13d92..75a623c97ef 100644
--- a/src/mame/drivers/goupil.cpp
+++ b/src/mame/drivers/goupil.cpp
@@ -50,7 +50,7 @@ public:
, m_fdc(*this, "fd1791")
, m_floppy0(*this, "fd1791:0")
, m_floppy1(*this, "fd1791:1")
- , m_floppy(NULL)
+ , m_floppy(nullptr)
{ }
DECLARE_WRITE8_MEMBER(via_video_pba_w);
@@ -391,7 +391,7 @@ void goupil_g1_state::machine_start()
{
std::string region_tag;
- m_floppy = NULL;
+ m_floppy = nullptr;
valkeyb = 0xFF;
}
diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp
index e3e0c652ef7..3ca97e168f3 100644
--- a/src/mame/drivers/groundfx.cpp
+++ b/src/mame/drivers/groundfx.cpp
@@ -207,7 +207,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( groundfx )
PORT_START("BUTTONS")
- PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, groundfx_state,frame_counter_r, NULL)
+ PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, groundfx_state,frame_counter_r, nullptr)
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -239,7 +239,7 @@ static INPUT_PORTS_START( groundfx )
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, groundfx_state,coin_word_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, groundfx_state,coin_word_r, nullptr)
PORT_START("AN0") /* IN 2, steering wheel */
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1)
diff --git a/src/mame/drivers/gstream.cpp b/src/mame/drivers/gstream.cpp
index bef7f573d07..ef6ab7f984c 100644
--- a/src/mame/drivers/gstream.cpp
+++ b/src/mame/drivers/gstream.cpp
@@ -437,10 +437,10 @@ static INPUT_PORTS_START( gstream )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_service_r, NULL)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_service_r, nullptr)
PORT_START("IN2")
- PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_r, NULL)
+ PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_r, nullptr)
PORT_BIT( 0xffb0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -532,7 +532,7 @@ static INPUT_PORTS_START( x2222 )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,x2222_toggle_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,x2222_toggle_r, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp
index 5b1df1707db..325717e7e55 100644
--- a/src/mame/drivers/gunbustr.cpp
+++ b/src/mame/drivers/gunbustr.cpp
@@ -219,7 +219,7 @@ static INPUT_PORTS_START( gunbustr )
PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gunbustr_state,coin_word_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gunbustr_state,coin_word_r, nullptr)
/* Light gun inputs */
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 50e212b67b2..bbd409c0542 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -757,7 +757,7 @@ static INPUT_PORTS_START( funrlgl )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN.1") // fake
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, funrlgl_state, reset_button, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, funrlgl_state, reset_button, nullptr)
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(funrlgl_state::reset_button)
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index fe7279c0eed..9519a0135f2 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -83,15 +83,15 @@
***************************************************************************/
#include "emu.h"
+#include "rendlay.h"
#include "cpu/hmcs40/hmcs40.h"
#include "cpu/cop400/cop400.h"
#include "sound/speaker.h"
// internal artwork
-#include "rendlay.h"
#include "pairmtch.lh"
-#include "hh_hmcs40_test.lh" // common test-layout - use external artwork
+#include "hh_hmcs40_test.lh" // common test-layout - no svg artwork(yet), use external artwork
class hh_hmcs40_state : public driver_device
@@ -340,8 +340,6 @@ INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line)
* Hitachi HD38750A08 MCU
* green VFD display Emix-106, with bezel overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bambball_state : public hh_hmcs40_state
@@ -430,8 +428,13 @@ static MACHINE_CONFIG_START( bambball, bambball_state )
MCFG_HMCS40_WRITE_R_CB(3, WRITE8(bambball_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(bambball_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 249)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 249-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -450,8 +453,6 @@ MACHINE_CONFIG_END
* Hitachi HD38750A07 MCU
* cyan VFD display Emix-103, with blue or green color overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bmboxing_state : public hh_hmcs40_state
@@ -564,8 +565,13 @@ static MACHINE_CONFIG_START( bmboxing, bmboxing_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(bmboxing_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.4"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 276)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 276-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -584,8 +590,6 @@ MACHINE_CONFIG_END
* Hitachi HD38800A77 MCU
* cyan/red/green VFD display Futaba DM-43ZK 2E
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bfriskyt_state : public hh_hmcs40_state
@@ -652,19 +656,19 @@ void bfriskyt_state::update_int1()
static INPUT_PORTS_START( bfriskyt )
PORT_START("IN.0") // D11 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, nullptr)
PORT_START("IN.1") // D12 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, nullptr)
PORT_START("IN.2") // D13 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, nullptr)
PORT_START("IN.3") // D14 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, nullptr)
PORT_START("IN.4") // D15 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, nullptr)
PORT_START("IN.5") // INT0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
@@ -686,8 +690,13 @@ static MACHINE_CONFIG_START( bfriskyt, bfriskyt_state )
MCFG_HMCS40_WRITE_R_CB(3, WRITE8(bfriskyt_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(bfriskyt_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 351)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 351-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -712,8 +721,6 @@ MACHINE_CONFIG_END
- USA/Canada: Hungry Monster, published by Tandy
- other: Gobble Man/Ogre Monster, published by Tandy
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class packmon_state : public hh_hmcs40_state
@@ -794,8 +801,13 @@ static MACHINE_CONFIG_START( packmon, packmon_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(packmon_state, grid_w))
MCFG_HMCS40_READ_D_CB(READ16(packmon_state, input_r))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 358)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 358-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -821,8 +833,6 @@ MACHINE_CONFIG_END
- Japan: ?
- USA: Star Hawk, published by Mattel
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class msthawk_state : public hh_hmcs40_state
@@ -889,22 +899,22 @@ void msthawk_state::update_int0()
static INPUT_PORTS_START( msthawk )
PORT_START("IN.0") // D10 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, NULL) PORT_NAME("Score")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, nullptr) PORT_NAME("Score")
PORT_START("IN.1") // D11 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, NULL) PORT_NAME("Land")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, nullptr) PORT_NAME("Land")
PORT_START("IN.2") // D12 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, nullptr)
PORT_START("IN.3") // D13 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, nullptr)
PORT_START("IN.4") // D14 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, nullptr)
PORT_START("IN.5") // D15 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, msthawk_state, input_changed, nullptr)
PORT_START("IN.6") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1) PORT_NAME("Fire")
@@ -926,8 +936,13 @@ static MACHINE_CONFIG_START( msthawk, msthawk_state )
MCFG_HMCS40_WRITE_R_CB(3, WRITE8(msthawk_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(msthawk_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 362)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 362-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1010,16 +1025,16 @@ void bzaxxon_state::update_int1()
static INPUT_PORTS_START( bzaxxon )
PORT_START("IN.0") // D7 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, nullptr)
PORT_START("IN.1") // D8 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, nullptr)
PORT_START("IN.2") // D9 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, nullptr)
PORT_START("IN.3") // D10 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, nullptr)
PORT_START("IN.4") // INT0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
@@ -1065,8 +1080,6 @@ MACHINE_CONFIG_END
* Hitachi QFP HD38820A49 MCU
* cyan/red/yellow VFD display Futaba DM-53Z 3E, with color overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class zackman_state : public hh_hmcs40_state
@@ -1128,16 +1141,16 @@ void zackman_state::update_int0()
static INPUT_PORTS_START( zackman )
PORT_START("IN.0") // D11 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, nullptr)
PORT_START("IN.1") // D12 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, nullptr)
PORT_START("IN.2") // D13 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, nullptr)
PORT_START("IN.3") // D14 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, zackman_state, input_changed, nullptr)
PORT_START("IN.4") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
@@ -1162,8 +1175,13 @@ static MACHINE_CONFIG_START( zackman, zackman_state )
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(zackman_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(zackman_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(429, 950)
+ MCFG_SCREEN_VISIBLE_AREA(0, 429-1, 0, 950-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1182,8 +1200,6 @@ MACHINE_CONFIG_END
* Hitachi QFP HD38820A63 MCU
* cyan/red/blue VFD display Futaba DM-68ZK 3D DM-63
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bpengo_state : public hh_hmcs40_state
@@ -1247,16 +1263,16 @@ void bpengo_state::update_int0()
static INPUT_PORTS_START( bpengo )
PORT_START("IN.0") // D12 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, nullptr)
PORT_START("IN.1") // D13 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, nullptr)
PORT_START("IN.2") // D14 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, nullptr)
PORT_START("IN.3") // D15 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bpengo_state, input_changed, nullptr)
PORT_START("IN.4") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
@@ -1288,8 +1304,13 @@ static MACHINE_CONFIG_START( bpengo, bpengo_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(bpengo_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.5"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 395)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 395-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1308,8 +1329,6 @@ MACHINE_CONFIG_END
* Hitachi QFP HD38820A65 MCU
* cyan/red/green VFD display NEC FIP6AM25T no. 21-21
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bbtime_state : public hh_hmcs40_state
@@ -1373,19 +1392,19 @@ void bbtime_state::update_int0()
static INPUT_PORTS_START( bbtime )
PORT_START("IN.0") // D10 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, nullptr)
PORT_START("IN.1") // D11 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, nullptr)
PORT_START("IN.2") // D12 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, nullptr)
PORT_START("IN.3") // D13 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, nullptr)
PORT_START("IN.4") // D14 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, bbtime_state, input_changed, nullptr)
PORT_START("IN.5") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
@@ -1410,8 +1429,13 @@ static MACHINE_CONFIG_START( bbtime, bbtime_state )
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(bbtime_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(bbtime_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(351, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 351-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1430,8 +1454,6 @@ MACHINE_CONFIG_END
* Hitachi HD38800B43 MCU
* cyan/red/blue VFD display Futaba DM-71
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bdoramon_state : public hh_hmcs40_state
@@ -1506,8 +1528,13 @@ static MACHINE_CONFIG_START( bdoramon, bdoramon_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(bdoramon_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.2"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 348)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 348-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1526,8 +1553,6 @@ MACHINE_CONFIG_END
* Hitachi HD38800B52 MCU
* cyan/red/blue VFD display NEC FIP8BM25T no. 21-8 2
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bultrman_state : public hh_hmcs40_state
@@ -1594,8 +1619,13 @@ static MACHINE_CONFIG_START( bultrman, bultrman_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(bultrman_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.1"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(2033, 713)
+ MCFG_SCREEN_VISIBLE_AREA(0, 2033-1, 0, 713-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1614,8 +1644,6 @@ MACHINE_CONFIG_END
* Hitachi QFP HD38820A85 MCU
* cyan/red/green VFD display NEC FIP5CM33T no. 4 21
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class machiman_state : public hh_hmcs40_state
@@ -1681,8 +1709,13 @@ static MACHINE_CONFIG_START( machiman, machiman_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(machiman_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.1"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 704)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 704-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1856,8 +1889,6 @@ MACHINE_CONFIG_END
It looks like Coleco took Gakken's Heiankyo Alien and turned it into a more
action-oriented game.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class alnattck_state : public hh_hmcs40_state
@@ -1945,8 +1976,13 @@ static MACHINE_CONFIG_START( alnattck, alnattck_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(alnattck_state, grid_w))
MCFG_HMCS40_READ_D_CB(READ16(alnattck_state, input_r))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 364)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 364-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2072,7 +2108,7 @@ static MACHINE_CONFIG_START( cdkong, cdkong_state )
MCFG_SCREEN_SVG_ADD("screen", "svg")
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_SIZE(559, 998)
- MCFG_SCREEN_VISIBLE_AREA(0, 558, 0, 997)
+ MCFG_SCREEN_VISIBLE_AREA(0, 559-1, 0, 998-1)
MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
@@ -2100,8 +2136,6 @@ MACHINE_CONFIG_END
- P2 Left: Head-to-Head Galaxian (2-player mode, short)
- P2 Right: Head-to-Head Galaxian (2-player mode, long)
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class cgalaxn_state : public hh_hmcs40_state
@@ -2169,7 +2203,7 @@ static INPUT_PORTS_START( cgalaxn )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_START("IN.1") // R11 port R0x
- PORT_CONFNAME( 0x01, 0x01, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, cgalaxn_state, player_switch, NULL)
+ PORT_CONFNAME( 0x01, 0x01, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, cgalaxn_state, player_switch, nullptr)
PORT_CONFSETTING( 0x01, "1" )
PORT_CONFSETTING( 0x00, "2" )
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
@@ -2199,8 +2233,13 @@ static MACHINE_CONFIG_START( cgalaxn, cgalaxn_state )
MCFG_HMCS40_WRITE_R_CB(3, WRITE8(cgalaxn_state, grid_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(cgalaxn_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(483, 992)
+ MCFG_SCREEN_VISIBLE_AREA(0, 483-1, 0, 992-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2231,8 +2270,6 @@ MACHINE_CONFIG_END
BTANB note: 1st version doesn't show the whole maze on power-on
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class cpacman_state : public hh_hmcs40_state
@@ -2318,8 +2355,13 @@ static MACHINE_CONFIG_START( cpacman, cpacman_state )
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(cpacman_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(cpacman_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(446, 999)
+ MCFG_SCREEN_VISIBLE_AREA(0, 446-1, 0, 999-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2345,8 +2387,6 @@ MACHINE_CONFIG_END
BTANB note: in demo-mode, she hardly ever walks to the upper two rows
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class cmspacmn_state : public hh_hmcs40_state
@@ -2432,8 +2472,13 @@ static MACHINE_CONFIG_START( cmspacmn, cmspacmn_state )
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(cmspacmn_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(cmspacmn_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(432, 970)
+ MCFG_SCREEN_VISIBLE_AREA(0, 432-1, 0, 970-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2553,7 +2598,7 @@ static MACHINE_CONFIG_START( egalaxn2, egalaxn2_state )
MCFG_SCREEN_SVG_ADD("screen", "svg")
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_SIZE(421, 900)
- MCFG_SCREEN_VISIBLE_AREA(0, 420, 0, 899)
+ MCFG_SCREEN_VISIBLE_AREA(0, 421-1, 0, 900-1)
MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
@@ -2625,7 +2670,7 @@ static MACHINE_CONFIG_DERIVED( epacman2, egalaxn2 )
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_SIZE(467, 1000)
- MCFG_SCREEN_VISIBLE_AREA(0, 466, 0, 999)
+ MCFG_SCREEN_VISIBLE_AREA(0, 467-1, 0, 1000-1)
MACHINE_CONFIG_END
@@ -2640,8 +2685,6 @@ MACHINE_CONFIG_END
* COP411L sub MCU, label COP411L-KED/N
* cyan/red/green VFD display NEC FIP15BM32T
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class eturtles_state : public hh_hmcs40_state
@@ -2746,29 +2789,29 @@ READ8_MEMBER(eturtles_state::cop_ack_r)
static INPUT_PORTS_START( eturtles )
PORT_START("IN.0") // D1 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_START("IN.1") // D2 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_START("IN.2") // D3 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_START("IN.3") // D4 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_START("IN.4") // D5 INT0/1
- PORT_CONFNAME( 0x01, 0x01, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_CONFNAME( 0x01, 0x01, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_CONFSETTING( 0x01, "1" )
PORT_CONFSETTING( 0x00, "2" )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_START("IN.5") // D6 INT0/1
- PORT_CONFNAME( 0x03, 0x00, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_CONFNAME( 0x03, 0x00, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_CONFSETTING( 0x02, "0 (Demo)" )
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x01, "2" )
@@ -2810,8 +2853,13 @@ static MACHINE_CONFIG_START( eturtles, eturtles_state )
MCFG_QUANTUM_PERFECT_CPU("maincpu")
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(443, 989)
+ MCFG_SCREEN_VISIBLE_AREA(0, 443-1, 0, 989-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2831,8 +2879,6 @@ MACHINE_CONFIG_END
* COP411L sub MCU, label ~/B8236 COP411L-KEC/N
* cyan/red/green VFD display NEC FIP15AM32T (EL628-003) no. 2-421, with partial color overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class estargte_state : public eturtles_state
@@ -2867,27 +2913,27 @@ READ8_MEMBER(estargte_state::cop_data_r)
static INPUT_PORTS_START( estargte )
PORT_START("IN.0") // D1 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL) PORT_NAME("Inviso")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL) PORT_NAME("Smart Bomb")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr) PORT_NAME("Inviso")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr) PORT_NAME("Smart Bomb")
PORT_START("IN.1") // D2 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL) PORT_NAME("Fire")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL) PORT_NAME("Change Direction")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr) PORT_NAME("Fire")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr) PORT_NAME("Change Direction")
PORT_START("IN.2") // D3 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_START("IN.3") // D4 INT0/1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL) PORT_NAME("Thrust")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr) PORT_NAME("Thrust")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN.4") // D5 INT0/1
- PORT_CONFNAME( 0x01, 0x00, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_CONFNAME( 0x01, 0x00, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_CONFSETTING( 0x00, "0 (Demo)" ) // yes, same value as 1-player, hold the Inviso button at boot to enter demo mode
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x01, "2" )
- PORT_CONFNAME( 0x02, 0x02, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, NULL)
+ PORT_CONFNAME( 0x02, 0x02, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, eturtles_state, input_changed, nullptr)
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x02, "2" )
@@ -2916,8 +2962,13 @@ static MACHINE_CONFIG_START( estargte, estargte_state )
MCFG_QUANTUM_PERFECT_CPU("maincpu")
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 445)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 445-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2939,8 +2990,6 @@ MACHINE_CONFIG_END
- Japan: Heiankyo Alien
- USA: Earth Invaders, published by CGL
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class ghalien_state : public hh_hmcs40_state
@@ -3029,8 +3078,13 @@ static MACHINE_CONFIG_START( ghalien, ghalien_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(ghalien_state, grid_w))
MCFG_HMCS40_READ_D_CB(READ16(ghalien_state, input_r))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 364)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 364-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3053,8 +3107,6 @@ MACHINE_CONFIG_END
- Japan: Crazy Kong
- USA: Super Kong, published by CGL
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class gckong_state : public hh_hmcs40_state
@@ -3116,16 +3168,16 @@ void gckong_state::update_int1()
static INPUT_PORTS_START( gckong )
PORT_START("IN.0") // D5 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, nullptr)
PORT_START("IN.1") // D6 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, nullptr)
PORT_START("IN.2") // D7 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, nullptr)
PORT_START("IN.3") // D8 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, nullptr)
PORT_START("IN.4") // INT0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
@@ -3154,8 +3206,13 @@ static MACHINE_CONFIG_START( gckong, gckong_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(gckong_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.5"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(444, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 444-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3174,8 +3231,6 @@ MACHINE_CONFIG_END
* Hitachi QFP HD38820A69 MCU
* cyan/red/green VFD display Futaba DM-69Z 3F, with color overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class gdigdug_state : public hh_hmcs40_state
@@ -3236,19 +3291,19 @@ void gdigdug_state::update_int1()
static INPUT_PORTS_START( gdigdug )
PORT_START("IN.0") // D11 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, nullptr)
PORT_START("IN.1") // D12 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, nullptr)
PORT_START("IN.2") // D13 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, nullptr)
PORT_START("IN.3") // D14 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, nullptr)
PORT_START("IN.4") // D15 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, nullptr)
PORT_START("IN.5") // INT0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
@@ -3273,8 +3328,13 @@ static MACHINE_CONFIG_START( gdigdug, gdigdug_state )
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(gdigdug_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(gdigdug_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(441, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 441-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3297,8 +3357,6 @@ MACHINE_CONFIG_END
turn the game on while holding the 1-key and use the visitor's side keypad
to play offsense.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class mwcbaseb_state : public hh_hmcs40_state
@@ -3431,8 +3489,13 @@ static MACHINE_CONFIG_START( mwcbaseb, mwcbaseb_state )
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(mwcbaseb_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(mwcbaseb_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 249)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 249-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3452,8 +3515,6 @@ MACHINE_CONFIG_END
* Hitachi QFP HD38820A70 MCU
* cyan/red/green/darkgreen VFD display Itron CP5137
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class pbqbert_state : public hh_hmcs40_state
@@ -3518,8 +3579,13 @@ static MACHINE_CONFIG_START( pbqbert, pbqbert_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(pbqbert_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.0"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(525, 939)
+ MCFG_SCREEN_VISIBLE_AREA(0, 525-1, 0, 939-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3538,8 +3604,6 @@ MACHINE_CONFIG_END
* Hitachi HD38800B23 MCU
* cyan/red/blue VFD display Futaba DM-65ZK 3A
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class kingman_state : public hh_hmcs40_state
@@ -3606,16 +3670,16 @@ void kingman_state::update_int0()
static INPUT_PORTS_START( kingman )
PORT_START("IN.0") // D12 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, nullptr)
PORT_START("IN.1") // D13 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, nullptr)
PORT_START("IN.2") // D14 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, nullptr)
PORT_START("IN.3") // D15 INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, kingman_state, input_changed, nullptr)
PORT_START("IN.4") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
@@ -3637,8 +3701,13 @@ static MACHINE_CONFIG_START( kingman, kingman_state )
MCFG_HMCS40_WRITE_R_CB(3, WRITE8(kingman_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(kingman_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(342, 988)
+ MCFG_SCREEN_VISIBLE_AREA(0, 342-1, 0, 988-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3657,8 +3726,6 @@ MACHINE_CONFIG_END
* Hitachi HD38800A88 MCU
* cyan/red/green VFD display NEC FIP10AM24T no. 2-8 1
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class tmtron_state : public hh_hmcs40_state
@@ -3725,16 +3792,16 @@ void tmtron_state::update_int1()
static INPUT_PORTS_START( tmtron )
PORT_START("IN.0") // D12 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, nullptr)
PORT_START("IN.1") // D13 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, nullptr)
PORT_START("IN.2") // D14 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, nullptr)
PORT_START("IN.3") // D15 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, nullptr)
PORT_START("IN.4") // INT0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
@@ -3756,8 +3823,13 @@ static MACHINE_CONFIG_START( tmtron, tmtron_state )
MCFG_HMCS40_WRITE_R_CB(3, WRITE8(tmtron_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(tmtron_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 345)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 345-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3780,8 +3852,6 @@ MACHINE_CONFIG_END
- UK: Cosmic Invader, published by Grandstand
- UK: Galactic Invaders, published by Prinztronic
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class vinvader_state : public hh_hmcs40_state
@@ -3848,8 +3918,13 @@ static MACHINE_CONFIG_START( vinvader, vinvader_state )
MCFG_HMCS40_WRITE_D_CB(WRITE16(vinvader_state, grid_w))
MCFG_HMCS40_READ_D_CB(IOPORT("IN.1"))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(216, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 216-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -3871,6 +3946,9 @@ ROM_START( bambball )
ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38750a08", 0x0000, 0x0800, CRC(907fef18) SHA1(73fe7ca7c6332268a3a9abc5ac88ada2991012fb) )
ROM_CONTINUE( 0x0f00, 0x0080 )
+
+ ROM_REGION( 280708, "svg", 0)
+ ROM_LOAD( "bambball.svg", 0, 280708, CRC(cf096b37) SHA1(8a2ea1762612c3a3edb68596ff2a9f91eedf0e68) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -3878,6 +3956,9 @@ ROM_START( bmboxing )
ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38750a07", 0x0000, 0x0800, CRC(7f33e259) SHA1(c5fcdd6bf060c96666354f09f0570c754f6ed4e0) )
ROM_CONTINUE( 0x0f00, 0x0080 )
+
+ ROM_REGION( 257144, "svg", 0)
+ ROM_LOAD( "bmboxing.svg", 0, 257144, CRC(dab81477) SHA1(28b0c844a311e2023ffa71d754e799059b7d050f) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -3885,6 +3966,9 @@ ROM_START( bfriskyt )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a77", 0x0000, 0x1000, CRC(a2445c4f) SHA1(0aaccfec90b66d27dae194d4462d88e654c41578) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 413577, "svg", 0)
+ ROM_LOAD( "bfriskyt.svg", 0, 413577, CRC(17090264) SHA1(4512a8a91a459f2ddc258641c6d38c2f48f4160f) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -3892,6 +3976,9 @@ ROM_START( packmon )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a27", 0x0000, 0x1000, CRC(86e09e84) SHA1(ac7d3c43667d5720ca513f8ff51d146d9f2af124) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 400909, "svg", 0)
+ ROM_LOAD( "packmon.svg", 0, 400909, CRC(d91393ac) SHA1(1aa27b6dbef59ea6482a41f3e6eb30ff0eb91b4a) ) // by kevtris/OG/hap, ver. 25 apr 2016
ROM_END
@@ -3899,6 +3986,9 @@ ROM_START( msthawk )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a73", 0x0000, 0x1000, CRC(a4f9a523) SHA1(465f06b02e2e7d2277218fd447830725790a816c) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 197907, "svg", 0)
+ ROM_LOAD( "msthawk.svg", 0, 197907, CRC(b54efcb9) SHA1(76db2ca156d556bf578995196eca1170b39988bb) ) // by kevtris/hap, ver. 25 apr 2016
ROM_END
@@ -3913,6 +4003,9 @@ ROM_START( zackman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a49", 0x0000, 0x1000, CRC(b97f5ef6) SHA1(7fe20e8107361caf9ea657e504be1f8b10b8b03f) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 910689, "svg", 0)
+ ROM_LOAD( "zackman.svg", 0, 910689, CRC(5f322820) SHA1(4210aff160e5de9a409aba8b915aaebff2a92647) ) // by kevtris, ver. 29 mar 2015
ROM_END
@@ -3920,6 +4013,9 @@ ROM_START( bpengo )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a63", 0x0000, 0x1000, CRC(ebd6bc64) SHA1(0a322c47b9553a2739a85908ce64b9650cf93d49) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 744461, "svg", 0)
+ ROM_LOAD( "bpengo.svg", 0, 744461, BAD_DUMP CRC(2b9abaa5) SHA1(c70a6ac1fa757fdd3ababfe6e00573ef1410c1eb) ) // by hap/kevtris, ver. 25 apr 2016 - BAD_DUMP: needs cleanup/redo
ROM_END
@@ -3927,6 +4023,9 @@ ROM_START( bbtime )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a65", 0x0000, 0x1000, CRC(33611faf) SHA1(29b6a30ed543688d31ec2aa18f7938fa4eef30b0) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 461605, "svg", 0)
+ ROM_LOAD( "bbtime.svg", 0, 461605, BAD_DUMP CRC(5b335271) SHA1(46c45b711358e8397ae707668aecead9e341ab8a) ) // by hap/kevtris, ver. 25 apr 2016 - BAD_DUMP: needs cleanup/redo
ROM_END
@@ -3934,6 +4033,9 @@ ROM_START( bdoramon )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800b43", 0x0000, 0x1000, CRC(9387ca42) SHA1(8937e208934b34bd9f49700aa50287dfc8bda76c) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 624751, "svg", 0)
+ ROM_LOAD( "bdoramon.svg", 0, 624751, CRC(5dc4017c) SHA1(2091765de401969651b8eb22067572be72d12398) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -3941,6 +4043,9 @@ ROM_START( bultrman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800b52", 0x0000, 0x1000, CRC(88d372dc) SHA1(f2ac3b89be8afe6fb65914ccebe1a56316b9472a) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 405717, "svg", 0)
+ ROM_LOAD( "bultrman.svg", 0, 405717, CRC(13367971) SHA1(f294898712d1e146ff267bb1e3cfd059f972b248) ) // by Rik/kevtris, ver. 7 apr 2016
ROM_END
@@ -3948,6 +4053,9 @@ ROM_START( machiman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a85", 0x0000, 0x1000, CRC(894b4954) SHA1(cab49638a326b031aa548301beb16f818759ef62) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 374097, "svg", 0)
+ ROM_LOAD( "machiman.svg", 0, 374097, CRC(78af02ac) SHA1(1b4bbea3e46e1bf33149727d9725bc9b18652b9c) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -3966,6 +4074,9 @@ ROM_START( alnattck )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a25", 0x0000, 0x1000, CRC(18b50869) SHA1(11e9d5f7b4ae818b077b0ee14a3b43190e20bff3) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 564271, "svg", 0)
+ ROM_LOAD( "alnattck.svg", 0, 564271, CRC(5466d1d4) SHA1(3295272015969e58fddc53272769e1fc1bd4b355) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -3983,6 +4094,9 @@ ROM_START( cgalaxn )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a70", 0x0000, 0x1000, CRC(a4c5ed1d) SHA1(0f647cb78437d7e62411febf7c9ce3c5b6753a80) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 712204, "svg", 0)
+ ROM_LOAD( "cgalaxn.svg", 0, 712204, CRC(67ec57bf) SHA1(195c9867b321da9768ce287d1060ceae50345dd4) ) // by kevtris, ver. 30 mar 2015
ROM_END
@@ -3990,12 +4104,18 @@ ROM_START( cpacman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a29", 0x0000, 0x1000, CRC(1082d577) SHA1(0ef73132bd41f6ca1e4c001ae19f7f7c97eaa8d1) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 668115, "svg", 0)
+ ROM_LOAD( "cpacman.svg", 0, 668115, CRC(2fac0f78) SHA1(7fae908ec6137035237beaba01bf14c4a951f433) ) // by kevtris, ver. 1 apr 2015
ROM_END
ROM_START( cpacmanr1 )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a28", 0x0000, 0x1000, CRC(d2ed57e5) SHA1(f56f1341485ac28ea9e6cc4d162fab18d8a4c977) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 668115, "svg", 0)
+ ROM_LOAD( "cpacman.svg", 0, 668115, CRC(2fac0f78) SHA1(7fae908ec6137035237beaba01bf14c4a951f433) ) // by kevtris, ver. 1 apr 2015
ROM_END
@@ -4003,6 +4123,9 @@ ROM_START( cmspacmn )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a61", 0x0000, 0x1000, CRC(76276318) SHA1(9d6ff3f49b4cdaee5c9e238c1ed638bfb9b99aa7) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 849327, "svg", 0)
+ ROM_LOAD( "cmspacmn.svg", 0, 849327, CRC(4110ad07) SHA1(76113a2ce0fb1c6dab4e26fd59a13dc89d950d75) ) // by kevtris, ver. 1 apr 2015
ROM_END
@@ -4042,6 +4165,9 @@ ROM_START( estargte )
ROM_REGION( 0x0200, "audiocpu", 0 )
ROM_LOAD( "cop411l-kec_n", 0x0000, 0x0200, CRC(fbd3c2d3) SHA1(65b8b24d38678c3fa970bfd639e9449a75a28927) )
+
+ ROM_REGION( 462214, "svg", 0)
+ ROM_LOAD( "estargte.svg", 0, 462214, CRC(282cc090) SHA1(b0f3c21e9a529e5f1e33b90ca25ce3a097fb75a0) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -4052,6 +4178,9 @@ ROM_START( eturtles )
ROM_REGION( 0x0200, "audiocpu", 0 )
ROM_LOAD( "cop411l-ked_n", 0x0000, 0x0200, CRC(503d26e9) SHA1(a53d24d62195bfbceff2e4a43199846e0950aef6) )
+
+ ROM_REGION( 1027626, "svg", 0)
+ ROM_LOAD( "eturtles.svg", 0, 1027626, CRC(b4f7abff) SHA1(e9b065a3a3fef3c71495002945724a86c2a68eb4) ) // by kevtris, ver. 30 mar 2015
ROM_END
@@ -4059,6 +4188,9 @@ ROM_START( ghalien )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a04", 0x0000, 0x1000, CRC(019c3328) SHA1(9f1029c5c479f78350952c4f18747341ba5ea7a0) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 462749, "svg", 0)
+ ROM_LOAD( "ghalien.svg", 0, 462749, CRC(1acbb1e8) SHA1(7bdeb840bc9080792e24812eba923bf84f7865a6) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -4066,6 +4198,9 @@ ROM_START( gckong )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800b01", 0x0000, 0x1000, CRC(d5a2cca3) SHA1(37bb5784383daab672ed1e0e2362c7a40d8d9b3f) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 349591, "svg", 0)
+ ROM_LOAD( "gckong.svg", 0, 349591, BAD_DUMP CRC(94b5fcdf) SHA1(a797feb71d18d0320e846eca72a0df92d111ee1e) ) // by kevtris, ver. 25 apr 2016 - BAD_DUMP: needs overlay
ROM_END
@@ -4073,6 +4208,9 @@ ROM_START( gdigdug )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a69", 0x0000, 0x1000, CRC(501165a9) SHA1(8a15d00c4aa66e870cadde33148426463560d2e6) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 807990, "svg", 0)
+ ROM_LOAD( "gdigdug.svg", 0, 807990, CRC(a5b8392d) SHA1(3503829bb1a626a9e70115fb60b656dff8908144) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -4080,6 +4218,9 @@ ROM_START( mwcbaseb )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a09", 0x0000, 0x1000, CRC(25ba7dc0) SHA1(69e0a867fdcf07b454b1faf835e576ae782432c0) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 178441, "svg", 0)
+ ROM_LOAD( "mwcbaseb.svg", 0, 178441, CRC(0f631190) SHA1(74a10ad0630af5516f76d5bf5628483d21f6b7be) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -4087,6 +4228,9 @@ ROM_START( pbqbert )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a70", 0x0000, 0x1000, CRC(be7c80b4) SHA1(0617a80ef7fe188ea221de32e760d45fd4318c67) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 456567, "svg", 0)
+ ROM_LOAD( "pbqbert.svg", 0, 456567, CRC(49853a62) SHA1(869377109fb7163e5ef5efadb26ce3955231f6ca) ) // by kevtris, ver. 30 mar 2015
ROM_END
@@ -4094,6 +4238,9 @@ ROM_START( kingman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800b23", 0x0000, 0x1000, CRC(f8dfe14f) SHA1(660610d92ae7e5f92bddf5a3bcc2296b2ec3946b) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 396320, "svg", 0)
+ ROM_LOAD( "kingman.svg", 0, 396320, CRC(3f52d2a9) SHA1(9291f1a1da3d19c3d6dedb995de0a5feba75b442) ) // by kevtris, ver. 29 mar 2015
ROM_END
@@ -4101,6 +4248,9 @@ ROM_START( tmtron )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a88", 0x0000, 0x1000, CRC(33db9670) SHA1(d6f747a59356526698784047bcfdbb59e79b9a23) )
ROM_CONTINUE( 0x1e80, 0x0100 )
+
+ ROM_REGION( 384174, "svg", 0)
+ ROM_LOAD( "tmtron.svg", 0, 384174, CRC(06bd9e63) SHA1(fb93013ec42dc05f7029ef3c3073c84867f0d077) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -4108,48 +4258,51 @@ ROM_START( vinvader )
ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38750a45", 0x0000, 0x0800, CRC(32de6056) SHA1(70238c6c40c3d513f8eced1cb81bdd4dbe12f16c) )
ROM_CONTINUE( 0x0f00, 0x0080 )
+
+ ROM_REGION( 166379, "svg", 0)
+ ROM_LOAD( "vinvader.svg", 0, 166379, CRC(b75c448e) SHA1(40d546f9fbdb446883e3ab0e3f678f1be8105159) ) // by kevtris, ver. 25 apr 2016
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Dribble Away Basketball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1979, bmboxing, 0, 0, bmboxing, bmboxing, driver_device, 0, "Bambino", "Knock-Em Out Boxing", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Dribble Away Basketball", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, bmboxing, 0, 0, bmboxing, bmboxing, driver_device, 0, "Bambino", "Knock-Em Out Boxing", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, bfriskyt, 0, 0, bfriskyt, bfriskyt, driver_device, 0, "Bandai", "Frisky Tom (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1981, packmon, 0, 0, packmon, packmon, driver_device, 0, "Bandai", "Packri Monster", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, msthawk, 0, 0, msthawk, msthawk, driver_device, 0, "Bandai (Mattel license)", "Star Hawk (Mattel)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1982, bfriskyt, 0, 0, bfriskyt, bfriskyt, driver_device, 0, "Bandai", "Frisky Tom (Bandai)", MACHINE_SUPPORTS_SAVE )
+CONS( 1981, packmon, 0, 0, packmon, packmon, driver_device, 0, "Bandai", "Packri Monster", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, msthawk, 0, 0, msthawk, msthawk, driver_device, 0, "Bandai (Mattel license)", "Star Hawk (Mattel)", MACHINE_SUPPORTS_SAVE )
CONS( 1982, bzaxxon, 0, 0, bzaxxon, bzaxxon, driver_device, 0, "Bandai", "Zaxxon (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, zackman, 0, 0, zackman, zackman, driver_device, 0, "Bandai", "Zackman", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, bpengo, 0, 0, bpengo, bpengo, driver_device, 0, "Bandai", "Pengo (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, bbtime, 0, 0, bbtime, bbtime, driver_device, 0, "Bandai", "Burger Time (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, bdoramon, 0, 0, bdoramon, bdoramon, driver_device, 0, "Bandai", "Dokodemo Dorayaki Doraemon", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, bultrman, 0, 0, bultrman, bultrman, driver_device, 0, "Bandai", "Ultraman Monster Battle", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1984, machiman, 0, 0, machiman, machiman, driver_device, 0, "Bandai", "Machine Man", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1983, zackman, 0, 0, zackman, zackman, driver_device, 0, "Bandai", "Zackman", MACHINE_SUPPORTS_SAVE )
+CONS( 1983, bpengo, 0, 0, bpengo, bpengo, driver_device, 0, "Bandai", "Pengo (Bandai)", MACHINE_SUPPORTS_SAVE )
+CONS( 1983, bbtime, 0, 0, bbtime, bbtime, driver_device, 0, "Bandai", "Burger Time (Bandai)", MACHINE_SUPPORTS_SAVE )
+CONS( 1983, bdoramon, 0, 0, bdoramon, bdoramon, driver_device, 0, "Bandai", "Dokodemo Dorayaki Doraemon", MACHINE_SUPPORTS_SAVE )
+CONS( 1983, bultrman, 0, 0, bultrman, bultrman, driver_device, 0, "Bandai", "Ultraman Monster Battle", MACHINE_SUPPORTS_SAVE )
+CONS( 1984, machiman, 0, 0, machiman, machiman, driver_device, 0, "Bandai", "Machine Man", MACHINE_SUPPORTS_SAVE )
CONS( 1984, pairmtch, 0, 0, pairmtch, pairmtch, driver_device, 0, "Bandai", "Pair Match", MACHINE_SUPPORTS_SAVE )
-CONS( 1981, alnattck, 0, 0, alnattck, alnattck, driver_device, 0, "Coleco", "Alien Attack", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1981, alnattck, 0, 0, alnattck, alnattck, driver_device, 0, "Coleco", "Alien Attack", MACHINE_SUPPORTS_SAVE )
CONS( 1982, cdkong, 0, 0, cdkong, cdkong, driver_device, 0, "Coleco", "Donkey Kong (Coleco)", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_IMPERFECT_SOUND )
-CONS( 1981, cpacman, 0, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 29)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 28)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, driver_device, 0, "Coleco", "Ms. Pac-Man (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
+CONS( 1981, cpacman, 0, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 29)", MACHINE_SUPPORTS_SAVE )
+CONS( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 28)", MACHINE_SUPPORTS_SAVE )
+CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, driver_device, 0, "Coleco", "Ms. Pac-Man (Coleco)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, egalaxn2, 0, 0, egalaxn2, egalaxn2, driver_device, 0, "Entex", "Galaxian 2 (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, epacman2, 0, 0, epacman2, epacman2, driver_device, 0, "Entex", "Pac Man 2 (Entex, cyan Pacman)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, epacman2r, epacman2, 0, epacman2, epacman2, driver_device, 0, "Entex", "Pac Man 2 (Entex, red Pacman)", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, estargte, 0, 0, estargte, estargte, driver_device, 0, "Entex", "Stargate (Entex)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, eturtles, 0, 0, eturtles, eturtles, driver_device, 0, "Entex", "Turtles (Entex)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1982, estargte, 0, 0, estargte, estargte, driver_device, 0, "Entex", "Stargate (Entex)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, eturtles, 0, 0, eturtles, eturtles, driver_device, 0, "Entex", "Turtles (Entex)", MACHINE_SUPPORTS_SAVE )
-CONS( 1980, ghalien, 0, 0, ghalien, ghalien, driver_device, 0, "Gakken", "Heiankyo Alien (Gakken)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, gckong, 0, 0, gckong, gckong, driver_device, 0, "Gakken", "Crazy Kong (Gakken)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
-CONS( 1983, gdigdug, 0, 0, gdigdug, gdigdug, driver_device, 0, "Gakken", "Dig Dug (Gakken)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1980, ghalien, 0, 0, ghalien, ghalien, driver_device, 0, "Gakken", "Heiankyo Alien (Gakken)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, gckong, 0, 0, gckong, gckong, driver_device, 0, "Gakken", "Crazy Kong (Gakken)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+CONS( 1983, gdigdug, 0, 0, gdigdug, gdigdug, driver_device, 0, "Gakken", "Dig Dug (Gakken)", MACHINE_SUPPORTS_SAVE )
-CONS( 1980, mwcbaseb, 0, 0, mwcbaseb, mwcbaseb, driver_device, 0, "Mattel", "World Championship Baseball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1980, mwcbaseb, 0, 0, mwcbaseb, mwcbaseb, driver_device, 0, "Mattel", "World Championship Baseball", MACHINE_SUPPORTS_SAVE )
-CONS( 1983, pbqbert, 0, 0, pbqbert, pbqbert, driver_device, 0, "Parker Brothers", "Q*Bert (Parker Brothers)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1983, pbqbert, 0, 0, pbqbert, pbqbert, driver_device, 0, "Parker Brothers", "Q*Bert (Parker Brothers)", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, kingman, 0, 0, kingman, kingman, driver_device, 0, "Tomy", "Kingman", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1984, tmtron, 0, 0, tmtron, tmtron, driver_device, 0, "Tomy", "Tron (Tomy)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1982, kingman, 0, 0, kingman, kingman, driver_device, 0, "Tomy", "Kingman", MACHINE_SUPPORTS_SAVE )
+CONS( 1984, tmtron, 0, 0, tmtron, tmtron, driver_device, 0, "Tomy", "Tron (Tomy)", MACHINE_SUPPORTS_SAVE )
-CONS( 1981, vinvader, 0, 0, vinvader, vinvader, driver_device, 0, "VTech", "Invaders (VTech)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1981, vinvader, 0, 0, vinvader, vinvader, driver_device, 0, "VTech", "Invaders (VTech)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp
index 9b1d75c737b..e4516359c55 100644
--- a/src/mame/drivers/hh_melps4.cpp
+++ b/src/mame/drivers/hh_melps4.cpp
@@ -8,10 +8,11 @@
***************************************************************************/
#include "emu.h"
+#include "rendlay.h"
#include "cpu/melps4/m58846.h"
#include "sound/speaker.h"
-#include "hh_melps4_test.lh" // common test-layout - use external artwork
+#include "hh_melps4_test.lh" // common test-layout - no svg artwork(yet), use external artwork
class hh_melps4_state : public driver_device
@@ -225,8 +226,6 @@ INPUT_CHANGED_MEMBER(hh_melps4_state::reset_button)
* Mitsubishi M58846-701P MCU
* cyan/red/green VFD display Itron CP5090GLR R1B, with partial color overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class cfrogger_state : public hh_melps4_state
@@ -304,7 +303,7 @@ static INPUT_PORTS_START( cfrogger )
PORT_CONFSETTING( 0x08, "2" )
PORT_START("IN.3") // fake
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_melps4_state, reset_button, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_melps4_state, reset_button, nullptr)
INPUT_PORTS_END
static MACHINE_CONFIG_START( cfrogger, cfrogger_state )
@@ -318,8 +317,13 @@ static MACHINE_CONFIG_START( cfrogger, cfrogger_state )
MCFG_MELPS4_WRITE_D_CB(WRITE16(cfrogger_state, grid_w))
MCFG_MELPS4_WRITE_T_CB(WRITELINE(cfrogger_state, speaker_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(449, 970)
+ MCFG_SCREEN_VISIBLE_AREA(0, 449-1, 0, 970-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_melps4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_melps4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -338,8 +342,6 @@ MACHINE_CONFIG_END
* Mitsubishi M58846-702P MCU
* cyan/red/green VFD display Itron CP5143GLR SGA, with light-yellow color overlay
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class gjungler_state : public hh_melps4_state
@@ -417,7 +419,7 @@ static INPUT_PORTS_START( gjungler )
PORT_CONFSETTING( 0x08, "B" )
PORT_START("IN.3") // fake
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_melps4_state, reset_button, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_melps4_state, reset_button, nullptr)
INPUT_PORTS_END
static MACHINE_CONFIG_START( gjungler, gjungler_state )
@@ -432,8 +434,13 @@ static MACHINE_CONFIG_START( gjungler, gjungler_state )
MCFG_MELPS4_WRITE_D_CB(WRITE16(gjungler_state, grid_w))
MCFG_MELPS4_WRITE_T_CB(WRITELINE(gjungler_state, speaker_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(445, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 445-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_melps4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_melps4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -454,17 +461,23 @@ MACHINE_CONFIG_END
ROM_START( cfrogger )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "m58846-701p", 0x0000, 0x1000, CRC(ba52a242) SHA1(7fa53b617f4bb54be32eb209e9b88131e11cb518) )
+
+ ROM_REGION( 786255, "svg", 0)
+ ROM_LOAD( "cfrogger.svg", 0, 786255, CRC(d8d6e2b6) SHA1(bc9a0260b211ed07021dfe1cc19a993569f4c544) ) // by kevtris, ver. 19 may 2015
ROM_END
ROM_START( gjungler )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "m58846-702p", 0x0000, 0x1000, CRC(94ab7060) SHA1(3389bc115d1df8d01a30611fa9e95a900d32b29b) )
+
+ ROM_REGION( 419696, "svg", 0)
+ ROM_LOAD( "gjungler.svg", 0, 419696, CRC(c5f6d1f2) SHA1(5032f35326ca689c8e329f760e380cdc9f5dff86) ) // by hap/kevtris, ver. 25 apr 2016
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-CONS( 1981, cfrogger, 0, 0, cfrogger, cfrogger, driver_device, 0, "Coleco", "Frogger (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1981, cfrogger, 0, 0, cfrogger, cfrogger, driver_device, 0, "Coleco", "Frogger (Coleco)", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, gjungler, 0, 0, gjungler, gjungler, driver_device, 0, "Gakken / Konami", "Jungler (Gakken)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1982, gjungler, 0, 0, gjungler, gjungler, driver_device, 0, "Gakken / Konami", "Jungler (Gakken)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp
index 7a3e1d622a1..f775a1751dd 100644
--- a/src/mame/drivers/hh_sm510.cpp
+++ b/src/mame/drivers/hh_sm510.cpp
@@ -192,19 +192,19 @@ WRITE8_MEMBER(ktopgun_state::speaker_w)
static INPUT_PORTS_START( ktopgun )
PORT_START("IN.0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_START("IN.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Sound")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_START("IN.2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@@ -253,24 +253,24 @@ public:
static INPUT_PORTS_START( ktmnt )
PORT_START("IN.0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_START("IN.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Game Select")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("On/Start")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Game Select")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Sound")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("On/Start")
//Wouldn't be better if IPT_START for "On/Start" was used???
//Well, this here is a very preliminary driver, nothing final yet. How about some tea???
PORT_START("IN.2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
INPUT_PORTS_END
static MACHINE_CONFIG_START( ktmnt, ktmnt_state )
@@ -318,15 +318,15 @@ public:
static INPUT_PORTS_START( kgradius )
PORT_START("IN.0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Sound")
PORT_START("IN.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@@ -375,16 +375,16 @@ public:
static INPUT_PORTS_START( kloneran )
PORT_START("IN.0") // S3?
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_START("IN.1") // S2?
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Sound")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) PORT_NAME("Pause")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Sound")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Pause")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
INPUT_PORTS_END
static MACHINE_CONFIG_START( kloneran, kloneran_state )
@@ -441,16 +441,16 @@ WRITE8_MEMBER(gnwmndon_state::speaker_w)
static INPUT_PORTS_START( gnwmndon )
PORT_START("IN.0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_START("IN.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) // time
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) // b
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) // a
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, NULL) // alarm
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) // time
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) // b
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) // a
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) // alarm
INPUT_PORTS_END
static MACHINE_CONFIG_START( gnwmndon, gnwmndon_state )
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index e5c3c22354e..88e4c6e4922 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -1166,7 +1166,7 @@ static INPUT_PORTS_START( h2hbaseb )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing")
PORT_START("IN.5") // fake
- PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, NULL)
+ PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, nullptr)
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x01, "2" )
INPUT_PORTS_END
@@ -2016,7 +2016,7 @@ static INPUT_PORTS_START( ebball3 )
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN.3") // fake
- PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, ebball3_state, skill_switch, NULL)
+ PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, ebball3_state, skill_switch, nullptr)
PORT_CONFSETTING( 0x00, "Amateur" )
PORT_CONFSETTING( 0x01, "Professional" )
INPUT_PORTS_END
@@ -2130,7 +2130,7 @@ static INPUT_PORTS_START( einvader )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
- PORT_CONFNAME( 0x08, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, einvader_state, skill_switch, NULL)
+ PORT_CONFNAME( 0x08, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, einvader_state, skill_switch, nullptr)
PORT_CONFSETTING( 0x00, "Amateur" )
PORT_CONFSETTING( 0x08, "Professional" )
INPUT_PORTS_END
@@ -2507,7 +2507,7 @@ static INPUT_PORTS_START( raisedvl )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN.1") // R1 (only bit 0)
- PORT_CONFNAME( 0x31, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, raisedvl_state, skill_switch, NULL)
+ PORT_CONFNAME( 0x31, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, raisedvl_state, skill_switch, nullptr)
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x10, "2" )
PORT_CONFSETTING( 0x11, "3" )
@@ -3814,7 +3814,7 @@ static INPUT_PORTS_START( ssimon )
PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN.6") // fake
- PORT_CONFNAME( 0x03, 0x01, "Speed" ) PORT_CHANGED_MEMBER(DEVICE_SELF, ssimon_state, speed_switch, NULL)
+ PORT_CONFNAME( 0x03, 0x01, "Speed" ) PORT_CHANGED_MEMBER(DEVICE_SELF, ssimon_state, speed_switch, nullptr)
PORT_CONFSETTING( 0x00, "Simple" )
PORT_CONFSETTING( 0x01, "Normal" )
PORT_CONFSETTING( 0x02, "Super" )
@@ -5277,7 +5277,7 @@ static INPUT_PORTS_START( tbreakup )
PORT_CONFSETTING( 0x04, "5" )
PORT_START("IN.3") // fake
- PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, tbreakup_state, skill_switch, NULL)
+ PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, tbreakup_state, skill_switch, nullptr)
PORT_CONFSETTING( 0x00, "Pro 1" )
PORT_CONFSETTING( 0x01, "Pro 2" )
INPUT_PORTS_END
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index 2ea7f8a51ff..5b07433d5ac 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -74,7 +74,7 @@ TODO:
#include "mvbfree.lh"
#include "tactix.lh" // clickable
-#include "hh_ucom4_test.lh" // common test-layout - use external artwork
+#include "hh_ucom4_test.lh" // common test-layout - no svg artwork(yet), use external artwork
// machine start/reset
@@ -246,8 +246,6 @@ UINT8 hh_ucom4_state::read_inputs(int columns)
- Japan: "Missile Guerilla Warfare Maneuvers", published by Tomy
- World: UFO Master-Blaster Station
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class ufombs_state : public hh_ucom4_state
@@ -328,8 +326,13 @@ static MACHINE_CONFIG_START( ufombs, ufombs_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(ufombs_state, grid_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(ufombs_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(225, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 225-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -355,8 +358,6 @@ MACHINE_CONFIG_END
Then choose a formation(A,B,C) and either pass the ball, and/or start
running. For more information, refer to the official manual.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class ssfball_state : public hh_ucom4_state
@@ -471,8 +472,13 @@ static MACHINE_CONFIG_START( ssfball, ssfball_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(ssfball_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(ssfball_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 251)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 251-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -496,8 +502,6 @@ MACHINE_CONFIG_END
player 1 presses one of the directional keys. In 2-player mode, player 2
controls the goalkeeper, defensive players are still controlled by the CPU.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bmsoccer_state : public hh_ucom4_state
@@ -596,8 +600,13 @@ static MACHINE_CONFIG_START( bmsoccer, bmsoccer_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(bmsoccer_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(bmsoccer_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(251, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 251-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -616,8 +625,6 @@ MACHINE_CONFIG_END
* NEC uCOM-44 MCU, label EMIX D552C 049
* cyan VFD display Emix-108
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bmsafari_state : public hh_ucom4_state
@@ -700,8 +707,13 @@ static MACHINE_CONFIG_START( bmsafari, bmsafari_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(bmsafari_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(bmsafari_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(230, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 230-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -723,8 +735,6 @@ MACHINE_CONFIG_END
This is basically a revamp of their earlier Boxing game (ET-06), case and
buttons are exactly the same.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class splasfgt_state : public hh_ucom4_state
@@ -848,8 +858,13 @@ static MACHINE_CONFIG_START( splasfgt, splasfgt_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(splasfgt_state, grid_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(splasfgt_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 248)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 248-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -873,8 +888,6 @@ MACHINE_CONFIG_END
- Japan: FL Crazy Climbing
- USA: Crazy Climber
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class bcclimbr_state : public hh_ucom4_state
@@ -949,8 +962,13 @@ static MACHINE_CONFIG_START( bcclimbr, bcclimbr_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(bcclimbr_state, grid_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(bcclimbr_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(287, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 287-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -975,8 +993,6 @@ MACHINE_CONFIG_END
3: Triple Play (3 in a row)
4: Concentration (memory)
- note: MAME external artwork is not needed for this game
-
***************************************************************************/
class tactix_state : public hh_ucom4_state
@@ -1090,8 +1106,6 @@ MACHINE_CONFIG_END
- USA: Invader From Space
- UK: Invader From Space, published by Grandstand
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class invspace_state : public hh_ucom4_state
@@ -1165,8 +1179,13 @@ static MACHINE_CONFIG_START( invspace, invspace_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(invspace_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(invspace_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(268, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 268-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1304,8 +1323,6 @@ MACHINE_CONFIG_END
- Japan: Astro Wars
- UK: Astro Wars, published by Grandstand
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class galaxy2_state : public hh_ucom4_state
@@ -1379,8 +1396,13 @@ static MACHINE_CONFIG_START( galaxy2, galaxy2_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(galaxy2_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(galaxy2_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(281, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 281-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1388,6 +1410,14 @@ static MACHINE_CONFIG_START( galaxy2, galaxy2_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( galaxy2b, galaxy2 )
+
+ /* video hardware */
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_SIZE(283, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 283-2, 0, 1000-1)
+MACHINE_CONFIG_END
+
@@ -1404,8 +1434,6 @@ MACHINE_CONFIG_END
- USA: Astro Command, published by Tandy
- UK: Scramble, published by Grandstand
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class astrocmd_state : public hh_ucom4_state
@@ -1486,8 +1514,13 @@ static MACHINE_CONFIG_START( astrocmd, astrocmd_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(astrocmd_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(astrocmd_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 273)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 273-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1511,8 +1544,6 @@ MACHINE_CONFIG_END
- USA: Dracula, red case
- Other: Dracula, yellow case, published by Hales
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class edracula_state : public hh_ucom4_state
@@ -1579,8 +1610,13 @@ static MACHINE_CONFIG_START( edracula, edracula_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(edracula_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(edracula_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 274)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 274-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1781,8 +1817,6 @@ MACHINE_CONFIG_END
- USA: Cosmic Combat
- Japan: Space Attack
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class tccombat_state : public hh_ucom4_state
@@ -1852,8 +1886,13 @@ static MACHINE_CONFIG_START( tccombat, tccombat_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(tccombat_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(tccombat_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(278, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 278-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -1878,8 +1917,6 @@ MACHINE_CONFIG_END
Press the Serve button to start, then hit the ball by pressing one of the
positional buttons when the ball flies over it.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class tmtennis_state : public hh_ucom4_state
@@ -1959,7 +1996,7 @@ static INPUT_PORTS_START( tmtennis )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("P1 Button 6")
PORT_START("IN.1") // E1 port A/B
- PORT_CONFNAME( 0x101, 0x100, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtennis_state, difficulty_switch, NULL)
+ PORT_CONFNAME( 0x101, 0x100, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtennis_state, difficulty_switch, nullptr)
PORT_CONFSETTING( 0x001, "Practice" )
PORT_CONFSETTING( 0x100, "Pro 1" ) // -> difficulty_switch
PORT_CONFSETTING( 0x000, "Pro 2" )
@@ -2008,8 +2045,13 @@ static MACHINE_CONFIG_START( tmtennis, tmtennis_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(tmtennis_state, grid_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(tmtennis_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 217)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 217-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2038,8 +2080,6 @@ MACHINE_CONFIG_END
The game will start automatically after turning it on. This Pac Man refuses
to eat dots with his butt, you can only eat them going right-to-left.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class tmpacman_state : public hh_ucom4_state
@@ -2114,8 +2154,13 @@ static MACHINE_CONFIG_START( tmpacman, tmpacman_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(tmpacman_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(tmpacman_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 265)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 265-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2140,8 +2185,6 @@ MACHINE_CONFIG_END
- UK: Astro Blaster, published by Hales (Epoch Astro Command was named Scramble)
- Germany: Rambler
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class tmscramb_state : public hh_ucom4_state
@@ -2214,8 +2257,13 @@ static MACHINE_CONFIG_START( tmscramb, tmscramb_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(tmscramb_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(tmscramb_state, grid_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 289)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 289-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2239,8 +2287,6 @@ MACHINE_CONFIG_END
- USA: Caveman, published by Tandy
- UK: Cave Man - Jr. Caveman vs Dinosaur, published by Grandstand
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class tcaveman_state : public hh_ucom4_state
@@ -2310,8 +2356,13 @@ static MACHINE_CONFIG_START( tcaveman, tcaveman_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(tcaveman_state, plate_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(tcaveman_state, plate_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(1000, 291)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1000-1, 0, 291-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2336,8 +2387,6 @@ MACHINE_CONFIG_END
To start the game, simply press [UP]. Hold a joystick direction to move around.
- NOTE!: MAME external artwork is required
-
***************************************************************************/
class alnchase_state : public hh_ucom4_state
@@ -2440,8 +2489,13 @@ static MACHINE_CONFIG_START( alnchase, alnchase_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(alnchase_state, output_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(alnchase_state, output_w))
+ /* video hardware */
+ MCFG_SCREEN_SVG_ADD("screen", "svg")
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_SIZE(338, 1000)
+ MCFG_SCREEN_VISIBLE_AREA(0, 338-1, 0, 1000-1)
+ MCFG_DEFAULT_LAYOUT(layout_svg)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2462,36 +2516,54 @@ MACHINE_CONFIG_END
ROM_START( ufombs )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "d552c-017", 0x0000, 0x0400, CRC(0e208cb3) SHA1(57db6566916c94325e2b67ccb94b4ea3b233487d) )
+
+ ROM_REGION( 222395, "svg", 0)
+ ROM_LOAD( "ufombs.svg", 0, 222395, CRC(ae9fb93f) SHA1(165ea78eee93c503dbd277a56c41e3c63c534e38) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( ssfball )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-031", 0x0000, 0x0800, CRC(ff5d91d0) SHA1(9b2c0ae45f1e3535108ee5fef8a9010e00c8d5c3) )
+
+ ROM_REGION( 330197, "svg", 0)
+ ROM_LOAD( "ssfball.svg", 0, 330197, CRC(cde0d483) SHA1(99d218aab4bb42e97194fdc38e9a0efbcde082de) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( bmsoccer )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "d552c-043", 0x0000, 0x0400, CRC(10c2a4ea) SHA1(6ebca7d406e22ff7a8cd529579b55a700da487b4) )
+
+ ROM_REGION( 273804, "svg", 0)
+ ROM_LOAD( "bmsoccer.svg", 0, 273804, CRC(29525b4a) SHA1(2f59d3ed59923a834b7ddcdfb9d61a9818196f2e) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( bmsafari )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "d552c-049", 0x0000, 0x0400, CRC(82fa3cbe) SHA1(019e7ec784e977eba09997fc46af253054fb222c) )
+
+ ROM_REGION( 273889, "svg", 0)
+ ROM_LOAD( "bmsafari.svg", 0, 273889, CRC(c61e26b3) SHA1(467db0396d350fddb46ecf2b1ad60501013c5dff) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( splasfgt )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-055", 0x0000, 0x0800, CRC(eb471fbd) SHA1(f06cfe567bf6f9ed4dcdc88acdcfad50cd370a02) )
+
+ ROM_REGION( 246609, "svg", 0)
+ ROM_LOAD( "splasfgt.svg", 0, 246609, CRC(365fae43) SHA1(344c120c2efa92ada9171047affac801a06cf303) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( bcclimbr )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-170", 0x0000, 0x0800, CRC(fc2eabdb) SHA1(0f5cc854be7fdf105d9bd2114659d40c65f9d782) )
+
+ ROM_REGION( 219971, "svg", 0)
+ ROM_LOAD( "bcclimbr.svg", 0, 219971, CRC(9c9102f4) SHA1(6a7e02fd1467a26c734b01724e23cef9e4917805) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -2504,6 +2576,9 @@ ROM_END
ROM_START( invspace )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "d552c-054", 0x0000, 0x0400, CRC(913d9c13) SHA1(f20edb5458e54d2f6d4e45e5d59efd87e05a6f3f) )
+
+ ROM_REGION( 110899, "svg", 0)
+ ROM_LOAD( "invspace.svg", 0, 110899, CRC(ae794333) SHA1(3552215389f02e4ef1d608f7dfc84f0499a78ee2) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -2516,18 +2591,35 @@ ROM_END
ROM_START( galaxy2 )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-153.s01", 0x0000, 0x0800, CRC(70d552b3) SHA1(72d50647701cb4bf85ea947a149a317aaec0f52c) )
+
+ ROM_REGION( 325057, "svg", 0)
+ ROM_LOAD( "galaxy2d.svg", 0, 325057, CRC(b2d27a0e) SHA1(502ec22c324903ffe8ff235b9a3b8898dce17a64) ) // by kevtris, ver. 25 apr 2016
+ROM_END
+
+ROM_START( galaxy2b )
+ ROM_REGION( 0x0800, "maincpu", 0 )
+ ROM_LOAD( "d553c-153.s01", 0x0000, 0x0800, CRC(70d552b3) SHA1(72d50647701cb4bf85ea947a149a317aaec0f52c) )
+
+ ROM_REGION( 266377, "svg", 0)
+ ROM_LOAD( "galaxy2b.svg", 0, 266377, CRC(8633cebb) SHA1(6c41f5e918e1522eb55ef24270900a1b2477722b) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( astrocmd )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-202.s01", 0x0000, 0x0800, CRC(b4b34883) SHA1(6246d561c2df1f2124575d2ca671ef85b1819edd) )
+
+ ROM_REGION( 335362, "svg", 0)
+ ROM_LOAD( "astrocmd.svg", 0, 335362, CRC(fe2cd30f) SHA1(898a3d9afc5dca6c63ae28aed2c8530716ad1c45) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( edracula )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-206.s01", 0x0000, 0x0800, CRC(b524857b) SHA1(c1c89ed5dd4bb1e6e98462dc8fa5af2aa48d8ede) )
+
+ ROM_REGION( 794532, "svg", 0)
+ ROM_LOAD( "edracula.svg", 0, 794532, CRC(d20e018c) SHA1(7f70f1d373c034ec8c93e27b7e3371578ddaf61b) ) // by kevtris, ver. 25 apr 2016
ROM_END
@@ -2546,64 +2638,83 @@ ROM_END
ROM_START( tccombat )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "d552c-042", 0x0000, 0x0400, CRC(d7b5cfeb) SHA1(a267be8e43b7740758eb0881b655b1cc8aec43da) )
+
+ ROM_REGION( 210960, "svg", 0)
+ ROM_LOAD( "tccombat.svg", 0, 210960, CRC(03e9eba6) SHA1(d558d3063da42dc7cc02b769bca06a3732418837) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( tmtennis )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "d552c-048", 0x0000, 0x0400, CRC(78702003) SHA1(4d427d4dbeed901770c682338867f58c7b54eee3) )
+
+ ROM_REGION( 203979, "svg", 0)
+ ROM_LOAD( "tmtennis.svg", 0, 203979, BAD_DUMP CRC(4679487c) SHA1(845e961e309fa9e52c4a856b3e7f5cecd1173a1b) ) // by kevtris, ver. 25 apr 2016 - BAD_DUMP: needs overlay
ROM_END
ROM_START( tmpacman )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-160", 0x0000, 0x0800, CRC(b21a8af7) SHA1(e3122be1873ce76a4067386bf250802776f0c2f9) )
+
+ ROM_REGION( 230216, "svg", 0)
+ ROM_LOAD( "tmpacman.svg", 0, 230216, CRC(2ab5c0f1) SHA1(b2b6482b03c28515dc76fd3d6034c8b7e6bf6efc) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( tmscramb )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-192", 0x0000, 0x0800, CRC(00fcc501) SHA1(a7771e934bf8268c83f38c7ec0acc668836e0939) )
+
+ ROM_REGION( 235601, "svg", 0)
+ ROM_LOAD( "tmscramb.svg", 0, 235601, CRC(9e76219a) SHA1(275273b98d378c9313dd73a3b86cc661a824b7af) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( tcaveman )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-209", 0x0000, 0x0800, CRC(d230d4b7) SHA1(2fb12b60410f5567c5e3afab7b8f5aa855d283be) )
+
+ ROM_REGION( 306952, "svg", 0)
+ ROM_LOAD( "tcaveman.svg", 0, 306952, CRC(a0588b14) SHA1(f67edf579963fc19bc7f9d268329cbc0230712d8) ) // by kevtris, ver. 25 apr 2016
ROM_END
ROM_START( alnchase )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-258", 0x0000, 0x0800, CRC(c5284ff5) SHA1(6a20aaacc9748f0e0335958f3cea482e36153704) )
+
+ ROM_REGION( 576864, "svg", 0)
+ ROM_LOAD( "alnchase.svg", 0, 576864, CRC(fe7c7078) SHA1(0d201eeaeb291ded14c0759d1d3d5b2491cf0792) ) // by kevtris, ver. 25 apr 2016
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-CONS( 1979, ufombs, 0, 0, ufombs, ufombs, driver_device, 0, "Bambino", "UFO Master-Blaster Station", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1979, ssfball, 0, 0, ssfball, ssfball, driver_device, 0, "Bambino", "Superstar Football", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1979, bmsoccer, 0, 0, bmsoccer, bmsoccer, driver_device, 0, "Bambino", "Kick The Goal Soccer", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1981, bmsafari, 0, 0, bmsafari, bmsafari, driver_device, 0, "Bambino", "Safari (Bambino)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1980, splasfgt, 0, 0, splasfgt, splasfgt, driver_device, 0, "Bambino", "Space Laser Fight", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1979, ufombs, 0, 0, ufombs, ufombs, driver_device, 0, "Bambino", "UFO Master-Blaster Station", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, ssfball, 0, 0, ssfball, ssfball, driver_device, 0, "Bambino", "Superstar Football", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, bmsoccer, 0, 0, bmsoccer, bmsoccer, driver_device, 0, "Bambino", "Kick The Goal Soccer", MACHINE_SUPPORTS_SAVE )
+CONS( 1981, bmsafari, 0, 0, bmsafari, bmsafari, driver_device, 0, "Bambino", "Safari (Bambino)", MACHINE_SUPPORTS_SAVE )
+CONS( 1980, splasfgt, 0, 0, splasfgt, splasfgt, driver_device, 0, "Bambino", "Space Laser Fight", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, bcclimbr, 0, 0, bcclimbr, bcclimbr, driver_device, 0, "Bandai", "Crazy Climber (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1982, bcclimbr, 0, 0, bcclimbr, bcclimbr, driver_device, 0, "Bandai", "Crazy Climber (Bandai)", MACHINE_SUPPORTS_SAVE )
CONS( 1980, tactix, 0, 0, tactix, tactix, driver_device, 0, "Castle Toy", "Tactix (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1980, invspace, 0, 0, invspace, invspace, driver_device, 0, "Epoch", "Invader From Space", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1980, invspace, 0, 0, invspace, invspace, driver_device, 0, "Epoch", "Invader From Space", MACHINE_SUPPORTS_SAVE )
CONS( 1980, efball, 0, 0, efball, efball, driver_device, 0, "Epoch", "Electronic Football (Epoch)", MACHINE_SUPPORTS_SAVE )
-CONS( 1981, galaxy2, 0, 0, galaxy2, galaxy2, driver_device, 0, "Epoch", "Galaxy II", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, astrocmd, 0, 0, astrocmd, astrocmd, driver_device, 0, "Epoch", "Astro Command", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1981, galaxy2, 0, 0, galaxy2, galaxy2, driver_device, 0, "Epoch", "Galaxy II (VFD Rev. D)", MACHINE_SUPPORTS_SAVE )
+CONS( 1981, galaxy2b, galaxy2, 0, galaxy2b, galaxy2, driver_device, 0, "Epoch", "Galaxy II (VFD Rev. B)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, astrocmd, 0, 0, astrocmd, astrocmd, driver_device, 0, "Epoch", "Astro Command", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", MACHINE_SUPPORTS_SAVE )
CONS( 1979, mcompgin, 0, 0, mcompgin, mcompgin, driver_device, 0, "Mattel", "Computer Gin", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
CONS( 1979, mvbfree, 0, 0, mvbfree, mvbfree, driver_device, 0, "Mego", "Mini-Vid Break Free", MACHINE_SUPPORTS_SAVE )
-CONS( 1980, tccombat, 0, 0, tccombat, tccombat, driver_device, 0, "Tomy", "Cosmic Combat", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomy)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, tmpacman, 0, 0, tmpacman, tmpacman, driver_device, 0, "Tomy", "Pac Man (Tomy)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, tmscramb, 0, 0, tmscramb, tmscramb, driver_device, 0, "Tomy", "Scramble (Tomy)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1982, tcaveman, 0, 0, tcaveman, tcaveman, driver_device, 0, "Tomy", "Caveman (Tomy)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1980, tccombat, 0, 0, tccombat, tccombat, driver_device, 0, "Tomy", "Cosmic Combat", MACHINE_SUPPORTS_SAVE )
+CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomy)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, tmpacman, 0, 0, tmpacman, tmpacman, driver_device, 0, "Tomy", "Pac Man (Tomy)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, tmscramb, 0, 0, tmscramb, tmscramb, driver_device, 0, "Tomy", "Scramble (Tomy)", MACHINE_SUPPORTS_SAVE )
+CONS( 1982, tcaveman, 0, 0, tcaveman, tcaveman, driver_device, 0, "Tomy", "Caveman (Tomy)", MACHINE_SUPPORTS_SAVE )
+CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/hng64.cpp b/src/mame/drivers/hng64.cpp
index 6bb798cb805..083f4dc2228 100644
--- a/src/mame/drivers/hng64.cpp
+++ b/src/mame/drivers/hng64.cpp
@@ -1129,10 +1129,10 @@ static INPUT_PORTS_START( roadedge )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Shift Up")
PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Shift Down")
- PORT_BIT( 0x00000400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, left_handle_r, NULL)
- PORT_BIT( 0x00000800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, right_handle_r, NULL)
- PORT_BIT( 0x00001000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, acc_down_r, NULL)
- PORT_BIT( 0x00002000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, brake_down_r, NULL)
+ PORT_BIT( 0x00000400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, left_handle_r, nullptr)
+ PORT_BIT( 0x00000800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, right_handle_r, nullptr)
+ PORT_BIT( 0x00001000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, acc_down_r, nullptr)
+ PORT_BIT( 0x00002000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hng64_state, brake_down_r, nullptr)
PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
diff --git a/src/mame/drivers/homerun.cpp b/src/mame/drivers/homerun.cpp
index 65b3c851fb4..15781d0e213 100644
--- a/src/mame/drivers/homerun.cpp
+++ b/src/mame/drivers/homerun.cpp
@@ -148,8 +148,8 @@ CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
static INPUT_PORTS_START( homerun )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, nullptr)
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@@ -185,7 +185,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dynashot )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // doesn't have d7756
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -223,8 +223,8 @@ static INPUT_PORTS_START( ganjaja )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_d7756_busy_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_d7756_busy_r, nullptr)
PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@@ -232,7 +232,7 @@ static INPUT_PORTS_START( ganjaja )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P1 Down / Paper")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P1 Right / Scissors")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) // unused?
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_hopper_status_r, NULL)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_hopper_status_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp
index 8a0badd1c4b..01d9ba0fa0d 100644
--- a/src/mame/drivers/horizon.cpp
+++ b/src/mame/drivers/horizon.cpp
@@ -169,7 +169,7 @@ static MACHINE_CONFIG_START( horizon, horizon_state )
// S-100
MCFG_S100_BUS_ADD()
MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
- //MCFG_S100_SLOT_ADD("s100_1", horizon_s100_cards, NULL, NULL) // CPU
+ //MCFG_S100_SLOT_ADD("s100_1", horizon_s100_cards, nullptr, nullptr) // CPU
MCFG_S100_SLOT_ADD("s100_2", horizon_s100_cards, nullptr) // RAM
MCFG_S100_SLOT_ADD("s100_3", horizon_s100_cards, "mdsad") // MDS
MCFG_S100_SLOT_ADD("s100_4", horizon_s100_cards, nullptr) // FPB
diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp
index 4890b0ad92e..9353ab4ed48 100644
--- a/src/mame/drivers/hp9845.cpp
+++ b/src/mame/drivers/hp9845.cpp
@@ -18,22 +18,22 @@
// - Text mode screen
// - Keyboard
// - T15 tape drive
+// - Software list to load optional ROMs
// What's not yet in:
// - Beeper
// - Graphic screen
// - Better naming of tape drive image (it's now "magt", should be "t15")
// - Better documentation of this file
-// - Software list to load optional ROMs
// What's wrong:
// - I'm using character generator from HP64K (another driver of mine): no known dump of the original one
// - Speed, as usual
-// - There are a couple of undocumented opcodes that PPU executes at each keyboard interrupt: don't know if ignoring them is a Bad Thing (tm) or not
#include "emu.h"
#include "cpu/z80/z80.h"
#include "softlist.h"
#include "cpu/hphybrid/hphybrid.h"
#include "machine/hp_taco.h"
+#include "bus/hp_optroms/hp_optrom.h"
#define BIT_MASK(n) (1U << (n))
@@ -674,7 +674,6 @@ static ADDRESS_MAP_START(global_mem_map , AS_PROGRAM , 16 , hp9845b_state)
AM_RANGE(0x014000 , 0x017fff) AM_RAM AM_SHARE("ppu_ram")
AM_RANGE(0x030000 , 0x037fff) AM_ROM AM_REGION("lpu" , 0)
AM_RANGE(0x050000 , 0x057fff) AM_ROM AM_REGION("ppu" , 0)
-//AM_RANGE(0x250000 , 0x251fff) AM_ROM AM_REGION("test_rom" , 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(ppu_io_map , AS_IO , 16 , hp9845b_state)
@@ -719,6 +718,16 @@ static MACHINE_CONFIG_START( hp9845b, hp9845b_state )
MCFG_TACO_FLG_HANDLER(WRITELINE(hp9845b_state , t15_flg_w))
MCFG_TACO_STS_HANDLER(WRITELINE(hp9845b_state , t15_sts_w))
+ // In real machine there were 8 slots for LPU ROMs and 8 slots for PPU ROMs in
+ // right-hand side and left-hand side drawers, respectively.
+ // Here we do away with the distinction between LPU & PPU ROMs: in the end they
+ // are visible to both CPUs at the same addresses.
+ // For now we define just a couple of slots..
+ MCFG_DEVICE_ADD("drawer1", HP_OPTROM_SLOT, 0)
+ MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
+ MCFG_DEVICE_ADD("drawer2", HP_OPTROM_SLOT, 0)
+ MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
+
MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom")
MACHINE_CONFIG_END
@@ -755,10 +764,6 @@ ROM_END
#define rom_hp9835b rom_hp9835a
ROM_START( hp9845b )
- ROM_REGION(0x4000 , "test_rom" , ROMREGION_16BIT | ROMREGION_BE)
- ROM_LOAD("09845-66520-45_00-Test_ROM.bin" , 0x0000 , 0x2000 , CRC(95a5b299))
- ROM_LOAD("09845-66520-45_10-Test_ROM.bin" , 0x2000 , 0x2000 , CRC(257e4c66))
-
ROM_REGION(0x800 , "chargen" , 0)
// Don't have the real character generator from HP9845, use the one from HP64000 for now
ROM_LOAD("1818_2668.bin" , 0 , 0x800 , BAD_DUMP CRC(32a52664) SHA1(8b2a49a32510103ff424e8481d5ed9887f609f2f))
diff --git a/src/mame/drivers/hyhoo.cpp b/src/mame/drivers/hyhoo.cpp
index b4f0ad76389..9def22372b7 100644
--- a/src/mame/drivers/hyhoo.cpp
+++ b/src/mame/drivers/hyhoo.cpp
@@ -106,7 +106,7 @@ static INPUT_PORTS_START( hyhoo )
PORT_DIPSETTING( 0x00, "95%" )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET
@@ -181,7 +181,7 @@ static INPUT_PORTS_START( hyhoo2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index 38698f7491b..8beba3c4ed2 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -590,7 +590,7 @@ static MACHINE_CONFIG_START( ibmpcjr, pcjr_state)
MCFG_PIT8253_CLK2(XTAL_14_31818MHz/12)
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(pcjr_state, out2_changed))
- MCFG_PIC8259_ADD( "pic8259", WRITELINE(pcjr_state, pic8259_set_int_line), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", WRITELINE(pcjr_state, pic8259_set_int_line), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
MCFG_I8255_IN_PORTA_CB(CONSTANT(0xff))
diff --git a/src/mame/drivers/icecold.cpp b/src/mame/drivers/icecold.cpp
index a21cb19976b..39aeb9ab47c 100644
--- a/src/mame/drivers/icecold.cpp
+++ b/src/mame/drivers/icecold.cpp
@@ -128,7 +128,7 @@ static INPUT_PORTS_START( icecold )
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP)
- PORT_BIT(0x55, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, icecold_state, motors_limit_r, NULL)
+ PORT_BIT(0x55, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, icecold_state, motors_limit_r, nullptr)
PORT_START("X0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1)
diff --git a/src/mame/drivers/igs009.cpp b/src/mame/drivers/igs009.cpp
index 638a3260df2..49db3b223e7 100644
--- a/src/mame/drivers/igs009.cpp
+++ b/src/mame/drivers/igs009.cpp
@@ -677,7 +677,7 @@ static INPUT_PORTS_START( jingbell )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igs009_state,hopper_r, NULL) // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igs009_state,hopper_r, nullptr) // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pay Out")
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)
diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp
index fb26115a720..e926a677542 100644
--- a/src/mame/drivers/igs011.cpp
+++ b/src/mame/drivers/igs011.cpp
@@ -495,8 +495,8 @@ WRITE16_MEMBER(igs011_state::igs011_blit_flags_w)
UINT8 *gfx = m_gfx_region->base();
int gfx_size = m_gfx_region->bytes();
- UINT8 *gfx2 = (m_gfx2_region != NULL) ? m_gfx2_region->base() : NULL;
- int gfx2_size = (m_gfx2_region != NULL) ? m_gfx2_region->bytes() : 0;
+ UINT8 *gfx2 = (m_gfx2_region != nullptr) ? m_gfx2_region->base() : nullptr;
+ int gfx2_size = (m_gfx2_region != nullptr) ? m_gfx2_region->bytes() : 0;
const rectangle &clip = m_screen->visible_area();
@@ -3142,7 +3142,7 @@ static INPUT_PORTS_START( lhb2 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state, igs_hopper_r, NULL) // hopper switch
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state, igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3272,7 +3272,7 @@ static INPUT_PORTS_START( nkishusp )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, NULL) // hopper switch
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3401,7 +3401,7 @@ static INPUT_PORTS_START( wlcc )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // shown in test mode
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, NULL) // hopper switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@@ -3530,7 +3530,7 @@ static INPUT_PORTS_START( lhb )
PORT_DIPUNKNOWN( 0x80, 0x80 )
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, NULL) // hopper switch
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // system reset
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
@@ -3857,7 +3857,7 @@ static INPUT_PORTS_START( xymg )
PORT_DIPUNKNOWN( 0x80, 0x80 )
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, NULL) // hopper switch
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index 4a1ed126384..84837572959 100644
--- a/src/mame/drivers/igspoker.cpp
+++ b/src/mame/drivers/igspoker.cpp
@@ -501,7 +501,7 @@ static INPUT_PORTS_START( cpoker )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -635,7 +635,7 @@ static INPUT_PORTS_START( cpokerx )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -800,7 +800,7 @@ static INPUT_PORTS_START( csk227 )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
@@ -945,7 +945,7 @@ static INPUT_PORTS_START( csk234 )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1097,7 +1097,7 @@ static INPUT_PORTS_START( igs_ncs )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1417,7 +1417,7 @@ static INPUT_PORTS_START( cpokerpk )
PORT_DIPSETTING( 0x00, "100:1" )
PORT_START("SERVICE")
- PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1552,7 +1552,7 @@ static INPUT_PORTS_START( chleague )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1691,7 +1691,7 @@ static INPUT_PORTS_START( pktet346 )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
diff --git a/src/mame/drivers/imds.cpp b/src/mame/drivers/imds.cpp
index 0748c6d700f..a707e7df6fa 100644
--- a/src/mame/drivers/imds.cpp
+++ b/src/mame/drivers/imds.cpp
@@ -82,10 +82,10 @@ void imds_state::machine_reset()
//static const ins8250_interface imds_com_interface =
//{
// 1843200,
-// DEVCB_NULL,
-// NULL,
-// NULL,
-// NULL
+// DEVCB_NOOP,
+// nullptr,
+// nullptr,
+// nullptr
//};
static MACHINE_CONFIG_START( imds, imds_state )
diff --git a/src/mame/drivers/imds2.cpp b/src/mame/drivers/imds2.cpp
index 40dc9bb8818..65e32e3009f 100644
--- a/src/mame/drivers/imds2.cpp
+++ b/src/mame/drivers/imds2.cpp
@@ -769,8 +769,8 @@ static MACHINE_CONFIG_START(imds2 , imds2_state)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("ipcsyspic" , pic8259_device , inta_cb)
MCFG_QUANTUM_TIME(attotime::from_hz(100))
- MCFG_PIC8259_ADD("ipcsyspic" , WRITELINE(imds2_state , imds2_ipc_intr) , VCC , NULL)
- MCFG_PIC8259_ADD("ipclocpic" , DEVWRITELINE("ipcsyspic" , pic8259_device , ir7_w) , VCC , NULL)
+ MCFG_PIC8259_ADD("ipcsyspic" , WRITELINE(imds2_state , imds2_ipc_intr) , VCC, NOOP)
+ MCFG_PIC8259_ADD("ipclocpic" , DEVWRITELINE("ipcsyspic" , pic8259_device , ir7_w) , VCC, NOOP)
MCFG_DEVICE_ADD("ipctimer" , PIT8253 , 0)
MCFG_PIT8253_CLK0(IPC_XTAL_Y1 / 16)
diff --git a/src/mame/drivers/imolagp.cpp b/src/mame/drivers/imolagp.cpp
index 5de4ed28812..0e43b33c414 100644
--- a/src/mame/drivers/imolagp.cpp
+++ b/src/mame/drivers/imolagp.cpp
@@ -422,7 +422,7 @@ static INPUT_PORTS_START( imolagp )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, NULL)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -453,7 +453,7 @@ static INPUT_PORTS_START( imolagpo )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("IN1")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, NULL)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp
index 78621252fae..ab422b0a2dc 100644
--- a/src/mame/drivers/inufuku.cpp
+++ b/src/mame/drivers/inufuku.cpp
@@ -238,7 +238,7 @@ static INPUT_PORTS_START( inufuku )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, inufuku_state,soundflag_r, NULL) // pending sound command
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, inufuku_state,soundflag_r, nullptr) // pending sound command
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 3on3dunk cares about something in here, possibly a vblank flag
PORT_START( "EEPROMOUT" )
diff --git a/src/mame/drivers/iq151.cpp b/src/mame/drivers/iq151.cpp
index aa305ba859d..88a085c71bd 100644
--- a/src/mame/drivers/iq151.cpp
+++ b/src/mame/drivers/iq151.cpp
@@ -400,7 +400,7 @@ static MACHINE_CONFIG_START( iq151, iq151_state )
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
- MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
MCFG_I8255_IN_PORTA_CB(READ8(iq151_state, keyboard_row_r))
diff --git a/src/mame/drivers/irisha.cpp b/src/mame/drivers/irisha.cpp
index 5361fcb37af..219bea42580 100644
--- a/src/mame/drivers/irisha.cpp
+++ b/src/mame/drivers/irisha.cpp
@@ -425,7 +425,7 @@ static MACHINE_CONFIG_START( irisha, irisha_state )
MCFG_I8255_IN_PORTC_CB(READ8(irisha_state, irisha_8255_portc_r))
MCFG_I8255_OUT_PORTC_CB(WRITE8(irisha_state, irisha_8255_portc_w))
- MCFG_PIC8259_ADD( "pic8259", WRITELINE(irisha_state,irisha_pic_set_int_line), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", WRITELINE(irisha_state,irisha_pic_set_int_line), VCC, NOOP)
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/isbc.cpp b/src/mame/drivers/isbc.cpp
index 600b0886b74..21836db109c 100644
--- a/src/mame/drivers/isbc.cpp
+++ b/src/mame/drivers/isbc.cpp
@@ -200,7 +200,7 @@ static MACHINE_CONFIG_START( isbc86, isbc_state )
MCFG_CPU_IO_MAP(isbc_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic_0", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("pic_0", INPUTLINE(":maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic_0", INPUTLINE(":maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("pit", PIT8253, 0)
MCFG_PIT8253_CLK0(XTAL_22_1184MHz/18)
@@ -232,7 +232,7 @@ static MACHINE_CONFIG_START( rpc86, isbc_state )
MCFG_CPU_IO_MAP(rpc86_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic_0", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("pic_0", INPUTLINE(":maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic_0", INPUTLINE(":maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("pit", PIT8253, 0)
MCFG_PIT8253_CLK0(XTAL_22_1184MHz/18)
@@ -268,7 +268,7 @@ static MACHINE_CONFIG_START( isbc286, isbc_state )
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic_0", pic8259_device, inta_cb)
MCFG_PIC8259_ADD("pic_0", INPUTLINE(":maincpu", 0), VCC, READ8(isbc_state, get_slave_ack))
- MCFG_PIC8259_ADD("pic_1", DEVWRITELINE("pic_0", pic8259_device, ir7_w), GND, NULL)
+ MCFG_PIC8259_ADD("pic_1", DEVWRITELINE("pic_0", pic8259_device, ir7_w), GND, NOOP)
MCFG_DEVICE_ADD("pit", PIT8254, 0)
MCFG_PIT8253_CLK0(XTAL_22_1184MHz/18)
diff --git a/src/mame/drivers/itech32.cpp b/src/mame/drivers/itech32.cpp
index 9e03b52af02..2b3d89212fa 100644
--- a/src/mame/drivers/itech32.cpp
+++ b/src/mame/drivers/itech32.cpp
@@ -1086,7 +1086,7 @@ static INPUT_PORTS_START( timekill )
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0000, "-" )
PORT_DIPSETTING( 0x0010, "+" )
@@ -1131,7 +1131,7 @@ static INPUT_PORTS_START( itech32_base_16bit )
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x0000, "-" )
PORT_DIPSETTING( 0x0010, "+" )
@@ -1350,7 +1350,7 @@ static INPUT_PORTS_START( itech32_base_32bit )
PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_LOW )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL)
+ PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
PORT_DIPNAME( 0x00100000, 0x00000000, "Video Sync" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00000000, "-" )
PORT_DIPSETTING( 0x00100000, "+" )
diff --git a/src/mame/drivers/itech8.cpp b/src/mame/drivers/itech8.cpp
index f18b3729752..64ac1559427 100644
--- a/src/mame/drivers/itech8.cpp
+++ b/src/mame/drivers/itech8.cpp
@@ -989,7 +989,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( wfortune )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1018,7 +1018,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( grmatch )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, "Adjustments Lockout" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
@@ -1056,7 +1056,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( stratab )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1111,7 +1111,7 @@ CUSTOM_INPUT_MEMBER(itech8_state::gtg_mux)
static INPUT_PORTS_START( gtg )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1148,7 +1148,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gtgt )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1175,7 +1175,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gtg2t )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1212,7 +1212,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( slikshot )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1239,7 +1239,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dynobop )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1266,7 +1266,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( sstrike )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1293,7 +1293,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( pokrdice )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Lower Right") PORT_CODE(KEYCODE_3_PAD)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
@@ -1322,7 +1322,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hstennis )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1357,7 +1357,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( arlingtn )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* see code at e23c */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -1388,7 +1388,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( peggle )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1410,7 +1410,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( pegglet )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1432,7 +1432,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( neckneck )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* see code at e23c */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -1473,7 +1473,7 @@ static INPUT_PORTS_START( rimrockn )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_START("80")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/jackie.cpp b/src/mame/drivers/jackie.cpp
index b1909466a64..480d89d1712 100644
--- a/src/mame/drivers/jackie.cpp
+++ b/src/mame/drivers/jackie.cpp
@@ -497,7 +497,7 @@ static INPUT_PORTS_START( jackie )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jackie_state,hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jackie_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp
index c26edd9b298..dbde2d5a3c9 100644
--- a/src/mame/drivers/jaguar.cpp
+++ b/src/mame/drivers/jaguar.cpp
@@ -486,43 +486,43 @@ emu_file jaguar_state::*jaguar_nvram_fopen( UINT32 openflags)
{
std::string fname(machine().system().name, PATH_SEPARATOR, image->basename_noext(), ".nv");
filerr = mame_fopen( SEARCHPATH_NVRAM, fname, openflags, &file);
- return (filerr == osd_file::error::NONE) ? file : NULL;
+ return (filerr == osd_file::error::NONE) ? file : nullptr;
}
else
- return NULL;
+ return nullptr;
}
void jaguar_state::jaguar_nvram_load()
{
- emu_file *nvram_file = NULL;
+ emu_file *nvram_file = nullptr;
device_t *device;
- for (device = machine().m_devicelist.first(); device != NULL; device = device->next())
+ for (device = machine().m_devicelist.first(); device != nullptr; device = device->next())
{
device_nvram_func nvram = (device_nvram_func)device->get_config_fct(DEVINFO_FCT_NVRAM);
- if (nvram != NULL)
+ if (nvram != nullptr)
{
- if (nvram_file == NULL)
+ if (nvram_file == nullptr)
nvram_file = jaguar_nvram_fopen(machine, OPEN_FLAG_READ);
(*nvram)(device, nvram_file, 0);
}
}
- if (nvram_file != NULL)
+ if (nvram_file != nullptr)
mame_fclose(nvram_file);
}
void jaguar_state::jaguar_nvram_save()
{
- emu_file *nvram_file = NULL;
+ emu_file *nvram_file = nullptr;
device_t *device;
- for (device = machine().m_devicelist.first(); device != NULL; device = device->next())
+ for (device = machine().m_devicelist.first(); device != nullptr; device = device->next())
{
device_nvram_func nvram = (device_nvram_func)device->get_config_fct(DEVINFO_FCT_NVRAM);
- if (nvram != NULL)
+ if (nvram != nullptr)
{
- if (nvram_file == NULL)
+ if (nvram_file == nullptr)
nvram_file = jaguar_nvram_fopen(machine, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
// check nvram_file to avoid crash when no image is mounted or cannot be created
if (nvram_file)
@@ -530,7 +530,7 @@ void jaguar_state::jaguar_nvram_save()
}
}
- if (nvram_file != NULL)
+ if (nvram_file != nullptr)
mame_fclose(nvram_file);
}
@@ -617,7 +617,7 @@ WRITE32_MEMBER(jaguar_state::misc_control_w)
}
/* adjust banking */
- if (m_romboard_region != NULL)
+ if (m_romboard_region != nullptr)
{
membank("mainsndbank")->set_entry((data >> 1) & 7);
membank("dspsndbank")->set_entry((data >> 1) & 7);
@@ -776,7 +776,7 @@ WRITE32_MEMBER(jaguar_state::latch_w)
logerror("%08X:latch_w(%X)\n", space.device().safe_pcbase(), data);
/* adjust banking */
- if (m_romboard_region != NULL)
+ if (m_romboard_region != nullptr)
{
if (m_is_r3000)
{
diff --git a/src/mame/drivers/jankenmn.cpp b/src/mame/drivers/jankenmn.cpp
index 3d8c2ffcf83..085f30db0ff 100644
--- a/src/mame/drivers/jankenmn.cpp
+++ b/src/mame/drivers/jankenmn.cpp
@@ -313,7 +313,7 @@ static INPUT_PORTS_START( jankenmn )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Paa (Paper)")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN3 ) // 100 yen coin
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jankenmn_state, hopper_status_r, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jankenmn_state, hopper_status_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) // 10 yen coin
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) // 10 yen coin
diff --git a/src/mame/drivers/jedi.cpp b/src/mame/drivers/jedi.cpp
index 9d97f299716..7c20d0d399f 100644
--- a/src/mame/drivers/jedi.cpp
+++ b/src/mame/drivers/jedi.cpp
@@ -314,7 +314,7 @@ static INPUT_PORTS_START( jedi )
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x18, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jedi_state,jedi_audio_comm_stat_r, NULL)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jedi_state,jedi_audio_comm_stat_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("STICKY") /* analog Y */
diff --git a/src/mame/drivers/jpmsys5.cpp b/src/mame/drivers/jpmsys5.cpp
index 30ba6c0479b..1a95350bcbc 100644
--- a/src/mame/drivers/jpmsys5.cpp
+++ b/src/mame/drivers/jpmsys5.cpp
@@ -451,7 +451,7 @@ static INPUT_PORTS_START( monopoly )
PORT_BIT( 0xc3, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("TOUCH_PUSH")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmsys5_state,touchscreen_press, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmsys5_state,touchscreen_press, nullptr)
PORT_START("TOUCH_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15)
diff --git a/src/mame/drivers/junior.cpp b/src/mame/drivers/junior.cpp
index 6a3f4c3928c..2e54b74339e 100644
--- a/src/mame/drivers/junior.cpp
+++ b/src/mame/drivers/junior.cpp
@@ -111,7 +111,7 @@ PORT_START("LINE0") /* IN0 keys row 0 */
PORT_START("LINE3") /* IN3 STEP and RESET keys, MODE switch */
PORT_BIT( 0x80, 0x00, IPT_UNUSED )
PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("sw1: ST") PORT_CODE(KEYCODE_F7)
- PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RST") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, junior_state, junior_reset, NULL)
+ PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RST") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, junior_state, junior_reset, nullptr)
PORT_DIPNAME(0x10, 0x10, "sw3: SS (NumLock)") PORT_CODE(KEYCODE_NUMLOCK) PORT_TOGGLE
PORT_DIPSETTING( 0x00, "single step")
PORT_DIPSETTING( 0x10, "run")
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index 019f95e4492..adfd555bc8e 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -2455,7 +2455,7 @@ MACHINE_CONFIG_END
void kaneko16_state::kaneko16_unscramble_tiles(const char *region)
{
memory_region *tile_region = memregion(region);
- if (tile_region == NULL)
+ if (tile_region == nullptr)
{
return;
}
diff --git a/src/mame/drivers/kenseim.cpp b/src/mame/drivers/kenseim.cpp
index 320ca23d44f..b93bde816c9 100644
--- a/src/mame/drivers/kenseim.cpp
+++ b/src/mame/drivers/kenseim.cpp
@@ -504,10 +504,10 @@ static INPUT_PORTS_START( kenseim )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_COIN1*/ ) // n/c
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_COIN2*/ ) // n/c
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_9_r, NULL) // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // D9
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_9_r, nullptr) // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // D9
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // n/c?
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_req_r, NULL) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // REQ
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_LVm_r, NULL) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // LVm
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_req_r, nullptr) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // REQ
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_LVm_r, nullptr) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // LVm
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) n/c
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // n/c?
@@ -516,7 +516,7 @@ static INPUT_PORTS_START( kenseim )
// PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) // D6
// PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) // D7
// PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) // D8
- PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_5678_r, NULL)
+ PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_5678_r, nullptr)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON1*/ ) /*PORT_PLAYER(1)*/ // n/c
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON2*/ ) /*PORT_PLAYER(1)*/ // n/c
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON3*/ ) /*PORT_PLAYER(1)*/ // n/c
@@ -526,7 +526,7 @@ static INPUT_PORTS_START( kenseim )
// PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) // D2
// PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) // D3
// PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) // D4
- PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_1234_r, NULL)
+ PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_1234_r, nullptr)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON1*/ ) /*PORT_PLAYER(2)*/ // n/c
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON2*/ ) /*PORT_PLAYER(2)*/ // n/c
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON3*/ ) /*PORT_PLAYER(2)*/ // n/c
diff --git a/src/mame/drivers/kim1.cpp b/src/mame/drivers/kim1.cpp
index 828b8357805..246692fa3de 100644
--- a/src/mame/drivers/kim1.cpp
+++ b/src/mame/drivers/kim1.cpp
@@ -197,7 +197,7 @@ static INPUT_PORTS_START( kim1 )
PORT_START("LINE3") /* IN3 STEP and RESET keys, MODE switch */
PORT_BIT( 0x80, 0x00, IPT_UNUSED )
PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("sw1: ST") PORT_CODE(KEYCODE_F7)
- PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RS") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, kim1_state, kim1_reset, NULL)
+ PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RS") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, kim1_state, kim1_reset, nullptr)
PORT_DIPNAME(0x10, 0x10, "sw3: SS") PORT_CODE(KEYCODE_NUMLOCK) PORT_TOGGLE
PORT_DIPSETTING( 0x00, "single step")
PORT_DIPSETTING( 0x10, "run")
diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp
index 6aeee176b81..c3d73611293 100644
--- a/src/mame/drivers/konamigx.cpp
+++ b/src/mame/drivers/konamigx.cpp
@@ -370,7 +370,7 @@ WRITE32_MEMBER(konamigx_state::esc_w)
UINT32 opcode;
UINT32 params;
- /* ignore NULL writes to the ESC (these appear to be "keepalives" on the real hardware) */
+ /* ignore nullptr writes to the ESC (these appear to be "keepalives" on the real hardware) */
if (!data)
{
return;
@@ -1194,7 +1194,7 @@ static INPUT_PORTS_START( common )
// note: racin' force expects bit 1 of the eeprom port to toggle
PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
- PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, konamigx_state, gx_rdport1_3_r, NULL)
+ PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, konamigx_state, gx_rdport1_3_r, nullptr)
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 28def903b4d..718c49c1852 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -2543,7 +2543,7 @@ static INPUT_PORTS_START( ddr )
PORT_INCLUDE( konami573 )
PORT_MODIFY( "IN2" )
- PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER( DEVICE_SELF, ksys573_state,gn845pwbb_read, NULL )
+ PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER( DEVICE_SELF, ksys573_state,gn845pwbb_read, nullptr )
PORT_START( "STAGE" )
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_PLAYER( 1 )
@@ -2703,11 +2703,11 @@ static INPUT_PORTS_START( gunmania )
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER( 1 ) PORT_NAME( "Bullet Tube-1 Sensor" )
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER( 1 ) PORT_NAME( "Bullet Tube-2 Sensor" )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER( 1 ) PORT_NAME( "Safety Sensor Under" )
- PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_tank_shutter_sensor, NULL )
+ PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_tank_shutter_sensor, nullptr )
PORT_MODIFY( "IN3" )
PORT_BIT( 0x0d000b00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_cable_holder_sensor, NULL )
+ PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_cable_holder_sensor, nullptr )
PORT_START( "GUNX" )
PORT_BIT( 0x7f, 0x2f, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_MINMAX( 0x00,0x5f ) PORT_SENSITIVITY( 100 ) PORT_KEYDELTA( 15 ) PORT_PLAYER( 1 )
diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp
index 40c17efd990..aef7a702593 100644
--- a/src/mame/drivers/kyocera.cpp
+++ b/src/mame/drivers/kyocera.cpp
@@ -1370,7 +1370,7 @@ static MACHINE_CONFIG_START( kc85, kc85_state )
MCFG_I8155_IN_PORTC_CB(READ8(kc85_state, i8155_pc_r))
MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(kc85_state, i8155_to_w))
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
MCFG_IM6402_ADD(IM6402_TAG, 0, 0)
MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
@@ -1420,7 +1420,7 @@ static MACHINE_CONFIG_START( pc8201, pc8201_state )
MCFG_I8155_IN_PORTC_CB(READ8(kc85_state, i8155_pc_r))
MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(kc85_state, i8155_to_w))
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
MCFG_IM6402_ADD(IM6402_TAG, 0, 0)
MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
@@ -1480,7 +1480,7 @@ static MACHINE_CONFIG_START( trsm100, trsm100_state )
MCFG_I8155_IN_PORTC_CB(READ8(kc85_state, i8155_pc_r))
MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(kc85_state, i8155_to_w))
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
MCFG_IM6402_ADD(IM6402_TAG, 0, 0)
MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
diff --git a/src/mame/drivers/ladybug.cpp b/src/mame/drivers/ladybug.cpp
index 4152887ebd0..a6ebabbf911 100644
--- a/src/mame/drivers/ladybug.cpp
+++ b/src/mame/drivers/ladybug.cpp
@@ -225,13 +225,13 @@ CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p2_control_r)
static INPUT_PORTS_START( ladybug )
PORT_START("IN0")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state,ladybug_p1_control_r, NULL)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state,ladybug_p1_control_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
PORT_START("IN1")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state,ladybug_p2_control_r, NULL)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state,ladybug_p2_control_r, nullptr)
/* This should be connected to the 4V clock. I don't think the game uses it. */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Note that there are TWO VBlank inputs, one is active low, the other active */
diff --git a/src/mame/drivers/lc80.cpp b/src/mame/drivers/lc80.cpp
index fc4f14167c6..b29f5836f35 100644
--- a/src/mame/drivers/lc80.cpp
+++ b/src/mame/drivers/lc80.cpp
@@ -262,7 +262,7 @@ static const z80_daisy_config lc80_daisy_chain[] =
{ Z80CTC_TAG },
{ Z80PIO2_TAG },
{ Z80PIO1_TAG },
- { NULL }
+ { nullptr }
};
#endif
diff --git a/src/mame/drivers/lethalj.cpp b/src/mame/drivers/lethalj.cpp
index 6ce095cf141..961505765ba 100644
--- a/src/mame/drivers/lethalj.cpp
+++ b/src/mame/drivers/lethalj.cpp
@@ -512,7 +512,7 @@ static INPUT_PORTS_START( cclownz )
PORT_DIPSETTING( 0x0000, "3000" )
PORT_START("IN1")
- PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lethalj_state,cclownz_paddle, NULL)
+ PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lethalj_state,cclownz_paddle, nullptr)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0060, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp
index 57c7f1df3b4..1d7870d50dc 100644
--- a/src/mame/drivers/limenko.cpp
+++ b/src/mame/drivers/limenko.cpp
@@ -600,7 +600,7 @@ static INPUT_PORTS_START( legendoh )
PORT_DIPNAME( 0x20000000, 0x00000000, "Sound Enable" )
PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, NULL) //changes spriteram location
+ PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, nullptr) //changes spriteram location
PORT_BIT( 0x4000ffff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "EEPROMOUT" )
@@ -644,7 +644,7 @@ static INPUT_PORTS_START( sb2003 )
PORT_DIPNAME( 0x20000000, 0x00000000, "Sound Enable" )
PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, NULL) //changes spriteram location
+ PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, nullptr) //changes spriteram location
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1 ) // checked in dynabomb I/O test, but doesn't work in game
PORT_BIT( 0x5f00ffff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -682,7 +682,7 @@ static INPUT_PORTS_START( spotty )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, NULL) //changes spriteram location
+ PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, nullptr) //changes spriteram location
PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW )
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_SPECIAL ) //security bit
PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp
index 6ec40e52ff2..a57effa73f6 100644
--- a/src/mame/drivers/littlerb.cpp
+++ b/src/mame/drivers/littlerb.cpp
@@ -218,7 +218,7 @@ static INPUT_PORTS_START( littlerb )
PORT_DIPNAME( 0x1000, 0x1000, "???" )
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0xe000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, littlerb_state,littlerb_frame_step_r, NULL)
+ PORT_BIT( 0xe000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, littlerb_state,littlerb_frame_step_r, nullptr)
PORT_START("P2") /* 16bit */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
diff --git a/src/mame/drivers/m107.cpp b/src/mame/drivers/m107.cpp
index d9034a10e77..9a92d8ad326 100644
--- a/src/mame/drivers/m107.cpp
+++ b/src/mame/drivers/m107.cpp
@@ -803,7 +803,7 @@ static MACHINE_CONFIG_START( firebarr, m107_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_V25_CONFIG(rtypeleo_decryption_table)
- MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m107_state, scanline_interrupt, "screen", 0, 1)
diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp
index f56d4d5004d..4fc27f81f58 100644
--- a/src/mame/drivers/m20.cpp
+++ b/src/mame/drivers/m20.cpp
@@ -824,7 +824,7 @@ static MACHINE_CONFIG_START( m20, m20_state )
MCFG_PIT8253_CLK2(1230782)
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(m20_state, timer_tick_w))
- MCFG_PIC8259_ADD("i8259", WRITELINE(m20_state, int_w), VCC, NULL)
+ MCFG_PIC8259_ADD("i8259", WRITELINE(m20_state, int_w), VCC, NOOP)
MCFG_RS232_PORT_ADD("kbd", keyboard, "m20")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("i8251_1", i8251_device, write_rxd))
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index 5f2baad000a..25ae0f04e3b 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -995,7 +995,7 @@ SLOT_INTERFACE_END
static const z80_daisy_config m5_daisy_chain[] =
{
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
@@ -1161,7 +1161,7 @@ READ8_MEMBER( brno_state::fd_r )
WRITE8_MEMBER( brno_state::fd_w )
{
floppy_image_device *floppy;
- m_floppy = NULL;
+ m_floppy = nullptr;
int disk = 0;
@@ -1252,7 +1252,7 @@ void m5_state::machine_reset()
m_cart=m_cart2;
}
// no cart inserted - there is nothing to do - not allowed in original Sord m5
- if (m_cart_ram == NULL && m_cart == NULL)
+ if (m_cart_ram == nullptr && m_cart == nullptr)
{
membank("bank1r")->set_base(memregion(Z80_TAG)->base());
program.unmap_write(0x0000, 0x1fff);
@@ -1381,7 +1381,7 @@ void brno_state::machine_reset()
m_romen=true;
m_ramen=false;
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
floppy = m_floppy0->get_device();
m_fdc->set_floppy(floppy);
floppy->mon_w(0);
@@ -1439,8 +1439,8 @@ static MACHINE_CONFIG_START( m5, m5_state )
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", m5_floppies, "525dd", m5_state::floppy_formats)
// cartridge
- MCFG_M5_CARTRIDGE_ADD("cartslot1", m5_cart, NULL)
- MCFG_M5_CARTRIDGE_ADD("cartslot2", m5_cart, NULL)
+ MCFG_M5_CARTRIDGE_ADD("cartslot1", m5_cart, nullptr)
+ MCFG_M5_CARTRIDGE_ADD("cartslot2", m5_cart, nullptr)
// software lists
MCFG_SOFTWARE_LIST_ADD("cart_list", "m5_cart")
diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp
index b6cc9b7e4bb..b3314812a98 100644
--- a/src/mame/drivers/m72.cpp
+++ b/src/mame/drivers/m72.cpp
@@ -1896,7 +1896,7 @@ static MACHINE_CONFIG_START( m72_base, m72_state )
MCFG_CPU_PROGRAM_MAP(sound_ram_map)
MCFG_CPU_IO_MAP(sound_portmap)
- MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
/* video hardware */
MCFG_GFXDECODE_ADD("gfxdecode", "palette", m72)
@@ -2011,7 +2011,7 @@ static MACHINE_CONFIG_START( rtype2, m72_state )
MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
- MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
/* video hardware */
MCFG_GFXDECODE_ADD("gfxdecode", "palette", rtype2)
@@ -2056,7 +2056,7 @@ static MACHINE_CONFIG_START( cosmccop, m72_state )
MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
-// MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+// MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_MACHINE_START_OVERRIDE(m72_state,kengo)
MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo)
@@ -2104,7 +2104,7 @@ static MACHINE_CONFIG_START( m82, m72_state )
MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
- MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
/* video hardware */
MCFG_GFXDECODE_ADD("gfxdecode", "palette", majtitle)
@@ -2140,7 +2140,7 @@ static MACHINE_CONFIG_START( poundfor, m72_state )
MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, fake_nmi, 128*55) /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
- MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
/* video hardware */
MCFG_GFXDECODE_ADD("gfxdecode", "palette", rtype2)
diff --git a/src/mame/drivers/m90.cpp b/src/mame/drivers/m90.cpp
index 6386e102c15..66097bbacf6 100644
--- a/src/mame/drivers/m90.cpp
+++ b/src/mame/drivers/m90.cpp
@@ -841,7 +841,7 @@ static MACHINE_CONFIG_DERIVED( dynablsb, m90 )
MCFG_DEVICE_REMOVE("m72")
MCFG_SOUND_MODIFY("ymsnd")
- MCFG_YM2151_IRQ_HANDLER(NULL) /* this bootleg polls the YM2151 instead of taking interrupts from it */
+ MCFG_YM2151_IRQ_HANDLER(NOOP) /* this bootleg polls the YM2151 instead of taking interrupts from it */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/m92.cpp b/src/mame/drivers/m92.cpp
index f4934be8fe6..713ba75a8c1 100644
--- a/src/mame/drivers/m92.cpp
+++ b/src/mame/drivers/m92.cpp
@@ -465,7 +465,7 @@ static INPUT_PORTS_START( m92_2player )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, m92_state,m92_sprite_busy_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, m92_state,m92_sprite_busy_r, nullptr)
/* DIP switch bank 3 */
PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" )
@@ -977,7 +977,7 @@ static MACHINE_CONFIG_START( m92, m92_state )
MCFG_CPU_ADD("soundcpu" ,V35, XTAL_14_31818MHz)
MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_MACHINE_START_OVERRIDE(m92_state,m92)
MCFG_MACHINE_RESET_OVERRIDE(m92_state,m92)
diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp
index 05d9e85a61c..4c77db5d91a 100644
--- a/src/mame/drivers/mac.cpp
+++ b/src/mame/drivers/mac.cpp
@@ -2216,6 +2216,13 @@ ROM_START( unitron )
ROM_LOAD16_WORD( "unitron_512.rom", 0x00000, 0x10000, CRC(1eabd37f) SHA1(a3d3696c08feac6805effb7ee07b68c2bf1a8dd7) )
ROM_END
+ROM_START( utrn1024 )
+ ROM_REGION16_BE(0x20000, "bootrom", 0)
+ // CRCs match the original "Lonely Hearts" version 1 Mac Plus ROM
+ ROM_LOAD16_BYTE( "macplus_mem_h.e6", 0x000000, 0x010000, CRC(5095fe39) SHA1(be780580033d914b5035d60b5ebbd66bd1d28a9b) )
+ ROM_LOAD16_BYTE( "macplus_mem_l.e7", 0x000001, 0x010000, CRC(fb766270) SHA1(679f529fbfc05f9cc98924c53457d2996dfcb1a7) )
+ROM_END
+
ROM_START( mac512ke )
ROM_REGION16_BE(0x20000, "bootrom", 0)
ROM_LOAD16_WORD( "macplus.rom", 0x00000, 0x20000, CRC(b2102e8e) SHA1(7d2f808a045aa3a1b242764f0e2c7d13e288bf1f))
@@ -2450,6 +2457,7 @@ COMP( 1984, mac128k, 0, 0, mac128k, macplus, mac_state, mac128k512k,
COMP( 1984, mac512k, mac128k, 0, mac512ke, macplus, mac_state, mac128k512k, "Apple Computer", "Macintosh 512k", MACHINE_NOT_WORKING )
COMP( 1986, mac512ke, macplus, 0, mac512ke, macplus, mac_state, mac512ke, "Apple Computer", "Macintosh 512ke", 0 )
COMP( 1985, unitron, macplus, 0, mac512ke, macplus, mac_state, mac512ke, "bootleg (Unitron)", "Mac 512", MACHINE_NOT_WORKING )
+COMP( 1985, utrn1024, macplus, 0, macplus, macplus, mac_state, macplus, "bootleg (Unitron)", "Unitron 1024", 0 )
COMP( 1986, macplus, 0, 0, macplus, macplus, mac_state, macplus, "Apple Computer", "Macintosh Plus", 0 )
COMP( 1987, macse, 0, 0, macse, macadb, mac_state, macse, "Apple Computer", "Macintosh SE", 0 )
COMP( 1987, macsefd, 0, 0, macse, macadb, mac_state, macse, "Apple Computer", "Macintosh SE (FDHD)", 0 )
diff --git a/src/mame/drivers/macs.cpp b/src/mame/drivers/macs.cpp
index 349646427ad..5ca2a36f4fa 100644
--- a/src/mame/drivers/macs.cpp
+++ b/src/mame/drivers/macs.cpp
@@ -200,7 +200,7 @@ static ADDRESS_MAP_START( macs_io, AS_IO, 8, macs_state )
ADDRESS_MAP_END
//static GFXDECODE_START( macs )
-// GFXDECODE_ENTRY( NULL, 0, charlayout, 0, 16*4 )
+// GFXDECODE_ENTRY( nullptr, 0, charlayout, 0, 16*4 )
//GFXDECODE_END
static INPUT_PORTS_START( macs_base )
diff --git a/src/mame/drivers/mainsnk.cpp b/src/mame/drivers/mainsnk.cpp
index 695a29fdb24..29ba1642308 100644
--- a/src/mame/drivers/mainsnk.cpp
+++ b/src/mame/drivers/mainsnk.cpp
@@ -180,7 +180,7 @@ static INPUT_PORTS_START( mainsnk )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mainsnk_state, sound_r, NULL) /* sound CPU status */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mainsnk_state, sound_r, nullptr) /* sound CPU status */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE )
@@ -274,7 +274,7 @@ static INPUT_PORTS_START( canvas )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mainsnk_state, sound_r, NULL) /* sound CPU status */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mainsnk_state, sound_r, nullptr) /* sound CPU status */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE )
diff --git a/src/mame/drivers/maxaflex.cpp b/src/mame/drivers/maxaflex.cpp
index fce86aec694..49d41708a6b 100644
--- a/src/mame/drivers/maxaflex.cpp
+++ b/src/mame/drivers/maxaflex.cpp
@@ -15,7 +15,7 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
#include "cpu/m6805/m6805.h"
-#include "includes/atari.h"
+#include "includes/atari400.h"
#include "sound/speaker.h"
#include "sound/pokey.h"
#include "machine/6821pia.h"
diff --git a/src/mame/drivers/mbc55x.cpp b/src/mame/drivers/mbc55x.cpp
index 948bda53efe..c1755113fef 100644
--- a/src/mame/drivers/mbc55x.cpp
+++ b/src/mame/drivers/mbc55x.cpp
@@ -274,7 +274,7 @@ static MACHINE_CONFIG_START( mbc55x, mbc55x_state )
MCFG_PIT8253_CLK2(PIT_C2_CLOCK)
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(mbc55x_state, pit8253_t2))
- MCFG_PIC8259_ADD( PIC8259_TAG, INPUTLINE(MAINCPU_TAG, INPUT_LINE_IRQ0), VCC, NULL )
+ MCFG_PIC8259_ADD( PIC8259_TAG, INPUTLINE(MAINCPU_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(PPI8255_TAG, I8255, 0)
MCFG_I8255_IN_PORTA_CB(READ8(mbc55x_state, mbc55x_ppi_porta_r))
diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp
index 9e014ebcf04..a0a90856b39 100644
--- a/src/mame/drivers/mc1502.cpp
+++ b/src/mame/drivers/mc1502.cpp
@@ -252,7 +252,7 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state )
MCFG_PIT8253_CLK2(XTAL_16MHz/12) /* pio port c pin 4, and speaker polling enough */
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(mc1502_state, mc1502_pit8253_out2_changed))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255n1", I8255, 0)
MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("cent_data_out", output_latch_device, write))
diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp
index 056116804f5..2db2016653d 100644
--- a/src/mame/drivers/mcr.cpp
+++ b/src/mame/drivers/mcr.cpp
@@ -941,7 +941,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dpoker )
PORT_START("ssio:IP0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, mcr_state, dpoker_coin_in_hit, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, mcr_state, dpoker_coin_in_hit, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) // see dpoker_ip0_r
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) // "
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) // "
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index e72c8816197..dbbcd3186a2 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -2,7 +2,7 @@
// copyright-holders:David Haywood
#include "emu.h"
-#include "includes/md_cons.h"
+#include "includes/megadriv.h"
#include "sound/sn76496.h"
#include "imagedev/chd_cd.h"
diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp
index 6a269a8d140..c200c4da25a 100644
--- a/src/mame/drivers/merit.cpp
+++ b/src/mame/drivers/merit.cpp
@@ -590,7 +590,7 @@ static INPUT_PORTS_START( meritpoker )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
PORT_START("DSW")
PORT_DIPUNKNOWN_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW1:1" )
@@ -761,7 +761,7 @@ static INPUT_PORTS_START( pitboss ) /* PCB pinout maps 12 lamp outputs - Where a
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_COCKTAIL PORT_CODE(KEYCODE_G) PORT_NAME("P2 Button 5")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_COCKTAIL PORT_CODE(KEYCODE_W) PORT_NAME("P2 Play")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1")
@@ -824,7 +824,7 @@ static INPUT_PORTS_START( mroundup ) // todo: Find were Player 2 "Play" is mappe
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_COCKTAIL PORT_CODE(KEYCODE_G) PORT_NAME("P2 Button 5")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // pulling this LOW causes "unathorized conversion" msg.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, "Enable Draw Poker" ) PORT_DIPLOCATION("SW1:1")
@@ -917,7 +917,7 @@ static INPUT_PORTS_START( casino5 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, "Enable Draw Poker" ) PORT_DIPLOCATION("SW1:1")
diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp
index ef372c617ee..bfeeff6e742 100644
--- a/src/mame/drivers/metro.cpp
+++ b/src/mame/drivers/metro.cpp
@@ -2012,7 +2012,7 @@ ADDRESS_MAP_END
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) \
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) \
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, metro_state,custom_soundstatus_r, NULL) /* From Sound CPU */
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, metro_state,custom_soundstatus_r, nullptr) /* From Sound CPU */
#define COINAGE_SERVICE_LOC(DIPBANK) \
diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp
index 231742afebd..f19c5b3f225 100644
--- a/src/mame/drivers/mhavoc.cpp
+++ b/src/mame/drivers/mhavoc.cpp
@@ -399,10 +399,10 @@ static INPUT_PORTS_START( mhavoc )
/* Bit 2 = Gamma xmtd flag */
/* Bit 1 = 2.4kHz (divide 2.5MHz by 1024) */
/* Bit 0 = Vector generator halt flag */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_mhavoc_device, done_r, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, NULL)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_xmtd_r, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_rcvd_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_mhavoc_device, done_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_xmtd_r, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_rcvd_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diag Step/Coin C") PORT_CODE(KEYCODE_F1)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,mhavoc_bit67_r, "COIN\0SERVICE")
@@ -411,8 +411,8 @@ static INPUT_PORTS_START( mhavoc )
/* Bits 7-2 = input switches */
/* Bit 1 = Alpha rcvd flag */
/* Bit 0 = Alpha xmtd flag */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_xmtd_r, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_rcvd_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_xmtd_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_rcvd_r, nullptr)
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
@@ -481,7 +481,7 @@ static INPUT_PORTS_START( mhavocrv )
PORT_INCLUDE( mhavoc )
PORT_MODIFY("IN1")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,tms5220_r, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,tms5220_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -498,8 +498,8 @@ INPUT_PORTS_END
static INPUT_PORTS_START( alphaone )
PORT_START("IN0") /* alpha (player_1 = 0) */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_mhavoc_device, done_r, NULL)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_mhavoc_device, done_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, nullptr)
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
diff --git a/src/mame/drivers/micro3d.cpp b/src/mame/drivers/micro3d.cpp
index 988cf4cab84..69c65059836 100644
--- a/src/mame/drivers/micro3d.cpp
+++ b/src/mame/drivers/micro3d.cpp
@@ -111,7 +111,7 @@ static INPUT_PORTS_START( botss )
PORT_INCLUDE( micro3d )
PORT_MODIFY("INPUTS_A_B")
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, micro3d_state, botss_hwchk_r, NULL)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, micro3d_state, botss_hwchk_r, nullptr)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shield")
PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
diff --git a/src/mame/drivers/midyunit.cpp b/src/mame/drivers/midyunit.cpp
index 23eeacf8851..39210556412 100644
--- a/src/mame/drivers/midyunit.cpp
+++ b/src/mame/drivers/midyunit.cpp
@@ -239,7 +239,7 @@ static INPUT_PORTS_START( narc )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_strobe_r, NULL)
+ PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_strobe_r, nullptr)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* memory protect interlock */
PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -255,7 +255,7 @@ static INPUT_PORTS_START( narc )
*/
PORT_START("IN2")
- PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_data_r, NULL)
+ PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_data_r, nullptr)
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW")
@@ -691,7 +691,7 @@ static INPUT_PORTS_START( mkla2 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1)
PORT_START("IN2")
@@ -783,7 +783,7 @@ static INPUT_PORTS_START( mkla4 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1)
PORT_START("IN2")
@@ -875,7 +875,7 @@ static INPUT_PORTS_START( term2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DSW")
@@ -980,7 +980,7 @@ static INPUT_PORTS_START( totcarn )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) /* video freeze */
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x3c00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
@@ -2463,6 +2463,38 @@ ROM_START( mkyturboe )
ROM_LOAD ( "mkg-u109.rom", 0x580000, 0x80000, CRC(cafc47bb) SHA1(8610af6e52f7089ff4acd850c53ab8b4119e4445) )
ROM_END
+ROM_START( mkrep )
+ ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
+ ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) )
+
+ ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
+ ROM_LOAD ( "mks-u12.rom", 0x00000, 0x40000, CRC(258bd7f9) SHA1(463890b23f17350fb9b8a85897b0777c45bc2d54) )
+ ROM_RELOAD( 0x40000, 0x40000 )
+ ROM_LOAD ( "mks-u13.rom", 0x80000, 0x40000, CRC(7b7ec3b6) SHA1(6eec1b90d4a4855f34a7ebfbf93f3358d5627db4) )
+ ROM_RELOAD( 0xc0000, 0x40000 )
+
+ ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
+ ROM_LOAD16_BYTE( "u105", 0x00000, 0x80000, CRC(49a352ed) SHA1(c75f2ca7ff43e65c75cfe1fbd4375a00f54e2676) )
+ ROM_LOAD16_BYTE( "u89", 0x00001, 0x80000, CRC(5d5113b2) SHA1(3f870b8fd26865f76c88a9b5e8b72b9f891104c4) )
+
+ ROM_REGION( 0x800000, "gfx1", 0 )
+ ROM_LOAD ( "mkg-u111.rom", 0x000000, 0x80000, CRC(d17096c4) SHA1(01ef390a372c9d94adf138f9543ebb88b89f4c38) )
+ ROM_LOAD ( "mkg-u112.rom", 0x080000, 0x80000, CRC(993bc2e4) SHA1(7791edbec2b4b8971a3e790346dd7564ecf16d5c) )
+ ROM_LOAD ( "mkg-u113.rom", 0x100000, 0x80000, CRC(6fb91ede) SHA1(a3735b49f93b08c44fbc97e2b5aad394628fbe90) )
+ ROM_LOAD ( "mkg-u114.rom", 0x180000, 0x80000, CRC(ed1ff88a) SHA1(6b090b658ee6148af953bd0c9216f37162b6460f) )
+
+ ROM_LOAD ( "mkg-u95.rom", 0x200000, 0x80000, CRC(a002a155) SHA1(3cf7909e92bcd428063596fc5b9953e0000d6eca) )
+ ROM_LOAD ( "mkg-u96.rom", 0x280000, 0x80000, CRC(dcee8492) SHA1(a912b74d3b26ebd1b1613cc631080f83ececeaf8) )
+ ROM_LOAD ( "mkg-u97.rom", 0x300000, 0x80000, CRC(de88caef) SHA1(a7927b504dc56ca5c9048373977fe5743b0a3f0b) )
+ ROM_LOAD ( "mkg-u98.rom", 0x380000, 0x80000, CRC(37eb01b4) SHA1(06092460bd137e08d0f8df8560942ed877d40e09) )
+
+ ROM_LOAD ( "mkg-u106.rom", 0x400000, 0x80000, CRC(45acaf21) SHA1(5edd36c55f4e5d3c74fb85171728ec0a58284b12) )
+ ROM_LOAD ( "mkg-u107.rom", 0x480000, 0x80000, CRC(2a6c10a0) SHA1(cc90923c44f2961b945a0fd0f85ecc2ba04af2cb) )
+ ROM_LOAD ( "mkg-u108.rom", 0x500000, 0x80000, CRC(23308979) SHA1(0b36788624a1cf0d3f4c895be5ba967b8dfcf85e) )
+ ROM_LOAD ( "mkg-u109.rom", 0x580000, 0x80000, CRC(cafc47bb) SHA1(8610af6e52f7089ff4acd850c53ab8b4119e4445) )
+ROM_END
+
+
ROM_START( mknifty )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
ROM_LOAD ( "mks-u3.rom", 0x10000, 0x40000, CRC(c615844c) SHA1(5732f9053a5f73b0cc3b0166d7dc4430829d5bc7) )
@@ -2961,6 +2993,7 @@ GAME( 1992, mkyturbo, mk, yunit_adpcm_6bit_fast, mkla4, midyunit_state,
GAME( 1992, mkyturboe,mk, yunit_adpcm_6bit_fast, mkla4, midyunit_state, mkyturbo, ROT0, "hack", "Mortal Kombat (Turbo 3.0 08/31/92, hack)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, mknifty, mk, yunit_adpcm_6bit_fast, mkla4, midyunit_state, mkyturbo, ROT0, "hack", "Mortal Kombat (Nifty Kombo, hack)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, mknifty666, mk, yunit_adpcm_6bit_fast, mkla4, midyunit_state, mkyturbo, ROT0, "hack", "Mortal Kombat (Nifty Kombo 666, hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 1992, mkrep, mk, yunit_adpcm_6bit_fast, mkla4, midyunit_state, mkyturbo, ROT0, "hack", "Mortal Kombat (Reptile Man hack)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
GAME( 1992, mkyawdim, mk, mkyawdim, mkyawdim, midyunit_state, mkyawdim, ROT0, "bootleg (Yawdim)", "Mortal Kombat (Yawdim bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, mkyawdim2,mk, mkyawdim, mkyawdim, midyunit_state, mkyawdim, ROT0, "bootleg (Yawdim)", "Mortal Kombat (Yawdim bootleg, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND) // are some sound effects missing/wrong?
GAME( 1992, mkyawdim3,mk, mkyawdim, mkyawdim, midyunit_state, mkyawdim, ROT0, "bootleg (Yawdim)", "Mortal Kombat (Yawdim bootleg, set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND) // are some sound effects missing/wrong?
diff --git a/src/mame/drivers/mini2440.cpp b/src/mame/drivers/mini2440.cpp
index 9a42f2951ec..b0f27510098 100644
--- a/src/mame/drivers/mini2440.cpp
+++ b/src/mame/drivers/mini2440.cpp
@@ -251,7 +251,7 @@ MACHINE_CONFIG_END
static INPUT_PORTS_START( mini2440 )
PORT_START( "PENB" )
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pen Button") PORT_CHANGED_MEMBER(DEVICE_SELF, mini2440_state, mini2440_input_changed, NULL) PORT_PLAYER(1)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pen Button") PORT_CHANGED_MEMBER(DEVICE_SELF, mini2440_state, mini2440_input_changed, nullptr) PORT_PLAYER(1)
PORT_START( "PENX" )
PORT_BIT( 0x3ff, 0x200, IPT_LIGHTGUN_X ) PORT_NAME("Pen X") PORT_MINMAX(80, 950) PORT_SENSITIVITY(50) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_KEYDELTA(30) PORT_PLAYER(1)
PORT_START( "PENY" )
diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp
index bedc5cecea2..e4557039e0f 100644
--- a/src/mame/drivers/missile.cpp
+++ b/src/mame/drivers/missile.cpp
@@ -857,7 +857,7 @@ static INPUT_PORTS_START( missile )
PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, nullptr)
PORT_START("R10") /* IN2 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("R10:1,2")
@@ -939,7 +939,7 @@ static INPUT_PORTS_START( suprmatk )
PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, nullptr)
PORT_START("R10") /* IN2 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("R10:1,2")
diff --git a/src/mame/drivers/mjkjidai.cpp b/src/mame/drivers/mjkjidai.cpp
index 39cec562bc3..e0a7bb53113 100644
--- a/src/mame/drivers/mjkjidai.cpp
+++ b/src/mame/drivers/mjkjidai.cpp
@@ -163,7 +163,7 @@ static INPUT_PORTS_START( mjkjidai )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("KEYBOARD")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mjkjidai_state, keyboard_r, NULL)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mjkjidai_state, keyboard_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) // reinitialize NVRAM and reset the game
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp
index 2a1be4e22cf..ae98123c4e0 100644
--- a/src/mame/drivers/mmodular.cpp
+++ b/src/mame/drivers/mmodular.cpp
@@ -1536,7 +1536,7 @@ static MACHINE_CONFIG_START( sfortea, polgar_state )
MCFG_FRAGMENT_ADD( chess_common )
/* acia */
-// MCFG_MOS6551_ADD("acia65c51", XTAL_1_8432MHz, NULL)
+// MCFG_MOS6551_ADD("acia65c51", XTAL_1_8432MHz, nullptr)
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_M6502_irq, attotime::from_hz(600))
MCFG_TIMER_START_DELAY(attotime::from_hz(60))
@@ -1599,7 +1599,7 @@ static MACHINE_CONFIG_START( diablo68, polgar_state )
MCFG_FRAGMENT_ADD( chess_common )
/* acia */
-// MCFG_MOS6551_ADD("acia65c51", XTAL_1_8432MHz, NULL)
+// MCFG_MOS6551_ADD("acia65c51", XTAL_1_8432MHz, nullptr)
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq2, attotime::from_hz(60))
MCFG_TIMER_START_DELAY(attotime::from_hz(30))
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 3a92ee24a73..f25666833f0 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -1713,7 +1713,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( model2 )
PORT_START("1c00000")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, nullptr)
PORT_START("1c00004")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1")
@@ -1734,7 +1734,7 @@ static INPUT_PORTS_START( model2 )
PORT_START("1c0001c")
PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high
PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, nullptr)
PORT_START("IN0")
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -1914,7 +1914,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( manxtt )
PORT_START("1c00000")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, nullptr)
PORT_START("1c00004")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
@@ -1934,7 +1934,7 @@ static INPUT_PORTS_START( manxtt )
PORT_START("1c0001c")
PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high
PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, nullptr)
PORT_START("IN0")
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -1974,7 +1974,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( srallyc )
PORT_START("1c00000")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, nullptr)
PORT_START("1c00004")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
@@ -1994,7 +1994,7 @@ static INPUT_PORTS_START( srallyc )
PORT_START("1c0001c")
PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high
PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, nullptr)
PORT_START("IN0")
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -2010,7 +2010,7 @@ static INPUT_PORTS_START( srallyc )
PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
- PORT_BIT(0x0070, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,srallyc_gearbox_r, NULL)
+ PORT_BIT(0x0070, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,srallyc_gearbox_r, nullptr)
PORT_BIT(0x008f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2042,7 +2042,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( vcop2 )
PORT_START("1c00000")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, nullptr)
PORT_START("1c00004")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1")
@@ -2062,7 +2062,7 @@ static INPUT_PORTS_START( vcop2 )
PORT_START("1c0001c")
PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high
PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, nullptr)
PORT_START("IN0")
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -2105,7 +2105,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( bel )
PORT_START("1c00000")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, nullptr)
PORT_START("1c00004")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1")
@@ -2122,7 +2122,7 @@ static INPUT_PORTS_START( bel )
PORT_START("1c0001c")
PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high
PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, nullptr)
PORT_START("IN0")
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -2153,7 +2153,7 @@ static INPUT_PORTS_START( rchase2 )
PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("IN2")
- PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,rchase2_devices_r, NULL)
+ PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,rchase2_devices_r, nullptr)
/* FIXME: don't know yet if min max values are really correct, we'll see ... */
PORT_START("ANA0")
@@ -2172,7 +2172,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( skytargt )
PORT_START("1c00000")
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, nullptr)
PORT_START("1c00004")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1")
@@ -2193,7 +2193,7 @@ static INPUT_PORTS_START( skytargt )
PORT_START("1c0001c")
PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high
PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, nullptr)
PORT_START("IN0")
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp
index 46cd8bb571c..6bf36aa5080 100644
--- a/src/mame/drivers/mpu4vid.cpp
+++ b/src/mame/drivers/mpu4vid.cpp
@@ -1407,8 +1407,8 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( crmaze, mpu4_vid )
MCFG_DEVICE_MODIFY("pia_ic5")
MCFG_PIA_READPA_HANDLER(READ8(mpu4vid_state, pia_ic5_porta_track_r))
- MCFG_PIA_WRITEPA_HANDLER(NULL)
- MCFG_PIA_WRITEPB_HANDLER(NULL)
+ MCFG_PIA_WRITEPA_HANDLER(NOOP)
+ MCFG_PIA_WRITEPB_HANDLER(NOOP)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mating, crmaze )
diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp
index a42790ee244..32293c02c73 100644
--- a/src/mame/drivers/ms32.cpp
+++ b/src/mame/drivers/ms32.cpp
@@ -623,7 +623,7 @@ static INPUT_PORTS_START( ms32_mahjong )
PORT_INCLUDE( ms32 )
PORT_MODIFY("INPUTS")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ms32_state,mahjong_ctrl_r, NULL) // here we read mahjong keys
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ms32_state,mahjong_ctrl_r, nullptr) // here we read mahjong keys
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp
index a73c8117e1e..57ad3603e9f 100644
--- a/src/mame/drivers/multfish.cpp
+++ b/src/mame/drivers/multfish.cpp
@@ -714,7 +714,7 @@ INPUT_PORTS_START( igrosoft_gamble )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) // unused?
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igrosoft_gamble_state,igrosoft_gamble_hopper_r, NULL )// Hopper SW (22 B)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igrosoft_gamble_state,igrosoft_gamble_hopper_r, nullptr )// Hopper SW (22 B)
PORT_DIPNAME( 0x02, 0x02, "BK Door (17 A)" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -807,7 +807,7 @@ static INPUT_PORTS_START( rollfr )
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igrosoft_gamble_state,igrosoft_gamble_hopper_r, NULL )// Hopper SW (22 B)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igrosoft_gamble_state,igrosoft_gamble_hopper_r, nullptr )// Hopper SW (22 B)
PORT_DIPNAME( 0x02, 0x02, "BK Door (17 A)" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
diff --git a/src/mame/drivers/multi16.cpp b/src/mame/drivers/multi16.cpp
index 0852c166970..2e3dc0f7575 100644
--- a/src/mame/drivers/multi16.cpp
+++ b/src/mame/drivers/multi16.cpp
@@ -152,7 +152,7 @@ static MACHINE_CONFIG_START( multi16, multi16_state )
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), GND, NOOP)
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp
index 2a1c7772b6c..6c3ea662967 100644
--- a/src/mame/drivers/multigam.cpp
+++ b/src/mame/drivers/multigam.cpp
@@ -1011,7 +1011,7 @@ static INPUT_PORTS_START( multigam_common )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, multigam_state,multigam_inputs_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, multigam_state,multigam_inputs_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
INPUT_PORTS_END
diff --git a/src/mame/drivers/mw18w.cpp b/src/mame/drivers/mw18w.cpp
index 1b49a28f3f6..896db055fb5 100644
--- a/src/mame/drivers/mw18w.cpp
+++ b/src/mame/drivers/mw18w.cpp
@@ -204,7 +204,7 @@ static INPUT_PORTS_START( mw18w )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // left/right sw.
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw18w_state, mw18w_sensors_r, NULL)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw18w_state, mw18w_sensors_r, nullptr)
PORT_START("IN1")
PORT_BIT( 0x1f, 0x00, IPT_PEDAL ) PORT_REMAP_TABLE(mw18w_controller_table + 0x20) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_NAME("Gas Pedal")
diff --git a/src/mame/drivers/mw8080bw.cpp b/src/mame/drivers/mw8080bw.cpp
index 007071ee3f2..cc447c58aa1 100644
--- a/src/mame/drivers/mw8080bw.cpp
+++ b/src/mame/drivers/mw8080bw.cpp
@@ -379,7 +379,7 @@ static INPUT_PORTS_START( seawolf )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,seawolf_erase_input_r, NULL)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,seawolf_erase_input_r, nullptr)
PORT_DIPNAME( 0xe0, 0x60, "Extended Time At" ) PORT_DIPLOCATION("G4:6,7,8")
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPSETTING( 0x20, "2000" )
@@ -648,21 +648,21 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( tornbase )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_left_input_r, NULL)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_left_input_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_left_input_r, nullptr)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_left_input_r, nullptr)
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("B1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_right_input_r, NULL)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_right_input_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_right_input_r, nullptr)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_right_input_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED) /* not connected */
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* schematics shows it as "START", but not used by the software */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_score_input_r, NULL)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_score_input_r, nullptr)
PORT_DIPNAME( 0x78, 0x40, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("B1:2,3,4,5")
PORT_DIPSETTING( 0x18, "4 Coins/1 Inning" )
PORT_DIPSETTING( 0x10, "3 Coins/1 Inning" )
@@ -1220,10 +1220,10 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( desertgu )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_gun_input_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_gun_input_r, nullptr)
PORT_START("IN1")
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_dip_sw_0_1_r, NULL)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_dip_sw_0_1_r, nullptr)
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN1", 0x30, NOTEQUALS, 0x30) PORT_DIPLOCATION("C2:5,6")
PORT_DIPSETTING( 0x00, DEF_STR( English ) )
PORT_DIPSETTING( 0x04, DEF_STR( German ) )
@@ -1342,12 +1342,12 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( dplay )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Hit") PORT_PLAYER(1)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, NULL)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Hit") PORT_PLAYER(2)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, NULL)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("IN2")
@@ -1406,12 +1406,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( einning )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Hit") PORT_PLAYER(1)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, NULL)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Hit") PORT_PLAYER(2)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, NULL)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("IN2")
@@ -1725,7 +1725,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( clowns )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, nullptr)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* not connected */
@@ -1774,7 +1774,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( clowns1 )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, nullptr)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1862,7 +1862,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( spacwalk )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, nullptr)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2607,17 +2607,17 @@ static INPUT_PORTS_START( invaders )
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, NULL)
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, nullptr)
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
@@ -2630,7 +2630,7 @@ static INPUT_PORTS_START( invaders )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x08, "1000" )
PORT_DIPSETTING( 0x00, "1500" )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_DIPNAME( 0x80, 0x00, "Display Coinage" ) PORT_DIPLOCATION("SW:1")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2738,7 +2738,7 @@ static INPUT_PORTS_START( blueshrk )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,blueshrk_coin_input_r, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,blueshrk_coin_input_r, nullptr)
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2827,7 +2827,7 @@ static INPUT_PORTS_START( invad2ct )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/n64.cpp b/src/mame/drivers/n64.cpp
index f397d7a35b2..adfe47ee002 100644
--- a/src/mame/drivers/n64.cpp
+++ b/src/mame/drivers/n64.cpp
@@ -346,7 +346,7 @@ DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart)
//printf("Loading\n");
UINT8 data[0x30800];
battery_image->battery_load(data, 0x30800, 0x00);
- if (m_sram != NULL)
+ if (m_sram != nullptr)
{
memcpy(m_sram, data, 0x20000);
}
diff --git a/src/mame/drivers/nakajies.cpp b/src/mame/drivers/nakajies.cpp
index 42b71c93718..6e18dea6601 100644
--- a/src/mame/drivers/nakajies.cpp
+++ b/src/mame/drivers/nakajies.cpp
@@ -514,14 +514,14 @@ INPUT_CHANGED_MEMBER(nakajies_state::trigger_irq)
static INPUT_PORTS_START( nakajies )
PORT_START( "debug" )
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F1 ) PORT_NAME( "irq 0xff" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F2 ) PORT_NAME( "irq 0xfe" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F3 ) PORT_NAME( "irq 0xfd" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F4 ) PORT_NAME( "irq 0xfc" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F5 ) PORT_NAME( "irq 0xfb" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F6 ) PORT_NAME( "irq 0xfa" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F7 ) PORT_NAME( "irq 0xf9" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F8 ) PORT_NAME( "irq 0xf8" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, NULL )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F1 ) PORT_NAME( "irq 0xff" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F2 ) PORT_NAME( "irq 0xfe" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F3 ) PORT_NAME( "irq 0xfd" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F4 ) PORT_NAME( "irq 0xfc" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F5 ) PORT_NAME( "irq 0xfb" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F6 ) PORT_NAME( "irq 0xfa" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F7 ) PORT_NAME( "irq 0xf9" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE( KEYCODE_F8 ) PORT_NAME( "irq 0xf8" ) PORT_CHANGED_MEMBER(DEVICE_SELF, nakajies_state, trigger_irq, nullptr )
PORT_START( "ROW0" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Left Shift") PORT_CODE( KEYCODE_LSHIFT )
diff --git a/src/mame/drivers/namcond1.cpp b/src/mame/drivers/namcond1.cpp
index c2de731e5bb..1a4022c495f 100644
--- a/src/mame/drivers/namcond1.cpp
+++ b/src/mame/drivers/namcond1.cpp
@@ -214,7 +214,7 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state )
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "lspeaker", 1.00)
- MCFG_AT28C16_ADD( "at28c16", NULL )
+ MCFG_AT28C16_ADD( "at28c16", nullptr )
MCFG_YGV608_ADD("ygv608")
MCFG_YGV608_PALETTE("palette")
diff --git a/src/mame/drivers/namcos11.cpp b/src/mame/drivers/namcos11.cpp
index 4942c555e69..1c36939e343 100644
--- a/src/mame/drivers/namcos11.cpp
+++ b/src/mame/drivers/namcos11.cpp
@@ -599,7 +599,7 @@ static MACHINE_CONFIG_START( coh110, namcos11_state )
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "lspeaker", 1.00)
- MCFG_AT28C16_ADD( "at28c16", NULL )
+ MCFG_AT28C16_ADD( "at28c16", nullptr )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( coh100, coh110 )
diff --git a/src/mame/drivers/namcos12.cpp b/src/mame/drivers/namcos12.cpp
index 67f164a8835..c9aac3d4668 100644
--- a/src/mame/drivers/namcos12.cpp
+++ b/src/mame/drivers/namcos12.cpp
@@ -1682,7 +1682,7 @@ static MACHINE_CONFIG_START( coh700, namcos12_state )
MCFG_H8_SCI_TX_CALLBACK(DEVWRITELINE(":namco_settings", namco_settings_device, data_w))
MCFG_H8_SCI_CLK_CALLBACK(DEVWRITELINE(":clk_dispatch", devcb_line_dispatch_device<2>, in_w))
- MCFG_AT28C16_ADD("at28c16", NULL)
+ MCFG_AT28C16_ADD("at28c16", nullptr)
/* video hardware */
MCFG_PSXGPU_ADD( "maincpu", "gpu", CXD8654Q, 0x200000, XTAL_53_693175MHz )
diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp
index 8ec2028750b..ff872936921 100644
--- a/src/mame/drivers/namcos2.cpp
+++ b/src/mame/drivers/namcos2.cpp
@@ -1925,8 +1925,8 @@ static MACHINE_CONFIG_START( sgunner2, namcos2_state )
MCFG_M3745X_ADC14_CALLBACKS(IOPORT("AN0"), IOPORT("AN1"), IOPORT("AN2"), IOPORT("AN3"))
MCFG_M3745X_ADC58_CALLBACKS(IOPORT("AN4"), IOPORT("AN5"), IOPORT("AN6"), IOPORT("AN7"))
MCFG_M3745X_PORT3_CALLBACKS(IOPORT("MCUH"), WRITE8(namcos2_state, c68_p3_w)) // coins/test/service
- MCFG_M3745X_PORT5_CALLBACKS(READ8(namcos2_state, c68_p5_r), NULL) // muxed player 1/2
- MCFG_M3745X_PORT6_CALLBACKS(IOPORT("MCUC"), NULL) // unused in sgunner2
+ MCFG_M3745X_PORT5_CALLBACKS(READ8(namcos2_state, c68_p5_r), NOOP) // muxed player 1/2
+ MCFG_M3745X_PORT6_CALLBACKS(IOPORT("MCUC"), NOOP) // unused in sgunner2
MCFG_CPU_PROGRAM_MAP(c68_default_am)
MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_assert) // 37450 maps INT1 to irq0 as it's the first external interrupt on that chip
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index b727012f2ef..c2f9e7236a6 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -1445,7 +1445,7 @@ Notes:
Development ROM board:
There are a few unreleased and many prototype game versions known to exist on this ROM board.
-Currently Rumble Fish 1 and 2 prototypes is dumped.
+Currently Rumble Fish 1, Rumble Fish 2 prototypes and Sushi Bar is dumped.
PC BD SYSTEMX 3MODE FLASH Rev.B
1111-00001402
@@ -1576,7 +1576,6 @@ Chase 1929
Force Five
Kenju
Premier Eleven
-Sushi Bar
*/
@@ -2480,7 +2479,7 @@ static INPUT_PORTS_START( naomi_mp )
PORT_INCLUDE( naomi_debug )
PORT_START("OUTPUT")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_CHANGED_MEMBER(DEVICE_SELF, naomi_state,naomi_mp_w, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_CHANGED_MEMBER(DEVICE_SELF, naomi_state,naomi_mp_w, nullptr)
PORT_START("P1")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, naomi_state,naomi_mp_r, "KEY1\0KEY2\0KEY3\0KEY4\0KEY5")
@@ -9352,7 +9351,8 @@ ROM_START( rumblef2 )
ROM_LOAD( "ax3401f01.bin", 0, 4, CRC(952919a1) SHA1(d343fdbbd1d8b651401133f21facc1584bb66c04) )
ROM_END
-// Prototype, have internal text: (C)Dimps Tue Jan 11 14:32:45 2005 NONAME (build 0001)
+// Prototype ROM board
+// (C)Dimps Tue Jan 11 14:32:45 2005 NONAME (build 0001)
ROM_START( rumblf2p )
AW_BIOS
@@ -9432,6 +9432,25 @@ ROM_START( basschal )
ROM_LOAD( "315-6248.bin", 0x000000, 0x000004, CRC(553dd361) SHA1(a60a26b5ee786cf0bb3d09bb6f00374598fbd7cc) )
ROM_END
+// Prototype ROM board
+// Build:May 23 2003 14:40:15
+ROM_START( sushibar )
+ AW_BIOS
+
+ ROM_REGION( 0x8000000, "rom_board", ROMREGION_ERASEFF)
+ ROM_LOAD("ic12", 0x00000000, 0x00800000, CRC(06a2ed58) SHA1(a807fa8c1c83cb8b18595c210479d5f1dd6be4ca) )
+ // IC 13 populated, empty
+ ROM_LOAD("ic14", 0x01000000, 0x00800000, CRC(4860f944) SHA1(55c75630c33cba35512a1349650f28fd56757f9f) )
+ ROM_LOAD("ic15", 0x01800000, 0x00800000, CRC(7113506c) SHA1(0548d67b3a1c0b8f17fcafd4fe5c1e6b0e91b6e7) )
+ ROM_LOAD("ic16", 0x02000000, 0x00800000, CRC(77e8e39e) SHA1(1286010cdba5c3c0ad5cbe19718fd0f8e5f579db) )
+ ROM_LOAD("ic17", 0x02800000, 0x00800000, CRC(0eba54ea) SHA1(51842ec326a5ba65bd280e652e7d9b395a2586c6) )
+ ROM_LOAD("ic18", 0x03000000, 0x00800000, CRC(b9957c76) SHA1(6d72c7ac8e1e0cbed7eb01b66f71bedf46a833e1) )
+ // IC19 - IC27 populated, empty
+
+ ROM_REGION( 4, "rom_key", 0 )
+ ROM_LOAD( "julie_dev.bin", 0, 4, CRC(757054c4) SHA1(7d5556d0940c582adbcf5697c7b81453d0c91153) )
+ROM_END
+
/* All games have the regional titles at the start of the IC22 rom in the following order
JAPAN
@@ -9783,6 +9802,7 @@ GAME( 2003, demofist, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "P
GAME( 2003, dolphin, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sammy", "Dolphin Blue", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND|MACHINE_NOT_WORKING )
GAME( 2003, kov7sprt, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "IGS / Sammy", "Knights of Valour - The Seven Spirits", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND|MACHINE_NOT_WORKING )
GAME( 2003, ggisuka, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Arc System Works / Sammy", "Guilty Gear Isuka", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND|MACHINE_NOT_WORKING )
+GAME( 2003, sushibar, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sammy", "Sushi Bar", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND )
GAME( 2004, dirtypig, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sammy", "Dirty Pigskin Football", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND|MACHINE_NOT_WORKING )
GAME( 2004, rumblef, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sammy / Dimps", "The Rumble Fish", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND|MACHINE_NOT_WORKING )
GAME( 2004, rumblefp, rumblef, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sammy / Dimps", "The Rumble Fish (prototype)", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND|MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp
index 66f0b5d16ee..486b8a676c6 100644
--- a/src/mame/drivers/nbmj8688.cpp
+++ b/src/mame/drivers/nbmj8688.cpp
@@ -432,7 +432,7 @@ static INPUT_PORTS_START( mjsikaku )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -537,7 +537,7 @@ static INPUT_PORTS_START( mmsikaku )
#endif
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -603,7 +603,7 @@ static INPUT_PORTS_START( otonano )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -669,7 +669,7 @@ static INPUT_PORTS_START( mjcamera )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -732,7 +732,7 @@ static INPUT_PORTS_START( kaguya )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
@@ -799,7 +799,7 @@ static INPUT_PORTS_START( kaguya2 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
@@ -864,7 +864,7 @@ static INPUT_PORTS_START( kanatuen )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -928,7 +928,7 @@ static INPUT_PORTS_START( kyuhito )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -993,7 +993,7 @@ static INPUT_PORTS_START( idhimitu )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1058,7 +1058,7 @@ static INPUT_PORTS_START( secolove )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1123,7 +1123,7 @@ static INPUT_PORTS_START( barline )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1233,7 +1233,7 @@ static INPUT_PORTS_START( citylove )
PORT_DIPSETTING( 0x00, "HAIPAI" )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1295,7 +1295,7 @@ static INPUT_PORTS_START( mcitylov )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1361,7 +1361,7 @@ static INPUT_PORTS_START( seiha )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1425,7 +1425,7 @@ static INPUT_PORTS_START( seiham )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1491,7 +1491,7 @@ static INPUT_PORTS_START( iemoto )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1555,7 +1555,7 @@ static INPUT_PORTS_START( iemotom )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1620,7 +1620,7 @@ static INPUT_PORTS_START( ryuuha )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1685,7 +1685,7 @@ static INPUT_PORTS_START( bijokkoy )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1761,7 +1761,7 @@ static INPUT_PORTS_START( bijokkog )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1837,7 +1837,7 @@ static INPUT_PORTS_START( housemnq )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1912,7 +1912,7 @@ static INPUT_PORTS_START( housemn2 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -1990,7 +1990,7 @@ static INPUT_PORTS_START( orangec )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2055,7 +2055,7 @@ static INPUT_PORTS_START( orangeci )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2120,7 +2120,7 @@ static INPUT_PORTS_START( vipclub )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2183,7 +2183,7 @@ static INPUT_PORTS_START( livegal )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2261,7 +2261,7 @@ static INPUT_PORTS_START( ojousan )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -2325,7 +2325,7 @@ static INPUT_PORTS_START( ojousanm )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2391,7 +2391,7 @@ static INPUT_PORTS_START( korinai )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2455,7 +2455,7 @@ static INPUT_PORTS_START( korinaim )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2519,7 +2519,7 @@ static INPUT_PORTS_START( crystalg )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2581,7 +2581,7 @@ static INPUT_PORTS_START( crystal2 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -2643,7 +2643,7 @@ static INPUT_PORTS_START( apparel )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
@@ -2713,7 +2713,7 @@ static INPUT_PORTS_START( nightlov )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_TOGGLE // ANALYZER
diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp
index f1278134092..c38200bf48a 100644
--- a/src/mame/drivers/nbmj8891.cpp
+++ b/src/mame/drivers/nbmj8891.cpp
@@ -614,7 +614,7 @@ static INPUT_PORTS_START( hanamomo )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -687,7 +687,7 @@ static INPUT_PORTS_START( mjcamerb )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -753,7 +753,7 @@ static INPUT_PORTS_START( mmcamera )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -819,7 +819,7 @@ static INPUT_PORTS_START( msjiken )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -905,7 +905,7 @@ static INPUT_PORTS_START( telmahjn )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -990,7 +990,7 @@ static INPUT_PORTS_START( gionbana )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1056,7 +1056,7 @@ static INPUT_PORTS_START( mgion )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1122,7 +1122,7 @@ static INPUT_PORTS_START( omotesnd )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1187,7 +1187,7 @@ static INPUT_PORTS_START( abunai )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1253,7 +1253,7 @@ static INPUT_PORTS_START( mgmen89 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1322,7 +1322,7 @@ static INPUT_PORTS_START( mjfocus )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1386,7 +1386,7 @@ static INPUT_PORTS_START( mjfocusm )
PORT_DIPSETTING( 0x00, "B" )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1452,7 +1452,7 @@ static INPUT_PORTS_START( peepshow )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1518,7 +1518,7 @@ static INPUT_PORTS_START( scandal )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1582,7 +1582,7 @@ static INPUT_PORTS_START( scandalm )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1648,7 +1648,7 @@ static INPUT_PORTS_START( mjnanpas )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1714,7 +1714,7 @@ static INPUT_PORTS_START( mjnanpaa )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1783,7 +1783,7 @@ static INPUT_PORTS_START( bananadr )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1848,7 +1848,7 @@ static INPUT_PORTS_START( club90s )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1915,7 +1915,7 @@ static INPUT_PORTS_START( lovehous )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1928,7 +1928,7 @@ static INPUT_PORTS_START( lovehous )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1990,7 +1990,7 @@ static INPUT_PORTS_START( mladyhtr )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -2055,7 +2055,7 @@ static INPUT_PORTS_START( chinmoku )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -2121,7 +2121,7 @@ static INPUT_PORTS_START( maiko )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) //
@@ -2134,7 +2134,7 @@ static INPUT_PORTS_START( maiko )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) //
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) //
@@ -2197,7 +2197,7 @@ static INPUT_PORTS_START( mmaiko )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2210,7 +2210,7 @@ static INPUT_PORTS_START( mmaiko )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2273,7 +2273,7 @@ static INPUT_PORTS_START( hanaoji )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) //
@@ -2286,7 +2286,7 @@ static INPUT_PORTS_START( hanaoji )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) //
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) //
@@ -2348,7 +2348,7 @@ static INPUT_PORTS_START( pairsnb )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2451,7 +2451,7 @@ static INPUT_PORTS_START( taiwanmb )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // COIN OUT
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp
index e0ce7540cdd..d72dc2067c2 100644
--- a/src/mame/drivers/nbmj8991.cpp
+++ b/src/mame/drivers/nbmj8991.cpp
@@ -286,7 +286,7 @@ static INPUT_PORTS_START( pstadium )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -351,7 +351,7 @@ static INPUT_PORTS_START( triplew1 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -416,7 +416,7 @@ static INPUT_PORTS_START( ntopstar )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -481,7 +481,7 @@ static INPUT_PORTS_START( mjlstory )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -546,7 +546,7 @@ static INPUT_PORTS_START( vanilla )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -613,7 +613,7 @@ static INPUT_PORTS_START( finalbny )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -678,7 +678,7 @@ static INPUT_PORTS_START( qmhayaku )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -744,7 +744,7 @@ static INPUT_PORTS_START( galkoku )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -813,7 +813,7 @@ static INPUT_PORTS_START( hyouban )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -882,7 +882,7 @@ static INPUT_PORTS_START( galkaika )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -951,7 +951,7 @@ static INPUT_PORTS_START( tokyogal )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1020,7 +1020,7 @@ static INPUT_PORTS_START( tokimbsj )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1089,7 +1089,7 @@ static INPUT_PORTS_START( mcontest )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1158,7 +1158,7 @@ static INPUT_PORTS_START( uchuuai )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1227,7 +1227,7 @@ static INPUT_PORTS_START( mjgottub )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1291,7 +1291,7 @@ static INPUT_PORTS_START( av2mj1bb )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -1358,7 +1358,7 @@ static INPUT_PORTS_START( av2mj2rg )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8991_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp
index dbf8ab1947e..027f6e76900 100644
--- a/src/mame/drivers/neogeo.cpp
+++ b/src/mame/drivers/neogeo.cpp
@@ -1328,7 +1328,7 @@ INPUT_PORTS_START( neogeo )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_3)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_4)
- PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, get_memcard_status, NULL)
+ PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, get_memcard_status, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* Hardware type (AES=0, MVS=1). Some games check this and show a piracy warning screen if the hardware and BIOS don't match */
PORT_START("AUDIO/COIN")
@@ -1340,7 +1340,7 @@ INPUT_PORTS_START( neogeo )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* what is this? When ACTIVE_HIGH + IN4 bit 6 ACTIVE_LOW MVS-4 slot is detected */
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("upd4990a", upd1990a_device, tp_r)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("upd4990a", upd1990a_device, data_out_r)
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_audio_result, NULL)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_audio_result, nullptr)
PORT_START("TEST")
PORT_BIT( 0x003f, IP_ACTIVE_HIGH, IPT_UNUSED )
@@ -1411,7 +1411,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_DERIVED( neogeo_arcade, neogeo_base )
MCFG_WATCHDOG_TIME_INIT(attotime::from_ticks(3244030, NEOGEO_MASTER_CLOCK))
- MCFG_UPD4990A_ADD("upd4990a", XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD4990A_ADD("upd4990a", XTAL_32_768kHz, NOOP, NOOP)
MCFG_NVRAM_ADD_0FILL("saveram")
MCFG_NEOGEO_MEMCARD_ADD("memcard")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/neogeo_noslot.cpp b/src/mame/drivers/neogeo_noslot.cpp
index 1fe7d6c8203..f26bc91687a 100644
--- a/src/mame/drivers/neogeo_noslot.cpp
+++ b/src/mame/drivers/neogeo_noslot.cpp
@@ -230,7 +230,7 @@ static INPUT_PORTS_START( kizuna4p )
PORT_DIPSETTING( 0x00, "4" )
PORT_MODIFY("SYSTEM")
- PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_start_r, NULL)
+ PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_start_r, nullptr)
INPUT_PORTS_END
static INPUT_PORTS_START( irrmaze )
@@ -8541,6 +8541,28 @@ ROM_START( diggerma ) /* Unlicensed Prototype, no official game ID # */
ROM_LOAD16_BYTE( "dig-c2.bin", 0x000001, 0x080000, CRC(3e632161) SHA1(83711c4286fb1d9f3f91414ac6e5fed36618033e) ) /* Plane 2,3 */
ROM_END
+// MVS cart
+ROM_START( lasthope )
+ ROM_REGION( 0x100000, "maincpu", 0 )
+ ROM_LOAD16_WORD_SWAP( "NGDT-300-P1.bin", 0x000000, 0x100000, CRC(3776a88f) SHA1(ea8b669da06d7c6b5ff7fa97a195f56a9253a7a1) )
+
+ NEO_SFIX_64K( "NGDT-300-S1.bin", CRC(0c0ff9e6) SHA1(c87d1ea8731ac1e63ab960b8182dd1043bcc10bb) )
+
+ NEO_BIOS_AUDIO_128K( "NGDT-300-M1.bin", CRC(113c870f) SHA1(854425eb4be0d7fa088a6c3bf6078fdd011707f5) )
+
+ ROM_REGION( 0x600000, "ymsnd", 0 )
+ ROM_LOAD( "NGDT-300-V1.bin", 0x000000, 0x200000, CRC(b765bafe) SHA1(b2048c44089bf250c8dcfabb27c7981e9ee5002a) )
+ ROM_LOAD( "NGDT-300-V2.bin", 0x200000, 0x200000, CRC(9fd0d559) SHA1(09e70d5e1c6e172a33f48feb3e442515c34a8f3d) )
+ ROM_LOAD( "NGDT-300-V3.bin", 0x400000, 0x200000, CRC(6d5107e2) SHA1(4ba74836e3d0421a28af47d3d8341ac16af1d7d7) )
+
+ NO_DELTAT_REGION
+
+ ROM_REGION( 0x1000000, "sprites", 0 )
+ ROM_LOAD16_BYTE( "NGDT-300-C1.bin", 0x000000, 0x400000, CRC(53ef41b5) SHA1(a8f1fe546403b609e12f0df211c05d7ac479d98d) ) /* Plane 0,1 */
+ ROM_LOAD16_BYTE( "NGDT-300-C2.bin", 0x000001, 0x400000, CRC(f9b15ab3) SHA1(d8ff2f43686bfc8c2f7ead3ef445e51c15dfbf16) ) /* Plane 2,3 */
+ ROM_LOAD16_BYTE( "NGDT-300-C3.bin", 0x800000, 0x400000, CRC(50cc21cf) SHA1(0350aaef480c5fa12e68e540a4c974dbf5870add) ) /* Plane 0,1 */
+ ROM_LOAD16_BYTE( "NGDT-300-C4.bin", 0x800001, 0x400000, CRC(8486ad9e) SHA1(19a2a73c825687e0cb9fd62bde00db91b5409529)) /* Plane 2,3 */
+ROM_END
/*************************************
@@ -9889,7 +9911,7 @@ GAME( 2000, diggerma, neogeo, neogeo_noslot, neogeo, neogeo_state, neoge
GAME( 2004, sbp, neogeo, neogeo_noslot, neogeo, neogeo_noslot_state, sbp, ROT0, "Vektorlogic", "Super Bubble Pop", MACHINE_NOT_WORKING )
/* NG:DEV.TEAM */
-// Last Hope (c)2006 - AES/NEOCD (has no MVS mode)
+GAME( 2005, lasthope, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "NG:DEV.TEAM", "Last Hope (bootleg AES to MVS conversion, no coin support)", MACHINE_SUPPORTS_SAVE ) // wasn't actually released on MVS but bootleg carts have been sold, this doesn't accept coins, runs like a console game
// Last Hope Pink Bullets (c)2008 - MVS/AES
// Fast Striker (c)2010 - MVS/AES
// Fast Striker 1.5 (c)2010 - MVS/AES
diff --git a/src/mame/drivers/neoprint.cpp b/src/mame/drivers/neoprint.cpp
index 34a6d772df7..bfa5cf007bd 100644
--- a/src/mame/drivers/neoprint.cpp
+++ b/src/mame/drivers/neoprint.cpp
@@ -488,7 +488,7 @@ static MACHINE_CONFIG_START( neoprint, neoprint_state )
MCFG_CPU_PROGRAM_MAP(neoprint_audio_map)
MCFG_CPU_IO_MAP(neoprint_audio_io_map)
- MCFG_UPD4990A_ADD("upd4990a", XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD4990A_ADD("upd4990a", XTAL_32_768kHz, NOOP, NOOP)
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", neoprint)
@@ -529,7 +529,7 @@ static MACHINE_CONFIG_START( nprsp, neoprint_state )
MCFG_CPU_PROGRAM_MAP(neoprint_audio_map)
MCFG_CPU_IO_MAP(neoprint_audio_io_map)
- MCFG_UPD4990A_ADD("upd4990a", XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD4990A_ADD("upd4990a", XTAL_32_768kHz, NOOP, NOOP)
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", neoprint)
diff --git a/src/mame/drivers/ng_aes.cpp b/src/mame/drivers/ng_aes.cpp
index dacd14c15fb..755b1e2c01e 100644
--- a/src/mame/drivers/ng_aes.cpp
+++ b/src/mame/drivers/ng_aes.cpp
@@ -250,14 +250,14 @@ static INPUT_PORTS_START( aes )
PORT_START("IN2")
PORT_BIT( 0x0fff, IP_ACTIVE_LOW, IPT_UNUSED )
// Start & Select are read from controller slot device
- PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, get_memcard_status, NULL)
+ PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, get_memcard_status, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Hardware type (AES=0, MVS=1) Some games check this and show a piracy warning screen if the hardware and BIOS don't match */
PORT_START("AUDIO")
PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNUSED ) /* AES has no coin slots, it's a console */
PORT_BIT( 0x0018, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* what is this? Universe BIOS uses these bits to detect MVS or AES hardware */
PORT_BIT( 0x00e0, IP_ACTIVE_HIGH, IPT_UNUSED ) /* AES has no upd4990a */
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, get_audio_result, NULL)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, get_audio_result, nullptr)
PORT_START("JP") // JP1 and JP2 are jumpers or solderpads depending on AES board revision, intended for use on the Development BIOS
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Short JP1 (Debug Monitor)") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, ng_aes_state, aes_jp1, 0)
diff --git a/src/mame/drivers/ngen.cpp b/src/mame/drivers/ngen.cpp
index 388ad075d74..63778115301 100644
--- a/src/mame/drivers/ngen.cpp
+++ b/src/mame/drivers/ngen.cpp
@@ -918,7 +918,7 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
MCFG_80186_TMROUT0_HANDLER(WRITELINE(ngen_state, cpu_timer_w))
MCFG_80186_IRQ_SLAVE_ACK(READ8(ngen_state, irq_cb))
- MCFG_PIC8259_ADD( "pic", DEVWRITELINE("maincpu",i80186_cpu_device,int0_w), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic", DEVWRITELINE("maincpu",i80186_cpu_device,int0_w), VCC, NOOP)
MCFG_DEVICE_ADD("pit", PIT8254, 0)
MCFG_PIT8253_CLK0(78120/4) // 19.53kHz, /4 of the CPU timer output?
@@ -1028,7 +1028,7 @@ static MACHINE_CONFIG_START( ngen386, ngen386_state )
MCFG_CPU_IO_MAP(ngen386_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD( "pic", INPUTLINE("i386cpu",0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic", INPUTLINE("i386cpu",0), VCC, NOOP)
MCFG_DEVICE_ADD("pit", PIT8254, 0)
MCFG_PIT8253_CLK0(78120/4) // 19.53kHz, /4 of the CPU timer output?
diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp
index ac01a692443..eb8ffe0867c 100644
--- a/src/mame/drivers/ngp.cpp
+++ b/src/mame/drivers/ngp.cpp
@@ -617,7 +617,7 @@ static INPUT_PORTS_START( ngp )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("Power")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, ngp_state, power_callback, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POWER_ON ) PORT_CHANGED_MEMBER(DEVICE_SELF, ngp_state, power_callback, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp
index af71f1f08dd..4b975ec2293 100644
--- a/src/mame/drivers/ninjakd2.cpp
+++ b/src/mame/drivers/ninjakd2.cpp
@@ -172,7 +172,7 @@ TODO:
SAMPLES_START_CB_MEMBER(ninjakd2_state::ninjakd2_init_samples)
{
- if (m_pcm_region == NULL)
+ if (m_pcm_region == nullptr)
{
return;
}
@@ -193,7 +193,7 @@ SAMPLES_START_CB_MEMBER(ninjakd2_state::ninjakd2_init_samples)
WRITE8_MEMBER(ninjakd2_state::ninjakd2_pcm_play_w)
{
// only Ninja Kid II uses this
- if (m_pcm_region == NULL)
+ if (m_pcm_region == nullptr)
{
return;
}
diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp
index d96baa66ced..6a45d78eba4 100644
--- a/src/mame/drivers/niyanpai.cpp
+++ b/src/mame/drivers/niyanpai.cpp
@@ -511,7 +511,7 @@ static INPUT_PORTS_START( musobana ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
@@ -577,7 +577,7 @@ static INPUT_PORTS_START( 4psimasy ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
@@ -643,7 +643,7 @@ static INPUT_PORTS_START( mhhonban ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
@@ -709,7 +709,7 @@ static INPUT_PORTS_START( zokumahj ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index e800503c801..9a3ab8e7a62 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -100,7 +100,7 @@ public:
m_dac(*this, "dac"),
m_fdc(*this, "wd1791"),
m_floppy0(*this, "wd1791:0"),
- m_floppy(NULL)
+ m_floppy(nullptr)
{
}
// devices
@@ -781,14 +781,14 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state )
MCFG_CPU_PROGRAM_MAP(notetaker_iocpu_mem)
MCFG_CPU_IO_MAP(notetaker_iocpu_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("iopic8259", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("iopic8259", INPUTLINE("iocpu", 0), VCC, NULL) // iP8259A-2 @ E6
+ MCFG_PIC8259_ADD("iopic8259", INPUTLINE("iocpu", 0), VCC, NOOP) // iP8259A-2 @ E6
/* Emulator CPU: 8086@5MHz */
/*MCFG_CPU_ADD("emulatorcpu", I8086, XTAL_15MHz/3)
MCFG_CPU_PROGRAM_MAP(notetaker_emulatorcpu_mem)
MCFG_CPU_IO_MAP(notetaker_emulatorcpu_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("emulatorpic8259", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("emulatorpic8259", INPUTLINE("emulatorcpu", 0), VCC, NULL) // iP8259A-2 @ E6
+ MCFG_PIC8259_ADD("emulatorpic8259", INPUTLINE("emulatorcpu", 0), VCC, NOOP) // iP8259A-2 @ E6
*/
/* video hardware */
diff --git a/src/mame/drivers/nova2001.cpp b/src/mame/drivers/nova2001.cpp
index 92a03fe3400..c80030d6e40 100644
--- a/src/mame/drivers/nova2001.cpp
+++ b/src/mame/drivers/nova2001.cpp
@@ -385,7 +385,7 @@ static INPUT_PORTS_START( ninjakun )
PORT_START("IN2") /* 0xa002 */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nova2001_state,ninjakun_io_A002_ctrl_r, NULL)
+ PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nova2001_state,ninjakun_io_A002_ctrl_r, nullptr)
PORT_START("DSW1") // printed "SW 2"
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1")
diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp
index 0497f3e01d0..8f099771bc0 100644
--- a/src/mame/drivers/nss.cpp
+++ b/src/mame/drivers/nss.cpp
@@ -640,7 +640,7 @@ static INPUT_PORTS_START( snes )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_START("FP")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nss_state,game_over_flag_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nss_state,game_over_flag_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Restart Button")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Page Up Button")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_NAME("Page Down Button")
diff --git a/src/mame/drivers/omegrace.cpp b/src/mame/drivers/omegrace.cpp
index acf7aae26de..59de28612f6 100644
--- a/src/mame/drivers/omegrace.cpp
+++ b/src/mame/drivers/omegrace.cpp
@@ -479,7 +479,7 @@ static INPUT_PORTS_START( omegrace )
PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_COCKTAIL
PORT_START("AVGDVG") /* port 0x0b */
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp
index 826402fbb1e..8503b06559f 100644
--- a/src/mame/drivers/opwolf.cpp
+++ b/src/mame/drivers/opwolf.cpp
@@ -627,11 +627,11 @@ static INPUT_PORTS_START( opwolf )
PORT_START("IN2")
- PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, opwolf_state, opwolf_gun_x_r, NULL)
+ PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, opwolf_state, opwolf_gun_x_r, nullptr)
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3")
- PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, opwolf_state, opwolf_gun_y_r, NULL)
+ PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, opwolf_state, opwolf_gun_y_r, nullptr)
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START(P1X_PORT_TAG) /* P1X (span allows you to shoot enemies behind status bar) */
diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp
index 1711f63eb67..ccc5e72f438 100644
--- a/src/mame/drivers/palm.cpp
+++ b/src/mame/drivers/palm.cpp
@@ -232,7 +232,7 @@ static INPUT_PORTS_START( palm )
PORT_BIT( 0xff, 0x50, IPT_LIGHTGUN_Y ) PORT_NAME("Pen Y") PORT_MINMAX(0, 0xa0) PORT_SENSITIVITY(50) PORT_CROSSHAIR(Y, 1.0, 0.0, 0)
PORT_START( "PENB" )
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pen Button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, palm_state, pen_check, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pen Button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, palm_state, pen_check, nullptr)
PORT_START( "PORTD" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Power") PORT_CODE(KEYCODE_D) PORT_CHANGED_MEMBER(DEVICE_SELF, palm_state, button_check, (void*)0)
diff --git a/src/mame/drivers/paso1600.cpp b/src/mame/drivers/paso1600.cpp
index a9f5f025a9a..2418d79456f 100644
--- a/src/mame/drivers/paso1600.cpp
+++ b/src/mame/drivers/paso1600.cpp
@@ -321,7 +321,7 @@ static MACHINE_CONFIG_START( paso1600, paso1600_state )
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), GND, NOOP)
MCFG_DEVICE_ADD("8237dma", AM9517A, 16000000/4)
MCFG_I8237_IN_MEMR_CB(READ8(paso1600_state, pc_dma_read_byte))
diff --git a/src/mame/drivers/pastelg.cpp b/src/mame/drivers/pastelg.cpp
index 2de48e4493f..668caab5033 100644
--- a/src/mame/drivers/pastelg.cpp
+++ b/src/mame/drivers/pastelg.cpp
@@ -204,7 +204,7 @@ static INPUT_PORTS_START( pastelg )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pastelg_state, nb1413m3_busyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pastelg_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -374,7 +374,7 @@ static INPUT_PORTS_START( threeds )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pastelg_state,nb1413m3_hackbusyflag_r, NULL) // DRAW BUSY
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pastelg_state,nb1413m3_hackbusyflag_r, nullptr) // DRAW BUSY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST
diff --git a/src/mame/drivers/pc100.cpp b/src/mame/drivers/pc100.cpp
index 01ba55c2bda..0df23d17ee1 100644
--- a/src/mame/drivers/pc100.cpp
+++ b/src/mame/drivers/pc100.cpp
@@ -472,7 +472,7 @@ static MACHINE_CONFIG_START( pc100, pc100_state )
MCFG_I8255_OUT_PORTB_CB(WRITE8(pc100_state, upper_mask_w))
MCFG_I8255_OUT_PORTC_CB(WRITE8(pc100_state, crtc_bank_w))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), GND, NOOP)
MCFG_UPD765A_ADD("upd765", true, true)
diff --git a/src/mame/drivers/pc1500.cpp b/src/mame/drivers/pc1500.cpp
index a916c5658b4..930b83a0be6 100644
--- a/src/mame/drivers/pc1500.cpp
+++ b/src/mame/drivers/pc1500.cpp
@@ -283,7 +283,7 @@ static MACHINE_CONFIG_START( pc1500, pc1500_state )
MCFG_LH5810_PORTC_W_CB(WRITE8(pc1500_state, port_c_w))
MCFG_LH5810_OUT_INT_CB(INPUTLINE("maincpu", LH5801_LINE_MI))
- MCFG_UPD1990A_ADD("upd1990a", XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD("upd1990a", XTAL_32_768kHz, NOOP, NOOP)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pc1512.cpp b/src/mame/drivers/pc1512.cpp
index 03a78d17fc3..0208c593f97 100644
--- a/src/mame/drivers/pc1512.cpp
+++ b/src/mame/drivers/pc1512.cpp
@@ -1237,7 +1237,7 @@ static MACHINE_CONFIG_START( pc1512, pc1512_state )
MCFG_I8237_OUT_DACK_1_CB(WRITELINE(pc1512_state, dack1_w))
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(pc1512_state, dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(pc1512_state, dack3_w))
- MCFG_PIC8259_ADD(I8259A2_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A2_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(I8253_TAG, PIT8253, 0)
MCFG_PIT8253_CLK0(XTAL_28_63636MHz/24)
@@ -1357,7 +1357,7 @@ static MACHINE_CONFIG_START( pc1640, pc1640_state )
MCFG_I8237_OUT_DACK_1_CB(WRITELINE(pc1512_state, dack1_w))
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(pc1512_state, dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(pc1512_state, dack3_w))
- MCFG_PIC8259_ADD(I8259A2_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A2_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(I8253_TAG, PIT8253, 0)
MCFG_PIT8253_CLK0(XTAL_28_63636MHz/24)
diff --git a/src/mame/drivers/pc2000.cpp b/src/mame/drivers/pc2000.cpp
index b207dd72fec..43c630303e1 100644
--- a/src/mame/drivers/pc2000.cpp
+++ b/src/mame/drivers/pc2000.cpp
@@ -748,7 +748,7 @@ void pc2000_state::machine_start()
std::string region_tag;
UINT8 *bios = memregion("bios")->base();
memory_region *cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
- UINT8 *cart = (cart_region != NULL) ? cart_region->base() : memregion("bios")->base();
+ UINT8 *cart = (cart_region != nullptr) ? cart_region->base() : memregion("bios")->base();
m_bank0->configure_entries(0, 0x10, bios, 0x4000);
m_bank1->configure_entries(0, 0x10, bios, 0x4000);
@@ -761,7 +761,7 @@ void gl4004_state::machine_start()
std::string region_tag;
UINT8 *bios = memregion("bios")->base();
memory_region *cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
- UINT8 *cart = (cart_region != NULL) ? cart_region->base() : memregion("bios")->base();
+ UINT8 *cart = (cart_region != nullptr) ? cart_region->base() : memregion("bios")->base();
m_bank0->configure_entries(0, 0x20, bios, 0x4000);
m_bank1->configure_entries(0, 0x20, bios, 0x4000);
diff --git a/src/mame/drivers/pc6001.cpp b/src/mame/drivers/pc6001.cpp
index 0372eec0460..9abf639ea1d 100644
--- a/src/mame/drivers/pc6001.cpp
+++ b/src/mame/drivers/pc6001.cpp
@@ -2234,9 +2234,9 @@ PALETTE_INIT_MEMBER(pc6001_state,pc6001m2)
static const cassette_interface pc6001_cassette_interface =
{
pc6001_cassette_formats,
- NULL,
+ nullptr,
(cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED),
- NULL
+ nullptr
};
#endif
diff --git a/src/mame/drivers/pc8001.cpp b/src/mame/drivers/pc8001.cpp
index fd95aa724b6..6069beefcbd 100644
--- a/src/mame/drivers/pc8001.cpp
+++ b/src/mame/drivers/pc8001.cpp
@@ -501,7 +501,7 @@ static MACHINE_CONFIG_START( pc8001, pc8001_state )
MCFG_I8257_IN_MEMR_CB(READ8(pc8001_state, dma_mem_r))
MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8(UPD3301_TAG, upd3301_device, dack_w))
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, 14318180)
MCFG_UPD3301_CHARACTER_WIDTH(8)
@@ -550,7 +550,7 @@ static MACHINE_CONFIG_START( pc8001mk2, pc8001mk2_state )
MCFG_I8257_IN_MEMR_CB(READ8(pc8001_state, dma_mem_r))
MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8(UPD3301_TAG, upd3301_device, dack_w))
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, 14318180)
MCFG_UPD3301_CHARACTER_WIDTH(8)
diff --git a/src/mame/drivers/pc8401a.cpp b/src/mame/drivers/pc8401a.cpp
index 80bdf86f708..c2c6c179151 100644
--- a/src/mame/drivers/pc8401a.cpp
+++ b/src/mame/drivers/pc8401a.cpp
@@ -577,7 +577,7 @@ static MACHINE_CONFIG_START( pc8401a, pc8401a_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", pc8401a_state, pc8401a_keyboard_tick, attotime::from_hz(64))
/* devices */
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
MCFG_DEVICE_ADD(I8255A_TAG, I8255A, 0)
MCFG_I8255_IN_PORTC_CB(READ8(pc8401a_state, ppi_pc_r))
@@ -619,7 +619,7 @@ static MACHINE_CONFIG_START( pc8500, pc8500_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", pc8401a_state, pc8401a_keyboard_tick, attotime::from_hz(64))
/* devices */
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
MCFG_DEVICE_ADD(I8255A_TAG, I8255A, 0)
MCFG_I8255_IN_PORTC_CB(READ8(pc8401a_state, ppi_pc_r))
diff --git a/src/mame/drivers/pc8801.cpp b/src/mame/drivers/pc8801.cpp
index 091d394d1d2..a2d9da47c02 100644
--- a/src/mame/drivers/pc8801.cpp
+++ b/src/mame/drivers/pc8801.cpp
@@ -2241,7 +2241,7 @@ SLOT_INTERFACE_END
static const cassette_interface pc88_cassette_interface =
{
cassette_default_formats, // we need T88 format support!
- NULL,
+ nullptr,
(cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED),
"pc8801_cass"
};
@@ -2598,7 +2598,7 @@ static MACHINE_CONFIG_START( pc8801, pc8801_state )
#ifdef USE_PROPER_I8214
MCFG_I8214_ADD(I8214_TAG, MASTER_CLOCK, pic_intf)
#endif
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
//MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
diff --git a/src/mame/drivers/pc88va.cpp b/src/mame/drivers/pc88va.cpp
index a7f2590a698..37b2dc73f7e 100644
--- a/src/mame/drivers/pc88va.cpp
+++ b/src/mame/drivers/pc88va.cpp
@@ -1822,7 +1822,7 @@ static MACHINE_CONFIG_START( pc88va, pc88va_state )
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE("maincpu", 0), VCC, READ8(pc88va_state,get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NOOP)
MCFG_DEVICE_ADD("dmac", AM9517A, 8000000) /* ch2 is FDC, ch0/3 are "user". ch1 is unused */
MCFG_AM9517A_OUT_HREQ_CB(WRITELINE(pc88va_state, pc88va_hlda_w))
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index 0ea049f807a..0ecec169a0f 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -2493,7 +2493,7 @@ static INPUT_PORTS_START( pc9801 )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) //system clock = 5 MHz (0) / 8 MHz (1)
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pc9801_state, system_type_r, NULL)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pc9801_state, system_type_r, nullptr)
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, "System Specification" ) PORT_DIPLOCATION("SW1:1") //jumps to daa00 if off, presumably some card booting
@@ -3210,7 +3210,7 @@ static MACHINE_CONFIG_FRAGMENT( pc9801_common )
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(pc9801_state, dack2_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(pc9801_state, dack3_w))
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE("maincpu", 0), VCC, READ8(pc9801_state,get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NULL ) // TODO: Check ir7_w
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NOOP) // TODO: Check ir7_w
MCFG_DEVICE_ADD("ppi8255_sys", I8255, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("DSW2"))
@@ -3289,7 +3289,7 @@ static MACHINE_CONFIG_START( pc9801, pc9801_state )
MCFG_FLOPPY_DRIVE_ADD("upd765_2dd:1", pc9801_floppies, "525dd", pc9801_state::floppy_formats)
MCFG_FRAGMENT_ADD(pc9801_sasi)
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
MCFG_DEVICE_MODIFY("i8237")
MCFG_I8237_IN_IOR_3_CB(DEVREAD8("upd765_2dd", upd765a_device, mdma_r))
@@ -3323,7 +3323,7 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_DEVICE_CLOCK(MAIN_CLOCK_X1*8); // unknown clock
MCFG_FRAGMENT_ADD(pc9801_ide)
- MCFG_UPD4990A_ADD("upd1990a", XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD4990A_ADD("upd1990a", XTAL_32_768kHz, NOOP, NOOP)
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("1664K")
diff --git a/src/mame/drivers/pcd.cpp b/src/mame/drivers/pcd.cpp
index cda14e61f76..542ab0a32fc 100644
--- a/src/mame/drivers/pcd.cpp
+++ b/src/mame/drivers/pcd.cpp
@@ -489,8 +489,8 @@ static MACHINE_CONFIG_START( pcd, pcd_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer0_tick", pcd_state, timer0_tick, attotime::from_hz(XTAL_16MHz / 24)) // adjusted to pass post
- MCFG_PIC8259_ADD("pic1", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NULL)
- MCFG_PIC8259_ADD("pic2", DEVWRITELINE("maincpu", i80186_cpu_device, int1_w), VCC, NULL)
+ MCFG_PIC8259_ADD("pic1", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NOOP)
+ MCFG_PIC8259_ADD("pic2", DEVWRITELINE("maincpu", i80186_cpu_device, int1_w), VCC, NOOP)
MCFG_DEVICE_ADD("video", PCD_VIDEO, 0)
@@ -569,7 +569,7 @@ MACHINE_CONFIG_DERIVED(pcx, pcd)
MCFG_PCD_KEYBOARD_OUT_TX_HANDLER(DEVWRITELINE("video", pcx_video_device, rx_w))
MCFG_DEVICE_MODIFY("usart2")
- MCFG_MC2661_TXD_HANDLER(NULL)
+ MCFG_MC2661_TXD_HANDLER(NOOP)
MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/mame/drivers/pce220.cpp b/src/mame/drivers/pce220.cpp
index a721f4420e7..95528a5f3ba 100644
--- a/src/mame/drivers/pce220.cpp
+++ b/src/mame/drivers/pce220.cpp
@@ -646,99 +646,99 @@ static INPUT_PORTS_START( pce220 )
PORT_CONFSETTING( 0x01, "Low Battery" )
PORT_START("LINE0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('Q') PORT_CHAR('!')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("W") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('W') PORT_CHAR('"')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("E") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('E') PORT_CHAR('#')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("R") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('R') PORT_CHAR('$')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("T") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('T') PORT_CHAR('%')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME("Y") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('Y') PORT_CHAR('&')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME("U") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('U') PORT_CHAR('\'')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('Q') PORT_CHAR('!')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("W") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('W') PORT_CHAR('"')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("E") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('E') PORT_CHAR('#')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("R") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('R') PORT_CHAR('$')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("T") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('T') PORT_CHAR('%')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME("Y") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('Y') PORT_CHAR('&')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME("U") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('U') PORT_CHAR('\'')
PORT_START("LINE1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("A") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('A') PORT_CHAR('[')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("S") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('S') PORT_CHAR(']')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("D") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('D') PORT_CHAR('{')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("F") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('F') PORT_CHAR('}')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("G") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('G') PORT_CHAR('\\')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME("H") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('H') PORT_CHAR('|')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME("J") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('J') PORT_CHAR('`')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("K") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('K') PORT_CHAR('_')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("A") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('A') PORT_CHAR('[')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("S") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('S') PORT_CHAR(']')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("D") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('D') PORT_CHAR('{')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("F") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('F') PORT_CHAR('}')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("G") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('G') PORT_CHAR('\\')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME("H") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('H') PORT_CHAR('|')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME("J") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('J') PORT_CHAR('`')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("K") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('K') PORT_CHAR('_')
PORT_START("LINE2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Z") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('Z')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("X") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('X')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("C") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('C')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("V") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('V')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("B") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('B')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("N") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('N')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("M") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('M')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(",") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(',') PORT_CHAR('?')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Z") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('Z')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("X") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('X')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("C") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('C')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("V") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('V')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("B") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('B')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("N") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('N')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("M") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('M')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(",") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(',') PORT_CHAR('?')
PORT_START("LINE3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("CAL") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("BAS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("CAPS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("ANS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_NAME("TAB") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("SPACE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(' ')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(UP))
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("CAL") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("BAS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("CAPS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("ANS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_NAME("TAB") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("SPACE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(' ')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(UP))
PORT_START("LINE4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("CONS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("0") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('0')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(".") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('.')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("+/-") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('+')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("RET") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(13)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("CONS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("0") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('0')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(".") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('.')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("+/-") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('+')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("RET") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(13)
PORT_START("LINE5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME("L") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('L') PORT_CHAR('=')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME(";") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(';') PORT_CHAR(':')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DEL") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(DEL))
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('1')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('2')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("3") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('3')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("-") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('-')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("M+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME("L") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('L') PORT_CHAR('=')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME(";") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(';') PORT_CHAR(':')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DEL") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(DEL))
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('1')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('2')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("3") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('3')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("-") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('-')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("M+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("LINE6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("I") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('I') PORT_CHAR('<')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME("O") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('O') PORT_CHAR('>')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME("INS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("4") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('4')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("5") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('5')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("6") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('6')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("*") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('*')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("RM") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("I") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('I') PORT_CHAR('<')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME("O") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('O') PORT_CHAR('>')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME("INS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("4") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('4')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("5") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('5')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("6") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('6')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("*") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('*')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("RM") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("LINE7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME("P") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('P') PORT_CHAR('@')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE))
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("n!") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("7") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('7')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("8") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('8')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("9") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('9')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("/") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('/')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(')')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME("P") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('P') PORT_CHAR('@')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE))
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("n!") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("7") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('7')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("8") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('8')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("9") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('9')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("/") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('/')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(')')
PORT_START("LINE8")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("hyp") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DEG") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("y^x") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('^')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("sqrt") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("x^2") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('(')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("1/x") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("MDF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("hyp") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DEG") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("y^x") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('^')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("sqrt") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("x^2") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('(')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("1/x") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("MDF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("LINE9")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_NAME("2nd") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("sin") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("cos") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("ln") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("log") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("tan") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_NAME("FSE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_NAME("CCE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_NAME("2nd") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("sin") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("cos") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("ln") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("log") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("tan") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_NAME("FSE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_NAME("CCE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("SHIFT")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("Shift") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("Shift") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_SHIFT_1)
PORT_START("ON")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("ON") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, on_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("ON") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, on_irq, nullptr )
INPUT_PORTS_END
static INPUT_PORTS_START( pcg850v )
@@ -748,99 +748,99 @@ static INPUT_PORTS_START( pcg850v )
PORT_CONFSETTING( 0x01, "Low Battery" )
PORT_START("LINE0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('Q') PORT_CHAR('!')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("W") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('W') PORT_CHAR('"')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("E") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('E') PORT_CHAR('#')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("R") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('R') PORT_CHAR('$')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("T") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('T') PORT_CHAR('%')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME("Y") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('Y') PORT_CHAR('&')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME("U") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('U') PORT_CHAR('\'')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('Q') PORT_CHAR('!')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("W") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('W') PORT_CHAR('"')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("E") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('E') PORT_CHAR('#')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("R") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('R') PORT_CHAR('$')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("T") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('T') PORT_CHAR('%')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME("Y") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('Y') PORT_CHAR('&')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME("U") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('U') PORT_CHAR('\'')
PORT_START("LINE1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("A") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('A') PORT_CHAR('[')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("S") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('S') PORT_CHAR(']')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("D") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('D') PORT_CHAR('{')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("F") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('F') PORT_CHAR('}')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("G") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('G')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME("H") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('H') PORT_CHAR('|')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME("J") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('J') PORT_CHAR('`')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("K") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('K') PORT_CHAR('_')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("A") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('A') PORT_CHAR('[')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("S") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('S') PORT_CHAR(']')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("D") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('D') PORT_CHAR('{')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("F") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('F') PORT_CHAR('}')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("G") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('G')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME("H") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('H') PORT_CHAR('|')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME("J") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('J') PORT_CHAR('`')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("K") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('K') PORT_CHAR('_')
PORT_START("LINE2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Z") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('Z')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("X") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('X')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("C") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('C')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("V") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('V')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("B") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('B')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("N") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('N')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("M") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('M')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(",") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(',') PORT_CHAR('?')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Z") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('Z')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("X") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('X')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("C") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('C')
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("V") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('V')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("B") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('B')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("N") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('N')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("M") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('M')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(",") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(',') PORT_CHAR('?')
PORT_START("LINE3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("BAS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("TEXT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("CAPS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("KANA") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_NAME("TAB") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("SPACE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(' ')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(UP))
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("BAS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("TEXT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("CAPS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("KANA") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_NAME("TAB") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("SPACE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(' ')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(UP))
PORT_START("LINE4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("CONS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("0") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('0')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(".") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('.')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("=") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('=')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('+')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("RET") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(13)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("CONS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("0") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('0')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(".") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('.')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("=") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('=')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('+')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("RET") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(13)
PORT_START("LINE5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME("L") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('L') PORT_CHAR('=')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME(";") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(';') PORT_CHAR(':')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DEL") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(DEL))
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('1')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('2')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("3") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('3')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("-") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('-')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("M+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME("L") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('L') PORT_CHAR('=')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME(";") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(';') PORT_CHAR(':')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_NAME("DEL") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(DEL))
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('1')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('2')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("3") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('3')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("-") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('-')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("M+") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("LINE6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("I") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('I') PORT_CHAR('<')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME("O") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('O') PORT_CHAR('>')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME("INS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("4") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('4')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("5") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('5')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("6") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('6')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("*") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('*')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("RM") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("I") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('I') PORT_CHAR('<')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME("O") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('O') PORT_CHAR('>')
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_NAME("INS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("4") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('4')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("5") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('5')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("6") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('6')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("*") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('*')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("RM") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("LINE7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME("P") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('P') PORT_CHAR('@')
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE))
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("pi") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("7") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('7')
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("8") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('8')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("9") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('9')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("/") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('/')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(')')
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME("P") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('P') PORT_CHAR('@')
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BS") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE))
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("pi") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("7") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('7')
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("8") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('8')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("9") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('9')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("/") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('/')
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME(")") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(')')
PORT_START("LINE8")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("nPr") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DEG") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("SQR") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("SQU") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("x^y") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('^')
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR('(')
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("1/x") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("MDF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("nPr") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DEG") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("SQR") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("SQU") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("x^y") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('^')
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("(") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR('(')
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("1/x") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("MDF") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("LINE9")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_NAME("2nd") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("sin") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("cos") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("ln") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("log") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("tan") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_NAME("FSE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_NAME("CCE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_NAME("2nd") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("sin") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("cos") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("ln") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("log") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_NAME("tan") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_NAME("FSE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_NAME("CCE") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr )
PORT_START("SHIFT")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("Shift") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, NULL ) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("Shift") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, kb_irq, nullptr ) PORT_CHAR(UCHAR_SHIFT_1)
PORT_START("ON")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("ON") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, on_irq, NULL )
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("ON") PORT_CHANGED_MEMBER(DEVICE_SELF, pce220_state, on_irq, nullptr )
INPUT_PORTS_END
void pce220_state::machine_start()
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index 0425841abc1..e68974342a4 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -819,7 +819,7 @@ bool pdp1_readtape_image_device::call_load()
/* restart reader IO when necessary */
/* note that this function may be called before pdp1_init_machine, therefore
before state->m_tape_reader.timer is allocated. It does not matter, as the clutch is never
- down at power-up, but we must not call timer_enable with a NULL parameter! */
+ down at power-up, but we must not call timer_enable with a nullptr parameter! */
if (state->m_tape_reader.timer)
{
diff --git a/src/mame/drivers/peoplepc.cpp b/src/mame/drivers/peoplepc.cpp
index 894017bd029..ec1b28f31e1 100644
--- a/src/mame/drivers/peoplepc.cpp
+++ b/src/mame/drivers/peoplepc.cpp
@@ -248,7 +248,7 @@ static MACHINE_CONFIG_START( olypeopl, peoplepc_state)
MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic8259_0", pic8259_device, ir0_w))
MCFG_PIC8259_ADD("pic8259_0", INPUTLINE("maincpu", 0), VCC, READ8(peoplepc_state, get_slave_ack))
- MCFG_PIC8259_ADD("pic8259_1", DEVWRITELINE("pic8259_0", pic8259_device, ir7_w), GND, NULL)
+ MCFG_PIC8259_ADD("pic8259_1", DEVWRITELINE("pic8259_0", pic8259_device, ir7_w), GND, NOOP)
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
diff --git a/src/mame/drivers/phoenix.cpp b/src/mame/drivers/phoenix.cpp
index df18aaa8ef7..698199c9ed2 100644
--- a/src/mame/drivers/phoenix.cpp
+++ b/src/mame/drivers/phoenix.cpp
@@ -75,7 +75,7 @@ static INPUT_PORTS_START( phoenix )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, NULL)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, nullptr)
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" )
@@ -158,7 +158,7 @@ static INPUT_PORTS_START( condor )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, NULL)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, nullptr)
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" )
@@ -288,7 +288,7 @@ static INPUT_PORTS_START( pleiads )
PORT_INCLUDE( phoenix )
PORT_MODIFY("IN0")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, NULL) /* Protection. See 0x0552 */
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, nullptr) /* Protection. See 0x0552 */
PORT_MODIFY("DSW0")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" )
@@ -311,7 +311,7 @@ static INPUT_PORTS_START( pleiadbl )
PORT_INCLUDE( phoenix )
PORT_MODIFY("IN0")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, NULL) /* Protection. See 0x0552 */
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, nullptr) /* Protection. See 0x0552 */
PORT_MODIFY("DSW0")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" )
diff --git a/src/mame/drivers/piggypas.cpp b/src/mame/drivers/piggypas.cpp
index 413f84c0bd4..4e11eb6ebe5 100644
--- a/src/mame/drivers/piggypas.cpp
+++ b/src/mame/drivers/piggypas.cpp
@@ -91,7 +91,7 @@ static INPUT_PORTS_START( piggypas )
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN3)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_COIN4)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, piggypas_state, ticket_r, NULL)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, piggypas_state, ticket_r, nullptr)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN2)
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Gate sensor") PORT_CODE(KEYCODE_G)
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
diff --git a/src/mame/drivers/pirates.cpp b/src/mame/drivers/pirates.cpp
index edec5b00e2b..671c1abfc8b 100644
--- a/src/mame/drivers/pirates.cpp
+++ b/src/mame/drivers/pirates.cpp
@@ -200,7 +200,7 @@ static INPUT_PORTS_START( pirates )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode"
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode"
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pirates_state,prot_r, NULL) // protection
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pirates_state,prot_r, nullptr) // protection
/* What do these bits do ? */
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/pk8020.cpp b/src/mame/drivers/pk8020.cpp
index 083ae6d466f..a2b86af09cf 100644
--- a/src/mame/drivers/pk8020.cpp
+++ b/src/mame/drivers/pk8020.cpp
@@ -212,7 +212,7 @@ static MACHINE_CONFIG_START( pk8020, pk8020_state )
MCFG_PIT8253_CLK2((XTAL_20MHz / 8) / 164)
MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir5_w))
- MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("rs232", I8251, 0)
MCFG_DEVICE_ADD("lan", I8251, 0)
diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp
index 2e4a8b260e8..d80b82e5e14 100644
--- a/src/mame/drivers/playch10.cpp
+++ b/src/mame/drivers/playch10.cpp
@@ -392,7 +392,7 @@ static INPUT_PORTS_START( playch10 )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Channel Select") PORT_CODE(KEYCODE_0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Enter") PORT_CODE(KEYCODE_MINUS)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Reset") PORT_CODE(KEYCODE_EQUALS)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, playch10_state,pc10_int_detect_r, NULL) // INT Detect
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, playch10_state,pc10_int_detect_r, nullptr) // INT Detect
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 )
diff --git a/src/mame/drivers/plus4.cpp b/src/mame/drivers/plus4.cpp
index d46753aff88..d87ccb65e55 100644
--- a/src/mame/drivers/plus4.cpp
+++ b/src/mame/drivers/plus4.cpp
@@ -791,7 +791,7 @@ static MACHINE_CONFIG_START( plus4, plus4_state )
MCFG_MOS6529_P6_HANDLER(WRITELINE(plus4_state, write_kb6))
MCFG_MOS6529_P7_HANDLER(WRITELINE(plus4_state, write_kb7))
- MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, plus4_datassette_devices, "c1531", NULL)
+ MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, plus4_datassette_devices, "c1531", NOOP)
MCFG_CBM_IEC_ADD("c1541")
MCFG_CBM_IEC_BUS_ATN_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9))
@@ -868,7 +868,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( c16n, plus4n, c16_state )
MCFG_DEVICE_REMOVE(PET_USER_PORT_TAG)
MCFG_DEVICE_MODIFY(CBM_IEC_TAG)
- MCFG_CBM_IEC_BUS_ATN_CALLBACK(NULL)
+ MCFG_CBM_IEC_BUS_ATN_CALLBACK(NOOP)
MCFG_DEVICE_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("16K")
@@ -890,7 +890,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( c16p, plus4p, c16_state )
MCFG_DEVICE_REMOVE(PET_USER_PORT_TAG)
MCFG_DEVICE_MODIFY(CBM_IEC_TAG)
- MCFG_CBM_IEC_BUS_ATN_CALLBACK(NULL)
+ MCFG_CBM_IEC_BUS_ATN_CALLBACK(NOOP)
MCFG_DEVICE_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("16K")
diff --git a/src/mame/drivers/pockchal.cpp b/src/mame/drivers/pockchal.cpp
new file mode 100644
index 00000000000..868c685133c
--- /dev/null
+++ b/src/mame/drivers/pockchal.cpp
@@ -0,0 +1,131 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/*
+
+base unit contains
+
+1x Toshiba TMP90C845AF
+
+1x SANYO LC21003 BLA5
+
+3x SEC C941A KS0108B
+
+1x Toshiba T9842B
+
+(system has no bios ROM)
+
+
+*/
+
+#include "emu.h"
+#include "cpu/z80/z80.h"
+#include "cpu/tlcs90/tlcs90.h"
+#include "softlist.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+
+class pockchalv1_state : public driver_device
+{
+public:
+ pockchalv1_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_cart(*this, "cartslot")
+ { }
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ UINT32 screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ required_device<cpu_device> m_maincpu;
+ required_device<generic_slot_device> m_cart;
+ UINT32 m_rom_size;
+ memory_region *m_cart_rom;
+ UINT8* m_cart_base;
+ DECLARE_READ8_MEMBER(read_rom);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pockchalv1_cart);
+};
+
+
+DEVICE_IMAGE_LOAD_MEMBER( pockchalv1_state, pockchalv1_cart )
+{
+ m_rom_size = m_cart->common_get_size("rom");
+ m_cart->rom_alloc(m_rom_size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
+ m_cart->common_load_rom(m_cart->get_rom_base(), m_rom_size, "rom");
+
+ return IMAGE_INIT_PASS;
+}
+void pockchalv1_state::video_start()
+{
+}
+
+UINT32 pockchalv1_state::screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+
+static ADDRESS_MAP_START( pockchalv1_map, AS_PROGRAM, 8, pockchalv1_state )
+ AM_RANGE(0x0000, 0x7fff) AM_READ(read_rom)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( pockchalv1 )
+INPUT_PORTS_END
+
+
+
+void pockchalv1_state::machine_start()
+{
+ std::string region_tag;
+ m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
+ m_cart_base = m_cart_rom->base();
+}
+
+void pockchalv1_state::machine_reset()
+{
+}
+
+READ8_MEMBER(pockchalv1_state::read_rom)
+{
+ return m_cart_base[offset];
+}
+
+
+static MACHINE_CONFIG_START( pockchalv1, pockchalv1_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", TMP90845,8000000) /* ? MHz */
+ MCFG_CPU_PROGRAM_MAP(pockchalv1_map)
+// MCFG_CPU_VBLANK_INT_DRIVER("screen", pockchalv1_state, irq0_line_hold)
+
+ // wrong, it's a b&w / greyscale thing
+ MCFG_PALETTE_ADD("palette", 0x100)
+ MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
+ MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
+
+ /* video hardware */
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(256, 256)
+ MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
+ MCFG_SCREEN_UPDATE_DRIVER(pockchalv1_state, screen_update_pockchalv1)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pockchalv1_cart")
+ MCFG_GENERIC_EXTENSIONS("bin")
+ MCFG_GENERIC_LOAD(pockchalv1_state, pockchalv1_cart)
+ MCFG_GENERIC_MANDATORY
+
+ MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("pc1_list","pockchalv1")
+
+MACHINE_CONFIG_END
+
+
+
+ROM_START( pockchal )
+ROM_END
+
+GAME( 199?, pockchal, 0, pockchalv1, pockchalv1, driver_device, 0, ROT0, "Benesse Corporation", "Pocket Challenge (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/pocketc.cpp b/src/mame/drivers/pocketc.cpp
index 4a2dd453bc9..324b342a372 100644
--- a/src/mame/drivers/pocketc.cpp
+++ b/src/mame/drivers/pocketc.cpp
@@ -744,7 +744,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( pc1401, pocketc, pc1401_state )
MCFG_CPU_PROGRAM_MAP(pc1401_mem)
MCFG_SC61860_READ_RESET_HANDLER(READLINE(pc1401_state,pc1401_reset))
MCFG_SC61860_READ_BRK_HANDLER(READLINE(pc1401_state,pc1401_brk))
- MCFG_SC61860_READ_X_HANDLER(NULL)
+ MCFG_SC61860_READ_X_HANDLER(NOOP)
MCFG_SC61860_READ_A_HANDLER(READ8(pc1401_state,pc1401_ina))
MCFG_SC61860_WRITE_A_HANDLER(WRITE8(pc1401_state,pc1401_outa))
MCFG_SC61860_READ_B_HANDLER(READ8(pc1401_state,pc1401_inb))
@@ -763,9 +763,9 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( pc1250, pocketc, pc1251_state )
MCFG_CPU_ADD("maincpu", SC61860, 192000) /* 7.8336 MHz */
MCFG_CPU_PROGRAM_MAP( pc1250_mem)
- MCFG_SC61860_READ_RESET_HANDLER(NULL)
+ MCFG_SC61860_READ_RESET_HANDLER(NOOP)
MCFG_SC61860_READ_BRK_HANDLER(READLINE(pc1251_state,pc1251_brk))
- MCFG_SC61860_READ_X_HANDLER(NULL)
+ MCFG_SC61860_READ_X_HANDLER(NOOP)
MCFG_SC61860_READ_A_HANDLER(READ8(pc1251_state,pc1251_ina))
MCFG_SC61860_WRITE_A_HANDLER(WRITE8(pc1251_state,pc1251_outa))
MCFG_SC61860_READ_B_HANDLER(READ8(pc1251_state,pc1251_inb))
@@ -805,9 +805,9 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( pc1350, pocketc, pc1350_state )
MCFG_CPU_ADD("maincpu", SC61860, 192000) /* 7.8336 MHz */
MCFG_CPU_PROGRAM_MAP( pc1350_mem)
- MCFG_SC61860_READ_RESET_HANDLER(NULL)
+ MCFG_SC61860_READ_RESET_HANDLER(NOOP)
MCFG_SC61860_READ_BRK_HANDLER(READLINE(pc1350_state,pc1350_brk))
- MCFG_SC61860_READ_X_HANDLER(NULL)
+ MCFG_SC61860_READ_X_HANDLER(NOOP)
MCFG_SC61860_READ_A_HANDLER(READ8(pc1350_state,pc1350_ina))
MCFG_SC61860_WRITE_A_HANDLER(WRITE8(pc1350_state,pc1350_outa))
MCFG_SC61860_READ_B_HANDLER(READ8(pc1350_state,pc1350_inb))
@@ -833,13 +833,13 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( pc1403, pocketc, pc1403_state )
MCFG_CPU_ADD( "maincpu", SC61860, 256000 )
MCFG_CPU_PROGRAM_MAP( pc1403_mem)
- MCFG_SC61860_READ_RESET_HANDLER(NULL)
+ MCFG_SC61860_READ_RESET_HANDLER(NOOP)
MCFG_SC61860_READ_BRK_HANDLER(READLINE(pc1403_state,pc1403_brk))
- MCFG_SC61860_READ_X_HANDLER(NULL)
+ MCFG_SC61860_READ_X_HANDLER(NOOP)
MCFG_SC61860_READ_A_HANDLER(READ8(pc1403_state,pc1403_ina))
MCFG_SC61860_WRITE_A_HANDLER(WRITE8(pc1403_state,pc1403_outa))
- MCFG_SC61860_READ_B_HANDLER(NULL)
- MCFG_SC61860_WRITE_B_HANDLER(NULL)
+ MCFG_SC61860_READ_B_HANDLER(NOOP)
+ MCFG_SC61860_WRITE_B_HANDLER(NOOP)
MCFG_SC61860_WRITE_C_HANDLER(WRITE8(pc1403_state,pc1403_outc))
/*
diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp
index 96381face12..c2bdc620606 100644
--- a/src/mame/drivers/poisk1.cpp
+++ b/src/mame/drivers/poisk1.cpp
@@ -614,7 +614,7 @@ static MACHINE_CONFIG_START( poisk1, p1_state )
MCFG_PIT8253_CLK2(XTAL_15MHz/12) /* pio port c pin 4, and speaker polling enough */
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(p1_state, p1_pit8253_out2_changed))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("ppi8255n1", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(READ8(p1_state, p1_ppi_porta_r)) /*60H*/
diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp
index f172a25ca74..614aca0c890 100644
--- a/src/mame/drivers/polepos.cpp
+++ b/src/mame/drivers/polepos.cpp
@@ -491,7 +491,7 @@ static INPUT_PORTS_START( polepos )
PORT_START("IN0L")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gear Change") PORT_CODE(KEYCODE_SPACE) POLEPOS_TOGGLE /* Gear */
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,auto_start_r, NULL) // start 1, program controlled
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,auto_start_r, nullptr) // start 1, program controlled
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0H")
diff --git a/src/mame/drivers/policetr.cpp b/src/mame/drivers/policetr.cpp
index d644fb4d310..9552120ddac 100644
--- a/src/mame/drivers/policetr.cpp
+++ b/src/mame/drivers/policetr.cpp
@@ -311,7 +311,7 @@ static INPUT_PORTS_START( policetr )
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x00200000, IP_ACTIVE_LOW ) /* Not actually a dipswitch */
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, policetr_state,bsmt_status_r, NULL)
+ PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, policetr_state,bsmt_status_r, nullptr)
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
diff --git a/src/mame/drivers/poly880.cpp b/src/mame/drivers/poly880.cpp
index 6dbf844bb3a..679d220fa00 100644
--- a/src/mame/drivers/poly880.cpp
+++ b/src/mame/drivers/poly880.cpp
@@ -226,7 +226,7 @@ static const z80_daisy_config poly880_daisy_chain[] =
{ Z80PIO1_TAG },
{ Z80PIO2_TAG },
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
#endif
diff --git a/src/mame/drivers/popeye.cpp b/src/mame/drivers/popeye.cpp
index dae6386b45f..a702cb7648f 100644
--- a/src/mame/drivers/popeye.cpp
+++ b/src/mame/drivers/popeye.cpp
@@ -268,7 +268,7 @@ static INPUT_PORTS_START( skyskipr )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, popeye_state, dsw1_read, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, popeye_state, dsw1_read, nullptr)
PORT_START("DSW1") /* DSW1 */
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
@@ -325,7 +325,7 @@ static INPUT_PORTS_START( popeye )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, popeye_state,pop_field_r, NULL) /* inverted init e/o signal (even odd) */
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, popeye_state,pop_field_r, nullptr) /* inverted init e/o signal (even odd) */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
@@ -349,7 +349,7 @@ static INPUT_PORTS_START( popeye )
PORT_DIPSETTING( 0x20, "Nintendo Co.,Ltd" )
PORT_DIPSETTING( 0x60, "Nintendo of America" )
// PORT_DIPSETTING( 0x00, "Nintendo of America" )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, popeye_state, dsw1_read, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, popeye_state, dsw1_read, nullptr)
PORT_START("DSW1") /* DSW1 */
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
diff --git a/src/mame/drivers/prestige.cpp b/src/mame/drivers/prestige.cpp
index 4b7131f82d4..f3ebf1fa43a 100644
--- a/src/mame/drivers/prestige.cpp
+++ b/src/mame/drivers/prestige.cpp
@@ -625,8 +625,8 @@ void prestige_state::machine_start()
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
UINT8 *rom = memregion("maincpu")->base();
- UINT8 *cart = NULL;
- if (m_cart_rom != NULL)
+ UINT8 *cart = nullptr;
+ if (m_cart_rom != nullptr)
{
cart = m_cart_rom->base();
}
diff --git a/src/mame/drivers/prof80.cpp b/src/mame/drivers/prof80.cpp
index 1fb8c811930..19f7fdeeec1 100644
--- a/src/mame/drivers/prof80.cpp
+++ b/src/mame/drivers/prof80.cpp
@@ -508,7 +508,7 @@ static MACHINE_CONFIG_START( prof80, prof80_state )
// devices
MCFG_PROF80_MMU_ADD(MMU_TAG, prof80_mmu)
- MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
+ MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NOOP, NOOP)
MCFG_UPD765A_ADD(UPD765_TAG, true, true)
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", prof80_floppies, "525qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", prof80_floppies, "525qd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/psikyo.cpp b/src/mame/drivers/psikyo.cpp
index 6f9ea7a0934..6ddfd257f22 100644
--- a/src/mame/drivers/psikyo.cpp
+++ b/src/mame/drivers/psikyo.cpp
@@ -563,7 +563,7 @@ static INPUT_PORTS_START( samuraia )
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW )
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU
+ PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused?
PORT_MODIFY("DSW") /* c00004 -> c00007 */
@@ -639,7 +639,7 @@ static INPUT_PORTS_START( btlkroad )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
@@ -718,7 +718,7 @@ static INPUT_PORTS_START( gunbird )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("DSW") /* c00004 -> c00007 */
@@ -779,12 +779,12 @@ static INPUT_PORTS_START( s1945 )
PORT_MODIFY("P1_P2") /* c00000 -> c00003 */
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, NULL)
+ PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, nullptr)
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("DSW") /* c00004 -> c00007 */
@@ -903,12 +903,12 @@ static INPUT_PORTS_START( tengai )
PORT_MODIFY("P1_P2") /* c00000 -> c00003 */
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, NULL)
+ PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, nullptr)
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("DSW") /* c00004 -> c00007 */
diff --git a/src/mame/drivers/pzletime.cpp b/src/mame/drivers/pzletime.cpp
index c56a225e141..f09f1bb05f6 100644
--- a/src/mame/drivers/pzletime.cpp
+++ b/src/mame/drivers/pzletime.cpp
@@ -254,7 +254,7 @@ static INPUT_PORTS_START( pzletime )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* eeprom */
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pzletime_state,ticket_status_r, NULL) /* ticket dispenser */
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pzletime_state,ticket_status_r, nullptr) /* ticket dispenser */
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("INPUT")
diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp
index 28e8593117d..a5f12085015 100644
--- a/src/mame/drivers/qdrmfgp.cpp
+++ b/src/mame/drivers/qdrmfgp.cpp
@@ -429,7 +429,7 @@ static INPUT_PORTS_START( qdrmfgp )
PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
PORT_START("SENSOR")
- PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, NULL) /* battery power sensor */
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, nullptr) /* battery power sensor */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -509,7 +509,7 @@ static INPUT_PORTS_START( qdrmfgp2 )
PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
PORT_START("SENSOR")
- PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, NULL) /* battery power sensor */
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, nullptr) /* battery power sensor */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/qix.cpp b/src/mame/drivers/qix.cpp
index 6812b16c5e5..9f4e60bdb96 100644
--- a/src/mame/drivers/qix.cpp
+++ b/src/mame/drivers/qix.cpp
@@ -713,12 +713,12 @@ static MACHINE_CONFIG_DERIVED( slither, qix_base )
MCFG_DEVICE_MODIFY("pia1")
MCFG_PIA_READPA_HANDLER(READ8(qix_state, slither_trak_lr_r))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(qix_state, slither_76489_0_w))
- MCFG_PIA_READPB_HANDLER(NULL)
+ MCFG_PIA_READPB_HANDLER(NOOP)
MCFG_DEVICE_MODIFY("pia2")
MCFG_PIA_READPA_HANDLER(READ8(qix_state, slither_trak_ud_r))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(qix_state, slither_76489_1_w))
- MCFG_PIA_READPB_HANDLER(NULL)
+ MCFG_PIA_READPB_HANDLER(NOOP)
/* video hardware */
MCFG_FRAGMENT_ADD(slither_video)
diff --git a/src/mame/drivers/quantum.cpp b/src/mame/drivers/quantum.cpp
index 256607a3ddc..c62de3a88e6 100644
--- a/src/mame/drivers/quantum.cpp
+++ b/src/mame/drivers/quantum.cpp
@@ -164,7 +164,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( quantum )
PORT_START("SYSTEM")
/* YHALT here MUST BE ALWAYS 0 */
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_quantum_device, done_r, NULL) /* vg YHALT */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_quantum_device, done_r, nullptr) /* vg YHALT */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
diff --git a/src/mame/drivers/quizshow.cpp b/src/mame/drivers/quizshow.cpp
index deda44515e0..f38da826eba 100644
--- a/src/mame/drivers/quizshow.cpp
+++ b/src/mame/drivers/quizshow.cpp
@@ -264,7 +264,7 @@ INPUT_CHANGED_MEMBER(quizshow_state::quizshow_category_select)
static INPUT_PORTS_START( quizshow )
PORT_START("IN0") // ADR strobe 0
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, quizshow_state,quizshow_tape_headpos_r, NULL)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, quizshow_state,quizshow_tape_headpos_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
@@ -329,7 +329,7 @@ static INPUT_PORTS_START( quizshow )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("CAT")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Category Select") PORT_CHANGED_MEMBER(DEVICE_SELF, quizshow_state,quizshow_category_select, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Category Select") PORT_CHANGED_MEMBER(DEVICE_SELF, quizshow_state,quizshow_category_select, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp
index 467e7fb2527..291dee7e24e 100644
--- a/src/mame/drivers/qx10.cpp
+++ b/src/mame/drivers/qx10.cpp
@@ -708,7 +708,7 @@ static MACHINE_CONFIG_START( qx10, qx10_state )
MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("upd7201", z80dart_device, rxtxcb_w))
MCFG_PIC8259_ADD("pic8259_master", INPUTLINE("maincpu", 0), VCC, READ8(qx10_state, get_slave_ack))
- MCFG_PIC8259_ADD("pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NULL)
+ MCFG_PIC8259_ADD("pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir7_w), GND, NOOP)
MCFG_UPD7201_ADD("upd7201", MAIN_CLK/4, 0, 0, 0, 0) // channel b clock set by pit2 channel 2
// Channel A: Keyboard
diff --git a/src/mame/drivers/r2dtank.cpp b/src/mame/drivers/r2dtank.cpp
index e40fdcbe377..135fe3e83a8 100644
--- a/src/mame/drivers/r2dtank.cpp
+++ b/src/mame/drivers/r2dtank.cpp
@@ -361,7 +361,7 @@ static INPUT_PORTS_START( r2dtank )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, r2dtank_state,get_ttl74123_output, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, r2dtank_state,get_ttl74123_output, nullptr)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index d6f58b231ee..f9ff94806fa 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -1144,7 +1144,7 @@ void rainbow_state::hdc_reset()
}
// Return 'hard_disk_file' object for harddisk 1 (fixed).
-// < NULL if geometry is insane or other errors occured >
+// < nullptr if geometry is insane or other errors occured >
hard_disk_file *(rainbow_state::rainbow_hdc_file(int drv))
{
m_hdc_drive_ready = false;
@@ -1380,7 +1380,7 @@ int rainbow_state::do_write_sector()
logerror("...FAILURE **** \n");
}
- } // IF 'info' not NULL
+ } // IF 'info' not nullptr
} // IF hard disk present
return feedback;
diff --git a/src/mame/drivers/rc759.cpp b/src/mame/drivers/rc759.cpp
index ca5d4b09745..6ced8faca32 100644
--- a/src/mame/drivers/rc759.cpp
+++ b/src/mame/drivers/rc759.cpp
@@ -528,7 +528,7 @@ static MACHINE_CONFIG_START( rc759, rc759_state )
MCFG_80186_TMROUT1_HANDLER(WRITELINE(rc759_state, i186_timer1_w))
// interrupt controller
- MCFG_PIC8259_ADD("pic", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NULL)
+ MCFG_PIC8259_ADD("pic", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NOOP)
// nvram
MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", rc759_state, nvram_init)
diff --git a/src/mame/drivers/re900.cpp b/src/mame/drivers/re900.cpp
index 5adaa88084f..93f59ea1f4c 100644
--- a/src/mame/drivers/re900.cpp
+++ b/src/mame/drivers/re900.cpp
@@ -405,8 +405,8 @@ static MACHINE_CONFIG_DERIVED( bs94, re900 )
MCFG_SOUND_MODIFY("ay_re900")
MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1"))
- MCFG_AY8910_PORT_A_WRITE_CB(NULL)
- MCFG_AY8910_PORT_B_WRITE_CB(NULL)
+ MCFG_AY8910_PORT_A_WRITE_CB(NOOP)
+ MCFG_AY8910_PORT_B_WRITE_CB(NOOP)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/realbrk.cpp b/src/mame/drivers/realbrk.cpp
index 759493227f9..5efc2003030 100644
--- a/src/mame/drivers/realbrk.cpp
+++ b/src/mame/drivers/realbrk.cpp
@@ -793,7 +793,7 @@ static MACHINE_CONFIG_DERIVED( pkgnsh, realbrk )
MCFG_CPU_PROGRAM_MAP(pkgnsh_mem)
MCFG_DEVICE_MODIFY("tmp68301")
- MCFG_TMP68301_OUT_PARALLEL_CB(NULL)
+ MCFG_TMP68301_OUT_PARALLEL_CB(NOOP)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pkgnshdx, pkgnsh )
diff --git a/src/mame/drivers/renegade.cpp b/src/mame/drivers/renegade.cpp
index 33915c20e52..d3379c75062 100644
--- a/src/mame/drivers/renegade.cpp
+++ b/src/mame/drivers/renegade.cpp
@@ -674,7 +674,7 @@ static INPUT_PORTS_START( renegade )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* attack right */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* attack right */
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, renegade_state,mcu_status_r, NULL)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, renegade_state,mcu_status_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/rex6000.cpp b/src/mame/drivers/rex6000.cpp
index a643564bcd8..31d57ea5042 100644
--- a/src/mame/drivers/rex6000.cpp
+++ b/src/mame/drivers/rex6000.cpp
@@ -772,7 +772,7 @@ QUICKLOAD_LOAD_MEMBER(oz750_state,oz750)
if (!strncmp(file_name, "PFILE:", 6))
strcpy(file_name, file_name + 6);
- UINT32 img_start = oz_wzd_extract_tag(data, "<BIN>", NULL);
+ UINT32 img_start = oz_wzd_extract_tag(data, "<BIN>", nullptr);
if (img_start == 0)
return IMAGE_INIT_FAIL;
@@ -960,7 +960,7 @@ static MACHINE_CONFIG_START( oz750, oz750_state )
MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE("serport", rs232_port_device, write_rts))
MCFG_INS8250_OUT_INT_CB(WRITELINE(rex6000_state, serial_irq))
- MCFG_RS232_PORT_ADD( "serport", default_rs232_devices, NULL )
+ MCFG_RS232_PORT_ADD( "serport", default_rs232_devices, nullptr )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dsr_w))
diff --git a/src/mame/drivers/rgum.cpp b/src/mame/drivers/rgum.cpp
index 2f6ef0e5894..17033354017 100644
--- a/src/mame/drivers/rgum.cpp
+++ b/src/mame/drivers/rgum.cpp
@@ -116,7 +116,7 @@ static INPUT_PORTS_START( rgum )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rgum_state,rgum_heartbeat_r, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rgum_state,rgum_heartbeat_r, nullptr)
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
diff --git a/src/mame/drivers/rpunch.cpp b/src/mame/drivers/rpunch.cpp
index 445e9395a61..66391efbcbf 100644
--- a/src/mame/drivers/rpunch.cpp
+++ b/src/mame/drivers/rpunch.cpp
@@ -292,7 +292,7 @@ static INPUT_PORTS_START( rpunch )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, NULL)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, nullptr)
PORT_START("P2") /* c001a lower 8 bits */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
@@ -302,7 +302,7 @@ static INPUT_PORTS_START( rpunch )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, NULL)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, nullptr)
PORT_START("SERVICE") /* c0018/c001a upper 8 bits */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 )
diff --git a/src/mame/drivers/s7.cpp b/src/mame/drivers/s7.cpp
index af8704e7320..a4428f7590d 100644
--- a/src/mame/drivers/s7.cpp
+++ b/src/mame/drivers/s7.cpp
@@ -491,7 +491,7 @@ static MACHINE_CONFIG_START( s7, s7_state )
MCFG_DEVICE_ADD("pias", PIA6821, 0)
MCFG_PIA_READPB_HANDLER(READ8(s7_state, dac_r))
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
- MCFG_PIA_WRITEPB_HANDLER(NULL)
+ MCFG_PIA_WRITEPB_HANDLER(NOOP)
MCFG_PIA_READCA1_HANDLER(VCC)
MCFG_PIA_CA2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, digit_w))
MCFG_PIA_CB2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, clock_w))
diff --git a/src/mame/drivers/sage2.cpp b/src/mame/drivers/sage2.cpp
index 77bdd57108a..500c7c0239b 100644
--- a/src/mame/drivers/sage2.cpp
+++ b/src/mame/drivers/sage2.cpp
@@ -442,7 +442,7 @@ static MACHINE_CONFIG_START( sage2, sage2_state )
MCFG_CPU_PROGRAM_MAP(sage2_mem)
// devices
- MCFG_PIC8259_ADD(I8259_TAG, INPUTLINE(M68000_TAG, M68K_IRQ_1), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259_TAG, INPUTLINE(M68000_TAG, M68K_IRQ_1), VCC, NOOP)
MCFG_DEVICE_ADD(I8255A_0_TAG, I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("J7"))
diff --git a/src/mame/drivers/scv.cpp b/src/mame/drivers/scv.cpp
index e1852162caf..4daaab4ef13 100644
--- a/src/mame/drivers/scv.cpp
+++ b/src/mame/drivers/scv.cpp
@@ -8,7 +8,7 @@
#include "emu.h"
#include "cpu/upd7810/upd7810.h"
-#include "audio/upd1771.h"
+#include "sound/upd1771.h"
#include "bus/scv/slot.h"
#include "bus/scv/rom.h"
#include "softlist.h"
diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp
index 86eb16efe5f..2074655f3b6 100644
--- a/src/mame/drivers/segac2.cpp
+++ b/src/mame/drivers/segac2.cpp
@@ -249,7 +249,7 @@ MACHINE_RESET_MEMBER(segac2_state,segac2)
/* determine how many sound banks */
m_sound_banks = 0;
- if (m_upd_region != NULL)
+ if (m_upd_region != nullptr)
{
m_sound_banks = m_upd_region->bytes() / 0x20000;
}
diff --git a/src/mame/drivers/segag80v.cpp b/src/mame/drivers/segag80v.cpp
index e19236236ff..e925643f520 100644
--- a/src/mame/drivers/segag80v.cpp
+++ b/src/mame/drivers/segag80v.cpp
@@ -553,7 +553,7 @@ static INPUT_PORTS_START( elim4 )
PORT_INCLUDE( g80v_generic )
PORT_MODIFY("D7D6")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segag80v_state,elim4_joint_coin_r, NULL) /* combination of all four coin inputs */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segag80v_state,elim4_joint_coin_r, nullptr) /* combination of all four coin inputs */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
diff --git a/src/mame/drivers/segajw.cpp b/src/mame/drivers/segajw.cpp
index 1bd6490ebe4..a070e8bddc1 100644
--- a/src/mame/drivers/segajw.cpp
+++ b/src/mame/drivers/segajw.cpp
@@ -256,17 +256,17 @@ static INPUT_PORTS_START( segajw )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Last Game") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("M-Door")
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("D-Door")
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segajw_state, hopper_sensors_r, NULL)
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segajw_state, hopper_sensors_r, nullptr)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Full")
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Fill")
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN3")
- PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segajw_state, coin_sensors_r, NULL)
+ PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segajw_state, coin_sensors_r, nullptr)
PORT_BIT( 0x00f8, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN1") // start the coin drop sequence (see coin_sensors_r)
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, segajw_state, coin_drop_start, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, segajw_state, coin_drop_start, nullptr)
PORT_START("DSW1")
PORT_DIPNAME( 0x0001, 0x0000, "Progressive" ) PORT_DIPLOCATION("SW1:1")
diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp
index 9e09344fed1..cd7e3cd31af 100644
--- a/src/mame/drivers/segaorun.cpp
+++ b/src/mame/drivers/segaorun.cpp
@@ -991,7 +991,7 @@ static INPUT_PORTS_START( outrun_generic )
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40)
PORT_START("ADC.3")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segaorun_state, bankmotor_pos_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segaorun_state, bankmotor_pos_r, nullptr)
INPUT_PORTS_END
diff --git a/src/mame/drivers/segapico.cpp b/src/mame/drivers/segapico.cpp
index 5efbeb7ceef..1df769c0363 100644
--- a/src/mame/drivers/segapico.cpp
+++ b/src/mame/drivers/segapico.cpp
@@ -118,7 +118,7 @@ C = MB3514 / 9325 M36
*/
#include "emu.h"
-#include "includes/md_cons.h"
+#include "includes/megadriv.h"
#include "sound/315-5641.h"
#include "softlist.h"
diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp
index 06cbdb2e3d9..1b6c6027ca2 100644
--- a/src/mame/drivers/segas24.cpp
+++ b/src/mame/drivers/segas24.cpp
@@ -777,7 +777,7 @@ void segas24_state::reset_control_w(UINT8 data)
void segas24_state::reset_bank()
{
- if (m_romboard != NULL)
+ if (m_romboard != nullptr)
{
membank("bank1")->set_entry(curbank & 15);
membank("bank2")->set_entry(curbank & 15);
@@ -1326,7 +1326,7 @@ void segas24_state::machine_start()
if (track_size)
machine().device<nvram_device>("floppy_nvram")->set_base(memregion("floppy")->base(), 2*track_size);
- if (m_romboard != NULL)
+ if (m_romboard != nullptr)
{
UINT8 *usr1 = m_romboard->base();
membank("bank1")->configure_entries(0, 16, usr1, 0x40000);
diff --git a/src/mame/drivers/segaufo.cpp b/src/mame/drivers/segaufo.cpp
index 1263d6daafb..12007ec721c 100644
--- a/src/mame/drivers/segaufo.cpp
+++ b/src/mame/drivers/segaufo.cpp
@@ -805,8 +805,8 @@ static MACHINE_CONFIG_DERIVED( ufomini, newufo )
/* basic machine hardware */
MCFG_DEVICE_MODIFY("io1")
MCFG_315_5296_IN_PORTC_CB(IOPORT("IN1"))
- MCFG_315_5296_IN_PORTE_CB(NULL)
- MCFG_315_5296_IN_PORTH_CB(NULL)
+ MCFG_315_5296_IN_PORTE_CB(NOOP)
+ MCFG_315_5296_IN_PORTH_CB(NOOP)
MACHINE_CONFIG_END
@@ -826,7 +826,7 @@ static MACHINE_CONFIG_DERIVED( ufo21, newufo )
MCFG_315_5296_OUT_PORTB_CB(WRITE8(ufo_state, ex_cp_lamps_w))
MCFG_315_5296_OUT_PORTE_CB(WRITE8(ufo_state, ex_crane_xyz_w))
MCFG_315_5296_OUT_PORTF_CB(WRITE8(ufo_state, ex_crane_xyz_w))
- MCFG_315_5296_OUT_PORTG_CB(NULL)
+ MCFG_315_5296_OUT_PORTG_CB(NOOP)
/* sound hardware */
MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK)
@@ -844,15 +844,15 @@ static MACHINE_CONFIG_DERIVED( ufo800, newufo )
MCFG_315_5296_IN_PORTB_CB(IOPORT("IN2"))
MCFG_315_5296_IN_PORTC_CB(READ8(ufo_state, ex_crane_open_r))
MCFG_315_5296_IN_PORTD_CB(IOPORT("IN1"))
- MCFG_315_5296_IN_PORTE_CB(NULL)
- MCFG_315_5296_IN_PORTH_CB(NULL)
+ MCFG_315_5296_IN_PORTE_CB(NOOP)
+ MCFG_315_5296_IN_PORTH_CB(NOOP)
MCFG_DEVICE_MODIFY("io2")
MCFG_315_5296_OUT_PORTA_CB(WRITE8(ufo_state, ex_stepper_w))
MCFG_315_5296_OUT_PORTB_CB(WRITE8(ufo_state, ex_cp_lamps_w))
MCFG_315_5296_OUT_PORTE_CB(WRITE8(ufo_state, ex_crane_xyz_w))
MCFG_315_5296_OUT_PORTF_CB(WRITE8(ufo_state, ex_ufo800_lamps_w))
- MCFG_315_5296_OUT_PORTG_CB(NULL)
+ MCFG_315_5296_OUT_PORTG_CB(NOOP)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sf.cpp b/src/mame/drivers/sf.cpp
index 094ffe5305e..c03c58b5d6e 100644
--- a/src/mame/drivers/sf.cpp
+++ b/src/mame/drivers/sf.cpp
@@ -7,11 +7,7 @@
driver by Olivier Galibert
TODO:
- - is there a third coin input?
-
- - Is sfj confirmed to have a 68705?, sfua has an i8751 and the actual
- gamecode is closer to sfua than the other sets. The protection
- appears to be the same on both.
+ - acquire i8751 protection mcu internal rom dump and emulate it
***************************************************************************/
@@ -24,7 +20,7 @@
/* The protection of the Japanese (and alt US) version */
-/* I'd love to see someone dump the 68705 / i8751 roms */
+/* I'd love to see someone dump the i8751 rom */
void sf_state::write_dword( address_space &space, offs_t offset, UINT32 data )
{
@@ -700,7 +696,7 @@ ROM_START( sfua )
ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, CRC(86e0f0d5) SHA1(7cef8056f83dac15f1b47d7be705d26170858337) )
ROM_REGION( 0x0800, "mcu", 0 ) /* i8751 MCU */
- ROM_LOAD( "i8751.bin", 0x0000, 0x0800, NO_DUMP )
+ ROM_LOAD( "sf_s.id8751h-8.14f", 0x0000, 0x0800, NO_DUMP ) // is this mcu label right for the US set?
ROM_REGION( 0x080000, "gfx1", 0 )
ROM_LOAD( "sf-39.bin", 0x000000, 0x020000, CRC(cee3d292) SHA1(a8c22f1dc81976e8dd5d6c70361c61fa3f9f89d6) ) /* Background b planes 0-1*/
@@ -769,8 +765,8 @@ ROM_START( sfj )
ROM_LOAD( "sf-00.bin", 0x00000, 0x20000, CRC(4b733845) SHA1(f7ff46e02f8ce6682d6e573588271bae2edfa90f) )
ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, CRC(86e0f0d5) SHA1(7cef8056f83dac15f1b47d7be705d26170858337) )
- ROM_REGION( 0x0800, "mcu", 0 ) /* 68705 MCU */ // or should it be an i8751 like the above set? the protection is the same!
- ROM_LOAD( "68705.bin", 0x0000, 0x0800, NO_DUMP )
+ ROM_REGION( 0x0800, "mcu", 0 ) /* i8751 MCU */
+ ROM_LOAD( "sf_s.id8751h-8.14f", 0x0000, 0x0800, NO_DUMP )
ROM_REGION( 0x080000, "gfx1", 0 )
ROM_LOAD( "sf-39.bin", 0x000000, 0x020000, CRC(cee3d292) SHA1(a8c22f1dc81976e8dd5d6c70361c61fa3f9f89d6) ) /* Background b planes 0-1*/
diff --git a/src/mame/drivers/sigmab52.cpp b/src/mame/drivers/sigmab52.cpp
index 38b535774ea..d5c74b852c9 100644
--- a/src/mame/drivers/sigmab52.cpp
+++ b/src/mame/drivers/sigmab52.cpp
@@ -451,7 +451,7 @@ static INPUT_PORTS_START( jwildb52 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CODE(KEYCODE_7_PAD)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("V Door")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CODE(KEYCODE_8_PAD)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, sigmab52_state, coin_drop_start, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, sigmab52_state, coin_drop_start, nullptr)
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "DSW1-1" ) PORT_DIPLOCATION("SW1:1")
diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp
index 1f2ddde1437..ea565fcf345 100644
--- a/src/mame/drivers/sms.cpp
+++ b/src/mame/drivers/sms.cpp
@@ -760,9 +760,9 @@ static MACHINE_CONFIG_DERIVED( sg1000m3, smsj )
// Mark III does not have TH connected.
MCFG_SMS_CONTROL_PORT_MODIFY(CONTROL1_TAG)
- MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(NULL)
+ MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(NOOP)
MCFG_SMS_CONTROL_PORT_MODIFY(CONTROL2_TAG)
- MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(NULL)
+ MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(NOOP)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms2_kr, sms2_ntsc )
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index dfea2270900..e05bc0a34d9 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -1489,7 +1489,7 @@ static INPUT_PORTS_START( marvins )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // service switch according to schematics, see code at 0x0453. Goes to garbage.
PORT_START("IN1")
@@ -1571,7 +1571,7 @@ static INPUT_PORTS_START( vangrd2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1655,8 +1655,8 @@ static INPUT_PORTS_START( madcrash )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_START("IN1")
@@ -1733,7 +1733,7 @@ static INPUT_PORTS_START( jcross )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1818,7 +1818,7 @@ static INPUT_PORTS_START( sgladiat )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) /* code at 0x054e */
@@ -1902,7 +1902,7 @@ static INPUT_PORTS_START( hal21 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1985,7 +1985,7 @@ static INPUT_PORTS_START( aso )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coinage" settings - code at 0x2e04 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2071,7 +2071,7 @@ static INPUT_PORTS_START( alphamis )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x2e17 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2153,7 +2153,7 @@ static INPUT_PORTS_START( tnk3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2236,7 +2236,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( athena )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x09d4 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2321,7 +2321,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( fitegolf )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x045b */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */
@@ -2417,7 +2417,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( countryc )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0450 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */
@@ -2427,10 +2427,10 @@ static INPUT_PORTS_START( countryc )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_x, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_x, nullptr)
PORT_START("IN2")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_y, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_y, nullptr)
PORT_START("IN3")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2499,7 +2499,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( ikari )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a15 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2594,7 +2594,7 @@ static INPUT_PORTS_START( ikaria )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a00 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
INPUT_PORTS_END
@@ -2631,7 +2631,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( victroad )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a19 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2735,7 +2735,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( bermudat )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0a0a */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2864,7 +2864,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( psychos )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2949,7 +2949,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gwar )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x08c8 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE )
@@ -3058,7 +3058,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( chopper )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0849 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE )
@@ -3179,7 +3179,7 @@ static INPUT_PORTS_START( tdfever )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* also reset - code at 0x074a */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x1065 */
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start Game A")
@@ -3320,7 +3320,7 @@ static INPUT_PORTS_START( fsoccer )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch / also reset - code at 0x00cc */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x677f */
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start Game A")
diff --git a/src/mame/drivers/snk6502.cpp b/src/mame/drivers/snk6502.cpp
index 4631b0fff65..4b68e0c7bf3 100644
--- a/src/mame/drivers/snk6502.cpp
+++ b/src/mame/drivers/snk6502.cpp
@@ -523,12 +523,12 @@ static INPUT_PORTS_START( satansat )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x7c, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, NULL) /* music0 playing */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, nullptr) /* music0 playing */
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, snk6502_state,coin_inserted, 0)
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* NC */
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,sasuke_count_r, NULL) /* connected to a binary counter */
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,sasuke_count_r, nullptr) /* connected to a binary counter */
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!1")
@@ -588,7 +588,7 @@ static INPUT_PORTS_START( vanguard )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL /* fire left */
PORT_MODIFY("IN2")
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, NULL) /* music0 playing */
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, nullptr) /* music0 playing */
INPUT_PORTS_END
static INPUT_PORTS_START( fantasy )
diff --git a/src/mame/drivers/spdodgeb.cpp b/src/mame/drivers/spdodgeb.cpp
index cff0d7b855a..fea4bbb66ab 100644
--- a/src/mame/drivers/spdodgeb.cpp
+++ b/src/mame/drivers/spdodgeb.cpp
@@ -275,7 +275,7 @@ CUSTOM_INPUT_MEMBER(spdodgeb_state::mcu63705_busy_r)
static INPUT_PORTS_START( spdodgeb )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, spdodgeb_state, mcu63705_busy_r, NULL) /* mcu63701_busy flag */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, spdodgeb_state, mcu63705_busy_r, nullptr) /* mcu63701_busy flag */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp
index 3f06f41fd97..fb23039caae 100644
--- a/src/mame/drivers/spoker.cpp
+++ b/src/mame/drivers/spoker.cpp
@@ -350,7 +350,7 @@ static INPUT_PORTS_START( spoker )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
@@ -419,7 +419,7 @@ static INPUT_PORTS_START( 3super8 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, NULL) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/squale.cpp b/src/mame/drivers/squale.cpp
index 81f215526b4..eb30f232ed3 100644
--- a/src/mame/drivers/squale.cpp
+++ b/src/mame/drivers/squale.cpp
@@ -84,7 +84,7 @@ public:
, m_fdc(*this, "wd1770")
, m_floppy0(*this, "wd1770:0")
, m_floppy1(*this, "wd1770:1")
- , m_floppy(NULL)
+ , m_floppy(nullptr)
, m_cart(*this, "cartslot")
{ }
@@ -747,7 +747,7 @@ void squale_state::machine_start()
fdc_sel0 = 0x00;
fdc_sel1 = 0x00;
- m_floppy = NULL;
+ m_floppy = nullptr;
cart_addr_counter_reset = 0;
cart_addr_counter = 0x0000;
diff --git a/src/mame/drivers/ssingles.cpp b/src/mame/drivers/ssingles.cpp
index fddf894e050..b1906e966bf 100644
--- a/src/mame/drivers/ssingles.cpp
+++ b/src/mame/drivers/ssingles.cpp
@@ -414,7 +414,7 @@ static INPUT_PORTS_START( ssingles )
PORT_START("INPUTS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) //must be LOW
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ssingles_state,controls_r, NULL)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ssingles_state,controls_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 )
diff --git a/src/mame/drivers/stactics.cpp b/src/mame/drivers/stactics.cpp
index 0c0db821402..3ca0d344126 100644
--- a/src/mame/drivers/stactics.cpp
+++ b/src/mame/drivers/stactics.cpp
@@ -212,7 +212,7 @@ static INPUT_PORTS_START( stactics )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_motor_not_ready, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_motor_not_ready, nullptr)
PORT_START("IN1") /* IN1 */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) )
@@ -241,8 +241,8 @@ static INPUT_PORTS_START( stactics )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2") /* IN2 */
- PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_rng, NULL)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_frame_count_d3, NULL)
+ PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_rng, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_frame_count_d3, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) )
@@ -252,7 +252,7 @@ static INPUT_PORTS_START( stactics )
PORT_START("IN3") /* IN3 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_shot_standby, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_shot_standby, nullptr)
PORT_DIPNAME( 0x04, 0x04, "Number of Barriers" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x00, "6" )
@@ -264,7 +264,7 @@ static INPUT_PORTS_START( stactics )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_not_shot_arrive, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_not_shot_arrive, nullptr)
PORT_START("FAKE") /* FAKE */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
diff --git a/src/mame/drivers/starshp1.cpp b/src/mame/drivers/starshp1.cpp
index 1ad24cd1cf6..021d2ac36b3 100644
--- a/src/mame/drivers/starshp1.cpp
+++ b/src/mame/drivers/starshp1.cpp
@@ -200,12 +200,12 @@ static INPUT_PORTS_START( starshp1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("VBLANK")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,starshp1_analog_r, NULL) /* analog in */
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,starshp1_analog_r, nullptr) /* analog in */
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("COINAGE")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,collision_latch_r, NULL) /* collision latch */
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,collision_latch_r, nullptr) /* collision latch */
PORT_DIPNAME( 0x70, 0x20, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) )
diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp
index 986d1c6d671..0cb2206cd2f 100644
--- a/src/mame/drivers/starwars.cpp
+++ b/src/mame/drivers/starwars.cpp
@@ -240,9 +240,9 @@ static INPUT_PORTS_START( starwars )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
/* Bit 6 is VG_HALT */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_starwars_device, done_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_starwars_device, done_r, nullptr)
/* Bit 7 is MATH_RUN - see machine/starwars.c */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starwars_state,matrix_flag_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starwars_state,matrix_flag_r, nullptr)
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x02, "Starting Shields" ) PORT_DIPLOCATION("10D:1,2")
diff --git a/src/mame/drivers/studio2.cpp b/src/mame/drivers/studio2.cpp
index 74f681d5134..1f620756308 100644
--- a/src/mame/drivers/studio2.cpp
+++ b/src/mame/drivers/studio2.cpp
@@ -698,7 +698,7 @@ static MACHINE_CONFIG_START( mpt02, mpt02_state )
MCFG_SOUND_ADD("beeper", BEEP, 300)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, CDP1864_CLOCK, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NULL, READLINE(mpt02_state, rdata_r), READLINE(mpt02_state, bdata_r), READLINE(mpt02_state, gdata_r))
+ MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, CDP1864_CLOCK, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(mpt02_state, rdata_r), READLINE(mpt02_state, bdata_r), READLINE(mpt02_state, gdata_r))
MCFG_CDP1864_CHROMINANCE(RES_K(4.7), RES_K(8.2), RES_K(4.7), RES_K(22))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 0c72d2e9814..1ae54b9fb86 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -2885,6 +2885,8 @@ ROM_START( pclub2 ) // set to 1p / runs with the USA bios
ROM_LOAD( "pclub2.nv", 0x0000, 0x0080, CRC(00d0f04e) SHA1(8b5a3e1c52e34443f83fd4a8948a00cacb5071d0) )
ROM_END
+
+
ROM_START( pclub2fc ) // set to 1p
STV_BIOS
@@ -3008,6 +3010,21 @@ ROM_START( pclub26w ) // set to 1p
ROM_LOAD( "pclub26w.nv", 0x0000, 0x0080, CRC(448f770d) SHA1(5f966c511c4c8e9d5b2d257c41c2c88a453b4944) )
ROM_END
+ROM_START( pclub26wa ) // set to 1p
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+
+ ROM_LOAD16_WORD_SWAP( "ic22.bin", 0x0200000, 0x0200000, CRC(a88e117d) SHA1(afbc862c558f710b2a87e1326c91881996008055) )
+ ROM_LOAD16_WORD_SWAP( "ic24.bin", 0x0400000, 0x0200000, CRC(d98371e2) SHA1(813ac5f3c5b57d07cc319c73560bc0719ddcfe6b) )
+ ROM_LOAD16_WORD_SWAP( "ic26.bin", 0x0600000, 0x0200000, CRC(d0412c8d) SHA1(4cb3c0ed3176bf86dee00649678a8e868819e92e) ) // this is actually blank after 0x199404 but otherwise matches the rom in the parent set, the rom check expects this and fails with the rom from the parent set.
+ ROM_LOAD16_WORD_SWAP( "ic28.bin", 0x0800000, 0x0200000, CRC(3c330c9b) SHA1(92f8e8d4f43db7c4ce431d17501492a7f8d8a867) )
+ ROM_LOAD16_WORD_SWAP( "ic30.bin", 0x0a00000, 0x0200000, CRC(00a0c702) SHA1(f2c4a7a51559f0ade96b8e6337cd1a1d61472de7) ) // same as the Warner Bros and Print Club Kome Kome Club versions?!
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
+ ROM_LOAD( "pclub26w.nv", 0x0000, 0x0080, CRC(448f770d) SHA1(5f966c511c4c8e9d5b2d257c41c2c88a453b4944) )
+ROM_END
+
ROM_START( pclub27s ) // set to 1p
STV_BIOS
@@ -3023,6 +3040,39 @@ ROM_START( pclub27s ) // set to 1p
ROM_LOAD( "pclub27s.nv", 0x0000, 0x0080, CRC(e58c7167) SHA1(d88b1648c5d86a90615a8c6a1bf87bc9e75dc320) )
ROM_END
+ROM_START( prc28su ) // set to 1p
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+
+ ROM_LOAD16_WORD_SWAP( "u22.bin", 0x0200000, 0x0200000, CRC(b78cf122) SHA1(10ecdbb04d1ce2c7f98e57260bbd6a09b8a5905d) ) // OK (tested as IC7)
+ ROM_LOAD16_WORD_SWAP( "u24.bin", 0x0400000, 0x0200000, CRC(aca05d29) SHA1(68c487821a912aea867f2f5041f5d926f31e4513) ) // OK (tested as IC2)
+ ROM_LOAD16_WORD_SWAP( "u26.bin", 0x0600000, 0x0200000, CRC(5591f6e2) SHA1(95a28b0a4fc2aeb063902505a4f3613c33f9059a) ) // OK (tested as IC2)
+ ROM_LOAD16_WORD_SWAP( "u28.bin", 0x0800000, 0x0200000, BAD_DUMP CRC(0899889b) SHA1(e7a77350a2421bbd867681f4c256d3b0d473468d) ) // BAD? (tested as IC3)
+ ROM_LOAD16_WORD_SWAP( "u30.bin", 0x0a00000, 0x0200000, BAD_DUMP CRC(2156b889) SHA1(047d73156da503711283bf7ca8e13722c22d2e1e) ) // BAD? (tested as IC3)
+ ROM_LOAD16_WORD_SWAP( "u32.bin", 0x0c00000, 0x0200000, CRC(e989f1e3) SHA1(768ce36b515ef2d777d5ea0dc074d700ade56110) ) // not tested?!
+ ROM_LOAD16_WORD_SWAP( "u34.bin", 0x0e00000, 0x0200000, BAD_DUMP CRC(555863d3) SHA1(bce1e63af9c45d9bd99685a42e9b3a6c2af66c87) ) // not tested?!
+ ROM_LOAD16_WORD_SWAP( "u36.bin", 0x1000000, 0x0200000, CRC(7cb3cd89) SHA1(7f421b58cde211f047e91fd352c7f7c78f4b2555) ) // not tested?! ( FIXED BITS (xxxxxxxx11111111) )
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
+ ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(447bb3bd) SHA1(9fefec09849bfa0c14b49e73ff13e2a538dff511) )
+ROM_END
+
+ROM_START( prc2ksu ) // set to 1p (this dump is too damaged to even run the ROM tests properly)
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+
+ ROM_LOAD16_WORD_SWAP( "ic22.bin", 0x0200000, 0x0200000, BAD_DUMP CRC(455b22c3) SHA1(8eb87461b690783b36eaa8a56dd1fbeadfa0198d) ) // BAD
+ ROM_LOAD16_WORD_SWAP( "ic24.bin", 0x0400000, 0x0200000, BAD_DUMP CRC(02da49b7) SHA1(dd19bfd6c21f432b3af011ce43ba38d295c06c6d) ) // (maybe bad, maybe good, consistent read at least)
+ ROM_LOAD16_WORD_SWAP( "ic26.bin", 0x0600000, 0x0200000, BAD_DUMP CRC(a431d614) SHA1(75de91d8eff5af7e1b668012a0613884ba660e21) ) // (maybe bad, maybe good, consistent read at least)
+ ROM_LOAD16_WORD_SWAP( "ic28.bin", 0x0800000, 0x0200000, BAD_DUMP CRC(07f99eeb) SHA1(d6798b8eba1c4d6993d9ec6a62c4e39fc58428f3) ) // BAD
+ ROM_LOAD16_WORD_SWAP( "ic30.bin", 0x0a00000, 0x0200000, BAD_DUMP CRC(91b261b1) SHA1(4c270d73be9a82e7139aafc9af5d89e0e4e0c80a) ) // BAD
+
+ ROM_REGION16_BE( 0x80, "eeprom", ROMREGION_ERASE00 ) // preconfigured to 1 player
+ROM_END
+
+
ROM_START( pclub2pe ) // set to 1p
STV_BIOS
@@ -3108,6 +3158,8 @@ ROM_START( pclubor ) // set to 1p
ROM_LOAD( "pclubor.nv", 0x0000, 0x0080, CRC(3ad918c0) SHA1(70b63d78948e2fc26fd95f98b93ed86c6130ed8e) )
ROM_END
+
+
ROM_START( pclubol ) // set to 1p
STV_BIOS
@@ -3189,12 +3241,33 @@ ROM_START( pclb2elk ) // set to 1p
ROM_LOAD( "pclb2elk.nv", 0x0000, 0x0080, CRC(54c7564f) SHA1(574dcc5e8fe4aac091fee1476347485ed660eddd) )
ROM_END
+ROM_START( pckobe99 ) // set to 1p
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+ // all ROM tests fail both in MAME and on real hardware, but ROMs read consistently.
+ // there do seem to be bad values on some 0x40000 boundaries in places tho (obvious if you look at the blank fill area of ic36 for instance)
+ ROM_LOAD16_WORD_SWAP( "ic22.bin", 0x0200000, 0x0200000, CRC(670296eb) SHA1(18055dddf59edbf6d6a97bc81ba332e681f460ba) ) //
+ ROM_LOAD16_WORD_SWAP( "ic24.bin", 0x0400000, 0x0200000, CRC(c2139f62) SHA1(9e7060d77571349b13e58a845fde0f75c29a1bac) ) //
+ ROM_LOAD16_WORD_SWAP( "ic26.bin", 0x0600000, 0x0200000, CRC(17e3efd0) SHA1(f004bb27c1708ed5a78426aa26a51496470c173d) ) //
+ ROM_LOAD16_WORD_SWAP( "ic28.bin", 0x0800000, 0x0200000, CRC(a52f99f6) SHA1(9d23f63a9515b468c93320458d12f54850e9e121) ) //
+ ROM_LOAD16_WORD_SWAP( "ic30.bin", 0x0a00000, 0x0200000, CRC(f1b7e3d5) SHA1(2e1f881c0abe8bfb168478b3cbbd724c74c374c0) ) //
+ ROM_LOAD16_WORD_SWAP( "ic32.bin", 0x0c00000, 0x0200000, CRC(76f6efaa) SHA1(d861d178a37adbde6b86df84231b34b89c5fc1d8) ) //
+ ROM_LOAD16_WORD_SWAP( "ic34.bin", 0x0e00000, 0x0200000, CRC(894c63f9) SHA1(9956fd512cb715780616c4262d2b05474e3337ff) ) //
+ ROM_LOAD16_WORD_SWAP( "ic36.bin", 0x1000000, 0x0200000, CRC(078694c3) SHA1(a37eb118338c0fc07aa75705dc6a7a1b866cb081) ) // 2ND HALF = xx00
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
+ ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(dbe305a9) SHA1(4b738104db8345385db3f622672dcc536bbfe67e) )
+ROM_END
+
+
+
ROM_START( pclove )
STV_BIOS
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
// note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26
- // there must be a way to enable / disable it.
+ // this sometimes causes it to fail on real hardware too(!)
ROM_LOAD16_WORD_SWAP( "pclbLove.ic22", 0x0200000, 0x0200000, CRC(8cd25a0f) SHA1(c938d5f4f800db019abc2e17cce1e780e93f3d02) ) // OK (tested as IC7)
ROM_LOAD16_WORD_SWAP( "pclbLove.ic24", 0x0400000, 0x0200000, CRC(85583e2c) SHA1(7f407d1bce40317fc10433dafcd82ee41be05839) ) // OK (tested as IC2)
ROM_LOAD16_WORD_SWAP( "pclbLove.ic26", 0x0600000, 0x0200000, CRC(7efcabcc) SHA1(b99a67ab2053c3be5ce37530b65f9693c2a4eef8) ) // OK (tested as IC2)
@@ -3213,7 +3286,7 @@ ROM_START( pclove2 )
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
// note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26
- // there must be a way to enable / disable it.
+ // this sometimes causes it to fail on real hardware too(!)
ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(d7d968d6) SHA1(59916a453ba8a53af2138272e359c6d6ce11ea8c) ) // OK (tested as IC7)
ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(9c9b7e57) SHA1(ae834a3648126ec2456d2cc5544f81b6dc2f5825) ) // OK (tested as IC2)
ROM_LOAD16_WORD_SWAP( "ic26", 0x0600000, 0x0200000, CRC(55eb859f) SHA1(4f25536787142f965d688d1758a45885b52ae52e) ) // OK (tested as IC2)
@@ -3227,6 +3300,43 @@ ROM_START( pclove2 )
ROM_LOAD( "pclove2.nv", 0x0000, 0x0080, CRC(93b30600) SHA1(eadba12ec322911823a6873a343e4d9b4089ed93) )
ROM_END
+ROM_START( pcpooh2 ) // set to 1p
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+ // note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26
+ // this sometimes causes it to fail on real hardware too(!)
+ ROM_LOAD16_WORD_SWAP( "ic22.bin", 0x0200000, 0x0200000, CRC(2cb33332) SHA1(7c05035358c08b6327d9f0581bf7036e95001eae) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic24.bin", 0x0400000, 0x0200000, CRC(3c6fc10f) SHA1(8edb4c583be7270c1a8c155663f47554064f5213) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic26.bin", 0x0600000, 0x0200000, CRC(b891c7ab) SHA1(7948ac76cde2851dcba3752e84e1fc35affe0bc4) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic28.bin", 0x0800000, 0x0200000, CRC(1a1c74cb) SHA1(0a35e5a5ccf42bda641d56cce2fd0d02953f3878) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic30.bin", 0x0a00000, 0x0200000, CRC(b7b6fc61) SHA1(bb02b321d3e2ff120f1b84f008507f0cf6c36768) ) // OK
+
+ // protection device is 317-0230
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
+ ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(5aee29d0) SHA1(a1dd443cf2dd9d52ca45ea687eff2f88cae25b85) )
+ROM_END
+
+ROM_START( pcpooh3 ) // set to 1p
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+ // note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26
+ // this sometimes causes it to fail on real hardware too(!)
+ ROM_LOAD16_WORD_SWAP( "ic22.bin", 0x0200000, 0x0200000, CRC(efc83c4f) SHA1(8cabb88d8d52beddcde6a62858f4666092ed179e) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic24.bin", 0x0400000, 0x0200000, CRC(e8753d0d) SHA1(571fe30075ad63dc395402cfb1d4734b54017e77) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic26.bin", 0x0600000, 0x0200000, CRC(daf1a0d4) SHA1(474fe24fb95ad3065a66e664f362692d86a8d563) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic28.bin", 0x0800000, 0x0200000, CRC(3c0f040f) SHA1(18d3917a1c1f49a2b45b13b92ba7da37341d3d1f) ) // OK
+ ROM_LOAD16_WORD_SWAP( "ic30.bin", 0x0a00000, 0x0200000, CRC(6006d785) SHA1(b6f4d1c26288c5ae48ad5ec785512a4b0fd3f8ef) ) // OK
+
+ // protection device is 317-0230
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
+ ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(e41d541b) SHA1(511fe00745787ee5dbd813125ddc3db921d6531e) )
+ROM_END
+
+
// Name Club / Name Club vol.2
// have an unusual rom mapping compared to other games, the cartridge is a little different too, with a large PALCE16V8H-10 marked 315-6026
@@ -3327,27 +3437,36 @@ GAME( 1999, pclubpok, stvbios, stv, stv, stv_state, stv, ROT0
// Japan sets
GAME( 1999, pclub2fc, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Felix The Cat (Rev. A) (J 970415 V1.100)", MACHINE_NOT_WORKING )
GAME( 1998, pclub2pf, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Puffy (Japan)", MACHINE_NOT_WORKING ) // version info is blank
-GAME( 1997, pclb2elk, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Earth Limited Kobe (Print Club Custom) (J 970808 V1.000)", MACHINE_NOT_WORKING )
GAME( 1997, pclub2pe, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Pepsiman (J 970618 V1.100)", MACHINE_NOT_WORKING )
GAME( 1997, pclub2wb, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Warner Bros (J 970228 V1.000)", MACHINE_NOT_WORKING )
+GAME( 1997, pclb2elk, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Earth Limited Kobe (Print Club Custom) (J 970808 V1.000)", MACHINE_NOT_WORKING )
+GAME( 1997, pckobe99, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Kobe Luminaire '99 (Print Club Custom 3) (J 991203 V1.000)", MACHINE_NOT_WORKING )
+
GAME( 1997, pclub26w, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 6 Winter (J 961210 V1.000)", MACHINE_NOT_WORKING ) // internal string is 'PURIKURA2 97FUYU' (but in reality it seems to be an end of 96 Winter version)
+GAME( 1997, pclub26wa, pclub26w,stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 6 Winter (J 970121 V1.200)", MACHINE_NOT_WORKING ) // ^
GAME( 1997, pclub27s, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 7 Spring (J 970313 V1.100)", MACHINE_NOT_WORKING )
-// Summer 97?
+GAME( 1997, prc28su, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 8 Summer (J 970616 V1.100)", MACHINE_NOT_WORKING ) // internal string 97SUMMER *** BAD DUMP ***
// Autumn 97?
GAME( 1997, prc297wi, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100, set 1)", MACHINE_NOT_WORKING ) // internal string is '97WINTER'
GAME( 1997, prc297wia, prc297wi,stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100, set 2)", MACHINE_NOT_WORKING ) // different program revision, same date code, clearly didn't get updated properly
-GAME( 1998, prc298sp, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Spring Ver (J 971017 V1.100)", MACHINE_NOT_WORKING ) // again, dat doesn't appear to have bene updated, this should be early 98
-GAME( 1998, prc298su, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Summer Ver (J 980603 V1.100)", MACHINE_NOT_WORKING ) // again, dat doesn't appear to have bene updated, this should be early 98
+GAME( 1998, prc298sp, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Spring Ver (J 971017 V1.100)", MACHINE_NOT_WORKING ) // again, date doesn't appear to have bene updated, this should be early 98
+GAME( 1998, prc298su, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Summer Ver (J 980603 V1.100)", MACHINE_NOT_WORKING ) //
GAME( 1998, prc298au, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Autumn Ver (J 980827 V1.000)", MACHINE_NOT_WORKING )
+GAME( 2000, prc2ksu, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 2000 Summer", MACHINE_NOT_WORKING ) // *** BAD DUMP *** (even internal strings are corrupt)
+
+
GAME( 1999, pclubor, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Goukakenran (J 991104 V1.000)", MACHINE_NOT_WORKING )
GAME( 1999, pclubol, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Olive (J 980717 V1.000)", MACHINE_NOT_WORKING )
GAME( 1997, pclub2kc, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Kome Kome Club (J 970203 V1.000)", MACHINE_NOT_WORKING )
GAME( 1997, pclubyo2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Yoshimoto V2 (J 970422 V1.100)", MACHINE_NOT_WORKING )
+
GAME( 1997, pclove, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club LoveLove (J 970421 V1.000)", MACHINE_NOT_WORKING ) // uses the same type of protection as decathlete!!
GAME( 1997, pclove2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club LoveLove Ver 2 (J 970825 V1.000)", MACHINE_NOT_WORKING ) // ^
+GAME( 1997, pcpooh2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club Winnie-the-Pooh Vol. 2 (J 971218 V1.000)", MACHINE_NOT_WORKING ) // ^
+GAME( 1998, pcpooh3, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club Winnie-the-Pooh Vol. 3 (J 980406 V1.000)", MACHINE_NOT_WORKING ) // ^
GAME( 1998, stress, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
@@ -3356,6 +3475,8 @@ GAME( 1996, nclubv2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0
GAME( 1997, nclubv3, stvbios, stv, stv, stv_state, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // no protection
+
+
/* Doing something.. but not enough yet */
GAME( 1995, vfremix, stvbios, stv, stv, stv_state, vfremix, ROT0, "Sega", "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/superslave.cpp b/src/mame/drivers/superslave.cpp
index e5b224bdefa..879c841b463 100644
--- a/src/mame/drivers/superslave.cpp
+++ b/src/mame/drivers/superslave.cpp
@@ -332,7 +332,7 @@ static MACHINE_CONFIG_START( superslave, superslave_state )
MCFG_Z80_DAISY_CHAIN(superslave_daisy_chain)
// devices
- MCFG_PIC8259_ADD(AM9519_TAG, INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(AM9519_TAG, INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(Z80PIO_TAG, Z80PIO, XTAL_8MHz/2)
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
diff --git a/src/mame/drivers/suprridr.cpp b/src/mame/drivers/suprridr.cpp
index 21319ed6f61..65101096158 100644
--- a/src/mame/drivers/suprridr.cpp
+++ b/src/mame/drivers/suprridr.cpp
@@ -245,7 +245,7 @@ CUSTOM_INPUT_MEMBER(suprridr_state::control_r)
static INPUT_PORTS_START( suprridr )
PORT_START("INPUTS")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, suprridr_state, control_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, suprridr_state, control_r, nullptr)
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
diff --git a/src/mame/drivers/swtpc09.cpp b/src/mame/drivers/swtpc09.cpp
index e1237b55a06..9c84bdcb59e 100644
--- a/src/mame/drivers/swtpc09.cpp
+++ b/src/mame/drivers/swtpc09.cpp
@@ -180,9 +180,9 @@ static MACHINE_CONFIG_START( swtpc09i, swtpc09_state )
/* old start to adding ide support, needs major updating */
/* this is to support an add on card driving IDE from a PIA */
// MCFG_HARDDISK_ADD("harddisk")
-// MCFG_IDE_CONTROLLER_ADD("ide", NULL)
-// MCFG_IDE_CONTROLLER_REGIONS("harddisk", NULL)
-// MCFG_IDE_CONTROLLER_ADD( "ide", ide_intf, "hdd", NULL, false ) /* FIXME */ bebox
+// MCFG_IDE_CONTROLLER_ADD("ide", nullptr)
+// MCFG_IDE_CONTROLLER_REGIONS("harddisk", nullptr)
+// MCFG_IDE_CONTROLLER_ADD( "ide", ide_intf, "hdd", nullptr, false ) /* FIXME */ bebox
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp
index 8169a0d16d0..066c23a406d 100644
--- a/src/mame/drivers/system1.cpp
+++ b/src/mame/drivers/system1.cpp
@@ -1996,10 +1996,10 @@ static INPUT_PORTS_START( dakkochn )
PORT_INCLUDE( choplift )
PORT_MODIFY("P1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_data_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_data_r, nullptr)
PORT_MODIFY("P2")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_status_r, NULL)
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_status_r, nullptr)
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* start 1 & 2 not connected. */
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 2d13f715018..1ffaa7df135 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -233,8 +233,8 @@ static INPUT_PORTS_START( f3 )
PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START3 )
PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START4 )
- PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, NULL)
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, NULL)
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, nullptr)
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, nullptr)
/* MSW: Coin counters/lockouts are readable, LSW: Joysticks (Player 1 & 2) */
PORT_START("IN.1")
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index 0d6b3cdcb51..116e011b352 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -489,7 +489,7 @@ static INPUT_PORTS_START( spaceskr )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -571,7 +571,7 @@ static INPUT_PORTS_START( spacecr )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -655,7 +655,7 @@ static INPUT_PORTS_START( junglek )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Finish Bonus" )
@@ -777,7 +777,7 @@ static INPUT_PORTS_START( alpine )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" )
@@ -862,7 +862,7 @@ static INPUT_PORTS_START( alpinea )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" )
@@ -940,7 +940,7 @@ static INPUT_PORTS_START( timetunl )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
@@ -1140,7 +1140,7 @@ static INPUT_PORTS_START( elevator )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:1,2")
@@ -1223,7 +1223,7 @@ static INPUT_PORTS_START( tinstar )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Bonus Life?" )
@@ -1306,7 +1306,7 @@ static INPUT_PORTS_START( waterski )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -1395,7 +1395,7 @@ static INPUT_PORTS_START( bioatack )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1") /* d50a */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) )
@@ -1462,7 +1462,7 @@ static INPUT_PORTS_START( sfposeid )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -1530,7 +1530,7 @@ static INPUT_PORTS_START( hwrace )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp
index 61c26bce428..033b6fcf11e 100644
--- a/src/mame/drivers/tandy2k.cpp
+++ b/src/mame/drivers/tandy2k.cpp
@@ -836,9 +836,9 @@ static MACHINE_CONFIG_START( tandy2k, tandy2k_state )
//MCFG_PIT8253_CLK2(XTAL_16MHz/8)
//MCFG_PIT8253_OUT2_HANDLER(WRITELINE(tandy2k_state, rfrqpulse_w))
- MCFG_PIC8259_ADD(I8259A_0_TAG, DEVWRITELINE(I80186_TAG, i80186_cpu_device, int0_w), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A_0_TAG, DEVWRITELINE(I80186_TAG, i80186_cpu_device, int0_w), VCC, NOOP)
- MCFG_PIC8259_ADD(I8259A_1_TAG, DEVWRITELINE(I80186_TAG, i80186_cpu_device, int1_w), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A_1_TAG, DEVWRITELINE(I80186_TAG, i80186_cpu_device, int1_w), VCC, NOOP)
MCFG_I8272A_ADD(I8272A_TAG, true)
downcast<i8272a_device *>(device)->set_select_lines_connected(true);
diff --git a/src/mame/drivers/tdv2324.cpp b/src/mame/drivers/tdv2324.cpp
index 539d0f2e2aa..ac7a8e7c004 100644
--- a/src/mame/drivers/tdv2324.cpp
+++ b/src/mame/drivers/tdv2324.cpp
@@ -279,7 +279,7 @@ static MACHINE_CONFIG_START( tdv2324, tdv2324_state )
MCFG_TMS9927_CHAR_WIDTH(8)
// devices
- MCFG_PIC8259_ADD(P8259A_TAG, NULL, VCC, NULL)
+ MCFG_PIC8259_ADD(P8259A_TAG, NOOP, VCC, NOOP)
MCFG_DEVICE_ADD(P8253_5_0_TAG, PIT8253, 0)
diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp
index 514f705cdbf..81677742291 100644
--- a/src/mame/drivers/tempest.cpp
+++ b/src/mame/drivers/tempest.cpp
@@ -477,12 +477,12 @@ static INPUT_PORTS_START( tempest )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1)
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_tempest_device, done_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_tempest_device, done_r, nullptr)
/* bit 7 is tied to a 3kHz (?) clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,clock_r, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,clock_r, nullptr)
PORT_START("IN1/DSW0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_knob_r, NULL)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_knob_r, nullptr)
/* The next one is reponsible for cocktail mode.
* According to the documentation, this is not a switch, although
* it may have been planned to put it on the Math Box PCB, D/E2 )
@@ -503,7 +503,7 @@ static INPUT_PORTS_START( tempest )
PORT_DIPNAME( 0x04, 0x04, "Rating" ) PORT_DIPLOCATION("DE2:2")
PORT_DIPSETTING( 0x04, "1, 3, 5, 7, 9" )
PORT_DIPSETTING( 0x00, "tied to high score" )
- PORT_BIT(0x18, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_buttons_r, NULL)
+ PORT_BIT(0x18, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_buttons_r, nullptr)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp
index 4656b3c1f98..7bbdbeeae12 100644
--- a/src/mame/drivers/tetrisp2.cpp
+++ b/src/mame/drivers/tetrisp2.cpp
@@ -1021,7 +1021,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( rocknms )
PORT_START("PLAYERS") // IN0 - $be0002.w
- PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tetrisp2_state,rocknms_main2sub_status_r, NULL) // MAIN -> SUB Communication
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tetrisp2_state,rocknms_main2sub_status_r, nullptr) // MAIN -> SUB Communication
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
diff --git a/src/mame/drivers/thayers.cpp b/src/mame/drivers/thayers.cpp
index d344a4ea2c8..4405f05945b 100644
--- a/src/mame/drivers/thayers.cpp
+++ b/src/mame/drivers/thayers.cpp
@@ -676,8 +676,8 @@ static INPUT_PORTS_START( thayers )
PORT_START("COIN")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_enter_r, NULL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_ready_r, NULL)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_enter_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_ready_r, nullptr)
PORT_START("ROW.0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "2" ) PORT_CODE( KEYCODE_F2 )
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index 4bb631ff92a..49e2f21f395 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -910,7 +910,7 @@ static MACHINE_CONFIG_DERIVED( to770, to7 )
MCFG_DEVICE_MODIFY(THOM_PIA_SYS)
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, to770_sys_porta_in))
- MCFG_PIA_READPB_HANDLER(NULL)
+ MCFG_PIA_READPB_HANDLER(NOOP)
MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, to770_sys_portb_out))
MCFG_PIA_CB2_HANDLER(WRITELINE(thomson_state, to770_sys_cb2_out))
@@ -1114,7 +1114,7 @@ static MACHINE_CONFIG_DERIVED( mo5, to7 )
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, mo5_sys_porta_out))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, mo5_sys_portb_out))
MCFG_PIA_CA2_HANDLER(WRITELINE(thomson_state, mo5_set_cassette_motor))
- MCFG_PIA_CB2_HANDLER(NULL)
+ MCFG_PIA_CB2_HANDLER(NOOP)
MCFG_PIA_IRQB_HANDLER(WRITELINE(thomson_state, thom_irq_1)) /* WARNING: differs from TO7 ! */
MCFG_DEVICE_REMOVE("cartslot")
@@ -1454,11 +1454,11 @@ static MACHINE_CONFIG_DERIVED( to9, to7 )
MCFG_DEVICE_MODIFY(THOM_PIA_SYS)
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, to9_sys_porta_in))
- MCFG_PIA_READPB_HANDLER(NULL)
+ MCFG_PIA_READPB_HANDLER(NOOP)
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, to9_sys_porta_out))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, to9_sys_portb_out))
- MCFG_PIA_CB2_HANDLER(NULL)
- MCFG_PIA_IRQA_HANDLER(NULL)
+ MCFG_PIA_CB2_HANDLER(NOOP)
+ MCFG_PIA_IRQA_HANDLER(NOOP)
MCFG_DEVICE_MODIFY("mc6846")
MCFG_MC6846_OUT_PORT_CB(WRITE8(thomson_state, to9_timer_port_out))
@@ -1676,11 +1676,11 @@ static MACHINE_CONFIG_DERIVED( to8, to7 )
MCFG_DEVICE_MODIFY(THOM_PIA_SYS)
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, to8_sys_porta_in))
- MCFG_PIA_READPB_HANDLER(NULL)
+ MCFG_PIA_READPB_HANDLER(NOOP)
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, to9_sys_porta_out))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, to8_sys_portb_out))
- MCFG_PIA_CB2_HANDLER(NULL)
- MCFG_PIA_IRQA_HANDLER(NULL)
+ MCFG_PIA_CB2_HANDLER(NOOP)
+ MCFG_PIA_IRQA_HANDLER(NOOP)
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(thomson_state, write_centronics_busy))
@@ -1831,11 +1831,11 @@ static MACHINE_CONFIG_DERIVED( to9p, to7 )
MCFG_DEVICE_MODIFY(THOM_PIA_SYS)
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, to9_sys_porta_in))
- MCFG_PIA_READPB_HANDLER(NULL)
+ MCFG_PIA_READPB_HANDLER(NOOP)
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, to9_sys_porta_out))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, to8_sys_portb_out))
- MCFG_PIA_CB2_HANDLER(NULL)
- MCFG_PIA_IRQA_HANDLER(NULL)
+ MCFG_PIA_CB2_HANDLER(NOOP)
+ MCFG_PIA_IRQA_HANDLER(NOOP)
MCFG_PIA_IRQB_HANDLER(WRITELINE(thomson_state, thom_firq_1))
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
diff --git a/src/mame/drivers/ti990_4.cpp b/src/mame/drivers/ti990_4.cpp
index c922b662394..2e60a11f674 100644
--- a/src/mame/drivers/ti990_4.cpp
+++ b/src/mame/drivers/ti990_4.cpp
@@ -265,7 +265,7 @@ ADDRESS_MAP_END
{
FLOPPY_STANDARD_8_DSSD,
LEGACY_FLOPPY_OPTIONS_NAME(fd800),
- NULL
+ nullptr
}; */
MACHINE_RESET_MEMBER(ti990_4_state,ti990_4)
diff --git a/src/mame/drivers/timeplt.cpp b/src/mame/drivers/timeplt.cpp
index caf5505ee2f..85e620327b9 100644
--- a/src/mame/drivers/timeplt.cpp
+++ b/src/mame/drivers/timeplt.cpp
@@ -270,7 +270,7 @@ static INPUT_PORTS_START( chkun )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Bet 3B")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, timeplt_state, chkun_hopper_status_r, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, timeplt_state, chkun_hopper_status_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Bet 1B")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Bet 2B")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
@@ -319,7 +319,7 @@ static INPUT_PORTS_START( bikkuric )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, timeplt_state, chkun_hopper_status_r, NULL)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, timeplt_state, chkun_hopper_status_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
diff --git a/src/mame/drivers/tm990189.cpp b/src/mame/drivers/tm990189.cpp
index 033e9f8fa1a..f515ccb544b 100644
--- a/src/mame/drivers/tm990189.cpp
+++ b/src/mame/drivers/tm990189.cpp
@@ -631,7 +631,7 @@ static const tms9901_interface usr9901reset_param =
TMS9901_INT1 | TMS9901_INT2 | TMS9901_INT3 | TMS9901_INT4 | TMS9901_INT5 | TMS9901_INT6, // only input pins whose state is always known
// Read handler. Covers all input lines (see tms9901.h)
- DEVCB_NULL,
+ DEVCB_NOOP,
// write handlers
{
@@ -639,18 +639,18 @@ static const tms9901_interface usr9901reset_param =
DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led1_w),
DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led2_w),
DEVCB_DRIVER_LINE_MEMBER(tm990189_state, usr9901_led3_w),
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP,
+ DEVCB_NOOP
},
// interrupt handler
diff --git a/src/mame/drivers/tmc2000e.cpp b/src/mame/drivers/tmc2000e.cpp
index 8017a685308..fffc43334f2 100644
--- a/src/mame/drivers/tmc2000e.cpp
+++ b/src/mame/drivers/tmc2000e.cpp
@@ -300,7 +300,7 @@ static MACHINE_CONFIG_START( tmc2000e, tmc2000e_state )
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NULL, READLINE(tmc2000e_state, rdata_r), READLINE(tmc2000e_state, bdata_r), READLINE(tmc2000e_state, gdata_r))
+ MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(tmc2000e_state, rdata_r), READLINE(tmc2000e_state, bdata_r), READLINE(tmc2000e_state, gdata_r))
MCFG_CDP1864_CHROMINANCE(RES_K(2.2), RES_K(1), RES_K(5.1), RES_K(4.7)) // unverified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index 96b31f8ff24..11a6c1dc7d0 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -1668,7 +1668,7 @@ static INPUT_PORTS_START( tekipaki )
// PORT_CONFSETTING( 0x000d, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x000e, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x000f, "Japan (Distributed by Tecmo)" )
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, NULL)
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, nullptr)
INPUT_PORTS_END
@@ -2056,7 +2056,7 @@ static INPUT_PORTS_START( whoopee )
PORT_INCLUDE( pipibibs )
PORT_MODIFY("JMPR")
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, NULL) // bit 0x10 sound ready
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, nullptr) // bit 0x10 sound ready
INPUT_PORTS_END
@@ -2448,7 +2448,7 @@ static INPUT_PORTS_START( pwrkick )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYIN ) // 10 Yen
PORT_SERVICE( 0x02, IP_ACTIVE_HIGH )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Down Button")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state, pwrkick_hopper_status_r, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state, pwrkick_hopper_status_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("Memory Reset")
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp
index 4b3919afdc1..2d31a2271d0 100644
--- a/src/mame/drivers/tomcat.cpp
+++ b/src/mame/drivers/tomcat.cpp
@@ -349,7 +349,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( tomcat )
PORT_START("IN0") /* INPUTS */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_tomcat_device, done_r, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER("avg", avg_tomcat_device, done_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // SPARE
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) // DIAGNOSTIC
PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
diff --git a/src/mame/drivers/trs80m2.cpp b/src/mame/drivers/trs80m2.cpp
index f20409e0a2e..9aa8b13d568 100644
--- a/src/mame/drivers/trs80m2.cpp
+++ b/src/mame/drivers/trs80m2.cpp
@@ -847,7 +847,7 @@ static MACHINE_CONFIG_START( trs80m16, trs80m16_state )
MCFG_Z80SIO0_ADD(Z80SIO_TAG, XTAL_8MHz/2, 0, 0, 0, 0)
MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_PIC8259_ADD(AM9519A_TAG, INPUTLINE(M68000_TAG, M68K_IRQ_5), VCC, NULL )
+ MCFG_PIC8259_ADD(AM9519A_TAG, INPUTLINE(M68000_TAG, M68K_IRQ_5), VCC, NOOP)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(Z80PIO_TAG, z80pio_device, strobe_b))
diff --git a/src/mame/drivers/ts802.cpp b/src/mame/drivers/ts802.cpp
index d60c5005576..6ea48ff1272 100644
--- a/src/mame/drivers/ts802.cpp
+++ b/src/mame/drivers/ts802.cpp
@@ -166,7 +166,7 @@ static const z80_daisy_config daisy_chain_intf[] =
{ "z80dart2" },
{ "z80dma" },
{ "z80ctc" },
- { NULL }
+ { nullptr }
};
#endif
diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp
index 54bd3e0d04d..9964141f3cf 100644
--- a/src/mame/drivers/tsispch.cpp
+++ b/src/mame/drivers/tsispch.cpp
@@ -392,7 +392,7 @@ static MACHINE_CONFIG_START( prose2k, tsispch_state )
MCFG_NECDSP_OUT_P1_CB(WRITELINE(tsispch_state, dsp_to_8086_p1_w))
/* PIC 8259 */
- MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
/* uarts */
MCFG_DEVICE_ADD("i8251a_u15", I8251, 0)
diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp
index 20ffc65710f..123cb402371 100644
--- a/src/mame/drivers/tvc.cpp
+++ b/src/mame/drivers/tvc.cpp
@@ -16,7 +16,7 @@
#include "cpu/z80/z80.h"
#include "video/mc6845.h"
#include "machine/ram.h"
-#include "audio/tvc_snd.h"
+#include "audio/tvc.h"
#include "bus/centronics/ctronics.h"
#include "imagedev/cassette.h"
#include "imagedev/snapquik.h"
diff --git a/src/mame/drivers/tx0.cpp b/src/mame/drivers/tx0.cpp
index d95ef46b796..85e557cac23 100644
--- a/src/mame/drivers/tx0.cpp
+++ b/src/mame/drivers/tx0.cpp
@@ -332,7 +332,7 @@ void tx0_state::machine_reset()
void tx0_state::tx0_machine_stop()
{
/* the core will take care of freeing the timers, BUT we must set the variables
- to NULL if we don't want to risk confusing the tape image init function */
+ to nullptr if we don't want to risk confusing the tape image init function */
m_tape_reader.timer = m_tape_puncher.timer = m_typewriter.prt_timer = m_dis_timer = nullptr;
}
@@ -511,7 +511,7 @@ bool tx0_readtape_image_device::call_load()
/* restart reader IO when necessary */
/* note that this function may be called before tx0_init_machine, therefore
before tape_reader.timer is allocated. It does not matter, as the clutch is never
- down at power-up, but we must not call timer_enable with a NULL parameter! */
+ down at power-up, but we must not call timer_enable with a nullptr parameter! */
if (state->m_tape_reader.timer)
{
@@ -864,7 +864,7 @@ bool tx0_magtape_image_device::call_load()
/* restart IO when necessary */
/* note that this function may be called before tx0_init_machine, therefore
before magtape.timer is allocated. We must not call timer_enable with a
- NULL parameter! */
+ nullptr parameter! */
if (state->m_magtape.timer)
{
if (state->m_magtape.state == MTS_SELECTING)
@@ -1550,7 +1550,7 @@ static MACHINE_CONFIG_START( tx0_64kw, tx0_state )
WRITELINE( tx0_state, tx0_io_dis ),
WRITELINE( tx0_state, tx0_io_r3l ),
WRITELINE( tx0_state, tx0_io_prt ),
- NULL,
+ NOOP,
WRITELINE( tx0_state, tx0_io_p6h ),
WRITELINE( tx0_state, tx0_io_p7h ),
WRITELINE( tx0_state, tx0_sel ),
diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp
index b820a7a8565..5b17aea9d9f 100644
--- a/src/mame/drivers/undrfire.cpp
+++ b/src/mame/drivers/undrfire.cpp
@@ -496,7 +496,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( undrfire )
PORT_START("INPUTS")
- PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, undrfire_state,frame_counter_r, NULL) /* Frame counter */
+ PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, undrfire_state,frame_counter_r, nullptr) /* Frame counter */
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -564,7 +564,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( cbombers )
PORT_START("INPUTS")
- PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, undrfire_state,frame_counter_r, NULL) /* Frame counter */
+ PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, undrfire_state,frame_counter_r, nullptr) /* Frame counter */
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/vamphalf.cpp b/src/mame/drivers/vamphalf.cpp
index 97640e10076..b84b9a6a817 100644
--- a/src/mame/drivers/vamphalf.cpp
+++ b/src/mame/drivers/vamphalf.cpp
@@ -938,7 +938,7 @@ static INPUT_PORTS_START( boonggab )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 1
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 2
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 3
- PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vamphalf_state,boonggab_photo_sensors_r, NULL) // photo sensors 1, 2 and 3
+ PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vamphalf_state,boonggab_photo_sensors_r, nullptr) // photo sensors 1, 2 and 3
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/vegaeo.cpp b/src/mame/drivers/vegaeo.cpp
index 9d366595ed8..9ea3f95100f 100644
--- a/src/mame/drivers/vegaeo.cpp
+++ b/src/mame/drivers/vegaeo.cpp
@@ -150,7 +150,7 @@ static INPUT_PORTS_START( crazywar )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
- PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegaeo_state, eolith_speedup_getvblank, NULL)
+ PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegaeo_state, eolith_speedup_getvblank, nullptr)
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -216,7 +216,7 @@ static MACHINE_CONFIG_START( vega, vegaeo_state )
MCFG_CPU_PROGRAM_MAP(vega_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", vegaeo_state, eolith_speedup, "screen", 0, 1)
- MCFG_AT28C16_ADD("at28c16", NULL)
+ MCFG_AT28C16_ADD("at28c16", nullptr)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index f9dc1eae0f9..c55f4d6f5c8 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -122,7 +122,7 @@ INPUT_CHANGED_MEMBER(vicdual_state::coin_changed)
#define PORT_COIN_DEFAULT \
PORT_START("COIN") \
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,coin_changed, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,coin_changed, nullptr)
@@ -315,9 +315,9 @@ static INPUT_PORTS_START( depthch )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -396,7 +396,7 @@ static INPUT_PORTS_START( safari )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
@@ -404,7 +404,7 @@ static INPUT_PORTS_START( safari )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -488,9 +488,9 @@ static INPUT_PORTS_START( frogs )
PORT_CONFSETTING( 0x40, DEF_STR( 1C_1C ) )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
@@ -616,9 +616,9 @@ static INPUT_PORTS_START( headon )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_CABINET_COLOR_OR_BW
@@ -642,10 +642,10 @@ static INPUT_PORTS_START( headonmz )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) // protection? (check on startup)
PORT_BIT( 0x7a, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_CABINET_COLOR_OR_BW
@@ -678,12 +678,12 @@ static INPUT_PORTS_START( supcrash )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_DIPNAME( 0x04, 0x04, "Rom Test" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x7a, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -701,9 +701,9 @@ static INPUT_PORTS_START( carnivalh )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_CABINET_COLOR_OR_BW
@@ -745,9 +745,9 @@ static INPUT_PORTS_START( sspaceat )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_CABINET_COLOR_OR_BW
@@ -889,12 +889,12 @@ static INPUT_PORTS_START( headon2 )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -923,12 +923,12 @@ static INPUT_PORTS_START( car2 )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -966,10 +966,10 @@ static INPUT_PORTS_START( digger )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
-// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL) // it's like this according to the schematics, but gameplay speed is too fast;
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL) // gameplay speed is correct now, there's likely an error in the schematics then...
+// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr) // it's like this according to the schematics, but gameplay speed is too fast;
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr) // gameplay speed is correct now, there's likely an error in the schematics then...
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -1318,7 +1318,7 @@ static INPUT_PORTS_START( invho2 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1327,7 +1327,7 @@ static INPUT_PORTS_START( invho2 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x101)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1336,7 +1336,7 @@ static INPUT_PORTS_START( invho2 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x102)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1381,7 +1381,7 @@ static INPUT_PORTS_START( carhntds )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1390,7 +1390,7 @@ static INPUT_PORTS_START( carhntds )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x101)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1399,7 +1399,7 @@ static INPUT_PORTS_START( carhntds )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x102)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1438,7 +1438,7 @@ static INPUT_PORTS_START( invds )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1447,7 +1447,7 @@ static INPUT_PORTS_START( invds )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x101)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1456,7 +1456,7 @@ static INPUT_PORTS_START( invds )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x102)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1496,7 +1496,7 @@ static INPUT_PORTS_START( sspacaho )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1507,7 +1507,7 @@ static INPUT_PORTS_START( sspacaho )
PORT_DIPNAME( 0x04, 0x00, "Space Attack Bonus Life" ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x04, "15000" )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1518,7 +1518,7 @@ static INPUT_PORTS_START( sspacaho )
PORT_DIPNAME( 0x04, 0x00, "Space Attack Final UFO Bonus" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1554,7 +1554,7 @@ static INPUT_PORTS_START( tranqgun )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_vblank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_vblank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1565,7 +1565,7 @@ static INPUT_PORTS_START( tranqgun )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1576,7 +1576,7 @@ static INPUT_PORTS_START( tranqgun )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1605,7 +1605,7 @@ static INPUT_PORTS_START( spacetrk )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // unknown, but used
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1616,7 +1616,7 @@ static INPUT_PORTS_START( spacetrk )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1627,7 +1627,7 @@ static INPUT_PORTS_START( spacetrk )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1677,7 +1677,7 @@ static INPUT_PORTS_START( carnival )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1688,7 +1688,7 @@ static INPUT_PORTS_START( carnival )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1699,7 +1699,7 @@ static INPUT_PORTS_START( carnival )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1738,7 +1738,7 @@ static INPUT_PORTS_START( brdrline )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_vblank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_vblank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1747,7 +1747,7 @@ static INPUT_PORTS_START( brdrline )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x004)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, NULL) /* yes, this is different */
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr) /* yes, this is different */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1758,7 +1758,7 @@ static INPUT_PORTS_START( brdrline )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, "15000" )
PORT_DIPSETTING( 0x00, "20000" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1811,7 +1811,7 @@ static INPUT_PORTS_START( pulsar )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1822,7 +1822,7 @@ static INPUT_PORTS_START( pulsar )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1833,7 +1833,7 @@ static INPUT_PORTS_START( pulsar )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1869,7 +1869,7 @@ static INPUT_PORTS_START( heiankyo )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // bonus life?
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1880,7 +1880,7 @@ static INPUT_PORTS_START( heiankyo )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") // bonus life?
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* has to be 0, protection? */
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1891,7 +1891,7 @@ static INPUT_PORTS_START( heiankyo )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x04, "5" )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1916,7 +1916,7 @@ static INPUT_PORTS_START( alphaho )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1927,7 +1927,7 @@ static INPUT_PORTS_START( alphaho )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1938,7 +1938,7 @@ static INPUT_PORTS_START( alphaho )
PORT_DIPNAME( 0x04, 0x00, "Alpha Fighter Unknown" ) PORT_DIPLOCATION("SW1:4") // related to soccer frequency (code at 0x4950)
PORT_DIPSETTING( 0x00, DEF_STR ( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR ( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2164,7 +2164,7 @@ static INPUT_PORTS_START( samurai )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // unknown, but used
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2175,7 +2175,7 @@ static INPUT_PORTS_START( samurai )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2186,7 +2186,7 @@ static INPUT_PORTS_START( samurai )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2328,9 +2328,9 @@ static INPUT_PORTS_START( nsub )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)0)
@@ -2476,9 +2476,9 @@ static INPUT_PORTS_START( invinco )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, NULL)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
diff --git a/src/mame/drivers/victor9k.cpp b/src/mame/drivers/victor9k.cpp
index b01d0d9fe37..7563b4a37d4 100644
--- a/src/mame/drivers/victor9k.cpp
+++ b/src/mame/drivers/victor9k.cpp
@@ -495,7 +495,7 @@ static MACHINE_CONFIG_START( victor9k, victor9k_state )
MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(victor9k_state, write_nfrd))
MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(victor9k_state, write_ndac))
- MCFG_PIC8259_ADD(I8259A_TAG, INPUTLINE(I8088_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A_TAG, INPUTLINE(I8088_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(I8253_TAG, PIT8253, 0)
MCFG_PIT8253_CLK0(2500000)
diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp
index d4a3210a1a4..e9d40256c23 100644
--- a/src/mame/drivers/viper.cpp
+++ b/src/mame/drivers/viper.cpp
@@ -739,7 +739,7 @@ const char* viper_state::epic_get_register_name(UINT32 reg)
}
}
- return NULL;
+ return nullptr;
}
#endif
diff --git a/src/mame/drivers/vk100.cpp b/src/mame/drivers/vk100.cpp
index ac757f3380b..e2b482b8bbb 100644
--- a/src/mame/drivers/vk100.cpp
+++ b/src/mame/drivers/vk100.cpp
@@ -174,9 +174,9 @@ public:
m_speaker(*this, "beeper"),
m_uart(*this, "i8251"),
m_dbrg(*this, COM5016T_TAG),
- //m_i8251_rx_timer(NULL),
- //m_i8251_tx_timer(NULL),
- //m_sync_timer(NULL),
+ //m_i8251_rx_timer(nullptr),
+ //m_i8251_tx_timer(nullptr),
+ //m_sync_timer(nullptr),
m_capsshift(*this, "CAPSSHIFT"),
m_dipsw(*this, "SWITCHES")
diff --git a/src/mame/drivers/vlc.cpp b/src/mame/drivers/vlc.cpp
index 9af970eb247..ea1e406b6fe 100644
--- a/src/mame/drivers/vlc.cpp
+++ b/src/mame/drivers/vlc.cpp
@@ -380,10 +380,10 @@ static const ay8910_interface ay8910_config =
AY8910_DEFAULT_LOADS,
// DEVCB_INPUT_PORT("DSW1"), /* not used */
// DEVCB_INPUT_PORT("DSW2"), /* not used */
- DEVCB_NULL, /* callback for display state changes */
- DEVCB_NULL, /* callback for cursor state changes */
- DEVCB_NULL,
- DEVCB_NULL
+ DEVCB_NOOP, /* callback for display state changes */
+ DEVCB_NOOP, /* callback for cursor state changes */
+ DEVCB_NOOP,
+ DEVCB_NOOP
};
#endif
diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp
index bd86cd9cd4f..9ad912fdccd 100644
--- a/src/mame/drivers/wacky_gator.cpp
+++ b/src/mame/drivers/wacky_gator.cpp
@@ -202,13 +202,13 @@ void wackygtr_state::set_lamps(int p, UINT8 value)
static INPUT_PORTS_START( wackygtr )
PORT_START("IN0")
- PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_rear_sensors_r, NULL)
+ PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_rear_sensors_r, nullptr)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_SERVICE)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_COIN1)
PORT_START("IN1")
- PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_front_sensors_r, NULL)
+ PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_front_sensors_r, nullptr)
PORT_DIPNAME( 0xe0, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1,2,3")
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) )
diff --git a/src/mame/drivers/wangpc.cpp b/src/mame/drivers/wangpc.cpp
index 92e262d04e2..d1893f2c99d 100644
--- a/src/mame/drivers/wangpc.cpp
+++ b/src/mame/drivers/wangpc.cpp
@@ -1094,7 +1094,7 @@ static MACHINE_CONFIG_START( wangpc, wangpc_state )
MCFG_AM9517A_OUT_DACK_2_CB(WRITELINE(wangpc_state, dack2_w))
MCFG_AM9517A_OUT_DACK_3_CB(WRITELINE(wangpc_state, dack3_w))
- MCFG_PIC8259_ADD(I8259A_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NULL)
+ MCFG_PIC8259_ADD(I8259A_TAG, INPUTLINE(I8086_TAG, INPUT_LINE_IRQ0), VCC, NOOP)
MCFG_DEVICE_ADD(I8255A_TAG, I8255A, 0)
MCFG_I8255_IN_PORTA_CB(READ8(wangpc_state, ppi_pa_r))
diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp
index f9051f1e77e..06f61c97bf2 100644
--- a/src/mame/drivers/wecleman.cpp
+++ b/src/mame/drivers/wecleman.cpp
@@ -882,7 +882,7 @@ static INPUT_PORTS_START( hotchase )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Left SW") // left sw
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Thermo SW") // thermo
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // from sound cpu
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wecleman_state,hotchase_sound_status_r, NULL)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wecleman_state,hotchase_sound_status_r, nullptr)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW2") /* $140015.b */
diff --git a/src/mame/drivers/welltris.cpp b/src/mame/drivers/welltris.cpp
index 5d547ef911e..780e3036660 100644
--- a/src/mame/drivers/welltris.cpp
+++ b/src/mame/drivers/welltris.cpp
@@ -396,7 +396,7 @@ static INPUT_PORTS_START( welltris )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Test (used to go through tests in service mode) */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) /* Tested at start of irq 1 */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service (adds a coin) */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, welltris_state,pending_sound_r, NULL) /* pending sound command */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, welltris_state,pending_sound_r, nullptr) /* pending sound command */
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp
index 70f35c2547a..42617e7cc86 100644
--- a/src/mame/drivers/williams.cpp
+++ b/src/mame/drivers/williams.cpp
@@ -1712,7 +1712,7 @@ static MACHINE_CONFIG_DERIVED( mysticm, williams2 )
/* pia */
MCFG_DEVICE_MODIFY("pia_0")
- MCFG_PIA_CA2_HANDLER(NULL)
+ MCFG_PIA_CA2_HANDLER(NOOP)
MCFG_PIA_IRQA_HANDLER(WRITELINE(williams_state,williams_main_firq))
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams2_state,mysticm_main_irq))
diff --git a/src/mame/drivers/wswan.cpp b/src/mame/drivers/wswan.cpp
index 48b132a4d06..579b8b696d5 100644
--- a/src/mame/drivers/wswan.cpp
+++ b/src/mame/drivers/wswan.cpp
@@ -145,7 +145,6 @@ static MACHINE_CONFIG_START( wswan, wswan_state )
MCFG_SOFTWARE_LIST_ADD("cart_list","wswan")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("wsc_list","wscolor")
- MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("pc1_list","pockchalv1")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("pc2_list","pockchalv2")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/wwfsstar.cpp b/src/mame/drivers/wwfsstar.cpp
index cf50f6c1835..623e7d6dd1d 100644
--- a/src/mame/drivers/wwfsstar.cpp
+++ b/src/mame/drivers/wwfsstar.cpp
@@ -316,7 +316,7 @@ static INPUT_PORTS_START( wwfsstar )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Button B (1P VS 2P - Buy-in)")
PORT_START("SYSTEM")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfsstar_state, vblank_r, NULL) /* VBlank */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfsstar_state, vblank_r, nullptr) /* VBlank */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/xain.cpp b/src/mame/drivers/xain.cpp
index 7532a8cad5a..7566770d773 100644
--- a/src/mame/drivers/xain.cpp
+++ b/src/mame/drivers/xain.cpp
@@ -515,8 +515,8 @@ static INPUT_PORTS_START( xsleena )
PORT_START("VBLANK")
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state, mcu_status_r, NULL)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state, vblank_r, NULL) /* VBLANK */
+ PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state, mcu_status_r, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state, vblank_r, nullptr) /* VBLANK */
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/xbox.cpp b/src/mame/drivers/xbox.cpp
index 0115488e63e..f193a4b857c 100644
--- a/src/mame/drivers/xbox.cpp
+++ b/src/mame/drivers/xbox.cpp
@@ -127,6 +127,8 @@ void xbox_state::hack_eeprom()
m_maincpu->space(0).write_byte(0x4e5da, 0xc3); // remove audio wait
// 8006e654,6e654=0
m_maincpu->space(0).write_byte(0x6e654, 0); // disable boot animation
+ // 800375f0,375f0=0
+ m_maincpu->space(0).write_byte(0x375f0, m_maincpu->space(0).read_byte(0x375f0) & 0xfe); // internal hub not used
}
/*static const struct {
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index c924ce91528..12b3d81446a 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -265,7 +265,7 @@ static INPUT_PORTS_START( xmen6p )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START5 ) /* not verified */
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START6 ) /* not verified */
PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW )
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xmen_state,xmen_frame_r, NULL) /* screen indicator? */
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xmen_state,xmen_frame_r, nullptr) /* screen indicator? */
PORT_START( "EEPROMOUT" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_er5911_device, di_write)
diff --git a/src/mame/drivers/z100.cpp b/src/mame/drivers/z100.cpp
index 7addd6407cd..f6cdba22820 100644
--- a/src/mame/drivers/z100.cpp
+++ b/src/mame/drivers/z100.cpp
@@ -687,7 +687,7 @@ static MACHINE_CONFIG_START( z100, z100_state )
MCFG_MC6845_CHAR_WIDTH(8)
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE("maincpu", 0), VCC, READ8(z100_state, get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir3_w), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir3_w), GND, NOOP)
MCFG_DEVICE_ADD("pia0", PIA6821, 0)
MCFG_PIA_WRITEPA_HANDLER(WRITE8(z100_state, video_pia_A_w))
diff --git a/src/mame/drivers/z80ne.cpp b/src/mame/drivers/z80ne.cpp
index 7b8945b2437..98d107c479f 100644
--- a/src/mame/drivers/z80ne.cpp
+++ b/src/mame/drivers/z80ne.cpp
@@ -217,7 +217,7 @@ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("RST") /* RESET key */
-PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LX.384 Reset") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, z80ne_state, z80ne_reset, NULL)
+PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LX.384 Reset") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, z80ne_state, z80ne_reset, nullptr)
/* Settings */
PORT_START("LX.385")
@@ -238,7 +238,7 @@ PORT_INCLUDE( z80ne )
/* LX.388 Keyboard BREAK key */
PORT_START("LX388_BRK")
-PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Break") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CHANGED_MEMBER(DEVICE_SELF, z80ne_state, z80ne_nmi, NULL)
+PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Break") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CHANGED_MEMBER(DEVICE_SELF, z80ne_state, z80ne_nmi, nullptr)
/* LX.388 Keyboard (Encoded by KR2376) */
diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp
index dd5ad83ccc4..caf7941fd06 100644
--- a/src/mame/drivers/zn.cpp
+++ b/src/mame/drivers/zn.cpp
@@ -362,7 +362,7 @@ static MACHINE_CONFIG_START( zn1_1mb_vram, zn_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.35)
- MCFG_AT28C16_ADD( "at28c16", NULL )
+ MCFG_AT28C16_ADD( "at28c16", nullptr )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( zn1_2mb_vram, zn1_1mb_vram )
@@ -406,7 +406,7 @@ static MACHINE_CONFIG_START( zn2, zn_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.35)
- MCFG_AT28C16_ADD( "at28c16", NULL )
+ MCFG_AT28C16_ADD( "at28c16", nullptr )
MACHINE_CONFIG_END
/*
@@ -2800,7 +2800,7 @@ static INPUT_PORTS_START( jdredd )
PORT_BIT( 0x6f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("SERVICE")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zn_state,jdredd_gun_mux_read, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zn_state,jdredd_gun_mux_read, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
diff --git a/src/mame/etc/jrcrypt.cpp b/src/mame/etc/jrcrypt.cpp
index 89c1fc0b716..a689cf8c800 100644
--- a/src/mame/etc/jrcrypt.cpp
+++ b/src/mame/etc/jrcrypt.cpp
@@ -489,7 +489,7 @@ void main()
void Load(char *name,byte *buffer,int from, int length)
{
/*
- emu_file file(options, NULL, OPEN_FLAG_READ);
+ emu_file file(options, nullptr, OPEN_FLAG_READ);
osd_file::error filerr = file.open(name);
if (filerr != osd_file::error::NONE)
return;
diff --git a/src/mame/etc/template_cpu.h b/src/mame/etc/template_cpu.h
index 07fb81e6284..04b06ef0ff5 100644
--- a/src/mame/etc/template_cpu.h
+++ b/src/mame/etc/template_cpu.h
@@ -39,7 +39,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/mame/includes/atari.h b/src/mame/includes/atari400.h
index ed899fc5386..ed899fc5386 100644
--- a/src/mame/includes/atari.h
+++ b/src/mame/includes/atari400.h
diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h
index a26495d923b..ca41361bd39 100644
--- a/src/mame/includes/cps1.h
+++ b/src/mame/includes/cps1.h
@@ -294,7 +294,7 @@ public:
DECLARE_DRIVER_INIT(cps2_video);
DECLARE_DRIVER_INIT(cps2);
DECLARE_DRIVER_INIT(cps2nc);
- DECLARE_DRIVER_INIT(cps2crpt);
+ DECLARE_DRIVER_INIT(cps2crypt);
DECLARE_DRIVER_INIT(ssf2tb);
DECLARE_DRIVER_INIT(pzloop2);
DECLARE_DRIVER_INIT(singbrd);
diff --git a/src/mame/includes/hh_ucom4.h b/src/mame/includes/hh_ucom4.h
index 36a525254b6..31bfab8fbad 100644
--- a/src/mame/includes/hh_ucom4.h
+++ b/src/mame/includes/hh_ucom4.h
@@ -11,6 +11,7 @@
#include "emu.h"
+#include "rendlay.h"
#include "cpu/ucom4/ucom4.h"
#include "sound/speaker.h"
diff --git a/src/mame/includes/md_cons.h b/src/mame/includes/md_cons.h
deleted file mode 100644
index f7fc4e5054c..00000000000
--- a/src/mame/includes/md_cons.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:David Haywood
-
-#include "includes/megadriv.h"
-#include "bus/megadrive/md_slot.h"
-#include "bus/megadrive/md_carts.h"
-#include "machine/mega32x.h"
-#include "machine/megacd.h"
-
-
-class md_cons_state : public md_base_state
-{
-public:
- md_cons_state(const machine_config &mconfig, device_type type, const char *tag)
- : md_base_state(mconfig, type, tag),
- m_32x(*this,"sega32x"),
- m_segacd(*this,"segacd"),
- m_cart(*this, "mdslot"),
- m_tmss(*this, "tmss")
- { }
-
- ioport_port *m_io_ctrlr;
- ioport_port *m_io_pad3b[4];
- ioport_port *m_io_pad6b[2][4];
-
- optional_device<sega_32x_device> m_32x;
- optional_device<sega_segacd_device> m_segacd;
- optional_device<md_cart_slot_device> m_cart;
- optional_region_ptr<UINT16> m_tmss;
-
- DECLARE_DRIVER_INIT(mess_md_common);
- DECLARE_DRIVER_INIT(genesis);
- DECLARE_DRIVER_INIT(md_eur);
- DECLARE_DRIVER_INIT(md_jpn);
-
- READ8_MEMBER(mess_md_io_read_data_port);
- WRITE16_MEMBER(mess_md_io_write_data_port);
-
- DECLARE_MACHINE_START( md_common ); // setup ioport_port
- DECLARE_MACHINE_START( ms_megadriv ); // setup ioport_port + install cartslot handlers
- DECLARE_MACHINE_START( ms_megacd ); // setup ioport_port + dma delay for cd
- DECLARE_MACHINE_RESET( ms_megadriv );
-
- void screen_eof_console(screen_device &screen, bool state);
-
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( _32x_cart );
-
- void _32x_scanline_callback(int x, UINT32 priority, UINT16 &lineptr);
- void _32x_interrupt_callback(int scanline, int irq6);
- void _32x_scanline_helper_callback(int scanline);
-
- void install_cartslot();
- void install_tmss();
- DECLARE_READ16_MEMBER(tmss_r);
- DECLARE_WRITE16_MEMBER(tmss_swap_w);
-};
diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h
index b2461c802c5..6b3fcf7c564 100644
--- a/src/mame/includes/megadriv.h
+++ b/src/mame/includes/megadriv.h
@@ -8,6 +8,12 @@
#include "sound/sn76496.h"
#include "video/315_5313.h"
+/* Megadrive Console Specific */
+#include "bus/megadrive/md_slot.h"
+#include "bus/megadrive/md_carts.h"
+#include "machine/mega32x.h"
+#include "machine/megacd.h"
+
#define MASTER_CLOCK_NTSC 53693175
#define MASTER_CLOCK_PAL 53203424
@@ -164,3 +170,52 @@ public:
DECLARE_MACHINE_START(md_bootleg) { MACHINE_START_CALL_MEMBER(megadriv); m_vdp->stop_timers(); }
DECLARE_MACHINE_START(md_6button);
};
+
+
+class md_cons_state : public md_base_state
+{
+public:
+ md_cons_state(const machine_config &mconfig, device_type type, const char *tag)
+ : md_base_state(mconfig, type, tag),
+ m_32x(*this,"sega32x"),
+ m_segacd(*this,"segacd"),
+ m_cart(*this, "mdslot"),
+ m_tmss(*this, "tmss")
+ { }
+
+ ioport_port *m_io_ctrlr;
+ ioport_port *m_io_pad3b[4];
+ ioport_port *m_io_pad6b[2][4];
+
+ optional_device<sega_32x_device> m_32x;
+ optional_device<sega_segacd_device> m_segacd;
+ optional_device<md_cart_slot_device> m_cart;
+ optional_region_ptr<UINT16> m_tmss;
+
+ DECLARE_DRIVER_INIT(mess_md_common);
+ DECLARE_DRIVER_INIT(genesis);
+ DECLARE_DRIVER_INIT(md_eur);
+ DECLARE_DRIVER_INIT(md_jpn);
+
+ READ8_MEMBER(mess_md_io_read_data_port);
+ WRITE16_MEMBER(mess_md_io_write_data_port);
+
+ DECLARE_MACHINE_START( md_common ); // setup ioport_port
+ DECLARE_MACHINE_START( ms_megadriv ); // setup ioport_port + install cartslot handlers
+ DECLARE_MACHINE_START( ms_megacd ); // setup ioport_port + dma delay for cd
+ DECLARE_MACHINE_RESET( ms_megadriv );
+
+ void screen_eof_console(screen_device &screen, bool state);
+
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( _32x_cart );
+
+ void _32x_scanline_callback(int x, UINT32 priority, UINT16 &lineptr);
+ void _32x_interrupt_callback(int scanline, int irq6);
+ void _32x_scanline_helper_callback(int scanline);
+
+ void install_cartslot();
+ void install_tmss();
+ DECLARE_READ16_MEMBER(tmss_r);
+ DECLARE_WRITE16_MEMBER(tmss_swap_w);
+};
+
diff --git a/src/mame/includes/special.h b/src/mame/includes/special.h
index 6c9a369b922..c6626ccf9ca 100644
--- a/src/mame/includes/special.h
+++ b/src/mame/includes/special.h
@@ -12,7 +12,7 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "cpu/i8085/i8085.h"
-#include "audio/specimx_snd.h"
+#include "audio/special.h"
#include "sound/dac.h"
#include "sound/wave.h"
#include "machine/i8255.h"
diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h
index fa11adbceb9..532ca7997ce 100644
--- a/src/mame/includes/stv.h
+++ b/src/mame/includes/stv.h
@@ -146,13 +146,6 @@ public:
UINT8 slave_on;
}m_smpc;
- struct {
- UINT8 status;
- UINT8 data;
- UINT8 prev_data;
- UINT16 repeat_count;
- }m_keyb;
-
/* Saturn specific*/
int m_saturn_region;
UINT8 m_cart_type;
@@ -612,7 +605,7 @@ public:
partitionT *cd_filterdata(filterT *flt, int trktype, UINT8 *p_ok);
partitionT *cd_read_filtered_sector(INT32 fad, UINT8 *p_ok);
- cdrom_file *cdrom;// = (cdrom_file *)NULL;
+ cdrom_file *cdrom;// = (cdrom_file *)nullptr;
// local variables
timer_device *sector_timer;
@@ -682,12 +675,6 @@ public:
TIMER_CALLBACK_MEMBER( smpc_change_clock );
TIMER_CALLBACK_MEMBER( stv_intback_peripheral );
TIMER_CALLBACK_MEMBER( stv_smpc_intback );
- void smpc_digital_pad(UINT8 pad_num, UINT8 offset);
- void smpc_analog_pad(UINT8 pad_num, UINT8 offset, UINT8 id);
- void smpc_keyboard(UINT8 pad_num, UINT8 offset);
- void smpc_mouse(UINT8 pad_num, UINT8 offset, UINT8 id);
- void smpc_md_pad(UINT8 pad_num, UINT8 offset, UINT8 id);
- void smpc_unconnected(UINT8 pad_num, UINT8 offset);
TIMER_CALLBACK_MEMBER( intback_peripheral );
TIMER_CALLBACK_MEMBER( saturn_smpc_intback );
void smpc_rtc_write();
diff --git a/src/mame/includes/vc4000.h b/src/mame/includes/vc4000.h
index ca19737872f..36ce2c0d37b 100644
--- a/src/mame/includes/vc4000.h
+++ b/src/mame/includes/vc4000.h
@@ -11,7 +11,7 @@
#define VC4000_H_
#include "emu.h"
-#include "audio/vc4000snd.h"
+#include "audio/vc4000.h"
#include "cpu/s2650/s2650.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
diff --git a/src/mame/includes/wswan.h b/src/mame/includes/wswan.h
index 5cdc8336f04..ec620cf39d0 100644
--- a/src/mame/includes/wswan.h
+++ b/src/mame/includes/wswan.h
@@ -17,8 +17,8 @@
#include "emu.h"
#include "cpu/v30mz/v30mz.h"
#include "machine/nvram.h"
-#include "audio/wswan_snd.h"
-#include "video/wswan_video.h"
+#include "audio/wswan.h"
+#include "video/wswan.h"
#include "bus/wswan/slot.h"
#include "bus/wswan/rom.h"
diff --git a/src/mame/machine/315-5838_317-0229_comp.cpp b/src/mame/machine/315-5838_317-0229_comp.cpp
index 6e703df17ff..5f6428c6d2b 100644
--- a/src/mame/machine/315-5838_317-0229_comp.cpp
+++ b/src/mame/machine/315-5838_317-0229_comp.cpp
@@ -5,6 +5,7 @@
315-5838 - Decathlete (ST-V)
317-0229 - Dead or Alive (Model 2A)
317-0229 - Name Club / Name Club Ver 2 (ST-V) (tested as RCDD2 in the service menu!)
+ 317-0230 - Winnie The Pooh Vol 2 / 3
317-0231 - Print Club Love Love / Print Club Love Love Ver 2 (ST-V)
Several Print Club (ST-V) carts have
diff --git a/src/mame/machine/315-5838_317-0229_comp.h b/src/mame/machine/315-5838_317-0229_comp.h
index 4ad6070ab84..cc66fe1c137 100644
--- a/src/mame/machine/315-5838_317-0229_comp.h
+++ b/src/mame/machine/315-5838_317-0229_comp.h
@@ -13,10 +13,10 @@ typedef device_delegate<UINT16 (UINT32)> sega_dec_read_delegate;
extern const device_type SEGA315_5838_COMP;
#define MCFG_SET_5838_READ_CALLBACK_CH1( _class, _method) \
- sega_315_5838_comp_device::set_read_cb_ch1(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ sega_315_5838_comp_device::set_read_cb_ch1(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SET_5838_READ_CALLBACK_CH2( _class, _method) \
- sega_315_5838_comp_device::set_read_cb_ch2(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ sega_315_5838_comp_device::set_read_cb_ch2(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
class sega_315_5838_comp_device : public device_t
{
diff --git a/src/mame/machine/315-5881_crypt.h b/src/mame/machine/315-5881_crypt.h
index 8c8c4739af1..feacc5ce3e9 100644
--- a/src/mame/machine/315-5881_crypt.h
+++ b/src/mame/machine/315-5881_crypt.h
@@ -11,7 +11,7 @@ typedef device_delegate<UINT16 (UINT32)> sega_m2_read_delegate;
extern const device_type SEGA315_5881_CRYPT;
#define MCFG_SET_READ_CALLBACK( _class, _method) \
- sega_315_5881_crypt_device::set_read_cb(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ sega_315_5881_crypt_device::set_read_cb(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
class sega_315_5881_crypt_device : public device_t
diff --git a/src/mame/machine/amigakbd.cpp b/src/mame/machine/amigakbd.cpp
index e760cb7de47..ac297015deb 100644
--- a/src/mame/machine/amigakbd.cpp
+++ b/src/mame/machine/amigakbd.cpp
@@ -87,11 +87,11 @@ const rom_entry *amigakbd_device::device_rom_region() const
static INPUT_PORTS_START( a500_us_keyboard )
PORT_START("special")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LWIN) PORT_CHAR(UCHAR_MAMEKEY(LWIN)) PORT_NAME("Left Amiga") PORT_CHANGED_MEMBER(DEVICE_SELF, amigakbd_device, check_reset, NULL)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LWIN) PORT_CHAR(UCHAR_MAMEKEY(LWIN)) PORT_NAME("Left Amiga") PORT_CHANGED_MEMBER(DEVICE_SELF, amigakbd_device, check_reset, nullptr)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT))
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_NAME("Ctrl") PORT_CHANGED_MEMBER(DEVICE_SELF, amigakbd_device, check_reset, NULL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RWIN) PORT_CHAR(UCHAR_MAMEKEY(RWIN)) PORT_NAME("Right Amiga") PORT_CHANGED_MEMBER(DEVICE_SELF, amigakbd_device, check_reset, NULL)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_NAME("Ctrl") PORT_CHANGED_MEMBER(DEVICE_SELF, amigakbd_device, check_reset, nullptr)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RWIN) PORT_CHAR(UCHAR_MAMEKEY(RWIN)) PORT_NAME("Right Amiga") PORT_CHANGED_MEMBER(DEVICE_SELF, amigakbd_device, check_reset, nullptr)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(RALT))
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp
index e8ed9a6e266..9e2a4afb4a2 100644
--- a/src/mame/machine/amstrad.cpp
+++ b/src/mame/machine/amstrad.cpp
@@ -2019,7 +2019,7 @@ WRITE8_MEMBER(amstrad_state::rom_select)
}
else
{
- exp_port = NULL;
+ exp_port = nullptr;
}
}
@@ -2983,7 +2983,7 @@ void amstrad_state::enumerate_roms()
}
else
{
- exp_port = NULL;
+ exp_port = nullptr;
}
}
@@ -2997,7 +2997,7 @@ void amstrad_state::enumerate_roms()
char str[20];
sprintf(str, "rom%i", i + 1);
rom_image_device* romimage = romexp->subdevice<rom_image_device>(str);
- if(romimage != NULL && romimage->base() != nullptr)
+ if(romimage != nullptr && romimage->base() != nullptr)
{
m_Amstrad_ROM_Table[m_rom_count] = romimage->base();
NEXT_ROM_SLOT
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index 1268e581b29..8815e961759 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -1117,7 +1117,7 @@ MACHINE_CONFIG_FRAGMENT( common )
MCFG_I8237_OUT_DACK_2_CB(WRITELINE(apollo_state, pc_dack6_w))
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(apollo_state, pc_dack7_w))
MCFG_PIC8259_ADD( APOLLO_PIC1_TAG, WRITELINE(apollo_state,apollo_pic8259_master_set_int_line), VCC, READ8(apollo_state, apollo_pic8259_get_slave_ack))
- MCFG_PIC8259_ADD( APOLLO_PIC2_TAG, WRITELINE(apollo_state,apollo_pic8259_slave_set_int_line), GND, NULL)
+ MCFG_PIC8259_ADD( APOLLO_PIC2_TAG, WRITELINE(apollo_state,apollo_pic8259_slave_set_int_line), GND, NOOP)
MCFG_DEVICE_ADD(APOLLO_PTM_TAG, PTM6840, 0)
MCFG_PTM6840_INTERNAL_CLOCK(0)
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index 80bdc20a992..519128f86c4 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -93,7 +93,7 @@ static MACHINE_CONFIG_FRAGMENT( at_mb )
MCFG_I8237_OUT_DACK_3_CB(WRITELINE(at_mb_device, dack7_w))
MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE(":maincpu", 0), VCC, READ8(at_mb_device, get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NOOP)
MCFG_DEVICE_ADD("isabus", ISA16, 0)
MCFG_ISA16_CPU(":maincpu")
diff --git a/src/mame/machine/atari.cpp b/src/mame/machine/atari400.cpp
index d576305cad2..907e65b22f5 100644
--- a/src/mame/machine/atari.cpp
+++ b/src/mame/machine/atari400.cpp
@@ -11,7 +11,7 @@
***************************************************************************/
#include "emu.h"
-#include "includes/atari.h"
+#include "includes/atari400.h"
#include "sound/pokey.h"
#define VERBOSE_POKEY 1
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index 13505910f30..29554a77f99 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -14,7 +14,7 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
-#include "includes/atari.h"
+#include "includes/atari400.h"
#include "atarifdc.h"
#include "sound/pokey.h"
#include "machine/6821pia.h"
@@ -146,7 +146,7 @@ void atari_fdc_device::atari_load_proc(device_image_interface &image)
ext = image.filetype();
- // hack alert, this means we can only load ATR via the softlist at the moment, image.filetype reutrns NULL :/
+ // hack alert, this means we can only load ATR via the softlist at the moment, image.filetype reutrns nullptr :/
if (image.software_entry() != nullptr) ext="ATR";
/* no extension: assume XFD format (no header) */
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index 7b7ffc9d862..65440d1a19f 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -792,7 +792,7 @@ void atari_vad_device::eof_update(emu_timer &timer)
update_pf_xscrolls();
m_playfield_tilemap->set_scrolly(0, m_pf0_yscroll);
- if (m_playfield2_tilemap != NULL)
+ if (m_playfield2_tilemap != nullptr)
m_playfield2_tilemap->set_scrolly(0, m_pf1_yscroll);*/
timer.adjust(m_screen->time_until_pos(0));
diff --git a/src/mame/machine/cps2crpt.cpp b/src/mame/machine/cps2crypt.cpp
index f7973b95270..7c29ec89309 100644
--- a/src/mame/machine/cps2crpt.cpp
+++ b/src/mame/machine/cps2crypt.cpp
@@ -740,7 +740,7 @@ struct game_keys
-DRIVER_INIT_MEMBER(cps_state,cps2crpt)
+DRIVER_INIT_MEMBER(cps_state,cps2crypt)
{
UINT32 key[2];
UINT32 lower;
diff --git a/src/mame/machine/deco146.h b/src/mame/machine/deco146.h
index 1f9fff545b1..d7d882668b3 100644
--- a/src/mame/machine/deco146.h
+++ b/src/mame/machine/deco146.h
@@ -9,16 +9,16 @@ typedef device_delegate<void (address_space &space, UINT16 data, UINT16 mem_mask
#define MCFG_DECO146_SET_PORTA_CALLBACK( _class, _method) \
- deco_146_base_device::set_port_a_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ deco_146_base_device::set_port_a_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_DECO146_SET_PORTB_CALLBACK( _class, _method) \
- deco_146_base_device::set_port_b_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ deco_146_base_device::set_port_b_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_DECO146_SET_PORTC_CALLBACK( _class, _method) \
- deco_146_base_device::set_port_c_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ deco_146_base_device::set_port_c_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_DECO146_SET_SOUNDLATCH_CALLBACK( _class, _method) \
- deco_146_base_device::set_soundlatch_cb(*device, deco146_port_write_cb(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ deco_146_base_device::set_soundlatch_cb(*device, deco146_port_write_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
// there are some standard ways the chip gets hooked up, so have them here ready to use
diff --git a/src/mame/machine/fddebug.cpp b/src/mame/machine/fddebug.cpp
index 9cf760337fc..f12afaf50e2 100644
--- a/src/mame/machine/fddebug.cpp
+++ b/src/mame/machine/fddebug.cpp
@@ -442,7 +442,7 @@ static inline int pc_is_valid(address_space &space, UINT32 pc, UINT32 flags)
return 0;
if (pc & 0xff000000)
return 0;
- if (space.direct().read_ptr(pc) == NULL)
+ if (space.direct().read_ptr(pc) == nullptr)
return 0;
return 1;
}
@@ -670,7 +670,7 @@ void fd1094_regenerate_key(running_machine &machine)
}
/* update the key with the current fd1094 manager */
- if (key_changed != NULL)
+ if (key_changed != nullptr)
(*key_changed)(machine);
/* force all memory and disassembly views to update */
@@ -2089,7 +2089,7 @@ static void build_optable(running_machine &machine)
for (opnum = 0; opnum < 65536; opnum++)
{
optable[opnum].flags = OF_INVALID;
- optable[opnum].string = NULL;
+ optable[opnum].string = nullptr;
}
/* now iterate over entries in our intruction table */
diff --git a/src/mame/machine/gaelco3d.cpp b/src/mame/machine/gaelco3d.cpp
index 7eb4b265ca8..904676448e7 100644
--- a/src/mame/machine/gaelco3d.cpp
+++ b/src/mame/machine/gaelco3d.cpp
@@ -102,7 +102,7 @@ static osd_shared_mem *osd_sharedmem_alloc(const char *path, int create, size_t
if (fd == -1)
{
osd_free(os_shmem);
- return NULL;
+ return nullptr;
}
os_shmem->creator = 0;
}
@@ -111,7 +111,7 @@ static osd_shared_mem *osd_sharedmem_alloc(const char *path, int create, size_t
assert(fd != -1);
- os_shmem->ptr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+ os_shmem->ptr = mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
os_shmem->size = size;
close(fd);
return os_shmem;
diff --git a/src/mame/machine/gamecom.cpp b/src/mame/machine/gamecom.cpp
index 8d5d9b26982..ccea541a48c 100644
--- a/src/mame/machine/gamecom.cpp
+++ b/src/mame/machine/gamecom.cpp
@@ -177,8 +177,8 @@ WRITE8_MEMBER( gamecom_state::gamecom_pio_w )
/* P3 bit6 clear, bit7 set -> enable cartridge port #1? */
switch (data & 0xc0)
{
- case 0x40: m_cart_ptr = m_cart1_rom != NULL ? m_cart1_rom->base() : NULL; break;
- case 0x80: m_cart_ptr = m_cart2_rom != NULL ? m_cart2_rom->base() : NULL; break;
+ case 0x40: m_cart_ptr = m_cart1_rom != nullptr ? m_cart1_rom->base() : nullptr; break;
+ case 0x80: m_cart_ptr = m_cart2_rom != nullptr ? m_cart2_rom->base() : nullptr; break;
default: m_cart_ptr = nullptr; break;
}
return;
diff --git a/src/mame/machine/igs025.h b/src/mame/machine/igs025.h
index aa57a2ac8fa..32c0a483fd0 100644
--- a/src/mame/machine/igs025.h
+++ b/src/mame/machine/igs025.h
@@ -8,7 +8,7 @@
typedef device_delegate<void (void)> igs025_execute_external;
#define MCFG_IGS025_SET_EXTERNAL_EXECUTE( _class, _method) \
- igs025_device::set_external_cb(*device, igs025_execute_external(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ igs025_device::set_external_cb(*device, igs025_execute_external(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
class igs025_device : public device_t
{
diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp
index c0364ccbdb9..2e0cf3de51f 100644
--- a/src/mame/machine/lisa.cpp
+++ b/src/mame/machine/lisa.cpp
@@ -955,7 +955,7 @@ void lisa_state::machine_reset()
m_videoROM_ptr = memregion("gfx1")->base();
// m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate_create_static(lisa_OPbaseoverride, *machine()));
-// m68k_set_reset_callback(m_maincpu, /*lisa_reset_instr_callback*/NULL);
+// m68k_set_reset_callback(m_maincpu, /*lisa_reset_instr_callback*/nullptr);
/* init MMU */
m_setup = 1;
diff --git a/src/mame/machine/m24_z8000.cpp b/src/mame/machine/m24_z8000.cpp
index d89034b4736..35454177960 100644
--- a/src/mame/machine/m24_z8000.cpp
+++ b/src/mame/machine/m24_z8000.cpp
@@ -72,9 +72,9 @@ static MACHINE_CONFIG_FRAGMENT( m24_z8000 )
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
MCFG_PIT8253_CLK0(19660000/15)
- MCFG_PIT8253_OUT0_HANDLER(NULL) //8251
+ MCFG_PIT8253_OUT0_HANDLER(NOOP) //8251
MCFG_PIT8253_CLK1(19660000/15)
- MCFG_PIT8253_OUT1_HANDLER(NULL)
+ MCFG_PIT8253_OUT1_HANDLER(NOOP)
MCFG_PIT8253_CLK2(19660000/15)
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(m24_z8000_device, timer_irq_w))
diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp
index bbc0ded1b14..a5c1409cbbb 100644
--- a/src/mame/machine/mac.cpp
+++ b/src/mame/machine/mac.cpp
@@ -534,7 +534,7 @@ READ32_MEMBER(mac_state::rom_switch_r)
/*
scan_keyboard()
- scan the keyboard, and returns key transition code (or NULL ($7B) if none)
+ scan the keyboard, and returns key transition code (or nullptr ($7B) if none)
*/
#ifndef MAC_USE_EMULATED_KBD
int mac_state::scan_keyboard()
@@ -637,7 +637,7 @@ int mac_state::scan_keyboard()
}
}
- return 0x7B; /* return NULL */
+ return 0x7B; /* return nullptr */
}
/*
@@ -743,7 +743,7 @@ TIMER_CALLBACK_MEMBER(mac_state::inquiry_timeout_func)
{
if (LOG_KEYBOARD)
logerror("keyboard enquiry timeout\n");
- kbd_shift_out(0x7B); /* always send NULL */
+ kbd_shift_out(0x7B); /* always send nullptr */
}
/*
@@ -754,7 +754,7 @@ void mac_state::keyboard_receive(int val)
switch (val)
{
case 0x10:
- /* inquiry - returns key transition code, or NULL ($7B) if time out (1/4s) */
+ /* inquiry - returns key transition code, or nullptr ($7B) if time out (1/4s) */
if (LOG_KEYBOARD)
logerror("keyboard command : inquiry\n");
@@ -763,7 +763,7 @@ void mac_state::keyboard_receive(int val)
break;
case 0x14:
- /* instant - returns key transition code, or NULL ($7B) */
+ /* instant - returns key transition code, or nullptr ($7B) */
if (LOG_KEYBOARD)
logerror("keyboard command : instant\n");
@@ -3235,7 +3235,7 @@ void mac_state::mac_tracetrap(const char *cpu_name_local, int addr, int trap)
"SCSIComplete", /* $04 */
"SCSIRead", /* $05 */
"SCSIWrite", /* $06 */
- NULL, /* $07 */
+ nullptr, /* $07 */
"SCSIRBlind", /* $08 */
"SCSIWBlind", /* $09 */
"SCSIStat", /* $0A */
diff --git a/src/mame/machine/megacdcd.h b/src/mame/machine/megacdcd.h
index 2039f48587b..743c7d1c5af 100644
--- a/src/mame/machine/megacdcd.h
+++ b/src/mame/machine/megacdcd.h
@@ -123,15 +123,15 @@ typedef device_delegate<void (void)> interrupt_delegate;
#define MCFG_SEGACD_HACK_SET_CDC_DO_DMA( _class, _method) \
- lc89510_temp_device::set_CDC_Do_DMA(*device, segacd_dma_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ lc89510_temp_device::set_CDC_Do_DMA(*device, segacd_dma_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SEGACD_HACK_SET_NEOCD \
lc89510_temp_device::set_is_neoCD(*device, true);
#define MCFG_SET_TYPE1_INTERRUPT_CALLBACK( _class, _method) \
- lc89510_temp_device::set_type1_interrupt_callback(*device, interrupt_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ lc89510_temp_device::set_type1_interrupt_callback(*device, interrupt_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SET_TYPE2_INTERRUPT_CALLBACK( _class, _method) \
- lc89510_temp_device::set_type2_interrupt_callback(*device, interrupt_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ lc89510_temp_device::set_type2_interrupt_callback(*device, interrupt_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SET_TYPE3_INTERRUPT_CALLBACK( _class, _method) \
- lc89510_temp_device::set_type3_interrupt_callback(*device, interrupt_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ lc89510_temp_device::set_type3_interrupt_callback(*device, interrupt_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
/* neocd */
#define CD_FRAMES_MINUTE (60 * 75)
diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp
index 2b234497315..4da96fb2516 100644
--- a/src/mame/machine/n64.cpp
+++ b/src/mame/machine/n64.cpp
@@ -1251,9 +1251,9 @@ void n64_periphs::ai_dma()
AUDIO_DMA *current = ai_fifo_get_top();
attotime period;
- //static FILE * audio_dump = NULL;
+ //static FILE * audio_dump = nullptr;
//
- //if (audio_dump == NULL)
+ //if (audio_dump == nullptr)
// audio_dump = fopen("audio_dump.raw","wb");
//
//fwrite(&ram[current->address/2],current->length,1,audio_dump);
@@ -2704,7 +2704,7 @@ void n64_state::n64_machine_stop()
device_image_interface *image = dynamic_cast<device_image_interface *>(periphs->m_nvram_image);
UINT8 data[0x30800];
- if (m_sram != NULL)
+ if (m_sram != nullptr)
{
memset(data, 0, 0x20000);
}
diff --git a/src/mame/machine/naomigd.h b/src/mame/machine/naomigd.h
index 84a3225abb0..4798f3c9d59 100644
--- a/src/mame/machine/naomigd.h
+++ b/src/mame/machine/naomigd.h
@@ -6,7 +6,7 @@
#include "machine/naomibd.h"
#define MCFG_NAOMI_GDROM_BOARD_ADD(_tag, _image_tag, _pic_tag, _eeprom_tag, _irq_cb) \
- MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_GDROM_BOARD, _eeprom_tag, NULL, _irq_cb) \
+ MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_GDROM_BOARD, _eeprom_tag, nullptr, _irq_cb) \
naomi_gdrom_board::static_set_tags(*device, "^" _image_tag, "^" _pic_tag);
class naomi_gdrom_board : public naomi_board
diff --git a/src/mame/machine/pce_cd.cpp b/src/mame/machine/pce_cd.cpp
index 26e730b491e..f6105c30367 100644
--- a/src/mame/machine/pce_cd.cpp
+++ b/src/mame/machine/pce_cd.cpp
@@ -439,7 +439,7 @@ void pce_cd_device::nec_set_audio_start_position()
break;
default:
popmessage("CD-DA set start mode 0xc0, contact MESSdev");
- //assert(NULL == nec_set_audio_start_position);
+ //assert(nullptr == nec_set_audio_start_position);
break;
}
@@ -512,7 +512,7 @@ void pce_cd_device::nec_set_audio_stop_position()
break;
default:
popmessage("CD-DA set end mode 0xc0, contact MESSdev");
- //assert(NULL == nec_set_audio_start_position);
+ //assert(nullptr == nec_set_audio_start_position);
break;
}
@@ -539,7 +539,7 @@ void pce_cd_device::nec_set_audio_stop_position()
m_cdda->stop_audio();
m_end_frame = m_last_frame;
m_end_mark = 0;
-// assert(NULL == nec_set_audio_stop_position);
+// assert(nullptr == nec_set_audio_stop_position);
}
reply_status_byte(SCSI_STATUS_OK);
@@ -677,7 +677,7 @@ void pce_cd_device::nec_get_dir_info()
m_data_buffer_size = 4;
break;
default:
-// assert(pce_cd_nec_get_dir_info == NULL); // Not implemented yet
+// assert(pce_cd_nec_get_dir_info == nullptr); // Not implemented yet
break;
}
diff --git a/src/mame/machine/pcshare.cpp b/src/mame/machine/pcshare.cpp
index a6701fb9ac4..c1fbf64b961 100644
--- a/src/mame/machine/pcshare.cpp
+++ b/src/mame/machine/pcshare.cpp
@@ -137,7 +137,7 @@ ADDRESS_MAP_END
MACHINE_CONFIG_FRAGMENT(pcat_common)
MCFG_PIC8259_ADD( "pic8259_1", INPUTLINE("maincpu", 0), VCC, READ8(pcat_base_state, get_slave_ack) )
- MCFG_PIC8259_ADD( "pic8259_2", DEVWRITELINE("pic8259_1", pic8259_device, ir2_w), GND, NULL )
+ MCFG_PIC8259_ADD( "pic8259_2", DEVWRITELINE("pic8259_1", pic8259_device, ir2_w), GND, NOOP)
MCFG_DEVICE_ADD( "dma8237_1", AM9517A, XTAL_14_31818MHz/3 )
MCFG_I8237_OUT_HREQ_CB(WRITELINE(pcat_base_state, pc_dma_hrq_changed))
MCFG_I8237_IN_MEMR_CB(READ8(pcat_base_state, pc_dma_read_byte))
diff --git a/src/mame/machine/playch10.cpp b/src/mame/machine/playch10.cpp
index d8c586b7826..89d21e15212 100644
--- a/src/mame/machine/playch10.cpp
+++ b/src/mame/machine/playch10.cpp
@@ -38,7 +38,7 @@ void playch10_state::machine_reset()
void playch10_state::machine_start()
{
- m_vrom = (m_vrom_region != NULL) ? m_vrom_region->base() : NULL;
+ m_vrom = (m_vrom_region != nullptr) ? m_vrom_region->base() : nullptr;
/* allocate 4K of nametable ram here */
/* move to individual boards as documentation of actual boards allows */
@@ -58,7 +58,7 @@ void playch10_state::machine_start()
MACHINE_START_MEMBER(playch10_state,playch10_hboard)
{
- m_vrom = (m_vrom_region != NULL) ? m_vrom_region->base() : NULL;
+ m_vrom = (m_vrom_region != nullptr) ? m_vrom_region->base() : nullptr;
/* allocate 4K of nametable ram here */
/* move to individual boards as documentation of actual boards allows */
diff --git a/src/mame/machine/segaic16.h b/src/mame/machine/segaic16.h
index b647d1012a0..627a49fca0d 100644
--- a/src/mame/machine/segaic16.h
+++ b/src/mame/machine/segaic16.h
@@ -23,8 +23,8 @@
#define MCFG_SEGA_315_5195_MAPPER_ADD(_tag, _cputag, _class, _mapper, _read, _write) \
MCFG_DEVICE_ADD(_tag, SEGA_315_5195_MEM_MAPPER, 0) \
sega_315_5195_mapper_device::static_set_cputag(*device, "^" _cputag); \
- sega_315_5195_mapper_device::static_set_mapper(*device, sega_315_5195_mapper_device::mapper_delegate(&_class::_mapper, #_class "::" #_mapper, NULL, (_class *)0)); \
- sega_315_5195_mapper_device::static_set_sound_readwrite(*device, sega_315_5195_mapper_device::sound_read_delegate(&_class::_read, #_class "::" #_read, NULL, (_class *)0), sega_315_5195_mapper_device::sound_write_delegate(&_class::_write, #_class "::" #_write, NULL, (_class *)0));
+ sega_315_5195_mapper_device::static_set_mapper(*device, sega_315_5195_mapper_device::mapper_delegate(&_class::_mapper, #_class "::" #_mapper, nullptr, (_class *)nullptr)); \
+ sega_315_5195_mapper_device::static_set_sound_readwrite(*device, sega_315_5195_mapper_device::sound_read_delegate(&_class::_read, #_class "::" #_read, nullptr, (_class *)nullptr), sega_315_5195_mapper_device::sound_write_delegate(&_class::_write, #_class "::" #_write, nullptr, (_class *)nullptr));
#define MCFG_SEGA_315_5248_MULTIPLIER_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SEGA_315_5248_MULTIPLIER, 0)
@@ -35,9 +35,9 @@
#define MCFG_SEGA_315_5250_COMPARE_TIMER_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SEGA_315_5250_COMPARE_TIMER, 0)
#define MCFG_SEGA_315_5250_TIMER_ACK(_class, _func) \
- sega_315_5250_compare_timer_device::static_set_timer_ack(*device, sega_315_5250_compare_timer_device::timer_ack_delegate(&_class::_func, #_class "::" #_func, NULL, (_class *)0));
+ sega_315_5250_compare_timer_device::static_set_timer_ack(*device, sega_315_5250_compare_timer_device::timer_ack_delegate(&_class::_func, #_class "::" #_func, nullptr, (_class *)nullptr));
#define MCFG_SEGA_315_5250_SOUND_WRITE(_class, _func) \
- sega_315_5250_compare_timer_device::static_set_sound_write(*device, sega_315_5250_compare_timer_device::sound_write_delegate(&_class::_func, #_class "::" #_func, NULL, (_class *)0));
+ sega_315_5250_compare_timer_device::static_set_sound_write(*device, sega_315_5250_compare_timer_device::sound_write_delegate(&_class::_func, #_class "::" #_func, nullptr, (_class *)nullptr));
//**************************************************************************
diff --git a/src/mame/machine/vsnes.cpp b/src/mame/machine/vsnes.cpp
index b837ad8c4d6..2bd62bce753 100644
--- a/src/mame/machine/vsnes.cpp
+++ b/src/mame/machine/vsnes.cpp
@@ -197,7 +197,7 @@ MACHINE_START_MEMBER(vsnes_state,vsnes)
ppu1_space.install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(vsnes_state::vsnes_nt0_r),this), write8_delegate(FUNC(vsnes_state::vsnes_nt0_w),this));
- if (m_gfx1_rom != NULL)
+ if (m_gfx1_rom != nullptr)
{
m_vrom[0] = memregion("gfx1")->base();
m_vrom_size[0] = memregion("gfx1")->bytes();
@@ -205,7 +205,7 @@ MACHINE_START_MEMBER(vsnes_state,vsnes)
}
else
{
- m_vrom[0] = NULL;
+ m_vrom[0] = nullptr;
m_vrom_size[0] = 0;
m_vrom_banks = 0;
}
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index c789c9c8d38..7a428d6f65a 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -1827,10 +1827,10 @@ INPUT_PORTS_START(xbox_controller)
PORT_CODE_DEC(KEYCODE_2_PAD) PORT_CODE_INC(KEYCODE_8_PAD)
PORT_START("DPad") // pressure sensitive directional pad
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_NAME("DPad Up")
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_NAME("DPad Down")
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_NAME("DPad Left")
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_NAME("DPad Right")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_NAME("DPad Up")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_NAME("DPad Down")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_NAME("DPad Left")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_NAME("DPad Right")
PORT_START("TriggerL") // analog trigger
PORT_BIT(0xff, 0x00, IPT_PEDAL) PORT_NAME("TriggerL") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(0, 0xff)
@@ -1841,8 +1841,8 @@ INPUT_PORTS_START(xbox_controller)
PORT_CODE_DEC(KEYCODE_3_PAD) PORT_CODE_INC(KEYCODE_9_PAD)
PORT_START("Buttons") // digital buttons
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Start") // Start button
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Back") // Back button
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Start") // Start button
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Back") // Back button
PORT_START("AGreen") // analog button
PORT_BIT(0xff, 0x00, IPT_PEDAL) PORT_NAME("A-Green") PORT_SENSITIVITY(100) PORT_KEYDELTA(32) PORT_MINMAX(0, 0xff)
@@ -2625,7 +2625,7 @@ MACHINE_CONFIG_START(xbox_base, xbox_base_state)
MCFG_PCI_BUS_LEGACY_SIBLING("pcibus")
MCFG_PCI_BUS_LEGACY_DEVICE(0, "NV2A GeForce 3MX Integrated GPU/Northbridge", geforce_pci_r, geforce_pci_w)
MCFG_PIC8259_ADD("pic8259_1", WRITELINE(xbox_base_state, xbox_pic8259_1_set_int_line), VCC, READ8(xbox_base_state, get_slave_ack))
- MCFG_PIC8259_ADD("pic8259_2", DEVWRITELINE("pic8259_1", pic8259_device, ir2_w), GND, NULL)
+ MCFG_PIC8259_ADD("pic8259_2", DEVWRITELINE("pic8259_1", pic8259_device, ir2_w), GND, NOOP)
MCFG_DEVICE_ADD("pit8254", PIT8254, 0)
MCFG_PIT8253_CLK0(1125000) /* heartbeat IRQ */
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 36f949e0298..fe63a422001 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -2457,6 +2457,7 @@ gghost // (c) 1984
gimeabrk // (c) 1985
grudge // prototype - Bally/Midway
hattrick // (c) 1984
+teamht //
minigolf // (c) 1985
minigolf2 // (c) 1985
nametune // (c) 1986
@@ -14054,6 +14055,7 @@ bmsoccer // Bambino
edracula // Epoch
efball // Epoch
galaxy2 // Epoch
+galaxy2b // Epoch
invspace // Epoch
mcompgin // Mattel
mvbfree // Mego
@@ -17234,6 +17236,7 @@ macse30 // 1989 Apple Macintosh SE/30
macsefd // 1988 Apple Macintosh SE (FDHD)
pmac6100 // 1993 Apple Power Macintosh 6100
unitron // 1985 Unitron
+utrn1024 // 1986 Unitron 1024
@source:macpci.cpp
pippin //
@@ -19923,6 +19926,7 @@ mkla3 // (c) 1992 Midway
mkla4 // (c) 1992 Midway
mknifty // hack
mknifty666 // hack
+mkrep // hack
mkprot4 // (c) 1992 Midway
mkprot8 // (c) 1992 Midway
mkprot9 // (c) 1992 Midway
@@ -28042,6 +28046,7 @@ starhrse // 2000.?? Star Horse (big screens)
starhrsp // 2003.12.01 Star Horse Progress (satellite) (Rev A)
starseek // 2001.07 Dokidoki Idol Star Seeker
suchie3 // 1999.09 Idol Janshi Su-Chi-Pi 3
+sushibar // 2003 Sushi Bar
takoron // 2006.12.16 Noukone Puzzle Takoron
tduno // 1999.08 Touch de UNO! / Unou Nouryoku Check Machine
tduno2 // 2000.02 Touch de UNO! 2
@@ -28542,6 +28547,7 @@ wjammers // 0065 (c) 1994 Data East Corporation
zedblade // 0076 (c) 1994 NMK
zintrckb // 0211 hack - this is not a genuine MVS proto, its a bootleg made from the CD version
zupapa // 0070 Zupapa - released in 2001, 1994 prototype probably exists
+lasthope
@source:neoprint.cpp
98best44 //
@@ -30454,6 +30460,9 @@ pc1403h // Pocket Computer 1403H
pc1450 // Pocket Computer 1450
trs80pc3 // Tandy TRS80 PC-3
+@source:pockchal.cpp
+pockchal
+
@source:pockstat.cpp
pockstat // 1999 Sony PocketStation
@@ -33793,10 +33802,12 @@ nclubv3 // 1997.07 Name Club Ver. 3
othellos // 1998.07 Othello Shiyouyo (Success)
pblbeach // 1996.03 Pebble Beach the Great Shot (T&E Soft)
pclb2elk // 1997.07 Print Club Custom
+pckobe99 // Print Club Custom 3
pclove //
pclove2 //
pclub2 // 1997.09 Print Club 2
pclub26w //
+pclub26wa //
pclub27s //
pclub2fc // 1997.04 Print Club 2 Felix The Cat
pclub2kc // 1997.02 Print Club Kome Kome Club
@@ -33807,12 +33818,16 @@ pclub2wb //
pclubol // 1998.07 Print Club Olive
pclubor // 1999.11 Print Club Goukakenran
pclubpok // 1999.11 Print Club Pokemon
+pcpooh2 //
+pcpooh3 //
pclubyo2 //
+prc28su //
prc297wi // 1997.10 Print Club 2 '97 Winter Ver
prc297wia //
prc298au // 1998.08 Print Club 2 '98 Autumn Ver
prc298sp // 1997.10 Print Club 2 '98 Spring Ver
prc298su //
+prc2ksu // Print Club Summer 2000
prikura // 1996.10 Prikura Daisakusen (Atlus)
puyosun // 1996.12 Puyo Puyo SUN (Compile)
rsgun // 1998.05 Radient Silver Gun (Treasure)
diff --git a/src/mame/video/atari.cpp b/src/mame/video/atari400.cpp
index 4798af44c8d..9959825da03 100644
--- a/src/mame/video/atari.cpp
+++ b/src/mame/video/atari400.cpp
@@ -9,7 +9,7 @@
******************************************************************************/
#include "emu.h"
-#include "includes/atari.h"
+#include "includes/atari400.h"
#define VERBOSE 0
diff --git a/src/mame/video/atarirle.cpp b/src/mame/video/atarirle.cpp
index 897e300533a..61c10f66fbe 100644
--- a/src/mame/video/atarirle.cpp
+++ b/src/mame/video/atarirle.cpp
@@ -534,7 +534,7 @@ if (count++ == atarirle_hilite_index)
void atari_rle_objects_device::draw_rle(bitmap_ind16 &bitmap, const rectangle &clip, int code, int color, int hflip, int vflip, int x, int y, int xscale, int yscale)
{
- // bail on a NULL object
+ // bail on a nullptr object
const object_info &info = m_info[code];
if (info.data == nullptr)
return;
diff --git a/src/mame/video/avgdvg.cpp b/src/mame/video/avgdvg.cpp
index d125198c158..453ff4b44a2 100644
--- a/src/mame/video/avgdvg.cpp
+++ b/src/mame/video/avgdvg.cpp
@@ -1345,7 +1345,7 @@ void avg_device::device_start()
avgdvg_vectorram_size = machine().root_device().memshare("vectorram")->bytes();
memory_share *colorram = machine().root_device().memshare("colorram");
- if (colorram != NULL)
+ if (colorram != nullptr)
{
avgdvg_colorram = reinterpret_cast<UINT8 *>(colorram->ptr());
}
@@ -1385,7 +1385,7 @@ void dvg_device::device_start()
avgdvg_vectorram_size = machine().root_device().memshare("vectorram")->bytes();
memory_share *colorram = machine().root_device().memshare("colorram");
- if (colorram != NULL)
+ if (colorram != nullptr)
{
avgdvg_colorram = reinterpret_cast<UINT8 *>(colorram->ptr());
}
diff --git a/src/mame/video/groundfx.cpp b/src/mame/video/groundfx.cpp
index 93dd3474384..0d36ff525ed 100644
--- a/src/mame/video/groundfx.cpp
+++ b/src/mame/video/groundfx.cpp
@@ -169,7 +169,7 @@ void groundfx_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
}
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
const rectangle *clipper;
diff --git a/src/mame/video/gunbustr.cpp b/src/mame/video/gunbustr.cpp
index 62a6dcb1a2b..49a756429fc 100644
--- a/src/mame/video/gunbustr.cpp
+++ b/src/mame/video/gunbustr.cpp
@@ -180,7 +180,7 @@ void gunbustr_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
sprite_ptr--;
diff --git a/src/mame/video/igs017_igs031.h b/src/mame/video/igs017_igs031.h
index 4c3b2c66ed3..bfb00074247 100644
--- a/src/mame/video/igs017_igs031.h
+++ b/src/mame/video/igs017_igs031.h
@@ -6,7 +6,7 @@
typedef device_delegate<UINT16 (UINT16)> igs017_igs031_palette_scramble_delegate;
#define MCFG_PALETTE_SCRAMBLE_CB( _class, _method) \
- igs017_igs031_device::set_palette_scramble_cb(*device, igs017_igs031_palette_scramble_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ igs017_igs031_device::set_palette_scramble_cb(*device, igs017_igs031_palette_scramble_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_REVERSE_TEXT_BITS \
igs017_igs031_device::static_set_text_reverse_bits(*device);
diff --git a/src/mame/video/m62.cpp b/src/mame/video/m62.cpp
index c9ca0846c43..35c97ef807b 100644
--- a/src/mame/video/m62.cpp
+++ b/src/mame/video/m62.cpp
@@ -304,7 +304,7 @@ WRITE8_MEMBER(m62_state::m62_flipscreen_w)
machine().bookkeeping().coin_counter_w(1, data & 4);
/* Sound inhibit ... connected to D6 which is not present on any board */
- if (m_audio->m_audio_SINH != NULL)
+ if (m_audio->m_audio_SINH != nullptr)
m_audio->m_audio_SINH->write((data >> 3) & 1);
}
diff --git a/src/mame/video/midzeus2.cpp b/src/mame/video/midzeus2.cpp
index 670af222960..be97a461cfb 100644
--- a/src/mame/video/midzeus2.cpp
+++ b/src/mame/video/midzeus2.cpp
@@ -340,7 +340,7 @@ void midzeus2_state::exit_handler2()
else
{
printf("\tWritten %d times\n", regwrite_count[regnum]);
- for (info = regdata[regnum]; info != NULL; info = info->next)
+ for (info = regdata[regnum]; info != nullptr; info = info->next)
printf("\t%08X\n", info->value);
}
}
@@ -349,7 +349,7 @@ void midzeus2_state::exit_handler2()
if (subregwrite_count[regnum] != 0)
{
printf("Sub-Register %02X (%d writes)\n", regnum, subregwrite_count[regnum]);
- for (info = subregdata[regnum]; info != NULL; info = info->next)
+ for (info = subregdata[regnum]; info != nullptr; info = info->next)
printf("\t%08X\n", info->value);
}
}
@@ -501,13 +501,13 @@ if (regdata_count[offset] < 256)
{
reg_info **tailptr;
- for (tailptr = &regdata[offset]; *tailptr != NULL; tailptr = &(*tailptr)->next)
+ for (tailptr = &regdata[offset]; *tailptr != nullptr; tailptr = &(*tailptr)->next)
if ((*tailptr)->value == data)
break;
- if (*tailptr == NULL)
+ if (*tailptr == nullptr)
{
*tailptr = alloc_or_die(reg_info);
- (*tailptr)->next = NULL;
+ (*tailptr)->next = nullptr;
(*tailptr)->value = data;
regdata_count[offset]++;
}
@@ -741,13 +741,13 @@ if (subregdata_count[which] < 256)
{
reg_info **tailptr;
- for (tailptr = &subregdata[which]; *tailptr != NULL; tailptr = &(*tailptr)->next)
+ for (tailptr = &subregdata[which]; *tailptr != nullptr; tailptr = &(*tailptr)->next)
if ((*tailptr)->value == value)
break;
- if (*tailptr == NULL)
+ if (*tailptr == nullptr)
{
*tailptr = alloc_or_die(reg_info);
- (*tailptr)->next = NULL;
+ (*tailptr)->next = nullptr;
(*tailptr)->value = value;
subregdata_count[which]++;
}
diff --git a/src/mame/video/model2.cpp b/src/mame/video/model2.cpp
index 5e4e70e5bc7..a83126afbdd 100644
--- a/src/mame/video/model2.cpp
+++ b/src/mame/video/model2.cpp
@@ -2376,7 +2376,7 @@ static UINT32 * geo_end( geo_state *geo, UINT32 opcode, UINT32 *input )
/* signal the end of this data block the rasterizer */
model2_3d_push( raster, 0xFF000000 );
- /* signal end by returning NULL */
+ /* signal end by returning nullptr */
return nullptr;
}
diff --git a/src/mame/video/othunder.cpp b/src/mame/video/othunder.cpp
index f5ea75dc1c8..fadaa443f44 100644
--- a/src/mame/video/othunder.cpp
+++ b/src/mame/video/othunder.cpp
@@ -179,7 +179,7 @@ void othunder_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
sprite_ptr--;
diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp
index cd453cffa14..da20168f390 100644
--- a/src/mame/video/pcd.cpp
+++ b/src/mame/video/pcd.cpp
@@ -115,7 +115,7 @@ static MACHINE_CONFIG_FRAGMENT( pcd_video )
MCFG_PALETTE_ADD("palette", 3)
MCFG_PALETTE_INIT_OWNER(pcdx_video_device, pcdx)
- MCFG_SCN2674_VIDEO_ADD("crtc", 0, NULL);
+ MCFG_SCN2674_VIDEO_ADD("crtc", 0, NOOP);
MCFG_SCN2674_TEXT_CHARACTER_WIDTH(8)
MCFG_SCN2674_GFX_CHARACTER_WIDTH(16)
MCFG_SCN2674_DRAW_CHARACTER_CALLBACK_OWNER(pcd_video_device, display_pixels)
diff --git a/src/mame/video/ppu2c0x.h b/src/mame/video/ppu2c0x.h
index 8a21d51f0b8..25126206502 100644
--- a/src/mame/video/ppu2c0x.h
+++ b/src/mame/video/ppu2c0x.h
@@ -114,7 +114,7 @@ enum
ppu2c0x_device::set_color_base(*device, _color);
#define MCFG_PPU2C0X_SET_NMI(_class, _method) \
- ppu2c0x_device::set_nmi_delegate(*device, ppu2c0x_nmi_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ ppu2c0x_device::set_nmi_delegate(*device, ppu2c0x_nmi_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_PPU2C0X_IGNORE_SPRITE_WRITE_LIMIT \
ppu2c0x_device::use_sprite_write_limitation_disable(*device);
diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h
index ce15f9a9c97..dd34fb5ff57 100644
--- a/src/mame/video/segaic16.h
+++ b/src/mame/video/segaic16.h
@@ -13,7 +13,7 @@
typedef device_delegate<void (int, UINT16*, UINT16*, UINT16*, UINT16*)> segaic16_video_pagelatch_delegate;
#define MCFG_SEGAIC16_VIDEO_SET_PAGELATCH_CB( _class, _method) \
- segaic16_video_device::set_pagelatch_cb(*device, segaic16_video_pagelatch_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ segaic16_video_device::set_pagelatch_cb(*device, segaic16_video_pagelatch_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
/* tilemap systems */
diff --git a/src/mame/video/slapshot.cpp b/src/mame/video/slapshot.cpp
index f6c0220986c..9d57f67e479 100644
--- a/src/mame/video/slapshot.cpp
+++ b/src/mame/video/slapshot.cpp
@@ -354,7 +354,7 @@ void slapshot_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist)
{
sprite_ptr--;
diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h
index 1f985727e5a..f209054a6ed 100644
--- a/src/mame/video/snk68_spr.h
+++ b/src/mame/video/snk68_spr.h
@@ -5,7 +5,7 @@ typedef device_delegate<void (int&, int&, int&, int&)> snk68_tile_indirection_de
#define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \
snk68_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
#define MCFG_SNK68_SPR_SET_TILE_INDIRECT( _class, _method) \
- snk68_spr_device::set_tile_indirect_cb(*device, snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ snk68_spr_device::set_tile_indirect_cb(*device, snk68_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_SNK68_SPR_NO_PARTIAL \
snk68_spr_device::static_set_no_partial(*device);
diff --git a/src/mame/video/superchs.cpp b/src/mame/video/superchs.cpp
index b7a76d89aff..5684cfa80f0 100644
--- a/src/mame/video/superchs.cpp
+++ b/src/mame/video/superchs.cpp
@@ -178,7 +178,7 @@ void superchs_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
sprite_ptr--;
diff --git a/src/mame/video/taito_f2.cpp b/src/mame/video/taito_f2.cpp
index 85aa44d8839..7ec63229d5a 100644
--- a/src/mame/video/taito_f2.cpp
+++ b/src/mame/video/taito_f2.cpp
@@ -774,7 +774,7 @@ void taitof2_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, c
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
sprite_ptr--;
diff --git a/src/mame/video/tc0180vcu.cpp b/src/mame/video/tc0180vcu.cpp
index 9420114b3d9..f588c099c03 100644
--- a/src/mame/video/tc0180vcu.cpp
+++ b/src/mame/video/tc0180vcu.cpp
@@ -14,7 +14,7 @@ const device_type TC0180VCU = &device_creator<tc0180vcu_device>;
tc0180vcu_device::tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0180VCU, "Taito TC0180VCU", tag, owner, clock, "tc0180vcu", __FILE__),
m_ram(nullptr),
- //m_scrollram(NULL),
+ //m_scrollram(nullptr),
//m_bg_rambank(0),
//m_fg_rambank(0),
//m_tx_rambank(0),
diff --git a/src/mame/video/thomson.cpp b/src/mame/video/thomson.cpp
index a5432b4c5f0..5b70a119b8c 100644
--- a/src/mame/video/thomson.cpp
+++ b/src/mame/video/thomson.cpp
@@ -997,7 +997,7 @@ UINT32 thomson_state::screen_update_thom(screen_device &screen, bitmap_ind16 &bi
draw_scanline16( bitmap, xbleft, ypos, xwidth, v, nullptr );
#if 0
if ( thom_hires )
- draw_scanline16( bitmap, xbleft, ypos+1, xwidth, v, NULL );
+ draw_scanline16( bitmap, xbleft, ypos+1, xwidth, v, nullptr );
#endif
}
diff --git a/src/mame/video/tmc1800.cpp b/src/mame/video/tmc1800.cpp
index 57aef139bef..85ae854a345 100644
--- a/src/mame/video/tmc1800.cpp
+++ b/src/mame/video/tmc1800.cpp
@@ -54,7 +54,7 @@ MACHINE_CONFIG_FRAGMENT( tmc2000_video )
MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NULL, READLINE(tmc2000_state, rdata_r), READLINE(tmc2000_state, bdata_r), READLINE(tmc2000_state, gdata_r))
+ MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(tmc2000_state, rdata_r), READLINE(tmc2000_state, bdata_r), READLINE(tmc2000_state, gdata_r))
MCFG_CDP1864_CHROMINANCE(RES_K(1.21), RES_K(2.05), RES_K(2.26), RES_K(3.92)) // RL64, RL63, RL61, RL65 (also RH62 (2K pot) in series, but ignored here)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -64,7 +64,7 @@ MACHINE_CONFIG_FRAGMENT( nano_video )
MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NULL, VCC, VCC, VCC)
+ MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL_1_75MHz, GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, VCC, VCC, VCC)
MCFG_CDP1864_CHROMINANCE(RES_K(1.21), RES_INF, RES_INF, 0) // R18 (unconfirmed)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/video/undrfire.cpp b/src/mame/video/undrfire.cpp
index 10910ce46f6..a373680936c 100644
--- a/src/mame/video/undrfire.cpp
+++ b/src/mame/video/undrfire.cpp
@@ -191,7 +191,7 @@ void undrfire_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
sprite_ptr--;
@@ -325,7 +325,7 @@ void undrfire_state::draw_sprites_cbombers(screen_device &screen, bitmap_ind16 &
}
}
- /* this happens only if primsks != NULL */
+ /* this happens only if primsks != nullptr */
while (sprite_ptr != m_spritelist.get())
{
sprite_ptr--;
diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h
index 1a84e074208..7ada5081fcc 100644
--- a/src/mame/video/vsystem_spr.h
+++ b/src/mame/video/vsystem_spr.h
@@ -6,7 +6,7 @@
typedef device_delegate<UINT32 (UINT32)> vsystem_tile_indirection_delegate;
#define MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( _class, _method) \
- vsystem_spr_device::set_tile_indirect_cb(*device, vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ vsystem_spr_device::set_tile_indirect_cb(*device, vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_VSYSTEM_SPR_SET_GFXREGION( _rgn ) \
vsystem_spr_device::set_gfx_region(*device, _rgn);
#define MCFG_VSYSTEM_SPR_SET_PALBASE( _palbase ) \
diff --git a/src/mame/video/vsystem_spr2.h b/src/mame/video/vsystem_spr2.h
index 1ffdb41a537..563909e092e 100644
--- a/src/mame/video/vsystem_spr2.h
+++ b/src/mame/video/vsystem_spr2.h
@@ -5,7 +5,7 @@
typedef device_delegate<UINT32 (UINT32)> vsystem_tile2_indirection_delegate;
#define MCFG_VSYSTEM_SPR2_SET_TILE_INDIRECT( _class, _method) \
- vsystem_spr2_device::set_tile_indirect_cb(*device, vsystem_tile2_indirection_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
+ vsystem_spr2_device::set_tile_indirect_cb(*device, vsystem_tile2_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
#define MCFG_VSYSTEM_SPR2_SET_PRITYPE( _val) \
vsystem_spr2_device::set_pritype(*device, _val);
#define MCFG_VSYSTEM_SPR2_SET_GFXREGION( _rgn ) \
diff --git a/src/mame/video/wswan_video.cpp b/src/mame/video/wswan.cpp
index 8dbb60f0db8..58177a8193d 100644
--- a/src/mame/video/wswan_video.cpp
+++ b/src/mame/video/wswan.cpp
@@ -2,8 +2,6 @@
// copyright-holders:Anthony Kruize, Wilbert Pol
/***************************************************************************
- wswan_video.c
-
File to handle video emulation of the Bandai WonderSwan VDP.
Anthony Kruize
@@ -15,7 +13,7 @@
***************************************************************************/
-#include "wswan_video.h"
+#include "wswan.h"
const device_type WSWAN_VIDEO = &device_creator<wswan_video_device>;
diff --git a/src/mame/video/wswan_video.h b/src/mame/video/wswan.h
index 3cad1155075..3cad1155075 100644
--- a/src/mame/video/wswan_video.h
+++ b/src/mame/video/wswan.h
diff --git a/src/mame/video/x68k.cpp b/src/mame/video/x68k.cpp
index 7a11c89175b..ed1fe0d5074 100644
--- a/src/mame/video/x68k.cpp
+++ b/src/mame/video/x68k.cpp
@@ -89,7 +89,7 @@ bitmap_rgb32* ::x68k_get_gfx_page(int pri,int type)
if(type == GFX65536)
return x68k_gfx_0_bitmap_65536;
- return NULL; // should never reach here either.
+ return nullptr; // should never reach here either.
}
*/
void x68k_state::x68k_crtc_text_copy(int src, int dest, UINT8 planes)
diff --git a/src/osd/modules/debugger/debugimgui.cpp b/src/osd/modules/debugger/debugimgui.cpp
index 5c49d2df9a3..c8f6554b476 100644
--- a/src/osd/modules/debugger/debugimgui.cpp
+++ b/src/osd/modules/debugger/debugimgui.cpp
@@ -79,8 +79,16 @@ class debug_imgui : public osd_module, public debug_module
public:
debug_imgui()
: osd_module(OSD_DEBUG_PROVIDER, "imgui"), debug_module(),
- m_machine(nullptr),
- m_hide(false),
+ m_machine(nullptr),
+ m_mouse_x(0),
+ m_mouse_y(0),
+ m_mouse_button(false),
+ m_prev_mouse_button(false),
+ m_running(false),
+ font_name(nullptr),
+ font_size(0),
+ m_key_char(0),
+ m_hide(false),
m_win_count(0)
{
}
@@ -98,6 +106,7 @@ private:
void handle_mouse();
void handle_mouse_views();
void handle_keys();
+ void handle_keys_views();
void handle_console(running_machine* machine);
void update();
void draw_console();
@@ -322,7 +331,7 @@ void debug_imgui::handle_keys()
else
io.KeyAlt = false;
- for(input_item_id id = ITEM_ID_A; id <= ITEM_ID_CANCEL; id++)
+ for(input_item_id id = ITEM_ID_A; id <= ITEM_ID_CANCEL; ++id)
{
if(m_machine->input().code_pressed(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
io.KeysDown[id] = true;
@@ -354,7 +363,62 @@ void debug_imgui::handle_keys()
if(ImGui::IsKeyPressed(ITEM_ID_L) && ImGui::IsKeyDown(ITEM_ID_LCONTROL))
add_log(++m_win_count);
- m_machine->ui_input().reset(); // clear remaining inputs, so they don't fall through to the UI
+}
+
+void debug_imgui::handle_keys_views()
+{
+ debug_area* focus_view = nullptr;
+ // find view that has focus (should only be one at a time)
+ for(std::vector<debug_area*>::iterator view_ptr = view_list.begin();view_ptr != view_list.end();++view_ptr)
+ if((*view_ptr)->has_focus)
+ focus_view = *view_ptr;
+
+ // check views in main views also (only the disassembler view accepts inputs)
+ if(view_main_disasm->has_focus)
+ focus_view = view_main_disasm;
+
+ // if no view has focus, then there's nothing to do
+ if(focus_view == nullptr)
+ return;
+
+ // pass keypresses to debug view with focus
+ if(m_machine->input().code_pressed_once(KEYCODE_UP))
+ focus_view->view->process_char(DCH_UP);
+ if(m_machine->input().code_pressed_once(KEYCODE_DOWN))
+ focus_view->view->process_char(DCH_DOWN);
+ if(m_machine->input().code_pressed_once(KEYCODE_LEFT))
+ {
+ if(m_machine->input().code_pressed(KEYCODE_LCONTROL))
+ focus_view->view->process_char(DCH_CTRLLEFT);
+ else
+ focus_view->view->process_char(DCH_LEFT);
+ }
+ if(m_machine->input().code_pressed_once(KEYCODE_RIGHT))
+ {
+ if(m_machine->input().code_pressed(KEYCODE_LCONTROL))
+ focus_view->view->process_char(DCH_CTRLRIGHT);
+ else
+ focus_view->view->process_char(DCH_RIGHT);
+ }
+ if(m_machine->input().code_pressed_once(KEYCODE_PGUP))
+ focus_view->view->process_char(DCH_PUP);
+ if(m_machine->input().code_pressed_once(KEYCODE_PGDN))
+ focus_view->view->process_char(DCH_PDOWN);
+ if(m_machine->input().code_pressed_once(KEYCODE_HOME))
+ {
+ if(m_machine->input().code_pressed(KEYCODE_LCONTROL))
+ focus_view->view->process_char(DCH_CTRLHOME);
+ else
+ focus_view->view->process_char(DCH_HOME);
+ }
+ if(m_machine->input().code_pressed_once(KEYCODE_END))
+ {
+ if(m_machine->input().code_pressed(KEYCODE_LCONTROL))
+ focus_view->view->process_char(DCH_CTRLEND);
+ else
+ focus_view->view->process_char(DCH_END);
+ }
+
}
void debug_imgui::handle_console(running_machine* machine)
@@ -610,13 +674,13 @@ void debug_imgui::draw_disasm(debug_area* view_ptr, bool* opened)
debug_view_disasm* disasm = downcast<debug_view_disasm*>(view_ptr->view);
int rightcol = disasm->right_column();
- if(ImGui::MenuItem("Raw opcodes",NULL,(rightcol == DASM_RIGHTCOL_RAW) ? true : false))
+ if(ImGui::MenuItem("Raw opcodes", nullptr,(rightcol == DASM_RIGHTCOL_RAW) ? true : false))
disasm->set_right_column(DASM_RIGHTCOL_RAW);
- if(ImGui::MenuItem("Encrypted opcodes",NULL,(rightcol == DASM_RIGHTCOL_ENCRYPTED) ? true : false))
+ if(ImGui::MenuItem("Encrypted opcodes", nullptr,(rightcol == DASM_RIGHTCOL_ENCRYPTED) ? true : false))
disasm->set_right_column(DASM_RIGHTCOL_ENCRYPTED);
- if(ImGui::MenuItem("No opcodes",NULL,(rightcol == DASM_RIGHTCOL_NONE) ? true : false))
+ if(ImGui::MenuItem("No opcodes", nullptr,(rightcol == DASM_RIGHTCOL_NONE) ? true : false))
disasm->set_right_column(DASM_RIGHTCOL_NONE);
- if(ImGui::MenuItem("Comments",NULL,(rightcol == DASM_RIGHTCOL_COMMENTS) ? true : false))
+ if(ImGui::MenuItem("Comments", nullptr,(rightcol == DASM_RIGHTCOL_COMMENTS) ? true : false))
disasm->set_right_column(DASM_RIGHTCOL_COMMENTS);
ImGui::EndMenu();
@@ -748,27 +812,27 @@ void debug_imgui::draw_memory(debug_area* view_ptr, bool* opened)
int format = mem->get_data_format();
UINT32 chunks = mem->chunks_per_row();
- if(ImGui::MenuItem("1-byte chunks",NULL,(format == 1) ? true : false))
+ if(ImGui::MenuItem("1-byte chunks", nullptr,(format == 1) ? true : false))
mem->set_data_format(1);
- if(ImGui::MenuItem("2-byte chunks",NULL,(format == 2) ? true : false))
+ if(ImGui::MenuItem("2-byte chunks", nullptr,(format == 2) ? true : false))
mem->set_data_format(2);
- if(ImGui::MenuItem("4-byte chunks",NULL,(format == 4) ? true : false))
+ if(ImGui::MenuItem("4-byte chunks", nullptr,(format == 4) ? true : false))
mem->set_data_format(4);
- if(ImGui::MenuItem("8-byte chunks",NULL,(format == 8) ? true : false))
+ if(ImGui::MenuItem("8-byte chunks", nullptr,(format == 8) ? true : false))
mem->set_data_format(8);
- if(ImGui::MenuItem("32-bit floating point",NULL,(format == 9) ? true : false))
+ if(ImGui::MenuItem("32-bit floating point", nullptr,(format == 9) ? true : false))
mem->set_data_format(9);
- if(ImGui::MenuItem("64-bit floating point",NULL,(format == 10) ? true : false))
+ if(ImGui::MenuItem("64-bit floating point", nullptr,(format == 10) ? true : false))
mem->set_data_format(10);
- if(ImGui::MenuItem("80-bit floating point",NULL,(format == 11) ? true : false))
+ if(ImGui::MenuItem("80-bit floating point", nullptr,(format == 11) ? true : false))
mem->set_data_format(11);
ImGui::Separator();
- if(ImGui::MenuItem("Logical addresses",NULL,!physical))
+ if(ImGui::MenuItem("Logical addresses", nullptr,!physical))
mem->set_physical(false);
- if(ImGui::MenuItem("Physical addresses",NULL,physical))
+ if(ImGui::MenuItem("Physical addresses", nullptr,physical))
mem->set_physical(true);
ImGui::Separator();
- if(ImGui::MenuItem("Reverse view",NULL,rev))
+ if(ImGui::MenuItem("Reverse view", nullptr,rev))
mem->set_reverse(!rev);
ImGui::Separator();
if(ImGui::MenuItem("Increase bytes per line"))
@@ -894,7 +958,7 @@ void debug_imgui::draw_console()
ImGuiWindowFlags flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse;
ImGui::SetNextWindowSize(ImVec2(view_main_regs->width + view_main_disasm->width,view_main_disasm->height + view_main_console->height + ImGui::GetTextLineHeight()*3),ImGuiSetCond_Once);
- if(ImGui::Begin(view_main_console->title.c_str(),NULL,flags))
+ if(ImGui::Begin(view_main_console->title.c_str(), nullptr,flags))
{
const debug_view_char *viewdata;
debug_view_xy vsize,totalsize;
@@ -975,7 +1039,7 @@ void debug_imgui::draw_console()
collapsed = true;
ImGui::End();
}
- if(ImGui::MenuItem((*view_ptr)->title.c_str(),NULL,!collapsed))
+ if(ImGui::MenuItem((*view_ptr)->title.c_str(), nullptr,!collapsed))
ImGui::SetWindowCollapsed((*view_ptr)->title.c_str(),false);
}
ImGui::EndMenu();
@@ -1176,7 +1240,7 @@ void debug_imgui::update()
to_delete = (*view_ptr);
break;
}
- view_ptr++;
+ ++view_ptr;
count++;
}
// check for a closed window
@@ -1264,6 +1328,8 @@ void debug_imgui::wait_for_debugger(device_t &device, bool firststop)
update();
imguiEndFrame();
handle_mouse_views();
+ handle_keys_views();
+ m_machine->ui_input().reset(); // clear remaining inputs, so they don't fall through to the UI
device.machine().osd().update(false);
}
diff --git a/src/osd/modules/debugger/debugint.cpp b/src/osd/modules/debugger/debugint.cpp
index 6ac60b81b41..b894f84f1a0 100644
--- a/src/osd/modules/debugger/debugint.cpp
+++ b/src/osd/modules/debugger/debugint.cpp
@@ -33,8 +33,8 @@ class debug_internal : public osd_module, public debug_module
public:
debug_internal()
: osd_module(OSD_DEBUG_PROVIDER, "internal"), debug_module(),
- m_machine(nullptr)
- {
+ m_machine(nullptr), font_name(nullptr), font_size(0)
+{
}
virtual ~debug_internal() { }
diff --git a/src/osd/modules/debugger/debugosx.mm b/src/osd/modules/debugger/debugosx.mm
index 598a85dd569..56e85e21105 100644
--- a/src/osd/modules/debugger/debugosx.mm
+++ b/src/osd/modules/debugger/debugosx.mm
@@ -41,7 +41,7 @@ class debugger_osx : public osd_module, public debug_module
public:
debugger_osx()
: osd_module(OSD_DEBUG_PROVIDER, "osx"), debug_module(),
- m_machine(NULL),
+ m_machine(nullptr),
m_console(nil)
{
}
@@ -95,7 +95,7 @@ void debugger_osx::exit()
userInfo:info];
[m_console release];
m_console = nil;
- m_machine = NULL;
+ m_machine = nullptr;
}
[pool release];
}
diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp
index ac6c6a9d95c..e9abe538981 100644
--- a/src/osd/modules/debugger/debugqt.cpp
+++ b/src/osd/modules/debugger/debugqt.cpp
@@ -40,7 +40,7 @@ class debug_qt : public osd_module, public debug_module
public:
debug_qt()
: osd_module(OSD_DEBUG_PROVIDER, "qt"), debug_module(),
- m_machine(NULL)
+ m_machine(nullptr)
{
}
@@ -64,10 +64,10 @@ private:
//============================================================
int qtArgc = 0;
-char** qtArgv = NULL;
+char** qtArgv = nullptr;
bool oneShot = true;
-static MainWindow* mainQtWindow = NULL;
+static MainWindow* mainQtWindow = nullptr;
//============================================================
// XML configuration save/load
@@ -84,7 +84,7 @@ static void xml_configuration_load(running_machine &machine, config_type cfg_typ
return;
// Might not have any data
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
for (int i = 0; i < xmlConfigurations.size(); i++)
@@ -92,8 +92,8 @@ static void xml_configuration_load(running_machine &machine, config_type cfg_typ
xmlConfigurations.clear();
// Configuration load
- xml_data_node* wnode = NULL;
- for (wnode = xml_get_sibling(parentnode->child, "window"); wnode != NULL; wnode = xml_get_sibling(wnode->next, "window"))
+ xml_data_node* wnode = nullptr;
+ for (wnode = xml_get_sibling(parentnode->child, "window"); wnode != nullptr; wnode = xml_get_sibling(wnode->next, "window"))
{
WindowQtConfig::WindowType type = (WindowQtConfig::WindowType)xml_get_attribute_int(wnode, "type", WindowQtConfig::WIN_TYPE_UNKNOWN);
switch (type)
@@ -124,8 +124,8 @@ static void xml_configuration_save(running_machine &machine, config_type cfg_typ
// Create an xml node
xml_data_node *debugger_node;
- debugger_node = xml_add_child(parentnode, "window", NULL);
- if (debugger_node == NULL)
+ debugger_node = xml_add_child(parentnode, "window", nullptr);
+ if (debugger_node == nullptr)
continue;
// Insert the appropriate information
@@ -195,7 +195,7 @@ static void setup_additional_startup_windows(running_machine& machine, std::vect
{
WindowQtConfig* config = configList[i];
- WindowQt* foo = NULL;
+ WindowQt* foo = nullptr;
switch (config->m_type)
{
case WindowQtConfig::WIN_TYPE_MEMORY:
@@ -246,7 +246,7 @@ bool debug_qt::nativeEventFilter(const QByteArray &eventType, void *message, lon
void debug_qt::init_debugger(running_machine &machine)
{
- if (qApp == NULL)
+ if (qApp == nullptr)
{
// If you're starting from scratch, create a new qApp
new QApplication(qtArgc, qtArgv);
diff --git a/src/osd/modules/debugger/debugwin.cpp b/src/osd/modules/debugger/debugwin.cpp
index a32405c4aa8..1f68e6989eb 100644
--- a/src/osd/modules/debugger/debugwin.cpp
+++ b/src/osd/modules/debugger/debugwin.cpp
@@ -35,11 +35,11 @@ public:
debugger_windows() :
osd_module(OSD_DEBUG_PROVIDER, "windows"),
debug_module(),
- m_machine(NULL),
+ m_machine(nullptr),
m_metrics(),
m_waiting_for_debugger(false),
m_window_list(),
- m_main_console(NULL)
+ m_main_console(nullptr)
{
}
@@ -83,12 +83,12 @@ private:
void debugger_windows::exit()
{
// loop over windows and free them
- while (m_window_list.first() != NULL)
+ while (m_window_list.first() != nullptr)
m_window_list.first()->destroy();
- m_main_console = NULL;
+ m_main_console = nullptr;
m_metrics.reset();
- m_machine = NULL;
+ m_machine = nullptr;
}
@@ -102,15 +102,15 @@ void debugger_windows::init_debugger(running_machine &machine)
void debugger_windows::wait_for_debugger(device_t &device, bool firststop)
{
// create a console window
- if (m_main_console == NULL)
+ if (m_main_console == nullptr)
m_main_console = create_window<consolewin_info>();
// update the views in the console to reflect the current CPU
- if (m_main_console != NULL)
+ if (m_main_console != nullptr)
m_main_console->set_cpu(device);
// when we are first stopped, adjust focus to us
- if (firststop && (m_main_console != NULL))
+ if (firststop && (m_main_console != nullptr))
{
m_main_console->set_foreground();
if (winwindow_has_focus())
@@ -126,7 +126,7 @@ void debugger_windows::wait_for_debugger(device_t &device, bool firststop)
// get and process messages
MSG message;
- GetMessage(&message, NULL, 0, 0);
+ GetMessage(&message, nullptr, 0, 0);
switch (message.message)
{
@@ -254,7 +254,7 @@ template <typename T> T *debugger_windows::create_window()
else
{
global_free(info);
- return NULL;
+ return nullptr;
}
}
diff --git a/src/osd/modules/debugger/osx/debugconsole.mm b/src/osd/modules/debugger/osx/debugconsole.mm
index 4bd7e029295..30ee1e8eab2 100644
--- a/src/osd/modules/debugger/osx/debugconsole.mm
+++ b/src/osd/modules/debugger/osx/debugconsole.mm
@@ -227,7 +227,7 @@
- (IBAction)debugToggleBreakpoint:(id)sender {
- device_t &device = [dasmView source]->device();
+ device_t &device = *[dasmView source]->device();
if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device))
{
offs_t const address = [dasmView selectedAddress];
@@ -236,7 +236,7 @@
// if it doesn't exist, add a new one
NSString *command;
- if (bp == NULL)
+ if (bp == nullptr)
command = [NSString stringWithFormat:@"bpset 0x%lX", (unsigned long)address];
else
command = [NSString stringWithFormat:@"bpclear 0x%X", (unsigned)bp->index()];
@@ -246,12 +246,12 @@
- (IBAction)debugToggleBreakpointEnable:(id)sender {
- device_t &device = [dasmView source]->device();
+ device_t &device = *[dasmView source]->device();
if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device))
{
device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:[dasmView selectedAddress]
forDevice:device];
- if (bp != NULL)
+ if (bp != nullptr)
{
NSString *command;
if (bp->enabled())
@@ -265,7 +265,7 @@
- (IBAction)debugRunToCursor:(id)sender {
- device_t &device = [dasmView source]->device();
+ device_t &device = *[dasmView source]->device();
if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device))
{
NSString *command = [NSString stringWithFormat:@"go 0x%lX", (unsigned long)[dasmView selectedAddress]];
@@ -481,20 +481,20 @@
SEL const action = [item action];
BOOL const inContextMenu = ([item menu] == [dasmView menu]);
BOOL const haveCursor = [dasmView cursorVisible];
- BOOL const isCurrent = (debug_cpu_get_visible_cpu(*machine) == &[dasmView source]->device());
+ BOOL const isCurrent = (debug_cpu_get_visible_cpu(*machine) == [dasmView source]->device());
- device_debug::breakpoint *breakpoint = NULL;
+ device_debug::breakpoint *breakpoint = nullptr;
if (haveCursor)
{
breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress]
- forDevice:[dasmView source]->device()];
+ forDevice:*[dasmView source]->device()];
}
if (action == @selector(debugToggleBreakpoint:))
{
if (haveCursor)
{
- if (breakpoint != NULL)
+ if (breakpoint != nullptr)
{
if (inContextMenu)
[item setTitle:@"Clear Breakpoint"];
@@ -520,7 +520,7 @@
}
else if (action == @selector(debugToggleBreakpointEnable:))
{
- if ((breakpoint != NULL) && !breakpoint->enabled())
+ if ((breakpoint != nullptr) && !breakpoint->enabled())
{
if (inContextMenu)
[item setTitle:@"Enable Breakpoint"];
@@ -534,7 +534,7 @@
else
[item setTitle:@"Disable Breakpoint at Cursor"];
}
- return (breakpoint != NULL) && isCurrent;
+ return (breakpoint != nullptr) && isCurrent;
}
else if (action == @selector(debugRunToCursor:))
{
diff --git a/src/osd/modules/debugger/osx/debugview.mm b/src/osd/modules/debugger/osx/debugview.mm
index 05d2e2dfc17..a32b99794dd 100644
--- a/src/osd/modules/debugger/osx/debugview.mm
+++ b/src/osd/modules/debugger/osx/debugview.mm
@@ -260,7 +260,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate)
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
- if (view != NULL) machine->debug_view().free_view(*view);
+ if (view != nullptr) machine->debug_view().free_view(*view);
if (font != nil) [font release];
if (text != nil) [text release];
[super dealloc];
diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.mm b/src/osd/modules/debugger/osx/debugwindowhandler.mm
index fd11fa89152..90260914f8e 100644
--- a/src/osd/modules/debugger/osx/debugwindowhandler.mm
+++ b/src/osd/modules/debugger/osx/debugwindowhandler.mm
@@ -131,7 +131,7 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
+ (device_debug::breakpoint *)findBreakpointAtAddress:(offs_t)address forDevice:(device_t &)device {
device_debug *const cpuinfo = device.debug();
device_debug::breakpoint *bp = cpuinfo->breakpoint_first();
- while ((bp != NULL) && (address != bp->address())) bp = bp->next();
+ while ((bp != nullptr) && (address != bp->address())) bp = bp->next();
return bp;
}
diff --git a/src/osd/modules/debugger/osx/deviceinfoviewer.mm b/src/osd/modules/debugger/osx/deviceinfoviewer.mm
index dd1b43ccf60..bbc2ac7d0f5 100644
--- a/src/osd/modules/debugger/osx/deviceinfoviewer.mm
+++ b/src/osd/modules/debugger/osx/deviceinfoviewer.mm
@@ -166,10 +166,10 @@
// add interfaces if present
device_interface *interface = device->interfaces().first();
- if (interface != NULL)
+ if (interface != nullptr)
{
NSBox *const interfacesBox = [self makeBox:@"Interfaces" toFit:contentView];
- while (interface != NULL)
+ while (interface != nullptr)
{
[self addField:[NSString stringWithUTF8String:interface->interface_type()]
toBox:interfacesBox];
diff --git a/src/osd/modules/debugger/osx/devicesviewer.mm b/src/osd/modules/debugger/osx/devicesviewer.mm
index 356cc2d1393..8a87dedb1a6 100644
--- a/src/osd/modules/debugger/osx/devicesviewer.mm
+++ b/src/osd/modules/debugger/osx/devicesviewer.mm
@@ -34,7 +34,7 @@
- (void)wrapChildren {
NSMutableArray *const tmp = [[NSMutableArray alloc] init];
- for (device_t *child = device->subdevices().first(); child != NULL; child = child->next())
+ for (device_t *child = device->subdevices().first(); child != nullptr; child = child->next())
{
MAMEDeviceWrapper *const wrap = [[MAMEDeviceWrapper alloc] initWithMachine:*machine
device:*child];
diff --git a/src/osd/modules/debugger/osx/disassemblyview.mm b/src/osd/modules/debugger/osx/disassemblyview.mm
index f82eb917fae..212f8194cd6 100644
--- a/src/osd/modules/debugger/osx/disassemblyview.mm
+++ b/src/osd/modules/debugger/osx/disassemblyview.mm
@@ -43,7 +43,7 @@
- (NSSize)maximumFrameSize {
debug_view_xy max(0, 0);
debug_view_source const *source = view->source();
- for (debug_view_source const *source = view->first_source(); source != NULL; source = source->next())
+ for (debug_view_source const *source = view->first_source(); source != nullptr; source = source->next())
{
view->set_source(*source);
debug_view_xy const current = view->total_size();
@@ -105,7 +105,7 @@
- (NSString *)selectedSubviewName {
const debug_view_source *source = view->source();
- if (source != NULL)
+ if (source != nullptr)
return [NSString stringWithUTF8String:source->name()];
else
return @"";
@@ -114,7 +114,7 @@
- (int)selectedSubviewIndex {
const debug_view_source *source = view->source();
- if (source != NULL)
+ if (source != nullptr)
return view->source_list().indexof(*source);
else
return -1;
@@ -133,7 +133,7 @@
- (BOOL)selectSubviewForDevice:(device_t *)device {
debug_view_source const *const source = view->source_for_device(device);
- if (source != NULL)
+ if (source != nullptr)
{
if (view->source() != source)
{
@@ -151,11 +151,11 @@
- (BOOL)selectSubviewForSpace:(address_space *)space {
- if (space == NULL) return NO;
+ if (space == nullptr) return NO;
debug_view_disasm_source const *source = downcast<debug_view_disasm_source const *>(view->first_source());
- while ((source != NULL) && (&source->space() != space))
+ while ((source != nullptr) && (&source->space() != space))
source = downcast<debug_view_disasm_source *>(source->next());
- if (source != NULL)
+ if (source != nullptr)
{
if (view->source() != source)
{
@@ -253,7 +253,7 @@
- (void)insertSubviewItemsInMenu:(NSMenu *)menu atIndex:(NSInteger)index {
- for (const debug_view_source *source = view->source_list().first(); source != NULL; source = source->next())
+ for (const debug_view_source *source = view->source_list().first(); source != nullptr; source = source->next())
{
[[menu insertItemWithTitle:[NSString stringWithUTF8String:source->name()]
action:NULL
diff --git a/src/osd/modules/debugger/osx/disassemblyviewer.mm b/src/osd/modules/debugger/osx/disassemblyviewer.mm
index 83ca9d46c11..1254dd8a707 100644
--- a/src/osd/modules/debugger/osx/disassemblyviewer.mm
+++ b/src/osd/modules/debugger/osx/disassemblyviewer.mm
@@ -138,7 +138,7 @@
- (IBAction)debugNewMemoryWindow:(id)sender {
debug_view_disasm_source const *source = [dasmView source];
[console debugNewMemoryWindowForSpace:&source->space()
- device:&source->device()
+ device:source->device()
expression:nil];
}
@@ -146,7 +146,7 @@
- (IBAction)debugNewDisassemblyWindow:(id)sender {
debug_view_disasm_source const *source = [dasmView source];
[console debugNewDisassemblyWindowForSpace:&source->space()
- device:&source->device()
+ device:source->device()
expression:[dasmView expression]];
}
@@ -170,14 +170,14 @@
- (IBAction)debugToggleBreakpoint:(id)sender {
if ([dasmView cursorVisible])
{
- device_t &device = [dasmView source]->device();
+ device_t &device = *[dasmView source]->device();
offs_t const address = [dasmView selectedAddress];
device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device];
// if it doesn't exist, add a new one
- if (bp == NULL)
+ if (bp == nullptr)
{
- UINT32 const bpnum = device.debug()->breakpoint_set(address, NULL, NULL);
+ UINT32 const bpnum = device.debug()->breakpoint_set(address, nullptr, nullptr);
debug_console_printf(*machine, "Breakpoint %X set\n", bpnum);
}
else
@@ -197,10 +197,10 @@
- (IBAction)debugToggleBreakpointEnable:(id)sender {
if ([dasmView cursorVisible])
{
- device_t &device = [dasmView source]->device();
+ device_t &device = *[dasmView source]->device();
offs_t const address = [dasmView selectedAddress];
device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device];
- if (bp != NULL)
+ if (bp != nullptr)
{
device.debug()->breakpoint_enable(bp->index(), !bp->enabled());
debug_console_printf(*machine,
@@ -216,7 +216,7 @@
- (IBAction)debugRunToCursor:(id)sender {
if ([dasmView cursorVisible])
- [dasmView source]->device().debug()->go([dasmView selectedAddress]);
+ [dasmView source]->device()->debug()->go([dasmView selectedAddress]);
}
@@ -231,18 +231,18 @@
BOOL const inContextMenu = ([item menu] == [dasmView menu]);
BOOL const haveCursor = [dasmView cursorVisible];
- device_debug::breakpoint *breakpoint = NULL;
+ device_debug::breakpoint *breakpoint = nullptr;
if (haveCursor)
{
breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress]
- forDevice:[dasmView source]->device()];
+ forDevice:*[dasmView source]->device()];
}
if (action == @selector(debugToggleBreakpoint:))
{
if (haveCursor)
{
- if (breakpoint != NULL)
+ if (breakpoint != nullptr)
{
if (inContextMenu)
[item setTitle:@"Clear Breakpoint"];
@@ -268,7 +268,7 @@
}
else if (action == @selector(debugToggleBreakpointEnable:))
{
- if ((breakpoint != NULL) && !breakpoint->enabled())
+ if ((breakpoint != nullptr) && !breakpoint->enabled())
{
if (inContextMenu)
[item setTitle:@"Enable Breakpoint"];
@@ -282,7 +282,7 @@
else
[item setTitle:@"Disable Breakpoint at Cursor"];
}
- return breakpoint != NULL;
+ return breakpoint != nullptr;
}
else
{
diff --git a/src/osd/modules/debugger/osx/memoryview.mm b/src/osd/modules/debugger/osx/memoryview.mm
index c32476bd89b..aac06f3e63a 100644
--- a/src/osd/modules/debugger/osx/memoryview.mm
+++ b/src/osd/modules/debugger/osx/memoryview.mm
@@ -65,7 +65,7 @@
- (NSSize)maximumFrameSize {
debug_view_xy max(0, 0);
debug_view_source const *source = view->source();
- for (debug_view_source const *source = view->first_source(); source != NULL; source = source->next())
+ for (debug_view_source const *source = view->first_source(); source != nullptr; source = source->next())
{
view->set_source(*source);
debug_view_xy const current = view->total_size();
@@ -88,7 +88,7 @@
- (NSString *)selectedSubviewName {
debug_view_source const *source = view->source();
- if (source != NULL)
+ if (source != nullptr)
return [NSString stringWithUTF8String:source->name()];
else
return @"";
@@ -97,7 +97,7 @@
- (int)selectedSubviewIndex {
debug_view_source const *source = view->source();
- if (source != NULL)
+ if (source != nullptr)
return view->source_list().indexof(*source);
else
return -1;
@@ -116,7 +116,7 @@
- (BOOL)selectSubviewForDevice:(device_t *)device {
debug_view_source const *const source = view->source_for_device(device);
- if (source != NULL)
+ if (source != nullptr)
{
if (view->source() != source)
{
@@ -134,11 +134,11 @@
- (BOOL)selectSubviewForSpace:(address_space *)space {
- if (space == NULL) return NO;
+ if (space == nullptr) return NO;
debug_view_memory_source const *source = downcast<debug_view_memory_source const *>(view->first_source());
- while ((source != NULL) && (source->space() != space))
+ while ((source != nullptr) && (source->space() != space))
source = downcast<debug_view_memory_source *>(source->next());
- if (source != NULL)
+ if (source != nullptr)
{
if (view->source() != source)
{
@@ -275,7 +275,7 @@
- (void)insertSubviewItemsInMenu:(NSMenu *)menu atIndex:(NSInteger)index {
- for (const debug_view_source *source = view->source_list().first(); source != NULL; source = source->next())
+ for (const debug_view_source *source = view->source_list().first(); source != nullptr; source = source->next())
{
[[menu insertItemWithTitle:[NSString stringWithUTF8String:source->name()]
action:NULL
diff --git a/src/osd/modules/debugger/osx/registersview.mm b/src/osd/modules/debugger/osx/registersview.mm
index 7e6cfd2dd7a..c1e7dc8dce6 100644
--- a/src/osd/modules/debugger/osx/registersview.mm
+++ b/src/osd/modules/debugger/osx/registersview.mm
@@ -32,7 +32,7 @@
const debug_view_source *source = view->source_for_device(curcpu);
max.x = max.y = 0;
- for (const debug_view_source *source = view->source_list().first(); source != NULL; source = source->next())
+ for (const debug_view_source *source = view->source_list().first(); source != nullptr; source = source->next())
{
debug_view_xy current;
view->set_source(*source);
diff --git a/src/osd/modules/debugger/qt/breakpointswindow.cpp b/src/osd/modules/debugger/qt/breakpointswindow.cpp
index 7b30459c8e9..3875d594391 100644
--- a/src/osd/modules/debugger/qt/breakpointswindow.cpp
+++ b/src/osd/modules/debugger/qt/breakpointswindow.cpp
@@ -15,11 +15,11 @@
BreakpointsWindow::BreakpointsWindow(running_machine* machine, QWidget* parent) :
- WindowQt(machine, NULL)
+ WindowQt(machine, nullptr)
{
setWindowTitle("Debug: All Breakpoints");
- if (parent != NULL)
+ if (parent != nullptr)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400);
@@ -75,7 +75,7 @@ void BreakpointsWindow::typeChanged(QAction* changedTo)
{
// Clean
delete m_breakpointsView;
- m_breakpointsView = NULL;
+ m_breakpointsView = nullptr;
// Create
if (changedTo->text() == "Breakpoints")
diff --git a/src/osd/modules/debugger/qt/breakpointswindow.h b/src/osd/modules/debugger/qt/breakpointswindow.h
index 6c4335e334c..a45781ea5ce 100644
--- a/src/osd/modules/debugger/qt/breakpointswindow.h
+++ b/src/osd/modules/debugger/qt/breakpointswindow.h
@@ -15,7 +15,7 @@ class BreakpointsWindow : public WindowQt
Q_OBJECT
public:
- BreakpointsWindow(running_machine* machine, QWidget* parent=NULL);
+ BreakpointsWindow(running_machine* machine, QWidget* parent=nullptr);
virtual ~BreakpointsWindow();
diff --git a/src/osd/modules/debugger/qt/dasmwindow.cpp b/src/osd/modules/debugger/qt/dasmwindow.cpp
index 3a430f67a84..3cd1dca65ac 100644
--- a/src/osd/modules/debugger/qt/dasmwindow.cpp
+++ b/src/osd/modules/debugger/qt/dasmwindow.cpp
@@ -14,11 +14,11 @@
DasmWindow::DasmWindow(running_machine* machine, QWidget* parent) :
- WindowQt(machine, NULL)
+ WindowQt(machine, nullptr)
{
setWindowTitle("Debug: Disassembly View");
- if (parent != NULL)
+ if (parent != nullptr)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400);
@@ -144,7 +144,7 @@ void DasmWindow::toggleBreakpointAtCursor(bool changedTo)
// Find an existing breakpoint at this address
INT32 bpindex = -1;
for (device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
- bp != NULL;
+ bp != nullptr;
bp = bp->next())
{
if (address == bp->address())
@@ -157,7 +157,7 @@ void DasmWindow::toggleBreakpointAtCursor(bool changedTo)
// If none exists, add a new one
if (bpindex == -1)
{
- bpindex = cpuinfo->breakpoint_set(address, NULL, NULL);
+ bpindex = cpuinfo->breakpoint_set(address, nullptr, nullptr);
debug_console_printf(*m_machine, "Breakpoint %X set\n", bpindex);
}
else
@@ -183,10 +183,10 @@ void DasmWindow::enableBreakpointAtCursor(bool changedTo)
// Find an existing breakpoint at this address
device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
- while ((bp != NULL) && (bp->address() != address))
+ while ((bp != nullptr) && (bp->address() != address))
bp = bp->next();
- if (bp != NULL)
+ if (bp != nullptr)
{
cpuinfo->breakpoint_enable(bp->index(), !bp->enabled());
debug_console_printf(*m_machine, "Breakpoint %X %s\n", (UINT32)bp->index(), bp->enabled() ? "enabled" : "disabled");
@@ -241,10 +241,10 @@ void DasmWindow::dasmViewUpdated()
// Find an existing breakpoint at this address
device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
- while ((bp != NULL) && (bp->address() != address))
+ while ((bp != nullptr) && (bp->address() != address))
bp = bp->next();
- if (bp != NULL)
+ if (bp != nullptr)
{
haveBreakpoint = true;
breakpointEnabled = bp->enabled();
@@ -261,7 +261,7 @@ void DasmWindow::dasmViewUpdated()
void DasmWindow::populateComboBox()
{
- if (m_dasmView == NULL)
+ if (m_dasmView == nullptr)
return;
m_cpuComboBox->clear();
diff --git a/src/osd/modules/debugger/qt/dasmwindow.h b/src/osd/modules/debugger/qt/dasmwindow.h
index 44368c4e11f..021c72fd2fd 100644
--- a/src/osd/modules/debugger/qt/dasmwindow.h
+++ b/src/osd/modules/debugger/qt/dasmwindow.h
@@ -18,7 +18,7 @@ class DasmWindow : public WindowQt
Q_OBJECT
public:
- DasmWindow(running_machine* machine, QWidget* parent=NULL);
+ DasmWindow(running_machine* machine, QWidget* parent=nullptr);
virtual ~DasmWindow();
diff --git a/src/osd/modules/debugger/qt/debuggerview.cpp b/src/osd/modules/debugger/qt/debuggerview.cpp
index 319ee370392..f1d66abee42 100644
--- a/src/osd/modules/debugger/qt/debuggerview.cpp
+++ b/src/osd/modules/debugger/qt/debuggerview.cpp
@@ -15,7 +15,7 @@ DebuggerView::DebuggerView(const debug_view_type& type,
QWidget* parent) :
QAbstractScrollArea(parent),
m_preferBottom(false),
- m_view(NULL),
+ m_view(nullptr),
m_machine(machine)
{
// I like setting the font per-view since it doesn't override the menuing fonts.
@@ -163,7 +163,7 @@ void DebuggerView::paintEvent(QPaintEvent* event)
void DebuggerView::keyPressEvent(QKeyEvent* event)
{
- if (m_view == NULL)
+ if (m_view == nullptr)
return QWidget::keyPressEvent(event);
Qt::KeyboardModifiers keyMods = QApplication::keyboardModifiers();
@@ -233,7 +233,7 @@ void DebuggerView::keyPressEvent(QKeyEvent* event)
void DebuggerView::mousePressEvent(QMouseEvent* event)
{
- if (m_view == NULL)
+ if (m_view == nullptr)
return;
if (event->button() == Qt::LeftButton)
diff --git a/src/osd/modules/debugger/qt/debuggerview.h b/src/osd/modules/debugger/qt/debuggerview.h
index 7b1aed6fd2c..2e1f35eb306 100644
--- a/src/osd/modules/debugger/qt/debuggerview.h
+++ b/src/osd/modules/debugger/qt/debuggerview.h
@@ -15,7 +15,7 @@ class DebuggerView : public QAbstractScrollArea
public:
DebuggerView(const debug_view_type& type,
running_machine* machine,
- QWidget* parent=NULL);
+ QWidget* parent=nullptr);
virtual ~DebuggerView();
void paintEvent(QPaintEvent* event);
diff --git a/src/osd/modules/debugger/qt/deviceinformationwindow.cpp b/src/osd/modules/debugger/qt/deviceinformationwindow.cpp
index 12a286ff2b6..acdddc13fbb 100644
--- a/src/osd/modules/debugger/qt/deviceinformationwindow.cpp
+++ b/src/osd/modules/debugger/qt/deviceinformationwindow.cpp
@@ -8,11 +8,11 @@
DeviceInformationWindow::DeviceInformationWindow(running_machine* machine, device_t* device, QWidget* parent) :
- WindowQt(machine, NULL)
+ WindowQt(machine, nullptr)
{
m_device = device;
- if (parent != NULL)
+ if (parent != nullptr)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 600, 400);
diff --git a/src/osd/modules/debugger/qt/deviceinformationwindow.h b/src/osd/modules/debugger/qt/deviceinformationwindow.h
index b0d9898488a..c7a4c05204d 100644
--- a/src/osd/modules/debugger/qt/deviceinformationwindow.h
+++ b/src/osd/modules/debugger/qt/deviceinformationwindow.h
@@ -13,7 +13,7 @@ class DeviceInformationWindow : public WindowQt
Q_OBJECT
public:
- DeviceInformationWindow(running_machine* machine, device_t* device = NULL, QWidget* parent=NULL);
+ DeviceInformationWindow(running_machine* machine, device_t* device = nullptr, QWidget* parent=nullptr);
virtual ~DeviceInformationWindow();
void set_device(const char *tag);
diff --git a/src/osd/modules/debugger/qt/deviceswindow.cpp b/src/osd/modules/debugger/qt/deviceswindow.cpp
index a4d4d74fc3b..18845f15074 100644
--- a/src/osd/modules/debugger/qt/deviceswindow.cpp
+++ b/src/osd/modules/debugger/qt/deviceswindow.cpp
@@ -46,7 +46,7 @@ QModelIndex DevicesWindowModel::index(int row, int column, const QModelIndex &pa
if(!hasIndex(row, column, parent))
return QModelIndex();
- device_t *target = NULL;
+ device_t *target = nullptr;
if(!parent.isValid()) {
if(row == 0)
@@ -102,14 +102,14 @@ int DevicesWindowModel::columnCount(const QModelIndex &parent) const
DevicesWindow::DevicesWindow(running_machine* machine, QWidget* parent) :
- WindowQt(machine, NULL),
+ WindowQt(machine, nullptr),
m_devices_model(machine)
{
- m_selected_device = NULL;
+ m_selected_device = nullptr;
setWindowTitle("Debug: All Devices");
- if (parent != NULL)
+ if (parent != nullptr)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 600, 400);
diff --git a/src/osd/modules/debugger/qt/deviceswindow.h b/src/osd/modules/debugger/qt/deviceswindow.h
index 13965b9dce5..3064354fd2e 100644
--- a/src/osd/modules/debugger/qt/deviceswindow.h
+++ b/src/osd/modules/debugger/qt/deviceswindow.h
@@ -42,7 +42,7 @@ class DevicesWindow : public WindowQt
Q_OBJECT
public:
- DevicesWindow(running_machine* machine, QWidget* parent=NULL);
+ DevicesWindow(running_machine* machine, QWidget* parent=nullptr);
virtual ~DevicesWindow();
public slots:
diff --git a/src/osd/modules/debugger/qt/logwindow.cpp b/src/osd/modules/debugger/qt/logwindow.cpp
index b6e704cd5c6..704a029e5ac 100644
--- a/src/osd/modules/debugger/qt/logwindow.cpp
+++ b/src/osd/modules/debugger/qt/logwindow.cpp
@@ -10,11 +10,11 @@
LogWindow::LogWindow(running_machine* machine, QWidget* parent) :
- WindowQt(machine, NULL)
+ WindowQt(machine, nullptr)
{
setWindowTitle("Debug: Machine Log");
- if (parent != NULL)
+ if (parent != nullptr)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400);
diff --git a/src/osd/modules/debugger/qt/logwindow.h b/src/osd/modules/debugger/qt/logwindow.h
index a406cfb8eb3..1c3b18d38bb 100644
--- a/src/osd/modules/debugger/qt/logwindow.h
+++ b/src/osd/modules/debugger/qt/logwindow.h
@@ -15,7 +15,7 @@ class LogWindow : public WindowQt
Q_OBJECT
public:
- LogWindow(running_machine* machine, QWidget* parent=NULL);
+ LogWindow(running_machine* machine, QWidget* parent=nullptr);
virtual ~LogWindow();
diff --git a/src/osd/modules/debugger/qt/mainwindow.cpp b/src/osd/modules/debugger/qt/mainwindow.cpp
index aeca1d20b63..e366ba77247 100644
--- a/src/osd/modules/debugger/qt/mainwindow.cpp
+++ b/src/osd/modules/debugger/qt/mainwindow.cpp
@@ -16,7 +16,7 @@
MainWindow::MainWindow(running_machine* machine, QWidget* parent) :
- WindowQt(machine, NULL),
+ WindowQt(machine, nullptr),
m_historyIndex(0),
m_inputHistory()
{
@@ -92,7 +92,7 @@ MainWindow::MainWindow(running_machine* machine, QWidget* parent) :
// Images menu
//
image_interface_iterator imageIterTest(m_machine->root_device());
- if (imageIterTest.first() != NULL)
+ if (imageIterTest.first() != nullptr)
{
createImagesMenu();
}
@@ -163,7 +163,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
bool MainWindow::eventFilter(QObject* obj, QEvent* event)
{
// Only filter keypresses
- QKeyEvent* keyEvent = NULL;
+ QKeyEvent* keyEvent = nullptr;
if (event->type() == QEvent::KeyPress)
{
keyEvent = static_cast<QKeyEvent*>(event);
@@ -221,7 +221,7 @@ void MainWindow::toggleBreakpointAtCursor(bool changedTo)
// Find an existing breakpoint at this address
INT32 bpindex = -1;
for (device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
- bp != NULL;
+ bp != nullptr;
bp = bp->next())
{
if (address == bp->address())
@@ -258,10 +258,10 @@ void MainWindow::enableBreakpointAtCursor(bool changedTo)
// Find an existing breakpoint at this address
device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
- while ((bp != NULL) && (bp->address() != address))
+ while ((bp != nullptr) && (bp->address() != address))
bp = bp->next();
- if (bp != NULL)
+ if (bp != nullptr)
{
INT32 const bpindex = bp->index();
std::string command = string_format(bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", bpindex);
@@ -346,7 +346,7 @@ void MainWindow::mountImage(bool changedTo)
const int imageIndex = dynamic_cast<QAction*>(sender())->data().toInt();
image_interface_iterator iter(m_machine->root_device());
device_image_interface *img = iter.byindex(imageIndex);
- if (img == NULL)
+ if (img == nullptr)
{
debug_console_printf(*m_machine, "Something is wrong with the mount menu.\n");
refreshAll();
@@ -420,10 +420,10 @@ void MainWindow::dasmViewUpdated()
// Find an existing breakpoint at this address
device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
- while ((bp != NULL) && (bp->address() != address))
+ while ((bp != nullptr) && (bp->address() != address))
bp = bp->next();
- if (bp != NULL)
+ if (bp != nullptr)
{
haveBreakpoint = true;
breakpointEnabled = bp->enabled();
diff --git a/src/osd/modules/debugger/qt/mainwindow.h b/src/osd/modules/debugger/qt/mainwindow.h
index 4a93608772f..2c8e7feee67 100644
--- a/src/osd/modules/debugger/qt/mainwindow.h
+++ b/src/osd/modules/debugger/qt/mainwindow.h
@@ -26,7 +26,7 @@ class MainWindow : public WindowQt
Q_OBJECT
public:
- MainWindow(running_machine* machine, QWidget* parent=NULL);
+ MainWindow(running_machine* machine, QWidget* parent=nullptr);
virtual ~MainWindow();
void setProcessor(device_t* processor);
@@ -87,7 +87,7 @@ class DasmDockWidget : public QWidget
Q_OBJECT
public:
- DasmDockWidget(running_machine* machine, QWidget* parent=NULL) :
+ DasmDockWidget(running_machine* machine, QWidget* parent=nullptr) :
QWidget(parent),
m_machine(machine)
{
@@ -138,9 +138,9 @@ class ProcessorDockWidget : public QWidget
public:
ProcessorDockWidget(running_machine* machine,
- QWidget* parent=NULL) :
+ QWidget* parent=nullptr) :
QWidget(parent),
- m_processorView(NULL),
+ m_processorView(nullptr),
m_machine(machine)
{
m_processorView = new DebuggerView(DVT_STATE,
diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp
index 7b86740fe51..9d10dbb5024 100644
--- a/src/osd/modules/debugger/qt/memorywindow.cpp
+++ b/src/osd/modules/debugger/qt/memorywindow.cpp
@@ -19,11 +19,11 @@
MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) :
- WindowQt(machine, NULL)
+ WindowQt(machine, nullptr)
{
setWindowTitle("Debug: Memory View");
- if (parent != NULL)
+ if (parent != nullptr)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400);
@@ -278,7 +278,7 @@ void MemoryWindow::decreaseBytesPerLine(bool checked)
void MemoryWindow::populateComboBox()
{
- if (m_memTable == NULL)
+ if (m_memTable == nullptr)
return;
m_memoryComboBox->clear();
@@ -312,7 +312,7 @@ QAction* MemoryWindow::dataFormatMenuItem(const QString& itemName)
return actions[j];
}
}
- return NULL;
+ return nullptr;
}
@@ -357,7 +357,7 @@ void DebuggerMemView::mousePressEvent(QMouseEvent* event)
{
// TODO: You can specify a box that the tooltip stays alive within - might be good?
const QString addressAndPc = QString("Address %1 written at PC=%2").arg(address, 2, 16).arg(pc, 2, 16);
- QToolTip::showText(QCursor::pos(), addressAndPc, NULL);
+ QToolTip::showText(QCursor::pos(), addressAndPc, nullptr);
// Copy the PC into the clipboard as well
QClipboard *clipboard = QApplication::clipboard();
@@ -365,7 +365,7 @@ void DebuggerMemView::mousePressEvent(QMouseEvent* event)
}
else
{
- QToolTip::showText(QCursor::pos(), "UNKNOWN PC", NULL);
+ QToolTip::showText(QCursor::pos(), "UNKNOWN PC", nullptr);
}
}
diff --git a/src/osd/modules/debugger/qt/memorywindow.h b/src/osd/modules/debugger/qt/memorywindow.h
index d5fb74f677a..7663787e890 100644
--- a/src/osd/modules/debugger/qt/memorywindow.h
+++ b/src/osd/modules/debugger/qt/memorywindow.h
@@ -20,7 +20,7 @@ class MemoryWindow : public WindowQt
Q_OBJECT
public:
- MemoryWindow(running_machine* machine, QWidget* parent=NULL);
+ MemoryWindow(running_machine* machine, QWidget* parent=nullptr);
virtual ~MemoryWindow();
@@ -56,7 +56,7 @@ class DebuggerMemView : public DebuggerView
public:
DebuggerMemView(const debug_view_type& type,
running_machine* machine,
- QWidget* parent=NULL)
+ QWidget* parent=nullptr)
: DebuggerView(type, machine, parent)
{}
virtual ~DebuggerMemView() {}
diff --git a/src/osd/modules/debugger/qt/windowqt.cpp b/src/osd/modules/debugger/qt/windowqt.cpp
index adaf96ab2e1..a18fd9885b6 100644
--- a/src/osd/modules/debugger/qt/windowqt.cpp
+++ b/src/osd/modules/debugger/qt/windowqt.cpp
@@ -15,7 +15,7 @@ bool WindowQt::s_hideAll = false;
// Since all debug windows are intended to be top-level, this inherited
-// constructor is always called with a NULL parent. The passed-in parent widget,
+// constructor is always called with a nullptr parent. The passed-in parent widget,
// however, is often used to place each child window & the code to do this can
// be found in most of the inherited classes.
diff --git a/src/osd/modules/debugger/qt/windowqt.h b/src/osd/modules/debugger/qt/windowqt.h
index e2e334792b2..881d5716db1 100644
--- a/src/osd/modules/debugger/qt/windowqt.h
+++ b/src/osd/modules/debugger/qt/windowqt.h
@@ -18,7 +18,7 @@ class WindowQt : public QMainWindow
Q_OBJECT
public:
- WindowQt(running_machine* machine, QWidget* parent=NULL);
+ WindowQt(running_machine* machine, QWidget* parent=nullptr);
virtual ~WindowQt();
// The interface to an all-window refresh
diff --git a/src/osd/modules/debugger/win/consolewininfo.cpp b/src/osd/modules/debugger/win/consolewininfo.cpp
index cdd84efeb47..89c3061c688 100644
--- a/src/osd/modules/debugger/win/consolewininfo.cpp
+++ b/src/osd/modules/debugger/win/consolewininfo.cpp
@@ -20,10 +20,10 @@
consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
- disasmbasewin_info(debugger, true, "Debug", NULL),
- m_devices_menu(NULL)
+ disasmbasewin_info(debugger, true, "Debug", nullptr),
+ m_devices_menu(nullptr)
{
- if ((window() == NULL) || (m_views[0] == NULL))
+ if ((window() == nullptr) || (m_views[0] == nullptr))
goto cleanup;
// create the views
@@ -43,7 +43,7 @@ consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
for (device_image_interface &img : iter)
{
TCHAR *tc_buf = tstring_from_utf8(string_format("%s : %s", img.device().name(), img.exists() ? img.filename() : "[no image]").c_str());
- if (tc_buf != NULL)
+ if (tc_buf != nullptr)
{
AppendMenu(m_devices_menu, MF_ENABLED, 0, tc_buf);
osd_free(tc_buf);
@@ -159,7 +159,7 @@ void consolewin_info::update_menu()
{
disasmbasewin_info::update_menu();
- if (m_devices_menu != NULL)
+ if (m_devices_menu != nullptr)
{
// create the image menu
UINT32 cnt = 0;
@@ -186,7 +186,7 @@ void consolewin_info::update_menu()
if (img.device().type() == CASSETTE)
{
cassette_state const state = (cassette_state)(img.exists() ? (downcast<cassette_image_device *>(&img.device())->get_state() & CASSETTE_MASK_UISTATE) : CASSETTE_STOPPED);
- AppendMenu(devicesubmenu, MF_SEPARATOR, 0, NULL);
+ AppendMenu(devicesubmenu, MF_SEPARATOR, 0, nullptr);
AppendMenu(devicesubmenu, flags_for_exists | ((state == CASSETTE_STOPPED) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_STOPPAUSE, TEXT("Pause/Stop"));
AppendMenu(devicesubmenu, flags_for_exists | ((state == CASSETTE_PLAY) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_PLAY, TEXT("Play"));
AppendMenu(devicesubmenu, flags_for_writing | ((state == CASSETTE_RECORD) ? MF_CHECKED : 0), new_item + DEVOPTION_CASSETTE_RECORD, TEXT("Record"));
@@ -195,7 +195,7 @@ void consolewin_info::update_menu()
}
TCHAR *tc_buf = tstring_from_utf8(string_format("%s :%s", img.device().name(), img.exists() ? img.filename() : "[empty slot]").c_str());
- if (tc_buf != NULL)
+ if (tc_buf != nullptr)
{
ModifyMenu(m_devices_menu, cnt, MF_BYPOSITION | MF_POPUP, (UINT_PTR)devicesubmenu, tc_buf);
osd_free(tc_buf);
@@ -214,7 +214,7 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam)
UINT32 const devid = (LOWORD(wparam) - ID_DEVICE_OPTIONS) / DEVOPTION_MAX;
image_interface_iterator iter(machine().root_device());
device_image_interface *const img = iter.byindex(devid);
- if (img != NULL)
+ if (img != nullptr)
{
switch ((LOWORD(wparam) - ID_DEVICE_OPTIONS) % DEVOPTION_MAX)
{
@@ -237,21 +237,21 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam)
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
- ofn.hwndOwner = NULL;
+ ofn.hwndOwner = nullptr;
ofn.lpstrFile = selectedFilename;
ofn.lpstrFile[0] = '\0';
ofn.nMaxFile = MAX_PATH;
ofn.lpstrFilter = t_filter;
ofn.nFilterIndex = 1;
- ofn.lpstrFileTitle = NULL;
+ ofn.lpstrFileTitle = nullptr;
ofn.nMaxFileTitle = 0;
- ofn.lpstrInitialDir = NULL;
+ ofn.lpstrInitialDir = nullptr;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
if (GetOpenFileName(&ofn))
{
char *utf8_buf = utf8_from_tstring(selectedFilename);
- if (utf8_buf != NULL)
+ if (utf8_buf != nullptr)
{
img->load(utf8_buf);
osd_free(utf8_buf);
diff --git a/src/osd/modules/debugger/win/debugviewinfo.cpp b/src/osd/modules/debugger/win/debugviewinfo.cpp
index 3f355cf8a34..01a300f0733 100644
--- a/src/osd/modules/debugger/win/debugviewinfo.cpp
+++ b/src/osd/modules/debugger/win/debugviewinfo.cpp
@@ -41,53 +41,53 @@ bool debugview_info::s_window_class_registered = false;
debugview_info::debugview_info(debugger_windows_interface &debugger, debugwin_info &owner, HWND parent, debug_view_type type) :
debugbase_info(debugger),
m_owner(owner),
- m_view(NULL),
- m_wnd(NULL),
- m_hscroll(NULL),
- m_vscroll(NULL)
+ m_view(nullptr),
+ m_wnd(nullptr),
+ m_hscroll(nullptr),
+ m_vscroll(nullptr)
{
register_window_class();
// create the child view
- m_wnd = CreateWindowEx(DEBUG_VIEW_STYLE_EX, TEXT("MAMEDebugView"), NULL, DEBUG_VIEW_STYLE,
- 0, 0, 100, 100, parent, NULL, GetModuleHandleUni(), this);
- if (m_wnd == NULL)
+ m_wnd = CreateWindowEx(DEBUG_VIEW_STYLE_EX, TEXT("MAMEDebugView"), nullptr, DEBUG_VIEW_STYLE,
+ 0, 0, 100, 100, parent, nullptr, GetModuleHandleUni(), this);
+ if (m_wnd == nullptr)
goto cleanup;
// create the scroll bars
- m_hscroll = CreateWindowEx(HSCROLL_STYLE_EX, TEXT("SCROLLBAR"), NULL, HSCROLL_STYLE,
- 0, 0, 100, CW_USEDEFAULT, m_wnd, NULL, GetModuleHandleUni(), this);
- m_vscroll = CreateWindowEx(VSCROLL_STYLE_EX, TEXT("SCROLLBAR"), NULL, VSCROLL_STYLE,
- 0, 0, CW_USEDEFAULT, 100, m_wnd, NULL, GetModuleHandleUni(), this);
- if ((m_hscroll == NULL) || (m_vscroll == NULL))
+ m_hscroll = CreateWindowEx(HSCROLL_STYLE_EX, TEXT("SCROLLBAR"), nullptr, HSCROLL_STYLE,
+ 0, 0, 100, CW_USEDEFAULT, m_wnd, nullptr, GetModuleHandleUni(), this);
+ m_vscroll = CreateWindowEx(VSCROLL_STYLE_EX, TEXT("SCROLLBAR"), nullptr, VSCROLL_STYLE,
+ 0, 0, CW_USEDEFAULT, 100, m_wnd, nullptr, GetModuleHandleUni(), this);
+ if ((m_hscroll == nullptr) || (m_vscroll == nullptr))
goto cleanup;
// create the debug view
m_view = machine().debug_view().alloc_view(type, &debugview_info::static_update, this);
- if (m_view == NULL)
+ if (m_view == nullptr)
goto cleanup;
return;
cleanup:
- if (m_hscroll != NULL)
+ if (m_hscroll != nullptr)
DestroyWindow(m_hscroll);
- m_hscroll = NULL;
- if (m_vscroll != NULL)
+ m_hscroll = nullptr;
+ if (m_vscroll != nullptr)
DestroyWindow(m_vscroll);
- m_vscroll = NULL;
- if (m_wnd != NULL)
+ m_vscroll = nullptr;
+ if (m_wnd != nullptr)
DestroyWindow(m_wnd);
- m_wnd = NULL;
- if (m_view != NULL)
+ m_wnd = nullptr;
+ if (m_view != nullptr)
machine().debug_view().free_view(*m_view);
- m_view = NULL;
+ m_view = nullptr;
}
debugview_info::~debugview_info()
{
- if (m_wnd != NULL)
+ if (m_wnd != nullptr)
DestroyWindow(m_wnd);
if (m_view)
machine().debug_view().free_view(*m_view);
@@ -117,7 +117,7 @@ UINT32 debugview_info::maxwidth()
if (max < chars)
max = chars;
}
- if (cursource != NULL)
+ if (cursource != nullptr)
m_view->set_source(*cursource);
return (max * metrics().debug_font_width()) + metrics().vscroll_width();
}
@@ -179,10 +179,10 @@ void debugview_info::send_pagedown()
char const *debugview_info::source_name() const
{
- if (m_view != NULL)
+ if (m_view != nullptr)
{
debug_view_source const *const source = m_view->source();
- if (source != NULL)
+ if (source != nullptr)
return source->name();
}
return "";
@@ -191,22 +191,22 @@ char const *debugview_info::source_name() const
device_t *debugview_info::source_device() const
{
- if (m_view != NULL)
+ if (m_view != nullptr)
{
debug_view_source const *const source = m_view->source();
- if (source != NULL)
+ if (source != nullptr)
return source->device();
}
- return NULL;
+ return nullptr;
}
bool debugview_info::source_is_visible_cpu() const
{
- if (m_view != NULL)
+ if (m_view != nullptr)
{
const debug_view_source *const source = m_view->source();
- return (source != NULL) && (debug_cpu_get_visible_cpu(machine()) == source->device());
+ return (source != nullptr) && (debug_cpu_get_visible_cpu(machine()) == source->device());
}
return false;
}
@@ -214,10 +214,10 @@ bool debugview_info::source_is_visible_cpu() const
bool debugview_info::set_source_index(int index)
{
- if (m_view != NULL)
+ if (m_view != nullptr)
{
const debug_view_source *const source = m_view->source_list().find(index);
- if (source != NULL)
+ if (source != nullptr)
{
m_view->set_source(*source);
return true;
@@ -229,10 +229,10 @@ bool debugview_info::set_source_index(int index)
bool debugview_info::set_source_for_device(device_t &device)
{
- if (m_view != NULL)
+ if (m_view != nullptr)
{
const debug_view_source *const source = m_view->source_for_device(&device);
- if (source != NULL)
+ if (source != nullptr)
{
m_view->set_source(*source);
return true;
@@ -245,7 +245,7 @@ bool debugview_info::set_source_for_device(device_t &device)
bool debugview_info::set_source_for_visible_cpu()
{
device_t *const curcpu = debug_cpu_get_visible_cpu(machine());
- if (curcpu != NULL)
+ if (curcpu != nullptr)
return set_source_for_device(*curcpu);
else
return false;
@@ -255,15 +255,15 @@ bool debugview_info::set_source_for_visible_cpu()
HWND debugview_info::create_source_combobox(HWND parent, LONG_PTR userdata)
{
// create a combo box
- HWND const result = CreateWindowEx(COMBO_BOX_STYLE_EX, TEXT("COMBOBOX"), NULL, COMBO_BOX_STYLE,
- 0, 0, 100, 1000, parent, NULL, GetModuleHandleUni(), NULL);
+ HWND const result = CreateWindowEx(COMBO_BOX_STYLE_EX, TEXT("COMBOBOX"), nullptr, COMBO_BOX_STYLE,
+ 0, 0, 100, 1000, parent, nullptr, GetModuleHandleUni(), nullptr);
SetWindowLongPtr(result, GWLP_USERDATA, userdata);
SendMessage(result, WM_SETFONT, (WPARAM)metrics().debug_font(), (LPARAM)FALSE);
// populate the combobox
debug_view_source const *const cursource = m_view->source();
int maxlength = 0;
- for (debug_view_source const *source = m_view->first_source(); source != NULL; source = source->next())
+ for (debug_view_source const *source = m_view->first_source(); source != nullptr; source = source->next())
{
int const length = strlen(source->name());
if (length > maxlength)
@@ -272,7 +272,7 @@ HWND debugview_info::create_source_combobox(HWND parent, LONG_PTR userdata)
SendMessage(result, CB_ADDSTRING, 0, (LPARAM)t_name);
osd_free(t_name);
}
- if (cursource != NULL)
+ if (cursource != nullptr)
{
SendMessage(result, CB_SETCURSEL, m_view->source_list().indexof(*cursource), 0);
SendMessage(result, CB_SETDROPPEDWIDTH, ((maxlength + 2) * metrics().debug_font_width()) + metrics().vscroll_width(), 0);
@@ -293,10 +293,10 @@ void debugview_info::draw_contents(HDC windc)
// create a compatible DC and an offscreen bitmap
HDC const dc = CreateCompatibleDC(windc);
- if (dc == NULL)
+ if (dc == nullptr)
return;
HBITMAP const bitmap = CreateCompatibleBitmap(windc, client.right, client.bottom);
- if (bitmap == NULL)
+ if (bitmap == nullptr)
{
DeleteDC(dc);
return;
@@ -317,7 +317,7 @@ void debugview_info::draw_contents(HDC windc)
{
COLORREF fgcolor;
COLORREF bgcolor = RGB(0xff,0xff,0xff);
- HBRUSH bgbrush = NULL;
+ HBRUSH bgbrush = nullptr;
int last_attrib = -1;
TCHAR buffer[256];
int count = 0;
@@ -362,7 +362,7 @@ void debugview_info::draw_contents(HDC windc)
if (iter == 0)
FillRect(dc, &bounds, bgbrush);
else
- ExtTextOut(dc, bounds.left, bounds.top, 0, NULL, buffer, count, NULL);
+ ExtTextOut(dc, bounds.left, bounds.top, 0, nullptr, buffer, count, nullptr);
bounds.left = bounds.right;
count = 0;
}
@@ -389,7 +389,7 @@ void debugview_info::draw_contents(HDC windc)
if (iter == 0)
FillRect(dc, &bounds, bgbrush);
else
- ExtTextOut(dc, bounds.left, bounds.top, 0, NULL, buffer, count, NULL);
+ ExtTextOut(dc, bounds.left, bounds.top, 0, nullptr, buffer, count, nullptr);
}
// erase to the end of the line
@@ -505,7 +505,7 @@ void debugview_info::update()
m_view->set_visible_position(topleft);
// invalidate the bounds
- InvalidateRect(m_wnd, NULL, FALSE);
+ InvalidateRect(m_wnd, nullptr, FALSE);
// adjust the bounds of the scrollbars and show/hide them
if (m_vscroll)
@@ -775,10 +775,10 @@ LRESULT CALLBACK debugview_info::static_view_proc(HWND wnd, UINT message, WPARAM
}
debugview_info *const info = (debugview_info *)(FPTR)GetWindowLongPtr(wnd, GWLP_USERDATA);
- if (info == NULL)
+ if (info == nullptr)
return DefWindowProc(wnd, message, wparam, lparam);
- assert((info->m_wnd == wnd) || (info->m_wnd == NULL));
+ assert((info->m_wnd == wnd) || (info->m_wnd == nullptr));
return info->view_proc(message, wparam, lparam);
}
@@ -793,10 +793,10 @@ void debugview_info::register_window_class()
wc.lpszClassName = TEXT("MAMEDebugView");
wc.hInstance = GetModuleHandleUni();
wc.lpfnWndProc = &debugview_info::static_view_proc;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
- wc.lpszMenuName = NULL;
- wc.hbrBackground = NULL;
+ wc.lpszMenuName = nullptr;
+ wc.hbrBackground = nullptr;
wc.style = 0;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
diff --git a/src/osd/modules/debugger/win/debugviewinfo.h b/src/osd/modules/debugger/win/debugviewinfo.h
index ec4eedf2e69..f3ef5f2cfe6 100644
--- a/src/osd/modules/debugger/win/debugviewinfo.h
+++ b/src/osd/modules/debugger/win/debugviewinfo.h
@@ -35,7 +35,7 @@ public:
void send_vscroll(int delta);
void send_pageup();
void send_pagedown();
- void set_focus() { SetFocus(m_wnd); }
+ void set_focus() const { SetFocus(m_wnd); }
debug_view_type type() const { return m_view->type(); }
debug_view_xy total_size() const { return m_view->total_size(); }
diff --git a/src/osd/modules/debugger/win/debugwininfo.cpp b/src/osd/modules/debugger/win/debugwininfo.cpp
index 1e75b464b72..d46b5a1d79c 100644
--- a/src/osd/modules/debugger/win/debugwininfo.cpp
+++ b/src/osd/modules/debugger/win/debugwininfo.cpp
@@ -23,8 +23,8 @@ bool debugwin_info::s_window_class_registered = false;
debugwin_info::debugwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler) :
debugbase_info(debugger),
m_is_main_console(is_main_console),
- m_next(NULL),
- m_wnd(NULL),
+ m_next(nullptr),
+ m_wnd(nullptr),
m_handler(handler),
m_minwidth(200),
m_maxwidth(0),
@@ -36,7 +36,7 @@ debugwin_info::debugwin_info(debugger_windows_interface &debugger, bool is_main_
m_wnd = win_create_window_ex_utf8(DEBUG_WINDOW_STYLE_EX, "MAMEDebugWindow", title, DEBUG_WINDOW_STYLE,
0, 0, 100, 100, win_window_list.front()->platform_window<HWND>(), create_standard_menubar(), GetModuleHandleUni(), this);
- if (m_wnd == NULL)
+ if (m_wnd == nullptr)
return;
RECT work_bounds;
@@ -70,7 +70,7 @@ void debugwin_info::prev_view(debugview_info *curview)
int numviews;
for (numviews = 0; numviews < MAX_VIEWS; numviews++)
{
- if (m_views[numviews] == NULL)
+ if (m_views[numviews] == nullptr)
break;
}
@@ -100,7 +100,7 @@ void debugwin_info::prev_view(debugview_info *curview)
// negative numbers mean the focuswnd
break;
}
- else if (curindex >= 0 && m_views[curindex] != NULL && m_views[curindex]->cursor_supported())
+ else if (curindex >= 0 && m_views[curindex] != nullptr && m_views[curindex]->cursor_supported())
{
// positive numbers mean a view
m_views[curindex]->set_focus();
@@ -116,7 +116,7 @@ void debugwin_info::next_view(debugview_info *curview)
int numviews;
for (numviews = 0; numviews < MAX_VIEWS; numviews++)
{
- if (m_views[numviews] == NULL)
+ if (m_views[numviews] == nullptr)
break;
}
@@ -144,7 +144,7 @@ void debugwin_info::next_view(debugview_info *curview)
// negative numbers mean the focuswnd
break;
}
- else if (curindex >= 0 && m_views[curindex] != NULL && m_views[curindex]->cursor_supported())
+ else if (curindex >= 0 && m_views[curindex] != nullptr && m_views[curindex]->cursor_supported())
{
// positive numbers mean a view
m_views[curindex]->set_focus();
@@ -248,7 +248,7 @@ bool debugwin_info::handle_key(WPARAM wparam, LPARAM lparam)
void debugwin_info::recompute_children()
{
- if (m_views[0] != NULL)
+ if (m_views[0] != nullptr)
{
// compute a client rect
RECT bounds;
@@ -352,7 +352,7 @@ void debugwin_info::draw_contents(HDC dc)
// draw edges around all views
for (int curview = 0; curview < MAX_VIEWS; curview++)
{
- if (m_views[curview] != NULL)
+ if (m_views[curview] != nullptr)
{
RECT bounds;
m_views[curview]->get_bounds(bounds);
@@ -430,7 +430,7 @@ LRESULT debugwin_info::window_proc(UINT message, WPARAM wparam, LPARAM lparam)
case WM_SIZE:
case WM_SIZING:
recompute_children();
- InvalidateRect(m_wnd, NULL, FALSE);
+ InvalidateRect(m_wnd, nullptr, FALSE);
break;
// mouse wheel: forward to the first view
@@ -458,7 +458,7 @@ LRESULT debugwin_info::window_proc(UINT message, WPARAM wparam, LPARAM lparam)
{
for (viewnum = 0; viewnum < MAX_VIEWS; viewnum++)
{
- if ((m_views[viewnum] != NULL) && m_views[viewnum]->owns_window(child))
+ if ((m_views[viewnum] != nullptr) && m_views[viewnum]->owns_window(child))
break;
}
if (viewnum == MAX_VIEWS)
@@ -466,7 +466,7 @@ LRESULT debugwin_info::window_proc(UINT message, WPARAM wparam, LPARAM lparam)
}
// send the appropriate message to this view's scrollbar
- if (m_views[viewnum] != NULL)
+ if (m_views[viewnum] != nullptr)
m_views[viewnum]->send_vscroll(delta);
break;
@@ -498,7 +498,7 @@ LRESULT debugwin_info::window_proc(UINT message, WPARAM wparam, LPARAM lparam)
// destroy: close down the window
case WM_NCDESTROY:
- m_wnd = NULL;
+ m_wnd = nullptr;
debugger().remove_window(*this);
break;
@@ -515,8 +515,8 @@ HMENU debugwin_info::create_standard_menubar()
{
// create the debug menu
HMENU const debugmenu = CreatePopupMenu();
- if (debugmenu == NULL)
- return NULL;
+ if (debugmenu == nullptr)
+ return nullptr;
AppendMenu(debugmenu, MF_ENABLED, ID_NEW_MEMORY_WND, TEXT("New Memory Window\tCtrl+M"));
AppendMenu(debugmenu, MF_ENABLED, ID_NEW_DISASM_WND, TEXT("New Disassembly Window\tCtrl+D"));
AppendMenu(debugmenu, MF_ENABLED, ID_NEW_LOG_WND, TEXT("New Error Log Window\tCtrl+L"));
@@ -538,10 +538,10 @@ HMENU debugwin_info::create_standard_menubar()
// create the menu bar
HMENU const menubar = CreateMenu();
- if (menubar == NULL)
+ if (menubar == nullptr)
{
DestroyMenu(debugmenu);
- return NULL;
+ return nullptr;
}
AppendMenu(menubar, MF_ENABLED | MF_POPUP, (UINT_PTR)debugmenu, TEXT("Debug"));
@@ -563,10 +563,10 @@ LRESULT CALLBACK debugwin_info::static_window_proc(HWND wnd, UINT message, WPARA
}
debugwin_info *const info = (debugwin_info *)(FPTR)GetWindowLongPtr(wnd, GWLP_USERDATA);
- if (info == NULL)
+ if (info == nullptr)
return DefWindowProc(wnd, message, wparam, lparam);
- assert((info->m_wnd == wnd) || (info->m_wnd == NULL));
+ assert((info->m_wnd == wnd) || (info->m_wnd == nullptr));
return info->window_proc(message, wparam, lparam);
}
@@ -581,10 +581,10 @@ void debugwin_info::register_window_class()
wc.lpszClassName = TEXT("MAMEDebugWindow");
wc.hInstance = GetModuleHandleUni();
wc.lpfnWndProc = &debugwin_info::static_window_proc;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
- wc.lpszMenuName = NULL;
- wc.hbrBackground = NULL;
+ wc.lpszMenuName = nullptr;
+ wc.hbrBackground = nullptr;
wc.style = 0;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
diff --git a/src/osd/modules/debugger/win/debugwininfo.h b/src/osd/modules/debugger/win/debugwininfo.h
index c0825bcf8d1..4bab0e2a3a3 100644
--- a/src/osd/modules/debugger/win/debugwininfo.h
+++ b/src/osd/modules/debugger/win/debugwininfo.h
@@ -41,9 +41,9 @@ public:
}
}
- void show() { smart_show_window(m_wnd, true); }
- void hide() { smart_show_window(m_wnd, false); }
- void set_foreground() { SetForegroundWindow(m_wnd); }
+ void show() const { smart_show_window(m_wnd, true); }
+ void hide() const { smart_show_window(m_wnd, false); }
+ void set_foreground() const { SetForegroundWindow(m_wnd); }
void destroy();
virtual bool set_default_focus();
diff --git a/src/osd/modules/debugger/win/disasmwininfo.cpp b/src/osd/modules/debugger/win/disasmwininfo.cpp
index ae7e3894458..eb6466e437d 100644
--- a/src/osd/modules/debugger/win/disasmwininfo.cpp
+++ b/src/osd/modules/debugger/win/disasmwininfo.cpp
@@ -15,10 +15,10 @@
disasmwin_info::disasmwin_info(debugger_windows_interface &debugger) :
- disasmbasewin_info(debugger, false, "Disassembly", NULL),
- m_combownd(NULL)
+ disasmbasewin_info(debugger, false, "Disassembly", nullptr),
+ m_combownd(nullptr)
{
- if ((window() == NULL) || (m_views[0] == NULL))
+ if ((window() == nullptr) || (m_views[0] == nullptr))
return;
// set up the view to track the initial expression
diff --git a/src/osd/modules/debugger/win/editwininfo.cpp b/src/osd/modules/debugger/win/editwininfo.cpp
index 279bc68fbe3..6bf98df4352 100644
--- a/src/osd/modules/debugger/win/editwininfo.cpp
+++ b/src/osd/modules/debugger/win/editwininfo.cpp
@@ -23,18 +23,18 @@
editwin_info::editwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler) :
debugwin_info(debugger, is_main_console, title, handler),
- m_editwnd(NULL),
+ m_editwnd(nullptr),
m_edit_defstr(),
- m_original_editproc(NULL),
+ m_original_editproc(nullptr),
m_history_count(0),
m_last_history(0)
{
- if (window() == NULL)
+ if (window() == nullptr)
return;
// create an edit box and override its key handling
- m_editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), NULL, EDIT_BOX_STYLE,
- 0, 0, 100, 100, window(), NULL, GetModuleHandleUni(), NULL);
+ m_editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), nullptr, EDIT_BOX_STYLE,
+ 0, 0, 100, 100, window(), nullptr, GetModuleHandleUni(), nullptr);
m_original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(m_editwnd, GWLP_WNDPROC);
SetWindowLongPtr(m_editwnd, GWLP_USERDATA, (LONG_PTR)this);
SetWindowLongPtr(m_editwnd, GWLP_WNDPROC, (LONG_PTR)&editwin_info::static_edit_proc);
@@ -80,7 +80,7 @@ void editwin_info::set_editwnd_bounds(RECT const &bounds)
void editwin_info::set_editwnd_text(char const *text)
{
TCHAR *tc_buffer = tstring_from_utf8(text);
- if (tc_buffer != NULL)
+ if (tc_buffer != nullptr)
{
SendMessage(m_editwnd, WM_SETTEXT, (WPARAM)0, (LPARAM)tc_buffer);
osd_free(tc_buffer);
@@ -138,20 +138,20 @@ LRESULT editwin_info::edit_proc(UINT message, WPARAM wparam, LPARAM lparam)
break;
case VK_PRIOR:
- if (m_views[0] != NULL)
+ if (m_views[0] != nullptr)
m_views[0]->send_pageup();
break;
case VK_NEXT:
- if (m_views[0] != NULL)
+ if (m_views[0] != nullptr)
m_views[0]->send_pagedown();
break;
case VK_TAB:
if (GetAsyncKeyState(VK_SHIFT) & 0x8000)
- prev_view(NULL);
+ prev_view(nullptr);
else
- next_view(NULL);
+ next_view(nullptr);
set_ignore_char_lparam(lparam);
break;
@@ -191,7 +191,7 @@ LRESULT editwin_info::edit_proc(UINT message, WPARAM wparam, LPARAM lparam)
// process
char *utf8_buffer = utf8_from_tstring(buffer);
- if (utf8_buffer != NULL)
+ if (utf8_buffer != nullptr)
{
process_string(utf8_buffer);
osd_free(utf8_buffer);
diff --git a/src/osd/modules/debugger/win/memoryviewinfo.h b/src/osd/modules/debugger/win/memoryviewinfo.h
index 2245ace307d..a690df6d782 100644
--- a/src/osd/modules/debugger/win/memoryviewinfo.h
+++ b/src/osd/modules/debugger/win/memoryviewinfo.h
@@ -23,7 +23,6 @@ public:
UINT8 data_format() const;
UINT32 chunks_per_row() const;
bool reverse() const;
- bool ascii() const;
bool physical() const;
void set_expression(char const *string);
diff --git a/src/osd/modules/debugger/win/memorywininfo.cpp b/src/osd/modules/debugger/win/memorywininfo.cpp
index b6d2b83614b..5ff85a60e60 100644
--- a/src/osd/modules/debugger/win/memorywininfo.cpp
+++ b/src/osd/modules/debugger/win/memorywininfo.cpp
@@ -16,14 +16,14 @@
memorywin_info::memorywin_info(debugger_windows_interface &debugger) :
- editwin_info(debugger, false, "Memory", NULL),
- m_combownd(NULL)
+ editwin_info(debugger, false, "Memory", nullptr),
+ m_combownd(nullptr)
{
if (!window())
return;
m_views[0].reset(global_alloc(memoryview_info(debugger, *this, window())));
- if ((m_views[0] == NULL) || !m_views[0]->is_valid())
+ if ((m_views[0] == nullptr) || !m_views[0]->is_valid())
{
m_views[0].reset();
return;
diff --git a/src/osd/modules/debugger/win/pointswininfo.cpp b/src/osd/modules/debugger/win/pointswininfo.cpp
index 6dd56cc50cc..f055aa211f2 100644
--- a/src/osd/modules/debugger/win/pointswininfo.cpp
+++ b/src/osd/modules/debugger/win/pointswininfo.cpp
@@ -14,13 +14,13 @@
pointswin_info::pointswin_info(debugger_windows_interface &debugger) :
- debugwin_info(debugger, false, std::string("All Breakpoints").c_str(), NULL)
+ debugwin_info(debugger, false, std::string("All Breakpoints").c_str(), nullptr)
{
if (!window())
return;
m_views[0].reset(global_alloc(debugview_info(debugger, *this, window(), DVT_BREAK_POINTS)));
- if ((m_views[0] == NULL) || !m_views[0]->is_valid())
+ if ((m_views[0] == nullptr) || !m_views[0]->is_valid())
{
m_views[0].reset();
return;
diff --git a/src/osd/modules/debugger/win/uimetrics.cpp b/src/osd/modules/debugger/win/uimetrics.cpp
index 7da41d6f79f..c2d165c6a94 100644
--- a/src/osd/modules/debugger/win/uimetrics.cpp
+++ b/src/osd/modules/debugger/win/uimetrics.cpp
@@ -20,8 +20,8 @@ ui_metrics::ui_metrics(osd_options const &options) :
m_vscroll_width(GetSystemMetrics(SM_CXVSCROLL))
{
// create a temporary DC
- HDC const temp_dc = GetDC(NULL);
- if (temp_dc != NULL)
+ HDC const temp_dc = GetDC(nullptr);
+ if (temp_dc != nullptr)
{
float const size = options.debugger_font_size();
char const *const face = options.debugger_font();
@@ -32,7 +32,7 @@ ui_metrics::ui_metrics(osd_options const &options) :
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH, t_face);
osd_free(t_face);
- if (m_debug_font == NULL)
+ if (m_debug_font == nullptr)
fatalerror("Unable to create debugger font\n");
// get the metrics
@@ -45,13 +45,13 @@ ui_metrics::ui_metrics(osd_options const &options) :
m_debug_font_ascent = metrics.tmAscent + metrics.tmExternalLeading;
}
SelectObject(temp_dc, old_font);
- ReleaseDC(NULL, temp_dc);
+ ReleaseDC(nullptr, temp_dc);
}
}
ui_metrics::ui_metrics(ui_metrics const &that) :
- m_debug_font(NULL),
+ m_debug_font(nullptr),
m_debug_font_height(that.m_debug_font_height),
m_debug_font_width(that.m_debug_font_width),
m_debug_font_ascent(that.m_debug_font_ascent),
diff --git a/src/osd/modules/file/winfile.cpp b/src/osd/modules/file/winfile.cpp
index 9695aac7363..9b6ecdc0535 100644
--- a/src/osd/modules/file/winfile.cpp
+++ b/src/osd/modules/file/winfile.cpp
@@ -65,7 +65,7 @@ public:
// then perform the read
DWORD result = 0;
- if (!ReadFile(m_handle, buffer, length, &result, NULL))
+ if (!ReadFile(m_handle, buffer, length, &result, nullptr))
return win_error_to_file_error(GetLastError());
actual = result;
@@ -82,7 +82,7 @@ public:
// then perform the write
DWORD result = 0;
- if (!WriteFile(m_handle, buffer, length, &result, NULL))
+ if (!WriteFile(m_handle, buffer, length, &result, nullptr))
return win_error_to_file_error(GetLastError());
actual = result;
@@ -157,7 +157,7 @@ DWORD create_path_recursive(TCHAR *path)
WIN32_FILE_ATTRIBUTE_DATA fileinfo;
if (GetFileAttributesEx(path, GetFileExInfoStandard, &fileinfo))
return NO_ERROR;
- else if (!CreateDirectory(path, NULL))
+ else if (!CreateDirectory(path, nullptr))
return GetLastError();
else
return NO_ERROR;
@@ -212,7 +212,7 @@ osd_file::error osd_file::open(std::string const &orig_path, UINT32 openflags, p
}
// attempt to open the file
- HANDLE h = CreateFile(t_path, access, sharemode, NULL, disposition, 0, NULL);
+ HANDLE h = CreateFile(t_path, access, sharemode, nullptr, disposition, 0, nullptr);
if (INVALID_HANDLE_VALUE == h)
{
DWORD err = GetLastError();
@@ -220,7 +220,7 @@ osd_file::error osd_file::open(std::string const &orig_path, UINT32 openflags, p
if ((ERROR_PATH_NOT_FOUND == err) && (openflags & OPEN_FLAG_CREATE) && (openflags & OPEN_FLAG_CREATE_PATHS))
{
TCHAR *pathsep = _tcsrchr(t_path, '\\');
- if (pathsep != NULL)
+ if (pathsep != nullptr)
{
// create the path up to the file
*pathsep = 0;
@@ -230,7 +230,7 @@ osd_file::error osd_file::open(std::string const &orig_path, UINT32 openflags, p
// attempt to reopen the file
if (err == NO_ERROR)
{
- h = CreateFile(t_path, access, sharemode, NULL, disposition, 0, NULL);
+ h = CreateFile(t_path, access, sharemode, nullptr, disposition, 0, nullptr);
err = GetLastError();
}
}
@@ -318,15 +318,15 @@ int osd_get_physical_drive_geometry(const char *filename, UINT32 *cylinders, UIN
// do a create file on the drive
t_filename = tstring_from_utf8(filename);
- if (t_filename == NULL)
+ if (t_filename == nullptr)
return FALSE;
- file = CreateFile(t_filename, GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL);
+ file = CreateFile(t_filename, GENERIC_READ, FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, nullptr);
osd_free(t_filename);
if (file == INVALID_HANDLE_VALUE)
return FALSE;
// device I/O control should return the geometry
- result = DeviceIoControl(file, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, &dg, sizeof(dg), &bytesRead, NULL);
+ result = DeviceIoControl(file, IOCTL_DISK_GET_DRIVE_GEOMETRY, nullptr, 0, &dg, sizeof(dg), &bytesRead, nullptr);
CloseHandle(file);
// if that failed, return false
@@ -373,7 +373,7 @@ osd_directory_entry *osd_stat(const std::string &path)
else
{
// attempt to find the first file
- HANDLE find = FindFirstFileEx(t_path.get(), FindExInfoStandard, &find_data, FindExSearchNameMatch, NULL, 0);
+ HANDLE find = FindFirstFileEx(t_path.get(), FindExInfoStandard, &find_data, FindExSearchNameMatch, nullptr, 0);
if (find == INVALID_HANDLE_VALUE)
return nullptr;
FindClose(find);
@@ -407,7 +407,7 @@ osd_file::error osd_get_full_path(std::string &dst, std::string const &path)
// cannonicalize the path
TCHAR buffer[MAX_PATH];
- if (!GetFullPathName(t_path, ARRAY_LENGTH(buffer), buffer, NULL))
+ if (!GetFullPathName(t_path, ARRAY_LENGTH(buffer), buffer, nullptr))
return win_error_to_file_error(GetLastError());
// convert the result back to UTF-8
@@ -430,7 +430,7 @@ bool osd_is_absolute_path(std::string const &path)
{
bool result = false;
TCHAR *t_path = tstring_from_utf8(path.c_str());
- if (t_path != NULL)
+ if (t_path != nullptr)
{
result = !PathIsRelative(t_path);
osd_free(t_path);
@@ -454,7 +454,7 @@ const char *osd_get_volume_name(int idx)
p = szBuffer;
while(idx--) {
p += strlen(p) + 1;
- if (!*p) return NULL;
+ if (!*p) return nullptr;
}
return p;
diff --git a/src/osd/modules/file/winptty.cpp b/src/osd/modules/file/winptty.cpp
index 52e19491ea5..88920d69099 100644
--- a/src/osd/modules/file/winptty.cpp
+++ b/src/osd/modules/file/winptty.cpp
@@ -42,7 +42,7 @@ public:
virtual error read(void *buffer, std::uint64_t offset, std::uint32_t count, std::uint32_t &actual) override
{
DWORD bytes_read;
- if (!ReadFile(m_handle, buffer, count, &bytes_read, NULL))
+ if (!ReadFile(m_handle, buffer, count, &bytes_read, nullptr))
return win_error_to_file_error(GetLastError());
actual = bytes_read;
@@ -52,7 +52,7 @@ public:
virtual error write(void const *buffer, std::uint64_t offset, std::uint32_t count, std::uint32_t &actual) override
{
DWORD bytes_written;
- if (!WriteFile(m_handle, buffer, count, &bytes_written, NULL))
+ if (!WriteFile(m_handle, buffer, count, &bytes_written, nullptr))
return win_error_to_file_error(GetLastError());
actual = bytes_written;
@@ -91,7 +91,7 @@ osd_file::error win_open_ptty(std::string const &path, std::uint32_t openflags,
if (!t_name)
return osd_file::error::OUT_OF_MEMORY;
- HANDLE pipe = CreateNamedPipe(t_name, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_NOWAIT, 1, 32, 32, 0, NULL);
+ HANDLE pipe = CreateNamedPipe(t_name, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_NOWAIT, 1, 32, 32, 0, nullptr);
osd_free(t_name);
if (INVALID_HANDLE_VALUE == pipe)
diff --git a/src/osd/modules/font/font_dwrite.cpp b/src/osd/modules/font/font_dwrite.cpp
index e3dfbfdbd85..670986f0cfc 100644
--- a/src/osd/modules/font/font_dwrite.cpp
+++ b/src/osd/modules/font/font_dwrite.cpp
@@ -109,7 +109,7 @@ void SaveBitmap(IWICBitmap* bitmap, GUID pixelFormat, const WCHAR *filename)
reinterpret_cast<void**>(d2dfactory.GetAddressOf())));
// Initialize COM - ignore failure
- CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
// Create a DirectWrite factory.
HR_RET(pfn_DWriteCreateFactory(
@@ -119,7 +119,7 @@ void SaveBitmap(IWICBitmap* bitmap, GUID pixelFormat, const WCHAR *filename)
HR_RET(CoCreateInstance(
CLSID_WICImagingFactory,
- NULL,
+ nullptr,
CLSCTX_INPROC_SERVER,
__uuidof(IWICImagingFactory),
(void**)&wicFactory));
@@ -128,19 +128,19 @@ void SaveBitmap(IWICBitmap* bitmap, GUID pixelFormat, const WCHAR *filename)
HR_RET(stream->InitializeFromFilename(filename, GENERIC_WRITE));
ComPtr<IWICBitmapEncoder> encoder;
- HR_RET(wicFactory->CreateEncoder(GUID_ContainerFormatBmp, NULL, &encoder));
+ HR_RET(wicFactory->CreateEncoder(GUID_ContainerFormatBmp, nullptr, &encoder));
HR_RET(encoder->Initialize(stream.Get(), WICBitmapEncoderNoCache));
ComPtr<IWICBitmapFrameEncode> frameEncode;
- HR_RET(encoder->CreateNewFrame(&frameEncode, NULL));
- HR_RET(frameEncode->Initialize(NULL));
+ HR_RET(encoder->CreateNewFrame(&frameEncode, nullptr));
+ HR_RET(frameEncode->Initialize(nullptr));
UINT width, height;
HR_RET(bitmap->GetSize(&width, &height));
HR_RET(frameEncode->SetSize(width, height));
HR_RET(frameEncode->SetPixelFormat(&pixelFormat));
- HR_RET(frameEncode->WriteSource(bitmap, NULL));
+ HR_RET(frameEncode->WriteSource(bitmap, nullptr));
HR_RET(frameEncode->Commit());
HR_RET(encoder->Commit());
@@ -165,7 +165,7 @@ void SaveBitmap2(bitmap_argb32 &bitmap, const WCHAR *filename)
ComPtr<IWICImagingFactory> wicFactory;
HR_RET(CoCreateInstance(
CLSID_WICImagingFactory,
- NULL,
+ nullptr,
CLSCTX_INPROC_SERVER,
__uuidof(IWICImagingFactory),
(void**)&wicFactory));
@@ -710,7 +710,7 @@ public:
HR_RET1(CoCreateInstance(
CLSID_WICImagingFactory,
- NULL,
+ nullptr,
CLSCTX_INPROC_SERVER,
__uuidof(IWICImagingFactory),
static_cast<void**>(&m_wicFactory)));
diff --git a/src/osd/modules/font/font_osx.cpp b/src/osd/modules/font/font_osx.cpp
index e1c5137b397..22662d3b8d3 100644
--- a/src/osd/modules/font/font_osx.cpp
+++ b/src/osd/modules/font/font_osx.cpp
@@ -24,8 +24,8 @@
class osd_font_osx : public osd_font
{
public:
- osd_font_osx() : m_font(NULL) { }
- osd_font_osx(osd_font_osx &&obj) : m_font(obj.m_font) { obj.m_font = NULL; }
+ osd_font_osx() : m_font(nullptr) { }
+ osd_font_osx(osd_font_osx &&obj) : m_font(obj.m_font) { obj.m_font = nullptr; }
virtual ~osd_font_osx() { close(); }
virtual bool open(std::string const &font_path, std::string const &name, int &height);
@@ -60,14 +60,14 @@ bool osd_font_osx::open(std::string const &font_path, std::string const &name, i
}
#endif
- CFStringRef const font_name = CFStringCreateWithCString(NULL, name.c_str(), kCFStringEncodingUTF8);
+ CFStringRef const font_name = CFStringCreateWithCString(nullptr, name.c_str(), kCFStringEncodingUTF8);
if (font_name && (kCFNotFound != CFStringFind(font_name, CFSTR(".BDF"), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareAnchored | kCFCompareNonliteral).location))
{
// handle bdf fonts in the core
CFRelease(font_name);
return false;
}
- CTFontRef ct_font = NULL;
+ CTFontRef ct_font = nullptr;
if (font_name)
{
CTFontDescriptorRef const font_descriptor = CTFontDescriptorCreateWithNameAndSize(font_name, 0.0);
@@ -109,9 +109,9 @@ bool osd_font_osx::open(std::string const &font_path, std::string const &name, i
void osd_font_osx::close()
{
- if (m_font != NULL)
+ if (m_font != nullptr)
CFRelease(m_font);
- m_font = NULL;
+ m_font = nullptr;
}
//-------------------------------------------------
@@ -170,10 +170,10 @@ bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::in
context_ref = CGBitmapContextCreate( bitmap.raw_pixptr(0), bitmap_width, bitmap_height, bits_per_component, bitmap.rowpixels()*4, color_space, bitmap_info );
- if( context_ref != NULL )
+ if( context_ref != nullptr )
{
CGFontRef font_ref;
- font_ref = CTFontCopyGraphicsFont( ct_font, NULL );
+ font_ref = CTFontCopyGraphicsFont( ct_font, nullptr );
CGContextSetTextPosition(context_ref, -bounding_rect.origin.x*EXTRA_WIDTH, CTFontGetDescent(ct_font)+CTFontGetLeading(ct_font) );
CGContextSetRGBFillColor(context_ref, 1.0, 1.0, 1.0, 1.0);
CGContextSetFont( context_ref, font_ref );
@@ -202,9 +202,9 @@ public:
private:
static CFComparisonResult sort_callback(CTFontDescriptorRef first, CTFontDescriptorRef second, void *refCon)
{
- CFStringRef left = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(first, kCTFontDisplayNameAttribute, NULL);
+ CFStringRef left = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(first, kCTFontDisplayNameAttribute, nullptr);
if (!left) left = (CFStringRef)CTFontDescriptorCopyAttribute(first, kCTFontNameAttribute);
- CFStringRef right = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(second, kCTFontDisplayNameAttribute, NULL);
+ CFStringRef right = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(second, kCTFontDisplayNameAttribute, nullptr);
if (!right) right = (CFStringRef)CTFontDescriptorCopyAttribute(second, kCTFontNameAttribute);
CFComparisonResult result;
@@ -223,8 +223,8 @@ bool font_osx::get_font_families(std::string const &font_path, std::vector<std::
{
CFStringRef keys[] = { kCTFontCollectionRemoveDuplicatesOption };
std::uintptr_t values[ARRAY_LENGTH(keys)] = { 1 };
- CFDictionaryRef const options = CFDictionaryCreate(kCFAllocatorDefault, (void const **)keys, (void const **)values, ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, NULL);
- CTFontCollectionRef const collection = CTFontCollectionCreateFromAvailableFonts(NULL);
+ CFDictionaryRef const options = CFDictionaryCreate(kCFAllocatorDefault, (void const **)keys, (void const **)values, ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, nullptr);
+ CTFontCollectionRef const collection = CTFontCollectionCreateFromAvailableFonts(nullptr);
CFRelease(options);
if (!collection) return false;
@@ -239,7 +239,7 @@ bool font_osx::get_font_families(std::string const &font_path, std::vector<std::
{
CTFontDescriptorRef const font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(descriptors, i);
CFStringRef const name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontNameAttribute);
- CFStringRef const display = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontDisplayNameAttribute, NULL);
+ CFStringRef const display = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontDisplayNameAttribute, nullptr);
if (name && display)
{
diff --git a/src/osd/modules/font/font_windows.cpp b/src/osd/modules/font/font_windows.cpp
index 851d3b6d646..5dbae434854 100644
--- a/src/osd/modules/font/font_windows.cpp
+++ b/src/osd/modules/font/font_windows.cpp
@@ -32,9 +32,9 @@ namespace {
class osd_font_windows : public osd_font
{
public:
- osd_font_windows(): m_font(NULL) { }
- osd_font_windows(osd_font_windows &&obj) : m_font(obj.m_font) { obj.m_font = NULL; }
- virtual ~osd_font_windows() {close(); }
+ osd_font_windows(): m_font(nullptr) { }
+ osd_font_windows(osd_font_windows &&obj) : m_font(obj.m_font) { obj.m_font = nullptr; }
+ virtual ~osd_font_windows() { osd_font_windows::close(); }
virtual bool open(std::string const &font_path, std::string const &name, int &height) override;
virtual void close() override;
@@ -93,11 +93,11 @@ bool osd_font_windows::open(std::string const &font_path, std::string const &_na
// create the font
height = logfont.lfHeight;
m_font = CreateFontIndirect(&logfont);
- if (m_font == NULL)
+ if (m_font == nullptr)
return false;
// select it into a temp DC and get the real font name
- HDC dummyDC = CreateCompatibleDC(NULL);
+ HDC dummyDC = CreateCompatibleDC(nullptr);
HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
std::vector<TCHAR> realname((std::max)(GetTextFace(dummyDC, 0, nullptr), 0));
int facelen = GetTextFace(dummyDC, realname.size(), &realname[0]);
@@ -106,7 +106,7 @@ bool osd_font_windows::open(std::string const &font_path, std::string const &_na
if (facelen <= 0)
{
DeleteObject(m_font);
- m_font = NULL;
+ m_font = nullptr;
return false;
}
@@ -119,7 +119,7 @@ bool osd_font_windows::open(std::string const &font_path, std::string const &_na
if (result != 0)
{
DeleteObject(m_font);
- m_font = NULL;
+ m_font = nullptr;
return false;
}
return true;
@@ -133,9 +133,9 @@ bool osd_font_windows::open(std::string const &font_path, std::string const &_na
void osd_font_windows::close()
{
// delete the font ojbect
- if (m_font != NULL)
+ if (m_font != nullptr)
DeleteObject(m_font);
- m_font = NULL;
+ m_font = nullptr;
}
//-------------------------------------------------
@@ -149,7 +149,7 @@ void osd_font_windows::close()
bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
// create a dummy DC to work with
- HDC dummyDC = CreateCompatibleDC(NULL);
+ HDC dummyDC = CreateCompatibleDC(nullptr);
HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
// get the text metrics
@@ -191,7 +191,7 @@ bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT
// create a DIB to render to
BYTE *bits;
- HBITMAP dib = CreateDIBSection(dummyDC, &info, DIB_RGB_COLORS, reinterpret_cast<VOID **>(&bits), NULL, 0);
+ HBITMAP dib = CreateDIBSection(dummyDC, &info, DIB_RGB_COLORS, reinterpret_cast<VOID **>(&bits), nullptr, 0);
if (dib)
{
@@ -205,7 +205,7 @@ bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT
WCHAR tempchar = chnum;
SetTextColor(dummyDC, RGB(0xff, 0xff, 0xff));
SetBkColor(dummyDC, RGB(0x00, 0x00, 0x00));
- ExtTextOutW(dummyDC, 50 + abc.abcA, 50, ETO_OPAQUE, NULL, &tempchar, 1, NULL);
+ ExtTextOutW(dummyDC, 50 + abc.abcA, 50, ETO_OPAQUE, nullptr, &tempchar, 1, nullptr);
// characters are expected to be full-height
rectangle actbounds;
diff --git a/src/osd/modules/input/input_common.h b/src/osd/modules/input/input_common.h
index 41a9d762838..094f3873f05 100644
--- a/src/osd/modules/input/input_common.h
+++ b/src/osd/modules/input/input_common.h
@@ -215,10 +215,10 @@ public:
// Getters
running_machine & machine() const { return m_machine; }
- const char * name() { return m_name.c_str(); }
- input_device * device() { return m_device; }
+ const char * name() const { return m_name.c_str(); }
+ input_device * device() const { return m_device; }
input_module & module() const { return m_module; }
- input_device_class deviceclass() { return m_deviceclass; }
+ input_device_class deviceclass() const { return m_deviceclass; }
// Poll and reset methods
virtual void poll() {};
@@ -289,20 +289,20 @@ public:
void poll_devices()
{
- for (auto iter = m_list.begin(); iter != m_list.end(); iter++)
+ for (auto iter = m_list.begin(); iter != m_list.end(); ++iter)
iter->get()->poll();
}
void reset_devices()
{
- for (auto iter = m_list.begin(); iter != m_list.end(); iter++)
+ for (auto iter = m_list.begin(); iter != m_list.end(); ++iter)
iter->get()->reset();
}
void free_device(device_info * devinfo)
{
// remove us from the list
- for (auto iter = m_list.begin(); iter != m_list.end(); iter++)
+ for (auto iter = m_list.begin(); iter != m_list.end(); ++iter)
{
if (iter->get() == devinfo)
{
@@ -316,7 +316,7 @@ public:
{
// remove us from the list
int i = 0;
- for (auto iter = m_list.begin(); iter != m_list.end(); iter++)
+ for (auto iter = m_list.begin(); iter != m_list.end(); ++iter)
{
if (iter->get() == devinfo)
{
@@ -336,7 +336,7 @@ public:
m_list.pop_back();
}
- int size()
+ int size() const
{
return m_list.size();
}
@@ -419,7 +419,7 @@ public:
keyboard_trans_table(std::unique_ptr<key_trans_entry[]> table, unsigned int size);
// getters/setters
- UINT32 size() { return m_table_size; }
+ UINT32 size() const { return m_table_size; }
// public methods
input_item_id lookup_mame_code(const char * scode) const;
@@ -436,7 +436,7 @@ public:
return s_instance;
}
- key_trans_entry & operator [](int i) { return m_table[i]; }
+ key_trans_entry & operator [](int i) const { return m_table[i]; }
};
//============================================================
@@ -479,12 +479,12 @@ protected:
public:
- const osd_options * options() { return m_options; }
+ const osd_options * options() const { return m_options; }
input_device_list * devicelist() { return &m_devicelist; }
- bool input_enabled() { return m_input_enabled; }
- bool input_paused() { return m_input_paused; }
- bool mouse_enabled() { return m_mouse_enabled; }
- bool lightgun_enabled() { return m_lightgun_enabled; }
+ bool input_enabled() const { return m_input_enabled; }
+ bool input_paused() const { return m_input_paused; }
+ bool mouse_enabled() const { return m_mouse_enabled; }
+ bool lightgun_enabled() const { return m_lightgun_enabled; }
int init(const osd_options &options) override;
diff --git a/src/osd/modules/input/input_dinput.cpp b/src/osd/modules/input/input_dinput.cpp
index dfb63482570..5aa925edefe 100644
--- a/src/osd/modules/input/input_dinput.cpp
+++ b/src/osd/modules/input/input_dinput.cpp
@@ -236,7 +236,7 @@ public:
instance.dwSize = sizeof(instance);
result = devinfo->dinput.device->GetObjectInfo(&instance, offset, DIPH_BYOFFSET);
- // if we got an error and have no default string, just return NULL
+ // if we got an error and have no default string, just return nullptr
if (result != DI_OK)
{
if (defstring == nullptr)
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index eb9dbae1100..f91d083371d 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -157,7 +157,7 @@ public:
auto window = GET_FOCUS_WINDOW(&event.text);
//printf("Focus window is %p - wl %p\n", window, sdl_window_list);
unicode_char result;
- if (window != NULL)
+ if (window != nullptr)
{
osd_uchar_from_osdchar(&result, sdlevent.text.text, 1);
machine().ui_input().push_char_event(window->target(), result);
@@ -212,7 +212,7 @@ public:
int cx = -1, cy = -1;
auto window = GET_FOCUS_WINDOW(&sdlevent.motion);
- if (window != NULL && window->xy_to_render_target(sdlevent.motion.x, sdlevent.motion.y, &cx, &cy))
+ if (window != nullptr && window->xy_to_render_target(sdlevent.motion.x, sdlevent.motion.y, &cx, &cy))
machine().ui_input().push_mouse_move_event(window->target(), cx, cy);
}
break;
@@ -229,7 +229,7 @@ public:
int cx, cy;
osd_ticks_t click = osd_ticks() * 1000 / osd_ticks_per_second();
auto window = GET_FOCUS_WINDOW(&sdlevent.button);
- if (window != NULL && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
+ if (window != nullptr && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
{
machine().ui_input().push_mouse_down_event(window->target(), cx, cy);
// FIXME Parameter ?
@@ -254,7 +254,7 @@ public:
int cx, cy;
auto window = GET_FOCUS_WINDOW(&sdlevent.button);
- if (window != NULL && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
+ if (window != nullptr && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
{
machine().ui_input().push_mouse_rdown_event(window->target(), cx, cy);
}
@@ -270,7 +270,7 @@ public:
int cx, cy;
auto window = GET_FOCUS_WINDOW(&sdlevent.button);
- if (window != NULL && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
+ if (window != nullptr && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
{
machine().ui_input().push_mouse_up_event(window->target(), cx, cy);
}
@@ -280,7 +280,7 @@ public:
int cx, cy;
auto window = GET_FOCUS_WINDOW(&sdlevent.button);
- if (window != NULL && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
+ if (window != nullptr && window->xy_to_render_target(sdlevent.button.x, sdlevent.button.y, &cx, &cy))
{
machine().ui_input().push_mouse_rup_event(window->target(), cx, cy);
}
@@ -289,7 +289,7 @@ public:
case SDL_MOUSEWHEEL:
auto window = GET_FOCUS_WINDOW(&sdlevent.wheel);
- if (window != NULL)
+ if (window != nullptr)
machine().ui_input().push_mouse_wheel_event(window->target(), 0, 0, sdlevent.wheel.y, 3);
break;
}
@@ -324,7 +324,7 @@ public:
sdl_joystick_device(running_machine &machine, const char *name, input_module &module)
: sdl_device(machine, name, DEVICE_CLASS_JOYSTICK, module),
joystick({{0}}),
- sdl_state({0})
+ sdl_state({ nullptr })
{
}
@@ -492,7 +492,7 @@ class sdl_keyboard_module : public sdl_input_module
keyboard_trans_table * m_key_trans_table;
public:
sdl_keyboard_module()
- : sdl_input_module(OSD_KEYBOARDINPUT_PROVIDER)
+ : sdl_input_module(OSD_KEYBOARDINPUT_PROVIDER), m_key_trans_table(nullptr)
{
}
@@ -553,7 +553,7 @@ private:
osd_printf_verbose("Keymap: Start reading keymap_file %s\n", keymap_filename);
keymap_file = fopen(keymap_filename, "r");
- if (keymap_file == NULL)
+ if (keymap_file == nullptr)
{
osd_printf_warning("Keymap: Unable to open keymap %s, using default\n", keymap_filename);
return &default_table;
@@ -699,7 +699,7 @@ private:
bool m_sixaxis_mode;
public:
sdl_joystick_module()
- : sdl_input_module(OSD_JOYSTICKINPUT_PROVIDER)
+ : sdl_input_module(OSD_JOYSTICKINPUT_PROVIDER), m_sixaxis_mode(false)
{
}
@@ -740,7 +740,7 @@ public:
{
sdl_joystick_device *devinfo = create_joystick_device(machine, &m_joy_map, stick, DEVICE_CLASS_JOYSTICK);
- if (devinfo == NULL)
+ if (devinfo == nullptr)
continue;
physical_stick = m_joy_map.map[stick].physical;
@@ -844,7 +844,7 @@ public:
private:
sdl_joystick_device* create_joystick_device(running_machine &machine, device_map_t *devmap, int index, input_device_class devclass)
{
- sdl_joystick_device *devinfo = NULL;
+ sdl_joystick_device *devinfo = nullptr;
char tempname[20];
if (devmap->map[index].name.length() == 0)
@@ -858,7 +858,7 @@ private:
: devicelist()->create_device<sdl_joystick_device>(machine, tempname, *this);
}
- return NULL;
+ return nullptr;
}
else
{
diff --git a/src/osd/modules/input/input_sdlcommon.cpp b/src/osd/modules/input/input_sdlcommon.cpp
index ebc20ddd319..82c470534b2 100644
--- a/src/osd/modules/input/input_sdlcommon.cpp
+++ b/src/osd/modules/input/input_sdlcommon.cpp
@@ -47,7 +47,7 @@ static inline std::shared_ptr<sdl_window_info> window_from_id(Uint32 windowID)
return w;
}
}
- return NULL;
+ return nullptr;
}
void sdl_event_manager::process_events(running_machine &machine)
@@ -64,7 +64,7 @@ void sdl_event_manager::process_events(running_machine &machine)
auto subscribers = m_subscription_index.equal_range(sdlevent.type);
// Dispatch the events
- for (auto iter = subscribers.first; iter != subscribers.second; iter++)
+ for (auto iter = subscribers.first; iter != subscribers.second; ++iter)
iter->second->handle_event(sdlevent);
}
}
@@ -73,7 +73,7 @@ void sdl_event_manager::process_window_event(running_machine &machine, SDL_Event
{
std::shared_ptr<sdl_window_info> window = GET_WINDOW(&sdlevent.window);
- if (window == NULL)
+ if (window == nullptr)
return;
switch (sdlevent.window.event)
diff --git a/src/osd/modules/input/input_sdlcommon.h b/src/osd/modules/input/input_sdlcommon.h
index 2e40199c556..abdc4ddf4ed 100644
--- a/src/osd/modules/input/input_sdlcommon.h
+++ b/src/osd/modules/input/input_sdlcommon.h
@@ -62,7 +62,8 @@ struct device_map_t
class sdl_event_subscriber
{
public:
- virtual void handle_event(SDL_Event &sdlevent) = 0;
+ virtual ~sdl_event_subscriber() {}
+ virtual void handle_event(SDL_Event &sdlevent) = 0;
};
template <class TSubscriber>
@@ -130,7 +131,7 @@ private:
public:
bool mouse_over_window() const { return m_mouse_over_window; }
bool has_focus() const { return m_focus_window != nullptr; }
- std::shared_ptr<sdl_window_info> focus_window() { return m_focus_window; }
+ std::shared_ptr<sdl_window_info> focus_window() const { return m_focus_window; }
static sdl_event_manager& instance()
{
diff --git a/src/osd/modules/input/input_win32.cpp b/src/osd/modules/input/input_win32.cpp
index 0b44c510fa0..d02c73c987a 100644
--- a/src/osd/modules/input/input_win32.cpp
+++ b/src/osd/modules/input/input_win32.cpp
@@ -202,7 +202,7 @@ public:
// allocate a device
devinfo = devicelist()->create_device<win32_mouse_device>(machine, "Win32 Mouse 1", *this);
- if (devinfo == NULL)
+ if (devinfo == nullptr)
return;
// populate the axes
@@ -377,7 +377,7 @@ public:
// allocate a device
devinfo = devicelist()->create_device<win32_lightgun_device>(machine, gun_names[gunnum], *this);
- if (devinfo == NULL)
+ if (devinfo == nullptr)
break;
// populate the axes
diff --git a/src/osd/modules/input/input_x11.cpp b/src/osd/modules/input/input_x11.cpp
index 91e819eed7b..63563e9b0d8 100644
--- a/src/osd/modules/input/input_x11.cpp
+++ b/src/osd/modules/input/input_x11.cpp
@@ -130,7 +130,7 @@ find_device_info(Display *display,
bool only_extended)
{
XDeviceInfo *devices;
- XDeviceInfo *found = NULL;
+ XDeviceInfo *found = nullptr;
int loop;
int num_devices;
int len = strlen(name);
@@ -287,7 +287,7 @@ public:
if (m_display != nullptr)
return 0;
- m_display = XOpenDisplay(NULL);
+ m_display = XOpenDisplay(nullptr);
if (m_display == nullptr)
{
osd_printf_verbose("Unable to connect to X server\n");
diff --git a/src/osd/modules/lib/osdlib_macosx.cpp b/src/osd/modules/lib/osdlib_macosx.cpp
index 4d1f839cabd..d000a1cb058 100644
--- a/src/osd/modules/lib/osdlib_macosx.cpp
+++ b/src/osd/modules/lib/osdlib_macosx.cpp
@@ -153,14 +153,14 @@ char *osd_get_clipboard_text(void)
PasteboardRef pasteboard_ref;
err = PasteboardCreate(kPasteboardClipboard, &pasteboard_ref);
if (err)
- return NULL;
+ return nullptr;
PasteboardSynchronize(pasteboard_ref);
ItemCount item_count;
err = PasteboardGetItemCount(pasteboard_ref, &item_count);
- char *result = NULL; // core expects a malloced C string of uft8 data
+ char *result = nullptr; // core expects a malloced C string of uft8 data
for (UInt32 item_index = 1; (item_index <= item_count) && !result; item_index++)
{
PasteboardItemID item_id;
diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp
index 3b67e4a2f3a..ea7dd60c203 100644
--- a/src/osd/modules/lib/osdlib_unix.cpp
+++ b/src/osd/modules/lib/osdlib_unix.cpp
@@ -146,7 +146,7 @@ char *osd_get_clipboard_text(void)
char *osd_get_clipboard_text(void)
{
- char *result = NULL;
+ char *result = nullptr;
if (SDL_HasClipboardText())
{
diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp
index c5792f0307d..f778977614a 100644
--- a/src/osd/modules/lib/osdlib_win32.cpp
+++ b/src/osd/modules/lib/osdlib_win32.cpp
@@ -53,7 +53,7 @@
//============================================================
#ifdef OSD_WINDOWS
-void (*s_debugger_stack_crawler)() = NULL;
+void (*s_debugger_stack_crawler)() = nullptr;
#endif
@@ -116,8 +116,8 @@ void *osd_malloc(size_t size)
// basic objects just come from the heap
UINT8 *const block = reinterpret_cast<UINT8 *>(HeapAlloc(GetProcessHeap(), 0, size));
- if (block == NULL)
- return NULL;
+ if (block == nullptr)
+ return nullptr;
UINT8 *const result = reinterpret_cast<UINT8 *>(reinterpret_cast<FPTR>(block + sizeof(size_t) + MAX_ALIGNMENT) & ~(FPTR(MAX_ALIGNMENT) - 1));
// store the size and return and pointer to the data afterward
@@ -145,14 +145,14 @@ void *osd_malloc_array(size_t size)
size_t const rounded_size = ((size + sizeof(void *) + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE;
// reserve that much memory, plus two guard pages
- void *page_base = VirtualAlloc(NULL, rounded_size + 2 * PAGE_SIZE, MEM_RESERVE, PAGE_NOACCESS);
- if (page_base == NULL)
- return NULL;
+ void *page_base = VirtualAlloc(nullptr, rounded_size + 2 * PAGE_SIZE, MEM_RESERVE, PAGE_NOACCESS);
+ if (page_base == nullptr)
+ return nullptr;
// now allow access to everything but the first and last pages
page_base = VirtualAlloc(reinterpret_cast<UINT8 *>(page_base) + PAGE_SIZE, rounded_size, MEM_COMMIT, PAGE_READWRITE);
- if (page_base == NULL)
- return NULL;
+ if (page_base == nullptr)
+ return nullptr;
// work backwards from the page base to get to the block base
UINT8 *const block = GUARD_ALIGN_START ? reinterpret_cast<UINT8 *>(page_base) : (reinterpret_cast<UINT8 *>(page_base) + rounded_size - size);
@@ -231,7 +231,7 @@ void osd_break_into_debugger(const char *message)
win_output_debug_string_utf8(message);
DebugBreak();
}
- else if (s_debugger_stack_crawler != NULL)
+ else if (s_debugger_stack_crawler != nullptr)
(*s_debugger_stack_crawler)();
#else
if (IsDebuggerPresent())
@@ -248,7 +248,7 @@ void osd_break_into_debugger(const char *message)
static char *get_clipboard_text_by_format(UINT format, char *(*convert)(LPCVOID data))
{
- char *result = NULL;
+ char *result = nullptr;
HANDLE data_handle;
LPVOID data;
@@ -256,15 +256,15 @@ static char *get_clipboard_text_by_format(UINT format, char *(*convert)(LPCVOID
if (IsClipboardFormatAvailable(format))
{
// open the clipboard
- if (OpenClipboard(NULL))
+ if (OpenClipboard(nullptr))
{
// try to access clipboard data
data_handle = GetClipboardData(format);
- if (data_handle != NULL)
+ if (data_handle != nullptr)
{
// lock the data
data = GlobalLock(data_handle);
- if (data != NULL)
+ if (data != nullptr)
{
// invoke the convert
result = (*convert)(data);
diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp
index 099c5fefb77..2afe86869b5 100644
--- a/src/osd/modules/lib/osdobj_common.cpp
+++ b/src/osd/modules/lib/osdobj_common.cpp
@@ -450,7 +450,7 @@ void osd_common_t::update(bool skip_redraw)
// irregular intervals in some circumstances (e.g., multi-screen games
// or games with asynchronous updates).
//
- if (m_watchdog != NULL)
+ if (m_watchdog != nullptr)
m_watchdog->reset();
update_slider_list();
@@ -644,7 +644,7 @@ void osd_common_t::init_subsystems()
m_midi = select_module_options<midi_module *>(options(), OSD_MIDI_PROVIDER);
m_output = select_module_options<output_module *>(options(), OSD_OUTPUT_PROVIDER);
- machine().output().set_notifier(NULL, output_notifier_callback, this);
+ machine().output().set_notifier(nullptr, output_notifier_callback, this);
m_mod_man.init(options());
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index 46049d74fe9..fc0d2f7a925 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -155,7 +155,7 @@ public:
// BGFX specific options
const char *bgfx_path() const { return value(OSDOPTION_BGFX_PATH); }
const char *bgfx_backend() const { return value(OSDOPTION_BGFX_BACKEND); }
- const bool bgfx_debug() const { return bool_value(OSDOPTION_BGFX_DEBUG); }
+ bool bgfx_debug() const { return bool_value(OSDOPTION_BGFX_DEBUG); }
const char *bgfx_screen_chains() const { return value(OSDOPTION_BGFX_SCREEN_CHAINS); }
const char *bgfx_shadow_mask() const { return value(OSDOPTION_BGFX_SHADOW_MASK); }
const char *bgfx_avi_name() const { return value(OSDOPTION_BGFX_AVI_NAME); }
@@ -209,7 +209,7 @@ public:
// this INTERFACE but part of the osd IMPLEMENTATION
// getters
- running_machine &machine() { assert(m_machine != nullptr); return *m_machine; }
+ running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
virtual void debugger_update();
@@ -230,14 +230,14 @@ public:
virtual void video_options_add(const char *name, void *type);
- osd_options &options() { return m_options; }
+ virtual osd_options &options() { return m_options; }
// osd_output interface ...
virtual void output_callback(osd_output_channel channel, const char *msg, va_list args) override;
bool verbose() const { return m_print_verbose; }
void set_verbose(bool print_verbose) { m_print_verbose = print_verbose; }
- void notify(const char *outname, INT32 value) { m_output->notify(outname, value); }
+ void notify(const char *outname, INT32 value) const { m_output->notify(outname, value); }
protected:
virtual bool input_init();
virtual void input_pause();
diff --git a/src/osd/modules/netdev/pcap.cpp b/src/osd/modules/netdev/pcap.cpp
index 4c85c1367c0..541ed422d8a 100644
--- a/src/osd/modules/netdev/pcap.cpp
+++ b/src/osd/modules/netdev/pcap.cpp
@@ -55,7 +55,7 @@ class pcap_module : public osd_module, public netdev_module
public:
pcap_module()
- : osd_module(OSD_NETDEV_PROVIDER, "pcap"), netdev_module(), handle(NULL)
+ : osd_module(OSD_NETDEV_PROVIDER, "pcap"), netdev_module(), handle(nullptr)
{
}
virtual ~pcap_module() { }
@@ -68,15 +68,15 @@ public:
HMODULE handle;
};
-static int (*pcap_compile_dl)(pcap_t *, struct bpf_program *, char *, int, bpf_u_int32) = NULL;
-static int (*pcap_findalldevs_dl)(pcap_if_t **, char *) = NULL;
-static pcap_t *(*pcap_open_live_dl)(const char *name, int, int, int, char *) = NULL;
-static int (*pcap_next_ex_dl)(pcap_t *, struct pcap_pkthdr **, const u_char **) = NULL;
-static void (*pcap_close_dl)(pcap_t *) = NULL;
-static int (*pcap_setfilter_dl)(pcap_t *, struct bpf_program *) = NULL;
-static int (*pcap_sendpacket_dl)(pcap_t *, u_char *, int) = NULL;
-static int (*pcap_set_datalink_dl)(pcap_t *, int) = NULL;
-static int (*pcap_dispatch_dl)(pcap_t *, int, pcap_handler callback, u_char *) = NULL;
+static int (*pcap_compile_dl)(pcap_t *, struct bpf_program *, char *, int, bpf_u_int32) = nullptr;
+static int (*pcap_findalldevs_dl)(pcap_if_t **, char *) = nullptr;
+static pcap_t *(*pcap_open_live_dl)(const char *name, int, int, int, char *) = nullptr;
+static int (*pcap_next_ex_dl)(pcap_t *, struct pcap_pkthdr **, const u_char **) = nullptr;
+static void (*pcap_close_dl)(pcap_t *) = nullptr;
+static int (*pcap_setfilter_dl)(pcap_t *, struct bpf_program *) = nullptr;
+static int (*pcap_sendpacket_dl)(pcap_t *, u_char *, int) = nullptr;
+static int (*pcap_set_datalink_dl)(pcap_t *, int) = nullptr;
+static int (*pcap_dispatch_dl)(pcap_t *, int, pcap_handler callback, u_char *) = nullptr;
#if 0
@@ -165,7 +165,7 @@ netdev_pcap::netdev_pcap(const char *name, class device_network_interface *ifdev
{
osd_printf_error("Unable to set %s to ethernet", name);
pcap_close_dl(m_p);
- m_p = NULL;
+ m_p = nullptr;
return;
}
netdev_pcap::set_mac(get_mac());
@@ -174,7 +174,7 @@ netdev_pcap::netdev_pcap(const char *name, class device_network_interface *ifdev
m_ctx.head = 0;
m_ctx.tail = 0;
m_ctx.p = m_p;
- pthread_create(&m_thread, NULL, netdev_pcap_blocker, &m_ctx);
+ pthread_create(&m_thread, nullptr, netdev_pcap_blocker, &m_ctx);
#endif
}
@@ -235,12 +235,12 @@ int netdev_pcap::recv_dev(UINT8 **buf)
netdev_pcap::~netdev_pcap()
{
#ifdef SDLMAME_MACOSX
- m_ctx.p = NULL;
+ m_ctx.p = nullptr;
pthread_cancel(m_thread);
- pthread_join(m_thread, NULL);
+ pthread_join(m_thread, nullptr);
#endif
if(m_p) pcap_close_dl(m_p);
- m_p = NULL;
+ m_p = nullptr;
}
static CREATE_NETDEV(create_pcap)
@@ -251,10 +251,10 @@ static CREATE_NETDEV(create_pcap)
bool pcap_module::probe()
{
- if (handle == NULL)
+ if (handle == nullptr)
{
handle = LoadDynamicLibrary(LIB_NAME);
- return (handle != NULL);
+ return (handle != nullptr);
}
return true;
}
@@ -315,7 +315,7 @@ void pcap_module::exit()
{
clear_netdev();
//FreeLibrary(handle);
- //handle = NULL;
+ //handle = nullptr;
}
#else
#include "modules/osdmodule.h"
diff --git a/src/osd/modules/opengl/gl_shader_mgr.cpp b/src/osd/modules/opengl/gl_shader_mgr.cpp
index 21ee7f9fc54..9f8dc8acd05 100644
--- a/src/osd/modules/opengl/gl_shader_mgr.cpp
+++ b/src/osd/modules/opengl/gl_shader_mgr.cpp
@@ -122,7 +122,7 @@ glsl_shader_info *glsl_shader_init(osd_gl_context *gl_ctx)
int i,j, err;
err = gl_shader_loadExtention(gl_ctx);
- if(err) return NULL;
+ if(err) return nullptr;
for (i=0; !err && i<GLSL_VERTEX_SHADER_INT_NUMBER; i++)
{
@@ -137,7 +137,7 @@ glsl_shader_info *glsl_shader_init(osd_gl_context *gl_ctx)
#endif
}
- if(err) return NULL;
+ if(err) return nullptr;
for (j=0; !err && j<GLSL_SHADER_FEAT_INT_NUMBER; j++)
{
@@ -146,16 +146,16 @@ glsl_shader_info *glsl_shader_init(osd_gl_context *gl_ctx)
err = gl_compile_shader_files (&glsl_mamebm_programs[j],
&glsl_mamebm_vsh_shader[glsl_mamebm_fsh2vsh[j]],
&glsl_mamebmfsh_shader[j],
- NULL /*precompiled*/, glsl_mamebm_fsh_files[j], 0);
+ nullptr /*precompiled*/, glsl_mamebm_fsh_files[j], 0);
#else
if(glsl_mamebm_fsh_sources[j])
err = gl_compile_shader_sources(&glsl_mamebm_programs[j],
&glsl_mamebm_vsh_shader[glsl_mamebm_fsh2vsh[j]],
&glsl_mamebm_fsh_shader[j],
- NULL /*precompiled*/, glsl_mamebm_fsh_sources[j]);
+ nullptr /*precompiled*/, glsl_mamebm_fsh_sources[j]);
#endif
}
- if (err) return NULL;
+ if (err) return nullptr;
return (glsl_shader_info *) malloc(sizeof(glsl_shader_info *));
}
@@ -169,29 +169,29 @@ int glsl_shader_free(glsl_shader_info *shinfo)
for (i=0; i<GLSL_VERTEX_SHADER_MAX_NUMBER+9; i++)
{
if ( glsl_mamebm_vsh_shader[i] )
- (void) gl_delete_shader( NULL, &glsl_mamebm_vsh_shader[i], NULL);
+ (void) gl_delete_shader(nullptr, &glsl_mamebm_vsh_shader[i], nullptr);
}
for (j=0; j<GLSL_SHADER_FEAT_MAX_NUMBER+9; j++)
{
if ( glsl_mamebm_fsh_shader[j] )
- (void) gl_delete_shader( NULL, NULL, &glsl_mamebm_fsh_shader[j]);
+ (void) gl_delete_shader(nullptr, nullptr, &glsl_mamebm_fsh_shader[j]);
}
for (j=0; j<GLSL_SHADER_FEAT_MAX_NUMBER+9; j++)
{
if ( glsl_mamebm_programs[j] )
- (void) gl_delete_shader( &glsl_mamebm_programs[j], NULL, NULL);
+ (void) gl_delete_shader( &glsl_mamebm_programs[j], nullptr, nullptr);
}
for (i=0; i<10; i++)
{
if ( glsl_scrn_vsh_shader[i] )
- (void) gl_delete_shader( NULL, &glsl_scrn_vsh_shader[i], NULL);
+ (void) gl_delete_shader(nullptr, &glsl_scrn_vsh_shader[i], nullptr);
if ( glsl_scrn_fsh_shader[i] )
- (void) gl_delete_shader( NULL, NULL, &glsl_scrn_fsh_shader[i]);
+ (void) gl_delete_shader(nullptr, nullptr, &glsl_scrn_fsh_shader[i]);
if ( glsl_scrn_programs[i] )
- (void) gl_delete_shader( &glsl_scrn_programs[i], NULL, NULL);
+ (void) gl_delete_shader( &glsl_scrn_programs[i], nullptr, nullptr);
}
free(shinfo);
@@ -213,7 +213,7 @@ int glsl_shader_add_mamebm(glsl_shader_info *shinfo, const char * custShaderPref
err = gl_compile_shader_files (&glsl_mamebm_programs[GLSL_SHADER_FEAT_CUSTOM+idx],
&glsl_mamebm_vsh_shader[GLSL_VERTEX_SHADER_CUSTOM+idx],
&glsl_mamebm_fsh_shader[GLSL_SHADER_FEAT_CUSTOM+idx],
- NULL /*precompiled*/, fname, 0);
+ nullptr /*precompiled*/, fname, 0);
return err;
}
@@ -233,6 +233,6 @@ int glsl_shader_add_scrn(glsl_shader_info *shinfo, const char * custShaderPrefix
err = gl_compile_shader_files (&glsl_scrn_programs[idx],
&glsl_scrn_vsh_shader[idx],
&glsl_scrn_fsh_shader[idx],
- NULL /*precompiled*/, fname, 0);
+ nullptr /*precompiled*/, fname, 0);
return err;
}
diff --git a/src/osd/modules/opengl/gl_shader_mgr.h b/src/osd/modules/opengl/gl_shader_mgr.h
index 532d40c30fe..b232243f636 100644
--- a/src/osd/modules/opengl/gl_shader_mgr.h
+++ b/src/osd/modules/opengl/gl_shader_mgr.h
@@ -26,7 +26,7 @@ struct glsl_shader_info
/**
- * returns pointer if ok, otherwise NULL
+ * returns pointer if ok, otherwise nullptr
*/
glsl_shader_info *glsl_shader_init(osd_gl_context *gl_ctx);
diff --git a/src/osd/modules/opengl/gl_shader_tool.cpp b/src/osd/modules/opengl/gl_shader_tool.cpp
index 8281691a607..5ee07661aa9 100644
--- a/src/osd/modules/opengl/gl_shader_tool.cpp
+++ b/src/osd/modules/opengl/gl_shader_tool.cpp
@@ -18,28 +18,28 @@
#include "emu.h"
#include "gl_shader_tool.h"
-PFNGLGETOBJECTPARAMETERIVARBPROC pfn_glGetObjectParameterivARB=NULL;
-PFNGLGETINFOLOGARBPROC pfn_glGetInfoLogARB=NULL;
-PFNGLDELETEOBJECTARBPROC pfn_glDeleteObjectARB=NULL;
-PFNGLCREATESHADEROBJECTARBPROC pfn_glCreateShaderObjectARB=NULL;
-PFNGLSHADERSOURCEARBPROC pfn_glShaderSourceARB=NULL;
-PFNGLCOMPILESHADERARBPROC pfn_glCompileShaderARB=NULL;
-PFNGLCREATEPROGRAMOBJECTARBPROC pfn_glCreateProgramObjectARB=NULL;
-PFNGLATTACHOBJECTARBPROC pfn_glAttachObjectARB=NULL;
-PFNGLLINKPROGRAMARBPROC pfn_glLinkProgramARB=NULL;
-PFNGLVALIDATEPROGRAMARBPROC pfn_glValidateProgramARB=NULL;
-PFNGLUSEPROGRAMOBJECTARBPROC pfn_glUseProgramObjectARB=NULL;
-PFNGLGETUNIFORMLOCATIONARBPROC pfn_glGetUniformLocationARB=NULL;
-PFNGLUNIFORM1FARBPROC pfn_glUniform1fARB=NULL;
-PFNGLUNIFORM1IARBPROC pfn_glUniform1iARB=NULL;
-PFNGLUNIFORM1FVARBPROC pfn_glUniform1fvARB=NULL;
-PFNGLUNIFORM2FVARBPROC pfn_glUniform2fvARB=NULL;
-PFNGLUNIFORM3FVARBPROC pfn_glUniform3fvARB=NULL;
-PFNGLUNIFORM4FVARBPROC pfn_glUniform4fvARB=NULL;
-PFNGLUNIFORM1IVARBPROC pfn_glUniform1ivARB=NULL;
-PFNGLUNIFORM2IVARBPROC pfn_glUniform2ivARB=NULL;
-PFNGLUNIFORM3IVARBPROC pfn_glUniform3ivARB=NULL;
-PFNGLUNIFORM4IVARBPROC pfn_glUniform4ivARB=NULL;
+PFNGLGETOBJECTPARAMETERIVARBPROC pfn_glGetObjectParameterivARB= nullptr;
+PFNGLGETINFOLOGARBPROC pfn_glGetInfoLogARB= nullptr;
+PFNGLDELETEOBJECTARBPROC pfn_glDeleteObjectARB= nullptr;
+PFNGLCREATESHADEROBJECTARBPROC pfn_glCreateShaderObjectARB= nullptr;
+PFNGLSHADERSOURCEARBPROC pfn_glShaderSourceARB= nullptr;
+PFNGLCOMPILESHADERARBPROC pfn_glCompileShaderARB= nullptr;
+PFNGLCREATEPROGRAMOBJECTARBPROC pfn_glCreateProgramObjectARB= nullptr;
+PFNGLATTACHOBJECTARBPROC pfn_glAttachObjectARB= nullptr;
+PFNGLLINKPROGRAMARBPROC pfn_glLinkProgramARB= nullptr;
+PFNGLVALIDATEPROGRAMARBPROC pfn_glValidateProgramARB= nullptr;
+PFNGLUSEPROGRAMOBJECTARBPROC pfn_glUseProgramObjectARB= nullptr;
+PFNGLGETUNIFORMLOCATIONARBPROC pfn_glGetUniformLocationARB= nullptr;
+PFNGLUNIFORM1FARBPROC pfn_glUniform1fARB= nullptr;
+PFNGLUNIFORM1IARBPROC pfn_glUniform1iARB= nullptr;
+PFNGLUNIFORM1FVARBPROC pfn_glUniform1fvARB= nullptr;
+PFNGLUNIFORM2FVARBPROC pfn_glUniform2fvARB= nullptr;
+PFNGLUNIFORM3FVARBPROC pfn_glUniform3fvARB= nullptr;
+PFNGLUNIFORM4FVARBPROC pfn_glUniform4fvARB= nullptr;
+PFNGLUNIFORM1IVARBPROC pfn_glUniform1ivARB= nullptr;
+PFNGLUNIFORM2IVARBPROC pfn_glUniform2ivARB= nullptr;
+PFNGLUNIFORM3IVARBPROC pfn_glUniform3ivARB= nullptr;
+PFNGLUNIFORM4IVARBPROC pfn_glUniform4ivARB= nullptr;
int gl_shader_loadExtention(osd_gl_context *gl_ctx)
@@ -256,7 +256,7 @@ int gl_texture_check_size(GLenum target, GLint level, GLint internalFormat, GLsi
glTexImage2D (texTargetProxy, level,
internalFormat,
width, height,
- border, format, type, NULL);
+ border, format, type, nullptr);
if ( 0!=(err=GL_CHECK_ERROR_NORMAL() )) return err;
glGetTexLevelParameteriv( texTargetProxy, level, GL_TEXTURE_WIDTH, avail_width);
@@ -305,7 +305,7 @@ static int delete_shader_tool( GLhandleARB *program, GLhandleARB *vertex_shader,
int res=0;
GL_CHECK_ERROR_QUIET();
- if(program!=NULL && *program!=0)
+ if(program!= nullptr && *program!=0)
{
pfn_glDeleteObjectARB(*program);
if(externalcall)
@@ -314,7 +314,7 @@ static int delete_shader_tool( GLhandleARB *program, GLhandleARB *vertex_shader,
}
*program=0;
}
- if(vertex_shader!=NULL && *vertex_shader!=0)
+ if(vertex_shader!= nullptr && *vertex_shader!=0)
{
pfn_glDeleteObjectARB(*vertex_shader);
if(externalcall)
@@ -323,7 +323,7 @@ static int delete_shader_tool( GLhandleARB *program, GLhandleARB *vertex_shader,
}
*vertex_shader=0;
}
- if(fragment_shader!=NULL && *fragment_shader!=0)
+ if(fragment_shader!= nullptr && *fragment_shader!=0)
{
pfn_glDeleteObjectARB(*fragment_shader);
if(externalcall)
@@ -340,19 +340,19 @@ int gl_compile_shader_source( GLhandleARB *shader, GLenum type, const char * sha
{
int err = 0;
- if(shader==NULL || shader_source==NULL)
+ if(shader== nullptr || shader_source== nullptr)
{
- if(shader==NULL)
- osd_printf_warning("error: gl_compile_shader_source: NULL shader passed\n");
- if(shader_source==NULL)
- osd_printf_warning("error: gl_compile_shader_source: NULL shader source passed\n");
+ if(shader== nullptr)
+ osd_printf_warning("error: gl_compile_shader_source: nullptr shader passed\n");
+ if(shader_source== nullptr)
+ osd_printf_warning("error: gl_compile_shader_source: nullptr shader source passed\n");
return -1;
}
*shader = pfn_glCreateShaderObjectARB(type);
err=GL_SHADER_CHECK(*shader, GL_OBJECT_TYPE_ARB);
if(err) goto errout;
- pfn_glShaderSourceARB(*shader, 1, (const GLcharARB **)&shader_source, NULL);
+ pfn_glShaderSourceARB(*shader, 1, (const GLcharARB **)&shader_source, nullptr);
pfn_glCompileShaderARB(*shader);
err=GL_SHADER_CHECK(*shader, GL_OBJECT_COMPILE_STATUS_ARB);
@@ -374,12 +374,12 @@ errout:
int gl_compile_shader_file( GLhandleARB *shader, GLenum type, const char * shader_file, int verbose )
{
- if(shader==NULL || shader_file==NULL)
+ if(shader== nullptr || shader_file== nullptr)
{
- if(shader==NULL)
- osd_printf_warning("error: gl_compile_shader_source: NULL shader passed\n");
- if(shader_file==NULL)
- osd_printf_warning("error: gl_compile_shader_source: NULL shader file passed\n");
+ if(shader== nullptr)
+ osd_printf_warning("error: gl_compile_shader_source: nullptr shader passed\n");
+ if(shader_file== nullptr)
+ osd_printf_warning("error: gl_compile_shader_source: nullptr shader file passed\n");
return -1;
}
diff --git a/src/osd/modules/osdmodule.cpp b/src/osd/modules/osdmodule.cpp
index 1c745effc6c..8ebf72f4cd4 100644
--- a/src/osd/modules/osdmodule.cpp
+++ b/src/osd/modules/osdmodule.cpp
@@ -44,7 +44,7 @@ void osd_module_manager::register_module(const module_type &mod_type)
}
}
-bool osd_module_manager::type_has_name(const char *type, const char *name)
+bool osd_module_manager::type_has_name(const char *type, const char *name) const
{
return (get_module_index(type, name) >= 0);
}
@@ -91,7 +91,7 @@ void osd_module_manager::exit()
}
}
-int osd_module_manager::get_module_index(const char *type, const char *name)
+int osd_module_manager::get_module_index(const char *type, const char *name) const
{
for (int i = 0; m_modules[i] != nullptr; i++)
{
@@ -101,7 +101,7 @@ int osd_module_manager::get_module_index(const char *type, const char *name)
return -1;
}
-void osd_module_manager::get_module_names(const char *type, const int max, int *num, const char *names[])
+void osd_module_manager::get_module_names(const char *type, const int max, int *num, const char *names[]) const
{
*num = 0;
for (int i = 0; m_modules[i] != nullptr; i++)
diff --git a/src/osd/modules/osdmodule.h b/src/osd/modules/osdmodule.h
index 1e545aa299b..1aa6c494855 100644
--- a/src/osd/modules/osdmodule.h
+++ b/src/osd/modules/osdmodule.h
@@ -68,7 +68,7 @@ public:
~osd_module_manager();
void register_module(const module_type &mod_type);
- bool type_has_name(const char *type, const char *name);
+ bool type_has_name(const char *type, const char *name) const;
osd_module *get_module_generic(const char *type, const char *name);
@@ -80,14 +80,14 @@ public:
osd_module *select_module(const char *type, const char *name = "");
- void get_module_names(const char *type, const int max, int *num, const char *names[]);
+ void get_module_names(const char *type, const int max, int *num, const char *names[]) const;
void init(const osd_options &options);
void exit();
private:
- int get_module_index(const char *type, const char *name);
+ int get_module_index(const char *type, const char *name) const;
osd_module *m_modules[MAX_MODULES];
osd_module *m_selected[MAX_MODULES];
diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h
index 05b1020d9ab..7f20c7c7b62 100644
--- a/src/osd/modules/osdwindow.h
+++ b/src/osd/modules/osdwindow.h
@@ -53,7 +53,7 @@ class osd_monitor_info
{
public:
osd_monitor_info(void *handle, const char *monitor_device, float aspect)
- : m_next(NULL), m_handle(handle), m_aspect(aspect)
+ : m_next(nullptr), m_is_primary(false), m_handle(handle), m_aspect(aspect)
{
strncpy(m_name, monitor_device, ARRAY_LENGTH(m_name) - 1);
}
@@ -62,21 +62,21 @@ public:
virtual void refresh() = 0;
- const void *oshandle() { return m_handle; }
+ const void *oshandle() const { return m_handle; }
- const osd_rect &position_size() { return m_pos_size; }
- const osd_rect &usuable_position_size() { return m_usuable_pos_size; }
+ const osd_rect &position_size() const { return m_pos_size; }
+ const osd_rect &usuable_position_size() const { return m_usuable_pos_size; }
const char *devicename() { return m_name[0] ? m_name : "UNKNOWN"; }
- float aspect() { return m_aspect; }
- float pixel_aspect() { return m_aspect / ((float)m_pos_size.width() / (float)m_pos_size.height()); }
+ float aspect() const { return m_aspect; }
+ float pixel_aspect() const { return m_aspect / ((float)m_pos_size.width() / (float)m_pos_size.height()); }
- void update_resolution(const int new_width, const int new_height) { m_pos_size.resize(new_width, new_height); }
+ void update_resolution(const int new_width, const int new_height) const { m_pos_size.resize(new_width, new_height); }
void set_aspect(const float a) { m_aspect = a; }
- bool is_primary() { return m_is_primary; }
+ bool is_primary() const { return m_is_primary; }
- osd_monitor_info * next() { return m_next; } // pointer to next monitor in list
+ osd_monitor_info * next() const { return m_next; } // pointer to next monitor in list
static osd_monitor_info *pick_monitor(osd_options &options, int index);
static osd_monitor_info *list;
@@ -114,7 +114,7 @@ public:
osd_window()
:
#ifndef OSD_SDL
- m_dc(0), m_resize_state(0),
+ m_dc(nullptr), m_resize_state(0),
#endif
m_primlist(nullptr),
m_index(0),
@@ -162,7 +162,7 @@ public:
m_platform_window = window;
}
- std::shared_ptr<osd_window> main_window() { return m_main; }
+ std::shared_ptr<osd_window> main_window() const { return m_main; }
void set_main_window(std::shared_ptr<osd_window> main) { m_main = main; }
// Clips the pointer to the bounds of this window
@@ -176,7 +176,7 @@ public:
#ifndef OSD_SDL
virtual bool win_has_menu() = 0;
- // FIXME: cann we replace winwindow_video_window_monitor(NULL) with monitor() ?
+ // FIXME: cann we replace winwindow_video_window_monitor(nullptr) with monitor() ?
virtual osd_monitor_info *winwindow_video_window_monitor(const osd_rect *proposed) = 0;
HDC m_dc; // only used by GDI renderer!
@@ -225,7 +225,7 @@ public:
return m_window.lock();
}
- bool has_flags(const int flag) { return ((m_flags & flag)) == flag; }
+ bool has_flags(const int flag) const { return ((m_flags & flag)) == flag; }
void set_flags(int aflag) { m_flags |= aflag; }
void clear_flags(int aflag) { m_flags &= ~aflag; }
diff --git a/src/osd/modules/output/network.cpp b/src/osd/modules/output/network.cpp
index 3bca29f3dbb..95f898fbf41 100644
--- a/src/osd/modules/output/network.cpp
+++ b/src/osd/modules/output/network.cpp
@@ -27,8 +27,8 @@ public:
virtual ~output_network_server() { delete m_tcp_server; }
- void terminate_all() { m_tcp_server->terminate(); }
- void send_to_all(const uint8_t* data, size_t len) { m_tcp_server->send_to_all(data,len); }
+ void terminate_all() const { m_tcp_server->terminate(); }
+ void send_to_all(const uint8_t* data, size_t len) const { m_tcp_server->send_to_all(data,len); }
/* Pure virtual methods inherited from raw_tcp_server::listener. */
virtual void on_raw_tcp_connection_closed(raw_tcp_server* tcpServer, raw_tcp_connection* connection, bool is_closed_by_peer) override { }
diff --git a/src/osd/modules/render/bgfx/chain.h b/src/osd/modules/render/bgfx/chain.h
index 465e44fea85..4e7a0587cd9 100644
--- a/src/osd/modules/render/bgfx/chain.h
+++ b/src/osd/modules/render/bgfx/chain.h
@@ -35,6 +35,7 @@ public:
// Getters
std::vector<bgfx_slider*>& sliders() { return m_sliders; }
+ std::vector<bgfx_chain_entry*>& entries() { return m_entries; }
uint32_t applicable_passes();
bool transform() { return m_transform; }
diff --git a/src/osd/modules/render/bgfx/chainentry.cpp b/src/osd/modules/render/bgfx/chainentry.cpp
index fc97e909260..ec802e83699 100644
--- a/src/osd/modules/render/bgfx/chainentry.cpp
+++ b/src/osd/modules/render/bgfx/chainentry.cpp
@@ -28,7 +28,7 @@
#include "render.h"
-bgfx_chain_entry::bgfx_chain_entry(std::string name, bgfx_effect* effect, clear_state* clear, std::vector<bgfx_suppressor*> suppressors, std::vector<bgfx_input_pair> inputs, std::vector<bgfx_entry_uniform*> uniforms, target_manager& targets, std::string output)
+bgfx_chain_entry::bgfx_chain_entry(std::string name, bgfx_effect* effect, clear_state* clear, std::vector<bgfx_suppressor*> suppressors, std::vector<bgfx_input_pair*> inputs, std::vector<bgfx_entry_uniform*> uniforms, target_manager& targets, std::string output)
: m_name(name)
, m_effect(effect)
, m_clear(clear)
@@ -42,6 +42,11 @@ bgfx_chain_entry::bgfx_chain_entry(std::string name, bgfx_effect* effect, clear_
bgfx_chain_entry::~bgfx_chain_entry()
{
+ for (bgfx_input_pair* input : m_inputs)
+ {
+ delete input;
+ }
+ m_inputs.clear();
for (bgfx_entry_uniform* uniform : m_uniforms)
{
delete uniform;
@@ -59,9 +64,9 @@ void bgfx_chain_entry::submit(int view, render_primitive* prim, texture_manager&
return;
}
- for (bgfx_input_pair input : m_inputs)
+ for (bgfx_input_pair* input : m_inputs)
{
- input.bind(m_effect, m_targets, textures, screen);
+ input->bind(m_effect, screen);
}
bgfx::TransientVertexBuffer buffer;
@@ -92,7 +97,7 @@ void bgfx_chain_entry::setup_screensize_uniforms(texture_manager& textures, uint
float height = screen_height;
if (m_inputs.size() > 0)
{
- std::string name = m_inputs[0].texture() + std::to_string(screen);
+ std::string name = m_inputs[0]->texture() + std::to_string(screen);
width = float(textures.provider(name)->width());
height = float(textures.provider(name)->height());
}
@@ -181,7 +186,7 @@ void bgfx_chain_entry::setup_quaddims_uniform(render_primitive* prim) const
bgfx_uniform* quad_dims_uniform = m_effect->uniform("u_quad_dims");
if (quad_dims_uniform != nullptr)
{
- float values[2] = { (prim->bounds.x1 - prim->bounds.x0) + 0.5f, (prim->bounds.y1 - prim->bounds.y0) + 0.5f};
+ float values[2] = { float(floor((prim->bounds.x1 - prim->bounds.x0) + 0.5f)), float(floor((prim->bounds.y1 - prim->bounds.y0) + 0.5f)) };
quad_dims_uniform->set(values, sizeof(float) * 2);
}
}
diff --git a/src/osd/modules/render/bgfx/chainentry.h b/src/osd/modules/render/bgfx/chainentry.h
index d6452861de2..271941537a7 100644
--- a/src/osd/modules/render/bgfx/chainentry.h
+++ b/src/osd/modules/render/bgfx/chainentry.h
@@ -34,13 +34,14 @@ class target_manager;
class bgfx_chain_entry
{
public:
- bgfx_chain_entry(std::string name, bgfx_effect* effect, clear_state* clear, std::vector<bgfx_suppressor*> suppressors, std::vector<bgfx_input_pair> inputs, std::vector<bgfx_entry_uniform*> uniforms, target_manager& targets, std::string output);
+ bgfx_chain_entry(std::string name, bgfx_effect* effect, clear_state* clear, std::vector<bgfx_suppressor*> suppressors, std::vector<bgfx_input_pair*> inputs, std::vector<bgfx_entry_uniform*> uniforms, target_manager& targets, std::string output);
~bgfx_chain_entry();
void submit(int view, render_primitive* prim, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, float screen_scale_x, float screen_scale_y, float screen_offset_x, float screen_offset_y, uint32_t rotation_type, bool swap_xy, uint64_t blend, int32_t screen);
// Getters
std::string name() const { return m_name; }
+ std::vector<bgfx_input_pair*>& inputs() { return m_inputs; }
bool skip();
private:
@@ -62,7 +63,7 @@ private:
bgfx_effect* m_effect;
clear_state* m_clear;
std::vector<bgfx_suppressor*> m_suppressors;
- std::vector<bgfx_input_pair> m_inputs;
+ std::vector<bgfx_input_pair*> m_inputs;
std::vector<bgfx_entry_uniform*> m_uniforms;
target_manager& m_targets;
std::string m_output;
diff --git a/src/osd/modules/render/bgfx/chainentryreader.cpp b/src/osd/modules/render/bgfx/chainentryreader.cpp
index c3f214f1d3e..39edd9f685c 100644
--- a/src/osd/modules/render/bgfx/chainentryreader.cpp
+++ b/src/osd/modules/render/bgfx/chainentryreader.cpp
@@ -20,6 +20,7 @@
#include "targetmanager.h"
#include "effectmanager.h"
#include "chainentry.h"
+#include "chainmanager.h"
#include "slider.h"
#include "inputpair.h"
#include "entryuniform.h"
@@ -29,7 +30,7 @@
#include "clear.h"
#include "clearreader.h"
-bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::string prefix, osd_options& options, texture_manager& textures, target_manager& targets, effect_manager& effects, std::map<std::string, bgfx_slider*>& sliders, std::map<std::string, bgfx_parameter*>& params, uint32_t screen_index)
+bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::string prefix, chain_manager& chains, std::map<std::string, bgfx_slider*>& sliders, std::map<std::string, bgfx_parameter*>& params, uint32_t screen_index)
{
if (!validate_parameters(value, prefix))
{
@@ -37,7 +38,7 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s
return nullptr;
}
- bgfx_effect* effect = effects.effect(value["effect"].GetString());
+ bgfx_effect* effect = chains.effects().effect(value["effect"].GetString());
if (effect == nullptr)
{
return nullptr;
@@ -45,7 +46,7 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s
std::string name = value["name"].GetString();
- std::vector<bgfx_input_pair> inputs;
+ std::vector<bgfx_input_pair*> inputs;
if (value.HasMember("input"))
{
const Value& input_array = value["input"];
@@ -62,19 +63,105 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s
if (!READER_CHECK(!has_target || input["target"].IsString(), (prefix + "input[" + std::to_string(i) + ": Value 'target' must be a string\n").c_str())) return nullptr;
if (!READER_CHECK(!has_option || input["option"].IsString(), (prefix + "input[" + std::to_string(i) + ": Value 'option' must be a string\n").c_str())) return nullptr;
if (!READER_CHECK(has_target || !input.HasMember("bilinear") || input["bilinear"].IsBool(), (prefix + "input[" + std::to_string(i) + ": Value 'bilinear' must be a boolean\n").c_str())) return nullptr;
+ if (!READER_CHECK(has_texture || has_option || !input.HasMember("selection") || input["selection"].IsString(), (prefix + "input[" + std::to_string(i) + ": Value 'selection' must be a string\n").c_str())) return nullptr;
+ bool bilinear = get_bool(input, "bilinear", true);
+ std::string selection = get_string(input, "selection", "");
+ std::vector<std::string> texture_names;
std::string texture_name = "";
- if (has_texture)
+ if (has_texture || has_option)
{
- texture_name = input["texture"].GetString();
- if (texture_name != "screen")
+ if (has_texture)
{
- bool bilinear = get_bool(input, "bilinear", true);
- uint32_t flags = bilinear ? 0 : (BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
- bgfx_texture* texture = textures.create_png_texture(options.art_path(), texture_name, texture_name, flags, screen_index);
- if (texture == nullptr)
+ texture_name = input["texture"].GetString();
+ }
+ if (has_option)
+ {
+ std::string option = input["option"].GetString();
+
+ texture_name = chains.options().value(option.c_str());
+ }
+
+ if (texture_name != "" && texture_name != "screen")
+ {
+ if (selection == "")
{
- return nullptr;
+ // create texture for specified file name
+ uint32_t flags = bilinear ? 0 : (BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
+ bgfx_texture* texture = chains.textures().create_png_texture(chains.options().art_path(), texture_name, texture_name, flags, screen_index);
+ if (texture == nullptr)
+ {
+ return nullptr;
+ }
+ }
+ else
+ {
+ // create texture for specified file name
+ uint32_t flags = bilinear ? 0 : (BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
+ bgfx_texture* texture = chains.textures().create_png_texture(chains.options().art_path(), texture_name, texture_name, flags, screen_index);
+ if (texture == nullptr)
+ {
+ return nullptr;
+ }
+
+ // get directory of file
+ std::string directory_path = std::string(chains.options().art_path());
+ std::string file_directory = "";
+ const size_t last_slash = texture_name.rfind('/');
+ if (last_slash != std::string::npos)
+ {
+ file_directory = texture_name.substr(0, last_slash);
+
+ directory_path += "/" + file_directory;
+ }
+
+ osd_directory *directory = osd_opendir(directory_path.c_str());
+ if (directory != nullptr)
+ {
+ for (const osd_directory_entry *entry = osd_readdir(directory); entry != nullptr; entry = osd_readdir(directory))
+ {
+ if (entry->type == ENTTYPE_FILE)
+ {
+ std::string file(entry->name);
+ std::string extension(".png");
+
+ // split into file name and extension
+ std::string file_name;
+ std::string file_extension;
+ const size_t last_dot = file.rfind('.');
+ if (last_dot != std::string::npos)
+ {
+ file_name = file.substr(0, last_dot);
+ file_extension = file.substr(last_dot, file.length() - last_dot);
+ }
+
+ std::string file_path;
+ if (file_directory == "")
+ {
+ file_path = file;
+ }
+ else
+ {
+ file_path = file_directory + "/" + file;
+ }
+
+ // check for .png extension
+ if (file_extension == extension)
+ {
+ // create textures for all files containd in the path of the specified file name
+ uint32_t flags = bilinear ? 0 : (BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
+ bgfx_texture* texture = chains.textures().create_png_texture(chains.options().art_path(), file_path, file_path, flags, screen_index);
+ if (texture == nullptr)
+ {
+ return nullptr;
+ }
+ texture_names.push_back(file_path);
+ }
+ }
+ }
+
+ osd_closedir(directory);
+ }
}
}
}
@@ -82,24 +169,14 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s
{
texture_name = input["target"].GetString();
}
- else if (has_option)
- {
- bool bilinear = get_bool(input, "bilinear", true);
- uint32_t flags = bilinear ? 0 : (BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
- texture_name = input["option"].GetString();
- bgfx_texture* texture = textures.create_png_texture(options.art_path(), options.value(texture_name.c_str()), texture_name, flags, screen_index);
- if (texture == nullptr)
- {
- return nullptr;
- }
- }
else
{
return nullptr;
}
std::string sampler = input["sampler"].GetString();
- inputs.push_back(bgfx_input_pair(i, sampler, texture_name));
+ bgfx_input_pair* input_pair = new bgfx_input_pair(i, sampler, texture_name, texture_names, selection, chains, screen_index);
+ inputs.push_back(input_pair);
}
}
@@ -148,7 +225,7 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s
}
std::string output = value["output"].GetString();
- return new bgfx_chain_entry(name, effect, clear, suppressors, inputs, uniforms, targets, output);
+ return new bgfx_chain_entry(name, effect, clear, suppressors, inputs, uniforms, chains.targets(), output);
}
bool chain_entry_reader::validate_parameters(const Value& value, std::string prefix)
diff --git a/src/osd/modules/render/bgfx/chainentryreader.h b/src/osd/modules/render/bgfx/chainentryreader.h
index 267fe63948e..0f604e9a71f 100644
--- a/src/osd/modules/render/bgfx/chainentryreader.h
+++ b/src/osd/modules/render/bgfx/chainentryreader.h
@@ -15,18 +15,15 @@
#include "statereader.h"
-class osd_options;
class bgfx_chain_entry;
-class texture_manager;
-class target_manager;
-class effect_manager;
class bgfx_slider;
class bgfx_parameter;
+class chain_manager;
class chain_entry_reader : public state_reader
{
public:
- static bgfx_chain_entry* read_from_value(const Value& value, std::string prefix, osd_options& options, texture_manager& textures, target_manager& targets, effect_manager& effects, std::map<std::string, bgfx_slider*>& sliders, std::map<std::string, bgfx_parameter*>& params, uint32_t screen_index);
+ static bgfx_chain_entry* read_from_value(const Value& value, std::string prefix, chain_manager& chains, std::map<std::string, bgfx_slider*>& sliders, std::map<std::string, bgfx_parameter*>& params, uint32_t screen_index);
private:
static bool validate_parameters(const Value& value, std::string prefix);
diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp
index 1d5c162c61f..70d678d1f2b 100644
--- a/src/osd/modules/render/bgfx/chainmanager.cpp
+++ b/src/osd/modules/render/bgfx/chainmanager.cpp
@@ -59,9 +59,9 @@ chain_manager::~chain_manager()
void chain_manager::refresh_available_chains()
{
m_available_chains.clear();
- m_available_chains.push_back("none");
+ m_available_chains.push_back(chain_desc("none", ""));
- find_available_chains(std::string(m_options.bgfx_path()) + "/chains");
+ find_available_chains(std::string(m_options.bgfx_path()) + "/chains", "");
destroy_unloaded_chains();
}
@@ -74,9 +74,9 @@ void chain_manager::destroy_unloaded_chains()
std::string name = m_chain_names[i];
if (name.length() > 0)
{
- for (std::string available_name : m_available_chains)
+ for (chain_desc desc : m_available_chains)
{
- if (available_name == name)
+ if (desc.m_name == name)
{
delete m_screen_chains[i];
m_chain_names[i] = "";
@@ -88,9 +88,9 @@ void chain_manager::destroy_unloaded_chains()
}
}
-void chain_manager::find_available_chains(std::string path)
+void chain_manager::find_available_chains(std::string root, std::string path)
{
- osd_directory *directory = osd_opendir(path.c_str());
+ osd_directory *directory = osd_opendir((root + path).c_str());
if (directory != nullptr)
{
for (const osd_directory_entry *entry = osd_readdir(directory); entry != nullptr; entry = osd_readdir(directory))
@@ -109,7 +109,7 @@ void chain_manager::find_available_chains(std::string path)
// Does it end in .json?
if (test_segment == extension)
{
- m_available_chains.push_back(name.substr(0, start));
+ m_available_chains.push_back(chain_desc(name.substr(0, start), path));
}
}
}
@@ -118,7 +118,12 @@ void chain_manager::find_available_chains(std::string path)
std::string name = entry->name;
if (!(name == "." || name == ".."))
{
- find_available_chains(path + PATH_SEPARATOR + name);
+ std::string appended_path = path + "/" + name;
+ if (path.length() == 0)
+ {
+ appended_path = name;
+ }
+ find_available_chains(root, path + "/" + name);
}
}
}
@@ -162,7 +167,7 @@ bgfx_chain* chain_manager::load_chain(std::string name, uint32_t screen_index)
return nullptr;
}
- bgfx_chain* chain = chain_reader::read_from_value(document, name + ": ", m_options, m_machine, m_window_index, screen_index, m_textures, m_targets, m_effects);
+ bgfx_chain* chain = chain_reader::read_from_value(document, name + ": ", *this, screen_index);
if (chain == nullptr)
{
@@ -189,7 +194,7 @@ void chain_manager::parse_chain_selections(std::string chain_str)
size_t chain_index = 0;
for (chain_index = 0; chain_index < m_available_chains.size(); chain_index++)
{
- if (m_available_chains[chain_index] == chain_names[index])
+ if (m_available_chains[chain_index].m_name == chain_names[index])
{
break;
}
@@ -198,7 +203,7 @@ void chain_manager::parse_chain_selections(std::string chain_str)
if (chain_index < m_available_chains.size())
{
m_current_chain[index] = chain_index;
- m_chain_names[index] = m_available_chains[chain_index];
+ m_chain_names[index] = m_available_chains[chain_index].m_name;
}
else
{
@@ -240,8 +245,9 @@ void chain_manager::load_chains()
{
if (m_current_chain[chain] != CHAIN_NONE)
{
- m_chain_names[chain] = m_available_chains[m_current_chain[chain]];
- m_screen_chains[chain] = load_chain(m_chain_names[chain], uint32_t(chain));
+ chain_desc& desc = m_available_chains[m_current_chain[chain]];
+ m_chain_names[chain] = desc.m_name;
+ m_screen_chains[chain] = load_chain(desc.m_path + "/" + desc.m_name, uint32_t(chain));
}
}
}
@@ -369,7 +375,7 @@ int32_t chain_manager::chain_changed(int32_t id, std::string *str, int32_t newva
if (str != nullptr)
{
- *str = string_format("%s", m_available_chains[m_current_chain[id]].c_str());
+ *str = string_format("%s", m_available_chains[m_current_chain[id]].m_name.c_str());
}
return m_current_chain[id];
@@ -472,6 +478,20 @@ std::vector<ui_menu_item> chain_manager::get_slider_list()
continue;
}
+ std::vector<bgfx_chain_entry*> chain_entries = chain->entries();
+ for (bgfx_chain_entry* entry : chain_entries)
+ {
+ std::vector<bgfx_input_pair*> entry_inputs = entry->inputs();
+ for (bgfx_input_pair* input : entry_inputs)
+ {
+ std::vector<ui_menu_item> input_sliders = input->get_slider_list();
+ for (ui_menu_item slider : input_sliders)
+ {
+ sliders.push_back(slider);
+ }
+ }
+ }
+
std::vector<bgfx_slider*> chain_sliders = chain->sliders();
for (bgfx_slider* slider : chain_sliders)
{
diff --git a/src/osd/modules/render/bgfx/chainmanager.h b/src/osd/modules/render/bgfx/chainmanager.h
index 022dbecfa14..022fe6e3b2e 100644
--- a/src/osd/modules/render/bgfx/chainmanager.h
+++ b/src/osd/modules/render/bgfx/chainmanager.h
@@ -25,10 +25,24 @@
class running_machine;
class osd_window;
class slider_dirty_notifier;
+class render_primitive;
class bgfx_chain;
class bgfx_slider;
+class chain_desc
+{
+public:
+ chain_desc(std::string name, std::string path)
+ : m_name(name)
+ , m_path(path)
+ {
+ }
+
+ const std::string m_name;
+ const std::string m_path;
+};
+
class chain_manager
{
public:
@@ -39,6 +53,14 @@ public:
int32_t chain_changed(int32_t index, std::string *str, int32_t newval);
// Getters
+ running_machine& machine() { return m_machine; }
+ osd_options& options() { return m_options; }
+ texture_manager& textures() { return m_textures; }
+ target_manager& targets() { return m_targets; }
+ effect_manager& effects() { return m_effects; }
+ slider_dirty_notifier& slider_notifier() { return m_slider_notifier; }
+ uint32_t window_index() { return m_window_index; }
+ uint32_t screen_count() { return m_screen_count; }
bgfx_chain* screen_chain(uint32_t screen);
bgfx_chain* load_chain(std::string name, uint32_t screen_index);
bool has_applicable_chain(uint32_t screen);
@@ -51,7 +73,7 @@ private:
void refresh_available_chains();
void destroy_unloaded_chains();
- void find_available_chains(std::string path);
+ void find_available_chains(std::string root, std::string path);
void parse_chain_selections(std::string chain_str);
std::vector<std::string> split_option_string(std::string chain_str) const;
@@ -70,7 +92,7 @@ private:
uint32_t m_window_index;
slider_dirty_notifier& m_slider_notifier;
uint32_t m_screen_count;
- std::vector<std::string> m_available_chains;
+ std::vector<chain_desc> m_available_chains;
std::vector<bgfx_chain*> m_screen_chains;
std::vector<std::string> m_chain_names;
std::vector<ui_menu_item> m_selection_sliders;
diff --git a/src/osd/modules/render/bgfx/chainreader.cpp b/src/osd/modules/render/bgfx/chainreader.cpp
index 9e79eb1f19d..e92be498547 100644
--- a/src/osd/modules/render/bgfx/chainreader.cpp
+++ b/src/osd/modules/render/bgfx/chainreader.cpp
@@ -14,8 +14,8 @@
#include <modules/lib/osdobj_common.h>
#include "chainreader.h"
-
#include "chain.h"
+#include "chainmanager.h"
#include "sliderreader.h"
#include "paramreader.h"
#include "chainentryreader.h"
@@ -24,7 +24,7 @@
#include "slider.h"
#include "parameter.h"
-bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix, osd_options& options, running_machine& machine, uint32_t window_index, uint32_t screen_index, texture_manager& textures, target_manager& targets, effect_manager& effects)
+bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix, chain_manager& chains, uint32_t screen_index)
{
if (!validate_parameters(value, prefix))
{
@@ -41,7 +41,7 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
const Value& slider_array = value["sliders"];
for (UINT32 i = 0; i < slider_array.Size(); i++)
{
- std::vector<bgfx_slider*> expanded_sliders = slider_reader::read_from_value(slider_array[i], prefix + "sliders[" + std::to_string(i) + "]: ", machine, window_index, screen_index);
+ std::vector<bgfx_slider*> expanded_sliders = slider_reader::read_from_value(slider_array[i], prefix + "sliders[" + std::to_string(i) + "]: ", chains, screen_index);
if (expanded_sliders.size() == 0)
{
return nullptr;
@@ -74,7 +74,7 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
const Value& param_array = value["parameters"];
for (UINT32 i = 0; i < param_array.Size(); i++)
{
- bgfx_parameter* parameter = parameter_reader::read_from_value(param_array[i], prefix + "parameters[" + std::to_string(i) + "]; ", window_index);
+ bgfx_parameter* parameter = parameter_reader::read_from_value(param_array[i], prefix + "parameters[" + std::to_string(i) + "]; ", chains);
if (parameter == nullptr)
{
return nullptr;
@@ -98,7 +98,7 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
// TODO: Move into its own reader
for (UINT32 i = 0; i < target_array.Size(); i++)
{
- bgfx_target* target = target_reader::read_from_value(target_array[i], prefix + "targets[" + std::to_string(i) + "]: ", targets, options, screen_index);
+ bgfx_target* target = target_reader::read_from_value(target_array[i], prefix + "targets[" + std::to_string(i) + "]: ", chains, screen_index);
if (target == nullptr)
{
return nullptr;
@@ -114,7 +114,7 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
const Value& entry_array = value["passes"];
for (UINT32 i = 0; i < entry_array.Size(); i++)
{
- bgfx_chain_entry* entry = chain_entry_reader::read_from_value(entry_array[i], prefix + "passes[" + std::to_string(i) + "]: ", options, textures, targets, effects, slider_map, param_map, screen_index);
+ bgfx_chain_entry* entry = chain_entry_reader::read_from_value(entry_array[i], prefix + "passes[" + std::to_string(i) + "]: ", chains, slider_map, param_map, screen_index);
if (entry == nullptr)
{
return nullptr;
@@ -123,7 +123,7 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, std::string prefix
}
}
- return new bgfx_chain(name, author, transform, targets, sliders, parameters, entries, target_list, screen_index);
+ return new bgfx_chain(name, author, transform, chains.targets(), sliders, parameters, entries, target_list, screen_index);
}
bool chain_reader::validate_parameters(const Value& value, std::string prefix)
diff --git a/src/osd/modules/render/bgfx/chainreader.h b/src/osd/modules/render/bgfx/chainreader.h
index 80d298c7e4c..a2fa3ba28a5 100644
--- a/src/osd/modules/render/bgfx/chainreader.h
+++ b/src/osd/modules/render/bgfx/chainreader.h
@@ -14,14 +14,12 @@
#include "statereader.h"
class bgfx_chain;
-class texture_manager;
-class target_manager;
-class effect_manager;
+class chain_manager;
class chain_reader : public state_reader
{
public:
- static bgfx_chain* read_from_value(const Value& value, std::string prefix, osd_options& options, running_machine& machine, uint32_t window_index, uint32_t screen_index, texture_manager& textures, target_manager& targets, effect_manager& effects);
+ static bgfx_chain* read_from_value(const Value& value, std::string prefix, chain_manager& chains, uint32_t screen_index);
private:
static bool validate_parameters(const Value& value, std::string prefix);
diff --git a/src/osd/modules/render/bgfx/clearreader.cpp b/src/osd/modules/render/bgfx/clearreader.cpp
index 78c3d139d25..3cbd714463c 100644
--- a/src/osd/modules/render/bgfx/clearreader.cpp
+++ b/src/osd/modules/render/bgfx/clearreader.cpp
@@ -30,10 +30,10 @@ clear_state* clear_reader::read_from_value(const Value& value, std::string prefi
for (int i = 0; i < colors.Size(); i++)
{
if (!READER_CHECK(colors[i].IsNumber(), (prefix + "clearcolor[" + std::to_string(i) + "] must be a numeric value\n").c_str())) return nullptr;
- int32_t value = int32_t(float(colors[i].GetDouble()) * 255.0f);
- if (value > 255) value = 255;
- if (value < 0) value = 0;
- clear_color |= value << (24 - (i * 3));
+ int32_t val = int32_t(float(colors[i].GetDouble()) * 255.0f);
+ if (val > 255) val = 255;
+ if (val < 0) val = 0;
+ clear_color |= val << (24 - (i * 3));
}
clear_flags |= BGFX_CLEAR_COLOR;
}
diff --git a/src/osd/modules/render/bgfx/inputpair.cpp b/src/osd/modules/render/bgfx/inputpair.cpp
index d8777257187..4de54404a6b 100644
--- a/src/osd/modules/render/bgfx/inputpair.cpp
+++ b/src/osd/modules/render/bgfx/inputpair.cpp
@@ -9,29 +9,42 @@
//
//============================================================
+#include "ui/uimain.h"
+
#include "emucore.h"
#include "inputpair.h"
#include "texture.h"
#include "target.h"
#include "effect.h"
+#include "render.h"
#include "uniform.h"
-#include "texturemanager.h"
-#include "targetmanager.h"
+#include "chainmanager.h"
+#include "slider.h"
+#include "sliderdirtynotifier.h"
-bgfx_input_pair::bgfx_input_pair(int index, std::string sampler, std::string texture)
+bgfx_input_pair::bgfx_input_pair(int index, std::string sampler, std::string texture, std::vector<std::string> available_textures, std::string selection, chain_manager& chains, uint32_t screen_index)
: m_index(index)
, m_sampler(sampler)
, m_texture(texture)
+ , m_available_textures(available_textures)
+ , m_selection(selection)
+ , m_chains(chains)
{
+ if (m_available_textures.size() > 0)
+ {
+ m_current_texture = std::find(m_available_textures.begin(), m_available_textures.end(), m_texture) - m_available_textures.begin();
+
+ create_selection_slider(screen_index);
+ }
}
-void bgfx_input_pair::bind(bgfx_effect *effect, target_manager& targets, texture_manager& textures, const int32_t screen) const
+void bgfx_input_pair::bind(bgfx_effect *effect, const int32_t screen) const
{
assert(effect->uniform(m_sampler) != nullptr);
std::string name = m_texture + std::to_string(screen);
- bgfx_texture_handle_provider* provider = textures.provider(name);
+ bgfx_texture_handle_provider* provider = chains().textures().provider(name);
bgfx_uniform *tex_size = effect->uniform("u_tex_size" + std::to_string(m_index));
if (tex_size != nullptr)
{
@@ -39,5 +52,89 @@ void bgfx_input_pair::bind(bgfx_effect *effect, target_manager& targets, texture
tex_size->set(values, sizeof(float) * 2);
}
- bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), textures.handle(name));
+ bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), chains().textures().handle(name));
+}
+
+static INT32 update_trampoline(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
+{
+ if (arg != nullptr)
+ {
+ return reinterpret_cast<bgfx_input_pair*>(arg)->texture_changed(id, str, newval);
+ }
+ return 0;
+}
+
+int32_t bgfx_input_pair::texture_changed(int32_t id, std::string *str, int32_t newval)
+{
+ if (newval != SLIDER_NOCHANGE)
+ {
+ m_current_texture = newval;
+ m_texture = m_available_textures[m_current_texture];
+
+ chains().slider_notifier().set_sliders_dirty();
+ }
+
+ if (str != nullptr)
+ {
+ std::string file = m_texture;
+ const size_t last_slash = m_texture.rfind('/');
+ if (last_slash != std::string::npos)
+ {
+ file = m_texture.substr(last_slash + 1, m_texture.length() - (last_slash + 1));
+ }
+
+ std::string file_name;
+ const size_t last_dot = file.rfind('.');
+ if (last_dot != std::string::npos)
+ {
+ file_name = file.substr(0, last_dot);
+ }
+
+ *str = string_format("%s", file_name.c_str());
+ }
+
+ return m_current_texture;
+}
+
+void bgfx_input_pair::create_selection_slider(uint32_t screen_index)
+{
+ std::string description = "Window " + std::to_string(chains().window_index()) + ", Screen " + std::to_string(screen_index) + " " + m_selection + ":";
+ size_t size = sizeof(slider_state) + description.length();
+ slider_state *state = reinterpret_cast<slider_state *>(auto_alloc_array_clear(chains().machine(), UINT8, size));
+
+ state->minval = 0;
+ state->defval = m_current_texture;
+ state->maxval = m_available_textures.size() - 1;
+ state->incval = 1;
+ state->update = update_trampoline;
+ state->arg = this;
+ state->id = screen_index;
+ strcpy(state->description, description.c_str());
+
+ ui_menu_item item;
+ item.text = state->description;
+ item.subtext = "";
+ item.flags = 0;
+ item.ref = state;
+ item.type = ui_menu_item_type::SLIDER;
+ m_selection_slider = item;
+}
+
+bool bgfx_input_pair::needs_sliders()
+{
+ return chains().screen_count() > 0 && m_available_textures.size() > 1;
+}
+
+std::vector<ui_menu_item> bgfx_input_pair::get_slider_list()
+{
+ std::vector<ui_menu_item> sliders;
+
+ if (!needs_sliders())
+ {
+ return sliders;
+ }
+
+ sliders.push_back(m_selection_slider);
+
+ return sliders;
}
diff --git a/src/osd/modules/render/bgfx/inputpair.h b/src/osd/modules/render/bgfx/inputpair.h
index ae8e37981cc..550595a1c55 100644
--- a/src/osd/modules/render/bgfx/inputpair.h
+++ b/src/osd/modules/render/bgfx/inputpair.h
@@ -16,25 +16,37 @@
#include <string>
+#include "ui/uimain.h"
+
class bgfx_effect;
-class texture_manager;
-class target_manager;
+class chain_manager;
class bgfx_input_pair
{
public:
- bgfx_input_pair(int index, std::string sampler, std::string texture);
+ bgfx_input_pair(int index, std::string sampler, std::string texture, std::vector<std::string> available_textures, std::string selection, chain_manager& chains, uint32_t screen_index);
- void bind(bgfx_effect *effect, target_manager& targets, texture_manager& textures, const int32_t screen) const;
+ void bind(bgfx_effect *effect, const int32_t screen) const;
+ int32_t texture_changed(int32_t index, std::string *str, int32_t newval);
// Getters
+ chain_manager& chains() const { return m_chains; }
std::string sampler() const { return m_sampler; }
std::string texture() const { return m_texture; }
+ std::vector<ui_menu_item> get_slider_list();
private:
- int m_index;
- std::string m_sampler;
- std::string m_texture;
+ void create_selection_slider(uint32_t screen_index);
+ bool needs_sliders();
+
+ int m_index;
+ std::string m_sampler;
+ std::string m_texture;
+ std::vector<std::string> m_available_textures;
+ std::string m_selection;
+ chain_manager& m_chains;
+ int32_t m_current_texture;
+ ui_menu_item m_selection_slider;
};
#endif // __DRAWBGFX_INPUT_PAIR__
diff --git a/src/osd/modules/render/bgfx/paramreader.cpp b/src/osd/modules/render/bgfx/paramreader.cpp
index 20ea024c4e6..f24bb6a475b 100644
--- a/src/osd/modules/render/bgfx/paramreader.cpp
+++ b/src/osd/modules/render/bgfx/paramreader.cpp
@@ -14,6 +14,7 @@
#include "frameparameter.h"
#include "windowparameter.h"
#include "timeparameter.h"
+#include "chainmanager.h"
const parameter_reader::string_to_enum parameter_reader::TYPE_NAMES[parameter_reader::TYPE_COUNT] = {
{ "frame", bgfx_parameter::parameter_type::PARAM_FRAME },
@@ -21,7 +22,7 @@ const parameter_reader::string_to_enum parameter_reader::TYPE_NAMES[parameter_re
{ "time", bgfx_parameter::parameter_type::PARAM_TIME }
};
-bgfx_parameter* parameter_reader::read_from_value(const Value& value, std::string prefix, uint32_t window_index)
+bgfx_parameter* parameter_reader::read_from_value(const Value& value, std::string prefix, chain_manager& chains)
{
if (!validate_parameters(value, prefix))
{
@@ -38,7 +39,7 @@ bgfx_parameter* parameter_reader::read_from_value(const Value& value, std::strin
}
else if (type == bgfx_parameter::parameter_type::PARAM_WINDOW)
{
- return new bgfx_window_parameter(name, type, window_index);
+ return new bgfx_window_parameter(name, type, chains.window_index());
}
else if (type == bgfx_parameter::parameter_type::PARAM_TIME)
{
diff --git a/src/osd/modules/render/bgfx/paramreader.h b/src/osd/modules/render/bgfx/paramreader.h
index 74d55d31b0d..013d6589cc3 100644
--- a/src/osd/modules/render/bgfx/paramreader.h
+++ b/src/osd/modules/render/bgfx/paramreader.h
@@ -14,11 +14,12 @@
#include "statereader.h"
class bgfx_parameter;
+class chain_manager;
class parameter_reader : public state_reader
{
public:
- static bgfx_parameter* read_from_value(const Value& value, std::string prefix, uint32_t window_index);
+ static bgfx_parameter* read_from_value(const Value& value, std::string prefix, chain_manager& chains);
private:
static bool validate_parameters(const Value& value, std::string prefix);
diff --git a/src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc b/src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc
new file mode 100644
index 00000000000..78229ec9c49
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc
@@ -0,0 +1,64 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian Smart-Blur Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(s_p, 0);
+
+uniform vec4 SB_THRESHOLD;
+
+// Below the thresholds, blur is applied for each color channel.
+// Threshold is the max color differency among the eight pixel neighbors from central pixel.
+
+bool eq(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r < SB_THRESHOLD.r && df.g < SB_THRESHOLD.g && df.b < SB_THRESHOLD.b;
+}
+
+void main()
+{
+ vec3 A = texture2D(s_p, v_texcoord1.xw).xyz;
+ vec3 B = texture2D(s_p, v_texcoord1.yw).xyz;
+ vec3 C = texture2D(s_p, v_texcoord1.zw).xyz;
+ vec3 D = texture2D(s_p, v_texcoord2.xw).xyz;
+ vec3 E = texture2D(s_p, v_texcoord2.yw).xyz;
+ vec3 F = texture2D(s_p, v_texcoord2.zw).xyz;
+ vec3 G = texture2D(s_p, v_texcoord3.xw).xyz;
+ vec3 H = texture2D(s_p, v_texcoord3.yw).xyz;
+ vec3 I = texture2D(s_p, v_texcoord3.zw).xyz;
+
+ if (eq(E,F) && eq(E,H) && eq(E,I) && eq(E,B) && eq(E,C) && eq(E,A) && eq(E,D) && eq(E,G))
+ {
+ E = (A + B + C + D + E + F + G + H + I) / 9.0;
+ }
+
+ gl_FragColor = vec4(E, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq2x/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/blurs/varying.def.sc
index 57a7a910952..57a7a910952 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq2x/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/blurs/varying.def.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc b/src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc
new file mode 100644
index 00000000000..c82d7c82bec
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc
@@ -0,0 +1,48 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian Smart-Blur Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, -dy); // A B C
+ v_texcoord2 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, 0.0); // D E F
+ v_texcoord3 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, dy); // G H I
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_eagle.sc b/src/osd/modules/render/bgfx/shaders/chains/eagle/fs_eagle.sc
index a07a848ffbd..a07a848ffbd 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_eagle.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/eagle/fs_eagle.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/eagle/varying.def.sc
index 7adabc462e5..7adabc462e5 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/eagle/varying.def.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_eagle.sc b/src/osd/modules/render/bgfx/shaders/chains/eagle/vs_eagle.sc
index d233629a036..d233629a036 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_eagle.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/eagle/vs_eagle.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
index 6434c3dae2f..ee2fd0fd148 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_post.sc
@@ -14,6 +14,7 @@ uniform vec4 u_source_dims; // size of the guest machine
uniform vec4 u_quad_dims;
uniform vec4 u_screen_scale;
uniform vec4 u_screen_offset;
+// uniform vec4 u_back_color; // TODO
// User-supplied
uniform vec4 u_scanline_alpha;
@@ -23,6 +24,7 @@ uniform vec4 u_scanline_bright_offset;
uniform vec4 u_scanline_jitter;
uniform vec4 u_scanline_height;
uniform vec4 u_scanline_variation;
+uniform vec4 u_shadow_tile_mode;
uniform vec4 u_shadow_alpha;
uniform vec4 u_shadow_count;
uniform vec4 u_shadow_uv;
@@ -61,32 +63,34 @@ vec2 GetAdjustedCoords(vec2 coord)
return coord;
}
-// vector screen has the same quad texture coordinates for every screen orientation, raster screen differs
vec2 GetShadowCoord(vec2 QuadCoord, vec2 SourceCoord)
{
- vec2 QuadTexel = vec2(1.0, 1.0) / (u_quad_dims.xy - 0.5f);
-
- vec2 canvasCoord = QuadCoord + u_shadow_uv_offset.xy / u_quad_dims.xy;
+ vec2 canvasCoord = u_shadow_tile_mode.x == 0.0
+ ? QuadCoord + u_shadow_uv_offset.xy / u_quad_dims.xy
+ : SourceCoord + u_shadow_uv_offset.xy / u_source_dims.xy;
+ vec2 canvasTexelDims = u_shadow_tile_mode.x == 0.0
+ ? vec2(1.0, 1.0) / u_quad_dims.xy
+ : vec2(1.0, 1.0) / u_source_dims.xy;
vec2 shadowUV = u_shadow_uv.xy;
vec2 shadowCount = u_shadow_count.xy;
// swap x/y in screen mode (not source mode)
- canvasCoord = u_swap_xy.x > 0.0
+ canvasCoord = u_shadow_tile_mode.x == 0.0 && u_swap_xy.x > 0.0
? canvasCoord.yx
: canvasCoord.xy;
// swap x/y in screen mode (not source mode)
- shadowCount = u_swap_xy.x > 0.0
+ shadowCount = u_shadow_tile_mode.x == 0.0 && u_swap_xy.x > 0.0
? shadowCount.yx
: shadowCount.xy;
- vec2 shadowTile = QuadTexel * shadowCount;
+ vec2 shadowTile = canvasTexelDims * shadowCount;
vec2 shadowFrac = fract(canvasCoord / shadowTile);
// swap x/y in screen mode (not source mode)
- shadowFrac = u_swap_xy.x > 0.0
+ shadowFrac = u_shadow_tile_mode.x == 0.0 && u_swap_xy.x > 0.0
? shadowFrac.yx
: shadowFrac.xy;
@@ -102,57 +106,66 @@ void main()
// Color
vec4 BaseColor = texture2D(s_tex, BaseCoord);
+ // Clamp
if (BaseCoord.x < 0.0 || BaseCoord.y < 0.0 || BaseCoord.x > 1.0 || BaseCoord.y > 1.0)
{
- BaseColor.rgb = vec3(0.0, 0.0, 0.0);
- }
-
- // Mask Simulation
- if (u_shadow_alpha.x > 0.0)
- {
- vec2 ShadowCoord = GetShadowCoord(v_texcoord0.xy, v_texcoord0.xy);
-
- vec4 ShadowColor = texture2D(s_shadow, ShadowCoord);
- vec3 ShadowMaskColor = mix(vec3(1.0, 1.0, 1.0), ShadowColor.rgb, u_shadow_alpha.xxx);
-
- // apply shadow mask color
- BaseColor.rgb *= ShadowMaskColor;
- }
-
- // Color Compression
- // increasing the floor of the signal without affecting the ceiling
- BaseColor.rgb = u_floor.rgb + (vec3(1.0, 1.0, 1.0) - u_floor.rgb) * BaseColor.rgb;
-
- // Color Power
- BaseColor.r = pow(BaseColor.r, u_power.r);
- BaseColor.g = pow(BaseColor.g, u_power.g);
- BaseColor.b = pow(BaseColor.b, u_power.b);
-
- // Scanline Simulation
- if (u_scanline_alpha.x > 0.0f)
- {
- float BrightnessOffset = (u_scanline_bright_offset.x * u_scanline_alpha.x);
- float BrightnessScale = (u_scanline_bright_scale.x * u_scanline_alpha.x) + (1.0 - u_scanline_alpha.x);
-
- float ColorBrightness = 0.299 * BaseColor.r + 0.587 * BaseColor.g + 0.114 * BaseColor.b;
-
- float ScanCoord = BaseCoord.y * u_source_dims.y * u_scanline_scale.x * 3.1415927; // PI
- float ScanCoordJitter = u_scanline_jitter.x * u_jitter_amount.x * 1.618034; // PHI
- float ScanSine = sin(ScanCoord + ScanCoordJitter);
- float ScanlineWide = u_scanline_height.x + u_scanline_variation.x * max(1.0, u_scanline_height.x) * (1.0 - ColorBrightness);
- float ScanSineScaled = pow(ScanSine * ScanSine, ScanlineWide);
- float ScanBrightness = ScanSineScaled * BrightnessScale + BrightnessOffset * BrightnessScale;
-
- BaseColor.rgb *= mix(vec3(1.0, 1.0, 1.0), vec3(ScanBrightness, ScanBrightness, ScanBrightness), u_scanline_alpha.xxx);
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
-
- // Hum Bar Simulation
- if (u_humbar_alpha.x > 0.0f)
+ else
{
- float HumTimeStep = fract(u_time.x * u_humbar_hertz_rate.x);
- float HumBrightness = 1.0 - fract(BaseCoord.y + HumTimeStep) * u_humbar_alpha.x;
- BaseColor.rgb *= HumBrightness;
+ // Mask Simulation
+ if (u_shadow_alpha.x > 0.0)
+ {
+ vec2 ShadowCoord = GetShadowCoord(v_texcoord0.xy, BaseCoord.xy);
+
+ vec4 ShadowColor = texture2D(s_shadow, ShadowCoord);
+ vec3 ShadowMaskColor = mix(vec3(1.0, 1.0, 1.0), ShadowColor.rgb, u_shadow_alpha.xxx);
+
+ // apply shadow mask color
+ BaseColor.rgb *= ShadowMaskColor;
+
+ // // TODO
+ // vec3 ShadowMaskClear = (1.0f - ShadowColor.a) * u_shadow_alpha.xxx;
+
+ // // clear shadow mask by background color
+ // BaseColor.rgb = mix(BaseColor.rgb, u_back_color.rgb, ShadowMaskClear);
+ }
+
+ // Color Compression
+ // increasing the floor of the signal without affecting the ceiling
+ BaseColor.rgb = u_floor.rgb + (vec3(1.0, 1.0, 1.0) - u_floor.rgb) * BaseColor.rgb;
+
+ // Color Power
+ BaseColor.r = pow(BaseColor.r, u_power.r);
+ BaseColor.g = pow(BaseColor.g, u_power.g);
+ BaseColor.b = pow(BaseColor.b, u_power.b);
+
+ // Scanline Simulation
+ if (u_scanline_alpha.x > 0.0f)
+ {
+ float BrightnessOffset = (u_scanline_bright_offset.x * u_scanline_alpha.x);
+ float BrightnessScale = (u_scanline_bright_scale.x * u_scanline_alpha.x) + (1.0 - u_scanline_alpha.x);
+
+ float ColorBrightness = 0.299 * BaseColor.r + 0.587 * BaseColor.g + 0.114 * BaseColor.b;
+
+ float ScanCoord = BaseCoord.y * u_source_dims.y * u_scanline_scale.x * 3.1415927; // PI
+ float ScanCoordJitter = u_scanline_jitter.x * u_jitter_amount.x * 1.618034; // PHI
+ float ScanSine = sin(ScanCoord + ScanCoordJitter);
+ float ScanlineWide = u_scanline_height.x + u_scanline_variation.x * max(1.0, u_scanline_height.x) * (1.0 - ColorBrightness);
+ float ScanSineScaled = pow(ScanSine * ScanSine, ScanlineWide);
+ float ScanBrightness = ScanSineScaled * BrightnessScale + BrightnessOffset * BrightnessScale;
+
+ BaseColor.rgb *= mix(vec3(1.0, 1.0, 1.0), vec3(ScanBrightness, ScanBrightness, ScanBrightness), u_scanline_alpha.xxx);
+ }
+
+ // Hum Bar Simulation
+ if (u_humbar_alpha.x > 0.0f)
+ {
+ float HumTimeStep = fract(u_time.x * u_humbar_hertz_rate.x);
+ float HumBrightness = 1.0 - fract(BaseCoord.y + HumTimeStep) * u_humbar_alpha.x;
+ BaseColor.rgb *= HumBrightness;
+ }
+
+ gl_FragColor = vec4(BaseColor.rgb * v_color0.rgb, BaseColor.a);
}
-
- gl_FragColor = vec4(BaseColor.rgb * v_color0.rgb, BaseColor.a);
}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq2x/fs_hq2x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq2x.sc
index 66bd69f253e..66bd69f253e 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq2x/fs_hq2x.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq2x.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq3x/fs_hq3x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq3x.sc
index 8e0f46a80f1..8e0f46a80f1 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq3x/fs_hq3x.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq3x.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq4x/fs_hq4x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq4x.sc
index 8e769bee46c..8e769bee46c 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq4x/fs_hq4x.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq4x.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq3x/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/varying.def.sc
index 57a7a910952..57a7a910952 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq3x/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/varying.def.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq2x/vs_hq2x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq2x.sc
index a77ac7006f7..a77ac7006f7 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq2x/vs_hq2x.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq2x.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq3x/vs_hq3x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq3x.sc
index a77ac7006f7..a77ac7006f7 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq3x/vs_hq3x.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq3x.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq4x/vs_hq4x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq4x.sc
index a77ac7006f7..a77ac7006f7 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq4x/vs_hq4x.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq4x.sc
diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc
deleted file mode 100644
index 874846cce0d..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, texCoord
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, texCoord) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc
deleted file mode 100644
index 7d857008291..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output texCoord, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- texCoord = a_texcoord0.xy;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc b/src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc
new file mode 100644
index 00000000000..3f03d8e6adb
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc
@@ -0,0 +1,46 @@
+$input v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's dilation-horizontal-fast Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+#define TEX(dx,dy) texture2D(decal, v_texcoord0 + vec2(dx,dy) * v_texcoord1.xy)
+
+void main()
+{
+ vec3 D = TEX(-1, 0).rgb;
+ vec3 E = TEX( 0, 0).rgb;
+ vec3 F = TEX( 1, 0).rgb;
+
+ vec3 res = max(E, max(F, D));
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq4x/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/warp/varying.def.sc
index 57a7a910952..8404fc635e1 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/hq4x/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/warp/varying.def.sc
@@ -1,8 +1,6 @@
vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
vec3 a_position : POSITION;
vec4 a_color0 : COLOR0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc b/src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc
new file mode 100644
index 00000000000..828dc3078cf
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc
@@ -0,0 +1,51 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's dilation-horizontal-fast Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ // B
+ // D E F
+ // H
+
+ v_texcoord1 = vec4(1.0 / u_tex_size0.xy, 0.0, 0.0); // F H
+
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc
deleted file mode 100644
index 9af7bcf0ee6..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-// Samplers
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc
deleted file mode 100644
index c65b5426733..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc
+++ /dev/null
@@ -1,10 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
-vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.sc
deleted file mode 100644
index 405ef8feb3b..00000000000
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc
new file mode 100644
index 00000000000..ee5ebb4398e
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc
@@ -0,0 +1,210 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR-lv2-noblend Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 XBR_EQ_THRESHOLD;
+uniform vec4 XBR_LV2_COEFFICIENT;
+
+uniform vec4 u_tex_size0;
+
+SAMPLER2D(decal, 0);
+
+// Uncomment just one of the three params below to choose the corner detection
+#define CORNER_A
+//#define CORNER_B
+//#define CORNER_C
+//#define CORNER_D
+
+const vec4 Y = vec4(0.2126, 0.7152, 0.0722, 0.0);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return abs(A - B);
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 eq(vec4 A, vec4 B)
+{
+ return vec4(equal(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 gt(vec4 A, vec4 B)
+{
+ return vec4(greaterThan(A, B));
+}
+
+vec4 abslt(vec4 A, vec4 B)
+{
+ return lt(df(A, B), XBR_EQ_THRESHOLD.xxxx);
+}
+
+vec4 absge(vec4 A, vec4 B)
+{
+ return ge(df(A, B), XBR_EQ_THRESHOLD.xxxx);
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), Y);
+ vec4 c = mul(mat4(C, A, G, I), Y);
+ vec4 e = mul(mat4(E, E, E, E), Y);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), Y);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), Y);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), Y);
+ vec4 f4 = h5.yzwx;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = gt(Ao * fp.y + Bo * fp.x, Co);
+ vec4 fx_left = gt(Ax * fp.y + Bx * fp.x, Cx);
+ vec4 fx_up = gt(Ay * fp.y + By * fp.x, Cy);
+
+#ifdef CORNER_A
+ vec4 interp_restriction_lv1 = ne(e,f) * ne(e,h);
+#endif
+#ifdef CORNER_B
+ vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)));
+#endif
+#ifdef CORNER_D
+ vec4 c1 = i4.yzwx;
+ vec4 g0 = i5.wxyz;
+ vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c) ) * (ne(f,f4) * ne(f,i) + ne(h,h5) * ne(h,i) + ne(h,g) + ne(f,c) + lt(b,c1) * lt(d,g0)));
+#endif
+#ifdef CORNER_C
+ vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)));
+#endif
+
+ interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0);
+
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f);
+ vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i);
+
+ vec4 one = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 zero = vec4(0.0, 0.0, 0.0, 0.0);
+ vec4 edri = le(wd1,wd2) * interp_restriction_lv1;
+ vec4 edr = lt(wd1,wd2) * interp_restriction_lv1 * ((one - edri.yzwx) + (one - edri.wxyz));
+ vec4 edr_left = le(XBR_LV2_COEFFICIENT.xxxx * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr * ((one - edri.yzwx) * lt(e,c));
+ vec4 edr_up = ge(df(f,g), XBR_LV2_COEFFICIENT.xxxx * df(h,c)) * interp_restriction_lv2_up * edr * ((one - edri.wxyz) * lt(e,g));
+
+
+ vec4 nc = clamp(edr * (fx + edr_left * fx_left + edr_up * fx_up), 0.0, 1.0);
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res1 = nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : E.xyz;
+ vec3 res2 = nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : E.xyz;
+
+ vec2 df12 = abs(mul(mat3(res1, res2, vec3(0.0, 0.0, 0.0)), Y.xyz).xy - e.xy);
+
+ vec3 res_mix = (df12.y >= df12.x) ? vec3(1.0, 1.0, 1.0) : vec3(0.0, 0.0, 0.0);
+ vec3 res = mix(res1, res2, res_mix);
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc
new file mode 100644
index 00000000000..05cf1124896
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc
@@ -0,0 +1,234 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR-lv3-noblend - Shader
+
+ Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 XBR_EQ_THRESHOLD;
+uniform vec4 XBR_EQ_THRESHOLD2;
+uniform vec4 XBR_LV2_COEFFICIENT;
+
+uniform vec4 u_tex_size0;
+
+SAMPLER2D(decal, 0);
+
+// Uncomment just one of the three params below to choose the corner detection
+#define CORNER_A
+//#define CORNER_B
+//#define CORNER_C
+//#define CORNER_D
+
+const vec4 Y = vec4(0.2126, 0.7152, 0.0722, 0.0);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return abs(A - B);
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 eq(vec4 A, vec4 B)
+{
+ return vec4(equal(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 gt(vec4 A, vec4 B)
+{
+ return vec4(greaterThan(A, B));
+}
+
+vec4 abslt2(vec4 A, vec4 B)
+{
+ return lt(df(A, B), XBR_EQ_THRESHOLD2.xxxx);
+}
+
+vec4 absge(vec4 A, vec4 B)
+{
+ return ge(df(A, B), XBR_EQ_THRESHOLD.xxxx);
+}
+
+vec4 absge2(vec4 A, vec4 B)
+{
+ return ge(df(A, B), XBR_EQ_THRESHOLD2.xxxx);
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), Y);
+ vec4 c = mul(mat4(C, A, G, I), Y);
+ vec4 e = mul(mat4(E, E, E, E), Y);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), Y);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), Y);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), Y);
+ vec4 f4 = h5.yzwx;
+
+ vec4 c4 = i5.yzwx;
+ vec4 g5 = i4.wxyz;
+
+ vec4 c1 = i4.yzwx;
+ vec4 g0 = i5.wxyz;
+ vec4 b1 = h5.zwxy;
+ vec4 d0 = h5.wxyz;
+
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ vec4 Az = vec4( 6.0, -2.0, -6.0, 2.0 );
+ vec4 Bz = vec4( 2.0, 6.0, -2.0, -6.0 );
+ vec4 Cz = vec4( 5.0, 3.0, -3.0, -1.0 );
+ vec4 Aw = vec4( 2.0, -6.0, -2.0, 6.0 );
+ vec4 Bw = vec4( 6.0, 2.0, -6.0,-2.0 );
+ vec4 Cw = vec4( 5.0, -1.0, -3.0, 3.0 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = gt(Ao * fp.y + Bo * fp.x, Co);
+ vec4 fx_left = gt(Ax * fp.y + Bx * fp.x, Cx);
+ vec4 fx_up = gt(Ay * fp.y + By * fp.x, Cy);
+ vec4 fx3_left= gt(Az * fp.y + Bz * fp.x, Cz);
+ vec4 fx3_up = gt(Aw * fp.y + Bw * fp.x, Cw);
+
+ vec4 interp_restriction_lv0 = (ne(e,f) * ne(e,h));
+
+ // It uses CORNER_C if none of the others are defined.
+#ifdef CORNER_A
+ vec4 interp_restriction_lv1 = interp_restriction_lv0;
+#elif CORNER_B
+ vec4 interp_restriction_lv1 = (interp_restriction_lv0 * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)));
+#elif CORNER_D
+ vec4 interp_restriction_lv1 = (interp_restriction_lv0 * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)) * (ne(f,f4) * ne(f,i) + ne(h,h5) * ne(h,i) + ne(h,g) + ne(f,c) + lt(b,c1) * lt(d,g0)));
+#elif CORNER_C
+ vec4 interp_restriction_lv1 = (interp_restriction_lv0 * (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)));
+#endif
+
+ interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0);
+
+ vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g);
+ vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c);
+ vec4 interp_restriction_lv3_left = abslt2(g,g0) * absge2(d0,g0);
+ vec4 interp_restriction_lv3_up = abslt2(c,c1) * absge2(b1,c1);
+
+ vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f);
+ vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i);
+
+ vec4 one = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 zero = vec4(0.0, 0.0, 0.0, 0.0);
+ vec4 edri = le(wd1,wd2) * interp_restriction_lv1;
+ vec4 edr = clamp(lt(wd1,wd2) * interp_restriction_lv1 * ((one - edri.yzwx) + (one - edri.wxyz)), 0.0, 1.0);
+ vec4 edr_left = le(XBR_LV2_COEFFICIENT.xxxx * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr * (one - edri.yzwx) * lt(e,c);
+ vec4 edr_up = ge(df(f,g), XBR_LV2_COEFFICIENT.xxxx * df(h,c)) * interp_restriction_lv2_up * edr * (one - edri.wxyz) * lt(e,g);
+ vec4 edr3_left = interp_restriction_lv3_left;
+ vec4 edr3_up = interp_restriction_lv3_up;
+
+ vec4 nc = clamp((edr * fx + edr_left * (fx_left + edr3_left * fx3_left * lt(e,c4)) + edr_up * (fx_up + edr3_up * fx3_up * lt(e,g5))), 0.0, 1.0);
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res1 = nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : E.xyz;
+ vec3 res2 = nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : E.xyz;
+
+ vec2 df12 = abs(mul(mat3(res1, res2, zero.xyz), Y.xyz).xy - e.xy);
+
+ vec3 res = mix(res1, res2, (df12.y >= df12.x) ? one.xyz : zero.xyz);
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc
new file mode 100644
index 00000000000..b2fd0d94714
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc
@@ -0,0 +1,254 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR-lv3 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 XBR_Y_WEIGHT;
+uniform vec4 XBR_EQ_THRESHOLD;
+uniform vec4 XBR_EQ_THRESHOLD2;
+uniform vec4 XBR_LV2_COEFFICIENT;
+
+uniform vec4 u_tex_size0;
+
+SAMPLER2D(decal, 0);
+
+const vec4 yuv = vec4(0.299, 0.587, 0.114, 0.0);
+const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return abs(A - B);
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 eq(vec4 A, vec4 B)
+{
+ return vec4(equal(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 abslt(vec4 A, vec4 B)
+{
+ return lt(df(A, B), XBR_EQ_THRESHOLD.xxxx);
+}
+
+vec4 abslt2(vec4 A, vec4 B)
+{
+ return lt(df(A, B), XBR_EQ_THRESHOLD2.xxxx);
+}
+
+vec4 absge(vec4 A, vec4 B)
+{
+ return ge(df(A, B), XBR_EQ_THRESHOLD.xxxx);
+}
+
+vec4 absge2(vec4 A, vec4 B)
+{
+ return ge(df(A, B), XBR_EQ_THRESHOLD2.xxxx);
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), XBR_Y_WEIGHT.xxxx * yuv);
+ vec4 c = mul(mat4(C, A, G, I), XBR_Y_WEIGHT.xxxx * yuv);
+ vec4 e = mul(mat4(E, E, E, E), XBR_Y_WEIGHT.xxxx * yuv);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), XBR_Y_WEIGHT.xxxx * yuv);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), XBR_Y_WEIGHT.xxxx * yuv);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), XBR_Y_WEIGHT.xxxx * yuv);
+ vec4 f4 = h5.yzwx;
+
+ vec4 c1 = i4.yzwx;
+ vec4 g0 = i5.wxyz;
+ vec4 b1 = h5.zwxy;
+ vec4 d0 = h5.wxyz;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ vec4 Az = vec4( 6.0, -2.0, -6.0, 2.0 );
+ vec4 Bz = vec4( 2.0, 6.0, -2.0, -6.0 );
+ vec4 Cz = vec4( 5.0, 3.0, -3.0, -1.0 );
+ vec4 Aw = vec4( 2.0, -6.0, -2.0, 6.0 );
+ vec4 Bw = vec4( 6.0, 2.0, -6.0,-2.0 );
+ vec4 Cw = vec4( 5.0, -1.0, -3.0, 3.0 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao * fp.y + Bo * fp.x);
+ vec4 fx_left = (Ax * fp.y + Bx * fp.x);
+ vec4 fx_up = (Ay * fp.y + By * fp.x);
+ vec4 fx3_left= (Az * fp.y + Bz * fp.x);
+ vec4 fx3_up = (Aw * fp.y + Bw * fp.x);
+
+ vec4 interp_restriction_lv0 = (ne(e,f) * ne(e,h));
+
+// It uses CORNER_C if none of the others are defined.
+#ifdef CORNER_A
+ vec4 interp_restriction_lv1 = interp_restriction_lv0;
+#elif CORNER_B
+ vec4 interp_restriction_lv1 = (interp_restriction_lv0 * ( ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c) ) );
+#elif CORNER_D
+ vec4 interp_restriction_lv1 = (interp_restriction_lv0 * ( ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c) ) * (f!=f4 * f!=i + h!=h5 * h!=i + h!=g + f!=c + lt(b,c1) * lt(d,g0)));
+#else
+ vec4 interp_restriction_lv1 = (interp_restriction_lv0 * ( ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)) );
+#endif
+
+ interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0);
+
+ vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g);
+ vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c);
+ vec4 interp_restriction_lv3_left = abslt2(g,g0) * absge2(d0,g0);
+ vec4 interp_restriction_lv3_up = abslt2(c,c1) * absge2(b1,c1);
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+ vec4 fx15 = smoothstep(Cz - delta, Cz + delta, fx3_left);
+ vec4 fx75 = smoothstep(Cw - delta, Cw + delta, fx3_up);
+
+ vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(XBR_LV2_COEFFICIENT.xxxx * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), XBR_LV2_COEFFICIENT.xxxx * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 edr3_left = interp_restriction_lv3_left;
+ vec4 edr3_up = interp_restriction_lv3_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+ vec4 nc15 = edr * edr_left * edr3_left * fx15;
+ vec4 nc75 = edr * edr_up * edr3_up * fx75;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec4 nc = nc75 + nc15 + nc30 + nc60 + nc45;
+
+ vec4 final45 = nc45 * fx45;
+ vec4 final30 = nc30 * fx30;
+ vec4 final60 = nc60 * fx60;
+ vec4 final15 = nc15 * fx15;
+ vec4 final75 = nc75 * fx75;
+
+ vec4 maximo = max(max(max(final15, final75),max(final30, final60)), final45);
+
+ float blend1;
+ vec3 pix1;
+ if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;}
+ else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;}
+ else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;}
+ else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;}
+
+ float blend2;
+ vec3 pix2;
+ if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;}
+ else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;}
+ else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;}
+ else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;}
+
+ vec3 res1 = mix(E.xyz, pix1, blend1);
+ vec3 res2 = mix(E.xyz, pix2, blend2);
+
+ vec3 E_mix = (c_df(E.xyz, res2) >= c_df(E.xyz, res1)) ? vec3(1.0, 1.0, 1.0) : vec3(0.0, 0.0, 0.0);
+ vec3 res = mix(res1, res2, E_mix);
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc
new file mode 100644
index 00000000000..75541985e36
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc
@@ -0,0 +1,59 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR-lv2-noblend Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc
new file mode 100644
index 00000000000..5421eaf2955
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR-lv3-noblend - Shader
+
+ Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc
new file mode 100644
index 00000000000..f4ee1f55ab3
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR-lv3 - Shader
+
+ Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc
new file mode 100644
index 00000000000..533bfe0f762
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc
@@ -0,0 +1,336 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 edr = lt(weighted_distance( e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec4 P[4];
+ P[0] = px.x > 0.0 ? F : H;
+ P[1] = px.y > 0.0 ? B : F;
+ P[2] = px.z > 0.0 ? D : B;
+ P[3] = px.w > 0.0 ? H : D;
+
+ vec4 res = E;
+
+ vec3 threshold = vec3(0.8, 0.42, 0.29);
+ vec3 xx = vec3(0.0, 0.0, 0.0);
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ vec3 sim1 = gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold);
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ vec3 sim2 = gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold);
+ t = clamp(t, -m, m);
+
+ vec3 s0 = (2.0 * fp.x - 1.0) * t + s;
+
+ res = vec4(s0, 1.0);
+
+ if ((sim1.x > 0.0 || sim1.y > 0.0 || sim1.z > 0.0) && (sim2.x > 0.0 || sim2.y > 0.0 || sim2.z > 0.0))
+ {
+ if (fp.x >= 0.5)
+ {
+ if (fp.y >= 0.5)
+ {
+ if (edr.x > 0.0 && edr_left.x > 0.0 && edr_up.x > 0.0)
+ {
+ res = mix(E , P[0], 0.833333);
+ }
+ else if (edr.x > 0.0 && (edr_left.x > 0.0 || edr_up.x > 0.0))
+ {
+ res = mix(E , P[0], 0.75);
+ }
+ else if (edr.y > 0.0 && edr_left.y > 0.0 && edr.w > 0.0 && edr_up.w > 0.0)
+ {
+ res = mix(E , P[1], 0.25);
+ res = mix(E , P[3], 0.25);
+ }
+ else if (edr.y > 0.0 && edr_left.y > 0.0)
+ {
+ res = mix(E , P[1], 0.25);
+ }
+ else if (edr.w > 0.0 && edr_up.w > 0.0)
+ {
+ res = mix(E , P[3], 0.25);
+ }
+ else if (edr.x > 0.0)
+ {
+ res = mix(E , P[0], 0.5);
+ }
+ }
+ else
+ {
+ if (edr.y > 0.0 && edr_left.y > 0.0 && edr_up.y > 0.0)
+ {
+ res = mix(E , P[1], 0.833333);
+ }
+ else if (edr.y > 0.0 && (edr_left.y > 0.0 || edr_up.y > 0.0))
+ {
+ res = mix(E , P[1], 0.75);
+ }
+ else if (edr.z > 0.0 && edr_left.z > 0.0 && edr.x > 0.0 && edr_up.x > 0.0)
+ {
+ res = mix(E , P[2], 0.25);
+ res = mix(E , P[0], 0.25);
+ }
+ else if (edr.z > 0.0 && edr_left.z > 0.0)
+ {
+ res = mix(E , P[2], 0.25);
+ }
+ else if (edr.x > 0.0 && edr_up.x > 0.0)
+ {
+ res = mix(E , P[0], 0.25);
+ }
+ else if (edr.y > 0.0)
+ {
+ res = mix(E , P[1], 0.5);
+ }
+ }
+ }
+ else
+ {
+ if (fp.y >= 0.5)
+ {
+ if (edr.w > 0.0 && edr_left.w > 0.0 && edr_up.w > 0.0)
+ {
+ res = mix(E , P[3], 0.833333);
+ }
+ else if (edr.w > 0.0 && (edr_left.w > 0.0 || edr_up.w > 0.0))
+ {
+ res = mix(E , P[3], 0.75);
+ }
+ else if (edr.x > 0.0 && edr_left.x > 0.0 && edr.z > 0.0 && edr_up.z > 0.0)
+ {
+ res = mix(E , P[0], 0.25);
+ res = mix(E , P[2], 0.25);
+ }
+ else if (edr.x > 0.0 && edr_left.x > 0.0)
+ {
+ res = mix(E , P[0], 0.25);
+ }
+ else if (edr.z > 0.0 && edr_up.z > 0.0)
+ {
+ res = mix(E , P[2], 0.25);
+ }
+ else if (edr.w > 0.0)
+ {
+ res = mix(E , P[3], 0.5);
+ }
+ }
+ else
+ {
+ if (edr.z > 0.0 && edr_left.z > 0.0 && edr_up.z > 0.0)
+ {
+ res = mix(E , P[2], 0.833333);
+ }
+ else if (edr.z > 0.0 && (edr_left.z > 0.0 || edr_up.z > 0.0))
+ {
+ res = mix(E , P[2], 0.75);
+ }
+ else if (edr.w > 0.0 && edr_left.w > 0.0 && edr.y > 0.0 && edr_up.y > 0.0)
+ {
+ res = mix(E , P[3], 0.25);
+ res = mix(E , P[1], 0.25);
+ }
+ else if (edr.w > 0.0 && edr_left.w > 0.0)
+ {
+ res = mix(E , P[3], 0.25);
+ }
+ else if (edr.y > 0.0 && edr_up.y > 0.0)
+ {
+ res = mix(E , P[1], 0.25);
+ }
+ else if (edr.z > 0.0)
+ {
+ res = mix(E, P[2], 0.5);
+ }
+ }
+ }
+ }
+
+ gl_FragColor = vec4(res.xyz, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc
new file mode 100644
index 00000000000..ea58584408b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc
@@ -0,0 +1,265 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta1
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5);
+
+// Constants used with gamma correction.
+#define InputGamma 2.4
+#define OutputGamma 2.2
+
+#define GAMMA_IN(color) pow(color, vec3(InputGamma, InputGamma, InputGamma))
+#define GAMMA_OUT(color) pow(color, vec3(1.0 / OutputGamma, 1.0 / OutputGamma, 1.0 / OutputGamma))
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 lt_coeff2(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ge_coeff2(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 a = c.yzwx;
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * ((lt_coeff2(e,b) + lt_coeff2(e,d) + ge_coeff2(e,a)) * (lt_coeff2(f,f4) + lt_coeff2(f,c) + lt_coeff2(h,h5) + lt_coeff2(h,g))) * ( ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+
+ vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res = E.xyz;
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ t = clamp(t, -m, m);
+
+ res = (2.0 * fp.x - 1.0) * t + s;
+
+ vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0);
+
+ float blend = 0.0;
+ vec3 pix = res;
+
+ float final45 = dot(nc45, fx45);
+ float final30 = dot(nc30, fx30);
+ float final60 = dot(nc60, fx60);
+
+ float maximo = max(max(final30, final60), final45);
+
+ if (nc.x > 0.0) {pix = px.x > 0.0 ? F.xyz : H.xyz; blend = maximo;}
+ else if (nc.y > 0.0) {pix = px.y > 0.0 ? B.xyz : F.xyz; blend = maximo;}
+ else if (nc.z > 0.0) {pix = px.z > 0.0 ? D.xyz : B.xyz; blend = maximo;}
+ else if (nc.w > 0.0) {pix = px.w > 0.0 ? H.xyz : D.xyz; blend = maximo;}
+
+ res = GAMMA_IN(res);
+ pix = GAMMA_IN(pix);
+
+ res = mix(res, pix, blend);
+
+ gl_FragColor = vec4(clamp(GAMMA_OUT(res), 0.0, 1.0), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc
new file mode 100644
index 00000000000..a4e59937d54
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc
@@ -0,0 +1,255 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - Dithering preserved
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 lt_coeff2(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ge_coeff2(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 a = c.yzwx;
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * ((lt_coeff2(e,b) + lt_coeff2(e,d) + ge_coeff2(e,a)) * (lt_coeff2(f,f4) + lt_coeff2(f,c) + lt_coeff2(h,h5) + lt_coeff2(h,g))) * ( ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+
+ vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res = E.xyz;
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ t = clamp(t, -m, m);
+
+ res = (2.0 * fp.x - 1.0) * t + s;
+
+ vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0);
+
+ float blend = 0.0;
+ vec3 pix = res;
+
+ float final45 = dot(nc45, fx45);
+ float final30 = dot(nc30, fx30);
+ float final60 = dot(nc60, fx60);
+
+ float maximo = max(max(final30, final60), final45);
+
+ if (nc.x > 0.0) {pix = px.x > 0.0 ? F.xyz : H.xyz; blend = maximo;}
+ else if (nc.y > 0.0) {pix = px.y > 0.0 ? B.xyz : F.xyz; blend = maximo;}
+ else if (nc.z > 0.0) {pix = px.z > 0.0 ? D.xyz : B.xyz; blend = maximo;}
+ else if (nc.w > 0.0) {pix = px.w > 0.0 ? H.xyz : D.xyz; blend = maximo;}
+
+ res = mix(res, pix, blend);
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc
new file mode 100644
index 00000000000..254e8d878cb
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc
@@ -0,0 +1,281 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5);
+const float sharpness = 0.65;
+
+// Constants used with gamma correction.
+#define InputGamma 2.4
+#define OutputGamma 2.2
+
+#define GAMMA_IN(color) pow(color, vec3(InputGamma, InputGamma, InputGamma))
+#define GAMMA_OUT(color) pow(color, vec3(1.0 / OutputGamma, 1.0 / OutputGamma, 1.0 / OutputGamma))
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 lt_coeff2(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ge_coeff2(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 a = c.yzwx;
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+
+ vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res = E.xyz;
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s0 = (2.0 * fp.x - 1.0) * t + s;
+
+ vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0);
+
+ float blend1 = 0.0;
+ float blend2 = 0.0;
+
+ vec4 final45 = nc45 * fx45;
+ vec4 final30 = nc30 * fx30;
+ vec4 final60 = nc60 * fx60;
+
+ vec4 maximo = max(max(final30, final60), final45);
+
+ vec3 pix1 = vec3(0.0, 0.0, 0.0);
+ if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;}
+ else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;}
+ else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;}
+ else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;}
+
+ vec3 pix2 = vec3(0.0, 0.0, 0.0);
+ if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;}
+ else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;}
+ else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;}
+ else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;}
+
+ E.xyz = GAMMA_IN(E.xyz);
+ s0 = GAMMA_IN(s0);
+
+ vec3 res1 = mix(s0, GAMMA_IN(pix1), blend1);
+ vec3 res2 = mix(s0, GAMMA_IN(pix2), blend2);
+
+ res = mix(res1, res2, step(c_df(E.xyz, res1), c_df(E.xyz, res2)));
+
+ gl_FragColor = vec4(clamp(GAMMA_OUT(res), 0.0, 1.0), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc
new file mode 100644
index 00000000000..e3791fed702
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc
@@ -0,0 +1,271 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - v4
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5);
+const float sharpness = 0.65;
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 lt_coeff2(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ge_coeff2(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 a = c.yzwx;
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+
+ vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res = E.xyz;
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s0 = (2.0 * fp.x - 1.0) * t + s;
+
+ vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0);
+
+ float blend1 = 0.0;
+ float blend2 = 0.0;
+
+ vec4 final45 = nc45 * fx45;
+ vec4 final30 = nc30 * fx30;
+ vec4 final60 = nc60 * fx60;
+
+ vec4 maximo = max(max(final30, final60), final45);
+
+ vec3 pix1 = vec3(0.0, 0.0, 0.0);
+ if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;}
+ else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;}
+ else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;}
+ else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;}
+
+ vec3 pix2 = vec3(0.0, 0.0, 0.0);
+ if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;}
+ else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;}
+ else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;}
+ else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;}
+
+ vec3 res1 = mix(s0, pix1, blend1);
+ vec3 res2 = mix(s0, pix2, blend2);
+
+ res = mix(res1, res2, step(c_df(E.xyz, res1), c_df(E.xyz, res2)));
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc
new file mode 100644
index 00000000000..858342d25c6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc
@@ -0,0 +1,256 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8b+ReverseAA (semi-rounded) Shader - v4
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5);
+const float sharpness = 0.65;
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 a = c.yzwx;
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(h,d) + lt_coeff(e,i) * ge_coeff(f,i4) * ge_coeff(h,i5) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+
+ vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res = E.xyz;
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s0 = (2.0 * fp.x - 1.0) * t + s;
+
+ vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0);
+
+ float blend1 = 0.0;
+ float blend2 = 0.0;
+
+ vec4 final45 = nc45 * fx45;
+ vec4 final30 = nc30 * fx30;
+ vec4 final60 = nc60 * fx60;
+
+ vec4 maximo = max(max(final30, final60), final45);
+
+ vec3 pix1 = vec3(0.0, 0.0, 0.0);
+ if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;}
+ else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;}
+ else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;}
+ else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;}
+
+ vec3 pix2 = vec3(0.0, 0.0, 0.0);
+ if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;}
+ else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;}
+ else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;}
+ else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;}
+
+ vec3 res1 = mix(s0, pix1, blend1);
+ vec3 res2 = mix(s0, pix2, blend2);
+
+ res = mix(res1, res2, step(c_df(E.xyz, res1), c_df(E.xyz, res2)));
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc
new file mode 100644
index 00000000000..1a4ad25e765
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc
@@ -0,0 +1,288 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5);
+const float sharpness = 0.65;
+
+// Constants used with gamma correction.
+#define InputGamma 2.4
+#define OutputGamma 2.2
+
+#define GAMMA_IN(color) pow(color, vec3(InputGamma, InputGamma, InputGamma))
+#define GAMMA_OUT(color) pow(color, vec3(1.0 / OutputGamma, 1.0 / OutputGamma, 1.0 / OutputGamma))
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 lt_coeff2(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 lt_coeff3(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(5.0, 5.0, 5.0, 5.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 a = c.yzwx;
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 fx45 = smoothstep(Co - delta, Co + delta, fx);
+ vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left);
+ vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up);
+
+ vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 nc45 = edr * fx45;
+ vec4 nc30 = edr * edr_left * fx30;
+ vec4 nc60 = edr * edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res = E.xyz;
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, sharpness * abs(bb));
+ m = min(m, sharpness * abs(cc));
+ t = clamp(t, -m, m);
+
+ vec3 s0 = (2.0 * fp.x - 1.0) * t + s;
+
+ vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0);
+
+ float blend = 0.0;
+
+ vec4 r1 = mix(e, f, edr);
+
+ vec4 yeseq3 = vec4(0.0, 0.0, 0.0, 0.0);
+
+ vec3 pix;
+ vec4 lt_res = lt_coeff3(r1,e);
+ if (lt_res.x > 0.0 && lt_res.y > 0.0 && lt_res.z > 0.0)
+ {
+ yeseq3 = vec4(1.0, 1.0, 1.0, 1.0);
+ pix = res = s0;
+ }
+ else
+ {
+ pix = res = E.xyz;
+ }
+
+ vec4 yes = (yeseq3 * lt_coeff2(e, mix(f, h, px)));
+
+ vec4 final45 = nc45 * fx45;
+ vec4 final30 = nc30 * fx30;
+ vec4 final60 = nc60 * fx60;
+
+ vec4 maximo = max(max(final30, final60), final45);
+
+ if (nc.x > 0.0) {pix = px.x > 0.0 ? F.xyz : H.xyz; blend = maximo.x; if (yes.x > 0.0) pix = res = s0; else res = E.xyz;}
+ else if (nc.y > 0.0) {pix = px.y > 0.0 ? B.xyz : F.xyz; blend = maximo.y; if (yes.y > 0.0) pix = res = s0; else res = E.xyz;}
+ else if (nc.z > 0.0) {pix = px.z > 0.0 ? D.xyz : B.xyz; blend = maximo.z; if (yes.z > 0.0) pix = res = s0; else res = E.xyz;}
+ else if (nc.w > 0.0) {pix = px.w > 0.0 ? H.xyz : D.xyz; blend = maximo.w; if (yes.w > 0.0) pix = res = s0; else res = E.xyz;}
+
+ res = GAMMA_IN(res);
+ pix = GAMMA_IN(pix);
+
+ res = mix(res, pix, blend);
+
+ gl_FragColor = vec4(clamp(GAMMA_OUT(res), 0.0, 1.0), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc
new file mode 100644
index 00000000000..bf3af2de385
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc
@@ -0,0 +1,341 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 u_tex_size0;
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 lt_coeff(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ge_coeff(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0)));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec3 lt3(vec3 A, vec3 B)
+{
+ return vec3(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec3 le3(vec3 A, vec3 B)
+{
+ return vec3(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec3 gt3(vec3 A, vec3 B)
+{
+ return vec3(greaterThan(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 edr = lt(weighted_distance( e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec4 P[4];
+ P[0] = px.x > 0.0 ? F : H;
+ P[1] = px.y > 0.0 ? B : F;
+ P[2] = px.z > 0.0 ? D : B;
+ P[3] = px.w > 0.0 ? H : D;
+
+ vec4 res = E;
+
+ vec3 threshold = vec3(0.4, 0.4, 0.4);
+ vec3 xx = vec3(0.0, 0.0, 0.0);
+
+ vec3 n1 = B1.xyz;
+ vec3 n2 = B.xyz;
+ vec3 s = E.xyz;
+ vec3 n3 = H.xyz;
+ vec3 n4 = H5.xyz;
+
+ vec3 aa = n2 - n1;
+ vec3 bb = s - n2;
+ vec3 cc = n3 - s;
+ vec3 dd = n4 - n3;
+
+ vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ vec3 sim1 = (gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold) + le3(abs(bb) * 2.0, xx) + le3(abs(cc) * 2.0, xx));
+ t = clamp(t, -m, m);
+
+ vec3 s1 = (2.0 * fp.y - 1.0) * t + s;
+
+ n1 = D0.xyz;
+ n2 = D.xyz;
+ s = s1;
+ n3 = F.xyz;
+ n4 = F4.xyz;
+
+ aa = n2 - n1;
+ bb = s - n2;
+ cc = n3 - s;
+ dd = n4 - n3;
+
+ t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0;
+ m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5)));
+
+ m = min(m, 2.0 * abs(bb));
+ m = min(m, 2.0 * abs(cc));
+ vec3 sim2 = (gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold) + le3(abs(bb) * 2.0, xx) + le3(abs(cc) * 2.0, xx));
+ t = clamp(t, -m, m);
+
+ vec3 s0 = (2.0 * fp.x - 1.0) * t + s;
+
+ res = vec4(s0, 1.0);
+
+ if ((sim1.x > 0.0 || sim1.y > 0.0 || sim1.z > 0.0) && (sim2.x > 0.0 || sim2.y > 0.0 || sim2.z > 0.0))
+ {
+ if (fp.x >= 0.5)
+ {
+ if (fp.y >= 0.5)
+ {
+ if (edr.x > 0.0 && edr_left.x > 0.0 && edr_up.x > 0.0)
+ {
+ res = mix(E , P[0], 0.833333);
+ }
+ else if (edr.x > 0.0 && (edr_left.x > 0.0 || edr_up.x > 0.0))
+ {
+ res = mix(E , P[0], 0.75);
+ }
+ else if (edr.y > 0.0 && edr_left.y > 0.0 && edr.w > 0.0 && edr_up.w > 0.0)
+ {
+ res = mix(E , P[1], 0.25);
+ res = mix(E , P[3], 0.25);
+ }
+ else if (edr.y > 0.0 && edr_left.y > 0.0)
+ {
+ res = mix(E , P[1], 0.25);
+ }
+ else if (edr.w > 0.0 && edr_up.w > 0.0)
+ {
+ res = mix(E , P[3], 0.25);
+ }
+ else if (edr.x > 0.0)
+ {
+ res = mix(E , P[0], 0.5);
+ }
+ }
+ else
+ {
+ if (edr.y > 0.0 && edr_left.y > 0.0 && edr_up.y > 0.0)
+ {
+ res = mix(E , P[1], 0.833333);
+ }
+ else if (edr.y > 0.0 && (edr_left.y > 0.0 || edr_up.y > 0.0))
+ {
+ res = mix(E , P[1], 0.75);
+ }
+ else if (edr.z > 0.0 && edr_left.z > 0.0 && edr.x > 0.0 && edr_up.x > 0.0)
+ {
+ res = mix(E , P[2], 0.25);
+ res = mix(E , P[0], 0.25);
+ }
+ else if (edr.z > 0.0 && edr_left.z > 0.0)
+ {
+ res = mix(E , P[2], 0.25);
+ }
+ else if (edr.x > 0.0 && edr_up.x > 0.0)
+ {
+ res = mix(E , P[0], 0.25);
+ }
+ else if (edr.y > 0.0)
+ {
+ res = mix(E , P[1], 0.5);
+ }
+ }
+ }
+ else
+ {
+ if (fp.y >= 0.5)
+ {
+ if (edr.w > 0.0 && edr_left.w > 0.0 && edr_up.w > 0.0)
+ {
+ res = mix(E , P[3], 0.833333);
+ }
+ else if (edr.w > 0.0 && (edr_left.w > 0.0 || edr_up.w > 0.0))
+ {
+ res = mix(E , P[3], 0.75);
+ }
+ else if (edr.x > 0.0 && edr_left.x > 0.0 && edr.z > 0.0 && edr_up.z > 0.0)
+ {
+ res = mix(E , P[0], 0.25);
+ res = mix(E , P[2], 0.25);
+ }
+ else if (edr.x > 0.0 && edr_left.x > 0.0)
+ {
+ res = mix(E , P[0], 0.25);
+ }
+ else if (edr.z > 0.0 && edr_up.z > 0.0)
+ {
+ res = mix(E , P[2], 0.25);
+ }
+ else if (edr.w > 0.0)
+ {
+ res = mix(E , P[3], 0.5);
+ }
+ }
+ else
+ {
+ if (edr.z > 0.0 && edr_left.z > 0.0 && edr_up.z > 0.0)
+ {
+ res = mix(E , P[2], 0.833333);
+ }
+ else if (edr.z > 0.0 && (edr_left.z > 0.0 || edr_up.z > 0.0))
+ {
+ res = mix(E , P[2], 0.75);
+ }
+ else if (edr.w > 0.0 && edr_left.w > 0.0 && edr.y > 0.0 && edr_up.y > 0.0)
+ {
+ res = mix(E , P[3], 0.25);
+ res = mix(E , P[1], 0.25);
+ }
+ else if (edr.w > 0.0 && edr_left.w > 0.0)
+ {
+ res = mix(E , P[3], 0.25);
+ }
+ else if (edr.y > 0.0 && edr_up.y > 0.0)
+ {
+ res = mix(E , P[1], 0.25);
+ }
+ else if (edr.z > 0.0)
+ {
+ res = mix(E, P[2], 0.5);
+ }
+ }
+ }
+ }
+
+ gl_FragColor = vec4(res.xyz, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/varying.def.sc
index c65b5426733..92c3034f498 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/varying.def.sc
@@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0);
vec3 a_position : POSITION;
vec4 a_color0 : COLOR0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc
new file mode 100644
index 00000000000..339c44e284c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc
new file mode 100644
index 00000000000..9d5468107dd
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta1
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc
new file mode 100644
index 00000000000..8e73b14f713
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - Dithering preserved
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc
new file mode 100644
index 00000000000..b4509adf38c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc
new file mode 100644
index 00000000000..b00c03fbce3
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - v4
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc
new file mode 100644
index 00000000000..2a33ced4126
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8b+ReverseAA (semi-rounded) Shader - v4
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc
new file mode 100644
index 00000000000..b4509adf38c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc
new file mode 100644
index 00000000000..339c44e284c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc
@@ -0,0 +1,72 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:GPL-2.0+
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader
+
+ Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com
+*/
+
+/*
+ * ReverseAA part of the code
+ *
+ * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de>
+ * All Rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ // This line fix a bug in ATI cards.
+ vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001);
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc
new file mode 100644
index 00000000000..5af6ea86cc4
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc
@@ -0,0 +1,159 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 A (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+#define round(X) floor((X)+0.5)
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const float y_weight = 48.0;
+const float u_weight = 7.0;
+const float v_weight = 6.0;
+const mat4 yuv = mat4(
+ 0.299, 0.587, 0.114, 0.0,
+ -0.169, -0.331, 0.499, 0.0,
+ 0.499, -0.418, -0.0813, 0.0,
+ 0.0, 0.0, 0.0, 0.0
+);
+
+const mat4 yuv_weighted = mat4(
+ 48.0 * vec4( 0.299, 0.587, 0.114, 0.0),
+ 7.0 * vec4(-0.169, -0.331, 0.499, 0.0),
+ 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0),
+ 0.0 * vec4( 0.0, 0.0, 0.0, 0.0)
+);
+const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4);
+
+vec3 remapTo01(vec3 v, vec3 low, vec3 high)
+{
+ return saturate((v - low) / (high-low));
+}
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h));
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr;
+
+ vec3 info;
+
+ info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0));
+ info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0));
+ info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0));
+
+ gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc
new file mode 100644
index 00000000000..668922ec18c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc
@@ -0,0 +1,174 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 Accuracy - pass0 Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+uniform vec4 XBR_EQ_THRESHOLD;
+uniform vec4 XBR_LV2_COEFFICIENT;
+
+#define XBR_RED_COEF 17.0
+#define XBR_GREEN_COEF 20.0
+#define XBR_BLUE_COEF 3.0
+
+#define coef XBR_LV2_COEFFICIENT.xxxx
+
+const vec4 dtt = vec4(65536.0, 256.0, 1.0, 0.0);
+
+vec4 remapTo01(vec4 v, vec4 low, vec4 high)
+{
+ return saturate((v - low)/(high-low));
+}
+
+float df1(vec4 A, vec4 B)
+{
+ float rmean = (A.r + B.r) / 2.0;
+ vec4 diff = A - B;
+ vec4 K = vec4(XBR_RED_COEF + rmean, XBR_GREEN_COEF, XBR_BLUE_COEF - rmean, 0.0);
+
+ return sqrt(dot(K * diff, diff));
+}
+
+vec4 df(mat4 A, mat4 B)
+{
+ return vec4(df1(A[0],B[0]), df1(A[1],B[1]), df1(A[2],B[2]), df1(A[3],B[3]));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 lt4(mat4 A, mat4 B)
+{
+ return vec4(lessThan(df(A, B), XBR_EQ_THRESHOLD.xxxx));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(mat4 a, mat4 b, mat4 c, mat4 d, mat4 e, mat4 f, mat4 g, mat4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b_ = mul(mat4(B, D, H, F), dtt);
+ vec4 c_ = mul(mat4(C, A, G, I), dtt);
+ vec4 e_ = mul(mat4(E, E, E, E), dtt);
+ vec4 d_ = b_.yzwx;
+ vec4 f_ = b_.wxyz;
+ vec4 g_ = c_.zwxy;
+ vec4 h_ = b_.zwxy;
+ vec4 i_ = c_.wxyz;
+
+ vec4 i4_ = mul(mat4(I4, C1, A0, G5), dtt);
+ vec4 i5_ = mul(mat4(I5, C4, A1, G0), dtt);
+ vec4 h5_ = mul(mat4(H5, F4, B1, D0), dtt);
+ vec4 f4_ = h5_.yzwx;
+
+ mat4 b = mat4(B, D, H, F);
+ mat4 c = mat4(C, A, G, I);
+ mat4 e = mat4(E, E, E, E);
+ mat4 d = mat4(D, H, F, B);
+ mat4 f = mat4(F, B, D, H);
+ mat4 g = mat4(G, I, C, A);
+ mat4 h = mat4(H, F, B, D);
+ mat4 i = mat4(I, C, A, G);
+
+ mat4 i4 = mat4(I4, C1, A0, G5);
+ mat4 i5 = mat4(I5, C4, A1, G0);
+ mat4 h5 = mat4(H5, F4, B1, D0);
+ mat4 f4 = mat4(F4, B1, D0, H5);
+
+ vec4 interp_restriction_lv1 = ne(e_,f_) * ne(e_,h_);
+ vec4 interp_restriction_lv2_left = ne(e_,g_) * ne(d_,g_);
+ vec4 interp_restriction_lv2_up = ne(e_,c_) * ne(b_,c_);
+
+ vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f);
+ vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i);
+
+ vec4 one = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 edri = le(wd1,wd2) * interp_restriction_lv1;
+ vec4 edr = clamp(lt(wd1,wd2) * ((one - edri.yzwx) + (one - edri.wxyz)) * interp_restriction_lv1, 0.0, 1.0);
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr * (one - edri.yzwx) * lt4(e, c);
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr * (one - edri.wxyz) * lt4(e, g);
+
+ vec4 info;
+ info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0));
+ info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0));
+ info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0));
+ info.w = dot(edri, vec4(8.0, 4.0, 2.0, 1.0));
+
+ gl_FragColor = remapTo01(info, vec4(0.0, 0.0, 0.0, 0.0), vec4(255.0, 255.0, 255.0, 255.0));
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc
new file mode 100644
index 00000000000..a32605fca4e
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc
@@ -0,0 +1,160 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 Accuracy - pass1 Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+uniform vec4 XBR_SCALE;
+uniform vec4 u_tex_size0;
+
+#define XBR_RED_COEF 17.0
+#define XBR_GREEN_COEF 20.0
+#define XBR_BLUE_COEF 3.0
+
+#define round(X) floor((X)+0.5)
+
+const vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+const vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+const vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+const vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+const vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+const vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+const vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+const vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+const vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+const vec4 Ci = vec4(0.25, 0.25, 0.25, 0.25);
+
+
+float df1(vec4 A, vec4 B)
+{
+ float rmean = (A.r + B.r)/2.0;
+ vec4 diff = A - B;
+ vec4 K = vec4(XBR_RED_COEF+rmean, XBR_GREEN_COEF, XBR_BLUE_COEF-rmean, 0.0);
+
+ return sqrt(dot(K * diff, diff));
+}
+
+vec4 df(mat4 A, mat4 B)
+{
+ return vec4(df1(A[0],B[0]), df1(A[1],B[1]), df1(A[2],B[2]), df1(A[3],B[3]));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 remapFrom01(vec4 v, vec4 low, vec4 high)
+{
+ return round(mix(low, high, v));
+}
+
+vec4 unpack_info(float i)
+{
+ vec4 info;
+ float frac_val = fract(i / 2.0f);
+ info.w = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.z = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.y = round(frac_val);
+ info.x = i / 2.0f - frac_val;
+
+ return info;
+}
+
+void main()
+{
+ vec4 delta = 1.0 / XBR_SCALE.xxxx;
+ vec4 deltaL = vec4(0.5, 1.0, 0.5, 1.0) / XBR_SCALE.xxxx;
+ vec4 deltaU = deltaL.yxwz;
+
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 B = texture2D(ORIG_texture, v_texcoord1.xy);
+ vec4 D = texture2D(ORIG_texture, v_texcoord2.xw);
+ vec4 E = texture2D(ORIG_texture, v_texcoord2.yw);
+ vec4 F = texture2D(ORIG_texture, v_texcoord2.zw);
+ vec4 H = texture2D(ORIG_texture, v_texcoord1.xw);
+
+ mat4 b = mat4(B, D, H, F);
+ mat4 e = mat4(E, E, E, E);
+ mat4 d = mat4(D, H, F, B);
+ mat4 f = mat4(F, B, D, H);
+ mat4 h = mat4(H, F, B, D);
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec4 fx45i = saturate((fx + delta -Co - Ci) / (2.0 * delta ));
+ vec4 fx45 = saturate((fx + delta -Co ) / (2.0 * delta ));
+ vec4 fx30 = saturate((fx_left + deltaL -Cx ) / (2.0 * deltaL));
+ vec4 fx60 = saturate((fx_up + deltaU -Cy ) / (2.0 * deltaU));
+
+ vec4 info = texture2D(decal, v_texcoord0);
+
+ vec4 i = remapFrom01(info, vec4(0.0, 0.0, 0.0, 0.0), vec4(255.0, 255.0, 255.0, 255.0));
+
+ vec4 edr = unpack_info(i.x);
+ vec4 edr_left = unpack_info(i.y);
+ vec4 edr_up = unpack_info(i.z);
+ vec4 edri = unpack_info(i.w);
+
+ fx45i = edri * fx45i;
+ fx45 = edr * fx45;
+ fx30 = edr_left * fx30;
+ fx60 = edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec4 maximos = max(max(fx30, fx60), max(fx45, fx45i));
+
+ vec4 res1 = E;
+ res1 = mix(res1, mix(H, F, px.x), maximos.x);
+ res1 = mix(res1, mix(B, D, px.z), maximos.z);
+
+ vec4 res2 = E;
+ res2 = mix(res2, mix(F, B, px.y), maximos.y);
+ res2 = mix(res2, mix(D, H, px.w), maximos.w);
+
+ vec3 E_mix = (df1(E, res2) >= df1(E, res1)) ? vec3(1.0, 1.0, 1.0) : vec3(0.0, 0.0, 0.0);
+ vec3 res = mix(res1.xyz, res2.xyz, E_mix);
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc
new file mode 100644
index 00000000000..9f9c2836454
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc
@@ -0,0 +1,160 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 B (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+#define round(X) floor((X)+0.5)
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const float y_weight = 48.0;
+const float u_weight = 7.0;
+const float v_weight = 6.0;
+const mat4 yuv = mat4(
+ 0.299, 0.587, 0.114, 0.0,
+ -0.169, -0.331, 0.499, 0.0,
+ 0.499, -0.418, -0.0813, 0.0,
+ 0.0, 0.0, 0.0, 0.0
+);
+
+const mat4 yuv_weighted = mat4(
+ 48.0 * vec4( 0.299, 0.587, 0.114, 0.0),
+ 7.0 * vec4(-0.169, -0.331, 0.499, 0.0),
+ 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0),
+ 0.0 * vec4( 0.0, 0.0, 0.0, 0.0)
+);
+const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4);
+
+vec3 remapTo01(vec3 v, vec3 low, vec3 high)
+{
+ return saturate((v - low) / (high-low));
+}
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0] );
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0] );
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0] );
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0] );
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0] );
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0] );
+ vec4 f4 = h5.yzwx;
+
+ vec4 interp_restriction_lv1 = ne(e,f) * ne(e,h) * ( ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c));
+ vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g);
+ vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c);
+
+ interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0);
+
+ vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr;
+
+ vec3 info;
+ info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0));
+ info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0));
+ info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0));
+
+ gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc
new file mode 100644
index 00000000000..05b2398ad9c
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc
@@ -0,0 +1,158 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 C (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+#define round(X) floor((X)+0.5)
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const float y_weight = 48.0;
+const float u_weight = 7.0;
+const float v_weight = 6.0;
+const mat4 yuv = mat4(
+ 0.299, 0.587, 0.114, 0.0,
+ -0.169, -0.331, 0.499, 0.0,
+ 0.499, -0.418, -0.0813, 0.0,
+ 0.0, 0.0, 0.0, 0.0
+);
+
+const mat4 yuv_weighted = mat4(
+ 48.0 * vec4( 0.299, 0.587, 0.114, 0.0),
+ 7.0 * vec4(-0.169, -0.331, 0.499, 0.0),
+ 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0),
+ 0.0 * vec4( 0.0, 0.0, 0.0, 0.0)
+);
+const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4);
+
+vec3 remapTo01(vec3 v, vec3 low, vec3 high)
+{
+ return saturate((v - low) / (high-low));
+}
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 interp_restriction_lv1 = clamp(ne(e,f) * ne(e,h) * (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)), 0.0, 1.0);
+ vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g);
+ vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c);
+
+ vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr;
+
+ vec3 info;
+ info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0));
+ info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0));
+ info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0));
+
+ gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc
new file mode 100644
index 00000000000..c168b2622a7
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc
@@ -0,0 +1,163 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 D (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+#define round(X) floor((X)+0.5)
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const float y_weight = 48.0;
+const float u_weight = 7.0;
+const float v_weight = 6.0;
+const mat4 yuv = mat4(
+ 0.299, 0.587, 0.114, 0.0,
+ -0.169, -0.331, 0.499, 0.0,
+ 0.499, -0.418, -0.0813, 0.0,
+ 0.0, 0.0, 0.0, 0.0
+);
+
+const mat4 yuv_weighted = mat4(
+ 48.0 * vec4( 0.299, 0.587, 0.114, 0.0),
+ 7.0 * vec4(-0.169, -0.331, 0.499, 0.0),
+ 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0),
+ 0.0 * vec4( 0.0, 0.0, 0.0, 0.0)
+);
+const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4);
+
+vec3 remapTo01(vec3 v, vec3 low, vec3 high)
+{
+ return saturate((v - low) / (high-low));
+}
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 c1 = i4.yzwx;
+ vec4 g0 = i5.wxyz;
+
+ vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)) * (ne(f,f4) * ne(f,i) + ne(h,h5) * ne(h,i) + ne(h,g) + ne(f,c) + lt(b,c1) * lt(d,g0)));
+ vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g));
+ vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c));
+
+ interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0);
+
+ vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr;
+
+ vec3 info;
+ info.x = dot(vec4(edr ), vec4(8.0, 4.0, 2.0, 1.0));
+ info.y = dot(vec4(edr_left), vec4(8.0, 4.0, 2.0, 1.0));
+ info.z = dot(vec4(edr_up ), vec4(8.0, 4.0, 2.0, 1.0));
+
+ gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc
new file mode 100644
index 00000000000..c46dd90ba0a
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc
@@ -0,0 +1,162 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 - noblend - pass1 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+uniform vec4 u_tex_size0;
+
+#define round(X) floor((X) + 0.5)
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const float y_weight = 48.0;
+const float u_weight = 7.0;
+const float v_weight = 6.0;
+const mat4 yuv = mat4(
+ 0.299, 0.587, 0.114, 0.0,
+ -0.169, -0.331, 0.499, 0.0,
+ 0.499, -0.418, -0.0813, 0.0,
+ 0.0, 0.0, 0.0, 0.0
+);
+
+const mat4 yuv_weighted = mat4(
+ 48.0 * vec4( 0.299, 0.587, 0.114, 0.0),
+ 7.0 * vec4(-0.169, -0.331, 0.499, 0.0),
+ 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0),
+ 0.0 * vec4( 0.0, 0.0, 0.0, 0.0)
+);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+
+vec3 remapFrom01(vec3 v, vec3 low, vec3 high)
+{
+ return round(mix(low, high, v));
+}
+
+vec4 unpack_info(float i)
+{
+ vec4 info;
+ float frac_val = fract(i / 2.0f);
+ info.w = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.z = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.y = round(frac_val);
+ info.x = i / 2.0f - frac_val;
+
+ return info;
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 B = texture2D(ORIG_texture, v_texcoord1.xy);
+ vec4 D = texture2D(ORIG_texture, v_texcoord2.xw);
+ vec4 E = texture2D(ORIG_texture, v_texcoord2.yw);
+ vec4 F = texture2D(ORIG_texture, v_texcoord2.zw);
+ vec4 H = texture2D(ORIG_texture, v_texcoord1.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0] );
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0] );
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 h = b.zwxy;
+
+ vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 );
+ vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 );
+ vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 );
+ vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 );
+ vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
+ vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 );
+ vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 );
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = ge(Co, Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = ge(Cx, Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = ge(Cy, Ay*fp.y+By*fp.x);
+
+ vec4 info = texture2D(decal, v_texcoord0);
+
+ vec3 i = remapFrom01(info.xyz, vec3(0.0, 0.0, 0.0), vec3(15.0, 15.0, 15.0));
+
+ vec4 edr = unpack_info(i.x);
+ vec4 edr_left = unpack_info(i.y);
+ vec4 edr_up = unpack_info(i.z);
+
+ fx = edr * fx;
+ fx_left = edr_left * fx_left;
+ fx_up = edr_up * fx_up;
+
+ vec4 nc = max(fx, max(fx_left, fx_up));
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec3 res1 = nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : E.xyz;
+ vec3 res2 = nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : E.xyz;
+
+ vec2 df12 = abs(mul(mat3(res1, res2, vec3(0.0, 0.0, 0.0)), yuv_weighted[0].xyz).xy - e.xy);
+ vec3 res = mix(res1, res2, step(df12.x, df12.y));
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc
new file mode 100644
index 00000000000..b34ad4fe005
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc
@@ -0,0 +1,185 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 - pass1 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+uniform vec4 u_tex_size0;
+uniform vec4 u_tex_size1;
+uniform vec4 u_target_dims;
+
+#define round(X) floor((X)+0.5)
+
+const float coef = 2.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const float y_weight = 48.0;
+const float u_weight = 7.0;
+const float v_weight = 6.0;
+const mat4 yuv = mat4(
+ 0.299, 0.587, 0.114, 0.0,
+ -0.169, -0.331, 0.499, 0.0,
+ 0.499, -0.418, -0.0813, 0.0,
+ 0.0, 0.0, 0.0, 0.0
+);
+
+const mat4 yuv_weighted = mat4(
+ 48.0 * vec4( 0.299, 0.587, 0.114, 0.0),
+ 7.0 * vec4(-0.169, -0.331, 0.499, 0.0),
+ 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0),
+ 0.0 * vec4( 0.0, 0.0, 0.0, 0.0)
+);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+
+vec3 remapFrom01(vec3 v, vec3 low, vec3 high)
+{
+ return round(mix(low, high, v));
+}
+
+vec4 unpack_info(float i)
+{
+ vec4 info;
+ float frac_val = fract(i / 2.0f);
+ info.w = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.z = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.y = round(frac_val);
+ info.x = i / 2.0f - frac_val;
+
+ return info;
+}
+
+void main()
+{
+ vec2 fp = fract(v_texcoord0 * u_tex_size0.xy);
+
+ vec4 B = texture2D(ORIG_texture, v_texcoord1.xy);
+ vec4 D = texture2D(ORIG_texture, v_texcoord2.xw);
+ vec4 E = texture2D(ORIG_texture, v_texcoord2.yw);
+ vec4 F = texture2D(ORIG_texture, v_texcoord2.zw);
+ vec4 H = texture2D(ORIG_texture, v_texcoord1.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 h = b.zwxy;
+
+ vec4 Ao = vec4(1.0, -1.0, -1.0, 1.0);
+ vec4 Bo = vec4(1.0, 1.0, -1.0, -1.0);
+ vec4 Co = vec4(1.5, 0.5, -0.5, 0.5);
+ vec4 Ax = vec4(1.0, -1.0, -1.0, 1.0);
+ vec4 Bx = vec4(0.5, 2.0, -0.5, -2.0);
+ vec4 Cx = vec4(1.0, 1.0, -0.5, 0.0);
+ vec4 Ay = vec4(1.0, -1.0, -1.0, 1.0);
+ vec4 By = vec4(2.0, 0.5, -2.0, -0.5);
+ vec4 Cy = vec4(2.0, 0.0, -1.0, 0.5);
+
+ // These inequations define the line below which interpolation occurs.
+ vec4 fx = (Ao*fp.y+Bo*fp.x);
+ vec4 fx_left = (Ax*fp.y+Bx*fp.x);
+ vec4 fx_up = (Ay*fp.y+By*fp.x);
+
+ vec2 delta = vec2(u_tex_size1.x / u_target_dims.x, 0.5 * u_tex_size1.x / u_target_dims.x);
+
+ vec4 fx45 = saturate((fx + delta.xxxx - Co) / (2.0 * delta.xxxx));
+ vec4 fx30 = saturate((fx_left + delta.yxyx - Cx) / (2.0 * delta.yxyx));
+ vec4 fx60 = saturate((fx_up + delta.xyxy - Cy) / (2.0 * delta.xyxy));
+
+ vec4 info = texture2D(decal, v_texcoord0);
+
+ vec3 i = remapFrom01(info.xyz, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0));
+
+ vec4 edr = unpack_info(i.x);
+ vec4 edr_left = unpack_info(i.y);
+ vec4 edr_up = unpack_info(i.z);
+
+ fx45 = edr * fx45;
+ fx30 = edr_left * fx30;
+ fx60 = edr_up * fx60;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec4 maximo = max(max(fx30, fx60), fx45);
+
+ mat4 pix = mat4(mix(E, mix(H, F, px.x), maximo.x), mix(E, mix(F, B, px.y), maximo.y), mix(E, mix(B, D, px.z), maximo.z), mix(E, mix(D, H, px.w), maximo.w));
+ vec4 pixel = mul(pix, yuv_weighted[0]);
+
+ vec4 diff = df(pixel,e);
+
+ vec3 res = pix[0].xyz;
+ float mx = diff.x;
+
+ if (diff.y > mx)
+ {
+ res = pix[1].xyz;
+ mx = diff.y;
+ }
+ if (diff.z > mx)
+ {
+ res = pix[2].xyz;
+ mx = diff.z;
+ }
+ if (diff.w > mx)
+ {
+ res = pix[3].xyz;
+ }
+
+ gl_FragColor = vec4(res, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/varying.def.sc
index c65b5426733..92c3034f498 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/varying.def.sc
@@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0);
vec3 a_position : POSITION;
vec4 a_color0 : COLOR0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc
new file mode 100644
index 00000000000..3a80bf6f7bb
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 A (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc
new file mode 100644
index 00000000000..4cd8b064523
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc
@@ -0,0 +1,59 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 Accuracy - pass0 Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc
new file mode 100644
index 00000000000..c20050aa1f4
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc
@@ -0,0 +1,55 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 Accuracy - pass1 Shader
+
+ Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size1;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size1.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xyyy + vec4(0.0, -dy, 0.0, dy); // B
+ v_texcoord2 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, 0.0); //D E F
+ // H
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc
new file mode 100644
index 00000000000..5515f4f4904
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 B (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc
new file mode 100644
index 00000000000..9d0b7161844
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 C (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc
new file mode 100644
index 00000000000..8f9b4f316d9
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 D (squared) - pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc
new file mode 100644
index 00000000000..86df31a48e4
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc
@@ -0,0 +1,54 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 - noblend - pass1 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size1;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size1.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xyyy + vec4( 0.0, -dy, 0.0, dy); // B
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); //D E F
+ // H
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc
new file mode 100644
index 00000000000..d678e8b0541
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc
@@ -0,0 +1,56 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR LV2 - pass1 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size1;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size1.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xyyy + vec4( 0.0, -dy, 0.0, dy); // B
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); //D E F
+ // H
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc
new file mode 100644
index 00000000000..e9328bb4015
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc
@@ -0,0 +1,216 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR level 3 pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+const float coef = 2.0;
+const float cf = 4.0;
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 remapTo01(vec4 v, vec4 high)
+{
+ return (v/high);
+}
+
+vec4 remapFrom01(vec4 v, vec4 high)
+{
+ return (high*v + vec4(0.5, 0.5, 0.5, 0.5));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+#define FILTRO(EDR0, EDR, LEFT, UP, LEFT3, UP3, PX0, PX3, PX1, LIN0, LIN3, LIN1, PX) \
+ if (LEFT > 0.0 && UP == 0.0) \
+ { \
+ PX0 = vec2(0.0, PX); \
+ PX3 = vec2( PX, 0.0); \
+ if (LEFT3 > 0.0) \
+ { \
+ LIN0 = vec4(0.0, 1.0, 0.0, 0.0);\
+ LIN3 = vec4(1.0, 0.0, 0.0, 0.0);\
+ } \
+ else \
+ { \
+ LIN0 = vec4(0.0, 0.0, 1.0, 0.0);\
+ LIN3 = vec4(0.0, 1.0, 1.0, 0.0);\
+ } \
+ } \
+ else if (UP > 0.0 && LEFT == 0.0) \
+ { \
+ PX0 = vec2(0.0, 1.0 - PX); \
+ PX1 = vec2(1.0 - PX, 0.0); \
+ if (UP3 > 0.0) \
+ { \
+ LIN0 = vec4(0.0, 1.0, 0.0, 1.0);\
+ LIN1 = vec4(1.0, 0.0, 0.0, 1.0);\
+ } \
+ else \
+ { \
+ LIN0 = vec4(0.0, 0.0, 1.0, 1.0);\
+ LIN1 = vec4(0.0, 1.0, 1.0, 1.0);\
+ } \
+ } \
+ else if (EDR > 0.0) \
+ { \
+ LEFT = UP = LEFT3 = UP3 = 0.0; \
+ PX0 = vec2(0.0, PX); \
+ LIN0 = vec4(0.0, 0.0, 0.0, 1.0); \
+ } \
+ else if (EDR0 > 0.0) \
+ { \
+ LEFT = UP = LEFT3 = UP3 = 0.0; \
+ PX0 = vec2(0.0, PX); \
+ LIN0 = vec4(0.0, 0.0, 0.0, 0.0); \
+ } \
+
+
+
+void main()
+{
+ vec2 px0, px1, px2, px3;
+
+ vec4 A1 = texture2D(decal, v_texcoord1.xw);
+ vec4 B1 = texture2D(decal, v_texcoord1.yw);
+ vec4 C1 = texture2D(decal, v_texcoord1.zw);
+
+ vec4 A = texture2D(decal, v_texcoord2.xw);
+ vec4 B = texture2D(decal, v_texcoord2.yw);
+ vec4 C = texture2D(decal, v_texcoord2.zw);
+
+ vec4 D = texture2D(decal, v_texcoord3.xw);
+ vec4 E = texture2D(decal, v_texcoord3.yw);
+ vec4 F = texture2D(decal, v_texcoord3.zw);
+
+ vec4 G = texture2D(decal, v_texcoord4.xw);
+ vec4 H = texture2D(decal, v_texcoord4.yw);
+ vec4 I = texture2D(decal, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(decal, v_texcoord5.xw);
+ vec4 H5 = texture2D(decal, v_texcoord5.yw);
+ vec4 I5 = texture2D(decal, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(decal, v_texcoord6.xy);
+ vec4 D0 = texture2D(decal, v_texcoord6.xz);
+ vec4 G0 = texture2D(decal, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(decal, v_texcoord7.xy);
+ vec4 F4 = texture2D(decal, v_texcoord7.xz);
+ vec4 I4 = texture2D(decal, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 c1 = i4.yzwx;
+ vec4 g0 = i5.wxyz;
+ vec4 b1 = h5.zwxy;
+ vec4 d0 = h5.wxyz;
+
+ vec4 interp_restriction_lv0 = ne(e,f) * ne(e,h);
+ vec4 interp_restriction_lv1 = (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c));
+ vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g);
+ vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c);
+ vec4 interp_restriction_lv3_left = ne(e,g0) * ne(d0,g0);
+ vec4 interp_restriction_lv3_up = ne(e,c1) * ne(b1,c1);
+
+ vec4 edr0 = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv0;
+
+ vec4 edr = edr0 * interp_restriction_lv1;
+ vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr;
+ vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr;
+ vec4 edr3_left = le(cf * df(f,g0), df(h,c1)) * interp_restriction_lv3_left * edr_left;
+ vec4 edr3_up = ge(df(f,g0), cf * df(h,c1)) * interp_restriction_lv3_up * edr_up;
+
+ vec4 px = le(df(e,f), df(e,h));
+
+ vec4 lin0 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 lin1 = lin0;
+ vec4 lin2 = lin0;
+ vec4 lin3 = lin0;
+
+ FILTRO(edr0.x, edr.x, edr_left.x, edr_up.x, edr3_left.x, edr3_up.x, px0, px3, px1, lin0, lin3, lin1, px.x);
+ FILTRO(edr0.y, edr.y, edr_left.y, edr_up.y, edr3_left.y, edr3_up.y, px1, px0, px2, lin1, lin0, lin2, px.y);
+ FILTRO(edr0.z, edr.z, edr_left.z, edr_up.z, edr3_left.z, edr3_up.z, px2, px1, px3, lin2, lin1, lin3, px.z);
+ FILTRO(edr0.w, edr.w, edr_left.w, edr_up.w, edr3_left.w, edr3_up.w, px3, px2, px0, lin3, lin2, lin0, px.w);
+
+ vec4 info = mul(vec4(1.0, 2.0, 4.0, 8.0), mat4( edr3_left,
+ edr3_up,
+ px0.x, px1.x, px2.x, px3.x,
+ px0.y, px1.y, px2.y, px3.y));
+
+ info += mul(vec4(16.0, 32.0, 64.0, 128.0), mat4(lin0.x, lin1.x, lin2.x, lin3.x,
+ lin0.y, lin1.y, lin2.y, lin3.y,
+ lin0.z, lin1.z, lin2.z, lin3.z,
+ lin0.w, lin1.w, lin2.w, lin3.w));
+
+ gl_FragColor = vec4(remapTo01(info, vec4(255.0, 255.0, 255.0, 255.0)));
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc
new file mode 100644
index 00000000000..df6d0a72265
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc
@@ -0,0 +1,180 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR level 3 pass1 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+uniform vec4 u_tex_size0;
+
+#define round(X) floor((X)+0.5)
+
+const mat4 sym_vectors = mat4(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+const vec3 lines0 = vec3(1.0, 1.0, 0.75);
+const vec3 lines1 = vec3(1.0, 1.0, 0.5);
+const vec3 lines2 = vec3(2.0, 1.0, 0.5);
+const vec3 lines3 = vec3(1.0, 2.0, 0.5);
+const vec3 lines4 = vec3(3.0, 1.0, 0.5);
+const vec3 lines5 = vec3(1.0, 3.0, 0.5);
+
+const vec3 lines6 = vec3(-1.0, 2.0, 0.5);
+const vec3 lines7 = vec3( 2.0, -1.0, 0.5);
+const vec3 lines8 = vec3(-1.0, 3.0, 0.5);
+const vec3 lines9 = vec3( 3.0, -1.0, 0.5);
+
+const vec3 lines10 = vec3(3.0, 1.0, 1.5);
+const vec3 lines11 = vec3(1.0, 3.0, 1.5);
+
+float remapFrom01(float v, float high)
+{
+ return (high*v + 0.5);
+}
+
+
+vec3 remapFrom01(vec3 v, vec3 low, vec3 high)
+{
+ return round(mix(low, high, v));
+}
+
+vec4 unpack_info(float i)
+{
+ vec4 info;
+ float frac_val = fract(i / 2.0f);
+ info.w = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.z = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.y = round(frac_val);
+ info.x = i / 2.0f - frac_val;
+
+ return info;
+}
+
+void main()
+{
+ vec2 pos = fract(v_texcoord0 * u_tex_size0.xy) - vec2(0.5, 0.5); // pos = pixel position
+ vec4 dir = vec4(sign(pos), 0.0, 0.0); // dir = pixel direction
+
+ vec2 g1 = dir.xy *( saturate(-dir.y * dir.x) * v_texcoord1.zw + saturate( dir.y * dir.x) * v_texcoord1.xy);
+ vec2 g2 = dir.xy *( saturate( dir.y * dir.x) * v_texcoord1.zw + saturate(-dir.y * dir.x) * v_texcoord1.xy);
+
+ vec4 F = texture2D(ORIG_texture, v_texcoord0 +g1);
+ vec4 B = texture2D(ORIG_texture, v_texcoord0 -g2);
+ vec4 D = texture2D(ORIG_texture, v_texcoord0 -g1);
+ vec4 H = texture2D(ORIG_texture, v_texcoord0 +g2);
+ vec4 E = texture2D(ORIG_texture, v_texcoord0 );
+
+ vec4 F4 = texture2D(ORIG_texture, v_texcoord0 +2.0*g1);
+ vec4 I = texture2D(ORIG_texture, v_texcoord0 +g1+g2);
+ vec4 H5 = texture2D(ORIG_texture, v_texcoord0 +2.0*g2);
+
+ vec4 icomp = round(saturate(mul(dir, sym_vectors))); // choose info component
+ float info = remapFrom01(dot(texture2D(decal, v_texcoord0 ), icomp), 255.0); // retrieve 1st pass info
+ float info_nr = remapFrom01(dot(texture2D(decal, v_texcoord0 + g1), icomp), 255.0); // 1st pass info from neighbor r
+ float info_nd = remapFrom01(dot(texture2D(decal, v_texcoord0 + g2), icomp), 255.0); // 1st pass info from neighbor d
+
+ info = info / 2.0 - fract(info / 2.0);
+ info = info / 2.0 - fract(info / 2.0);
+ vec2 px;
+
+ float frac_val = fract(info / 2.0);
+ px.x = round(frac_val);
+ info = info / 2.0 - frac_val;
+
+ frac_val = fract(info / 2.0);
+ px.y = round(frac_val);
+ info = info / 2.0 - frac_val;
+
+ vec4 flags = unpack_info(info); // retrieve 1st pass flags
+
+ frac_val = fract(info_nr / 2.0);
+ float edr3_nrl = round(frac_val);
+ info_nr = info_nr / 2.0 - frac_val;
+ info_nr = info_nr / 2.0 - fract(info_nr / 2.0);
+ info_nr = info_nr / 2.0 - fract(info_nr / 2.0);
+
+ frac_val = fract(info_nr / 2.0);
+ float pxr = round(frac_val);
+ info_nr = info_nr / 2.0 - frac_val;
+
+ info_nd = info_nd / 2.0 - fract(info_nd / 2.0);
+
+ frac_val = fract(info_nd / 2.0);
+ float edr3_ndu = round(frac_val);
+ info_nd = info_nd / 2.0 - frac_val;
+
+ info_nd = info_nd / 2.0 - fract(info_nd / 2.0);
+
+ frac_val = fract(info_nd / 2.0);
+ float pxd = round(frac_val);
+ info_nd = info_nd / 2.0 - frac_val;
+
+ float aux = round(dot(vec4(8.0, 4.0, 2.0, 1.0), flags));
+ vec3 slep;
+
+ if (aux >= 6.0)
+ {
+ slep = (aux == 6.0 ? lines6 : (aux == 7.0 ? lines7 : (aux == 8.0 ? lines8 : (aux == 9.0 ? lines9 : (aux == 10.0 ? lines10 : lines11)))));
+ }
+ else
+ {
+ slep = (aux == 0.0 ? lines0 : (aux == 1.0 ? lines1 : (aux == 2.0 ? lines2 : (aux == 3.0 ? lines3 : (aux == 4.0 ? lines4 : lines5)))));
+ }
+
+ vec2 fp = (dir.x * dir.y) > 0.0 ? abs(pos) : abs(pos.yx);
+
+ vec3 fp1 = vec3(fp.yx, -1);
+
+ vec3 color = E.xyz;
+ float fx;
+
+ if (aux < 10.0)
+ {
+ fx = saturate(dot(fp1, slep) / (2.0 * v_texcoord2.x) + 0.5);
+ color = mix(E.xyz, mix(mix(H.xyz, F.xyz, px.y), mix(D.xyz, B.xyz, px.y), px.x), fx); // interpolate if there's edge
+ }
+ else if (edr3_nrl > 0.0)
+ {
+ fx = saturate(dot(fp1, lines10) / (2.0 * v_texcoord2.x) + 0.5);
+ color = mix(E.xyz, mix(I.xyz, F4.xyz, pxr), fx); // interpolate if there's edge
+ }
+ else if (edr3_ndu > 0.0)
+ {
+ fx = saturate(dot(fp1, lines11) / (2.0 * v_texcoord2.x) + 0.5);
+ color = mix(E.xyz, mix(H5.xyz, I.xyz, pxd), fx); // interpolate if there's edge
+ }
+
+ gl_FragColor = vec4(color, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/varying.def.sc
index c65b5426733..92c3034f498 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/varying.def.sc
@@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0);
vec3 a_position : POSITION;
vec4 a_color0 : COLOR0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc
new file mode 100644
index 00000000000..d4420512bd4
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc
@@ -0,0 +1,60 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR level 3 pass0 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+ Incorporates some of the ideas from SABR shader. Thanks to Joshua Street.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc
new file mode 100644
index 00000000000..edfd9fa3dd9
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc
@@ -0,0 +1,55 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+ Hyllian's xBR level 3 pass1 Shader
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size1;
+uniform vec4 u_target_dims;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A3 B3 C3
+ // A1 B1 C1
+ //A2 A0 A B C C4 C6
+ //D2 D0 D E F F4 F6
+ //G2 G0 G H I I4 I6
+ // G5 H5 I5
+ // G7 H7 I7
+
+ vec2 ps = 1.0 / u_tex_size1.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = vec4(dx, 0, 0, dy); // F H
+ v_texcoord2 = vec4(u_tex_size1.x / u_target_dims.x, 0.5 * u_tex_size1.x / u_target_dims.x, 0.0, 0.0);
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc
new file mode 100644
index 00000000000..fe2e3188052
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc
@@ -0,0 +1,208 @@
+$input v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass1
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+
+#define round(X) floor((X)+0.5)
+#define TEX(dx,dy) texture2D(decal, v_texcoord0 + vec2(dx,dy) * v_texcoord1.xy)
+
+const float cf2 = 2.0;
+const float cf3 = 4.0;
+const float cf4 = 4.0;
+const vec4 eq_thresholdold = vec4(15.0, 15.0, 15.0, 15.0);
+const vec4 eq_threshold = vec4( 2.0, 2.0, 2.0, 2.0);
+const vec4 eq_threshold3 = vec4(25.0, 25.0, 25.0, 25.0);
+const vec4 yuv_weight = vec4( 4.0, 1.0, 2.0, 0.0);
+const mat4 yuvT = mat4(0.299, -0.169, 0.499, 0.0, 0.587, -0.331, -0.418, 0.0, 0.114, 0.499, -0.0813, 0.0, 0.0, 0.0, 0.0, 0.0);
+const mat4 yuv = mat4(0.299, 0.587, 0.114, 0.0, -0.169, -0.331, 0.499, 0.0, 0.499, -0.418, -0.0813, 0.0, 0.0, 0.0, 0.0, 0.0);
+const mat4 yuv_weighted = mat4(4.0 * vec4(0.299, 0.587, 0.114, 0.0), 2.0 * vec4(-0.169, -0.331, 0.499, 0.0), vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 maximo = vec4(255.0, 255.0, 255.0, 255.0);
+
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 rd(vec4 A, vec4 B, vec4 C, vec4 D)
+{
+ return vec4(greaterThan(df(C,D) / (df(A,B) + 0.000000001), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 id(vec4 A, vec4 B, vec4 C, vec4 D)
+{
+ return vec4(greaterThan(df(C,D), df(A,B)));
+}
+
+vec4 nid(vec4 A, vec4 B, vec4 C, vec4 D)
+{
+ return vec4(lessThanEqual(df(C,D), df(A,B)));
+}
+
+vec4 remapTo01(vec4 v, vec4 high)
+{
+ return (v/high);
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 ltt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), eq_threshold));
+}
+
+vec4 get(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), eq_threshold3));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec4 A3 = TEX(-1,-3); vec4 B3 = TEX( 0,-3); vec4 C3 = TEX( 1,-3);
+ vec4 A1 = TEX(-1,-2); vec4 B1 = TEX( 0,-2); vec4 C1 = TEX( 1,-2);
+ vec4 A2 = TEX(-3,-1); vec4 A0 = TEX(-2,-1); vec4 A = TEX(-1,-1);
+ vec4 B = TEX( 0,-1); vec4 C = TEX( 1,-1); vec4 C4 = TEX( 2,-1); vec4 C6 = TEX( 3,-1);
+ vec4 D2 = TEX(-3, 0); vec4 D0 = TEX(-2, 0); vec4 D = TEX(-1, 0); vec4 E = TEX( 0, 0);
+ vec4 F = TEX( 1, 0); vec4 F4 = TEX( 2, 0); vec4 F6 = TEX( 3, 0);
+ vec4 G2 = TEX(-3, 1); vec4 G0 = TEX(-2, 1); vec4 G = TEX(-1, 1); vec4 H = TEX( 0, 1);
+ vec4 I = TEX( 1, 1); vec4 I4 = TEX( 2, 1); vec4 I6 = TEX( 3, 1);
+ vec4 G5 = TEX(-1, 2); vec4 H5 = TEX( 0, 2); vec4 I5 = TEX( 1, 2);
+ vec4 G7 = TEX(-1, 3); vec4 H7 = TEX( 0, 3); vec4 I7 = TEX( 1, 3);
+
+ mat4 bdhf = mul(mat4(B, D, H, F), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 b = mul(bdhf, yuv_weight);
+
+ bdhf = mul(mat4(C, A, G, I), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 c = mul(bdhf, yuv_weight);
+
+ bdhf = mul(mat4(E, E, E, E), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 e = mul(bdhf, yuv_weight);
+
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ bdhf = mul(mat4(I4, C1, A0, G5), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 i4 = mul(bdhf, yuv_weight);
+
+ bdhf = mul(mat4(I5, C4, A1, G0), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 i5 = mul(bdhf, yuv_weight);
+
+ bdhf = mul(mat4(H5, F4, B1, D0), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 h5 = mul(bdhf, yuv_weight);
+
+ vec4 f4 = h5.yzwx;
+
+ vec4 c1 = i4.yzwx;
+ vec4 g0 = i5.wxyz;
+ vec4 b1 = h5.zwxy;
+ vec4 d0 = h5.wxyz;
+
+ bdhf = mul(mat4(I6, C3, A2, G7), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 i6 = mul(bdhf, yuv_weight);
+
+ bdhf = mul(mat4(I7, C6, A3, G2), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 i7 = mul(bdhf, yuv_weight);
+
+ bdhf = mul(mat4(H7, F6, B3, D2), yuvT);
+ bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3]));
+ vec4 h7 = mul(bdhf, yuv_weight);
+
+ vec4 f6 = h7.yzwx;
+
+ vec4 c3 = i6.yzwx;
+ vec4 g2 = i7.wxyz;
+ vec4 b3 = h7.zwxy;
+ vec4 d2 = h7.wxyz;
+
+ vec4 interp_restriction_lv1 = ne(e,f ) * ne(e ,h );
+ vec4 interp_restriction_lv2_left = ne(e,g ) * ne(d ,g ) * (ltt(e, d ) + ltt(h ,g ));
+ vec4 interp_restriction_lv2_up = ne(e,c ) * ne(b ,c ) * (ltt(e, b ) + ltt(f ,c ));
+ vec4 interp_restriction_lv3_left = ne(e,g0) * ne(d0,g0) * (ltt(d ,d0) + ltt(g ,g0));
+ vec4 interp_restriction_lv3_up = ne(e,c1) * ne(b1,c1) * (ltt(b ,b1) + ltt(c ,c1));
+ vec4 interp_restriction_lv4_left = ne(e,g2) * ne(d2,g2) * (ltt(d0,d2) + ltt(g0,g2));
+ vec4 interp_restriction_lv4_up = ne(e,c3) * ne(b3,c3) * (ltt(b1,b3) + ltt(c1,c3));
+
+ vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f);
+ vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i);
+
+ vec4 edr0 = le(wd1, wd2) * interp_restriction_lv1;
+ vec4 edr = lt(wd1, wd2) * interp_restriction_lv1 * (ge(f,b) * nid(f,c,f,b) + ge(h,d) * nid(h,g,h,d) + lt(e,g) + lt(e,c));
+ vec4 edr_left = le(cf2 * df(f,g ), df(h,c )) * interp_restriction_lv2_left * edr;
+ vec4 edr_up = ge(df(f,g ), cf2 * df(h,c )) * interp_restriction_lv2_up * edr;
+ vec4 edr3_left = le(cf3 * df(f,g0), df(h,c1)) * interp_restriction_lv3_left * edr_left;
+ vec4 edr3_up = ge(df(f,g0), cf3 * df(h,c1)) * interp_restriction_lv3_up * edr_up;
+ vec4 edr4_left = le(cf4 * df(f,g2), df(h,c3)) * interp_restriction_lv4_left * edr3_left;
+ vec4 edr4_up = ge(df(f,g2), cf4 * df(h,c3)) * interp_restriction_lv4_up * edr3_up;
+
+ vec4 info;
+ info.x = (edr4_left.x > 0.0 && edr4_up.x == 0.0) ? 8.0 : ((edr4_up.x > 0.0 && edr4_left.x == 0.0) ? 7.0 : ((edr3_left.x > 0.0 && edr3_up.x == 0.0) ? 6.0 : ((edr3_up.x > 0.0 && edr3_left.x == 0.0) ? 5.0 : ((edr_left.x > 0.0 && edr_up.x == 0.0) ? 4.0 : ((edr_up.x > 0.0 && edr_left.x == 0.0) ? 3.0 : (edr.x > 0.0 ? 2.0 : (edr0.x > 0.0 ? 1.0 : 0.0)))))));
+ info.y = (edr4_left.y > 0.0 && edr4_up.y == 0.0) ? 8.0 : ((edr4_up.y > 0.0 && edr4_left.y == 0.0) ? 7.0 : ((edr3_left.y > 0.0 && edr3_up.y == 0.0) ? 6.0 : ((edr3_up.y > 0.0 && edr3_left.y == 0.0) ? 5.0 : ((edr_left.y > 0.0 && edr_up.y == 0.0) ? 4.0 : ((edr_up.y > 0.0 && edr_left.y == 0.0) ? 3.0 : (edr.y > 0.0 ? 2.0 : (edr0.y > 0.0 ? 1.0 : 0.0)))))));
+ info.z = (edr4_left.z > 0.0 && edr4_up.z == 0.0) ? 8.0 : ((edr4_up.z > 0.0 && edr4_left.z == 0.0) ? 7.0 : ((edr3_left.z > 0.0 && edr3_up.z == 0.0) ? 6.0 : ((edr3_up.z > 0.0 && edr3_left.z == 0.0) ? 5.0 : ((edr_left.z > 0.0 && edr_up.z == 0.0) ? 4.0 : ((edr_up.z > 0.0 && edr_left.z == 0.0) ? 3.0 : (edr.z > 0.0 ? 2.0 : (edr0.z > 0.0 ? 1.0 : 0.0)))))));
+ info.w = (edr4_left.w > 0.0 && edr4_up.w == 0.0) ? 8.0 : ((edr4_up.w > 0.0 && edr4_left.w == 0.0) ? 7.0 : ((edr3_left.w > 0.0 && edr3_up.w == 0.0) ? 6.0 : ((edr3_up.w > 0.0 && edr3_left.w == 0.0) ? 5.0 : ((edr_left.w > 0.0 && edr_up.w == 0.0) ? 4.0 : ((edr_up.w > 0.0 && edr_left.w == 0.0) ? 3.0 : (edr.w > 0.0 ? 2.0 : (edr0.w > 0.0 ? 1.0 : 0.0)))))));
+
+ gl_FragColor = vec4(remapTo01(info, maximo));
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc
new file mode 100644
index 00000000000..b0e0edf7778
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc
@@ -0,0 +1,235 @@
+$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass2
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+#define round(X) floor((X)+0.5)
+
+const float cf2 = 2.0;
+const float cf3 = 4.0;
+const float cf4 = 4.0;
+const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0);
+const vec4 eq_threshold2 = vec4( 5.0, 5.0, 5.0, 5.0);
+const vec4 eq_threshold3 = vec4(25.0, 25.0, 25.0, 25.0);
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 maximo = vec4(255.0, 255.0, 255.0, 255.0);
+
+vec4 df(vec4 A, vec4 B)
+{
+ return vec4(abs(A-B));
+}
+
+vec4 rd(vec4 A, vec4 B, vec4 C, vec4 D)
+{
+ return vec4(greaterThan(df(C,D) / (df(A,B) + 0.000000001), vec4(2.0, 2.0, 2.0, 2.0)));
+}
+
+vec4 id(vec4 A, vec4 B, vec4 C, vec4 D)
+{
+ return vec4(greaterThan(df(C,D), df(A,B)));
+}
+
+vec4 nid(vec4 A, vec4 B, vec4 C, vec4 D)
+{
+ return vec4(lessThanEqual(df(C,D), df(A,B)));
+}
+
+vec4 remapTo01(vec4 v, vec4 high)
+{
+ return (v/high);
+}
+
+vec4 remapFrom01(vec4 v, vec4 high)
+{
+ return round(high*v);
+}
+
+vec4 eq(vec4 A, vec4 B)
+{
+ return vec4(equal(A, B));
+}
+
+vec4 lt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(A, B));
+}
+
+vec4 ltt(vec4 A, vec4 B)
+{
+ return vec4(lessThan(df(A, B), eq_threshold));
+}
+
+vec4 get(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(df(A, B), eq_threshold3));
+}
+
+vec4 le(vec4 A, vec4 B)
+{
+ return vec4(lessThanEqual(A, B));
+}
+
+vec4 ge(vec4 A, vec4 B)
+{
+ return vec4(greaterThanEqual(A, B));
+}
+
+vec4 gt(vec4 A, vec4 B)
+{
+ return vec4(greaterThan(A, B));
+}
+
+vec4 ne(vec4 A, vec4 B)
+{
+ return vec4(notEqual(A, B));
+}
+
+vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+vec4 select(vec4 A, vec4 B, vec4 C)
+{
+ vec4 result;
+ result.x = ((A.x > 0.0) ? B.x : C.x);
+ result.y = ((A.y > 0.0) ? B.y : C.y);
+ result.z = ((A.z > 0.0) ? B.z : C.z);
+ result.w = ((A.w > 0.0) ? B.w : C.w);
+ return result;
+}
+
+vec4 pe_check(vec4 pe, vec4 jag, float cf1, float cf2)
+{
+ pe.x = (pe.x == cf1 || pe.x == cf2) ? (jag.x > 0.0 ? pe.x : (pe.x - 2.0)) : pe.x;
+ pe.y = (pe.y == cf1 || pe.y == cf2) ? (jag.y > 0.0 ? pe.y : (pe.y - 2.0)) : pe.y;
+ pe.z = (pe.z == cf1 || pe.z == cf2) ? (jag.z > 0.0 ? pe.z : (pe.z - 2.0)) : pe.z;
+ pe.w = (pe.w == cf1 || pe.w == cf2) ? (jag.w > 0.0 ? pe.w : (pe.w - 2.0)) : pe.w;
+ return pe;
+}
+
+void main()
+{
+ vec4 PA = texture2D(decal, v_texcoord2.xw);
+ vec4 PB = texture2D(decal, v_texcoord2.yw);
+ vec4 PC = texture2D(decal, v_texcoord2.zw);
+
+ vec4 PD = texture2D(decal, v_texcoord3.xw);
+ vec4 PE = texture2D(decal, v_texcoord3.yw);
+ vec4 PF = texture2D(decal, v_texcoord3.zw);
+
+ vec4 PG = texture2D(decal, v_texcoord4.xw);
+ vec4 PH = texture2D(decal, v_texcoord4.yw);
+ vec4 PI = texture2D(decal, v_texcoord4.zw);
+
+ vec4 A1 = texture2D(ORIG_texture, v_texcoord1.xw);
+ vec4 B1 = texture2D(ORIG_texture, v_texcoord1.yw);
+ vec4 C1 = texture2D(ORIG_texture, v_texcoord1.zw);
+
+ vec4 A = texture2D(ORIG_texture, v_texcoord2.xw);
+ vec4 B = texture2D(ORIG_texture, v_texcoord2.yw);
+ vec4 C = texture2D(ORIG_texture, v_texcoord2.zw);
+
+ vec4 D = texture2D(ORIG_texture, v_texcoord3.xw);
+ vec4 E = texture2D(ORIG_texture, v_texcoord3.yw);
+ vec4 F = texture2D(ORIG_texture, v_texcoord3.zw);
+
+ vec4 G = texture2D(ORIG_texture, v_texcoord4.xw);
+ vec4 H = texture2D(ORIG_texture, v_texcoord4.yw);
+ vec4 I = texture2D(ORIG_texture, v_texcoord4.zw);
+
+ vec4 G5 = texture2D(ORIG_texture, v_texcoord5.xw);
+ vec4 H5 = texture2D(ORIG_texture, v_texcoord5.yw);
+ vec4 I5 = texture2D(ORIG_texture, v_texcoord5.zw);
+
+ vec4 A0 = texture2D(ORIG_texture, v_texcoord6.xy);
+ vec4 D0 = texture2D(ORIG_texture, v_texcoord6.xz);
+ vec4 G0 = texture2D(ORIG_texture, v_texcoord6.xw);
+
+ vec4 C4 = texture2D(ORIG_texture, v_texcoord7.xy);
+ vec4 F4 = texture2D(ORIG_texture, v_texcoord7.xz);
+ vec4 I4 = texture2D(ORIG_texture, v_texcoord7.xw);
+
+ vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]);
+ vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]);
+ vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]);
+ vec4 d = b.yzwx;
+ vec4 f = b.wxyz;
+ vec4 g = c.zwxy;
+ vec4 h = b.zwxy;
+ vec4 i = c.wxyz;
+
+ vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]);
+ vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]);
+ vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]);
+ vec4 f4 = h5.yzwx;
+
+ vec4 pe = remapFrom01(PE, maximo);
+ vec4 pf = remapFrom01(PF, maximo);
+ vec4 ph = remapFrom01(PH, maximo);
+ vec4 pb = remapFrom01(PB, maximo);
+ vec4 pd = remapFrom01(PD, maximo);
+
+ vec4 f2 = vec4(pf.z, pb.w, pd.x, ph.y);
+ vec4 h2 = vec4(ph.z, pf.w, pb.x, pd.y);
+ vec4 f1 = vec4(pf.y, pb.z, pd.w, ph.x);
+ vec4 h3 = vec4(ph.w, pf.x, pb.y, pd.z);
+
+ vec4 zero = vec4(0.0, 0.0, 0.0, 0.0);
+ vec4 one = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 two = vec4(2.0, 2.0, 2.0, 2.0);
+ vec4 four = vec4(4.0, 4.0, 4.0, 4.0);
+ vec4 nbrs = select(gt(pe.yzwx, one) + gt(pe.wxyz, one), one, zero);
+ vec4 jag1 = select(gt( f2, one) + gt( h2, one), one, zero);
+ vec4 jag2 = select(gt( f2, two) + gt( h2, two), one, zero);
+ vec4 jag3 = select(gt( f2, four) + gt( h2, four), one, zero);
+
+ pe = pe_check(pe, jag3, 7.0, 8.0);
+ pe = pe_check(pe, jag2, 5.0, 6.0);
+
+ vec4 jag91 = clamp((id(h,i,e,h) + id(i4,i,f4,i4)) * gt(f2, one) * gt(f1, one), 0.0, 1.0);
+ vec4 jag92 = clamp((id(f,i,e,f) + id(i5,i,h5,i5)) * gt(h2, one) * gt(h3, one), 0.0, 1.0);
+ vec4 jag93 = clamp(rd(h,g,e,g) , 0.0, 1.0);
+ vec4 jag94 = clamp(rd(f,c,e,c) , 0.0, 1.0);
+ vec4 jag9 = clamp(jag91 * jag93 + jag92 * jag94 , 0.0, 1.0);
+
+ vec4 pe_select = eq(pe, zero) + ((one - nbrs) + jag1) * jag9;
+
+ pe.x = pe_select.x > 0.0 ? pe.x : 1.0;
+ pe.y = pe_select.y > 0.0 ? pe.y : 1.0;
+ pe.z = pe_select.z > 0.0 ? pe.z : 1.0;
+ pe.w = pe_select.w > 0.0 ? pe.w : 1.0;
+
+ gl_FragColor = vec4(remapTo01(pe, maximo));
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc
new file mode 100644
index 00000000000..00391c77120
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc
@@ -0,0 +1,172 @@
+$input v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass3
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+uniform vec4 u_tex_size1;
+
+#define round(X) floor((X)+0.5)
+
+const float coef = 2.0;
+const float cf = 4.0;
+const float eq_threshold = 15.0;
+const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0));
+const vec4 maximo = vec4(255.0, 255.0, 255.0, 255.0);
+const vec4 low = vec4(-64.0, -64.0, -64.0, -64.0);
+const vec4 high = vec4( 64.0, 64.0, 64.0, 64.0);
+
+const mat4 sym_vectors = mat4(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+// Bx, Ay, C
+const vec3 lines0 = vec3( 4.0, 4.0, 4.0); // 0 NL
+const vec3 lines1 = vec3( 4.0, 4.0, 3.0); // 1 LV0
+const vec3 lines2 = vec3( 4.0, 4.0, 2.0); // 2 LV1
+const vec3 lines3 = vec3( 8.0, 4.0, 2.0); // 3 LV2u
+const vec3 lines4 = vec3( 4.0, 8.0, 2.0); // 4 LV2l
+const vec3 lines5 = vec3(12.0, 4.0, 2.0); // 5 LV3u
+const vec3 lines6 = vec3( 4.0,12.0, 2.0); // 6 LV3l
+const vec3 lines7 = vec3(16.0, 4.0, 2.0); // 7 LV4u
+const vec3 lines8 = vec3( 4.0,16.0, 2.0); // 8 LV4l
+
+const vec3 lines9 = vec3(12.0, 4.0, 6.0); // 9 LV3u
+const vec3 lines10 = vec3( 4.0,12.0, 6.0); // 10 LV3l
+const vec3 lines11 = vec3(16.0, 4.0, 6.0); // 11 LV4u
+const vec3 lines12 = vec3( 4.0,16.0, 6.0); // 12 LV4l
+
+vec4 remapTo01(vec4 v, vec4 low, vec4 high)
+{
+ return saturate((v - low)/(high-low));
+}
+
+float remapFrom01(float v, float high)
+{
+ return round(high*v);
+}
+
+float df(float A, float B)
+{
+ return abs(A-B);
+}
+
+float weighted_distance(float a, float b, float c, float d, float e, float f, float g, float h)
+{
+ return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
+}
+
+void main()
+{
+ vec2 pos = fract(v_texcoord0 * u_tex_size1.xy) - vec2(0.5, 0.5); // pos = pixel position
+ vec4 dir = vec4(sign(pos), 0.0, 0.0);
+
+ vec2 g1 = dir.xy * (saturate(-dir.y * dir.x) * v_texcoord1.zw + saturate( dir.y * dir.x) * v_texcoord1.xy);
+ vec2 g2 = dir.xy * (saturate( dir.y * dir.x) * v_texcoord1.zw + saturate(-dir.y * dir.x) * v_texcoord1.xy);
+
+ vec4 E = texture2D(ORIG_texture, v_texcoord0 );
+ vec4 F = texture2D(ORIG_texture, v_texcoord0 +g1);
+ vec4 H = texture2D(ORIG_texture, v_texcoord0 +g2);
+ vec4 I = texture2D(ORIG_texture, v_texcoord0 +g1+g2);
+ vec4 F4 = texture2D(ORIG_texture, v_texcoord0 +2.0*g1);
+ vec4 H5 = texture2D(ORIG_texture, v_texcoord0 +2.0*g2);
+
+ float e = dot(E, yuv_weighted[0]);
+ float f = dot(F, yuv_weighted[0]);
+ float h = dot(H, yuv_weighted[0]);
+ float i = dot(I, yuv_weighted[0]);
+ float f4= dot(F4, yuv_weighted[0]);
+ float h5= dot(H5, yuv_weighted[0]);
+
+ vec4 icomp = round(saturate(mul(dir, sym_vectors))); // choose info component
+
+ float infoE = remapFrom01(dot(texture2D(decal, v_texcoord0 ), icomp), 255.0); // retrieve 1st pass info
+ float infoF = remapFrom01(dot(texture2D(decal, v_texcoord0+g1), icomp), 255.0); // 1st pass info from neighbor r
+ float infoH = remapFrom01(dot(texture2D(decal, v_texcoord0+g2), icomp), 255.0); // 1st pass info from neighbor d
+
+ vec4 lparam;
+ float px;
+ vec2 addr;
+
+ if (infoF == 8.0)
+ {
+ lparam.xyz = lines12;
+ px = float(df(f,f4) <= df(f,i));
+ addr.x = 2.0 * px + saturate(1.0 - px);
+ addr.y = saturate(1.0-px);
+ }
+ else if (infoH == 7.0)
+ {
+ lparam.xyz = lines11;
+ px = float(df(h,h5) <= df(h,i));
+ addr.x = saturate(1.0-px);
+ addr.y = 2.0 * px + saturate(1.0 - px);
+ }
+ else if (infoF == 6.0)
+ {
+ lparam.xyz = lines10;
+ px = float(df(f,f4) <= df(f,i));
+ addr.x = 2.0 * px + saturate(1.0 - px);
+ addr.y = saturate(1.0-px);
+ }
+ else if (infoH == 5.0)
+ {
+ lparam.xyz = lines9;
+ px = float(df(h,h5) <= df(h,i));
+ addr.x = saturate(1.0 - px);
+ addr.y = 2.0 * px + saturate(1.0 - px);
+ }
+ else
+ {
+ px = float(df(e,f) <= df(e,h));
+ addr.x = px;
+ addr.y = saturate(1.0 - px);
+
+ lparam.xyz = (infoE == 8.0) ? lines8 : ((infoE == 7.0) ? lines7 : ((infoE == 6.0) ? lines6 : ((infoE == 5.0) ? lines5 : ((infoE == 4.0) ? lines4 : ((infoE == 3.0) ? lines3 : ((infoE == 2.0) ? lines2 : ((infoE == 1.0) ? lines1 : lines0)))))));
+ }
+
+ bool inv = ((dir.x * dir.y) < 0.0);
+
+ // Rotate address from relative to absolute.
+ addr = addr * dir.yx;
+ addr = (inv ? addr.yx : addr);
+
+ // Rotate straight line equation from relative to absolute.
+ lparam.xy = lparam.xy * dir.yx;
+ lparam.xy = (inv ? lparam.yx : lparam.xy);
+
+ addr.x += 2.0;
+ addr.y += 2.0;
+
+ lparam.w = addr.x * 8.0 + addr.y;
+
+ gl_FragColor = vec4(remapTo01(lparam, low, high));
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc
new file mode 100644
index 00000000000..535f70a5a7d
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc
@@ -0,0 +1,164 @@
+$input v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass3
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+SAMPLER2D(decal, 0);
+SAMPLER2D(ORIG_texture, 1);
+
+uniform vec4 u_tex_size1;
+uniform vec4 u_target_size;
+
+#define round(X) floor((X)+0.5)
+
+const vec3 bin = vec3( 4.0f, 2.0f, 1.0f);
+const vec4 low = vec4(-64.0f, -64.0f, -64.0f, -64.0f);
+const vec4 high = vec4( 64.0f, 64.0f, 64.0f, 64.0f);
+
+const mat4 sym_vectors = mat4 (1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+vec4 remapFrom01(vec4 v, vec4 low, vec4 high)
+{
+ return round(mix(low, high, v));
+}
+
+float c_df(vec3 c1, vec3 c2)
+{
+ vec3 df = abs(c1 - c2);
+ return df.r + df.g + df.b;
+}
+
+vec4 unpack_info(float i)
+{
+ vec4 info;
+ float frac_val = fract(i / 2.0f);
+ info.w = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.z = round(frac_val);
+ i = i / 2.0f - frac_val;
+
+ frac_val = fract(i / 2.0f);
+ info.y = round(frac_val);
+ info.x = i / 2.0f - frac_val;
+
+ return info;
+}
+
+float df(float A, float B)
+{
+ return abs(A-B);
+}
+
+vec3 color_mix(vec3 c, vec3 color, vec3 E)
+{
+ return (c_df(c, E) > c_df(color, E) ? c : color);
+}
+
+#define GET_PIXEL(PARAM, PIXEL) \
+ info = PARAM; \
+ \
+ frac_val = fract(info / 2.0); \
+ ay.z = round(frac_val); \
+ info = info / 2.0 - frac_val; \
+ \
+ frac_val = fract(info / 2.0); \
+ ay.y = round(frac_val); \
+ info = info / 2.0 - frac_val; \
+ \
+ frac_val = fract(info / 2.0); \
+ ay.x = round(frac_val); \
+ info = info / 2.0 - frac_val; \
+ \
+ frac_val = fract(info / 2.0); \
+ ax.z = round(frac_val); \
+ info = info / 2.0 - frac_val; \
+ \
+ frac_val = fract(info / 2.0); \
+ ax.y = round(frac_val); \
+ info = info / 2.0 - frac_val; \
+ \
+ ax.x = round(info); \
+ iq.x = dot(ax, bin) - 2.0; \
+ iq.y = dot(ay, bin) - 2.0; \
+ PIXEL = texture2D(ORIG_texture, v_texcoord0 + iq.x * v_texcoord1.xy + iq.y * v_texcoord1.zw).xyz; \
+
+
+void main()
+{
+ float scale_factor = u_target_size.x / u_tex_size1.x;
+
+ vec2 fp = fract(v_texcoord0 * u_tex_size1.xy) - vec2(0.5, 0.5); // pos = pixel position
+
+ vec4 UL = texture2D(decal, v_texcoord0 + 0.25 * v_texcoord1.xy + 0.25 * v_texcoord1.zw);
+ vec4 UR = texture2D(decal, v_texcoord0 + 0.75 * v_texcoord1.xy + 0.25 * v_texcoord1.zw);
+ vec4 DL = texture2D(decal, v_texcoord0 + 0.25 * v_texcoord1.xy + 0.75 * v_texcoord1.zw);
+ vec4 DR = texture2D(decal, v_texcoord0 + 0.75 * v_texcoord1.xy + 0.75 * v_texcoord1.zw);
+
+ vec4 ulparam = remapFrom01(UL, low, high); // retrieve 1st pass info
+ vec4 urparam = remapFrom01(UR, low, high); // retrieve 1st pass info
+ vec4 dlparam = remapFrom01(DL, low, high); // retrieve 1st pass info
+ vec4 drparam = remapFrom01(DR, low, high); // retrieve 1st pass info
+
+ vec4 E = texture2D(ORIG_texture, v_texcoord0);
+
+ float info, frac_val;
+ vec2 iq;
+ vec3 ax, ay, PX, PY, PZ, PW;
+ GET_PIXEL(ulparam.w, PX);
+ GET_PIXEL(urparam.w, PY);
+ GET_PIXEL(dlparam.w, PZ);
+ GET_PIXEL(drparam.w, PW);
+
+ vec3 fp1 = vec3(fp, -1);
+
+ vec4 inc = vec4(abs(ulparam.x / ulparam.y), abs(urparam.x / urparam.y), abs(dlparam.x / dlparam.y), abs(drparam.x / drparam.y));
+ vec4 level = max(inc, 1.0 / inc);
+
+ vec4 fx;
+ fx.x = saturate(dot(fp1, ulparam.xyz) * scale_factor / (8.0 * level.x) + 0.5);
+ fx.y = saturate(dot(fp1, urparam.xyz) * scale_factor / (8.0 * level.y) + 0.5);
+ fx.z = saturate(dot(fp1, dlparam.xyz) * scale_factor / (8.0 * level.z) + 0.5);
+ fx.w = saturate(dot(fp1, drparam.xyz) * scale_factor / (8.0 * level.w) + 0.5);
+
+ vec3 c1 = mix(E.xyz, PX, fx.x);
+ vec3 c2 = mix(E.xyz, PY, fx.y);
+ vec3 c3 = mix(E.xyz, PZ, fx.z);
+ vec3 c4 = mix(E.xyz, PW, fx.w);
+
+ vec3 color = c1;
+ color = color_mix(c2, color, E.xyz);
+ color = color_mix(c3, color, E.xyz);
+ color = color_mix(c4, color, E.xyz);
+
+ gl_FragColor = vec4(color, 1.0);
+} \ No newline at end of file
diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/varying.def.sc
index c65b5426733..92c3034f498 100644
--- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/varying.def.sc
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/varying.def.sc
@@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0);
vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0);
vec3 a_position : POSITION;
vec4 a_color0 : COLOR0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc
new file mode 100644
index 00000000000..bab183ddd30
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc
@@ -0,0 +1,52 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass1
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A3 B3 C3
+ // A1 B1 C1
+ //A2 A0 A B C C4 C6
+ //D2 D0 D E F F4 F6
+ //G2 G0 G H I I4 I6
+ // G5 H5 I5
+ // G7 H7 I7
+
+ v_texcoord1 = 1.0 / u_tex_size0.xyyy; // F H
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc
new file mode 100644
index 00000000000..71ebf7d574a
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc
@@ -0,0 +1,59 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass2
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size0;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A1 B1 C1
+ // A0 A B C C4
+ // D0 D E F F4
+ // G0 G H I I4
+ // G5 H5 I5
+
+ vec2 ps = 1.0 / u_tex_size0.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1
+ v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C
+ v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F
+ v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I
+ v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5
+ v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0
+ v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc
new file mode 100644
index 00000000000..19195ba5b27
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc
@@ -0,0 +1,55 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass3
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size1;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A3 B3 C3
+ // A1 B1 C1
+ //A2 A0 A B C C4 C6
+ //D2 D0 D E F F4 F6
+ //G2 G0 G H I I4 I6
+ // G5 H5 I5
+ // G7 H7 I7
+
+ vec2 ps = 1.0 / u_tex_size1.xy;
+ float dx = ps.x;
+ float dy = ps.y;
+ v_texcoord1 = vec4(dx, 0.0, 0.0, dy); // F H
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc
new file mode 100644
index 00000000000..bf9f297ec9d
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc
@@ -0,0 +1,53 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_texcoord1, v_color0
+
+// license:MIT
+// copyright-holders:Hyllian
+
+/*
+
+ Hyllian's xBR MultiLevel4 Shader - Pass4
+
+ Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+*/
+
+#include "common.sh"
+
+uniform vec4 u_tex_size1;
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+
+ // A3 B3 C3
+ // A1 B1 C1
+ //A2 A0 A B C C4 C6
+ //D2 D0 D E F F4 F6
+ //G2 G0 G H I I4 I6
+ // G5 H5 I5
+ // G7 H7 I7
+
+ vec2 ps = 1.0 / u_tex_size1.xy;
+ v_texcoord1 = vec4(ps.x, 0.0, 0.0, ps.y); // F H
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/sliderreader.cpp b/src/osd/modules/render/bgfx/sliderreader.cpp
index b2b2f9b7f7a..9a200984c0e 100644
--- a/src/osd/modules/render/bgfx/sliderreader.cpp
+++ b/src/osd/modules/render/bgfx/sliderreader.cpp
@@ -10,6 +10,7 @@
#include "emu.h"
#include "slider.h"
+#include "chainmanager.h"
const slider_reader::string_to_enum slider_reader::TYPE_NAMES[slider_reader::TYPE_COUNT] = {
{ "intenum", uint64_t(bgfx_slider::slider_type::SLIDER_INT_ENUM) },
@@ -33,7 +34,7 @@ const slider_reader::string_to_enum slider_reader::SCREEN_NAMES[slider_reader::S
{ "all", uint64_t(bgfx_slider::screen_type::SLIDER_SCREEN_TYPE_ANY) }
};
-std::vector<bgfx_slider*> slider_reader::read_from_value(const Value& value, std::string prefix, running_machine& machine, uint32_t window_index, uint32_t screen_index)
+std::vector<bgfx_slider*> slider_reader::read_from_value(const Value& value, std::string prefix, chain_manager& chains, uint32_t screen_index)
{
std::vector<bgfx_slider*> sliders;
@@ -82,7 +83,7 @@ std::vector<bgfx_slider*> slider_reader::read_from_value(const Value& value, std
break;
}
- std::string prefixed_desc = "Window " + std::to_string(window_index) + ", Screen " + std::to_string(screen_index) + ", " + description;
+ std::string prefixed_desc = "Window " + std::to_string(chains.window_index()) + ", Screen " + std::to_string(screen_index) + ", " + description;
if (slider_count > 1)
{
float min[3];
@@ -113,7 +114,7 @@ std::vector<bgfx_slider*> slider_reader::read_from_value(const Value& value, std
desc = prefixed_desc + "Invalid";
break;
}
- sliders.push_back(new bgfx_slider(machine, full_name, min[index], defaults[index], max[index], step, type, screen_type, format, desc, strings));
+ sliders.push_back(new bgfx_slider(chains.machine(), full_name, min[index], defaults[index], max[index], step, type, screen_type, format, desc, strings));
}
}
else
@@ -121,7 +122,7 @@ std::vector<bgfx_slider*> slider_reader::read_from_value(const Value& value, std
float min = get_float(value, "min", 0.0f);
float def = get_float(value, "default", 0.0f);
float max = get_float(value, "max", 1.0f);
- sliders.push_back(new bgfx_slider(machine, name + "0", min, def, max, step, type, screen_type, format, prefixed_desc, strings));
+ sliders.push_back(new bgfx_slider(chains.machine(), name + "0", min, def, max, step, type, screen_type, format, prefixed_desc, strings));
}
return sliders;
}
@@ -132,7 +133,7 @@ bool slider_reader::get_values(const Value& value, std::string prefix, std::stri
const Value& value_array = value[name_str];
for (UINT32 i = 0; i < value_array.Size() && i < count; i++)
{
- if (!READER_CHECK(value_array[i].IsNumber(), (prefix + "Entry " + std::to_string(i) + " must be a number point\n").c_str())) return false;
+ if (!READER_CHECK(value_array[i].IsNumber(), (prefix + "Entry " + std::to_string(i) + " must be a number\n").c_str())) return false;
values[i] = value_array[i].GetFloat();
}
return true;
@@ -144,11 +145,11 @@ bool slider_reader::validate_parameters(const Value& value, std::string prefix)
if (!READER_CHECK(value["name"].IsString(), (prefix + "Value 'name' must be a string\n").c_str())) return false;
if (!READER_CHECK(value.HasMember("min"), (prefix + "Must have a number or array value 'min'\n").c_str())) return false;
if (!READER_CHECK(value["min"].IsNumber() || value["min"].IsArray(), (prefix + "Value 'min' must be a number or an array the size of the corresponding slider type\n").c_str())) return false;
- if (!READER_CHECK(value.HasMember("default"), (prefix + "Must have a number point or array value 'default'\n").c_str())) return false;
- if (!READER_CHECK(value["default"].IsNumber() || value["default"].IsArray(), (prefix + "Value 'default' must be a number point or an array the size of the corresponding slider type\n").c_str())) return false;
- if (!READER_CHECK(value.HasMember("max"), (prefix + "Must have a number point or array value 'max'\n").c_str())) return false;
+ if (!READER_CHECK(value.HasMember("default"), (prefix + "Must have a number or array value 'default'\n").c_str())) return false;
+ if (!READER_CHECK(value["default"].IsNumber() || value["default"].IsArray(), (prefix + "Value 'default' must be a number or an array the size of the corresponding slider type\n").c_str())) return false;
+ if (!READER_CHECK(value.HasMember("max"), (prefix + "Must have a number or array value 'max'\n").c_str())) return false;
if (!READER_CHECK(value["max"].IsNumber() || value["max"].IsArray(), (prefix + "Value 'max' must be a number or an array the size of the corresponding slider type\n").c_str())) return false;
- if (!READER_CHECK(value.HasMember("step"), (prefix + "Must have a number point value 'step'\n").c_str())) return false;
+ if (!READER_CHECK(value.HasMember("step"), (prefix + "Must have a number value 'step'\n").c_str())) return false;
if (!READER_CHECK(value["step"].IsNumber(), (prefix + "Value 'step' must be a number (how much does this slider increment by internally?)\n").c_str())) return false;
if (!READER_CHECK(value.HasMember("type"), (prefix + "Must have string value 'type'\n").c_str())) return false;
if (!READER_CHECK(value["type"].IsString(), (prefix + "Value 'type' must be a string (what type of slider is this? [int_enum, int, float])\n").c_str())) return false;
diff --git a/src/osd/modules/render/bgfx/sliderreader.h b/src/osd/modules/render/bgfx/sliderreader.h
index d46d787f287..95c6872e171 100644
--- a/src/osd/modules/render/bgfx/sliderreader.h
+++ b/src/osd/modules/render/bgfx/sliderreader.h
@@ -16,12 +16,12 @@
#include "statereader.h"
class bgfx_slider;
-class running_machine;
+class chain_manager;
class slider_reader : public state_reader
{
public:
- static std::vector<bgfx_slider*> read_from_value(const Value& value, std::string prefix, running_machine& machine, uint32_t window_index, uint32_t screen_index);
+ static std::vector<bgfx_slider*> read_from_value(const Value& value, std::string prefix, chain_manager& chains, uint32_t screen_index);
private:
static bool get_values(const Value& value, std::string prefix, std::string name, float* values, const int count);
diff --git a/src/osd/modules/render/bgfx/target.cpp b/src/osd/modules/render/bgfx/target.cpp
index 4d1d3ea6b2a..e6ec9061389 100644
--- a/src/osd/modules/render/bgfx/target.cpp
+++ b/src/osd/modules/render/bgfx/target.cpp
@@ -57,6 +57,7 @@ bgfx_target::bgfx_target(void *handle, uint16_t width, uint16_t height)
, m_double_buffer(false)
, m_style(TARGET_STYLE_CUSTOM)
, m_filter(false)
+ , m_scale(0)
, m_screen(-1)
, m_current_page(0)
, m_initialized(true)
diff --git a/src/osd/modules/render/bgfx/targetreader.cpp b/src/osd/modules/render/bgfx/targetreader.cpp
index c63d05ec015..9a8d6aebb63 100644
--- a/src/osd/modules/render/bgfx/targetreader.cpp
+++ b/src/osd/modules/render/bgfx/targetreader.cpp
@@ -11,8 +11,8 @@
#include "emu.h"
#include <modules/lib/osdobj_common.h>
+#include "chainmanager.h"
#include "targetreader.h"
-#include "targetmanager.h"
#include "target.h"
const target_reader::string_to_enum target_reader::STYLE_NAMES[target_reader::STYLE_COUNT] = {
@@ -21,7 +21,7 @@ const target_reader::string_to_enum target_reader::STYLE_NAMES[target_reader::ST
{ "custom", TARGET_STYLE_CUSTOM }
};
-bgfx_target* target_reader::read_from_value(const Value& value, std::string prefix, target_manager& targets, osd_options& options, uint32_t screen_index)
+bgfx_target* target_reader::read_from_value(const Value& value, std::string prefix, chain_manager& chains, uint32_t screen_index)
{
if (!validate_parameters(value, prefix))
{
@@ -43,12 +43,12 @@ bgfx_target* target_reader::read_from_value(const Value& value, std::string pref
switch (mode)
{
case TARGET_STYLE_GUEST:
- width = targets.width(TARGET_STYLE_GUEST, screen_index);
- height = targets.height(TARGET_STYLE_GUEST, screen_index);
+ width = chains.targets().width(TARGET_STYLE_GUEST, screen_index);
+ height = chains.targets().height(TARGET_STYLE_GUEST, screen_index);
break;
case TARGET_STYLE_NATIVE:
- width = targets.width(TARGET_STYLE_NATIVE, screen_index);
- height = targets.height(TARGET_STYLE_NATIVE, screen_index);
+ width = chains.targets().width(TARGET_STYLE_NATIVE, screen_index);
+ height = chains.targets().height(TARGET_STYLE_NATIVE, screen_index);
break;
case TARGET_STYLE_CUSTOM:
if (!READER_CHECK(value.HasMember("width"), (prefix + "Target '" + target_name + "': Must have numeric value 'width'\n").c_str())) return nullptr;
@@ -60,7 +60,7 @@ bgfx_target* target_reader::read_from_value(const Value& value, std::string pref
break;
}
- return targets.create_target(target_name, bgfx::TextureFormat::RGBA8, width, height, mode, double_buffer, bilinear, scale, screen_index);
+ return chains.targets().create_target(target_name, bgfx::TextureFormat::RGBA8, width, height, mode, double_buffer, bilinear, scale, screen_index);
}
bool target_reader::validate_parameters(const Value& value, std::string prefix)
diff --git a/src/osd/modules/render/bgfx/targetreader.h b/src/osd/modules/render/bgfx/targetreader.h
index abbc4f9a805..7edf5e456fa 100644
--- a/src/osd/modules/render/bgfx/targetreader.h
+++ b/src/osd/modules/render/bgfx/targetreader.h
@@ -16,13 +16,12 @@
#include "statereader.h"
class bgfx_target;
-class target_manager;
-class osd_options;
+class chain_manager;
class target_reader : public state_reader
{
public:
- static bgfx_target* read_from_value(const Value& value, std::string prefix, target_manager& targets, osd_options& options, uint32_t screen_index);
+ static bgfx_target* read_from_value(const Value& value, std::string prefix, chain_manager& chains, uint32_t screen_index);
private:
static bool validate_parameters(const Value& value, std::string prefix);
diff --git a/src/osd/modules/render/blit13.h b/src/osd/modules/render/blit13.h
index f199fc0f2ea..22a7a1fcea5 100644
--- a/src/osd/modules/render/blit13.h
+++ b/src/osd/modules/render/blit13.h
@@ -146,7 +146,7 @@ struct blit_texcopy : public blit_base
x = texsource->width / (_len_div);
while (x > 0) {
*dst++ = m_op.op(*src, palbase);
- src++;
+ ++src;
x--;
}
}
diff --git a/src/osd/modules/render/d3d/d3dcomm.h b/src/osd/modules/render/d3d/d3dcomm.h
index c4ae5b4ff1d..2fd7477ac43 100644
--- a/src/osd/modules/render/d3d/d3dcomm.h
+++ b/src/osd/modules/render/d3d/d3dcomm.h
@@ -40,12 +40,12 @@ public:
c.y = y;
}
- vec2f operator+(const vec2f& a)
+ vec2f operator+(const vec2f& a) const
{
return vec2f(c.x + a.c.x, c.y + a.c.y);
}
- vec2f operator-(const vec2f& a)
+ vec2f operator-(const vec2f& a) const
{
return vec2f(c.x - a.c.x, c.y - a.c.y);
}
@@ -59,7 +59,9 @@ public:
class d3d_texture_manager
{
public:
- d3d_texture_manager() { }
+ d3d_texture_manager(): m_renderer(nullptr), m_texlist(nullptr), m_dynamic_supported(0), m_stretch_supported(0), m_yuv_format(), m_texture_caps(0), m_texture_max_aspect(0), m_texture_max_width(0), m_texture_max_height(0), m_vector_texture(nullptr), m_default_texture(nullptr)
+ { }
+
d3d_texture_manager(renderer_d3d9 *d3d);
~d3d_texture_manager();
@@ -71,22 +73,22 @@ public:
texture_info * find_texinfo(const render_texinfo *texture, UINT32 flags);
UINT32 texture_compute_hash(const render_texinfo *texture, UINT32 flags);
- texture_info * get_texlist() { return m_texlist; }
+ texture_info * get_texlist() const { return m_texlist; }
void set_texlist(texture_info *texlist) { m_texlist = texlist; }
- bool is_dynamic_supported() { return (bool)m_dynamic_supported; }
+ bool is_dynamic_supported() const { return (bool)m_dynamic_supported; }
void set_dynamic_supported(bool dynamic_supported) { m_dynamic_supported = dynamic_supported; }
- bool is_stretch_supported() { return (bool)m_stretch_supported; }
- D3DFORMAT get_yuv_format() { return m_yuv_format; }
+ bool is_stretch_supported() const { return (bool)m_stretch_supported; }
+ D3DFORMAT get_yuv_format() const { return m_yuv_format; }
- DWORD get_texture_caps() { return m_texture_caps; }
- DWORD get_max_texture_aspect() { return m_texture_max_aspect; }
- DWORD get_max_texture_width() { return m_texture_max_width; }
- DWORD get_max_texture_height() { return m_texture_max_height; }
+ DWORD get_texture_caps() const { return m_texture_caps; }
+ DWORD get_max_texture_aspect() const { return m_texture_max_aspect; }
+ DWORD get_max_texture_width() const { return m_texture_max_width; }
+ DWORD get_max_texture_height() const { return m_texture_max_height; }
- texture_info * get_default_texture() { return m_default_texture; }
- texture_info * get_vector_texture() { return m_vector_texture; }
+ texture_info * get_default_texture() const { return m_default_texture; }
+ texture_info * get_vector_texture() const { return m_vector_texture; }
- renderer_d3d9 * get_d3d() { return m_renderer; }
+ renderer_d3d9 * get_d3d() const { return m_renderer; }
private:
renderer_d3d9 * m_renderer;
@@ -248,7 +250,9 @@ class cache_target
{
public:
// construction/destruction
- cache_target() { }
+ cache_target(): last_target(nullptr), last_texture(nullptr), target_width(0), target_height(0), width(0), height(0), screen_index(0), next(nullptr), prev(nullptr)
+ { }
+
~cache_target();
bool init(renderer_d3d9 *d3d, d3d_base *d3dintf, int source_width, int source_height, int target_width, int target_height);
@@ -273,7 +277,9 @@ class d3d_render_target
{
public:
// construction/destruction
- d3d_render_target() { }
+ d3d_render_target(): target_width(0), target_height(0), width(0), height(0), screen_index(0), page_index(0), next(nullptr), prev(nullptr), bloom_count(0)
+ { }
+
~d3d_render_target();
bool init(renderer_d3d9 *d3d, d3d_base *d3dintf, int source_width, int source_height, int target_width, int target_height);
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 859914d741c..190c324d764 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -276,7 +276,7 @@ void shaders::render_snapshot(surface *surface)
// add two text entries describing the image
std::string text1 = std::string(emulator_info::get_appname()).append(" ").append(emulator_info::get_build_version());
std::string text2 = std::string(machine->system().manufacturer).append(" ").append(machine->system().description);
- png_info pnginfo = { 0 };
+ png_info pnginfo = { nullptr };
png_add_text(&pnginfo, "Software", text1.c_str());
png_add_text(&pnginfo, "System", text2.c_str());
diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h
index 8851531678e..c7813122308 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.h
+++ b/src/osd/modules/render/d3d/d3dhlsl.h
@@ -326,7 +326,7 @@ public:
void window_save();
void window_record();
- bool recording() { return avi_output_file != nullptr; }
+ bool recording() const { return avi_output_file != nullptr; }
void avi_update_snap(surface *surface);
void render_snapshot(surface *surface);
diff --git a/src/osd/modules/render/drawd3d.h b/src/osd/modules/render/drawd3d.h
index 0777da977b0..3b1083881b3 100644
--- a/src/osd/modules/render/drawd3d.h
+++ b/src/osd/modules/render/drawd3d.h
@@ -91,36 +91,36 @@ public:
void reset_render_states();
// Setters / getters
- int get_adapter() { return m_adapter; }
- int get_width() { return m_width; }
- vec2f get_dims() { return vec2f(m_width, m_height); }
- int get_height() { return m_height; }
- int get_refresh() { return m_refresh; }
+ int get_adapter() const { return m_adapter; }
+ int get_width() const { return m_width; }
+ vec2f get_dims() const { return vec2f(m_width, m_height); }
+ int get_height() const { return m_height; }
+ int get_refresh() const { return m_refresh; }
- device * get_device() { return m_device; }
+ device * get_device() const { return m_device; }
present_parameters * get_presentation() { return &m_presentation; }
- vertex_buffer * get_vertex_buffer() { return m_vertexbuf; }
- vertex * get_locked_buffer() { return m_lockedbuf; }
- VOID ** get_locked_buffer_ptr() { return (VOID **)&m_lockedbuf; }
+ vertex_buffer * get_vertex_buffer() const { return m_vertexbuf; }
+ vertex * get_locked_buffer() const { return m_lockedbuf; }
+ VOID ** get_locked_buffer_ptr()const { return (VOID **)&m_lockedbuf; }
void set_locked_buffer(vertex *lockedbuf) { m_lockedbuf = lockedbuf; }
void set_restarting(bool restarting) { m_restarting = restarting; }
- bool is_mod2x_supported() { return (bool)m_mod2x_supported; }
- bool is_mod4x_supported() { return (bool)m_mod4x_supported; }
+ bool is_mod2x_supported() const { return (bool)m_mod2x_supported; }
+ bool is_mod4x_supported() const { return (bool)m_mod4x_supported; }
- D3DFORMAT get_screen_format() { return m_screen_format; }
- D3DFORMAT get_pixel_format() { return m_pixformat; }
- D3DDISPLAYMODE get_origmode() { return m_origmode; }
+ D3DFORMAT get_screen_format() const { return m_screen_format; }
+ D3DFORMAT get_pixel_format() const { return m_pixformat; }
+ D3DDISPLAYMODE get_origmode() const { return m_origmode; }
- UINT32 get_last_texture_flags() { return m_last_texture_flags; }
+ UINT32 get_last_texture_flags() const { return m_last_texture_flags; }
- d3d_texture_manager * get_texture_manager() { return m_texture_manager; }
+ d3d_texture_manager * get_texture_manager() const { return m_texture_manager; }
texture_info * get_default_texture();
texture_info * get_vector_texture();
- shaders * get_shaders() { return m_shaders; }
- hlsl_options * get_shaders_options() { return m_shaders_options; }
+ shaders * get_shaders() const { return m_shaders; }
+ hlsl_options * get_shaders_options() const { return m_shaders_options; }
private:
int m_adapter; // ordinal adapter number
diff --git a/src/osd/modules/render/drawogl.h b/src/osd/modules/render/drawogl.h
index 6b959f1da35..c96c3a45b1b 100644
--- a/src/osd/modules/render/drawogl.h
+++ b/src/osd/modules/render/drawogl.h
@@ -42,7 +42,7 @@ public:
: hash(0), flags(0), rawwidth(0), rawheight(0),
rawwidth_create(0), rawheight_create(0),
type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0),
- texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL),
+ texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(nullptr),
data_own(0), texCoordBufferName(0)
{
for (int i=0; i<2; i++)
@@ -101,7 +101,7 @@ public:
, m_width(0)
, m_height(0)
, m_blit_dim(0, 0)
- , m_gl_context(NULL)
+ , m_gl_context(nullptr)
, m_initialized(0)
, m_last_blendmode(0)
, m_texture_max_width(0)
@@ -122,7 +122,7 @@ public:
, m_surf_h(0)
{
for (int i=0; i < HASH_SIZE + OVERFLOW_SIZE; i++)
- m_texhash[i] = NULL;
+ m_texhash[i] = nullptr;
for (int i=0; i < 2*GLSL_SHADER_MAX; i++)
m_glsl_program[i] = 0;
for (int i=0; i < 8; i++)
diff --git a/src/osd/modules/render/drawsdl.cpp b/src/osd/modules/render/drawsdl.cpp
index 38d18f42aa8..622c360df7e 100644
--- a/src/osd/modules/render/drawsdl.cpp
+++ b/src/osd/modules/render/drawsdl.cpp
@@ -59,9 +59,9 @@ static void yuv_RGB_to_YUY2X2(const UINT16 *bitmap, UINT8 *ptr, const int pitch,
static const sdl_scale_mode scale_modes[] =
{
- { "none", 0, 0, 1, 1, DRAW2_SCALEMODE_NEAREST, 0, 0 },
- { "hwblit", 1, 0, 1, 1, DRAW2_SCALEMODE_LINEAR, 0, 0 },
- { "hwbest", 1, 0, 1, 1, DRAW2_SCALEMODE_BEST, 0, 0 },
+ { "none", 0, 0, 1, 1, DRAW2_SCALEMODE_NEAREST, 0, nullptr },
+ { "hwblit", 1, 0, 1, 1, DRAW2_SCALEMODE_LINEAR, 0, nullptr },
+ { "hwbest", 1, 0, 1, 1, DRAW2_SCALEMODE_BEST, 0, nullptr },
/* SDL1.2 uses interpolation as well */
{ "yv12", 1, 1, 1, 1, DRAW2_SCALEMODE_BEST, SDL_PIXELFORMAT_YV12, yuv_RGB_to_YV12 },
{ "yv12x2", 1, 1, 2, 2, DRAW2_SCALEMODE_BEST, SDL_PIXELFORMAT_YV12, yuv_RGB_to_YV12X2 },
diff --git a/src/osd/modules/render/sdlglcontext.h b/src/osd/modules/render/sdlglcontext.h
index 9a3194582ac..e20c351908a 100644
--- a/src/osd/modules/render/sdlglcontext.h
+++ b/src/osd/modules/render/sdlglcontext.h
@@ -45,7 +45,7 @@ public:
virtual const char *LastErrorMsg() override
{
if (m_error[0] == 0)
- return NULL;
+ return nullptr;
else
return m_error;
}
diff --git a/src/osd/modules/render/winglcontext.h b/src/osd/modules/render/winglcontext.h
index de8e6537707..843532fe33f 100644
--- a/src/osd/modules/render/winglcontext.h
+++ b/src/osd/modules/render/winglcontext.h
@@ -18,7 +18,7 @@
class win_gl_context : public osd_gl_context
{
public:
- win_gl_context(HWND window) : osd_gl_context(), m_context(0), m_window(NULL), m_hdc(0)
+ win_gl_context(HWND window) : osd_gl_context(), m_context(0), m_window(nullptr), m_hdc(0)
{
m_error[0] = 0;
@@ -36,8 +36,8 @@ public:
}
else
{
- pfn_wglSwapIntervalEXT = NULL;
- pfn_wglGetSwapIntervalEXT = NULL;
+ pfn_wglSwapIntervalEXT = nullptr;
+ pfn_wglGetSwapIntervalEXT = nullptr;
}
m_hdc = GetDC(window);
@@ -46,7 +46,7 @@ public:
m_context = this->pfn_wglCreateContext(m_hdc);
if (!m_context)
{
- FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, m_error, 255, NULL);
+ FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, GetLastError(), 0, m_error, 255, nullptr);
return;
}
this->pfn_wglMakeCurrent(m_hdc, m_context);
@@ -67,7 +67,7 @@ public:
virtual const char *LastErrorMsg() override
{
if (m_error[0] == 0)
- return NULL;
+ return nullptr;
else
return m_error;
}
@@ -75,14 +75,14 @@ public:
virtual void *getProcAddress(const char *proc) override
{
void *ret = (void *) GetProcAddress(m_module, proc);
- if (ret == NULL)
+ if (ret == nullptr)
ret = (void *) this->pfn_wglGetProcAddress(proc);
return ret;
}
virtual int SetSwapInterval(const int swap) override
{
- if (this->pfn_wglSwapIntervalEXT != NULL)
+ if (this->pfn_wglSwapIntervalEXT != nullptr)
{
this->pfn_wglSwapIntervalEXT(swap ? 1 : 0);
}
@@ -141,10 +141,10 @@ private:
bool WGLExtensionSupported(const char *extension_name)
{
- //if (pfn_wglGetExtensionsStringEXT != NULL)
+ //if (pfn_wglGetExtensionsStringEXT != nullptr)
// printf("%s\n", this->pfn_wglGetExtensionsStringEXT());
- if (pfn_wglGetExtensionsStringEXT != NULL && strstr(pfn_wglGetExtensionsStringEXT(), extension_name) != NULL)
+ if (pfn_wglGetExtensionsStringEXT != nullptr && strstr(pfn_wglGetExtensionsStringEXT(), extension_name) != nullptr)
return true;
else
return false;
diff --git a/src/osd/modules/sound/coreaudio_sound.cpp b/src/osd/modules/sound/coreaudio_sound.cpp
index ff6303b0df8..88ce712a396 100644
--- a/src/osd/modules/sound/coreaudio_sound.cpp
+++ b/src/osd/modules/sound/coreaudio_sound.cpp
@@ -39,12 +39,12 @@ public:
sound_coreaudio() :
osd_module(OSD_SOUND_PROVIDER, "coreaudio"),
sound_module(),
- m_graph(NULL),
+ m_graph(nullptr),
m_node_count(0),
m_sample_bytes(0),
m_headroom(0),
m_buffer_size(0),
- m_buffer(NULL),
+ m_buffer(nullptr),
m_playpos(0),
m_writepos(0),
m_in_underrun(false),
@@ -68,7 +68,7 @@ public:
private:
struct node_detail
{
- node_detail() : m_node(0), m_unit(NULL) { }
+ node_detail() : m_node(0), m_unit(nullptr) { }
AUNode m_node;
AudioUnit m_unit;
@@ -110,7 +110,7 @@ private:
return AUGraphNodeInfo(
m_graph,
m_node_details[m_node_count].m_node,
- NULL,
+ nullptr,
&m_node_details[m_node_count].m_unit);
}
@@ -150,7 +150,7 @@ private:
if (!CFStringGetCString(str, result, len + 1, kCFStringEncodingUTF8))
{
global_free_array(result);
- return NULL;
+ return nullptr;
}
return result;
}
@@ -261,11 +261,11 @@ int sound_coreaudio::init(const osd_options &options)
free_buffer_and_return_error:
global_free_array(m_buffer);
m_buffer_size = 0;
- m_buffer = NULL;
+ m_buffer = nullptr;
close_graph_and_return_error:
AUGraphClose(m_graph);
DisposeAUGraph(m_graph);
- m_graph = NULL;
+ m_graph = nullptr;
m_node_count = 0;
return -1;
}
@@ -280,13 +280,13 @@ void sound_coreaudio::exit()
AUGraphStop(m_graph);
AUGraphUninitialize(m_graph);
DisposeAUGraph(m_graph);
- m_graph = NULL;
+ m_graph = nullptr;
m_node_count = 0;
}
if (m_buffer)
{
global_free_array(m_buffer);
- m_buffer = NULL;
+ m_buffer = nullptr;
}
if (m_overflows || m_underflows)
osd_printf_verbose("Sound buffer: overflows=%u underflows=%u\n", m_overflows, m_underflows);
@@ -373,7 +373,7 @@ bool sound_coreaudio::create_graph(osd_options const &options)
goto close_graph_and_return_error;
}
- err = AUGraphUpdate(m_graph, NULL);
+ err = AUGraphUpdate(m_graph, nullptr);
if (noErr != err)
{
osd_printf_error(
@@ -389,7 +389,7 @@ close_graph_and_return_error:
dispose_graph_and_return_error:
DisposeAUGraph(m_graph);
return_error:
- m_graph = NULL;
+ m_graph = nullptr;
m_node_count = 0;
return false;
}
@@ -537,7 +537,7 @@ bool sound_coreaudio::add_effect(char const *name)
return true;
CFPropertyListRef const properties = load_property_list(name);
- if (NULL == properties)
+ if (nullptr == properties)
return true;
OSType type, subtype, manufacturer;
@@ -589,7 +589,7 @@ bool sound_coreaudio::add_effect(char const *name)
kAUParameterListener_AnyParameter,
0,
0 };
- err = AUParameterListenerNotify(NULL, NULL, &change);
+ err = AUParameterListenerNotify(nullptr, nullptr, &change);
}
if (noErr != err)
{
@@ -640,7 +640,7 @@ bool sound_coreaudio::get_output_device_id(
kAudioObjectSystemObject,
&devices_addr,
0,
- NULL,
+ nullptr,
&property_size);
if (noErr != err)
{
@@ -654,7 +654,7 @@ bool sound_coreaudio::get_output_device_id(
kAudioObjectSystemObject,
&devices_addr,
0,
- NULL,
+ nullptr,
&property_size,
devices);
UInt32 const device_count = property_size / sizeof(AudioDeviceID);
@@ -669,7 +669,7 @@ bool sound_coreaudio::get_output_device_id(
{
char *const device_uid = get_device_uid(devices[i]);
char *const device_name = get_device_name(devices[i]);
- if ((NULL == device_uid) && (NULL == device_name))
+ if ((nullptr == device_uid) && (nullptr == device_name))
{
osd_printf_warning(
"Could not get UID or name for device %lu - skipping\n",
@@ -685,10 +685,10 @@ bool sound_coreaudio::get_output_device_id(
{
osd_printf_verbose(
"No output streams found for device %s (%s) - skipping\n",
- (NULL != device_name) ? device_name : "<anonymous>",
- (NULL != device_uid) ? device_uid : "<unknown>");
- if (NULL != device_uid) global_free_array(device_uid);
- if (NULL != device_name) global_free_array(device_name);
+ (nullptr != device_name) ? device_name : "<anonymous>",
+ (nullptr != device_uid) ? device_uid : "<unknown>");
+ if (nullptr != device_uid) global_free_array(device_uid);
+ if (nullptr != device_name) global_free_array(device_name);
continue;
}
@@ -697,14 +697,14 @@ bool sound_coreaudio::get_output_device_id(
for (std::size_t j = strlen(device_name); (0 < j) && (' ' == device_name[j - 1]); j--)
device_name[j - 1] = '\0';
- bool const matched_uid = (NULL != device_uid) && !strcmp(name, device_uid);
- bool const matched_name = (NULL != device_name) && !strcmp(name, device_name);
+ bool const matched_uid = (nullptr != device_uid) && !strcmp(name, device_uid);
+ bool const matched_name = (nullptr != device_name) && !strcmp(name, device_name);
if (matched_uid || matched_name)
{
osd_printf_verbose(
"Matched device %s (%s) with %lu output stream(s)\n",
- (NULL != device_name) ? device_name : "<anonymous>",
- (NULL != device_uid) ? device_uid : "<unknown>",
+ (nullptr != device_name) ? device_name : "<anonymous>",
+ (nullptr != device_uid) ? device_uid : "<unknown>",
(unsigned long)streams);
}
global_free_array(device_uid);
@@ -730,26 +730,26 @@ char *sound_coreaudio::get_device_uid(AudioDeviceID id) const
kAudioDevicePropertyDeviceUID,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster };
- CFStringRef device_uid = NULL;
+ CFStringRef device_uid = nullptr;
UInt32 property_size = sizeof(device_uid);
OSStatus const err = AudioObjectGetPropertyData(
id,
&uid_addr,
0,
- NULL,
+ nullptr,
&property_size,
&device_uid);
- if ((noErr != err) || (NULL == device_uid))
+ if ((noErr != err) || (nullptr == device_uid))
{
osd_printf_warning(
"Error getting UID for audio device %lu (%ld)\n",
(unsigned long)id,
(long)err);
- return NULL;
+ return nullptr;
}
char *const result = convert_cfstring_to_utf8(device_uid);
CFRelease(device_uid);
- if (NULL == result)
+ if (nullptr == result)
{
osd_printf_warning(
"Error converting UID for audio device %lu to UTF-8\n",
@@ -765,26 +765,26 @@ char *sound_coreaudio::get_device_name(AudioDeviceID id) const
kAudioDevicePropertyDeviceNameCFString,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster };
- CFStringRef device_name = NULL;
+ CFStringRef device_name = nullptr;
UInt32 property_size = sizeof(device_name);
OSStatus const err = AudioObjectGetPropertyData(
id,
&name_addr,
0,
- NULL,
+ nullptr,
&property_size,
&device_name);
- if ((noErr != err) || (NULL == device_name))
+ if ((noErr != err) || (nullptr == device_name))
{
osd_printf_warning(
"Error getting name for audio device %lu (%ld)\n",
(unsigned long)id,
(long)err);
- return NULL;
+ return nullptr;
}
char *const result = convert_cfstring_to_utf8(device_name);
CFRelease(device_name);
- if (NULL == result)
+ if (nullptr == result)
{
osd_printf_warning(
"Error converting name for audio device %lu to UTF-8\n",
@@ -808,14 +808,14 @@ UInt32 sound_coreaudio::get_output_stream_count(
id,
&streams_addr,
0,
- NULL,
+ nullptr,
&property_size);
if (noErr != err)
{
osd_printf_warning(
"Error getting output stream count for audio device %s (%s) (%ld)\n",
- (NULL != name) ? name : "<anonymous>",
- (NULL != uid) ? uid : "<unknown>",
+ (nullptr != name) ? name : "<anonymous>",
+ (nullptr != uid) ? uid : "<unknown>",
(long)err);
return 0;
}
@@ -840,9 +840,9 @@ bool sound_coreaudio::extract_effect_info(
}
CFDictionaryRef const desc = (CFDictionaryRef)properties;
- CFTypeRef type_val = NULL;
- CFTypeRef subtype_val = NULL;
- CFTypeRef manufacturer_val = NULL;
+ CFTypeRef type_val = nullptr;
+ CFTypeRef subtype_val = nullptr;
+ CFTypeRef manufacturer_val = nullptr;
if (CFDictionaryContainsKey(desc, CFSTR("ComponentType"))
&& CFDictionaryContainsKey(desc, CFSTR("ComponentSubType"))
&& CFDictionaryContainsKey(desc, CFSTR("ComponentManufacturer"))
@@ -871,10 +871,10 @@ bool sound_coreaudio::extract_effect_info(
}
SInt64 type_int, subtype_int, manufacturer_int;
- if ((NULL == type_val)
- || (NULL == subtype_val)
- || (NULL == manufacturer_val)
- || (NULL == class_info)
+ if ((nullptr == type_val)
+ || (nullptr == subtype_val)
+ || (nullptr == manufacturer_val)
+ || (nullptr == class_info)
|| (CFNumberGetTypeID() != CFGetTypeID(type_val))
|| (CFNumberGetTypeID() != CFGetTypeID(subtype_val))
|| (CFNumberGetTypeID() != CFGetTypeID(manufacturer_val))
@@ -909,23 +909,23 @@ bool sound_coreaudio::extract_effect_info(
CFPropertyListRef sound_coreaudio::load_property_list(char const *name) const
{
CFURLRef const url = CFURLCreateFromFileSystemRepresentation(
- NULL,
+ nullptr,
(UInt8 const *)name,
strlen(name),
false);
- if (NULL == url)
+ if (nullptr == url)
{
- return NULL;
+ return nullptr;
}
- CFDataRef data = NULL;
+ CFDataRef data = nullptr;
SInt32 err;
Boolean const status = CFURLCreateDataAndPropertiesFromResource(
- NULL,
+ nullptr,
url,
&data,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
&err);
CFRelease(url);
if (!status)
@@ -934,24 +934,24 @@ CFPropertyListRef sound_coreaudio::load_property_list(char const *name) const
"Error reading data from %s (%ld)\n",
name,
(long)err);
- if (NULL != data) CFRelease(data);
- return NULL;
+ if (nullptr != data) CFRelease(data);
+ return nullptr;
}
- CFStringRef msg = NULL;
+ CFStringRef msg = nullptr;
CFPropertyListRef const result = CFPropertyListCreateFromXMLData(
- NULL,
+ nullptr,
data,
kCFPropertyListImmutable,
&msg);
CFRelease(data);
- if ((NULL == result) || (NULL != msg))
+ if ((nullptr == result) || (nullptr != msg))
{
- char *buf = (NULL != msg) ? convert_cfstring_to_utf8(msg) : NULL;
- if (NULL != msg)
+ char *buf = (nullptr != msg) ? convert_cfstring_to_utf8(msg) : nullptr;
+ if (nullptr != msg)
CFRelease(msg);
- if (NULL != buf)
+ if (nullptr != buf)
{
osd_printf_error(
"Error creating property list from %s: %s\n",
@@ -965,8 +965,8 @@ CFPropertyListRef sound_coreaudio::load_property_list(char const *name) const
"Error creating property list from %s\n",
name);
}
- if (NULL != result) CFRelease(result);
- return NULL;
+ if (nullptr != result) CFRelease(result);
+ return nullptr;
}
return result;
diff --git a/src/osd/modules/sound/direct_sound.cpp b/src/osd/modules/sound/direct_sound.cpp
index 5b20cfb61fa..25a82146d6b 100644
--- a/src/osd/modules/sound/direct_sound.cpp
+++ b/src/osd/modules/sound/direct_sound.cpp
@@ -51,7 +51,7 @@ public:
sound_direct_sound() :
osd_module(OSD_SOUND_PROVIDER, "dsound"),
sound_module(),
- m_dsound(NULL),
+ m_dsound(nullptr),
m_bytes_per_sample(0),
m_primary_buffer(),
m_stream_buffer(),
@@ -73,13 +73,13 @@ private:
class buffer
{
public:
- buffer() : m_buffer(NULL) { }
+ buffer() : m_buffer(nullptr) { }
~buffer() { release(); }
ULONG release()
{
ULONG const result = m_buffer ? m_buffer->Release() : 0;
- m_buffer = NULL;
+ m_buffer = nullptr;
return result;
}
@@ -99,16 +99,16 @@ private:
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_GETCURRENTPOSITION2;
- desc.lpwfxFormat = NULL;
- return dsound->CreateSoundBuffer(&desc, &m_buffer, NULL);
+ desc.lpwfxFormat = nullptr;
+ return dsound->CreateSoundBuffer(&desc, &m_buffer, nullptr);
}
- HRESULT get_format(WAVEFORMATEX &format)
+ HRESULT get_format(WAVEFORMATEX &format) const
{
assert(m_buffer);
- return m_buffer->GetFormat(&format, sizeof(format), NULL);
+ return m_buffer->GetFormat(&format, sizeof(format), nullptr);
}
- HRESULT set_format(WAVEFORMATEX const &format)
+ HRESULT set_format(WAVEFORMATEX const &format) const
{
assert(m_buffer);
return m_buffer->SetFormat(&format);
@@ -118,7 +118,7 @@ private:
class stream_buffer : public buffer
{
public:
- stream_buffer() : m_size(0), m_bytes1(NULL), m_bytes2(NULL), m_locked1(0), m_locked2(0) { }
+ stream_buffer() : m_size(0), m_bytes1(nullptr), m_bytes2(nullptr), m_locked1(0), m_locked2(0) { }
HRESULT create(LPDIRECTSOUND dsound, DWORD size, WAVEFORMATEX &format)
{
@@ -130,27 +130,27 @@ private:
desc.dwBufferBytes = size;
desc.lpwfxFormat = &format;
m_size = size;
- return dsound->CreateSoundBuffer(&desc, &m_buffer, NULL);
+ return dsound->CreateSoundBuffer(&desc, &m_buffer, nullptr);
}
- HRESULT play_looping()
+ HRESULT play_looping() const
{
assert(m_buffer);
return m_buffer->Play(0, 0, DSBPLAY_LOOPING);
}
- HRESULT stop()
+ HRESULT stop() const
{
assert(m_buffer);
return m_buffer->Stop();
}
- HRESULT set_volume(LONG volume)
+ HRESULT set_volume(LONG volume) const
{
assert(m_buffer);
return m_buffer->SetVolume(volume);
}
HRESULT set_min_volume() { return set_volume(DSBVOLUME_MIN); }
- HRESULT get_current_positions(DWORD &play_pos, DWORD &write_pos)
+ HRESULT get_current_positions(DWORD &play_pos, DWORD &write_pos) const
{
assert(m_buffer);
return m_buffer->GetCurrentPosition(&play_pos, &write_pos);
@@ -216,7 +216,7 @@ private:
m_locked1,
m_bytes2,
m_locked2);
- m_bytes1 = m_bytes2 = NULL;
+ m_bytes1 = m_bytes2 = nullptr;
m_locked1 = m_locked2 = 0;
return result;
}
@@ -382,7 +382,7 @@ HRESULT sound_direct_sound::dsound_init()
HRESULT result;
// create the DirectSound object
- result = DirectSoundCreate(NULL, &m_dsound, NULL);
+ result = DirectSoundCreate(nullptr, &m_dsound, nullptr);
if (result != DS_OK)
{
osd_printf_error("Error creating DirectSound: %08x\n", (unsigned)result);
@@ -467,7 +467,7 @@ void sound_direct_sound::dsound_kill()
// release the object
if (m_dsound)
m_dsound->Release();
- m_dsound = NULL;
+ m_dsound = nullptr;
}
diff --git a/src/osd/modules/sound/sdl_sound.cpp b/src/osd/modules/sound/sdl_sound.cpp
index c1e3e3dff2b..31c2d651f1d 100644
--- a/src/osd/modules/sound/sdl_sound.cpp
+++ b/src/osd/modules/sound/sdl_sound.cpp
@@ -51,8 +51,8 @@ public:
: osd_module(OSD_SOUND_PROVIDER, "sdl"), sound_module(),
stream_in_initialized(0),
stream_loop(0),
- attenuation(0)
- {
+ attenuation(0), buf_locked(0), stream_buffer(nullptr), stream_playpos(0), stream_buffer_size(0), stream_buffer_in(0), buffer_underflows(0), buffer_overflows(0)
+{
sdl_xfer_samples = SDL_XFER_SAMPLES;
}
virtual ~sound_sdl() { }
@@ -200,7 +200,7 @@ void sound_sdl::att_memcpy(void *dest, const INT16 *data, int bytes_to_copy)
void sound_sdl::copy_sample_data(bool is_throttled, const INT16 *data, int bytes_to_copy)
{
- void *buffer1, *buffer2 = (void *)NULL;
+ void *buffer1, *buffer2 = (void *)nullptr;
long length1, length2;
int cur_bytes;
@@ -529,7 +529,7 @@ void sound_sdl::sdl_destroy_buffers(void)
// release the buffer
if (stream_buffer)
global_free_array(stream_buffer);
- stream_buffer = NULL;
+ stream_buffer = nullptr;
}
diff --git a/src/osd/modules/sound/sound_module.h b/src/osd/modules/sound/sound_module.h
index b467cea8177..c68a943bcce 100644
--- a/src/osd/modules/sound/sound_module.h
+++ b/src/osd/modules/sound/sound_module.h
@@ -27,7 +27,7 @@ public:
virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame) = 0;
virtual void set_mastervolume(int attenuation) = 0;
- int sample_rate() { return m_sample_rate; }
+ int sample_rate() const { return m_sample_rate; }
int m_sample_rate;
int m_audio_latency;
diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h
index 623c3ee3f11..c712b3fea8e 100644
--- a/src/osd/osdcore.h
+++ b/src/osd/osdcore.h
@@ -330,7 +330,7 @@ struct osd_directory_entry
upon success, this function should return an osd_directory pointer
which contains opaque data necessary to traverse the directory; on
- failure, this function should return NULL
+ failure, this function should return nullptr
-----------------------------------------------------------------------------*/
osd_directory *osd_opendir(const char *dirname);
@@ -346,7 +346,7 @@ osd_directory *osd_opendir(const char *dirname);
Return value:
a constant pointer to an osd_directory_entry representing the current item
- in the directory, or NULL, indicating that no more entries are
+ in the directory, or nullptr, indicating that no more entries are
present
-----------------------------------------------------------------------------*/
const osd_directory_entry *osd_readdir(osd_directory *dir);
@@ -901,7 +901,7 @@ public:
static void pop(osd_output *delegate);
protected:
- void chain_output(osd_output_channel channel, const char *msg, va_list args)
+ void chain_output(osd_output_channel channel, const char *msg, va_list args) const
{
if (m_chain != nullptr)
m_chain->output_callback(channel, msg, args);
diff --git a/src/osd/osdsync.cpp b/src/osd/osdsync.cpp
index 84c8bac6ccb..20d5151c8a6 100644
--- a/src/osd/osdsync.cpp
+++ b/src/osd/osdsync.cpp
@@ -269,7 +269,7 @@ osd_work_queue *osd_work_queue_alloc(int flags)
else
threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? (numprocs - 1) : 1;
- if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
+ if (osdworkqueuemaxthreads != nullptr && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
threadnum = osdthreadnum;
// clamp to the maximum
@@ -315,7 +315,7 @@ osd_work_queue *osd_work_queue_alloc(int flags)
error:
osd_work_queue_free(queue);
- return NULL;
+ return nullptr;
}
@@ -406,7 +406,7 @@ void osd_work_queue_free(osd_work_queue *queue)
work_thread_info *thread = queue->thread[threadnum];
// block on the thread going away, then close the handle
- if (thread->handle != NULL)
+ if (thread->handle != nullptr)
{
thread->handle->join();
delete thread->handle;
@@ -439,7 +439,7 @@ void osd_work_queue_free(osd_work_queue *queue)
{
osd_work_item *item = (osd_work_item *)queue->free;
queue->free = item->next;
- if (item->event != NULL)
+ if (item->event != nullptr)
delete item->event;
delete item;
}
@@ -449,7 +449,7 @@ void osd_work_queue_free(osd_work_queue *queue)
{
osd_work_item *item = (osd_work_item *)queue->list;
queue->list = item->next;
- if (item->event != NULL)
+ if (item->event != nullptr)
delete item->event;
delete item;
}
@@ -472,7 +472,7 @@ void osd_work_queue_free(osd_work_queue *queue)
osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_callback callback, INT32 numitems, void *parambase, INT32 paramstep, UINT32 flags)
{
- osd_work_item *itemlist = NULL, *lastitem = NULL;
+ osd_work_item *itemlist = nullptr, *lastitem = nullptr;
osd_work_item **item_tailptr = &itemlist;
int itemnum;
@@ -487,16 +487,16 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
do
{
item = (osd_work_item *)queue->free;
- } while (item != NULL && !queue->free.compare_exchange_weak(item, item->next, std::memory_order_release, std::memory_order_relaxed));
+ } while (item != nullptr && !queue->free.compare_exchange_weak(item, item->next, std::memory_order_release, std::memory_order_relaxed));
}
// if nothing, allocate something new
- if (item == NULL)
+ if (item == nullptr)
{
// allocate the item
item = new osd_work_item(*queue);
- if (item == NULL)
- return NULL;
+ if (item == nullptr)
+ return nullptr;
}
else
{
@@ -504,10 +504,10 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
}
// fill in the basics
- item->next = NULL;
+ item->next = nullptr;
item->callback = callback;
item->param = parambase;
- item->result = NULL;
+ item->result = nullptr;
item->flags = flags;
// advance to the next
@@ -559,7 +559,7 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
begin_timing(queue->thread[0]->waittime);
}
// only return the item if it won't get released automatically
- return (flags & WORK_ITEM_FLAG_AUTO_RELEASE) ? NULL : lastitem;
+ return (flags & WORK_ITEM_FLAG_AUTO_RELEASE) ? nullptr : lastitem;
}
@@ -574,7 +574,7 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout)
return TRUE;
// if we don't have an event, create one
- if (item->event == NULL)
+ if (item->event == nullptr)
{
std::lock_guard<std::mutex> lock(item->queue.lock);
item->event = new osd_event(TRUE, FALSE); // manual reset, not signalled
@@ -583,7 +583,7 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout)
item->event->reset();
// if we don't have an event, we need to spin (shouldn't ever really happen)
- if (item->event == NULL)
+ if (item->event == nullptr)
{
// TODO: do we need to measure the spin time here as well? and how can we do it?
spin_while<std::atomic<int>,int>(&item->done, 0, timeout);
@@ -649,7 +649,7 @@ static int effective_num_processors(void)
// if the OSDPROCESSORS environment variable is set, use that value if valid
// note that we permit more than the real number of processors for testing
const char *procsoverride = osd_getenv(ENV_PROCESSORS);
- if (procsoverride != NULL && sscanf(procsoverride, "%d", &numprocs) == 1 && numprocs > 0)
+ if (procsoverride != nullptr && sscanf(procsoverride, "%d", &numprocs) == 1 && numprocs > 0)
return MIN(4 * physprocs, numprocs);
// otherwise, return the info from the system
@@ -715,7 +715,7 @@ static void *worker_thread_entry(void *param)
--queue.livethreads;
}
- return NULL;
+ return nullptr;
}
@@ -732,7 +732,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
// loop until everything is processed
while (true)
{
- osd_work_item *item = NULL;
+ osd_work_item *item = nullptr;
bool end_loop = false;
@@ -748,7 +748,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
{
// pull the item from the queue
item = (osd_work_item *)queue->list;
- if (item != NULL)
+ if (item != nullptr)
{
queue->list = item->next;
if (queue->list.load() == nullptr)
@@ -761,7 +761,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
break;
// process non-NULL items
- if (item != NULL)
+ if (item != nullptr)
{
// call the callback and stash the result
begin_timing(thread->actruntime);
@@ -782,7 +782,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
{
std::lock_guard<std::mutex> lock(queue->lock);
- if (item->event != NULL)
+ if (item->event != nullptr)
{
item->event->set();
add_to_stat(item->queue.setevents, 1);
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index c45c807efd5..46a1faa606b 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -140,7 +140,7 @@ public:
bool should_hide_mouse();
void process_events_buf();
- sdl_options &options() { return m_options; }
+ virtual sdl_options &options() override { return m_options; }
protected:
virtual void build_slider_list() override;
diff --git a/src/osd/sdl/sdldir.cpp b/src/osd/sdl/sdldir.cpp
index abf1f126b94..fcae732ed53 100644
--- a/src/osd/sdl/sdldir.cpp
+++ b/src/osd/sdl/sdldir.cpp
@@ -139,7 +139,7 @@ static UINT64 osd_get_file_size(const char *file)
osd_directory *osd_opendir(const char *dirname)
{
- osd_directory *dir = NULL;
+ osd_directory *dir = nullptr;
char *tmpstr, *envstr;
int i, j;
@@ -147,7 +147,7 @@ osd_directory *osd_opendir(const char *dirname)
if (dir)
{
memset(dir, 0, sizeof(osd_directory));
- dir->fd = NULL;
+ dir->fd = nullptr;
}
tmpstr = (char *) osd_malloc_array(strlen(dirname)+1);
@@ -168,7 +168,7 @@ osd_directory *osd_opendir(const char *dirname)
envstr[i] = '\0';
const char *envval = osd_getenv(&envstr[1]);
- if (envval != NULL)
+ if (envval != nullptr)
{
j = strlen(envval) + strlen(tmpstr) + 1;
osd_free(tmpstr);
@@ -189,11 +189,11 @@ osd_directory *osd_opendir(const char *dirname)
dir->fd = opendir(tmpstr);
dir->path = tmpstr;
- if (dir && (dir->fd == NULL))
+ if (dir && (dir->fd == nullptr))
{
osd_free(dir->path);
osd_free(dir);
- dir = NULL;
+ dir = nullptr;
}
return dir;
@@ -209,8 +209,8 @@ const osd_directory_entry *osd_readdir(osd_directory *dir)
char *temp;
dir->data = sdl_readdir(dir->fd);
- if (dir->data == NULL)
- return NULL;
+ if (dir->data == nullptr)
+ return nullptr;
dir->ent.name = dir->data->d_name;
temp = build_full_path(dir->path, dir->data->d_name);
@@ -231,7 +231,7 @@ const osd_directory_entry *osd_readdir(osd_directory *dir)
void osd_closedir(osd_directory *dir)
{
- if (dir->fd != NULL)
+ if (dir->fd != nullptr)
closedir(dir->fd);
osd_free(dir->path);
osd_free(dir);
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index a465e64655a..5112b3a3628 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -85,10 +85,10 @@ const options_entry sdl_options::s_option_entries[] =
{ SDLOPTION_INIPATH, INI_PATH, OPTION_STRING, "path to ini files" },
// performance options
- { NULL, NULL, OPTION_HEADER, "SDL PERFORMANCE OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL PERFORMANCE OPTIONS" },
{ SDLOPTION_SDLVIDEOFPS, "0", OPTION_BOOLEAN, "show sdl video performance" },
// video options
- { NULL, NULL, OPTION_HEADER, "SDL VIDEO OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL VIDEO OPTIONS" },
// OS X can be trusted to have working hardware OpenGL, so default to it on for the best user experience
{ SDLOPTION_CENTERH, "1", OPTION_BOOLEAN, "center horizontally within the view area" },
{ SDLOPTION_CENTERV, "1", OPTION_BOOLEAN, "center vertically within the view area" },
@@ -96,17 +96,17 @@ const options_entry sdl_options::s_option_entries[] =
// full screen options
#ifdef SDLMAME_X11
- { NULL, NULL, OPTION_HEADER, "SDL FULL SCREEN OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL FULL SCREEN OPTIONS" },
{ SDLOPTION_USEALLHEADS, "0", OPTION_BOOLEAN, "split full screen image across monitors" },
#endif
// keyboard mapping
- { NULL, NULL, OPTION_HEADER, "SDL KEYBOARD MAPPING" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL KEYBOARD MAPPING" },
{ SDLOPTION_KEYMAP, "0", OPTION_BOOLEAN, "enable keymap" },
{ SDLOPTION_KEYMAP_FILE, "keymap.dat", OPTION_STRING, "keymap filename" },
// joystick mapping
- { NULL, NULL, OPTION_HEADER, "SDL JOYSTICK MAPPING" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL JOYSTICK MAPPING" },
{ SDLOPTION_JOYINDEX "1", OSDOPTVAL_AUTO, OPTION_STRING, "name of joystick mapped to joystick #1" },
{ SDLOPTION_JOYINDEX "2", OSDOPTVAL_AUTO, OPTION_STRING, "name of joystick mapped to joystick #2" },
{ SDLOPTION_JOYINDEX "3", OSDOPTVAL_AUTO, OPTION_STRING, "name of joystick mapped to joystick #3" },
@@ -119,7 +119,7 @@ const options_entry sdl_options::s_option_entries[] =
#if (USE_XINPUT)
// lightgun mapping
- { NULL, NULL, OPTION_HEADER, "SDL LIGHTGUN MAPPING" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL LIGHTGUN MAPPING" },
{ SDLOPTION_LIGHTGUNINDEX "1", OSDOPTVAL_AUTO, OPTION_STRING, "name of lightgun mapped to lightgun #1" },
{ SDLOPTION_LIGHTGUNINDEX "2", OSDOPTVAL_AUTO, OPTION_STRING, "name of lightgun mapped to lightgun #2" },
{ SDLOPTION_LIGHTGUNINDEX "3", OSDOPTVAL_AUTO, OPTION_STRING, "name of lightgun mapped to lightgun #3" },
@@ -130,7 +130,7 @@ const options_entry sdl_options::s_option_entries[] =
{ SDLOPTION_LIGHTGUNINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of lightgun mapped to lightgun #8" },
#endif
- { NULL, NULL, OPTION_HEADER, "SDL MOUSE MAPPING" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL MOUSE MAPPING" },
{ SDLOPTION_MOUSEINDEX "1", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #1" },
{ SDLOPTION_MOUSEINDEX "2", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #2" },
{ SDLOPTION_MOUSEINDEX "3", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #3" },
@@ -140,7 +140,7 @@ const options_entry sdl_options::s_option_entries[] =
{ SDLOPTION_MOUSEINDEX "7", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #7" },
{ SDLOPTION_MOUSEINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #8" },
- { NULL, NULL, OPTION_HEADER, "SDL KEYBOARD MAPPING" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL KEYBOARD MAPPING" },
{ SDLOPTION_KEYBINDEX "1", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #1" },
{ SDLOPTION_KEYBINDEX "2", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #2" },
{ SDLOPTION_KEYBINDEX "3", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #3" },
@@ -151,7 +151,7 @@ const options_entry sdl_options::s_option_entries[] =
{ SDLOPTION_KEYBINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #8" },
// SDL low level driver options
- { NULL, NULL, OPTION_HEADER, "SDL LOWLEVEL DRIVER OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "SDL LOWLEVEL DRIVER OPTIONS" },
{ SDLOPTION_VIDEODRIVER ";vd", OSDOPTVAL_AUTO, OPTION_STRING, "sdl video driver to use ('x11', 'directfb', ... or 'auto' for SDL default" },
{ SDLOPTION_RENDERDRIVER ";rd", OSDOPTVAL_AUTO, OPTION_STRING, "sdl render driver to use ('software', 'opengl', 'directfb' ... or 'auto' for SDL default" },
{ SDLOPTION_AUDIODRIVER ";ad", OSDOPTVAL_AUTO, OPTION_STRING, "sdl audio driver to use ('alsa', 'arts', ... or 'auto' for SDL default" },
@@ -160,7 +160,7 @@ const options_entry sdl_options::s_option_entries[] =
#endif
// End of list
- { NULL }
+ { nullptr }
};
//============================================================
@@ -193,8 +193,8 @@ int main(int argc, char *argv[])
int res = 0;
// disable I/O buffering
- setvbuf(stdout, (char *) NULL, _IONBF, 0);
- setvbuf(stderr, (char *) NULL, _IONBF, 0);
+ setvbuf(stdout, (char *) nullptr, _IONBF, 0);
+ setvbuf(stderr, (char *) nullptr, _IONBF, 0);
// Initialize crash diagnostics
diagnostics_module::get_instance()->init_crash_diagnostics();
@@ -390,10 +390,10 @@ static void osd_sdl_info(void)
void sdl_osd_interface::video_register()
{
- video_options_add("soft", NULL);
- video_options_add("opengl", NULL);
- video_options_add("bgfx", NULL);
- //video_options_add("auto", NULL); // making d3d video default one
+ video_options_add("soft", nullptr);
+ video_options_add("opengl", nullptr);
+ video_options_add("bgfx", nullptr);
+ //video_options_add("auto", nullptr); // making d3d video default one
}
//============================================================
@@ -422,21 +422,21 @@ void sdl_osd_interface::init(running_machine &machine)
// Some driver options - must be before audio init!
stemp = options().audio_driver();
- if (stemp != NULL && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
+ if (stemp != nullptr && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
{
osd_printf_verbose("Setting SDL audiodriver '%s' ...\n", stemp);
osd_setenv(SDLENV_AUDIODRIVER, stemp, 1);
}
stemp = options().video_driver();
- if (stemp != NULL && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
+ if (stemp != nullptr && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
{
osd_printf_verbose("Setting SDL videodriver '%s' ...\n", stemp);
osd_setenv(SDLENV_VIDEODRIVER, stemp, 1);
}
stemp = options().render_driver();
- if (stemp != NULL)
+ if (stemp != nullptr)
{
if (strcmp(stemp, OSDOPTVAL_AUTO) != 0)
{
@@ -462,7 +462,7 @@ void sdl_osd_interface::init(running_machine &machine)
/* FIXME: move lib loading code from drawogl.c here */
stemp = options().gl_lib();
- if (stemp != NULL && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
+ if (stemp != nullptr && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
{
osd_setenv("SDL_VIDEO_GL_DRIVER", stemp, 1);
osd_printf_verbose("Setting SDL_VIDEO_GL_DRIVER = '%s' ...\n", stemp);
diff --git a/src/osd/sdl/video.cpp b/src/osd/sdl/video.cpp
index 61b118e8e1b..418df2cbe89 100644
--- a/src/osd/sdl/video.cpp
+++ b/src/osd/sdl/video.cpp
@@ -35,7 +35,7 @@
osd_video_config video_config;
// monitor info
-osd_monitor_info *osd_monitor_info::list = NULL;
+osd_monitor_info *osd_monitor_info::list = nullptr;
//============================================================
@@ -164,7 +164,7 @@ void sdl_monitor_info::init()
osd_monitor_info **tailptr;
// make a list of monitors
- osd_monitor_info::list = NULL;
+ osd_monitor_info::list = nullptr;
tailptr = &osd_monitor_info::list;
{
@@ -200,7 +200,7 @@ void sdl_monitor_info::init()
void sdl_monitor_info::exit()
{
// free all of our monitor information
- while (sdl_monitor_info::list != NULL)
+ while (sdl_monitor_info::list != nullptr)
{
osd_monitor_info *temp = sdl_monitor_info::list;
sdl_monitor_info::list = temp->next();
@@ -233,9 +233,9 @@ osd_monitor_info *osd_monitor_info::pick_monitor(osd_options &generic_options, i
aspect = get_aspect(options.aspect(), options.aspect(index), TRUE);
// look for a match in the name first
- if (scrname != NULL && (scrname[0] != 0))
+ if (scrname != nullptr && (scrname[0] != 0))
{
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->next())
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->next())
{
moncount++;
if (strcmp(scrname, monitor->devicename()) == 0)
@@ -245,12 +245,12 @@ osd_monitor_info *osd_monitor_info::pick_monitor(osd_options &generic_options, i
// didn't find it; alternate monitors until we hit the jackpot
index %= moncount;
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->next())
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->next())
if (index-- == 0)
goto finishit;
// return the primary just in case all else fails
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->next())
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->next())
if (monitor->is_primary())
goto finishit;
@@ -421,7 +421,7 @@ void sdl_osd_interface::extract_video_config()
strcpy(video_config.glsl_shader_mamebm[i], stemp);
video_config.glsl_shader_mamebm_num++;
} else {
- video_config.glsl_shader_mamebm[i] = NULL;
+ video_config.glsl_shader_mamebm[i] = nullptr;
}
}
@@ -436,7 +436,7 @@ void sdl_osd_interface::extract_video_config()
strcpy(video_config.glsl_shader_scrn[i], stemp);
video_config.glsl_shader_scrn_num++;
} else {
- video_config.glsl_shader_scrn[i] = NULL;
+ video_config.glsl_shader_scrn[i] = nullptr;
}
}
} else {
@@ -445,12 +445,12 @@ void sdl_osd_interface::extract_video_config()
video_config.glsl_shader_mamebm_num=0;
for(i=0; i<GLSL_SHADER_MAX; i++)
{
- video_config.glsl_shader_mamebm[i] = NULL;
+ video_config.glsl_shader_mamebm[i] = nullptr;
}
video_config.glsl_shader_scrn_num=0;
for(i=0; i<GLSL_SHADER_MAX; i++)
{
- video_config.glsl_shader_scrn[i] = NULL;
+ video_config.glsl_shader_scrn[i] = nullptr;
}
}
diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h
index 1c6993c0c0b..82db031aba1 100644
--- a/src/osd/sdl/video.h
+++ b/src/osd/sdl/video.h
@@ -24,7 +24,7 @@ public:
sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect)
: osd_monitor_info(&m_handle, monitor_device, aspect), m_handle(handle)
{
- refresh();
+ sdl_monitor_info::refresh();
}
// STATIC
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 8c36ede4d36..b1bd5cc0396 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -1318,12 +1318,12 @@ osd_dim sdl_window_info::get_max_bounds(int constrain)
sdl_window_info::sdl_window_info(running_machine &a_machine, int index, osd_monitor_info *a_monitor,
const osd_window_config *config)
-: osd_window(), m_next(NULL),
- // Following three are used by input code to defer resizes
+: osd_window(), m_next(nullptr), m_startmaximized(0),
+ // Following three are used by input code to defer resizes
m_minimum_dim(0,0),
m_windowed_dim(0,0),
- m_rendered_event(0, 1), m_target(0),
- m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0)
+ m_rendered_event(0, 1), m_target(nullptr), m_extra_flags(0),
+ m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0)
{
m_win_config = *config;
m_index = index;
diff --git a/src/osd/strconv.cpp b/src/osd/strconv.cpp
index c5c02edd2f5..eec1bcc4059 100644
--- a/src/osd/strconv.cpp
+++ b/src/osd/strconv.cpp
@@ -26,15 +26,15 @@ CHAR *astring_from_utf8(const char *utf8string)
CHAR *result;
// convert MAME string (UTF-8) to UTF-16
- char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, NULL, 0);
+ char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, nullptr, 0);
wstring = (WCHAR *)alloca(char_count * sizeof(*wstring));
MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, wstring, char_count);
// convert UTF-16 to "ANSI code page" string
- char_count = WideCharToMultiByte(CP_ACP, 0, wstring, -1, NULL, 0, NULL, NULL);
+ char_count = WideCharToMultiByte(CP_ACP, 0, wstring, -1, nullptr, 0, nullptr, nullptr);
result = (CHAR *)osd_malloc_array(char_count * sizeof(*result));
- if (result != NULL)
- WideCharToMultiByte(CP_ACP, 0, wstring, -1, result, char_count, NULL, NULL);
+ if (result != nullptr)
+ WideCharToMultiByte(CP_ACP, 0, wstring, -1, result, char_count, nullptr, nullptr);
return result;
}
@@ -51,15 +51,15 @@ char *utf8_from_astring(const CHAR *astring)
CHAR *result;
// convert "ANSI code page" string to UTF-16
- char_count = MultiByteToWideChar(CP_ACP, 0, astring, -1, NULL, 0);
+ char_count = MultiByteToWideChar(CP_ACP, 0, astring, -1, nullptr, 0);
wstring = (WCHAR *)alloca(char_count * sizeof(*wstring));
MultiByteToWideChar(CP_ACP, 0, astring, -1, wstring, char_count);
// convert UTF-16 to MAME string (UTF-8)
- char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL);
+ char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, nullptr, 0, nullptr, nullptr);
result = (CHAR *)osd_malloc_array(char_count * sizeof(*result));
- if (result != NULL)
- WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL);
+ if (result != nullptr)
+ WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, nullptr, nullptr);
return result;
}
@@ -75,9 +75,9 @@ WCHAR *wstring_from_utf8(const char *utf8string)
WCHAR *result;
// convert MAME string (UTF-8) to UTF-16
- char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, NULL, 0);
+ char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, nullptr, 0);
result = (WCHAR *)osd_malloc_array(char_count * sizeof(*result));
- if (result != NULL)
+ if (result != nullptr)
MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, result, char_count);
return result;
@@ -94,10 +94,10 @@ char *utf8_from_wstring(const WCHAR *wstring)
char *result;
// convert UTF-16 to MAME string (UTF-8)
- char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL);
+ char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, nullptr, 0, nullptr, nullptr);
result = (char *)osd_malloc_array(char_count * sizeof(*result));
- if (result != NULL)
- WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL);
+ if (result != nullptr)
+ WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, nullptr, nullptr);
return result;
}
diff --git a/src/osd/strconv.h b/src/osd/strconv.h
index aaab2527d25..c9674cc486e 100644
--- a/src/osd/strconv.h
+++ b/src/osd/strconv.h
@@ -35,7 +35,7 @@ char *utf8_from_wstring(const WCHAR *s);
struct osd_wstr_deleter
{
- void operator () (wchar_t* wstr)
+ void operator () (wchar_t* wstr) const
{
if (wstr != nullptr)
osd_free(wstr);
diff --git a/src/osd/watchdog.h b/src/osd/watchdog.h
index dbcccf43abf..415c1269882 100644
--- a/src/osd/watchdog.h
+++ b/src/osd/watchdog.h
@@ -23,8 +23,8 @@ public:
void reset() { m_event.set(); }
osd_event & event(void) { return m_event; }
- INT32 do_exit(void) { return m_do_exit; }
- osd_ticks_t getTimeout(void) { return m_timeout; }
+ INT32 do_exit(void) const { return m_do_exit; }
+ osd_ticks_t getTimeout(void) const { return m_timeout; }
void setTimeout(int timeout);
private:
osd_event m_event;
diff --git a/src/osd/windows/main.cpp b/src/osd/windows/main.cpp
index 6e7717349bb..f4be66a2b98 100644
--- a/src/osd/windows/main.cpp
+++ b/src/osd/windows/main.cpp
@@ -32,12 +32,12 @@ extern "C" int _tmain(int argc, TCHAR **argv)
/* convert arguments to UTF-8 */
utf8_argv = (char **) malloc(argc * sizeof(*argv));
- if (utf8_argv == NULL)
+ if (utf8_argv == nullptr)
return 999;
for (i = 0; i < argc; i++)
{
utf8_argv[i] = utf8_from_tstring(argv[i]);
- if (utf8_argv[i] == NULL)
+ if (utf8_argv[i] == nullptr)
return 999;
}
diff --git a/src/osd/windows/video.cpp b/src/osd/windows/video.cpp
index 82a756d7dd6..fc6f787b698 100644
--- a/src/osd/windows/video.cpp
+++ b/src/osd/windows/video.cpp
@@ -36,7 +36,7 @@
osd_video_config video_config;
// monitor info
-osd_monitor_info *osd_monitor_info::list = NULL;
+osd_monitor_info *osd_monitor_info::list = nullptr;
//============================================================
@@ -94,7 +94,7 @@ void windows_osd_interface::video_exit()
window_exit();
// free all of our monitor information
- while (osd_monitor_info::list != NULL)
+ while (osd_monitor_info::list != nullptr)
{
osd_monitor_info *temp = osd_monitor_info::list;
osd_monitor_info::list = temp->m_next;
@@ -149,10 +149,10 @@ osd_monitor_info *win_monitor_info::monitor_from_handle(HMONITOR hmonitor)
osd_monitor_info *monitor;
// find the matching monitor
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->m_next)
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->m_next)
if (*((HMONITOR *)monitor->oshandle()) == hmonitor)
return monitor;
- return NULL;
+ return nullptr;
}
@@ -231,14 +231,14 @@ static void init_monitors(void)
osd_monitor_info **tailptr;
// make a list of monitors
- osd_monitor_info::list = NULL;
+ osd_monitor_info::list = nullptr;
tailptr = &osd_monitor_info::list;
- EnumDisplayMonitors(NULL, NULL, win_monitor_info::monitor_enum_callback, (LPARAM)&tailptr);
+ EnumDisplayMonitors(nullptr, nullptr, win_monitor_info::monitor_enum_callback, (LPARAM)&tailptr);
// if we're verbose, print the list of monitors
{
osd_monitor_info *monitor;
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->m_next)
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->m_next)
{
osd_printf_verbose("Video: Monitor %p = \"%s\" %s\n", monitor->oshandle(), monitor->devicename(), monitor->is_primary() ? "(primary)" : "");
}
@@ -270,9 +270,9 @@ osd_monitor_info *osd_monitor_info::pick_monitor(osd_options &osdopts, int index
aspect = get_aspect(options.aspect(), options.aspect(index), TRUE);
// look for a match in the name first
- if (scrname != NULL && (scrname[0] != 0))
+ if (scrname != nullptr && (scrname[0] != 0))
{
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->next())
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->next())
{
moncount++;
if (strcmp(scrname, monitor->devicename()) == 0)
@@ -282,12 +282,12 @@ osd_monitor_info *osd_monitor_info::pick_monitor(osd_options &osdopts, int index
// didn't find it; alternate monitors until we hit the jackpot
index %= moncount;
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->next())
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->next())
if (index-- == 0)
goto finishit;
// return the primary just in case all else fails
- for (monitor = osd_monitor_info::list; monitor != NULL; monitor = monitor->next())
+ for (monitor = osd_monitor_info::list; monitor != nullptr; monitor = monitor->next())
if (monitor->is_primary())
goto finishit;
@@ -411,7 +411,7 @@ void windows_osd_interface::extract_video_config()
strcpy(video_config.glsl_shader_mamebm[i], stemp);
video_config.glsl_shader_mamebm_num++;
} else {
- video_config.glsl_shader_mamebm[i] = NULL;
+ video_config.glsl_shader_mamebm[i] = nullptr;
}
}
@@ -426,7 +426,7 @@ void windows_osd_interface::extract_video_config()
strcpy(video_config.glsl_shader_scrn[i], stemp);
video_config.glsl_shader_scrn_num++;
} else {
- video_config.glsl_shader_scrn[i] = NULL;
+ video_config.glsl_shader_scrn[i] = nullptr;
}
}
} else {
@@ -435,12 +435,12 @@ void windows_osd_interface::extract_video_config()
video_config.glsl_shader_mamebm_num=0;
for(i=0; i<GLSL_SHADER_MAX; i++)
{
- video_config.glsl_shader_mamebm[i] = NULL;
+ video_config.glsl_shader_mamebm[i] = nullptr;
}
video_config.glsl_shader_scrn_num=0;
for(i=0; i<GLSL_SHADER_MAX; i++)
{
- video_config.glsl_shader_scrn[i] = NULL;
+ video_config.glsl_shader_scrn[i] = nullptr;
}
}
diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h
index f47a5260b8e..171cfa1aaec 100644
--- a/src/osd/windows/video.h
+++ b/src/osd/windows/video.h
@@ -35,7 +35,7 @@ public:
static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data);
static osd_monitor_info *monitor_from_handle(HMONITOR monitor);
- HMONITOR handle() { return m_handle; }
+ HMONITOR handle() const { return m_handle; }
private:
HMONITOR m_handle; // handle to the monitor
diff --git a/src/osd/windows/windir.cpp b/src/osd/windows/windir.cpp
index 87b1b5e05ce..f7b7fd44c6a 100644
--- a/src/osd/windows/windir.cpp
+++ b/src/osd/windows/windir.cpp
@@ -44,14 +44,14 @@ struct osd_directory
osd_directory *osd_opendir(const char *dirname)
{
- osd_directory *dir = NULL;
- TCHAR *t_dirname = NULL;
- TCHAR *dirfilter = NULL;
+ osd_directory *dir = nullptr;
+ TCHAR *t_dirname = nullptr;
+ TCHAR *dirfilter = nullptr;
size_t dirfilter_size;
// allocate memory to hold the osd_tool_directory structure
dir = (osd_directory *)malloc(sizeof(*dir));
- if (dir == NULL)
+ if (dir == nullptr)
goto error;
memset(dir, 0, sizeof(*dir));
@@ -61,13 +61,13 @@ osd_directory *osd_opendir(const char *dirname)
// convert the path to TCHARs
t_dirname = tstring_from_utf8(dirname);
- if (t_dirname == NULL)
+ if (t_dirname == nullptr)
goto error;
// append \*.* to the directory name
dirfilter_size = _tcslen(t_dirname) + 5;
dirfilter = (TCHAR *)malloc(dirfilter_size * sizeof(*dirfilter));
- if (dirfilter == NULL)
+ if (dirfilter == nullptr)
goto error;
_sntprintf(dirfilter, dirfilter_size, TEXT("%s\\*.*"), t_dirname);
@@ -76,14 +76,14 @@ osd_directory *osd_opendir(const char *dirname)
error:
// cleanup
- if (t_dirname != NULL)
+ if (t_dirname != nullptr)
osd_free(t_dirname);
- if (dirfilter != NULL)
+ if (dirfilter != nullptr)
free(dirfilter);
- if (dir != NULL && dir->find == INVALID_HANDLE_VALUE)
+ if (dir != nullptr && dir->find == INVALID_HANDLE_VALUE)
{
free(dir);
- dir = NULL;
+ dir = nullptr;
}
return dir;
}
@@ -96,17 +96,17 @@ error:
const osd_directory_entry *osd_readdir(osd_directory *dir)
{
// if we've previously allocated a name, free it now
- if (dir->entry.name != NULL)
+ if (dir->entry.name != nullptr)
{
osd_free((void *)dir->entry.name);
- dir->entry.name = NULL;
+ dir->entry.name = nullptr;
}
// if this isn't the first file, do a find next
if (!dir->is_first)
{
if (!FindNextFile(dir->find, &dir->data))
- return NULL;
+ return nullptr;
}
// otherwise, just use the data we already had
@@ -117,7 +117,7 @@ const osd_directory_entry *osd_readdir(osd_directory *dir)
dir->entry.name = utf8_from_tstring(dir->data.cFileName);
dir->entry.type = win_attributes_to_entry_type(dir->data.dwFileAttributes);
dir->entry.size = dir->data.nFileSizeLow | ((UINT64) dir->data.nFileSizeHigh << 32);
- return (dir->entry.name != NULL) ? &dir->entry : NULL;
+ return (dir->entry.name != nullptr) ? &dir->entry : nullptr;
}
@@ -128,7 +128,7 @@ const osd_directory_entry *osd_readdir(osd_directory *dir)
void osd_closedir(osd_directory *dir)
{
// free any data associated
- if (dir->entry.name != NULL)
+ if (dir->entry.name != nullptr)
osd_free((void *)dir->entry.name);
if (dir->find != INVALID_HANDLE_VALUE)
FindClose(dir->find);
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index f5534a13544..b8344acf9b0 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -358,7 +358,7 @@ win_window_info::win_window_info(
m_isminimized(0),
m_ismaximized(0),
m_monitor(monitor),
- //m_fullscreen(0),
+ m_fullscreen(!video_config.windowed),
m_fullscreen_safe(0),
m_aspect(0),
m_target(nullptr),
@@ -1977,7 +1977,7 @@ void win_window_info::set_fullscreen(int fullscreen)
// if we're in the right state, punt
if (this->fullscreen() == fullscreen)
return;
- video_config.windowed = !fullscreen;
+ m_fullscreen = fullscreen;
// kill off the drawers
m_renderer.reset();
@@ -1991,7 +1991,7 @@ void win_window_info::set_fullscreen(int fullscreen)
// adjust the style
SetWindowLong(platform_window<HWND>(), GWL_STYLE, WINDOW_STYLE);
SetWindowLong(platform_window<HWND>(), GWL_EXSTYLE, WINDOW_STYLE_EX);
- SetWindowPos(platform_window<HWND>(), 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
+ SetWindowPos(platform_window<HWND>(), nullptr, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
// force to the bottom, then back on top
SetWindowPos(platform_window<HWND>(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
@@ -2022,7 +2022,7 @@ void win_window_info::set_fullscreen(int fullscreen)
// adjust the style
SetWindowLong(platform_window<HWND>(), GWL_STYLE, FULLSCREEN_STYLE);
SetWindowLong(platform_window<HWND>(), GWL_EXSTYLE, FULLSCREEN_STYLE_EX);
- SetWindowPos(platform_window<HWND>(), 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
+ SetWindowPos(platform_window<HWND>(), nullptr, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
// set topmost
SetWindowPos(platform_window<HWND>(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h
index 47eae45d034..e394723ea82 100644
--- a/src/osd/windows/window.h
+++ b/src/osd/windows/window.h
@@ -53,7 +53,7 @@ public:
running_machine &machine() const override { return m_machine; }
virtual render_target *target() override { return m_target; }
- int fullscreen() const override { return !video_config.windowed; }
+ int fullscreen() const override { return m_fullscreen; }
void update();
@@ -111,7 +111,7 @@ public:
// monitor info
osd_monitor_info * m_monitor;
- //int m_fullscreen;
+ int m_fullscreen;
int m_fullscreen_safe;
float m_aspect;
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp
index 940746ff484..136daea0636 100644
--- a/src/osd/windows/winmain.cpp
+++ b/src/osd/windows/winmain.cpp
@@ -380,7 +380,7 @@ void MameMainApp::Run()
// To satisfy the latter things, pass in the module path name
char exe_path[MAX_PATH];
- GetModuleFileNameA(NULL, exe_path, MAX_PATH);
+ GetModuleFileNameA(nullptr, exe_path, MAX_PATH);
char* args[2] = { exe_path, (char*)"-verbose" };
DWORD result = emulator_info::start_frontend(*m_options.get(), *m_osd.get(), ARRAY_LENGTH(args), args);
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 8f0bd77f4a7..72e2112a04b 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -291,7 +291,7 @@ public:
bool should_hide_mouse() const;
void poll_input(running_machine &machine) const;
- windows_options &options() { return m_options; }
+ virtual windows_options &options() override { return m_options; }
int window_count();
@@ -307,7 +307,6 @@ private:
windows_options & m_options;
static const int DEFAULT_FONT_HEIGHT = 200;
- static long __stdcall exception_filter(struct _EXCEPTION_POINTERS *info);
};
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
diff --git a/src/osd/windows/winutf8.cpp b/src/osd/windows/winutf8.cpp
index cd34b1d12fe..08abcb58dd8 100644
--- a/src/osd/windows/winutf8.cpp
+++ b/src/osd/windows/winutf8.cpp
@@ -24,7 +24,7 @@
void win_output_debug_string_utf8(const char *string)
{
TCHAR *t_string = tstring_from_utf8(string);
- if (t_string != NULL)
+ if (t_string != nullptr)
{
OutputDebugString(t_string);
osd_free(t_string);
@@ -40,8 +40,8 @@ void win_output_debug_string_utf8(const char *string)
int win_message_box_utf8(HWND window, const char *text, const char *caption, UINT type)
{
int result = IDNO;
- TCHAR *t_text = NULL;
- TCHAR *t_caption = NULL;
+ TCHAR *t_text = nullptr;
+ TCHAR *t_caption = nullptr;
if (text)
{
@@ -76,7 +76,7 @@ done:
BOOL win_set_window_text_utf8(HWND window, const char *text)
{
BOOL result = FALSE;
- TCHAR *t_text = NULL;
+ TCHAR *t_text = nullptr;
if (text)
{
@@ -107,7 +107,7 @@ done:
int win_get_window_text_utf8(HWND window, char *buffer, size_t buffer_size)
{
int result = 0;
- char *utf8_buffer = NULL;
+ char *utf8_buffer = nullptr;
TCHAR t_buffer[256];
t_buffer[0] = '\0';
@@ -143,8 +143,8 @@ HWND win_create_window_ex_utf8(DWORD exstyle, const char* classname, const char*
HINSTANCE instance, void* param)
{
TCHAR* t_classname;
- TCHAR* t_windowname = NULL;
- HWND result = 0;
+ TCHAR* t_windowname = nullptr;
+ HWND result = nullptr;
t_classname = tstring_from_utf8(classname);
if( !t_classname )
diff --git a/src/osd/windows/winutil.cpp b/src/osd/windows/winutil.cpp
index 607699749bb..3574f00f398 100644
--- a/src/osd/windows/winutil.cpp
+++ b/src/osd/windows/winutil.cpp
@@ -122,7 +122,7 @@ lazy_loaded_function::lazy_loaded_function(const char * name, const wchar_t* dll
}
lazy_loaded_function::lazy_loaded_function(const char * name, const wchar_t** dll_names, int dll_count)
- : m_name(name), m_module(NULL), m_initialized(false), m_pfn(nullptr)
+ : m_name(name), m_module(nullptr), m_initialized(false), m_pfn(nullptr)
{
for (int i = 0; i < dll_count; i++)
m_dll_names.push_back(std::wstring(dll_names[i]));
@@ -144,11 +144,11 @@ int lazy_loaded_function::initialize()
for (int i = 0; i < m_dll_names.size(); i++)
{
m_module = LoadLibraryW(m_dll_names[i].c_str());
- if (m_module != NULL)
+ if (m_module != nullptr)
break;
}
- if (m_module == NULL)
+ if (m_module == nullptr)
{
osd_printf_verbose("Could not find DLL to dynamically link function %s.\n", m_name.c_str());
return ERROR_DLL_NOT_FOUND;
@@ -170,7 +170,7 @@ int lazy_loaded_function::initialize()
return 0;
}
-void lazy_loaded_function::check_init()
+void lazy_loaded_function::check_init() const
{
if (!m_initialized)
fatalerror("Attempt to use function pointer for function %s prior to init!", name());
diff --git a/src/osd/windows/winutil.h b/src/osd/windows/winutil.h
index 6cb8297c277..d122679438e 100644
--- a/src/osd/windows/winutil.h
+++ b/src/osd/windows/winutil.h
@@ -31,7 +31,7 @@ private:
bool m_initialized;
protected:
- void check_init();
+ void check_init() const;
FARPROC m_pfn;
public:
@@ -39,7 +39,7 @@ public:
lazy_loaded_function(const char * name, const wchar_t** dll_names, int dll_count);
~lazy_loaded_function();
int initialize();
- const char * name() { return m_name.c_str(); }
+ const char * name() const { return m_name.c_str(); }
};
// No parameters